summaryrefslogtreecommitdiffstats
path: root/cpu/mpc5xxx
diff options
context:
space:
mode:
authorHeiko Schocher <hs@pollux.denx.de>2007-08-28 17:40:33 +0200
committerHeiko Schocher <hs@pollux.denx.de>2007-08-28 17:40:33 +0200
commita861558c65f65f1cf1302f3a35e9db7686b9e1a3 (patch)
tree7ba0f0a461f1f4311e0bcfffa574ebc04a950d05 /cpu/mpc5xxx
parentf98984cb194bb34dbe1db9429d3b51133af30d07 (diff)
downloadbootable_bootloader_goldelico_gta04-a861558c65f65f1cf1302f3a35e9db7686b9e1a3.zip
bootable_bootloader_goldelico_gta04-a861558c65f65f1cf1302f3a35e9db7686b9e1a3.tar.gz
bootable_bootloader_goldelico_gta04-a861558c65f65f1cf1302f3a35e9db7686b9e1a3.tar.bz2
[UC101] Fix: if no CF in the board, U-Boot resets sometimes.
Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'cpu/mpc5xxx')
-rw-r--r--cpu/mpc5xxx/ide.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpu/mpc5xxx/ide.c b/cpu/mpc5xxx/ide.c
index 087ddac..344e6f2 100644
--- a/cpu/mpc5xxx/ide.c
+++ b/cpu/mpc5xxx/ide.c
@@ -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;