aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ppc/pmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r--drivers/ide/ppc/pmac.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 177961edc430..3277bf2d66a5 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -918,8 +918,21 @@ pmac_ide_do_resume(ide_hwif_t *hwif)
918 return 0; 918 return 0;
919} 919}
920 920
921static const struct ide_port_ops pmac_ide_ata6_port_ops = {
922 .set_pio_mode = pmac_ide_set_pio_mode,
923 .set_dma_mode = pmac_ide_set_dma_mode,
924 .selectproc = pmac_ide_kauai_selectproc,
925};
926
927static const struct ide_port_ops pmac_ide_port_ops = {
928 .set_pio_mode = pmac_ide_set_pio_mode,
929 .set_dma_mode = pmac_ide_set_dma_mode,
930 .selectproc = pmac_ide_selectproc,
931};
932
921static const struct ide_port_info pmac_port_info = { 933static const struct ide_port_info pmac_port_info = {
922 .chipset = ide_pmac, 934 .chipset = ide_pmac,
935 .port_ops = &pmac_ide_port_ops,
923 .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | 936 .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA |
924 IDE_HFLAG_POST_SET_MODE | 937 IDE_HFLAG_POST_SET_MODE |
925 IDE_HFLAG_NO_DMA | /* no SFF-style DMA */ 938 IDE_HFLAG_NO_DMA | /* no SFF-style DMA */
@@ -947,12 +960,15 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
947 pmif->broken_dma = pmif->broken_dma_warn = 0; 960 pmif->broken_dma = pmif->broken_dma_warn = 0;
948 if (of_device_is_compatible(np, "shasta-ata")) { 961 if (of_device_is_compatible(np, "shasta-ata")) {
949 pmif->kind = controller_sh_ata6; 962 pmif->kind = controller_sh_ata6;
963 d.port_ops = &pmac_ide_ata6_port_ops;
950 d.udma_mask = ATA_UDMA6; 964 d.udma_mask = ATA_UDMA6;
951 } else if (of_device_is_compatible(np, "kauai-ata")) { 965 } else if (of_device_is_compatible(np, "kauai-ata")) {
952 pmif->kind = controller_un_ata6; 966 pmif->kind = controller_un_ata6;
967 d.port_ops = &pmac_ide_ata6_port_ops;
953 d.udma_mask = ATA_UDMA5; 968 d.udma_mask = ATA_UDMA5;
954 } else if (of_device_is_compatible(np, "K2-UATA")) { 969 } else if (of_device_is_compatible(np, "K2-UATA")) {
955 pmif->kind = controller_k2_ata6; 970 pmif->kind = controller_k2_ata6;
971 d.port_ops = &pmac_ide_ata6_port_ops;
956 d.udma_mask = ATA_UDMA5; 972 d.udma_mask = ATA_UDMA5;
957 } else if (of_device_is_compatible(np, "keylargo-ata")) { 973 } else if (of_device_is_compatible(np, "keylargo-ata")) {
958 if (strcmp(np->name, "ata-4") == 0) { 974 if (strcmp(np->name, "ata-4") == 0) {
@@ -1035,14 +1051,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
1035 ide_init_port_hw(hwif, hw); 1051 ide_init_port_hw(hwif, hw);
1036 hwif->noprobe = pmif->mediabay; 1052 hwif->noprobe = pmif->mediabay;
1037 hwif->cbl = pmif->cable_80 ? ATA_CBL_PATA80 : ATA_CBL_PATA40; 1053 hwif->cbl = pmif->cable_80 ? ATA_CBL_PATA80 : ATA_CBL_PATA40;
1038 hwif->set_pio_mode = pmac_ide_set_pio_mode;
1039 if (pmif->kind == controller_un_ata6
1040 || pmif->kind == controller_k2_ata6
1041 || pmif->kind == controller_sh_ata6)
1042 hwif->selectproc = pmac_ide_kauai_selectproc;
1043 else
1044 hwif->selectproc = pmac_ide_selectproc;
1045 hwif->set_dma_mode = pmac_ide_set_dma_mode;
1046 1054
1047 printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n", 1055 printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n",
1048 hwif->index, model_name[pmif->kind], pmif->aapl_bus_id, 1056 hwif->index, model_name[pmif->kind], pmif->aapl_bus_id,