diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 17:00:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 17:00:09 -0400 |
commit | 9f5577d8158d8190174d95cbf21713251cc8a044 (patch) | |
tree | 3656a23b397d4efb303b560d921a5206e934a3bd /arch | |
parent | 257f49251c802c67030c11f63cee4ed7b50f6639 (diff) | |
parent | 46b2835771ad8ef19b8e081e8c90439408c7645f (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (21 commits)
[POWERPC] spusched: Fix initial timeslice calculation
[POWERPC] spufs: Fix incorrect initialization of cbe_spu_info.spus
[POWERPC] Fix Maple platform ISA bus
[POWERPC] Make pci_iounmap actually unmap things
[POWERPC] Add function to check if address is an IO port
[POWERPC] Fix Pegasos keyboard detection
[POWERPC] iSeries: Fix section mismatch warning in lpevents
[POWERPC] iSeries: Fix section mismatch warnings
[POWERPC] iSeries: We need vio_enable_interrupts
[POWERPC] Fix RTC and device tree on linkstation machines
[POWERPC] Add of_register_i2c_devices()
[POWERPC] Fix loop with unsigned long counter variable
[POWERPC] Fix register labels on show_regs() message for 4xx/Book-E
[POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM
[POWERPC] Fix the ability to reset on MPC8544 DS and MPC8568 MDS boards
[POWERPC] Fix mpc7448hpc2 tsi108 device_type bug
[POWREPC] Fixup a number of modpost warnings on ppc32
[POWERPC] Fix ethernet PHY support on MPC8544 DS
[POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB
Revert "[POWERPC] Don't complain if size-cells == 0 in prom_parse()"
...
Diffstat (limited to 'arch')
24 files changed, 184 insertions, 37 deletions
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 346cd3befe1e..5c71624ee38d 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
@@ -134,7 +134,7 @@ config BDI_SWITCH | |||
134 | 134 | ||
135 | config BOOTX_TEXT | 135 | config BOOTX_TEXT |
136 | bool "Support for early boot text console (BootX or OpenFirmware only)" | 136 | bool "Support for early boot text console (BootX or OpenFirmware only)" |
137 | depends PPC_OF | 137 | depends PPC_OF && PPC_MULTIPLATFORM |
138 | help | 138 | help |
139 | Say Y here to see progress messages from the boot firmware in text | 139 | Say Y here to see progress messages from the boot firmware in text |
140 | mode. Requires either BootX or Open Firmware. | 140 | mode. Requires either BootX or Open Firmware. |
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts index a983680c3263..122537419d9f 100644 --- a/arch/powerpc/boot/dts/kuroboxHD.dts +++ b/arch/powerpc/boot/dts/kuroboxHD.dts | |||
@@ -33,12 +33,10 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
33 | PowerPC,603e { /* Really 8241 */ | 33 | PowerPC,603e { /* Really 8241 */ |
34 | device_type = "cpu"; | 34 | device_type = "cpu"; |
35 | reg = <0>; | 35 | reg = <0>; |
36 | clock-frequency = <bebc200>; /* Fixed by bootwrapper */ | 36 | clock-frequency = <bebc200>; /* Fixed by bootloader */ |
37 | timebase-frequency = <1743000>; /* Fixed by bootwrapper */ | 37 | timebase-frequency = <1743000>; /* Fixed by bootloader */ |
38 | bus-frequency = <0>; /* From bootloader */ | 38 | bus-frequency = <0>; /* Fixed by bootloader */ |
39 | /* Following required by dtc but not used */ | 39 | /* Following required by dtc but not used */ |
40 | i-cache-line-size = <0>; | ||
41 | d-cache-line-size = <0>; | ||
42 | i-cache-size = <4000>; | 40 | i-cache-size = <4000>; |
43 | d-cache-size = <4000>; | 41 | d-cache-size = <4000>; |
44 | }; | 42 | }; |
@@ -64,11 +62,19 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
64 | fef00000 fef00000 00100000>; /* pci iack */ | 62 | fef00000 fef00000 00100000>; /* pci iack */ |
65 | 63 | ||
66 | i2c@80003000 { | 64 | i2c@80003000 { |
65 | #address-cells = <1>; | ||
66 | #size-cells = <0>; | ||
67 | device_type = "i2c"; | 67 | device_type = "i2c"; |
68 | compatible = "fsl-i2c"; | 68 | compatible = "fsl-i2c"; |
69 | reg = <80003000 1000>; | 69 | reg = <80003000 1000>; |
70 | interrupts = <5 2>; | 70 | interrupts = <5 2>; |
71 | interrupt-parent = <&mpic>; | 71 | interrupt-parent = <&mpic>; |
72 | |||
73 | rtc@32 { | ||
74 | device_type = "rtc"; | ||
75 | compatible = "ricoh,rs5c372b"; | ||
76 | reg = <32>; | ||
77 | }; | ||
72 | }; | 78 | }; |
73 | 79 | ||
74 | serial@80004500 { | 80 | serial@80004500 { |
@@ -91,7 +97,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
91 | interrupt-parent = <&mpic>; | 97 | interrupt-parent = <&mpic>; |
92 | }; | 98 | }; |
93 | 99 | ||
94 | mpic: pic@80040000 { | 100 | mpic: interrupt-controller@80040000 { |
95 | #interrupt-cells = <2>; | 101 | #interrupt-cells = <2>; |
96 | #address-cells = <0>; | 102 | #address-cells = <0>; |
97 | device_type = "open-pic"; | 103 | device_type = "open-pic"; |
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts index 5cf42dc022df..579aa8b967d9 100644 --- a/arch/powerpc/boot/dts/kuroboxHG.dts +++ b/arch/powerpc/boot/dts/kuroboxHG.dts | |||
@@ -33,12 +33,10 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
33 | PowerPC,603e { /* Really 8241 */ | 33 | PowerPC,603e { /* Really 8241 */ |
34 | device_type = "cpu"; | 34 | device_type = "cpu"; |
35 | reg = <0>; | 35 | reg = <0>; |
36 | clock-frequency = <fdad680>; /* Fixed by bootwrapper */ | 36 | clock-frequency = <fdad680>; /* Fixed by bootloader */ |
37 | timebase-frequency = <1F04000>; /* Fixed by bootwrapper */ | 37 | timebase-frequency = <1F04000>; /* Fixed by bootloader */ |
38 | bus-frequency = <0>; /* From bootloader */ | 38 | bus-frequency = <0>; /* Fixed by bootloader */ |
39 | /* Following required by dtc but not used */ | 39 | /* Following required by dtc but not used */ |
40 | i-cache-line-size = <0>; | ||
41 | d-cache-line-size = <0>; | ||
42 | i-cache-size = <4000>; | 40 | i-cache-size = <4000>; |
43 | d-cache-size = <4000>; | 41 | d-cache-size = <4000>; |
44 | }; | 42 | }; |
@@ -64,11 +62,19 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
64 | fef00000 fef00000 00100000>; /* pci iack */ | 62 | fef00000 fef00000 00100000>; /* pci iack */ |
65 | 63 | ||
66 | i2c@80003000 { | 64 | i2c@80003000 { |
65 | #address-cells = <1>; | ||
66 | #size-cells = <0>; | ||
67 | device_type = "i2c"; | 67 | device_type = "i2c"; |
68 | compatible = "fsl-i2c"; | 68 | compatible = "fsl-i2c"; |
69 | reg = <80003000 1000>; | 69 | reg = <80003000 1000>; |
70 | interrupts = <5 2>; | 70 | interrupts = <5 2>; |
71 | interrupt-parent = <&mpic>; | 71 | interrupt-parent = <&mpic>; |
72 | |||
73 | rtc@32 { | ||
74 | device_type = "rtc"; | ||
75 | compatible = "ricoh,rs5c372b"; | ||
76 | reg = <32>; | ||
77 | }; | ||
72 | }; | 78 | }; |
73 | 79 | ||
74 | serial@80004500 { | 80 | serial@80004500 { |
@@ -91,8 +97,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
91 | interrupt-parent = <&mpic>; | 97 | interrupt-parent = <&mpic>; |
92 | }; | 98 | }; |
93 | 99 | ||
94 | mpic: pic@80040000 { | 100 | mpic: interrupt-controller@80040000 { |
95 | interrupt-parent = <&mpic>; | ||
96 | #interrupt-cells = <2>; | 101 | #interrupt-cells = <2>; |
97 | #address-cells = <0>; | 102 | #address-cells = <0>; |
98 | device_type = "open-pic"; | 103 | device_type = "open-pic"; |
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts index 0e3d314a7158..b9158eb2797e 100644 --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts +++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts | |||
@@ -45,7 +45,7 @@ | |||
45 | #address-cells = <1>; | 45 | #address-cells = <1>; |
46 | #size-cells = <1>; | 46 | #size-cells = <1>; |
47 | #interrupt-cells = <2>; | 47 | #interrupt-cells = <2>; |
48 | device_type = "tsi108-bridge"; | 48 | device_type = "tsi-bridge"; |
49 | ranges = <00000000 c0000000 00010000>; | 49 | ranges = <00000000 c0000000 00010000>; |
50 | reg = <c0000000 00010000>; | 50 | reg = <c0000000 00010000>; |
51 | bus-frequency = <0>; | 51 | bus-frequency = <0>; |
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index 4a900c6df762..4680e2010887 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts | |||
@@ -104,6 +104,7 @@ | |||
104 | interrupts = <1d 2 1e 2 22 2>; | 104 | interrupts = <1d 2 1e 2 22 2>; |
105 | interrupt-parent = <&mpic>; | 105 | interrupt-parent = <&mpic>; |
106 | phy-handle = <&phy0>; | 106 | phy-handle = <&phy0>; |
107 | phy-connection-type = "rgmii-id"; | ||
107 | }; | 108 | }; |
108 | 109 | ||
109 | ethernet@26000 { | 110 | ethernet@26000 { |
@@ -117,6 +118,7 @@ | |||
117 | interrupts = <1f 2 20 2 21 2>; | 118 | interrupts = <1f 2 20 2 21 2>; |
118 | interrupt-parent = <&mpic>; | 119 | interrupt-parent = <&mpic>; |
119 | phy-handle = <&phy1>; | 120 | phy-handle = <&phy1>; |
121 | phy-connection-type = "rgmii-id"; | ||
120 | }; | 122 | }; |
121 | 123 | ||
122 | serial@4500 { | 124 | serial@4500 { |
@@ -348,6 +350,12 @@ | |||
348 | 350 | ||
349 | }; | 351 | }; |
350 | 352 | ||
353 | global-utilities@e0000 { //global utilities block | ||
354 | compatible = "fsl,mpc8548-guts"; | ||
355 | reg = <e0000 1000>; | ||
356 | fsl,has-rstcr; | ||
357 | }; | ||
358 | |||
351 | mpic: pic@40000 { | 359 | mpic: pic@40000 { |
352 | clock-frequency = <0>; | 360 | clock-frequency = <0>; |
353 | interrupt-controller; | 361 | interrupt-controller; |
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index 99fa5a0ea425..b1dcfbe8c1f8 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts | |||
@@ -170,6 +170,12 @@ | |||
170 | interrupt-parent = <&mpic>; | 170 | interrupt-parent = <&mpic>; |
171 | }; | 171 | }; |
172 | 172 | ||
173 | global-utilities@e0000 { //global utilities block | ||
174 | compatible = "fsl,mpc8548-guts"; | ||
175 | reg = <e0000 1000>; | ||
176 | fsl,has-rstcr; | ||
177 | }; | ||
178 | |||
173 | pci@8000 { | 179 | pci@8000 { |
174 | interrupt-map-mask = <f800 0 0 7>; | 180 | interrupt-map-mask = <f800 0 0 7>; |
175 | interrupt-map = < | 181 | interrupt-map = < |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 8cdd48ea4391..1448af92c6a9 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -809,8 +809,9 @@ system_reset_iSeries: | |||
809 | mtmsrd r24 /* RI on */ | 809 | mtmsrd r24 /* RI on */ |
810 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ | 810 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ |
811 | cmpwi 0,r24,0 /* Are we processor 0? */ | 811 | cmpwi 0,r24,0 /* Are we processor 0? */ |
812 | beq .__start_initialization_iSeries /* Start up the first processor */ | 812 | bne 1f |
813 | mfspr r4,SPRN_CTRLF | 813 | b .__start_initialization_iSeries /* Start up the first processor */ |
814 | 1: mfspr r4,SPRN_CTRLF | ||
814 | li r5,CTRL_RUNLATCH /* Turn off the run light */ | 815 | li r5,CTRL_RUNLATCH /* Turn off the run light */ |
815 | andc r4,r4,r5 | 816 | andc r4,r4,r5 |
816 | mtspr SPRN_CTRLT,r4 | 817 | mtspr SPRN_CTRLT,r4 |
@@ -1611,7 +1612,7 @@ _GLOBAL(generic_secondary_smp_init) | |||
1611 | #endif | 1612 | #endif |
1612 | 1613 | ||
1613 | #ifdef CONFIG_PPC_ISERIES | 1614 | #ifdef CONFIG_PPC_ISERIES |
1614 | _STATIC(__start_initialization_iSeries) | 1615 | _INIT_STATIC(__start_initialization_iSeries) |
1615 | /* Clear out the BSS */ | 1616 | /* Clear out the BSS */ |
1616 | LOAD_REG_IMMEDIATE(r11,__bss_stop) | 1617 | LOAD_REG_IMMEDIATE(r11,__bss_stop) |
1617 | LOAD_REG_IMMEDIATE(r8,__bss_start) | 1618 | LOAD_REG_IMMEDIATE(r8,__bss_start) |
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 601ef79a5916..2a5cf8680370 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
10 | #include <asm/pci-bridge.h> | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * Here comes the ppc64 implementation of the IOMAP | 13 | * Here comes the ppc64 implementation of the IOMAP |
@@ -136,7 +137,12 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | |||
136 | 137 | ||
137 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | 138 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) |
138 | { | 139 | { |
139 | /* Nothing to do */ | 140 | if (isa_vaddr_is_ioport(addr)) |
141 | return; | ||
142 | if (pcibios_vaddr_is_ioport(addr)) | ||
143 | return; | ||
144 | iounmap(addr); | ||
140 | } | 145 | } |
146 | |||
141 | EXPORT_SYMBOL(pci_iomap); | 147 | EXPORT_SYMBOL(pci_iomap); |
142 | EXPORT_SYMBOL(pci_iounmap); | 148 | EXPORT_SYMBOL(pci_iounmap); |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 2fc87862146c..24bea97c736c 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -418,10 +418,10 @@ irq_hw_number_t virq_to_hw(unsigned int virq) | |||
418 | } | 418 | } |
419 | EXPORT_SYMBOL_GPL(virq_to_hw); | 419 | EXPORT_SYMBOL_GPL(virq_to_hw); |
420 | 420 | ||
421 | struct irq_host *irq_alloc_host(unsigned int revmap_type, | 421 | __init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type, |
422 | unsigned int revmap_arg, | 422 | unsigned int revmap_arg, |
423 | struct irq_host_ops *ops, | 423 | struct irq_host_ops *ops, |
424 | irq_hw_number_t inval_irq) | 424 | irq_hw_number_t inval_irq) |
425 | { | 425 | { |
426 | struct irq_host *host; | 426 | struct irq_host *host; |
427 | unsigned int size = sizeof(struct irq_host); | 427 | unsigned int size = sizeof(struct irq_host); |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index fe7d1255e11e..083cfbdbe0b2 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -65,7 +65,7 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose) | |||
65 | spin_unlock(&hose_spinlock); | 65 | spin_unlock(&hose_spinlock); |
66 | } | 66 | } |
67 | 67 | ||
68 | struct pci_controller * pcibios_alloc_controller(struct device_node *dev) | 68 | __init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev) |
69 | { | 69 | { |
70 | struct pci_controller *phb; | 70 | struct pci_controller *phb; |
71 | 71 | ||
@@ -101,6 +101,29 @@ void pcibios_free_controller(struct pci_controller *phb) | |||
101 | kfree(phb); | 101 | kfree(phb); |
102 | } | 102 | } |
103 | 103 | ||
104 | int pcibios_vaddr_is_ioport(void __iomem *address) | ||
105 | { | ||
106 | int ret = 0; | ||
107 | struct pci_controller *hose; | ||
108 | unsigned long size; | ||
109 | |||
110 | spin_lock(&hose_spinlock); | ||
111 | list_for_each_entry(hose, &hose_list, list_node) { | ||
112 | #ifdef CONFIG_PPC64 | ||
113 | size = hose->pci_io_size; | ||
114 | #else | ||
115 | size = hose->io_resource.end - hose->io_resource.start + 1; | ||
116 | #endif | ||
117 | if (address >= hose->io_base_virt && | ||
118 | address < (hose->io_base_virt + size)) { | ||
119 | ret = 1; | ||
120 | break; | ||
121 | } | ||
122 | } | ||
123 | spin_unlock(&hose_spinlock); | ||
124 | return ret; | ||
125 | } | ||
126 | |||
104 | /* | 127 | /* |
105 | * Return the domain number for this bus. | 128 | * Return the domain number for this bus. |
106 | */ | 129 | */ |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 721a69400d65..cd35c969bb28 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -60,6 +60,24 @@ LIST_HEAD(hose_list); | |||
60 | static int pci_bus_count; | 60 | static int pci_bus_count; |
61 | 61 | ||
62 | static void | 62 | static void |
63 | fixup_hide_host_resource_fsl(struct pci_dev* dev) | ||
64 | { | ||
65 | int i, class = dev->class >> 8; | ||
66 | |||
67 | if ((class == PCI_CLASS_PROCESSOR_POWERPC) && | ||
68 | (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) && | ||
69 | (dev->bus->parent == NULL)) { | ||
70 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
71 | dev->resource[i].start = 0; | ||
72 | dev->resource[i].end = 0; | ||
73 | dev->resource[i].flags = 0; | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
78 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl); | ||
79 | |||
80 | static void | ||
63 | fixup_broken_pcnet32(struct pci_dev* dev) | 81 | fixup_broken_pcnet32(struct pci_dev* dev) |
64 | { | 82 | { |
65 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { | 83 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { |
@@ -1229,7 +1247,7 @@ pcibios_init(void) | |||
1229 | 1247 | ||
1230 | subsys_initcall(pcibios_init); | 1248 | subsys_initcall(pcibios_init); |
1231 | 1249 | ||
1232 | void __init pcibios_fixup_bus(struct pci_bus *bus) | 1250 | void pcibios_fixup_bus(struct pci_bus *bus) |
1233 | { | 1251 | { |
1234 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; | 1252 | struct pci_controller *hose = (struct pci_controller *) bus->sysdata; |
1235 | unsigned long io_offset; | 1253 | unsigned long io_offset; |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 84f000a45e36..a83727b308a0 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -423,7 +423,11 @@ void show_regs(struct pt_regs * regs) | |||
423 | printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); | 423 | printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); |
424 | trap = TRAP(regs); | 424 | trap = TRAP(regs); |
425 | if (trap == 0x300 || trap == 0x600) | 425 | if (trap == 0x300 || trap == 0x600) |
426 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | ||
427 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); | ||
428 | #else | ||
426 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); | 429 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); |
430 | #endif | ||
427 | printk("TASK = %p[%d] '%s' THREAD: %p", | 431 | printk("TASK = %p[%d] '%s' THREAD: %p", |
428 | current, current->pid, current->comm, task_thread_info(current)); | 432 | current, current->pid, current->comm, task_thread_info(current)); |
429 | 433 | ||
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 3786dcc8a7b6..b5c96af955c6 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -24,7 +24,7 @@ | |||
24 | /* Max address size we deal with */ | 24 | /* Max address size we deal with */ |
25 | #define OF_MAX_ADDR_CELLS 4 | 25 | #define OF_MAX_ADDR_CELLS 4 |
26 | #define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ | 26 | #define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ |
27 | (ns) >= 0) | 27 | (ns) > 0) |
28 | 28 | ||
29 | static struct of_bus *of_match_bus(struct device_node *np); | 29 | static struct of_bus *of_match_bus(struct device_node *np); |
30 | static int __of_address_to_resource(struct device_node *dev, | 30 | static int __of_address_to_resource(struct device_node *dev, |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 4924c48cb1ff..50ef38cffdbf 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -496,6 +496,10 @@ int check_legacy_ioport(unsigned long base_port) | |||
496 | break; | 496 | break; |
497 | } | 497 | } |
498 | np = of_find_node_by_type(NULL, "8042"); | 498 | np = of_find_node_by_type(NULL, "8042"); |
499 | /* Pegasos has no device_type on its 8042 node, look for the | ||
500 | * name instead */ | ||
501 | if (!np) | ||
502 | np = of_find_node_by_name(NULL, "8042"); | ||
499 | break; | 503 | break; |
500 | case FDC_BASE: /* FDC1 */ | 504 | case FDC_BASE: /* FDC1 */ |
501 | np = of_find_node_by_type(NULL, "fdc"); | 505 | np = of_find_node_by_type(NULL, "fdc"); |
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index cbca1df8bc60..0f9b4eadfbcb 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c | |||
@@ -155,7 +155,7 @@ static int early_console_initialized; | |||
155 | * Called by setup_system after ppc_md->probe and ppc_md->early_init. | 155 | * Called by setup_system after ppc_md->probe and ppc_md->early_init. |
156 | * Call it again after setting udbg_putc in ppc_md->setup_arch. | 156 | * Call it again after setting udbg_putc in ppc_md->setup_arch. |
157 | */ | 157 | */ |
158 | void register_early_udbg_console(void) | 158 | void __init register_early_udbg_console(void) |
159 | { | 159 | { |
160 | if (early_console_initialized) | 160 | if (early_console_initialized) |
161 | return; | 161 | return; |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index e3a1e8dc536a..8f4d2dc4cafb 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -138,8 +138,8 @@ void __init lmb_analyze(void) | |||
138 | static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base, | 138 | static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base, |
139 | unsigned long size) | 139 | unsigned long size) |
140 | { | 140 | { |
141 | unsigned long i, coalesced = 0; | 141 | unsigned long coalesced = 0; |
142 | long adjacent; | 142 | long adjacent, i; |
143 | 143 | ||
144 | /* First try and coalesce this LMB with another. */ | 144 | /* First try and coalesce this LMB with another. */ |
145 | for (i=0; i < rgn->cnt; i++) { | 145 | for (i=0; i < rgn->cnt; i++) { |
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 6694f86d7000..9cb081c26e71 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -59,7 +59,8 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang) | |||
59 | INIT_LIST_HEAD(&ctx->aff_list); | 59 | INIT_LIST_HEAD(&ctx->aff_list); |
60 | if (gang) | 60 | if (gang) |
61 | spu_gang_add_ctx(gang, ctx); | 61 | spu_gang_add_ctx(gang, ctx); |
62 | ctx->cpus_allowed = current->cpus_allowed; | 62 | |
63 | __spu_update_sched_info(ctx); | ||
63 | spu_set_timeslice(ctx); | 64 | spu_set_timeslice(ctx); |
64 | ctx->stats.util_state = SPU_UTIL_IDLE_LOADED; | 65 | ctx->stats.util_state = SPU_UTIL_IDLE_LOADED; |
65 | 66 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index 0b50fa5cb39d..6abdd8fe2098 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -312,6 +312,7 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) | |||
312 | spu_acquire(ctx); | 312 | spu_acquire(ctx); |
313 | if (ctx->state == SPU_STATE_SAVED) { | 313 | if (ctx->state == SPU_STATE_SAVED) { |
314 | __spu_update_sched_info(ctx); | 314 | __spu_update_sched_info(ctx); |
315 | spu_set_timeslice(ctx); | ||
315 | 316 | ||
316 | ret = spu_activate(ctx, 0); | 317 | ret = spu_activate(ctx, 0); |
317 | if (ret) { | 318 | if (ret) { |
@@ -322,6 +323,9 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) | |||
322 | /* | 323 | /* |
323 | * We have to update the scheduling priority under active_mutex | 324 | * We have to update the scheduling priority under active_mutex |
324 | * to protect against find_victim(). | 325 | * to protect against find_victim(). |
326 | * | ||
327 | * No need to update the timeslice ASAP, it will get updated | ||
328 | * once the current one has expired. | ||
325 | */ | 329 | */ |
326 | spu_update_sched_info(ctx); | 330 | spu_update_sched_info(ctx); |
327 | } | 331 | } |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 227968b4779d..758a80ac080a 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -927,10 +927,6 @@ int __init spu_sched_init(void) | |||
927 | INIT_LIST_HEAD(&spu_prio->runq[i]); | 927 | INIT_LIST_HEAD(&spu_prio->runq[i]); |
928 | __clear_bit(i, spu_prio->bitmap); | 928 | __clear_bit(i, spu_prio->bitmap); |
929 | } | 929 | } |
930 | for (i = 0; i < MAX_NUMNODES; i++) { | ||
931 | mutex_init(&cbe_spu_info[i].list_mutex); | ||
932 | INIT_LIST_HEAD(&cbe_spu_info[i].spus); | ||
933 | } | ||
934 | spin_lock_init(&spu_prio->runq_lock); | 930 | spin_lock_init(&spu_prio->runq_lock); |
935 | 931 | ||
936 | setup_timer(&spusched_timer, spusched_wake, 0); | 932 | setup_timer(&spusched_timer, spusched_wake, 0); |
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 91df52a1899a..34bdbbe3ce59 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c | |||
@@ -182,7 +182,7 @@ static int set_spread_lpevents(char *str) | |||
182 | } | 182 | } |
183 | __setup("spread_lpevents=", set_spread_lpevents); | 183 | __setup("spread_lpevents=", set_spread_lpevents); |
184 | 184 | ||
185 | void setup_hvlpevent_queue(void) | 185 | void __init setup_hvlpevent_queue(void) |
186 | { | 186 | { |
187 | void *eventStack; | 187 | void *eventStack; |
188 | 188 | ||
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index fceaae40fe70..2542403288f9 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -490,6 +490,9 @@ static int __init maple_add_bridge(struct device_node *dev) | |||
490 | /* Fixup "bus-range" OF property */ | 490 | /* Fixup "bus-range" OF property */ |
491 | fixup_bus_range(dev); | 491 | fixup_bus_range(dev); |
492 | 492 | ||
493 | /* Check for legacy IOs */ | ||
494 | isa_bridge_find_early(hose); | ||
495 | |||
493 | return 0; | 496 | return 0; |
494 | } | 497 | } |
495 | 498 | ||
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 51c223385feb..9fb0ce5c7176 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -107,7 +107,7 @@ void __init setup_pci_cmd(struct pci_controller *hose) | |||
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | static void __devinit quirk_fsl_pcie_transparent(struct pci_dev *dev) | 110 | static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev) |
111 | { | 111 | { |
112 | struct resource *res; | 112 | struct resource *res; |
113 | int i, res_idx = PCI_BRIDGE_RESOURCES; | 113 | int i, res_idx = PCI_BRIDGE_RESOURCES; |
@@ -216,7 +216,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary) | |||
216 | 216 | ||
217 | /* check PCI express link status */ | 217 | /* check PCI express link status */ |
218 | if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { | 218 | if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { |
219 | hose->indirect_type = PPC_INDIRECT_TYPE_EXT_REG | | 219 | hose->indirect_type |= PPC_INDIRECT_TYPE_EXT_REG | |
220 | PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS; | 220 | PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS; |
221 | if (fsl_pcie_check_link(hose)) | 221 | if (fsl_pcie_check_link(hose)) |
222 | hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK; | 222 | hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK; |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 3289fab01e92..727453d3e8b9 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -305,6 +305,64 @@ err: | |||
305 | 305 | ||
306 | arch_initcall(gfar_of_init); | 306 | arch_initcall(gfar_of_init); |
307 | 307 | ||
308 | #ifdef CONFIG_I2C_BOARDINFO | ||
309 | #include <linux/i2c.h> | ||
310 | struct i2c_driver_device { | ||
311 | char *of_device; | ||
312 | char *i2c_driver; | ||
313 | char *i2c_type; | ||
314 | }; | ||
315 | |||
316 | static struct i2c_driver_device i2c_devices[] __initdata = { | ||
317 | {"ricoh,rs5c372a", "rtc-rs5c372", "rs5c372a",}, | ||
318 | {"ricoh,rs5c372b", "rtc-rs5c372", "rs5c372b",}, | ||
319 | {"ricoh,rv5c386", "rtc-rs5c372", "rv5c386",}, | ||
320 | {"ricoh,rv5c387a", "rtc-rs5c372", "rv5c387a",}, | ||
321 | }; | ||
322 | |||
323 | static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info) | ||
324 | { | ||
325 | int i; | ||
326 | |||
327 | for (i = 0; i < ARRAY_SIZE(i2c_devices); i++) { | ||
328 | if (!of_device_is_compatible(node, i2c_devices[i].of_device)) | ||
329 | continue; | ||
330 | strncpy(info->driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN); | ||
331 | strncpy(info->type, i2c_devices[i].i2c_type, I2C_NAME_SIZE); | ||
332 | return 0; | ||
333 | } | ||
334 | return -ENODEV; | ||
335 | } | ||
336 | |||
337 | static void __init of_register_i2c_devices(struct device_node *adap_node, int bus_num) | ||
338 | { | ||
339 | struct device_node *node = NULL; | ||
340 | |||
341 | while ((node = of_get_next_child(adap_node, node))) { | ||
342 | struct i2c_board_info info; | ||
343 | const u32 *addr; | ||
344 | int len; | ||
345 | |||
346 | addr = of_get_property(node, "reg", &len); | ||
347 | if (!addr || len < sizeof(int) || *addr > (1 << 10) - 1) { | ||
348 | printk(KERN_WARNING "fsl_ioc.c: invalid i2c device entry\n"); | ||
349 | continue; | ||
350 | } | ||
351 | |||
352 | info.irq = irq_of_parse_and_map(node, 0); | ||
353 | if (info.irq == NO_IRQ) | ||
354 | info.irq = -1; | ||
355 | |||
356 | if (of_find_i2c_driver(node, &info) < 0) | ||
357 | continue; | ||
358 | |||
359 | info.platform_data = NULL; | ||
360 | info.addr = *addr; | ||
361 | |||
362 | i2c_register_board_info(bus_num, &info, 1); | ||
363 | } | ||
364 | } | ||
365 | |||
308 | static int __init fsl_i2c_of_init(void) | 366 | static int __init fsl_i2c_of_init(void) |
309 | { | 367 | { |
310 | struct device_node *np; | 368 | struct device_node *np; |
@@ -349,6 +407,8 @@ static int __init fsl_i2c_of_init(void) | |||
349 | fsl_i2c_platform_data)); | 407 | fsl_i2c_platform_data)); |
350 | if (ret) | 408 | if (ret) |
351 | goto unreg; | 409 | goto unreg; |
410 | |||
411 | of_register_i2c_devices(np, i); | ||
352 | } | 412 | } |
353 | 413 | ||
354 | return 0; | 414 | return 0; |
@@ -360,6 +420,7 @@ err: | |||
360 | } | 420 | } |
361 | 421 | ||
362 | arch_initcall(fsl_i2c_of_init); | 422 | arch_initcall(fsl_i2c_of_init); |
423 | #endif | ||
363 | 424 | ||
364 | #ifdef CONFIG_PPC_83xx | 425 | #ifdef CONFIG_PPC_83xx |
365 | static int __init mpc83xx_wdt_init(void) | 426 | static int __init mpc83xx_wdt_init(void) |
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index a8ac2dfdd3d4..5294560c7b00 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
@@ -160,4 +160,5 @@ setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data, u32 | |||
160 | mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); | 160 | mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); |
161 | hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK); | 161 | hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK); |
162 | hose->ops = &indirect_pci_ops; | 162 | hose->ops = &indirect_pci_ops; |
163 | hose->indirect_type = flags; | ||
163 | } | 164 | } |