Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71342
b: refs/heads/master
c: 5f8b6c3
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 18, 2007
1 parent 39c1e24 commit a4079c6
Show file tree
Hide file tree
Showing 33 changed files with 186 additions and 178 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9adf768a398745c539623210502b521e671c59d7
refs/heads/master: 5f8b6c34854a966fe5eb7241fde0419d47d5d408
18 changes: 10 additions & 8 deletions trunk/drivers/ide/pci/aec62xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
if (hwif->dma_base == 0)
return;

hwif->ultra_mask = hwif->cds->udma_mask;
hwif->mwdma_mask = 0x07;

hwif->dma_lost_irq = &aec62xx_dma_lost_irq;

if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) {
Expand Down Expand Up @@ -247,7 +244,8 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
.pio_mask = ATA_PIO4,
.udma_mask = 0x07, /* udma0-2 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA2,
},{ /* 1 */
.name = "AEC6260",
.init_setup = init_setup_aec62xx,
Expand All @@ -256,7 +254,8 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_NO_AUTODMA |
IDE_HFLAG_OFF_BOARD,
.pio_mask = ATA_PIO4,
.udma_mask = 0x1f, /* udma0-4 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA4,
},{ /* 2 */
.name = "AEC6260R",
.init_setup = init_setup_aec62xx,
Expand All @@ -265,15 +264,17 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.host_flags = IDE_HFLAG_NO_ATAPI_DMA,
.pio_mask = ATA_PIO4,
.udma_mask = 0x1f, /* udma0-4 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA4,
},{ /* 3 */
.name = "AEC6280",
.init_setup = init_setup_aec6x80,
.init_chipset = init_chipset_aec62xx,
.init_hwif = init_hwif_aec62xx,
.host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
.pio_mask = ATA_PIO4,
.udma_mask = 0x3f, /* udma0-5 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA5,
},{ /* 4 */
.name = "AEC6280R",
.init_setup = init_setup_aec6x80,
Expand All @@ -282,7 +283,8 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
.enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}},
.host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD,
.pio_mask = ATA_PIO4,
.udma_mask = 0x3f, /* udma0-5 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA5,
}
};

Expand Down
13 changes: 6 additions & 7 deletions trunk/drivers/ide/pci/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,16 +684,13 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
if (m5229_revision <= 0x20)
hwif->ultra_mask = 0x00; /* no udma */
else if (m5229_revision < 0xC2)
hwif->ultra_mask = 0x07; /* udma0-2 */
hwif->ultra_mask = ATA_UDMA2;
else if (m5229_revision == 0xC2 || m5229_revision == 0xC3)
hwif->ultra_mask = 0x1f; /* udma0-4 */
hwif->ultra_mask = ATA_UDMA4;
else if (m5229_revision == 0xC4)
hwif->ultra_mask = 0x3f; /* udma0-5 */
hwif->ultra_mask = ATA_UDMA5;
else
hwif->ultra_mask = 0x7f; /* udma0-6 */

hwif->mwdma_mask = 0x07;
hwif->swdma_mask = 0x07;
hwif->ultra_mask = ATA_UDMA6;

hwif->dma_setup = &ali15x3_dma_setup;

Expand Down Expand Up @@ -779,6 +776,8 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = {
.init_dma = init_dma_ali15x3,
.host_flags = IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
.swdma_mask = ATA_SWDMA2,
.mwdma_mask = ATA_MWDMA2,
};

