summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc85xx
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2010-04-20 10:21:25 -0500
committerKumar Gala <galak@kernel.crashing.org>2010-05-12 04:53:51 -0500
commitf54fe87acedbbad7d29ad18cab31d2b323717514 (patch)
tree7b7d9c080a2a160733bd7528ac77733bc0ea0ae9 /arch/powerpc/cpu/mpc85xx
parent54648985e2a64e29784e3ed37cd45b637305cd65 (diff)
downloadu-boot-imx-f54fe87acedbbad7d29ad18cab31d2b323717514.zip
u-boot-imx-f54fe87acedbbad7d29ad18cab31d2b323717514.tar.gz
u-boot-imx-f54fe87acedbbad7d29ad18cab31d2b323717514.tar.bz2
85xx/fsl-sata: Use is_serdes_configured() to determine if SATA is enabled
On the MPC85xx platform if we have SATA its connected on SERDES. Determing if SATA is enabled via sata_initialize should not be board specific and thus we move it out of the MPC8536DS board code. Additionally, now that we have is_serdes_configured() we can determine if the given SATA port is enabled and error out if its not in the driver. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx')
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu_init.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index e578b29..99431dc 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007-2009 Freescale Semiconductor, Inc.
+ * Copyright 2007-2010 Freescale Semiconductor, Inc.
*
* (C) Copyright 2003 Motorola Inc.
* Modified by Xianghua Xiao, X.Xiao@motorola.com
@@ -30,9 +30,11 @@
#include <watchdog.h>
#include <asm/processor.h>
#include <ioports.h>
+#include <sata.h>
#include <asm/io.h>
#include <asm/mmu.h>
#include <asm/fsl_law.h>
+#include <asm/fsl_serdes.h>
#include "mp.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -418,3 +420,13 @@ void arch_preboot_os(void)
setup_ivors();
}
+
+#if defined(CONFIG_CMD_SATA) && defined(CONFIG_FSL_SATA)
+int sata_initialize(void)
+{
+ if (is_serdes_configured(SATA1) || is_serdes_configured(SATA2))
+ return __sata_initialize();
+
+ return 1;
+}
+#endif