public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] 85xx/mpc8536ds: Use is_serdes_configured() to determine of PCIe enabled
Date: Tue, 20 Apr 2010 10:39:28 -0500	[thread overview]
Message-ID: <1271777969-15475-3-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1271777969-15475-2-git-send-email-galak@kernel.crashing.org>

The new is_serdes_configured covers a broader range of devices than the
PCI specific code.  Use it instead as we convert away from the
is_fsl_pci_cfg() code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/ppc/cpu/mpc8xxx/pci_cfg.c        |   12 ------------
 board/freescale/mpc8536ds/mpc8536ds.c |    7 ++++---
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/ppc/cpu/mpc8xxx/pci_cfg.c b/arch/ppc/cpu/mpc8xxx/pci_cfg.c
index 85995ca..186936f 100644
--- a/arch/ppc/cpu/mpc8xxx/pci_cfg.c
+++ b/arch/ppc/cpu/mpc8xxx/pci_cfg.c
@@ -56,18 +56,6 @@ static struct pci_info pci_config_info[] =
 #elif defined(CONFIG_MPC8536)
 static struct pci_info pci_config_info[] =
 {
-	[LAW_TRGT_IF_PCI] = {
-		.cfg =   0,
-	},
-	[LAW_TRGT_IF_PCIE_1] = {
-		.cfg =   (1 << 2) | (1 << 3) | (1 << 5) | (1 << 7),
-	},
-	[LAW_TRGT_IF_PCIE_2] = {
-		.cfg =   (1 << 5) | (1 << 7),
-	},
-	[LAW_TRGT_IF_PCIE_3] = {
-		.cfg =   (1 << 7),
-	},
 };
 #elif defined(CONFIG_MPC8544)
 static struct pci_info pci_config_info[] =
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c
index 253ed18..c181f94 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -30,6 +30,7 @@
 #include <asm/fsl_pci.h>
 #include <asm/fsl_ddr_sdram.h>
 #include <asm/io.h>
+#include <asm/fsl_serdes.h>
 #include <spd.h>
 #include <miiphy.h>
 #include <libfdt.h>
@@ -219,7 +220,7 @@ void pci_init_board(void)
 
 	puts("\n");
 #ifdef CONFIG_PCIE3
-	pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_3, io_sel);
+	pcie_configured = is_serdes_configured(PCIE3);
 
 	if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE3)){
 		SET_STD_PCIE_INFO(pci_info[num], 3);
@@ -239,7 +240,7 @@ void pci_init_board(void)
 #endif
 
 #ifdef CONFIG_PCIE1
-	pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_1, io_sel);
+	pcie_configured = is_serdes_configured(PCIE1);
 
 	if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){
 		SET_STD_PCIE_INFO(pci_info[num], 1);
@@ -259,7 +260,7 @@ void pci_init_board(void)
 #endif
 
 #ifdef CONFIG_PCIE2
-	pcie_configured = is_fsl_pci_cfg(LAW_TRGT_IF_PCIE_2, io_sel);
+	pcie_configured = is_serdes_configured(PCIE2);
 
 	if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE2)){
 		SET_STD_PCIE_INFO(pci_info[num], 2);
-- 
1.6.0.6

  reply	other threads:[~2010-04-20 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 15:39 [U-Boot] [PATCH 1/4] ppc: Split MPC83xx SERDES code from MPC85xx/MPC86xx/QorIQ Kumar Gala
2010-04-20 15:39 ` [U-Boot] [PATCH 2/4] 85xx: Add is_serdes_configured() support to MPC8536 SERDES Kumar Gala
2010-04-20 15:39   ` Kumar Gala [this message]
2010-04-20 15:39     ` [U-Boot] [PATCH 4/4] 85xx/fsl-sata: Use is_serdes_configured() to determine if SATA is enabled Kumar Gala
2010-04-22  4:16   ` [U-Boot] [PATCH 2/4] 85xx: Add is_serdes_configured() support toMPC8536 SERDES Li Yang-R58472
2010-04-28  7:55   ` [U-Boot] [PATCH 2/4] 85xx: Add is_serdes_configured() support to MPC8536 SERDES Kumar Gala
2010-04-21 15:55 ` [U-Boot] [PATCH 1/4] ppc: Split MPC83xx SERDES code from MPC85xx/MPC86xx/QorIQ Kim Phillips
2010-04-27  3:39   ` Kumar Gala

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=1271777969-15475-3-git-send-email-galak@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=u-boot@lists.denx.de \
    /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