aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-05-27 12:40:40 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-27 12:40:40 -0400
commit371858568e02698fe2de8ba4bf771e3f40db69e5 (patch)
tree07ec799d7babae7eafda93d9dfd9d11fccff086f /arch
parente82b0f2cc21be905e504573483fa9542b15df96f (diff)
parent54f4ee183aea859eb09f141dad3fc3c6f4fe0446 (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: [PATCH] powerpc: fix RTC/NVRAM accesses on Maple [PATCH] ppc32 CPM_UART: various fixes for pq2 uart users [PATCH] powerpc: linuxppc64.org no more
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/prom_init.c48
-rw-r--r--arch/ppc/platforms/mpc8272ads_setup.c10
-rw-r--r--arch/ppc/syslib/pq2_devices.c16
-rw-r--r--arch/ppc/syslib/pq2_sys.c8
4 files changed, 62 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 2d80653aa2af..41e9ab40cd54 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2057,10 +2057,45 @@ static void __init flatten_device_tree(void)
2057 2057
2058} 2058}
2059 2059
2060 2060#ifdef CONFIG_PPC_MAPLE
2061static void __init fixup_device_tree(void) 2061/* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property.
2062 * The values are bad, and it doesn't even have the right number of cells. */
2063static void __init fixup_device_tree_maple(void)
2062{ 2064{
2065 phandle isa;
2066 u32 isa_ranges[6];
2067
2068 isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4"));
2069 if (!PHANDLE_VALID(isa))
2070 return;
2071
2072 if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges))
2073 == PROM_ERROR)
2074 return;
2075
2076 if (isa_ranges[0] != 0x1 ||
2077 isa_ranges[1] != 0xf4000000 ||
2078 isa_ranges[2] != 0x00010000)
2079 return;
2080
2081 prom_printf("fixing up bogus ISA range on Maple...\n");
2082
2083 isa_ranges[0] = 0x1;
2084 isa_ranges[1] = 0x0;
2085 isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */
2086 isa_ranges[3] = 0x0;
2087 isa_ranges[4] = 0x0;
2088 isa_ranges[5] = 0x00010000;
2089 prom_setprop(isa, "/ht@0/isa@4", "ranges",
2090 isa_ranges, sizeof(isa_ranges));
2091}
2092#else
2093#define fixup_device_tree_maple()
2094#endif
2095
2063#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) 2096#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
2097static void __init fixup_device_tree_pmac(void)
2098{
2064 phandle u3, i2c, mpic; 2099 phandle u3, i2c, mpic;
2065 u32 u3_rev; 2100 u32 u3_rev;
2066 u32 interrupts[2]; 2101 u32 interrupts[2];
@@ -2097,9 +2132,16 @@ static void __init fixup_device_tree(void)
2097 parent = (u32)mpic; 2132 parent = (u32)mpic;
2098 prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", 2133 prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent",
2099 &parent, sizeof(parent)); 2134 &parent, sizeof(parent));
2100#endif
2101} 2135}
2136#else
2137#define fixup_device_tree_pmac()
2138#endif
2102 2139
2140static void __init fixup_device_tree(void)
2141{
2142 fixup_device_tree_maple();
2143 fixup_device_tree_pmac();
2144}
2103 2145
2104static void __init prom_find_boot_cpu(void) 2146static void __init prom_find_boot_cpu(void)
2105{ 2147{
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c
index e62b75707f7a..abb7154de2c7 100644
--- a/arch/ppc/platforms/mpc8272ads_setup.c
+++ b/arch/ppc/platforms/mpc8272ads_setup.c
@@ -279,11 +279,11 @@ static int mpc8272ads_platform_notify(struct device *dev)
279 static const struct platform_notify_dev_map dev_map[] = { 279 static const struct platform_notify_dev_map dev_map[] = {
280 { 280 {
281 .bus_id = "fsl-cpm-fcc", 281 .bus_id = "fsl-cpm-fcc",
282 .rtn = mpc8272ads_fixup_enet_pdata 282 .rtn = mpc8272ads_fixup_enet_pdata,
283 }, 283 },
284 { 284 {
285 .bus_id = "fsl-cpm-scc:uart", 285 .bus_id = "fsl-cpm-scc:uart",
286 .rtn = mpc 286 .rtn = mpc8272ads_fixup_uart_pdata,
287 }, 287 },
288 { 288 {
289 .bus_id = NULL 289 .bus_id = NULL
@@ -335,15 +335,15 @@ struct platform_device* early_uart_get_pdev(int index)
335 struct platform_device* pdev = NULL; 335 struct platform_device* pdev = NULL;
336 if(index) { /*assume SCC4 here*/ 336 if(index) { /*assume SCC4 here*/
337 pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC4]; 337 pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC4];
338 pinfo = &mpc8272<F12>_uart_pdata[1]; 338 pinfo = &mpc8272_uart_pdata[fsid_scc4_uart];
339 } else { /*over SCC1*/ 339 } else { /*over SCC1*/
340 pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC1]; 340 pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC1];
341 pinfo = &mpc8272_uart_pdata[0]; 341 pinfo = &mpc8272_uart_pdata[fsid_scc1_uart];
342 } 342 }
343 343
344 pinfo->uart_clk = bd->bi_intfreq; 344 pinfo->uart_clk = bd->bi_intfreq;
345 pdev->dev.platform_data = pinfo; 345 pdev->dev.platform_data = pinfo;
346 ppc_sys_fixup_mem_resource(pdev, IMAP_ADDR); 346 ppc_sys_fixup_mem_resource(pdev, CPM_MAP_ADDR);
347 return NULL; 347 return NULL;
348} 348}
349 349
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c
index 0636aed7b827..8692d00c08c4 100644
--- a/arch/ppc/syslib/pq2_devices.c
+++ b/arch/ppc/syslib/pq2_devices.c
@@ -121,13 +121,13 @@ struct platform_device ppc_sys_platform_devices[] = {
121 .num_resources = 3, 121 .num_resources = 3,
122 .resource = (struct resource[]) { 122 .resource = (struct resource[]) {
123 { 123 {
124 .name = "scc_mem", 124 .name = "regs",
125 .start = 0x11A00, 125 .start = 0x11A00,
126 .end = 0x11A1F, 126 .end = 0x11A1F,
127 .flags = IORESOURCE_MEM, 127 .flags = IORESOURCE_MEM,
128 }, 128 },
129 { 129 {
130 .name = "scc_pram", 130 .name = "pram",
131 .start = 0x8000, 131 .start = 0x8000,
132 .end = 0x80ff, 132 .end = 0x80ff,
133 .flags = IORESOURCE_MEM, 133 .flags = IORESOURCE_MEM,
@@ -145,13 +145,13 @@ struct platform_device ppc_sys_platform_devices[] = {
145 .num_resources = 3, 145 .num_resources = 3,
146 .resource = (struct resource[]) { 146 .resource = (struct resource[]) {
147 { 147 {
148 .name = "scc_mem", 148 .name = "regs",
149 .start = 0x11A20, 149 .start = 0x11A20,
150 .end = 0x11A3F, 150 .end = 0x11A3F,
151 .flags = IORESOURCE_MEM, 151 .flags = IORESOURCE_MEM,
152 }, 152 },
153 { 153 {
154 .name = "scc_pram", 154 .name = "pram",
155 .start = 0x8100, 155 .start = 0x8100,
156 .end = 0x81ff, 156 .end = 0x81ff,
157 .flags = IORESOURCE_MEM, 157 .flags = IORESOURCE_MEM,
@@ -169,13 +169,13 @@ struct platform_device ppc_sys_platform_devices[] = {
169 .num_resources = 3, 169 .num_resources = 3,
170 .resource = (struct resource[]) { 170 .resource = (struct resource[]) {
171 { 171 {
172 .name = "scc_mem", 172 .name = "regs",
173 .start = 0x11A40, 173 .start = 0x11A40,
174 .end = 0x11A5F, 174 .end = 0x11A5F,
175 .flags = IORESOURCE_MEM, 175 .flags = IORESOURCE_MEM,
176 }, 176 },
177 { 177 {
178 .name = "scc_pram", 178 .name = "pram",
179 .start = 0x8200, 179 .start = 0x8200,
180 .end = 0x82ff, 180 .end = 0x82ff,
181 .flags = IORESOURCE_MEM, 181 .flags = IORESOURCE_MEM,
@@ -193,13 +193,13 @@ struct platform_device ppc_sys_platform_devices[] = {
193 .num_resources = 3, 193 .num_resources = 3,
194 .resource = (struct resource[]) { 194 .resource = (struct resource[]) {
195 { 195 {
196 .name = "scc_mem", 196 .name = "regs",
197 .start = 0x11A60, 197 .start = 0x11A60,
198 .end = 0x11A7F, 198 .end = 0x11A7F,
199 .flags = IORESOURCE_MEM, 199 .flags = IORESOURCE_MEM,
200 }, 200 },
201 { 201 {
202 .name = "scc_pram", 202 .name = "pram",
203 .start = 0x8300, 203 .start = 0x8300,
204 .end = 0x83ff, 204 .end = 0x83ff,
205 .flags = IORESOURCE_MEM, 205 .flags = IORESOURCE_MEM,
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c
index 433b0fa203e1..fee8948162b9 100644
--- a/arch/ppc/syslib/pq2_sys.c
+++ b/arch/ppc/syslib/pq2_sys.c
@@ -139,13 +139,13 @@ struct ppc_sys_spec ppc_sys_specs[] = {
139 .ppc_sys_name = "8272", 139 .ppc_sys_name = "8272",
140 .mask = 0x0000ff00, 140 .mask = 0x0000ff00,
141 .value = 0x00000c00, 141 .value = 0x00000c00,
142 .num_devices = 11, 142 .num_devices = 12,
143 .device_list = (enum ppc_sys_devices[]) 143 .device_list = (enum ppc_sys_devices[])
144 { 144 {
145 MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, 145 MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1,
146 MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, 146 MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4,
147 MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, 147 MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI,
148 MPC82xx_CPM_USB, MPC82xx_SEC1, 148 MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1,
149 }, 149 },
150 }, 150 },
151 /* below is a list of the 8280 family of processors */ 151 /* below is a list of the 8280 family of processors */