linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: John Rigby <jrigby@freescale.com>
To: linuxppc-dev@ozlabs.org
Cc: John Rigby <jrigby@freescale.com>
Subject: [PATCH 7/8][Version 2] MPC5121 Add PCI support
Date: Tue, 24 Jun 2008 15:24:31 -0600	[thread overview]
Message-ID: <1214342672-23536-8-git-send-email-jrigby@freescale.com> (raw)
In-Reply-To: <1214342672-23536-7-git-send-email-jrigby@freescale.com>

Uses mpc83xx_add_bridge in fsl_pci.c

Signed-off-by: John Rigby <jrigby@freescale.com>
---
 arch/powerpc/platforms/512x/Kconfig       |    2 ++
 arch/powerpc/platforms/512x/mpc5121_ads.c |   10 ++++++++++
 arch/powerpc/platforms/512x/mpc512x.h     |    1 +
 arch/powerpc/sysdev/fsl_pci.c             |    5 +++--
 4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index 0fd3b00..f53f49b 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -2,6 +2,8 @@ config PPC_MPC512x
 	bool
 	select FSL_SOC
 	select IPIC
+	select PPC_HAS_PCI
+	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 36805fd..3306e29 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 struct of_device_id __initdata of_bus_ids[] = {
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
index 789b817..be30915 100644
--- a/arch/powerpc/platforms/512x/mpc512x.h
+++ b/arch/powerpc/platforms/512x/mpc512x.h
@@ -11,4 +11,5 @@
 #define __MPC512X_H__
 extern unsigned long mpc512x_find_ips_freq(struct device_node *node);
 extern void __init mpc512x_init_IRQ(void);
+extern int mpc512x_add_bridge(struct device_node *dev);
 #endif				/* __MPC512X_H__ */
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 6e6688f..a40bb8e 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -249,7 +249,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;
@@ -281,6 +281,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
 
 	/* MPC83xx supports up to two host controllers one at 0x8500 from immrbar
 	 * the other at 0x8600, we consider the 0x8500 the primary controller
+	 * MPC512x supports one host controller at 0x8500.
 	 */
 	/* PCI 1 */
 	if ((rsrc.start & 0xfffff) == 0x8500) {
@@ -292,7 +293,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
 		primary = 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.start, hose->first_busno,
 	       hose->last_busno);
-- 
1.5.6.rc0.46.gd2b3

  reply	other threads:[~2008-06-24 21:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 21:24 [PATCH 0/8][Version 2] MPC5121 Updates John Rigby
     [not found] ` <1214342672-23536-2-git-send-email-jrigby@freescale.com>
2008-06-24 21:24   ` [PATCH 2/8][Version 2] MPC5121 clock driver John Rigby
2008-06-24 21:24     ` [PATCH 3/8][Version 2] MPC5121 Add generic board support John Rigby
2008-06-24 21:24       ` [PATCH 4/8][Version 2] MPC5121 Add MPC5121ADS cpld support John Rigby
2008-06-24 21:24         ` [PATCH 5/8][Version 2] powerpc: pci config cleanup John Rigby
2008-06-24 21:24           ` [PATCH 6/8][Version 2] powerpc: Move mpc83xx_add_bridge to fsl_pci.c John Rigby
2008-06-24 21:24             ` John Rigby [this message]
2008-06-24 21:24               ` [PATCH 8/8][Version 2] MPC5121 Hide pci bridge John Rigby
2008-06-24 21:41                 ` Sergei Shtylyov
2008-06-25 17:17             ` [PATCH 6/8][Version 2] powerpc: Move mpc83xx_add_bridge to fsl_pci.c Kumar Gala
2008-06-29  8:01       ` [PATCH 3/8][Version 2] MPC5121 Add generic board support Grant Likely
2008-06-25  6:31     ` [PATCH 2/8][Version 2] MPC5121 clock driver David Jander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1214342672-23536-8-git-send-email-jrigby@freescale.com \
    --to=jrigby@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).