diff options
author | John Rigby <jrigby@freescale.com> | 2008-10-07 17:13:18 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-10-13 12:09:58 -0400 |
commit | 35225802e2e7019392fbff9227662d456eef4e24 (patch) | |
tree | 974c6516098b4dcefab7ceed155b6945ba85bcd4 | |
parent | 5b70a097052fff3831d8b94541452e7c29426777 (diff) |
powerpc/5121: Add PCI support.
Uses mpc83xx_add_bridge in fsl_pci.c
Adds second register tuple to pci node register property
as done for 83xx device trees in a previous patch.
Signed-off-by: John Rigby <jrigby@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/boot/dts/mpc5121ads.dts | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/Kconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc5121_ads.c | 10 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 4 |
4 files changed, 16 insertions, 3 deletions
diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts b/arch/powerpc/boot/dts/mpc5121ads.dts index 1f9036c317b4..c2b8dbfab79e 100644 --- a/arch/powerpc/boot/dts/mpc5121ads.dts +++ b/arch/powerpc/boot/dts/mpc5121ads.dts | |||
@@ -403,7 +403,8 @@ | |||
403 | #interrupt-cells = <1>; | 403 | #interrupt-cells = <1>; |
404 | #size-cells = <2>; | 404 | #size-cells = <2>; |
405 | #address-cells = <3>; | 405 | #address-cells = <3>; |
406 | reg = <0x80008500 0x100>; | 406 | reg = <0x80008500 0x100 /* internal registers */ |
407 | 0x80008300 0x8>; /* config space access registers */ | ||
407 | compatible = "fsl,mpc5121-pci"; | 408 | compatible = "fsl,mpc5121-pci"; |
408 | device_type = "pci"; | 409 | device_type = "pci"; |
409 | }; | 410 | }; |
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig index c62f893ede19..326852c78b8f 100644 --- a/arch/powerpc/platforms/512x/Kconfig +++ b/arch/powerpc/platforms/512x/Kconfig | |||
@@ -3,6 +3,8 @@ config PPC_MPC512x | |||
3 | select FSL_SOC | 3 | select FSL_SOC |
4 | select IPIC | 4 | select IPIC |
5 | select PPC_CLOCK | 5 | select PPC_CLOCK |
6 | select PPC_PCI_CHOICE | ||
7 | select FSL_PCI if PCI | ||
6 | 8 | ||
7 | config PPC_MPC5121 | 9 | config PPC_MPC5121 |
8 | bool | 10 | bool |
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c index 5ebf6939a697..441abc488851 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c | |||
@@ -22,16 +22,26 @@ | |||
22 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
23 | #include <asm/time.h> | 23 | #include <asm/time.h> |
24 | 24 | ||
25 | #include <sysdev/fsl_pci.h> | ||
26 | |||
25 | #include "mpc512x.h" | 27 | #include "mpc512x.h" |
26 | #include "mpc5121_ads.h" | 28 | #include "mpc5121_ads.h" |
27 | 29 | ||
28 | static void __init mpc5121_ads_setup_arch(void) | 30 | static void __init mpc5121_ads_setup_arch(void) |
29 | { | 31 | { |
32 | #ifdef CONFIG_PCI | ||
33 | struct device_node *np; | ||
34 | #endif | ||
30 | printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n"); | 35 | printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n"); |
31 | /* | 36 | /* |
32 | * cpld regs are needed early | 37 | * cpld regs are needed early |
33 | */ | 38 | */ |
34 | mpc5121_ads_cpld_map(); | 39 | mpc5121_ads_cpld_map(); |
40 | |||
41 | #ifdef CONFIG_PCI | ||
42 | for_each_compatible_node(np, "pci", "fsl,mpc5121-pci") | ||
43 | mpc83xx_add_bridge(np); | ||
44 | #endif | ||
35 | } | 45 | } |
36 | 46 | ||
37 | static void __init mpc5121_ads_init_IRQ(void) | 47 | static void __init mpc5121_ads_init_IRQ(void) |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index a3f4abadbade..5b264eb4b1f7 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -251,7 +251,7 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header); | |||
251 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header); | 251 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header); |
252 | #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */ | 252 | #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */ |
253 | 253 | ||
254 | #if defined(CONFIG_PPC_83xx) | 254 | #if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x) |
255 | int __init mpc83xx_add_bridge(struct device_node *dev) | 255 | int __init mpc83xx_add_bridge(struct device_node *dev) |
256 | { | 256 | { |
257 | int len; | 257 | int len; |
@@ -310,7 +310,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev) | |||
310 | 310 | ||
311 | setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0); | 311 | setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0); |
312 | 312 | ||
313 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " | 313 | printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. " |
314 | "Firmware bus number: %d->%d\n", | 314 | "Firmware bus number: %d->%d\n", |
315 | (unsigned long long)rsrc_reg.start, hose->first_busno, | 315 | (unsigned long long)rsrc_reg.start, hose->first_busno, |
316 | hose->last_busno); | 316 | hose->last_busno); |