summaryrefslogtreecommitdiff
path: root/board/emk
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-04-18 22:26:17 +0000
committerwdenk <wdenk>2004-04-18 22:26:17 +0000
commit498b8db7f5ba6c4793cc2d235c7274408d0a63db (patch)
treeb6a70e78dcf24fa2ec3486fc43142ce1c72126d8 /board/emk
parenta8bd82de4671edd5ab1114802b66d2ff5fb90e1f (diff)
downloadu-boot-imx-498b8db7f5ba6c4793cc2d235c7274408d0a63db.zip
u-boot-imx-498b8db7f5ba6c4793cc2d235c7274408d0a63db.tar.gz
u-boot-imx-498b8db7f5ba6c4793cc2d235c7274408d0a63db.tar.bz2
* Patch by Matthew S. McClintock, 14 Apr 2004:
fix initdram function for utx8245 board * Patch by Markus Pietrek, 14 Apr 2004: use ATAG_INITRD2 instead of deprecated ATAG_INITRD tag * Patch by Reinhard Meyer, 18 Apr 2004: provide the IDE Reset Function for EMK 5200 boards * Patch by Masami Komiya, 12 Apr 2004: fix pci_hose_write_config_{byte,word}_via_dword problems
Diffstat (limited to 'board/emk')
-rw-r--r--board/emk/top5200/top5200.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/board/emk/top5200/top5200.c b/board/emk/top5200/top5200.c
index 63a4ee4..4508438 100644
--- a/board/emk/top5200/top5200.c
+++ b/board/emk/top5200/top5200.c
@@ -182,21 +182,29 @@ void pci_init_board(void)
#endif
/*****************************************************************************
- * provide the PCI Reset Function
+ * provide the IDE Reset Function
*****************************************************************************/
-#ifdef CFG_CMD_IDE
-#define GPIO_PSC1_4 0x01000000ul
+#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;
+}
+
void ide_set_reset (int idereset)
{
+ debug ("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;
+ *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
}
-
- /* Configure PSC1_4 as GPIO output for ATA reset */
- /* (it does not matter we do this every time) */
- *(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC1_4;
- *(vu_long *) MPC5XXX_WU_GPIO_DIR |= GPIO_PSC1_4;
}
-#endif
+#endif /* defined (CFG_CMD_IDE) && defined (CONFIG_IDE_RESET) */