projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'next' of ../next
[oweals/u-boot.git]
/
cpu
/
mpc5xxx
/
ide.c
diff --git
a/cpu/mpc5xxx/ide.c
b/cpu/mpc5xxx/ide.c
index 29b99f6b15ddada936f3b3226dfdddf0e2d5098d..9e8f29b289ee7a028e2c29f50774942e8e47f451 100644
(file)
--- a/
cpu/mpc5xxx/ide.c
+++ b/
cpu/mpc5xxx/ide.c
@@
-24,7
+24,7
@@
*/
#include <common.h>
*/
#include <common.h>
-#if
def CFG_CMD_IDE
+#if
defined(CONFIG_CMD_IDE)
#include <mpc5xxx.h>
DECLARE_GLOBAL_DATA_PTR;
#include <mpc5xxx.h>
DECLARE_GLOBAL_DATA_PTR;
@@
-42,7
+42,7
@@
int ide_preinit (void)
struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA;
reg = *(vu_long *) MPC5XXX_GPS_PORT_CONFIG;
struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA;
reg = *(vu_long *) MPC5XXX_GPS_PORT_CONFIG;
-#if defined(CONFIG_
TOTAL5200
)
+#if defined(CONFIG_
SYS_ATA_CS_ON_I2C2
)
/* ATA cs0/1 on i2c2 clk/io */
reg = (reg & ~0x03000000ul) | 0x02000000ul;
#else
/* ATA cs0/1 on i2c2 clk/io */
reg = (reg & ~0x03000000ul) | 0x02000000ul;
#else
@@
-54,11
+54,19
@@
int ide_preinit (void)
/* All sample codes do that... */
*(vu_long *) MPC5XXX_ATA_SHARE_COUNT = 0;
/* 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;
/* 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;
/* Disable prefetch on Commbus */
psdma->PtdCntrl |= 1;
@@
-85,4
+93,4
@@
int ide_preinit (void)
return (0);
}
return (0);
}
-#endif
/* CFG_CMD_IDE */
+#endif