From b05dcb58fe04c6274fc942fa93efe77072395951 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 4 Mar 2005 11:27:31 +0000 Subject: * 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 --- board/inka4x0/inka4x0.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'board/inka4x0') diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c index 08a1b7f00b..4900201dd8 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) */ -- cgit v1.2.3