diff options
author | Len Brown <len.brown@intel.com> | 2006-01-06 16:34:21 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-01-06 16:34:21 -0500 |
commit | 25da0974601fc8096461f3d3f7ca3aab8e79adfb (patch) | |
tree | f9b3c1bfbc63fdb6a94e82177b8c3ae891125422 /arch/ppc | |
parent | 036d25f79ddfbc9878da24ef8e468a6d22caa605 (diff) | |
parent | d99cf9d679a520d67f81d805b7cb91c68e1847f0 (diff) |
Auto-update from upstream
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/boot/simple/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/idle.c | 4 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/ibm440gx.c | 2 | ||||
-rw-r--r-- | arch/ppc/platforms/4xx/ibm440sp.c | 1 | ||||
-rw-r--r-- | arch/ppc/platforms/lite5200.c | 2 | ||||
-rw-r--r-- | arch/ppc/platforms/mpc5200.c | 53 | ||||
-rw-r--r-- | arch/ppc/syslib/mpc52xx_pci.c | 95 | ||||
-rw-r--r-- | arch/ppc/syslib/mpc52xx_setup.c | 6 |
8 files changed, 86 insertions, 79 deletions
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index f3e9c534aa82..9533f8de238f 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile | |||
@@ -190,6 +190,8 @@ boot-$(CONFIG_REDWOOD_5) += embed_config.o | |||
190 | boot-$(CONFIG_REDWOOD_6) += embed_config.o | 190 | boot-$(CONFIG_REDWOOD_6) += embed_config.o |
191 | boot-$(CONFIG_8xx) += embed_config.o | 191 | boot-$(CONFIG_8xx) += embed_config.o |
192 | boot-$(CONFIG_8260) += embed_config.o | 192 | boot-$(CONFIG_8260) += embed_config.o |
193 | boot-$(CONFIG_EP405) += embed_config.o | ||
194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o | ||
193 | boot-$(CONFIG_BSEIP) += iic.o | 195 | boot-$(CONFIG_BSEIP) += iic.o |
194 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o | 196 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o |
195 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o | 197 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o |
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c index 821a75e45602..1be3ca5bae40 100644 --- a/arch/ppc/kernel/idle.c +++ b/arch/ppc/kernel/idle.c | |||
@@ -37,7 +37,6 @@ | |||
37 | void default_idle(void) | 37 | void default_idle(void) |
38 | { | 38 | { |
39 | void (*powersave)(void); | 39 | void (*powersave)(void); |
40 | int cpu = smp_processor_id(); | ||
41 | 40 | ||
42 | powersave = ppc_md.power_save; | 41 | powersave = ppc_md.power_save; |
43 | 42 | ||
@@ -47,7 +46,8 @@ void default_idle(void) | |||
47 | #ifdef CONFIG_SMP | 46 | #ifdef CONFIG_SMP |
48 | else { | 47 | else { |
49 | set_thread_flag(TIF_POLLING_NRFLAG); | 48 | set_thread_flag(TIF_POLLING_NRFLAG); |
50 | while (!need_resched() && !cpu_is_offline(cpu)) | 49 | while (!need_resched() && |
50 | !cpu_is_offline(smp_processor_id())) | ||
51 | barrier(); | 51 | barrier(); |
52 | clear_thread_flag(TIF_POLLING_NRFLAG); | 52 | clear_thread_flag(TIF_POLLING_NRFLAG); |
53 | } | 53 | } |
diff --git a/arch/ppc/platforms/4xx/ibm440gx.c b/arch/ppc/platforms/4xx/ibm440gx.c index 956f45e4ef97..d24c09ee7b18 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.c +++ b/arch/ppc/platforms/4xx/ibm440gx.c | |||
@@ -58,7 +58,6 @@ static struct ocp_func_emac_data ibm440gx_emac2_def = { | |||
58 | .wol_irq = 65, /* WOL interrupt number */ | 58 | .wol_irq = 65, /* WOL interrupt number */ |
59 | .mdio_idx = -1, /* No shared MDIO */ | 59 | .mdio_idx = -1, /* No shared MDIO */ |
60 | .tah_idx = 0, /* TAH device index */ | 60 | .tah_idx = 0, /* TAH device index */ |
61 | .jumbo = 1, /* Jumbo frames supported */ | ||
62 | }; | 61 | }; |
63 | 62 | ||
64 | static struct ocp_func_emac_data ibm440gx_emac3_def = { | 63 | static struct ocp_func_emac_data ibm440gx_emac3_def = { |
@@ -72,7 +71,6 @@ static struct ocp_func_emac_data ibm440gx_emac3_def = { | |||
72 | .wol_irq = 67, /* WOL interrupt number */ | 71 | .wol_irq = 67, /* WOL interrupt number */ |
73 | .mdio_idx = -1, /* No shared MDIO */ | 72 | .mdio_idx = -1, /* No shared MDIO */ |
74 | .tah_idx = 1, /* TAH device index */ | 73 | .tah_idx = 1, /* TAH device index */ |
75 | .jumbo = 1, /* Jumbo frames supported */ | ||
76 | }; | 74 | }; |
77 | OCP_SYSFS_EMAC_DATA() | 75 | OCP_SYSFS_EMAC_DATA() |
78 | 76 | ||
diff --git a/arch/ppc/platforms/4xx/ibm440sp.c b/arch/ppc/platforms/4xx/ibm440sp.c index feb17e41ef69..71a0117d3597 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.c +++ b/arch/ppc/platforms/4xx/ibm440sp.c | |||
@@ -31,7 +31,6 @@ static struct ocp_func_emac_data ibm440sp_emac0_def = { | |||
31 | .wol_irq = 61, /* WOL interrupt number */ | 31 | .wol_irq = 61, /* WOL interrupt number */ |
32 | .mdio_idx = -1, /* No shared MDIO */ | 32 | .mdio_idx = -1, /* No shared MDIO */ |
33 | .tah_idx = -1, /* No TAH */ | 33 | .tah_idx = -1, /* No TAH */ |
34 | .jumbo = 1, /* Jumbo frames supported */ | ||
35 | }; | 34 | }; |
36 | OCP_SYSFS_EMAC_DATA() | 35 | OCP_SYSFS_EMAC_DATA() |
37 | 36 | ||
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c index d44cc991179f..7ed52dc340c9 100644 --- a/arch/ppc/platforms/lite5200.c +++ b/arch/ppc/platforms/lite5200.c | |||
@@ -196,8 +196,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
196 | mpc52xx_set_bat(); | 196 | mpc52xx_set_bat(); |
197 | 197 | ||
198 | /* No ISA bus by default */ | 198 | /* No ISA bus by default */ |
199 | #ifdef CONFIG_PCI | ||
199 | isa_io_base = 0; | 200 | isa_io_base = 0; |
200 | isa_mem_base = 0; | 201 | isa_mem_base = 0; |
202 | #endif | ||
201 | 203 | ||
202 | /* Powersave */ | 204 | /* Powersave */ |
203 | /* This is provided as an example on how to do it. But you | 205 | /* This is provided as an example on how to do it. But you |
diff --git a/arch/ppc/platforms/mpc5200.c b/arch/ppc/platforms/mpc5200.c deleted file mode 100644 index a58db438c162..000000000000 --- a/arch/ppc/platforms/mpc5200.c +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/mpc5200.c | ||
3 | * | ||
4 | * OCP Definitions for the boards based on MPC5200 processor. Contains | ||
5 | * definitions for every common peripherals. (Mostly all but PSCs) | ||
6 | * | ||
7 | * Maintainer : Sylvain Munaut <tnt@246tNt.com> | ||
8 | * | ||
9 | * Copyright 2004 Sylvain Munaut <tnt@246tNt.com> | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #include <asm/ocp.h> | ||
17 | #include <asm/mpc52xx.h> | ||
18 | |||
19 | |||
20 | static struct ocp_fs_i2c_data mpc5200_i2c_def = { | ||
21 | .flags = FS_I2C_CLOCK_5200, | ||
22 | }; | ||
23 | |||
24 | |||
25 | /* Here is the core_ocp struct. | ||
26 | * With all the devices common to all board. Even if port multiplexing is | ||
27 | * not setup for them (if the user don't want them, just don't select the | ||
28 | * config option). The potentially conflicting devices (like PSCs) goes in | ||
29 | * board specific file. | ||
30 | */ | ||
31 | struct ocp_def core_ocp[] = { | ||
32 | { | ||
33 | .vendor = OCP_VENDOR_FREESCALE, | ||
34 | .function = OCP_FUNC_IIC, | ||
35 | .index = 0, | ||
36 | .paddr = MPC52xx_I2C1, | ||
37 | .irq = OCP_IRQ_NA, /* MPC52xx_IRQ_I2C1 - Buggy */ | ||
38 | .pm = OCP_CPM_NA, | ||
39 | .additions = &mpc5200_i2c_def, | ||
40 | }, | ||
41 | { | ||
42 | .vendor = OCP_VENDOR_FREESCALE, | ||
43 | .function = OCP_FUNC_IIC, | ||
44 | .index = 1, | ||
45 | .paddr = MPC52xx_I2C2, | ||
46 | .irq = OCP_IRQ_NA, /* MPC52xx_IRQ_I2C2 - Buggy */ | ||
47 | .pm = OCP_CPM_NA, | ||
48 | .additions = &mpc5200_i2c_def, | ||
49 | }, | ||
50 | { /* Terminating entry */ | ||
51 | .vendor = OCP_VENDOR_INVALID | ||
52 | } | ||
53 | }; | ||
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c index 4ac19080eb85..313c96ec7eb1 100644 --- a/arch/ppc/syslib/mpc52xx_pci.c +++ b/arch/ppc/syslib/mpc52xx_pci.c | |||
@@ -24,6 +24,12 @@ | |||
24 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
25 | 25 | ||
26 | 26 | ||
27 | /* This macro is defined to activate the workaround for the bug | ||
28 | 435 of the MPC5200 (L25R). With it activated, we don't do any | ||
29 | 32 bits configuration access during type-1 cycles */ | ||
30 | #define MPC5200_BUG_435_WORKAROUND | ||
31 | |||
32 | |||
27 | static int | 33 | static int |
28 | mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, | 34 | mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, |
29 | int offset, int len, u32 *val) | 35 | int offset, int len, u32 *val) |
@@ -40,17 +46,39 @@ mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, | |||
40 | ((bus->number - hose->bus_offset) << 16) | | 46 | ((bus->number - hose->bus_offset) << 16) | |
41 | (devfn << 8) | | 47 | (devfn << 8) | |
42 | (offset & 0xfc)); | 48 | (offset & 0xfc)); |
49 | mb(); | ||
50 | |||
51 | #ifdef MPC5200_BUG_435_WORKAROUND | ||
52 | if (bus->number != hose->bus_offset) { | ||
53 | switch (len) { | ||
54 | case 1: | ||
55 | value = in_8(((u8 __iomem *)hose->cfg_data) + (offset & 3)); | ||
56 | break; | ||
57 | case 2: | ||
58 | value = in_le16(((u16 __iomem *)hose->cfg_data) + ((offset>>1) & 1)); | ||
59 | break; | ||
60 | |||
61 | default: | ||
62 | value = in_le16((u16 __iomem *)hose->cfg_data) | | ||
63 | (in_le16(((u16 __iomem *)hose->cfg_data) + 1) << 16); | ||
64 | break; | ||
65 | } | ||
66 | } | ||
67 | else | ||
68 | #endif | ||
69 | { | ||
70 | value = in_le32(hose->cfg_data); | ||
43 | 71 | ||
44 | value = in_le32(hose->cfg_data); | 72 | if (len != 4) { |
45 | 73 | value >>= ((offset & 0x3) << 3); | |
46 | if (len != 4) { | 74 | value &= 0xffffffff >> (32 - (len << 3)); |
47 | value >>= ((offset & 0x3) << 3); | 75 | } |
48 | value &= 0xffffffff >> (32 - (len << 3)); | ||
49 | } | 76 | } |
50 | 77 | ||
51 | *val = value; | 78 | *val = value; |
52 | 79 | ||
53 | out_be32(hose->cfg_addr, 0); | 80 | out_be32(hose->cfg_addr, 0); |
81 | mb(); | ||
54 | 82 | ||
55 | return PCIBIOS_SUCCESSFUL; | 83 | return PCIBIOS_SUCCESSFUL; |
56 | } | 84 | } |
@@ -71,21 +99,48 @@ mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, | |||
71 | ((bus->number - hose->bus_offset) << 16) | | 99 | ((bus->number - hose->bus_offset) << 16) | |
72 | (devfn << 8) | | 100 | (devfn << 8) | |
73 | (offset & 0xfc)); | 101 | (offset & 0xfc)); |
102 | mb(); | ||
103 | |||
104 | #ifdef MPC5200_BUG_435_WORKAROUND | ||
105 | if (bus->number != hose->bus_offset) { | ||
106 | switch (len) { | ||
107 | case 1: | ||
108 | out_8(((u8 __iomem *)hose->cfg_data) + | ||
109 | (offset & 3), val); | ||
110 | break; | ||
111 | case 2: | ||
112 | out_le16(((u16 __iomem *)hose->cfg_data) + | ||
113 | ((offset>>1) & 1), val); | ||
114 | break; | ||
115 | |||
116 | default: | ||
117 | out_le16((u16 __iomem *)hose->cfg_data, | ||
118 | (u16)val); | ||
119 | out_le16(((u16 __iomem *)hose->cfg_data) + 1, | ||
120 | (u16)(val>>16)); | ||
121 | break; | ||
122 | } | ||
123 | } | ||
124 | else | ||
125 | #endif | ||
126 | { | ||
127 | if (len != 4) { | ||
128 | value = in_le32(hose->cfg_data); | ||
74 | 129 | ||
75 | if (len != 4) { | 130 | offset = (offset & 0x3) << 3; |
76 | value = in_le32(hose->cfg_data); | 131 | mask = (0xffffffff >> (32 - (len << 3))); |
132 | mask <<= offset; | ||
77 | 133 | ||
78 | offset = (offset & 0x3) << 3; | 134 | value &= ~mask; |
79 | mask = (0xffffffff >> (32 - (len << 3))); | 135 | val = value | ((val << offset) & mask); |
80 | mask <<= offset; | 136 | } |
81 | 137 | ||
82 | value &= ~mask; | 138 | out_le32(hose->cfg_data, val); |
83 | val = value | ((val << offset) & mask); | ||
84 | } | 139 | } |
85 | 140 | mb(); | |
86 | out_le32(hose->cfg_data, val); | ||
87 | 141 | ||
88 | out_be32(hose->cfg_addr, 0); | 142 | out_be32(hose->cfg_addr, 0); |
143 | mb(); | ||
89 | 144 | ||
90 | return PCIBIOS_SUCCESSFUL; | 145 | return PCIBIOS_SUCCESSFUL; |
91 | } | 146 | } |
@@ -99,9 +154,12 @@ static struct pci_ops mpc52xx_pci_ops = { | |||
99 | static void __init | 154 | static void __init |
100 | mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs) | 155 | mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs) |
101 | { | 156 | { |
157 | u32 tmp; | ||
102 | 158 | ||
103 | /* Setup control regs */ | 159 | /* Setup control regs */ |
104 | /* Nothing to do afaik */ | 160 | tmp = in_be32(&pci_regs->scr); |
161 | tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; | ||
162 | out_be32(&pci_regs->scr, tmp); | ||
105 | 163 | ||
106 | /* Setup windows */ | 164 | /* Setup windows */ |
107 | out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION( | 165 | out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION( |
@@ -142,16 +200,15 @@ mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs) | |||
142 | /* Not necessary and can be a bad thing if for example the bootloader | 200 | /* Not necessary and can be a bad thing if for example the bootloader |
143 | is displaying a splash screen or ... Just left here for | 201 | is displaying a splash screen or ... Just left here for |
144 | documentation purpose if anyone need it */ | 202 | documentation purpose if anyone need it */ |
145 | #if 0 | ||
146 | u32 tmp; | ||
147 | tmp = in_be32(&pci_regs->gscr); | 203 | tmp = in_be32(&pci_regs->gscr); |
204 | #if 0 | ||
148 | out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR); | 205 | out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR); |
149 | udelay(50); | 206 | udelay(50); |
150 | out_be32(&pci_regs->gscr, tmp); | ||
151 | #endif | 207 | #endif |
208 | out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR); | ||
152 | } | 209 | } |
153 | 210 | ||
154 | static void __init | 211 | static void |
155 | mpc52xx_pci_fixup_resources(struct pci_dev *dev) | 212 | mpc52xx_pci_fixup_resources(struct pci_dev *dev) |
156 | { | 213 | { |
157 | int i; | 214 | int i; |
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index bb2374585a7b..a4a4b02227df 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c | |||
@@ -84,9 +84,11 @@ mpc52xx_set_bat(void) | |||
84 | void __init | 84 | void __init |
85 | mpc52xx_map_io(void) | 85 | mpc52xx_map_io(void) |
86 | { | 86 | { |
87 | /* Here we only map the MBAR */ | 87 | /* Here we map the MBAR and the whole upper zone. MBAR is only |
88 | 64k but we can't map only 64k with BATs. Map the whole | ||
89 | 0xf0000000 range is ok and helps eventual lpb devices placed there */ | ||
88 | io_block_mapping( | 90 | io_block_mapping( |
89 | MPC52xx_MBAR_VIRT, MPC52xx_MBAR, MPC52xx_MBAR_SIZE, _PAGE_IO); | 91 | MPC52xx_MBAR_VIRT, MPC52xx_MBAR, 0x10000000, _PAGE_IO); |
90 | } | 92 | } |
91 | 93 | ||
92 | 94 | ||