}
#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)
/* 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
#endif
#if defined(CONFIG_CMD_SATA)
- puts ("SATA: ");
- sata_initialize ();
+ if (is_sata_supported()) {
+ puts("SATA: ");
+ sata_initialize();
+ }
#endif
#ifdef CONFIG_LAST_STAGE_INIT