/**
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/ide/pci/amd74xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,8 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
return;

hwif->ultra_mask = amd_config->udma_mask;
hwif->mwdma_mask = 0x07;
if ((amd_config->flags & AMD_BAD_SWDMA) == 0)
hwif->swdma_mask = 0x07;
if (amd_config->flags & AMD_BAD_SWDMA)
hwif->swdma_mask = 0x00;

if (hwif->cbl != ATA_CBL_PATA40_SHORT) {
if ((amd_80w >> hwif->channel) & 1)
Expand All @@ -284,6 +283,8 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
IDE_HFLAG_POST_SET_MODE | \
IDE_HFLAG_BOOTABLE, \
.pio_mask = ATA_PIO5, \
.swdma_mask = ATA_SWDMA2, \
.mwdma_mask = ATA_MWDMA2, \
}

#define DECLARE_NV_DEV(name_str) \
Expand All @@ -297,6 +298,8 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
IDE_HFLAG_POST_SET_MODE | \
IDE_HFLAG_BOOTABLE, \
.pio_mask = ATA_PIO5, \
.swdma_mask = ATA_SWDMA2, \
.mwdma_mask = ATA_MWDMA2, \
}

static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/ide/pci/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
if (!hwif->dma_base)
return;

hwif->ultra_mask = 0x3f;
hwif->mwdma_mask = 0x07;

pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ch, &udma_mode);

if ((udma_mode & 0x07) >= 0x04 || (udma_mode & 0x70) >= 0x40)
Expand All @@ -205,12 +202,16 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
.enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
.host_flags = IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO4,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA5,
},{ /* 1 */
.name = "SB600_PATA",
.init_hwif = init_hwif_atiixp,
.enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO4,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA5,
},
};

Expand Down
13 changes: 7 additions & 6 deletions trunk/drivers/ide/pci/cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,6 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
if (!hwif->dma_base)
return;

hwif->mwdma_mask = 0x07;
hwif->ultra_mask = hwif->cds->udma_mask;

/*
* UltraDMA only supported on PCI646U and PCI646U2, which
* correspond to revisions 0x03, 0x05 and 0x07 respectively.
Expand Down Expand Up @@ -586,6 +583,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x00,0x00,0x00}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = 0x00, /* no udma */
},{ /* 1 */
.name = "CMD646",
Expand All @@ -595,7 +593,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
.udma_mask = 0x07, /* udma0-2 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA2,
},{ /* 2 */
.name = "CMD648",
.init_setup = init_setup_cmd64x,
Expand All @@ -604,7 +603,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
.udma_mask = 0x1f, /* udma0-4 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA4,
},{ /* 3 */
.name = "CMD649",
.init_setup = init_setup_cmd64x,
Expand All @@ -613,7 +613,8 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
.enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}},
.host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO5,
.udma_mask = 0x3f, /* udma0-5 */
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA5,
}
};

Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/ide/pci/cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
}

hwif->ide_dma_on = &cs5520_dma_on;

hwif->ultra_mask = 0;
hwif->swdma_mask = 0;
hwif->mwdma_mask = 0;
}

#define DECLARE_CS_DEV(name_str) \
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/ide/pci/cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
if (hwif->dma_base == 0)
return;

hwif->ultra_mask = 0x07;
hwif->mwdma_mask = 0x07;

hwif->udma_filter = cs5530_udma_filter;
}

Expand All @@ -276,6 +273,8 @@ static ide_pci_device_t cs5530_chipset __devinitdata = {
.init_hwif = init_hwif_cs5530,
.host_flags = IDE_HFLAG_POST_SET_MODE | IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO4,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA2,
};

static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/ide/pci/cs5535.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
if (hwif->dma_base == 0)
return;

hwif->ultra_mask = 0x1F;
hwif->mwdma_mask = 0x07;

hwif->cbl = cs5535_cable_detect(hwif->pci_dev);
}

Expand All @@ -197,6 +194,8 @@ static ide_pci_device_t cs5535_chipset __devinitdata = {
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE |
IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO4,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA4,
};

static int __devinit cs5535_init_one(struct pci_dev *dev,
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/ide/pci/cy82c693.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,6 @@ static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif)
return;
}

hwif->mwdma_mask = 0x04;
hwif->swdma_mask = 0x04;

hwif->ide_dma_on = &cy82c693_ide_dma_on;
}

Expand All @@ -463,6 +460,8 @@ static ide_pci_device_t cy82c693_chipset __devinitdata = {
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_TRUST_BIOS_FOR_DMA |
IDE_HFLAG_BOOTABLE,
.pio_mask = ATA_PIO4,
.swdma_mask = ATA_SWDMA2_ONLY,
.mwdma_mask = ATA_MWDMA2_ONLY,
};

static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_device_id *id)
Expand Down
19 changes: 12 additions & 7 deletions trunk/drivers/ide/pci/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif)
default:
break;
}

