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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 6b492496
...@@ -98,10 +98,10 @@ int ide_build_dmatable(ide_drive_t *drive, struct request *rq) ...@@ -98,10 +98,10 @@ int ide_build_dmatable(ide_drive_t *drive, struct request *rq)
{ {
ide_hwif_t *hwif = drive->hwif; ide_hwif_t *hwif = drive->hwif;
__le32 *table = (__le32 *)hwif->dmatable_cpu; __le32 *table = (__le32 *)hwif->dmatable_cpu;
unsigned int is_trm290 = (hwif->chipset == ide_trm290) ? 1 : 0;
unsigned int count = 0; unsigned int count = 0;
int i; int i;
struct scatterlist *sg; struct scatterlist *sg;
u8 is_trm290 = !!(hwif->host_flags & IDE_HFLAG_TRM290);
hwif->sg_nents = ide_build_sglist(drive, rq); hwif->sg_nents = ide_build_sglist(drive, rq);
if (hwif->sg_nents == 0) if (hwif->sg_nents == 0)
......
...@@ -46,7 +46,6 @@ static int proc_ide_read_imodel ...@@ -46,7 +46,6 @@ static int proc_ide_read_imodel
case ide_qd65xx: name = "qd65xx"; break; case ide_qd65xx: name = "qd65xx"; break;
case ide_umc8672: name = "umc8672"; break; case ide_umc8672: name = "umc8672"; break;
case ide_ht6560b: name = "ht6560b"; break; case ide_ht6560b: name = "ht6560b"; break;
case ide_trm290: name = "trm290"; break;
case ide_cy82c693: name = "cy82c693"; break; case ide_cy82c693: name = "cy82c693"; break;
case ide_4drives: name = "4drives"; break; case ide_4drives: name = "4drives"; break;
case ide_pmac: name = "mac-io"; break; case ide_pmac: name = "mac-io"; break;
......
...@@ -328,10 +328,10 @@ static struct ide_dma_ops trm290_dma_ops = { ...@@ -328,10 +328,10 @@ static struct ide_dma_ops trm290_dma_ops = {
static const struct ide_port_info trm290_chipset __devinitdata = { static const struct ide_port_info trm290_chipset __devinitdata = {
.name = DRV_NAME, .name = DRV_NAME,
.init_hwif = init_hwif_trm290, .init_hwif = init_hwif_trm290,
.chipset = ide_trm290,
.port_ops = &trm290_port_ops, .port_ops = &trm290_port_ops,
.dma_ops = &trm290_dma_ops, .dma_ops = &trm290_dma_ops,
.host_flags = IDE_HFLAG_NO_ATAPI_DMA | .host_flags = IDE_HFLAG_TRM290 |
IDE_HFLAG_NO_ATAPI_DMA |
#if 0 /* play it safe for now */ #if 0 /* play it safe for now */
IDE_HFLAG_TRUST_BIOS_FOR_DMA | IDE_HFLAG_TRUST_BIOS_FOR_DMA |
#endif #endif
......
...@@ -170,7 +170,7 @@ typedef int (ide_ack_intr_t)(struct hwif_s *); ...@@ -170,7 +170,7 @@ typedef int (ide_ack_intr_t)(struct hwif_s *);
enum { ide_unknown, ide_generic, ide_pci, enum { ide_unknown, ide_generic, ide_pci,
ide_cmd640, ide_dtc2278, ide_ali14xx, ide_cmd640, ide_dtc2278, ide_ali14xx,
ide_qd65xx, ide_umc8672, ide_ht6560b, ide_qd65xx, ide_umc8672, ide_ht6560b,
ide_trm290, ide_cy82c693, ide_4drives, ide_cy82c693, ide_4drives,
ide_pmac, ide_acorn, ide_pmac, ide_acorn,
ide_au1xxx, ide_palm3710 ide_au1xxx, ide_palm3710
}; };
...@@ -1372,6 +1372,8 @@ enum { ...@@ -1372,6 +1372,8 @@ enum {
IDE_HFLAG_LEGACY_IRQS = (1 << 21), IDE_HFLAG_LEGACY_IRQS = (1 << 21),
/* force use of legacy IRQs */ /* force use of legacy IRQs */
IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22),
/* host is TRM290 */
IDE_HFLAG_TRM290 = (1 << 23),
/* use 32-bit I/O ops */ /* use 32-bit I/O ops */
IDE_HFLAG_IO_32BIT = (1 << 24), IDE_HFLAG_IO_32BIT = (1 << 24),
/* unmask IRQs */ /* unmask IRQs */
......
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