linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] powerpc: 5121: Add PCI support.
@ 2008-10-07 21:13 John Rigby
  2008-10-08 12:38 ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: John Rigby @ 2008-10-07 21:13 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: John Rigby

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>
---
 arch/powerpc/boot/dts/mpc5121ads.dts      |    3 ++-
 arch/powerpc/platforms/512x/Kconfig       |    2 ++
 arch/powerpc/platforms/512x/mpc5121_ads.c |   10 ++++++++++
 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 1f9036c..c2b8dbf 100644
--- a/arch/powerpc/boot/dts/mpc5121ads.dts
+++ b/arch/powerpc/boot/dts/mpc5121ads.dts
@@ -403,7 +403,8 @@
 		#interrupt-cells = <1>;
 		#size-cells = <2>;
 		#address-cells = <3>;
-		reg = <0x80008500 0x100>;
+		reg = <0x80008500 0x100		/* internal registers */
+		       0x80008300 0x8>;		/* config space access registers */
 		compatible = "fsl,mpc5121-pci";
 		device_type = "pci";
 	};
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index c62f893..326852c 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -3,6 +3,8 @@ config PPC_MPC512x
 	select FSL_SOC
 	select IPIC
 	select PPC_CLOCK
+	select PPC_PCI_CHOICE
+	select FSL_PCI if PCI
 
 config PPC_MPC5121
 	bool
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c
index 5ebf693..441abc4 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
@@ -22,16 +22,26 @@
 #include <asm/prom.h>
 #include <asm/time.h>
 
+#include <sysdev/fsl_pci.h>
+
 #include "mpc512x.h"
 #include "mpc5121_ads.h"
 
 static void __init mpc5121_ads_setup_arch(void)
 {
+#ifdef CONFIG_PCI
+	struct device_node *np;
+#endif
 	printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n");
 	/*
 	 * cpld regs are needed early
 	 */
 	mpc5121_ads_cpld_map();
+
+#ifdef CONFIG_PCI
+	for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
+		mpc83xx_add_bridge(np);
+#endif
 }
 
 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 a3f4aba..5b264eb 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);
 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
 #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
 
-#if defined(CONFIG_PPC_83xx)
+#if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
 int __init mpc83xx_add_bridge(struct device_node *dev)
 {
 	int len;
@@ -310,7 +310,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
 
 	setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0);
 
-	printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
+	printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
 	       "Firmware bus number: %d->%d\n",
 	       (unsigned long long)rsrc_reg.start, hose->first_busno,
 	       hose->last_busno);
-- 
1.5.6.2.255.gbed62

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/3] powerpc: 5121: Add PCI support.
  2008-10-07 21:13 [PATCH 2/3] powerpc: 5121: Add PCI support John Rigby
@ 2008-10-08 12:38 ` Kumar Gala
  2008-10-08 16:15   ` Grant Likely
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2008-10-08 12:38 UTC (permalink / raw)
  To: John Rigby; +Cc: linuxppc-dev list


On Oct 7, 2008, at 4:13 PM, John Rigby wrote:

> 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>
> ---
> arch/powerpc/boot/dts/mpc5121ads.dts      |    3 ++-
> arch/powerpc/platforms/512x/Kconfig       |    2 ++
> arch/powerpc/platforms/512x/mpc5121_ads.c |   10 ++++++++++
> arch/powerpc/sysdev/fsl_pci.c             |    4 ++--
> 4 files changed, 16 insertions(+), 3 deletions(-)

Acked-by: Kumar Gala <galak@kernel.crashing.org>

- k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/3] powerpc: 5121: Add PCI support.
  2008-10-08 12:38 ` Kumar Gala
@ 2008-10-08 16:15   ` Grant Likely
  2008-10-10  3:42     ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Likely @ 2008-10-08 16:15 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list, John Rigby

On Wed, Oct 8, 2008 at 6:38 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Oct 7, 2008, at 4:13 PM, John Rigby wrote:
>
>> 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>
>> ---
>> arch/powerpc/boot/dts/mpc5121ads.dts      |    3 ++-
>> arch/powerpc/platforms/512x/Kconfig       |    2 ++
>> arch/powerpc/platforms/512x/mpc5121_ads.c |   10 ++++++++++
>> arch/powerpc/sysdev/fsl_pci.c             |    4 ++--
>> 4 files changed, 16 insertions(+), 3 deletions(-)
>
> Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/3] powerpc: 5121: Add PCI support.
  2008-10-08 16:15   ` Grant Likely
@ 2008-10-10  3:42     ` Kumar Gala
  0 siblings, 0 replies; 5+ messages in thread
