ide: replace ide_pci_device_t by struct ide_port_info

* Rename struct ide_pci_device_s to struct ide_port_info.

* Remove ide_pci_device_t typedef.

While at it:

* Fix __ide_pci_register_driver() comment.

* Fix aec62xx_init_one() comment.

* Remove unused 'cds' field from ide_hwgroup_t.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 6157332e
...@@ -194,7 +194,7 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) ...@@ -194,7 +194,7 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
} }
} }
static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { static struct ide_port_info aec62xx_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "AEC6210", .name = "AEC6210",
.init_chipset = init_chipset_aec62xx, .init_chipset = init_chipset_aec62xx,
...@@ -253,12 +253,12 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { ...@@ -253,12 +253,12 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
* finds a device matching our IDE device tables. * finds a device matching our IDE device tables.
* *
* NOTE: since we're going to modify the 'name' field for AEC-6[26]80[R] * NOTE: since we're going to modify the 'name' field for AEC-6[26]80[R]
* chips, pass a local copy of 'struct pci_device_id' down the call chain. * chips, pass a local copy of 'struct ide_port_info' down the call chain.
*/ */
static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t d; struct ide_port_info d;
u8 idx = id->driver_data; u8 idx = id->driver_data;
d = aec62xx_chipsets[idx]; d = aec62xx_chipsets[idx];
......
...@@ -746,7 +746,7 @@ static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase) ...@@ -746,7 +746,7 @@ static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma(hwif, dmabase, 8); ide_setup_dma(hwif, dmabase, 8);
} }
static ide_pci_device_t ali15x3_chipset __devinitdata = { static struct ide_port_info ali15x3_chipset __devinitdata = {
.name = "ALI15X3", .name = "ALI15X3",
.init_chipset = init_chipset_ali15x3, .init_chipset = init_chipset_ali15x3,
.init_hwif = init_hwif_ali15x3, .init_hwif = init_hwif_ali15x3,
...@@ -772,7 +772,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev ...@@ -772,7 +772,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
{ }, { },
}; };
ide_pci_device_t d = ali15x3_chipset; struct ide_port_info d = ali15x3_chipset;
u8 rev = dev->revision; u8 rev = dev->revision;
if (pci_dev_present(ati_rs100)) if (pci_dev_present(ati_rs100))
......
...@@ -77,7 +77,7 @@ static struct amd_ide_chip { ...@@ -77,7 +77,7 @@ static struct amd_ide_chip {
}; };
static struct amd_ide_chip *amd_config; static struct amd_ide_chip *amd_config;
static ide_pci_device_t *amd_chipset; static struct ide_port_info *amd_chipset;
static unsigned int amd_80w; static unsigned int amd_80w;
static unsigned int amd_clock; static unsigned int amd_clock;
...@@ -295,7 +295,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) ...@@ -295,7 +295,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
.mwdma_mask = ATA_MWDMA2, \ .mwdma_mask = ATA_MWDMA2, \
} }
static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { static struct ide_port_info amd74xx_chipsets[] __devinitdata = {
/* 0 */ DECLARE_AMD_DEV("AMD7401"), /* 0 */ DECLARE_AMD_DEV("AMD7401"),
/* 1 */ DECLARE_AMD_DEV("AMD7409"), /* 1 */ DECLARE_AMD_DEV("AMD7409"),
/* 2 */ DECLARE_AMD_DEV("AMD7411"), /* 2 */ DECLARE_AMD_DEV("AMD7411"),
......
...@@ -189,8 +189,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) ...@@ -189,8 +189,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
hwif->dma_host_off = &atiixp_dma_host_off; hwif->dma_host_off = &atiixp_dma_host_off;
} }
static struct ide_port_info atiixp_pci_info[] __devinitdata = {
static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "ATIIXP", .name = "ATIIXP",
.init_hwif = init_hwif_atiixp, .init_hwif = init_hwif_atiixp,
......
...@@ -548,7 +548,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif) ...@@ -548,7 +548,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
} }
} }
static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { static struct ide_port_info cmd64x_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "CMD643", .name = "CMD643",
.init_chipset = init_chipset_cmd64x, .init_chipset = init_chipset_cmd64x,
...@@ -591,7 +591,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { ...@@ -591,7 +591,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t d; struct ide_port_info d;
u8 idx = id->driver_data; u8 idx = id->driver_data;
d = cmd64x_chipsets[idx]; d = cmd64x_chipsets[idx];
......
...@@ -141,7 +141,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) ...@@ -141,7 +141,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
.pio_mask = ATA_PIO4, \ .pio_mask = ATA_PIO4, \
} }
static ide_pci_device_t cyrix_chipsets[] __devinitdata = { static struct ide_port_info cyrix_chipsets[] __devinitdata = {
/* 0 */ DECLARE_CS_DEV("Cyrix 5510"), /* 0 */ DECLARE_CS_DEV("Cyrix 5510"),
/* 1 */ DECLARE_CS_DEV("Cyrix 5520") /* 1 */ DECLARE_CS_DEV("Cyrix 5520")
}; };
...@@ -154,7 +154,7 @@ static ide_pci_device_t cyrix_chipsets[] __devinitdata = { ...@@ -154,7 +154,7 @@ static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &cyrix_chipsets[id->driver_data]; struct ide_port_info *d = &cyrix_chipsets[id->driver_data];
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
ide_setup_pci_noise(dev, d); ide_setup_pci_noise(dev, d);
......
...@@ -261,7 +261,7 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) ...@@ -261,7 +261,7 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
hwif->udma_filter = cs5530_udma_filter; hwif->udma_filter = cs5530_udma_filter;
} }
static ide_pci_device_t cs5530_chipset __devinitdata = { static struct ide_port_info cs5530_chipset __devinitdata = {
.name = "CS5530", .name = "CS5530",
.init_chipset = init_chipset_cs5530, .init_chipset = init_chipset_cs5530,
.init_hwif = init_hwif_cs5530, .init_hwif = init_hwif_cs5530,
......
...@@ -186,7 +186,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) ...@@ -186,7 +186,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
hwif->cbl = cs5535_cable_detect(hwif->pci_dev); hwif->cbl = cs5535_cable_detect(hwif->pci_dev);
} }
static ide_pci_device_t cs5535_chipset __devinitdata = { static struct ide_port_info cs5535_chipset __devinitdata = {
.name = "CS5535", .name = "CS5535",
.init_hwif = init_hwif_cs5535, .init_hwif = init_hwif_cs5535,
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE |
......
...@@ -448,7 +448,7 @@ static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) ...@@ -448,7 +448,7 @@ static void __devinit init_iops_cy82c693(ide_hwif_t *hwif)
} }
} }
static ide_pci_device_t cy82c693_chipset __devinitdata = { static struct ide_port_info cy82c693_chipset __devinitdata = {
.name = "CY82C693", .name = "CY82C693",
.init_chipset = init_chipset_cy82c693, .init_chipset = init_chipset_cy82c693,
.init_iops = init_iops_cy82c693, .init_iops = init_iops_cy82c693,
......
...@@ -67,7 +67,7 @@ MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE st ...@@ -67,7 +67,7 @@ MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE st
.udma_mask = ATA_UDMA6, \ .udma_mask = ATA_UDMA6, \
} }
static ide_pci_device_t generic_chipsets[] __devinitdata = { static struct ide_port_info generic_chipsets[] __devinitdata = {
/* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", 0), /* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", 0),
{ /* 1 */ { /* 1 */
...@@ -123,7 +123,7 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { ...@@ -123,7 +123,7 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &generic_chipsets[id->driver_data]; struct ide_port_info *d = &generic_chipsets[id->driver_data];
int ret = -ENODEV; int ret = -ENODEV;
/* Don't use the generic entry unless instructed to do so */ /* Don't use the generic entry unless instructed to do so */
......
...@@ -129,7 +129,7 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif) ...@@ -129,7 +129,7 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
hwif->set_dma_mode = &hpt34x_set_mode; hwif->set_dma_mode = &hpt34x_set_mode;
} }
static ide_pci_device_t hpt34x_chipsets[] __devinitdata = { static struct ide_port_info hpt34x_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "HPT343", .name = "HPT343",
.init_chipset = init_chipset_hpt34x, .init_chipset = init_chipset_hpt34x,
...@@ -158,7 +158,7 @@ static ide_pci_device_t hpt34x_chipsets[] __devinitdata = { ...@@ -158,7 +158,7 @@ static ide_pci_device_t hpt34x_chipsets[] __devinitdata = {
static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d; struct ide_port_info *d;
u16 pcicmd = 0; u16 pcicmd = 0;
pci_read_config_word(dev, PCI_COMMAND, &pcicmd); pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
......
...@@ -1425,7 +1425,7 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2) ...@@ -1425,7 +1425,7 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
return 0; return 0;
} }
static ide_pci_device_t hpt366_chipsets[] __devinitdata = { static struct ide_port_info hpt366_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "HPT36x", .name = "HPT36x",
.init_chipset = init_chipset_hpt366, .init_chipset = init_chipset_hpt366,
...@@ -1510,7 +1510,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic ...@@ -1510,7 +1510,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
{ {
struct hpt_info *info = NULL; struct hpt_info *info = NULL;
struct pci_dev *dev2 = NULL; struct pci_dev *dev2 = NULL;
ide_pci_device_t d; struct ide_port_info d;
u8 idx = id->driver_data; u8 idx = id->driver_data;
u8 rev = dev->revision; u8 rev = dev->revision;
......
...@@ -193,7 +193,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif) ...@@ -193,7 +193,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
.udma_mask = ATA_UDMA6, \ .udma_mask = ATA_UDMA6, \
} }
static ide_pci_device_t it8213_chipsets[] __devinitdata = { static struct ide_port_info it8213_chipsets[] __devinitdata = {
/* 0 */ DECLARE_ITE_DEV("IT8213"), /* 0 */ DECLARE_ITE_DEV("IT8213"),
}; };
......
...@@ -638,7 +638,7 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha ...@@ -638,7 +638,7 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
.pio_mask = ATA_PIO4, \ .pio_mask = ATA_PIO4, \
} }
static ide_pci_device_t it821x_chipsets[] __devinitdata = { static struct ide_port_info it821x_chipsets[] __devinitdata = {
/* 0 */ DECLARE_ITE_DEV("IT8212"), /* 0 */ DECLARE_ITE_DEV("IT8212"),
}; };
......
...@@ -118,7 +118,7 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif) ...@@ -118,7 +118,7 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif)
hwif->cbl = ata66_jmicron(hwif); hwif->cbl = ata66_jmicron(hwif);
} }
static ide_pci_device_t jmicron_chipset __devinitdata = { static struct ide_port_info jmicron_chipset __devinitdata = {
.name = "JMB", .name = "JMB",
.init_hwif = init_hwif_jmicron, .init_hwif = init_hwif_jmicron,
.host_flags = IDE_HFLAG_BOOTABLE, .host_flags = IDE_HFLAG_BOOTABLE,
......
...@@ -260,7 +260,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) ...@@ -260,7 +260,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
hwif->ide_dma_end = &ns87415_ide_dma_end; hwif->ide_dma_end = &ns87415_ide_dma_end;
} }
static ide_pci_device_t ns87415_chipset __devinitdata = { static struct ide_port_info ns87415_chipset __devinitdata = {
.name = "NS87415", .name = "NS87415",
#ifdef CONFIG_SUPERIO #ifdef CONFIG_SUPERIO
.init_iops = init_iops_ns87415, .init_iops = init_iops_ns87415,
......
...@@ -331,7 +331,7 @@ static void __devinit init_hwif_opti621 (ide_hwif_t *hwif) ...@@ -331,7 +331,7 @@ static void __devinit init_hwif_opti621 (ide_hwif_t *hwif)
hwif->set_pio_mode = &opti621_set_pio_mode; hwif->set_pio_mode = &opti621_set_pio_mode;
} }
static ide_pci_device_t opti621_chipsets[] __devinitdata = { static struct ide_port_info opti621_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "OPTI621", .name = "OPTI621",
.init_hwif = init_hwif_opti621, .init_hwif = init_hwif_opti621,
......
...@@ -513,7 +513,7 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev) ...@@ -513,7 +513,7 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
.udma_mask = udma, \ .udma_mask = udma, \
} }
static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { static struct ide_port_info pdcnew_chipsets[] __devinitdata = {
/* 0 */ DECLARE_PDCNEW_DEV("PDC20268", ATA_UDMA5), /* 0 */ DECLARE_PDCNEW_DEV("PDC20268", ATA_UDMA5),
/* 1 */ DECLARE_PDCNEW_DEV("PDC20269", ATA_UDMA6), /* 1 */ DECLARE_PDCNEW_DEV("PDC20269", ATA_UDMA6),
/* 2 */ DECLARE_PDCNEW_DEV("PDC20270", ATA_UDMA5), /* 2 */ DECLARE_PDCNEW_DEV("PDC20270", ATA_UDMA5),
...@@ -534,7 +534,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { ...@@ -534,7 +534,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d; struct ide_port_info *d;
struct pci_dev *bridge = dev->bus->self; struct pci_dev *bridge = dev->bus->self;
u8 idx = id->driver_data; u8 idx = id->driver_data;
......
...@@ -390,7 +390,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev, ...@@ -390,7 +390,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
.udma_mask = udma, \ .udma_mask = udma, \
} }
static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { static struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "PDC20246", .name = "PDC20246",
.init_chipset = init_chipset_pdc202xx, .init_chipset = init_chipset_pdc202xx,
...@@ -421,7 +421,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { ...@@ -421,7 +421,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d; struct ide_port_info *d;
u8 idx = id->driver_data; u8 idx = id->driver_data;
d = &pdc202xx_chipsets[idx]; d = &pdc202xx_chipsets[idx];
......
...@@ -396,7 +396,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif) ...@@ -396,7 +396,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
.udma_mask = udma, \ .udma_mask = udma, \
} }
static ide_pci_device_t piix_pci_info[] __devinitdata = { static struct ide_port_info piix_pci_info[] __devinitdata = {
/* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */ /* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */
/* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */ /* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */
...@@ -449,9 +449,7 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = { ...@@ -449,9 +449,7 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &piix_pci_info[id->driver_data]; return ide_setup_pci_device(dev, &piix_pci_info[id->driver_data]);
return ide_setup_pci_device(dev, d);
} }
/** /**
......
...@@ -49,7 +49,7 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) ...@@ -49,7 +49,7 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
} }
} }
static ide_pci_device_t rz1000_chipset __devinitdata = { static struct ide_port_info rz1000_chipset __devinitdata = {
.name = "RZ100x", .name = "RZ100x",
.init_hwif = init_hwif_rz1000, .init_hwif = init_hwif_rz1000,
.chipset = ide_rz1000, .chipset = ide_rz1000,
......
...@@ -372,7 +372,7 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) ...@@ -372,7 +372,7 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
hwif->ide_dma_end = &sc1200_ide_dma_end; hwif->ide_dma_end = &sc1200_ide_dma_end;
} }
static ide_pci_device_t sc1200_chipset __devinitdata = { static struct ide_port_info sc1200_chipset __devinitdata = {
.name = "SC1200", .name = "SC1200",
.init_hwif = init_hwif_sc1200, .init_hwif = init_hwif_sc1200,
.host_flags = IDE_HFLAG_SERIALIZE | .host_flags = IDE_HFLAG_SERIALIZE |
......
...@@ -538,12 +538,13 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name) ...@@ -538,12 +538,13 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name)
/** /**
* init_setup_scc - set up an SCC PATA Controller * init_setup_scc - set up an SCC PATA Controller
* @dev: PCI device * @dev: PCI device
* @d: IDE PCI device * @d: IDE port info
* *
* Perform the initial set up for this device. * Perform the initial set up for this device.
*/ */
static int __devinit init_setup_scc(struct pci_dev *dev, ide_pci_device_t *d) static int __devinit init_setup_scc(struct pci_dev *dev,
struct ide_port_info *d)
{ {
unsigned long ctl_base; unsigned long ctl_base;
unsigned long dma_base; unsigned long dma_base;
...@@ -702,7 +703,7 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif) ...@@ -702,7 +703,7 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
.pio_mask = ATA_PIO4, \ .pio_mask = ATA_PIO4, \
} }
static ide_pci_device_t scc_chipsets[] __devinitdata = { static struct ide_port_info scc_chipsets[] __devinitdata = {
/* 0 */ DECLARE_SCC_DEV("sccIDE"), /* 0 */ DECLARE_SCC_DEV("sccIDE"),
}; };
...@@ -717,9 +718,7 @@ static ide_pci_device_t scc_chipsets[] __devinitdata = { ...@@ -717,9 +718,7 @@ static ide_pci_device_t scc_chipsets[] __devinitdata = {
static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t *d = &scc_chipsets[id->driver_data]; return init_setup_scc(dev, &scc_chipsets[id->driver_data]);
return init_setup_scc(dev, d);
} }
/** /**
......
...@@ -366,7 +366,7 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) ...@@ -366,7 +366,7 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
} }
} }
static ide_pci_device_t serverworks_chipsets[] __devinitdata = { static struct ide_port_info serverworks_chipsets[] __devinitdata = {
{ /* 0 */ { /* 0 */
.name = "SvrWks OSB4", .name = "SvrWks OSB4",
.init_chipset = init_chipset_svwks, .init_chipset = init_chipset_svwks,
...@@ -423,7 +423,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { ...@@ -423,7 +423,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = {
static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{ {
ide_pci_device_t d; struct ide_port_info d;
u8 idx = id->driver_data; u8 idx = id->driver_data;
d = serverworks_chipsets[idx]; d = serverworks_chipsets[idx];
......
...@@ -905,7 +905,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) ...@@ -905,7 +905,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
.udma_mask = ATA_UDMA6, \ .udma_mask = ATA_UDMA6, \
} }
static ide_pci_device_t siimage_chipsets[] __devinitdata = { static struct ide_port_info siimage_chipsets[] __devinitdata = {
/* 0 */ DECLARE_SII_DEV("SiI680"), /* 0 */ DECLARE_SII_DEV("SiI680"),
/* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA"), /* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA"),
/* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA") /* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA")
......
...@@ -579,7 +579,7 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) ...@@ -579,7 +579,7 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif)
hwif->cbl = ata66_sis5513(hwif); hwif->cbl = ata66_sis5513(hwif);
} }
static ide_pci_device_t sis5513_chipset __devinitdata = { static struct ide_port_info sis5513_chipset __devinitdata = {
.name = "SIS5513", .name = "SIS5513",
.init_chipset = init_chipset_sis5513, .init_chipset = init_chipset_sis5513,
.init_hwif = init_hwif_sis5513, .init_hwif = init_hwif_sis5513,
......
...@@ -387,7 +387,7 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) ...@@ -387,7 +387,7 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
hwif->serialized = hwif->mate->serialized = 1; hwif->serialized = hwif->mate->serialized = 1;
} }
static ide_pci_device_t sl82c105_chipset __devinitdata = { static struct ide_port_info sl82c105_chipset __devinitdata = {
.name = "W82C105", .name = "W82C105",
.init_chipset = init_chipset_sl82c105, .init_chipset = init_chipset_sl82c105,
.init_hwif = init_hwif_sl82c105, .init_hwif = init_hwif_sl82c105,
......
...@@ -146,7 +146,7 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) ...@@ -146,7 +146,7 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
} }
static ide_pci_device_t slc90e66_chipset __devinitdata = { static struct ide_port_info slc90e66_chipset __devinitdata = {
.name = "SLC90E66", .name = "SLC90E66",
.init_hwif = init_hwif_slc90e66, .init_hwif = init_hwif_slc90e66,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
......
...@@ -218,7 +218,7 @@ static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev, ...@@ -218,7 +218,7 @@ static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev,
return err; return err;
} }
static ide_pci_device_t tc86c001_chipset __devinitdata = { static struct ide_port_info tc86c001_chipset __devinitdata = {
.name = "TC86C001", .name = "TC86C001",
.init_chipset = init_chipset_tc86c001, .init_chipset = init_chipset_tc86c001,
.init_hwif = init_hwif_tc86c001, .init_hwif = init_hwif_tc86c001,
......
...@@ -102,7 +102,7 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif) ...@@ -102,7 +102,7 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
hwif->set_dma_mode = &triflex_set_mode; hwif->set_dma_mode = &triflex_set_mode;
} }
static ide_pci_device_t triflex_device __devinitdata = { static struct ide_port_info triflex_device __devinitdata = {
.name = "TRIFLEX", .name = "TRIFLEX",
.init_hwif = init_hwif_triflex, .init_hwif = init_hwif_triflex,
.enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
......
...@@ -319,7 +319,7 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) ...@@ -319,7 +319,7 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
#endif #endif
} }
static ide_pci_device_t trm290_chipset __devinitdata = { static struct ide_port_info trm290_chipset __devinitdata = {
.name = "TRM290", .name = "TRM290",
.init_hwif = init_hwif_trm290, .init_hwif = init_hwif_trm290,
.chipset = ide_trm290, .chipset = ide_trm290,
......
...@@ -432,7 +432,7 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) ...@@ -432,7 +432,7 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
hwif->cbl = via82cxxx_cable_detect(hwif); hwif->cbl = via82cxxx_cable_detect(hwif);
} }
static ide_pci_device_t via82cxxx_chipset __devinitdata = { static struct ide_port_info via82cxxx_chipset __devinitdata = {
.name = "VP_IDE", .name = "VP_IDE",
.init_chipset = init_chipset_via82cxxx, .init_chipset = init_chipset_via82cxxx,
.init_hwif = init_hwif_via82cxxx, .init_hwif = init_hwif_via82cxxx,
...@@ -452,7 +452,7 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i ...@@ -452,7 +452,7 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
struct pci_dev *isa = NULL; struct pci_dev *isa = NULL;
struct via_isa_bridge *via_config; struct via_isa_bridge *via_config;
u8 idx = id->driver_data; u8 idx = id->driver_data;
ide_pci_device_t d; struct ide_port_info d;
d = via82cxxx_chipset; d = via82cxxx_chipset;
......
...@@ -147,15 +147,15 @@ static int ide_setup_pci_baseregs (struct pci_dev *dev, const char *name) ...@@ -147,15 +147,15 @@ static int ide_setup_pci_baseregs (struct pci_dev *dev, const char *name)
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/** /**
* ide_get_or_set_dma_base - setup BMIBA * ide_get_or_set_dma_base - setup BMIBA
* @d: IDE pci device data * @d: IDE port info
* @hwif: Interface * @hwif: IDE interface
* *
* Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space. * Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space.
* Where a device has a partner that is already in DMA mode we check * Where a device has a partner that is already in DMA mode we check
* and enforce IDE simplex rules. * and enforce IDE simplex rules.
*/ */
static unsigned long ide_get_or_set_dma_base(ide_pci_device_t *d, ide_hwif_t *hwif) static unsigned long ide_get_or_set_dma_base(struct ide_port_info *d, ide_hwif_t *hwif)
{ {
unsigned long dma_base = 0; unsigned long dma_base = 0;
struct pci_dev *dev = hwif->pci_dev; struct pci_dev *dev = hwif->pci_dev;
...@@ -225,7 +225,7 @@ static unsigned long ide_get_or_set_dma_base(ide_pci_device_t *d, ide_hwif_t *hw ...@@ -225,7 +225,7 @@ static unsigned long ide_get_or_set_dma_base(ide_pci_device_t *d, ide_hwif_t *hw
} }
#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
void ide_setup_pci_noise (struct pci_dev *dev, ide_pci_device_t *d) void ide_setup_pci_noise(struct pci_dev *dev, struct ide_port_info *d)
{ {
printk(KERN_INFO "%s: IDE controller at PCI slot %s\n", printk(KERN_INFO "%s: IDE controller at PCI slot %s\n",
d->name, pci_name(dev)); d->name, pci_name(dev));
...@@ -237,15 +237,15 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise); ...@@ -237,15 +237,15 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
/** /**
* ide_pci_enable - do PCI enables * ide_pci_enable - do PCI enables
* @dev: PCI device * @dev: PCI device
* @d: IDE pci device data * @d: IDE port info
* *
* Enable the IDE PCI device. We attempt to enable the device in full * Enable the IDE PCI device. We attempt to enable the device in full
* but if that fails then we only need BAR4 so we will enable that. * but if that fails then we only need BAR4 so we will enable that.
* *
* Returns zero on success or an error code * Returns zero on success or an error code
*/ */
static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d) static int ide_pci_enable(struct pci_dev *dev, struct ide_port_info *d)
{ {
int ret; int ret;
...@@ -260,9 +260,9 @@ static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d) ...@@ -260,9 +260,9 @@ static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d)
} }
/* /*
* assume all devices can do 32-bit dma for now. we can add a * assume all devices can do 32-bit DMA for now, we can add
* dma mask field to the ide_pci_device_t if we need it (or let * a DMA mask field to the struct ide_port_info if we need it
* lower level driver set the dma mask) * (or let lower level driver set the DMA mask)
*/ */
ret = pci_set_dma_mask(dev, DMA_32BIT_MASK); ret = pci_set_dma_mask(dev, DMA_32BIT_MASK);
if (ret < 0) { if (ret < 0) {
...@@ -284,13 +284,13 @@ static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d) ...@@ -284,13 +284,13 @@ static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d)
/** /**
* ide_pci_configure - configure an unconfigured device * ide_pci_configure - configure an unconfigured device
* @dev: PCI device * @dev: PCI device
* @d: IDE pci device data * @d: IDE port info
* *
* Enable and configure the PCI device we have been passed. * Enable and configure the PCI device we have been passed.
* Returns zero on success or an error code. * Returns zero on success or an error code.
*/ */
static int ide_pci_configure(struct pci_dev *dev, ide_pci_device_t *d) static int ide_pci_configure(struct pci_dev *dev, struct ide_port_info *d)
{ {
u16 pcicmd = 0; u16 pcicmd = 0;
/* /*
...@@ -318,15 +318,15 @@ static int ide_pci_configure(struct pci_dev *dev, ide_pci_device_t *d) ...@@ -318,15 +318,15 @@ static int ide_pci_configure(struct pci_dev *dev, ide_pci_device_t *d)
/** /**
* ide_pci_check_iomem - check a register is I/O * ide_pci_check_iomem - check a register is I/O
* @dev: pci device * @dev: PCI device
* @d: ide_pci_device * @d: IDE port info
* @bar: bar number * @bar: BAR number
* *
* Checks if a BAR is configured and points to MMIO space. If so * Checks if a BAR is configured and points to MMIO space. If so
* print an error and return an error code. Otherwise return 0 * print an error and return an error code. Otherwise return 0
*/ */
static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar) static int ide_pci_check_iomem(struct pci_dev *dev, struct ide_port_info *d, int bar)
{ {
ulong flags = pci_resource_flags(dev, bar); ulong flags = pci_resource_flags(dev, bar);
...@@ -348,7 +348,7 @@ static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar ...@@ -348,7 +348,7 @@ static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar
/** /**
* ide_hwif_configure - configure an IDE interface * ide_hwif_configure - configure an IDE interface
* @dev: PCI device holding interface * @dev: PCI device holding interface
* @d: IDE pci data * @d: IDE port info
* @mate: Paired interface if any * @mate: Paired interface if any
* *
* Perform the initial set up for the hardware interface structure. This * Perform the initial set up for the hardware interface structure. This
...@@ -357,8 +357,8 @@ static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar ...@@ -357,8 +357,8 @@ static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar
* *
* Returns the new hardware interface structure, or NULL on a failure * Returns the new hardware interface structure, or NULL on a failure
*/ */
static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *mate, int port, int irq) static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, struct ide_port_info *d, ide_hwif_t *mate, int port, int irq)
{ {
unsigned long ctl = 0, base = 0; unsigned long ctl = 0, base = 0;
ide_hwif_t *hwif; ide_hwif_t *hwif;
...@@ -400,7 +400,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, ...@@ -400,7 +400,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
} }
hwif->chipset = d->chipset ? d->chipset : ide_pci; hwif->chipset = d->chipset ? d->chipset : ide_pci;
hwif->pci_dev = dev; hwif->pci_dev = dev;
hwif->cds = (struct ide_pci_device_s *) d; hwif->cds = d;
hwif->channel = port; hwif->channel = port;
if (!hwif->irq) if (!hwif->irq)
...@@ -415,21 +415,17 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, ...@@ -415,21 +415,17 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
/** /**
* ide_hwif_setup_dma - configure DMA interface * ide_hwif_setup_dma - configure DMA interface
* @dev: PCI device * @dev: PCI device
* @d: IDE pci data * @d: IDE port info
* @hwif: Hardware interface we are configuring * @hwif: IDE interface
* *
* Set up the DMA base for the interface. Enable the master bits as * Set up the DMA base for the interface. Enable the master bits as
* necessary and attempt to bring the device DMA into a ready to use * necessary and attempt to bring the device DMA into a ready to use
* state * state
*/ */
#ifndef CONFIG_BLK_DEV_IDEDMA_PCI static void ide_hwif_setup_dma(struct pci_dev *dev, struct ide_port_info *d, ide_hwif_t *hwif)
static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
{
}
#else
static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
{ {
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
u16 pcicmd; u16 pcicmd;
pci_read_config_word(dev, PCI_COMMAND, &pcicmd); pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
...@@ -461,13 +457,13 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi ...@@ -461,13 +457,13 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
"(BIOS)\n", hwif->name, d->name); "(BIOS)\n", hwif->name, d->name);
} }
} }
}
#endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/ #endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/
}
/** /**
* ide_setup_pci_controller - set up IDE PCI * ide_setup_pci_controller - set up IDE PCI
* @dev: PCI device * @dev: PCI device
* @d: IDE PCI data * @d: IDE port info
* @noisy: verbose flag * @noisy: verbose flag
* @config: returned as 1 if we configured the hardware * @config: returned as 1 if we configured the hardware
* *
...@@ -475,8 +471,8 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi ...@@ -475,8 +471,8 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
* up the PCI side of the device, checks that the device is enabled * up the PCI side of the device, checks that the device is enabled
* and enables it if need be * and enables it if need be
*/ */
static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, int noisy, int *config) static int ide_setup_pci_controller(struct pci_dev *dev, struct ide_port_info *d, int noisy, int *config)
{ {
int ret; int ret;
u16 pcicmd; u16 pcicmd;
...@@ -511,7 +507,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in ...@@ -511,7 +507,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in
/** /**
* ide_pci_setup_ports - configure ports/devices on PCI IDE * ide_pci_setup_ports - configure ports/devices on PCI IDE
* @dev: PCI device * @dev: PCI device
* @d: IDE pci device info * @d: IDE port info
* @pciirq: IRQ line * @pciirq: IRQ line
* @idx: ATA index table to update * @idx: ATA index table to update
* *
...@@ -524,7 +520,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in ...@@ -524,7 +520,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in
* where the chipset setup is not the default PCI IDE one. * where the chipset setup is not the default PCI IDE one.
*/ */
void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, u8 *idx) void ide_pci_setup_ports(struct pci_dev *dev, struct ide_port_info *d, int pciirq, u8 *idx)
{ {
int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port; int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
ide_hwif_t *hwif, *mate = NULL; ide_hwif_t *hwif, *mate = NULL;
...@@ -611,10 +607,11 @@ EXPORT_SYMBOL_GPL(ide_pci_setup_ports); ...@@ -611,10 +607,11 @@ EXPORT_SYMBOL_GPL(ide_pci_setup_ports);
* *
* One thing that is not standardized is the location of the * One thing that is not standardized is the location of the
* primary/secondary interface "enable/disable" bits. For chipsets that * primary/secondary interface "enable/disable" bits. For chipsets that
* we "know" about, this information is in the ide_pci_device_t struct; * we "know" about, this information is in the struct ide_port_info;
* for all other chipsets, we just assume both interfaces are enabled. * for all other chipsets, we just assume both interfaces are enabled.
*/ */
static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d, static int do_ide_setup_pci_device(struct pci_dev *dev,
struct ide_port_info *d,
u8 *idx, u8 noisy) u8 *idx, u8 noisy)
{ {
int tried_config = 0; int tried_config = 0;
...@@ -671,7 +668,7 @@ static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d, ...@@ -671,7 +668,7 @@ static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d,
return ret; return ret;
} }
int ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d) int ide_setup_pci_device(struct pci_dev *dev, struct ide_port_info *d)
{ {
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
int ret; int ret;
...@@ -687,7 +684,7 @@ int ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d) ...@@ -687,7 +684,7 @@ int ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d)
EXPORT_SYMBOL_GPL(ide_setup_pci_device); EXPORT_SYMBOL_GPL(ide_setup_pci_device);
int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2, int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
ide_pci_device_t *d) struct ide_port_info *d)
{ {
struct pci_dev *pdev[] = { dev1, dev2 }; struct pci_dev *pdev[] = { dev1, dev2 };
int ret, i; int ret, i;
...@@ -728,9 +725,6 @@ static LIST_HEAD(ide_pci_drivers); ...@@ -728,9 +725,6 @@ static LIST_HEAD(ide_pci_drivers);
* hands the controllers off to the core PCI code to do the rest of * hands the controllers off to the core PCI code to do the rest of
* the work. * the work.
* *
* The driver_data of the driver table must point to an ide_pci_device_t
* describing the interface.
*
* Returns are the same as for pci_register_driver * Returns are the same as for pci_register_driver
*/ */
......
...@@ -644,7 +644,7 @@ typedef struct ide_drive_s { ...@@ -644,7 +644,7 @@ typedef struct ide_drive_s {
((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx))
#define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1)
struct ide_pci_device_s; struct ide_port_info;
typedef struct hwif_s { typedef struct hwif_s {
struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ struct hwif_s *next; /* for linked-list in ide_hwgroup_t */
...@@ -680,7 +680,7 @@ typedef struct hwif_s { ...@@ -680,7 +680,7 @@ typedef struct hwif_s {
hwif_chipset_t chipset; /* sub-module for tuning.. */ hwif_chipset_t chipset; /* sub-module for tuning.. */
struct pci_dev *pci_dev; /* for pci chipsets */ struct pci_dev *pci_dev; /* for pci chipsets */
struct ide_pci_device_s *cds; /* chipset device struct */ struct ide_port_info *cds; /* chipset device struct */
ide_ack_intr_t *ack_intr; ide_ack_intr_t *ack_intr;
...@@ -831,8 +831,6 @@ typedef struct hwgroup_s { ...@@ -831,8 +831,6 @@ typedef struct hwgroup_s {
/* for pci chipsets */ /* for pci chipsets */
struct pci_dev *pci_dev; struct pci_dev *pci_dev;
/* chipset device struct */
struct ide_pci_device_s *cds;
/* current request */ /* current request */
struct request *rq; struct request *rq;
...@@ -1152,8 +1150,8 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o ...@@ -1152,8 +1150,8 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o
#define ide_pci_register_driver(d) pci_register_driver(d) #define ide_pci_register_driver(d) pci_register_driver(d)
#endif #endif
void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, u8 *); void ide_pci_setup_ports(struct pci_dev *, struct ide_port_info *, int, u8 *);
extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); void ide_setup_pci_noise(struct pci_dev *, struct ide_port_info *);
extern void default_hwif_iops(ide_hwif_t *); extern void default_hwif_iops(ide_hwif_t *);
extern void default_hwif_mmiops(ide_hwif_t *); extern void default_hwif_mmiops(ide_hwif_t *);
...@@ -1229,7 +1227,7 @@ enum { ...@@ -1229,7 +1227,7 @@ enum {
# define IDE_HFLAG_OFF_BOARD 0 # define IDE_HFLAG_OFF_BOARD 0
#endif #endif
typedef struct ide_pci_device_s { struct ide_port_info {
char *name; char *name;
unsigned int (*init_chipset)(struct pci_dev *, const char *); unsigned int (*init_chipset)(struct pci_dev *, const char *);
void (*init_iops)(ide_hwif_t *); void (*init_iops)(ide_hwif_t *);
...@@ -1244,10 +1242,10 @@ typedef struct ide_pci_device_s { ...@@ -1244,10 +1242,10 @@ typedef struct ide_pci_device_s {
u8 swdma_mask; u8 swdma_mask;
u8 mwdma_mask; u8 mwdma_mask;
u8 udma_mask; u8 udma_mask;
} ide_pci_device_t; };
extern int ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); int ide_setup_pci_device(struct pci_dev *, struct ide_port_info *);
extern int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, ide_pci_device_t *); int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, struct ide_port_info *);
void ide_map_sg(ide_drive_t *, struct request *); void ide_map_sg(ide_drive_t *, struct request *);
void ide_init_sg_cmd(ide_drive_t *, struct request *); void ide_init_sg_cmd(ide_drive_t *, struct request *);
......
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