aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:34 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:34 -0500
commit1f66019bdf902cb59adf959e462bcd3f4c01f683 (patch)
tree15c3f1b4a6479f8ff500801cff9076cc386d1cda
parent6b4924962c49655494d2c8e9d3faab0e349a3062 (diff)
trm290: add IDE_HFLAG_TRM290 host flag
* Add IDE_HFLAG_TRM290 host flag and use it in ide_build_dmatable(). * Remove no longer needed ide_trm290 chipset type. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-dma-sff.c2
-rw-r--r--drivers/ide/ide-proc.c1
-rw-r--r--drivers/ide/trm290.c4
-rw-r--r--include/linux/ide.h4
4 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ide/ide-dma-sff.c b/drivers/ide/ide-dma-sff.c
index cac431f0df17..1f2a5f56f81c 100644
--- a/drivers/ide/ide-dma-sff.c
+++ b/drivers/ide/ide-dma-sff.c
@@ -98,10 +98,10 @@ int ide_build_dmatable(ide_drive_t *drive, struct request *rq)
98{ 98{
99 ide_hwif_t *hwif = drive->hwif; 99 ide_hwif_t *hwif = drive->hwif;
100 __le32 *table = (__le32 *)hwif->dmatable_cpu; 100 __le32 *table = (__le32 *)hwif->dmatable_cpu;
101 unsigned int is_trm290 = (hwif->chipset == ide_trm290) ? 1 : 0;
102 unsigned int count = 0; 101 unsigned int count = 0;
103 int i; 102 int i;
104 struct scatterlist *sg; 103 struct scatterlist *sg;
104 u8 is_trm290 = !!(hwif->host_flags & IDE_HFLAG_TRM290);
105 105
106 hwif->sg_nents = ide_build_sglist(drive, rq); 106 hwif->sg_nents = ide_build_sglist(drive, rq);
107 if (hwif->sg_nents == 0) 107 if (hwif->sg_nents == 0)
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index c2e6b8927bdc..066d2317545b 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -46,7 +46,6 @@ static int proc_ide_read_imodel
46 case ide_qd65xx: name = "qd65xx"; break; 46 case ide_qd65xx: name = "qd65xx"; break;
47 case ide_umc8672: name = "umc8672"; break; 47 case ide_umc8672: name = "umc8672"; break;
48 case ide_ht6560b: name = "ht6560b"; break; 48 case ide_ht6560b: name = "ht6560b"; break;
49 case ide_trm290: name = "trm290"; break;
50 case ide_cy82c693: name = "cy82c693"; break; 49 case ide_cy82c693: name = "cy82c693"; break;
51 case ide_4drives: name = "4drives"; break; 50 case ide_4drives: name = "4drives"; break;
52 case ide_pmac: name = "mac-io"; break; 51 case ide_pmac: name = "mac-io"; break;
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c
index 75ea61526566..2a5ea90cf8b8 100644
--- a/drivers/ide/trm290.c
+++ b/drivers/ide/trm290.c
@@ -328,10 +328,10 @@ static struct ide_dma_ops trm290_dma_ops = {
328static const struct ide_port_info trm290_chipset __devinitdata = { 328static const struct ide_port_info trm290_chipset __devinitdata = {
329 .name = DRV_NAME, 329 .name = DRV_NAME,
330 .init_hwif = init_hwif_trm290, 330 .init_hwif = init_hwif_trm290,
331 .chipset = ide_trm290,
332 .port_ops = &trm290_port_ops, 331 .port_ops = &trm290_port_ops,
333 .dma_ops = &trm290_dma_ops, 332 .dma_ops = &trm290_dma_ops,
334 .host_flags = IDE_HFLAG_NO_ATAPI_DMA | 333 .host_flags = IDE_HFLAG_TRM290 |
334 IDE_HFLAG_NO_ATAPI_DMA |
335#if 0 /* play it safe for now */ 335#if 0 /* play it safe for now */
336 IDE_HFLAG_TRUST_BIOS_FOR_DMA | 336 IDE_HFLAG_TRUST_BIOS_FOR_DMA |
337#endif 337#endif
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 2574dda4a3e7..f62d35a5fb71 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -170,7 +170,7 @@ typedef int (ide_ack_intr_t)(struct hwif_s *);
170enum { ide_unknown, ide_generic, ide_pci, 170enum { ide_unknown, ide_generic, ide_pci,
171 ide_cmd640, ide_dtc2278, ide_ali14xx, 171 ide_cmd640, ide_dtc2278, ide_ali14xx,
172 ide_qd65xx, ide_umc8672, ide_ht6560b, 172 ide_qd65xx, ide_umc8672, ide_ht6560b,
173 ide_trm290, ide_cy82c693, ide_4drives, 173 ide_cy82c693, ide_4drives,
174 ide_pmac, ide_acorn, 174 ide_pmac, ide_acorn,
175 ide_au1xxx, ide_palm3710 175 ide_au1xxx, ide_palm3710
176}; 176};
@@ -1372,6 +1372,8 @@ enum {
1372 IDE_HFLAG_LEGACY_IRQS = (1 << 21), 1372 IDE_HFLAG_LEGACY_IRQS = (1 << 21),
1373 /* force use of legacy IRQs */ 1373 /* force use of legacy IRQs */
1374 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), 1374 IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22),
1375 /* host is TRM290 */
1376 IDE_HFLAG_TRM290 = (1 << 23),
1375 /* use 32-bit I/O ops */ 1377 /* use 32-bit I/O ops */
1376 IDE_HFLAG_IO_32BIT = (1 << 24), 1378 IDE_HFLAG_IO_32BIT = (1 << 24),
1377 /* unmask IRQs */ 1379 /* unmask IRQs */