From c3f9d4939af90eb8e30119601c86c05bde6c7345 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 14 Mar 2004 00:59:59 +0000 Subject: * 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 --- cpu/mpc5xxx/ide.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'cpu/mpc5xxx/ide.c') diff --git a/cpu/mpc5xxx/ide.c b/cpu/mpc5xxx/ide.c index 05eb8bc..4718869 100644 --- a/cpu/mpc5xxx/ide.c +++ b/cpu/mpc5xxx/ide.c @@ -29,7 +29,9 @@ #define CALC_TIMING(t) (t + period - 1) / period -#define GPIO_PSC1_4 0x01000000ul +#ifdef CONFIG_IDE_RESET +extern void init_ide_reset (void); +#endif int ide_preinit (void) { @@ -70,24 +72,10 @@ int ide_preinit (void) *(vu_long *) MPC5XXX_ATA_PIO2 = reg; -#if defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET) - /* 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; -#endif /* defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET) */ +#ifdef CONFIG_IDE_RESET + init_ide_reset (); +#endif /* CONFIG_IDE_RESET */ return (0); } - -#if defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET) -void ide_set_reset (int idereset) -{ - if (idereset) { - *(vu_long *) MPC5XXX_WU_GPIO_DATA &= ~GPIO_PSC1_4; - } else { - *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4; - } -} -#endif /* defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET) */ #endif /* CFG_CMD_IDE */ -- cgit v1.1