Commit 0a3dd111 authored by Jeff Garzik's avatar Jeff Garzik

[IDE] Create DECLARE_PIIX_DEV declarator, to eliminate a large amount

of redundancy, and to help prevent future errors.
parent 61ee834a
...@@ -13,39 +13,32 @@ static void init_setup_piix(struct pci_dev *, ide_pci_device_t *); ...@@ -13,39 +13,32 @@ static void init_setup_piix(struct pci_dev *, ide_pci_device_t *);
static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *); static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *);
static void init_hwif_piix(ide_hwif_t *); static void init_hwif_piix(ide_hwif_t *);
#define DECLARE_PIIX_DEV(pci_id, name_str) \
{ \
.vendor = PCI_VENDOR_ID_INTEL, \
.device = pci_id, \
.name = name_str, \
.init_setup = init_setup_piix, \
.init_chipset = init_chipset_piix, \
.init_iops = NULL, \
.init_hwif = init_hwif_piix, \
.channels = 2, \
.autodma = AUTODMA, \
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
.bootable = ON_BOARD, \
.extra = 0, \
}
/* /*
* Table of the various PIIX capability blocks * Table of the various PIIX capability blocks
* *
*/ */
static ide_pci_device_t piix_pci_info[] __devinitdata = { static ide_pci_device_t piix_pci_info[] __devinitdata = {
{ /* 0 */ /* 0 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371FB_0, "PIIXa"),
.vendor = PCI_VENDOR_ID_INTEL, /* 1 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371FB_1, "PIIXb"),
.device = PCI_DEVICE_ID_INTEL_82371FB_0,
.name = "PIIXa", { /* 2 */
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 1 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82371FB_1,
.name = "PIIXb",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 2 */
.vendor = PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82371MX, .device = PCI_DEVICE_ID_INTEL_82371MX,
.name = "MPIIX", .name = "MPIIX",
...@@ -58,241 +51,27 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = { ...@@ -58,241 +51,27 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
.enablebits = {{0x6D,0x80,0x80}, {0x6F,0x80,0x80}}, .enablebits = {{0x6D,0x80,0x80}, {0x6F,0x80,0x80}},
.bootable = ON_BOARD, .bootable = ON_BOARD,
.extra = 0, .extra = 0,
},{ /* 3 */ },
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82371SB_1, /* 3 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371SB_1, "PIIX3"),
.name = "PIIX3", /* 4 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82371AB, "PIIX4"),
.init_setup = init_setup_piix, /* 5 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801AB_1, "ICH0"),
.init_chipset = init_chipset_piix, /* 6 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82443MX_1, "PIIX4"),
.init_iops = NULL, /* 7 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801AA_1, "ICH"),
.init_hwif = init_hwif_piix, /* 8 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82372FB_1, "PIIX4"),
.channels = 2, /* 9 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82451NX, "PIIX4"),
.autodma = AUTODMA, /* 10 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801BA_9, "ICH2"),
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, /* 11 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801BA_8, "ICH2M"),
.bootable = ON_BOARD, /* 12 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801CA_10, "ICH3M"),
.extra = 0, /* 13 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801CA_11, "ICH3"),
},{ /* 4 */ /* 14 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801DB_11, "ICH4"),
.vendor = PCI_VENDOR_ID_INTEL, /* 15 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801EB_11, "ICH5"),
.device = PCI_DEVICE_ID_INTEL_82371AB, /* 16 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801E_11, "C-ICH"),
.name = "PIIX4", /* 17 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801DB_10, "ICH4"),
.init_setup = init_setup_piix, /* 18 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_82801EB_1, "ICH5-SATA"),
.init_chipset = init_chipset_piix, /* 19 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_ESB_2, "ICH5"),
.init_iops = NULL, /* 20 */ DECLARE_PIIX_DEV(PCI_DEVICE_ID_INTEL_ICH6_2, "ICH6"),
.init_hwif = init_hwif_piix, {
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 5 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801AB_1,
.name = "ICH0",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 6 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82443MX_1,
.name = "PIIX4",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 7 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801AA_1,
.name = "ICH",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 8 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82372FB_1,
.name = "PIIX4",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 9 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82451NX,
.name = "PIIX4",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = NOAUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 10 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801BA_9,
.name = "ICH2",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 11 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801BA_8,
.name = "ICH2M",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 12 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801CA_10,
.name = "ICH3M",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 13 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801CA_11,
.name = "ICH3",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 14 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801DB_11,
.name = "ICH4",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 15 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801EB_11,
.name = "ICH5",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 16 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801E_11,
.name = "C-ICH",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 17 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801DB_10,
.name = "ICH4",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 18 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_82801EB_1,
.name = "ICH5-SATA",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 19 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_ESB_2,
.name = "ICH5",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{ /* 20 */
.vendor = PCI_VENDOR_ID_INTEL,
.device = PCI_DEVICE_ID_INTEL_ICH6_2,
.name = "ICH6",
.init_setup = init_setup_piix,
.init_chipset = init_chipset_piix,
.init_iops = NULL,
.init_hwif = init_hwif_piix,
.channels = 2,
.autodma = AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable = ON_BOARD,
.extra = 0,
},{
.vendor = 0, .vendor = 0,
.device = 0, .device = 0,
.channels = 0, .channels = 0,
......
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