[UC101] Fix: if no CF in the board, U-Boot resets sometimes.
authorHeiko Schocher <hs@pollux.denx.de>
Tue, 28 Aug 2007 15:40:33 +0000 (17:40 +0200)
committerHeiko Schocher <hs@pollux.denx.de>
Tue, 28 Aug 2007 15:40:33 +0000 (17:40 +0200)
Signed-off-by: Heiko Schocher <hs@denx.de>
cpu/mpc5xxx/ide.c
include/configs/uc101.h

index 087ddac109dbef5d108a8a09e3b22cb9a153dd3f..344e6f2029481e60c0f96e6111d1408aeb9deccc 100644 (file)
@@ -54,11 +54,19 @@ int ide_preinit (void)
        /* All sample codes do that... */
        *(vu_long *) MPC5XXX_ATA_SHARE_COUNT = 0;
 
+#if defined(CONFIG_UC101)
+       /* Configure and reset host */
+       *(vu_long *) MPC5XXX_ATA_HOST_CONFIG = 
+               MPC5xxx_ATA_HOSTCONF_SMR | MPC5xxx_ATA_HOSTCONF_FR;
+       udelay (10);
+       *(vu_long *) MPC5XXX_ATA_HOST_CONFIG = 0;
+#else
        /* Configure and reset host */
        *(vu_long *) MPC5XXX_ATA_HOST_CONFIG = MPC5xxx_ATA_HOSTCONF_IORDY |
                MPC5xxx_ATA_HOSTCONF_SMR | MPC5xxx_ATA_HOSTCONF_FR;
        udelay (10);
        *(vu_long *) MPC5XXX_ATA_HOST_CONFIG = MPC5xxx_ATA_HOSTCONF_IORDY;
+#endif
 
        /* Disable prefetch on Commbus */
        psdma->PtdCntrl |= 1;
index 3b471d0a97fb3f7e92152d30cc83b18a94df9f62..aed80ec1e51beac012edcfa4f3c8007a8d78ec41 100644 (file)
 #define CFG_IDE_MAXDEVICE      2       /* max. 2 drives per IDE bus    */
 
 #define CONFIG_IDE_PREINIT     1
-/* #define CONFIG_IDE_RESET    1 beispile siehe tqm5200.c */
 
 #define CFG_ATA_IDE0_OFFSET    0x0000