diff options
author | David Daney <ddaney@caviumnetworks.com> | 2009-01-15 20:45:31 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-01-16 10:23:37 -0500 |
commit | 3ada9c126499dd4700dcdbd5b9fe8110ad17f578 (patch) | |
tree | aec4fc6d574589eec606cf234eb7f5df529b05f3 /drivers/ata | |
parent | 6813952021a7820a505002de260bda36978671f7 (diff) |
libata: Add another column to the ata_timing table.
The forthcoming OCTEON SOC Compact Flash driver needs an additional
timing value that was not available in the ata_timing table. I add a
new column for dmack_hold time. The values were obtained from the
Compact Flash specification Rev 4.1.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 552ecae13434..88c242856dae 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -3029,33 +3029,33 @@ int sata_set_spd(struct ata_link *link) | |||
3029 | */ | 3029 | */ |
3030 | 3030 | ||
3031 | static const struct ata_timing ata_timing[] = { | 3031 | static const struct ata_timing ata_timing[] = { |
3032 | /* { XFER_PIO_SLOW, 120, 290, 240, 960, 290, 240, 960, 0 }, */ | 3032 | /* { XFER_PIO_SLOW, 120, 290, 240, 960, 290, 240, 0, 960, 0 }, */ |
3033 | { XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0 }, | 3033 | { XFER_PIO_0, 70, 290, 240, 600, 165, 150, 0, 600, 0 }, |
3034 | { XFER_PIO_1, 50, 290, 93, 383, 125, 100, 383, 0 }, | 3034 | { XFER_PIO_1, 50, 290, 93, 383, 125, 100, 0, 383, 0 }, |
3035 | { XFER_PIO_2, 30, 290, 40, 330, 100, 90, 240, 0 }, | 3035 | { XFER_PIO_2, 30, 290, 40, 330, 100, 90, 0, 240, 0 }, |
3036 | { XFER_PIO_3, 30, 80, 70, 180, 80, 70, 180, 0 }, | 3036 | { XFER_PIO_3, 30, 80, 70, 180, 80, 70, 0, 180, 0 }, |
3037 | { XFER_PIO_4, 25, 70, 25, 120, 70, 25, 120, 0 }, | 3037 | { XFER_PIO_4, 25, 70, 25, 120, 70, 25, 0, 120, 0 }, |
3038 | { XFER_PIO_5, 15, 65, 25, 100, 65, 25, 100, 0 }, | 3038 | { XFER_PIO_5, 15, 65, 25, 100, 65, 25, 0, 100, 0 }, |
3039 | { XFER_PIO_6, 10, 55, 20, 80, 55, 20, 80, 0 }, | 3039 | { XFER_PIO_6, 10, 55, 20, 80, 55, 20, 0, 80, 0 }, |
3040 | 3040 | ||
3041 | { XFER_SW_DMA_0, 120, 0, 0, 0, 480, 480, 960, 0 }, | 3041 | { XFER_SW_DMA_0, 120, 0, 0, 0, 480, 480, 50, 960, 0 }, |
3042 | { XFER_SW_DMA_1, 90, 0, 0, 0, 240, 240, 480, 0 }, | 3042 | { XFER_SW_DMA_1, 90, 0, 0, 0, 240, 240, 30, 480, 0 }, |
3043 | { XFER_SW_DMA_2, 60, 0, 0, 0, 120, 120, 240, 0 }, | 3043 | { XFER_SW_DMA_2, 60, 0, 0, 0, 120, 120, 20, 240, 0 }, |
3044 | 3044 | ||
3045 | { XFER_MW_DMA_0, 60, 0, 0, 0, 215, 215, 480, 0 }, | 3045 | { XFER_MW_DMA_0, 60, 0, 0, 0, 215, 215, 20, 480, 0 }, |
3046 | { XFER_MW_DMA_1, 45, 0, 0, 0, 80, 50, 150, 0 }, | 3046 | { XFER_MW_DMA_1, 45, 0, 0, 0, 80, 50, 5, 150, 0 }, |
3047 | { XFER_MW_DMA_2, 25, 0, 0, 0, 70, 25, 120, 0 }, | 3047 | { XFER_MW_DMA_2, 25, 0, 0, 0, 70, 25, 5, 120, 0 }, |
3048 | { XFER_MW_DMA_3, 25, 0, 0, 0, 65, 25, 100, 0 }, | 3048 | { XFER_MW_DMA_3, 25, 0, 0, 0, 65, 25, 5, 100, 0 }, |
3049 | { XFER_MW_DMA_4, 25, 0, 0, 0, 55, 20, 80, 0 }, | 3049 | { XFER_MW_DMA_4, 25, 0, 0, 0, 55, 20, 5, 80, 0 }, |
3050 | 3050 | ||
3051 | /* { XFER_UDMA_SLOW, 0, 0, 0, 0, 0, 0, 0, 150 }, */ | 3051 | /* { XFER_UDMA_SLOW, 0, 0, 0, 0, 0, 0, 0, 0, 150 }, */ |
3052 | { XFER_UDMA_0, 0, 0, 0, 0, 0, 0, 0, 120 }, | 3052 | { XFER_UDMA_0, 0, 0, 0, 0, 0, 0, 0, 0, 120 }, |
3053 | { XFER_UDMA_1, 0, 0, 0, 0, 0, 0, 0, 80 }, | 3053 | { XFER_UDMA_1, 0, 0, 0, 0, 0, 0, 0, 0, 80 }, |
3054 | { XFER_UDMA_2, 0, 0, 0, 0, 0, 0, 0, 60 }, | 3054 | { XFER_UDMA_2, 0, 0, 0, 0, 0, 0, 0, 0, 60 }, |
3055 | { XFER_UDMA_3, 0, 0, 0, 0, 0, 0, 0, 45 }, | 3055 | { XFER_UDMA_3, 0, 0, 0, 0, 0, 0, 0, 0, 45 }, |
3056 | { XFER_UDMA_4, 0, 0, 0, 0, 0, 0, 0, 30 }, | 3056 | { XFER_UDMA_4, 0, 0, 0, 0, 0, 0, 0, 0, 30 }, |
3057 | { XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 20 }, | 3057 | { XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 0, 20 }, |
3058 | { XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 15 }, | 3058 | { XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 0, 15 }, |
3059 | 3059 | ||
3060 | { 0xFF } | 3060 | { 0xFF } |
3061 | }; | 3061 | }; |
@@ -3065,14 +3065,15 @@ static const struct ata_timing ata_timing[] = { | |||
3065 | 3065 | ||
3066 | static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT) | 3066 | static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT) |
3067 | { | 3067 | { |
3068 | q->setup = EZ(t->setup * 1000, T); | 3068 | q->setup = EZ(t->setup * 1000, T); |
3069 | q->act8b = EZ(t->act8b * 1000, T); | 3069 | q->act8b = EZ(t->act8b * 1000, T); |
3070 | q->rec8b = EZ(t->rec8b * 1000, T); | 3070 | q->rec8b = EZ(t->rec8b * 1000, T); |
3071 | q->cyc8b = EZ(t->cyc8b * 1000, T); | 3071 | q->cyc8b = EZ(t->cyc8b * 1000, T); |
3072 | q->active = EZ(t->active * 1000, T); | 3072 | q->active = EZ(t->active * 1000, T); |
3073 | q->recover = EZ(t->recover * 1000, T); | 3073 | q->recover = EZ(t->recover * 1000, T); |
3074 | q->cycle = EZ(t->cycle * 1000, T); | 3074 | q->dmack_hold = EZ(t->dmack_hold * 1000, T); |
3075 | q->udma = EZ(t->udma * 1000, UT); | 3075 | q->cycle = EZ(t->cycle * 1000, T); |
3076 | q->udma = EZ(t->udma * 1000, UT); | ||
3076 | } | 3077 | } |
3077 | 3078 | ||
3078 | void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b, | 3079 | void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b, |
@@ -3084,6 +3085,7 @@ void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b, | |||
3084 | if (what & ATA_TIMING_CYC8B ) m->cyc8b = max(a->cyc8b, b->cyc8b); | 3085 | if (what & ATA_TIMING_CYC8B ) m->cyc8b = max(a->cyc8b, b->cyc8b); |
3085 | if (what & ATA_TIMING_ACTIVE ) m->active = max(a->active, b->active); | 3086 | if (what & ATA_TIMING_ACTIVE ) m->active = max(a->active, b->active); |
3086 | if (what & ATA_TIMING_RECOVER) m->recover = max(a->recover, b->recover); | 3087 | if (what & ATA_TIMING_RECOVER) m->recover = max(a->recover, b->recover); |
3088 | if (what & ATA_TIMING_DMACK_HOLD) m->dmack_hold = max(a->dmack_hold, b->dmack_hold); | ||
3087 | if (what & ATA_TIMING_CYCLE ) m->cycle = max(a->cycle, b->cycle); | 3089 | if (what & ATA_TIMING_CYCLE ) m->cycle = max(a->cycle, b->cycle); |
3088 | if (what & ATA_TIMING_UDMA ) m->udma = max(a->udma, b->udma); | 3090 | if (what & ATA_TIMING_UDMA ) m->udma = max(a->udma, b->udma); |
3089 | } | 3091 | } |