summaryrefslogtreecommitdiff
path: root/board/inka4x0/inka4x0.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-03-04 11:27:31 +0000
committerwdenk <wdenk>2005-03-04 11:27:31 +0000
commitb05dcb58fe04c6274fc942fa93efe77072395951 (patch)
tree214508184e4332109c02b2a958e9fefeec7a00b4 /board/inka4x0/inka4x0.c
parent47b1e3d77fcd951df45259a4b20cc116d226e10f (diff)
downloadu-boot-imx-b05dcb58fe04c6274fc942fa93efe77072395951.zip
u-boot-imx-b05dcb58fe04c6274fc942fa93efe77072395951.tar.gz
u-boot-imx-b05dcb58fe04c6274fc942fa93efe77072395951.tar.bz2
* Fix get_partition_info() parameter error in all other calls
(common/cmd_ide.c, common/cmd_reiser.c, common/cmd_scsi.c). * Enable USB and IDE support for INKA4x0 board * Patch by Andrew Dyer, 28 February 2005: fix ext2load passing an incorrect pointer to get_partition_info() resulting in load failure for devices other than 0
Diffstat (limited to 'board/inka4x0/inka4x0.c')
-rw-r--r--board/inka4x0/inka4x0.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 08a1b7f..4900201 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -200,3 +200,32 @@ void pci_init_board(void)
pci_mpc5xxx_init(&hose);
}
#endif
+
+#if defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET)
+
+#define GPIO_PSC1_4 0x01000000UL
+
+void init_ide_reset (void)
+{
+ debug ("init_ide_reset\n");
+
+ /* Configure PSC1_4 as GPIO output for ATA reset */
+ *(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC1_4;
+ *(vu_long *) MPC5XXX_WU_GPIO_DIR |= GPIO_PSC1_4;
+ /* Deassert reset */
+ *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
+}
+
+void ide_set_reset (int idereset)
+{
+ debug ("ide_reset(%d)\n", idereset);
+
+ if (idereset) {
+ *(vu_long *) MPC5XXX_WU_GPIO_DATA &= ~GPIO_PSC1_4;
+ /* Make a delay. MPC5200 spec says 25 usec min */
+ udelay(500000);
+ } else {
+ *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
+ }
+}
+#endif /* defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET) */