aboutsummaryrefslogtreecommitdiffstats
path: root/lib_ppc
diff options
context:
space:
mode:
authorJason Jin <Jason.jin@freescale.com>2008-10-10 11:41:01 +0800
committerWolfgang Denk <wd@denx.de>2008-10-14 17:57:27 +0200
commit0f8cbc1829d9c7d9616fd29b366a99d037facdcd (patch)
treeee6500a64bd2dffbdf5acb0cdcf5d31f71bff74f /lib_ppc
parentec4d8c1c1d94a790c1473ae8aace282b817c3123 (diff)
downloadu-boot-midas-0f8cbc1829d9c7d9616fd29b366a99d037facdcd.tar.gz
u-boot-midas-0f8cbc1829d9c7d9616fd29b366a99d037facdcd.tar.bz2
u-boot-midas-0f8cbc1829d9c7d9616fd29b366a99d037facdcd.zip
Do not init SATA when disabled on 8536DS.
SGMII and SATA share the serdes on MPC8536 CPU, When SATA disabled and the driver still try to access the SATA registers, the cpu will hangup. This patch try to fix this by reading the serdes status before the SATA initialize. Signed-off-by: Jason Jin <Jason.jin@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'lib_ppc')
-rw-r--r--lib_ppc/board.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index c02ac62b37..564faf2c65 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -635,6 +635,16 @@ void board_init_f (ulong bootflag)
/* NOTREACHED - relocate_code() does not return */
}
+int __is_sata_supported()
+{
+ /* For some boards, when sata disabled by the switch, and the
+ * driver still access the sata registers, the cpu will hangup.
+ * please define platform specific is_sata_supported() if your
+ * board have such issue.*/
+ return 1;
+}
+int is_sata_supported() __attribute__((weak, alias("__is_sata_supported")));
+
/************************************************************************
*
* This is the next part if the initialization sequence: we are now
@@ -1105,8 +1115,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
#endif
#if defined(CONFIG_CMD_SATA)
- puts ("SATA: ");
- sata_initialize ();
+ if (is_sata_supported()) {
+ puts("SATA: ");
+ sata_initialize();
+ }
#endif
#ifdef CONFIG_LAST_STAGE_INIT