From: Kumar Gala @ 2008-10-10  3:42 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev list, John Rigby


On Oct 8, 2008, at 11:15 AM, Grant Likely wrote:

> On Wed, Oct 8, 2008 at 6:38 AM, Kumar Gala  
> <galak@kernel.crashing.org> wrote:
>>
>> On Oct 7, 2008, at 4:13 PM, John Rigby wrote:
>>
>>> 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>
>>> ---
>>> arch/powerpc/boot/dts/mpc5121ads.dts      |    3 ++-
>>> arch/powerpc/platforms/512x/Kconfig       |    2 ++
>>> arch/powerpc/platforms/512x/mpc5121_ads.c |   10 ++++++++++
>>> arch/powerpc/sysdev/fsl_pci.c             |    4 ++--
>>> 4 files changed, 16 insertions(+), 3 deletions(-)
>>
>> Acked-by: Kumar Gala <galak@kernel.crashing.org>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>

applied

- k

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] powerpc: 5121: Add PCI support.
  2008-10-07 19:00 ` [PATCH 1/3] powerpc: 83xx: pci: Remove need for get_immrbase from mpc83xx_add_bridge John Rigby
@ 2008-10-07 19:00   ` John Rigby
  0 siblings, 0 replies; 5+ messages in thread
From: John Rigby @ 2008-10-07 19:00 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: John Rigby

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>
---
 arch/powerpc/boot/dts/mpc5121ads.dts      |    3 ++-
 arch/powerpc/platforms/512x/Kconfig       |    2 ++
 arch/powerpc/platforms/512x/mpc5121_ads.c |   10 ++++++++++
 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 1f9036c..c2b8dbf 100644
--- a/arch/powerpc/boot/dts/mpc5121ads.dts
+++ b/arch/powerpc/boot/dts/mpc5121ads.dts
@@ -403,7 +403,8 @@
 		#interrupt-cells = <1>;
 		#size-cells = <2>;
 		#address-cells = <3>;
-		reg = <0x80008500 0x100>;
+		reg = <0x80008500 0x100		/* internal registers */
+		       0x80008300 0x8>;		/* config space access registers */
 		compatible = "fsl,mpc5121-pci";
 		device_type = "pci";
 	};
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index c62f893..326852c 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -3,6 +3,8 @@ config PPC_MPC512x
 	select FSL_SOC
 	select IPIC
 	select PPC_CLOCK
+	select PPC_PCI_CHOICE
+	select FSL_PCI if PCI
 
 config PPC_MPC5121
 	bool
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c
index 5ebf693..441abc4 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
@@ -22,16 +22,26 @@
 #include <asm/prom.h>
 #include <asm/time.h>
 
+#include <sysdev/fsl_pci.h>
+
 #include "mpc512x.h"
 #include "mpc5121_ads.h"
 
 static void __init mpc5121_ads_setup_arch(void)
 {
+#ifdef CONFIG_PCI
+	struct device_node *np;
+#endif
 	printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n");
 	/*
 	 * cpld regs are needed early
 	 */
 	mpc5121_ads_cpld_map();
+
+#ifdef CONFIG_PCI
+	for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
+		mpc83xx_add_bridge(np);
+#endif
 }
 
 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 a3f4aba..5b264eb 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);
 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
 #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
 
-#if defined(CONFIG_PPC_83xx)
+#if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
 int __init mpc83xx_add_bridge(struct device_node *dev)
 {
 	int len;
@@ -310,7 +310,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
 
 	setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0);
 
-	printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
+	printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
 	       "Firmware bus number: %d->%d\n",
 	       (unsigned long long)rsrc_reg.start, hose->first_busno,
 	       hose->last_busno);
-- 
1.5.6.2.255.gbed62

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-10  3:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-07 21:13 [PATCH 2/3] powerpc: 5121: Add PCI support John Rigby
2008-10-08 12:38 ` Kumar Gala
2008-10-08 16:15   ` Grant Likely
2008-10-10  3:42     ` Kumar Gala
  -- strict thread matches above, loose matches on Subject: below --
2008-10-07 19:00 [PATCH 0/3] MPC5121 add pci support John Rigby
2008-10-07 19:00 ` [PATCH 1/3] powerpc: 83xx: pci: Remove need for get_immrbase from mpc83xx_add_bridge John Rigby
2008-10-07 19:00   ` [PATCH 2/3] powerpc: 5121: Add PCI support John Rigby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).