diff options
Diffstat (limited to 'board/icecube/icecube.c')
-rw-r--r-- | board/icecube/icecube.c | 25 |
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) */ |