projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move MPC5xxx_FEC driver to drivers/net
[oweals/u-boot.git]
/
cpu
/
mpc5xxx
/
ide.c
diff --git
a/cpu/mpc5xxx/ide.c
b/cpu/mpc5xxx/ide.c
index 1af794c6ecac6ae8bdeb1ee8bbf4d7e688306ca6..df5b4acd0ee61f7012c0ef375141028baf88a51c 100644
(file)
--- a/
cpu/mpc5xxx/ide.c
+++ b/
cpu/mpc5xxx/ide.c
@@
-24,9
+24,11
@@
*/
#include <common.h>
*/
#include <common.h>
-#if
def CFG_CMD_IDE
+#if
defined(CONFIG_CMD_IDE)
#include <mpc5xxx.h>
#include <mpc5xxx.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define CALC_TIMING(t) (t + period - 1) / period
#ifdef CONFIG_IDE_RESET
#define CALC_TIMING(t) (t + period - 1) / period
#ifdef CONFIG_IDE_RESET
@@
-35,7
+37,6
@@
extern void init_ide_reset (void);
int ide_preinit (void)
{
int ide_preinit (void)
{
- DECLARE_GLOBAL_DATA_PTR;
long period, t0, t1, t2_8, t2_16, t4, ta;
vu_long reg;
struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA;
long period, t0, t1, t2_8, t2_16, t4, ta;
vu_long reg;
struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA;
@@
-53,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;
@@
-84,4
+93,4
@@
int ide_preinit (void)
return (0);
}
return (0);
}
-#endif
/* CFG_CMD_IDE */
+#endif