summaryrefslogtreecommitdiff
path: root/board/freescale/mpc8536ds
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 /board/freescale/mpc8536ds
parentec4d8c1c1d94a790c1473ae8aace282b817c3123 (diff)
downloadu-boot-imx-0f8cbc1829d9c7d9616fd29b366a99d037facdcd.zip
u-boot-imx-0f8cbc1829d9c7d9616fd29b366a99d037facdcd.tar.gz
u-boot-imx-0f8cbc1829d9c7d9616fd29b366a99d037facdcd.tar.bz2
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 'board/freescale/mpc8536ds')
-rw-r--r--board/freescale/mpc8536ds/mpc8536ds.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c
index 8216c70..3cf12fd 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -608,6 +608,18 @@ get_board_ddr_clk(ulong dummy)
}
#endif
+int is_sata_supported()
+{
+ volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
+ uint devdisr = gur->devdisr;
+ uint sdrs2_io_sel =
+ (gur->pordevsr & MPC85xx_PORDEVSR_SRDS2_IO_SEL) >> 27;
+ if (sdrs2_io_sel & 0x04)
+ return 0;
+
+ return 1;
+}
+
#if defined(CONFIG_OF_BOARD_SETUP)
void
ft_board_setup(void *blob, bd_t *bd)