diff options
-rw-r--r-- | drivers/ide/palm_bk3710.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c index c7acca0b8733..d1513b4a457c 100644 --- a/drivers/ide/palm_bk3710.c +++ b/drivers/ide/palm_bk3710.c | |||
@@ -39,14 +39,6 @@ | |||
39 | /* Primary Control Offset */ | 39 | /* Primary Control Offset */ |
40 | #define IDE_PALM_ATA_PRI_CTL_OFFSET 0x3F6 | 40 | #define IDE_PALM_ATA_PRI_CTL_OFFSET 0x3F6 |
41 | 41 | ||
42 | /* | ||
43 | * PalmChip 3710 IDE Controller UDMA timing structure Definition | ||
44 | */ | ||
45 | struct palm_bk3710_udmatiming { | ||
46 | unsigned int rptime; /* Ready to pause time */ | ||
47 | unsigned int cycletime; /* Cycle Time */ | ||
48 | }; | ||
49 | |||
50 | #define BK3710_BMICP 0x00 | 42 | #define BK3710_BMICP 0x00 |
51 | #define BK3710_BMISP 0x02 | 43 | #define BK3710_BMISP 0x02 |
52 | #define BK3710_BMIDTP 0x04 | 44 | #define BK3710_BMIDTP 0x04 |
@@ -75,13 +67,19 @@ struct palm_bk3710_udmatiming { | |||
75 | 67 | ||
76 | static unsigned ideclk_period; /* in nanoseconds */ | 68 | static unsigned ideclk_period; /* in nanoseconds */ |
77 | 69 | ||
70 | struct palm_bk3710_udmatiming { | ||
71 | unsigned int rptime; /* tRP -- Ready to pause time (nsec) */ | ||
72 | unsigned int cycletime; /* tCYCTYP2/2 -- avg Cycle Time (nsec) */ | ||
73 | /* tENV is always a minimum of 20 nsec */ | ||
74 | }; | ||
75 | |||
78 | static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = { | 76 | static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = { |
79 | {160, 240}, /* UDMA Mode 0 */ | 77 | {160, 240 / 2,}, /* UDMA Mode 0 */ |
80 | {125, 160}, /* UDMA Mode 1 */ | 78 | {125, 160 / 2,}, /* UDMA Mode 1 */ |
81 | {100, 120}, /* UDMA Mode 2 */ | 79 | {100, 120 / 2,}, /* UDMA Mode 2 */ |
82 | {100, 90}, /* UDMA Mode 3 */ | 80 | {100, 90 / 2,}, /* UDMA Mode 3 */ |
83 | {100, 60}, /* UDMA Mode 4 */ | 81 | {100, 60 / 2,}, /* UDMA Mode 4 */ |
84 | {85, 40}, /* UDMA Mode 5 */ | 82 | {85, 40 / 2,}, /* UDMA Mode 5 */ |
85 | }; | 83 | }; |
86 | 84 | ||
87 | static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev, | 85 | static void palm_bk3710_setudmamode(void __iomem *base, unsigned int dev, |