Commit 20fc1877 authored by Dirk Behme's avatar Dirk Behme Committed by Kevin Hilman

ARM: DAVINCI: Fix broken IDE compilation

Fix broken compilation of drivers/ide/davinci/palm_bk3710.c
Signed-off-by: default avatarDirk Behme <dirk.behme@gmail.com>
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
parent 4b14da7f
...@@ -107,8 +107,7 @@ struct clk *ideclkp = NULL; ...@@ -107,8 +107,7 @@ struct clk *ideclkp = NULL;
int palm_bk3710_chipinit(void); int palm_bk3710_chipinit(void);
int palm_bk3710_setdmamode(palm_bk3710_ideregs *, unsigned int, unsigned int, int palm_bk3710_setdmamode(palm_bk3710_ideregs *, unsigned int, unsigned int,
unsigned int); unsigned int);
int palm_bk3710_setpiomode(palm_bk3710_ideregs *, unsigned int, unsigned int, u8 palm_bk3710_setpiomode(palm_bk3710_ideregs *, unsigned int, unsigned int, u8);
unsigned int);
static void palm_bk3710_tune_drive(ide_drive_t *, u8); static void palm_bk3710_tune_drive(ide_drive_t *, u8);
...@@ -224,10 +223,10 @@ int palm_bk3710_setdmamode(palm_bk3710_ideregs * handle, unsigned int dev, ...@@ -224,10 +223,10 @@ int palm_bk3710_setdmamode(palm_bk3710_ideregs * handle, unsigned int dev,
* Handle [IN] : IDE Controller info * Handle [IN] : IDE Controller info
* Dev [IN] : drive to tune * Dev [IN] : drive to tune
* level [IN] : desired level * level [IN] : desired level
* int : level in PIO mode * u8 : level in PIO mode
******************************************************************************/ ******************************************************************************/
int palm_bk3710_setpiomode(palm_bk3710_ideregs * handle, unsigned int dev, u8 palm_bk3710_setpiomode(palm_bk3710_ideregs * handle, unsigned int dev,
unsigned int cycletime, unsigned int mode) unsigned int cycletime, u8 mode)
{ {
int is_slave = (dev == 1) ? 1 : 0; int is_slave = (dev == 1) ? 1 : 0;
char ide_t2, ide_t2i, ide_t0; char ide_t2, ide_t2i, ide_t0;
...@@ -363,7 +362,7 @@ static inline int palm_bk3710_drivedma(ide_drive_t * pDrive) ...@@ -363,7 +362,7 @@ static inline int palm_bk3710_drivedma(ide_drive_t * pDrive)
palm_bk3710_tune_drive(pDrive, 255); palm_bk3710_tune_drive(pDrive, 255);
} else { } else {
palm_bk3710_hostdma(pDrive, speed); palm_bk3710_hostdma(pDrive, speed);
return ide_dma_enable(pDrive); ide_tune_dma(pDrive);
} }
return 0; return 0;
...@@ -426,21 +425,19 @@ static int palm_bk3710_checkdma(ide_drive_t * drive) ...@@ -426,21 +425,19 @@ static int palm_bk3710_checkdma(ide_drive_t * drive)
static void palm_bk3710_tune_drive(ide_drive_t * drive, u8 pio) static void palm_bk3710_tune_drive(ide_drive_t * drive, u8 pio)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
ide_pio_data_t piodata; unsigned int cycle_time;
int is_slave = (&hwif->drives[1] == drive); int is_slave = (&hwif->drives[1] == drive);
/* Get the best PIO Mode supported by the drive /* Get the best PIO Mode supported by the drive
* Obtain the drive PIO data for tuning the Palm Chip registers * Obtain the drive PIO data for tuning the Palm Chip registers
*/ */
ide_get_best_pio_mode(drive, pio, 5, &piodata); pio = ide_get_best_pio_mode(drive, pio, 5);
cycle_time = ide_pio_cycle_time(drive, pio);
/* Check for IORDY here */ /* Check for IORDY here */
if (piodata.cycle_time < ide_pio_timings[piodata.pio_mode] if (cycle_time < ide_pio_timings[pio].cycle_time) {
.cycle_time) { cycle_time = ide_pio_timings[pio].cycle_time;
piodata.cycle_time = ide_pio_timings[piodata.pio_mode]
.cycle_time;
} }
palm_bk3710_setpiomode(NULL, is_slave, piodata.cycle_time, palm_bk3710_setpiomode(NULL, is_slave, cycle_time, pio);
piodata.pio_mode);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment