aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2007-02-07 12:18:25 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-02-07 12:18:25 -0500
commitd2872239737ad6394b49c7c9ce9ae8d0f07165e5 (patch)
tree232072b7bf8e4a180160b487873265796905487e /drivers/ide/pci/piix.c
parent6273d26a5b280cb96b804424de323560b301ca51 (diff)
piix: fix 82371MX enablebits
According to the datasheet, Intel 82371MX (MPIIX) actually has only a single IDE channel mapped to the primary or secondary ports depending on the value of the bit 14 of the IDETIM register at PCI config. offset 0x6C (the register at 0x6F which the driver refers to. doesn't exist). So, disguise the controller as dual channel and set enablebits masks/values such that only either primary or secondary channel is detected enabled. Also, preclude the IDE probing code from reading PCI BARs, this controller just doesn't have them (it's not the separate PCI function like the other PCI controllers), it only decodes the legacy addresses. [ Alan sayeth " MPIIX does not work with or without the change. It needs its own different driver and not to use setup-pci. Huge job and since it works well with libata who cares. Ditto the early PIIX chip." ] Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/piix.c')
-rw-r--r--drivers/ide/pci/piix.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index edb37f3d558d..236d8fd4e72b 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -539,13 +539,19 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
539 /* 0 */ DECLARE_PIIX_DEV("PIIXa"), 539 /* 0 */ DECLARE_PIIX_DEV("PIIXa"),
540 /* 1 */ DECLARE_PIIX_DEV("PIIXb"), 540 /* 1 */ DECLARE_PIIX_DEV("PIIXb"),
541 541
542 { /* 2 */ 542 /* 2 */
543 { /*
544 * MPIIX actually has only a single IDE channel mapped to
545 * the primary or secondary ports depending on the value
546 * of the bit 14 of the IDETIM register at offset 0x6c
547 */
543 .name = "MPIIX", 548 .name = "MPIIX",
544 .init_hwif = init_hwif_piix, 549 .init_hwif = init_hwif_piix,
545 .channels = 2, 550 .channels = 2,
546 .autodma = NODMA, 551 .autodma = NODMA,
547 .enablebits = {{0x6D,0x80,0x80}, {0x6F,0x80,0x80}}, 552 .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
548 .bootable = ON_BOARD, 553 .bootable = ON_BOARD,
554 .flags = IDEPCI_FLAG_ISA_PORTS
549 }, 555 },
550 556
551 /* 3 */ DECLARE_PIIX_DEV("PIIX3"), 557 /* 3 */ DECLARE_PIIX_DEV("PIIX3"),