summaryrefslogtreecommitdiff
path: root/board/icecube/icecube.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-03-14 00:59:59 +0000
committerwdenk <wdenk>2004-03-14 00:59:59 +0000
commitc3f9d4939af90eb8e30119601c86c05bde6c7345 (patch)
tree90854c0902fd963de17ee275e3836629892a060f /board/icecube/icecube.c
parent0e6d798cb313580acd06ba01626687a557c5159f (diff)
downloadu-boot-imx-c3f9d4939af90eb8e30119601c86c05bde6c7345.zip
u-boot-imx-c3f9d4939af90eb8e30119601c86c05bde6c7345.tar.gz
u-boot-imx-c3f9d4939af90eb8e30119601c86c05bde6c7345.tar.bz2
* Patch by Yuli Barcohen, 4 Mar 2004:
Fix problems with GCC 3.3.x which changed handling of global variables explicitly initialized to zero (now in .bss instead of .data as before). * Patch by Leon Kukovec, 02 Mar 2004: add strswab() to fix IDE LBA capacity, firmware and model numbers on little endian machines * Patch by Masami Komiya, 02 Mar 2004: - Remove get_ticks() from NFS code - Add verification of RPC transaction ID * Patch by Pierre Aubert, 02 Mar 2004: cleanup for IDE and USB drivers for MPC5200
Diffstat (limited to 'board/icecube/icecube.c')
-rw-r--r--board/icecube/icecube.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/board/icecube/icecube.c b/board/icecube/icecube.c
index 59431db..0a4bed4 100644
--- a/board/icecube/icecube.c
+++ b/board/icecube/icecube.c
@@ -207,3 +207,28 @@ 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)
+{
+ printf ("init_ide_reset\n");
+
+ /* Configure PSC1_4 as GPIO output for ATA reset */
+ *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
+ *(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC1_4;
+ *(vu_long *) MPC5XXX_WU_GPIO_DIR |= GPIO_PSC1_4;
+}
+
+void ide_set_reset (int idereset)
+{
+ printf ("ide_reset(%d)\n", idereset);
+ if (idereset) {
+ *(vu_long *) MPC5XXX_WU_GPIO_DATA &= ~GPIO_PSC1_4;
+ } else {
+ *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
+ }
+}
+#endif /* defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET) */