aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:07 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:07 -0500
commitd26805fd025abe1ab8785b23a7942cfb6ceffd75 (patch)
tree8073aed22acd6865c4bf4c6a6e5a016295c6998a /drivers/ide
parent74095a91ed02f6727b62d4416be00a041f2d7436 (diff)
ide-pmac: fix pmac_ide_init_hwif_ports()
* pmac_ide_init_hwif_ports() can be called by ide_init_hwif_ports() (through ppc_ide_md.ide_init_hwif hook) for non IDE PMAC interfaces. If this is the case the hw->io_ports[] should be already setup by ide_init_hwif_ports()->ide_std_init_ports() so remove redundant code from pmac_ide_init_hwif_ports(). As side-effect this change fixes ctl_addr == 0 special handling in ide_init_hwif_ports(). * Fix misleading comment while at it. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ppc/pmac.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 7f7a59885777..4559e29446e9 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -438,13 +438,8 @@ pmac_ide_init_hwif_ports(hw_regs_t *hw,
438 if (data_port == pmac_ide[ix].regbase) 438 if (data_port == pmac_ide[ix].regbase)
439 break; 439 break;
440 440
441 if (ix >= MAX_HWIFS) { 441 if (ix >= MAX_HWIFS)
442 /* Probably a PCI interface... */ 442 return; /* not an IDE PMAC interface */
443 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; ++i)
444 hw->io_ports[i] = data_port + i - IDE_DATA_OFFSET;
445 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
446 return;
447 }
448 443
449 for (i = 0; i < 8; ++i) 444 for (i = 0; i < 8; ++i)
450 hw->io_ports[i] = data_port + i * 0x10; 445 hw->io_ports[i] = data_port + i * 0x10;