/[linux-patches]/genpatches-2.6/trunk/2.6.14-pre/1340_sparc-obp64-naming.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14-pre/1340_sparc-obp64-naming.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 175 - (hide annotations) (download)
Sat Oct 8 10:49:55 2005 UTC (12 years, 10 months ago) by dsd
File size: 1558 byte(s)
Creating 2.6.14-pre branch from 2.6.13
1 dsd 3 From http://dev.gentoo.org/~wesolows
2    
3     Change the OBP naming for 64-bit systems. This better matches the
4     reg/offset calculations done by the PROM on Spitfire systems, and
5     prevents duplicate names (!) in openpromfs. It's utterly broken on
6     Cheetah/Jalapeno however.
7    
8     -------------------------------------------------------------------------------
9    
10     ===== arch/sparc64/prom/tree.c 1.1 vs edited =====
11     --- 1.1/arch/sparc64/prom/tree.c Tue Feb 5 09:40:29 2002
12     +++ edited/arch/sparc64/prom/tree.c Mon Mar 29 11:57:44 2004
13     @@ -196,6 +196,7 @@
14     {
15     int i, sbus = 0;
16     int pci = 0, ebus = 0, ide = 0;
17     + char *name;
18     struct linux_prom_registers *reg;
19     struct linux_prom64_registers reg64[PROMREG_MAX];
20    
21     @@ -241,6 +242,7 @@
22     return -1;
23     }
24     buffer [i] = 0;
25     + name = buffer;
26     len -= i;
27     i = prom_getproperty (node, "reg", (char *)reg64, sizeof (reg64));
28     if (i <= 0) return 0;
29     @@ -267,9 +269,15 @@
30     } else if (i == 4) { /* Happens on 8042's children on Ultra/PCI. */
31     reg = (struct linux_prom_registers *)reg64;
32     sprintf (buffer, "@%x", reg[0].which_io);
33     + } else if (!strcmp(name, "fhc") || !strcmp(name, "counter-timer")) {
34     + sprintf(buffer, "@%x,%x",
35     + (unsigned int)((reg64[0].phys_addr >> 33) & 0x1f),
36     + (unsigned int)(reg64[0].phys_addr));
37     } else {
38     - sprintf (buffer, "@%x,%x",
39     - (unsigned int)(reg64[0].phys_addr >> 36),
40     + int upaid = prom_getint(node, "upa-portid");
41     + if (upaid < 0)
42     + upaid = (unsigned int)(reg64[0].phys_addr >> 36);
43     + sprintf (buffer, "@%x,%x", upaid,
44     (unsigned int)(reg64[0].phys_addr));
45     }
46     return 0;

  ViewVC Help
Powered by ViewVC 1.1.20