if (!(hwif->dma_base))
return;

hwif->ultra_mask = 0x7f;
hwif->mwdma_mask = 0x07;
hwif->swdma_mask = 0x07;
}

#define DECLARE_GENERIC_PCI_DEV(name_str, dma_setting) \
Expand All @@ -81,6 +74,9 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif)
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | \
dma_setting | \
IDE_HFLAG_BOOTABLE, \
.swdma_mask = ATA_SWDMA2, \
.mwdma_mask = ATA_MWDMA2, \
.udma_mask = ATA_UDMA6, \
}

static ide_pci_device_t generic_chipsets[] __devinitdata = {
Expand All @@ -92,6 +88,9 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA |
IDE_HFLAG_BOOTABLE,
.swdma_mask = ATA_SWDMA2,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA6,
},

/* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", 0),
Expand All @@ -108,6 +107,9 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.init_hwif = init_hwif_generic,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA |
IDE_HFLAG_OFF_BOARD,
.swdma_mask = ATA_SWDMA2,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA6,
},

/* 11 */ DECLARE_GENERIC_PCI_DEV("Piccolo0102", IDE_HFLAG_NO_AUTODMA),
Expand All @@ -119,6 +121,9 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
.init_hwif = init_hwif_generic,
.host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA |
IDE_HFLAG_OFF_BOARD,
.swdma_mask = ATA_SWDMA2,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA6,
}
};

Expand Down
55 changes: 26 additions & 29 deletions trunk/drivers/ide/pci/hpt34x.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,51 +125,48 @@ static unsigned int __devinit init_chipset_hpt34x(struct pci_dev *dev, const cha

static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
{
u16 pcicmd = 0;

hwif->set_pio_mode = &hpt34x_set_pio_mode;
hwif->set_dma_mode = &hpt34x_set_mode;

hwif->drives[0].autotune = 1;
hwif->drives[1].autotune = 1;
}

pci_read_config_word(hwif->pci_dev, PCI_COMMAND, &pcicmd);

if (!hwif->dma_base)
return;

static ide_pci_device_t hpt34x_chipsets[] __devinitdata = {
{ /* 0 */
.name = "HPT343",
.init_chipset = init_chipset_hpt34x,
.init_hwif = init_hwif_hpt34x,
.extra = 16,
.host_flags = IDE_HFLAG_NO_ATAPI_DMA |
IDE_HFLAG_NO_AUTODMA,
.pio_mask = ATA_PIO5,
},
{ /* 1 */
.name = "HPT345",
.init_chipset = init_chipset_hpt34x,
.init_hwif = init_hwif_hpt34x,
.extra = 16,
.host_flags = IDE_HFLAG_NO_ATAPI_DMA |
IDE_HFLAG_NO_AUTODMA |
IDE_HFLAG_OFF_BOARD,
.pio_mask = ATA_PIO5,
#ifdef CONFIG_HPT34X_AUTODMA
if ((pcicmd & PCI_COMMAND_MEMORY) == 0)
return;

hwif->ultra_mask = 0x07;
hwif->mwdma_mask = 0x07;
hwif->swdma_mask = 0x07;
.swdma_mask = ATA_SWDMA2,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA2,
#endif
}

static ide_pci_device_t hpt34x_chipset __devinitdata = {
.name = "HPT34X",
.init_chipset = init_chipset_hpt34x,
.init_hwif = init_hwif_hpt34x,
.extra = 16,
.host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_NO_AUTODMA,
.pio_mask = ATA_PIO5,
}
};

static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &hpt34x_chipset;
static char *chipset_names[] = {"HPT343", "HPT345"};
ide_pci_device_t *d;
u16 pcicmd = 0;

pci_read_config_word(dev, PCI_COMMAND, &pcicmd);

d->name = chipset_names[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];
if (pcicmd & PCI_COMMAND_MEMORY)
d->host_flags |= IDE_HFLAG_OFF_BOARD;
else
d->host_flags &= ~IDE_HFLAG_OFF_BOARD;
d = &hpt34x_chipsets[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];

return ide_setup_pci_device(dev, d);
}
Expand Down
Loading

0 comments on commit a4079c6

Please sign in to comment.