diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2009-04-15 15:38:40 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2009-05-19 01:50:43 -0400 |
commit | 01af9507ff36578dad89b1cc88ff37ac18e719cb (patch) | |
tree | ccc59eebbaeeea91ba43908559513505adfd7409 /arch/powerpc/platforms/85xx | |
parent | 404614728f857d0ac63d29c3a29d0cf392a15598 (diff) |
powerpc/85xx: Add P2020DS board support
The P2020 is a dual e500v2 core based SOC with:
* 3 PCIe controllers
* 2 General purpose DMA controllers
* 2 sRIO controllers
* 3 eTSECS
* USB 2.0
* SDHC
* SPI, I2C, DUART
* enhanced localbus
* and optional Security (P2020E) security w/XOR acceleration
The p2020 DS reference board is pretty similar to the existing MPC85xx
DS boards and has a ULI 1575 connected on one of the PCIe controllers.
Signed-off-by: Ted Peters <Ted.Peters@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index de66de7a9ca2..53d5851a6c97 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -163,7 +163,8 @@ static void __init mpc85xx_ds_setup_arch(void) | |||
163 | #ifdef CONFIG_PCI | 163 | #ifdef CONFIG_PCI |
164 | for_each_node_by_type(np, "pci") { | 164 | for_each_node_by_type(np, "pci") { |
165 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || | 165 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || |
166 | of_device_is_compatible(np, "fsl,mpc8548-pcie")) { | 166 | of_device_is_compatible(np, "fsl,mpc8548-pcie") || |
167 | of_device_is_compatible(np, "fsl,p2020-pcie")) { | ||
167 | struct resource rsrc; | 168 | struct resource rsrc; |
168 | of_address_to_resource(np, 0, &rsrc); | 169 | of_address_to_resource(np, 0, &rsrc); |
169 | if ((rsrc.start & 0xfffff) == primary_phb_addr) | 170 | if ((rsrc.start & 0xfffff) == primary_phb_addr) |
@@ -195,9 +196,9 @@ static int __init mpc8544_ds_probe(void) | |||
195 | primary_phb_addr = 0xb000; | 196 | primary_phb_addr = 0xb000; |
196 | #endif | 197 | #endif |
197 | return 1; | 198 | return 1; |
198 | } else { | ||
199 | return 0; | ||
200 | } | 199 | } |
200 | |||
201 | return 0; | ||
201 | } | 202 | } |
202 | 203 | ||
203 | static struct of_device_id __initdata mpc85xxds_ids[] = { | 204 | static struct of_device_id __initdata mpc85xxds_ids[] = { |
@@ -214,6 +215,7 @@ static int __init mpc85xxds_publish_devices(void) | |||
214 | } | 215 | } |
215 | machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices); | 216 | machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices); |
216 | machine_device_initcall(mpc8572_ds, mpc85xxds_publish_devices); | 217 | machine_device_initcall(mpc8572_ds, mpc85xxds_publish_devices); |
218 | machine_device_initcall(p2020_ds, mpc85xxds_publish_devices); | ||
217 | 219 | ||
218 | /* | 220 | /* |
219 | * Called very early, device-tree isn't unflattened | 221 | * Called very early, device-tree isn't unflattened |
@@ -227,9 +229,26 @@ static int __init mpc8572_ds_probe(void) | |||
227 | primary_phb_addr = 0x8000; | 229 | primary_phb_addr = 0x8000; |
228 | #endif | 230 | #endif |
229 | return 1; | 231 | return 1; |
230 | } else { | ||
231 | return 0; | ||
232 | } | 232 | } |
233 | |||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | /* | ||
238 | * Called very early, device-tree isn't unflattened | ||
239 | */ | ||
240 | static int __init p2020_ds_probe(void) | ||
241 | { | ||
242 | unsigned long root = of_get_flat_dt_root(); | ||
243 | |||
244 | if (of_flat_dt_is_compatible(root, "fsl,P2020DS")) { | ||
245 | #ifdef CONFIG_PCI | ||
246 | primary_phb_addr = 0x9000; | ||
247 | #endif | ||
248 | return 1; | ||
249 | } | ||
250 | |||
251 | return 0; | ||
233 | } | 252 | } |
234 | 253 | ||
235 | define_machine(mpc8544_ds) { | 254 | define_machine(mpc8544_ds) { |
@@ -259,3 +278,17 @@ define_machine(mpc8572_ds) { | |||
259 | .calibrate_decr = generic_calibrate_decr, | 278 | .calibrate_decr = generic_calibrate_decr, |
260 | .progress = udbg_progress, | 279 | .progress = udbg_progress, |
261 | }; | 280 | }; |
281 | |||
282 | define_machine(p2020_ds) { | ||
283 | .name = "P2020 DS", | ||
284 | .probe = p2020_ds_probe, | ||
285 | .setup_arch = mpc85xx_ds_setup_arch, | ||
286 | .init_IRQ = mpc85xx_ds_pic_init, | ||
287 | #ifdef CONFIG_PCI | ||
288 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
289 | #endif | ||
290 | .get_irq = mpic_get_irq, | ||
291 | .restart = fsl_rstcr_restart, | ||
292 | .calibrate_decr = generic_calibrate_decr, | ||
293 | .progress = udbg_progress, | ||
294 | }; | ||