Lines Matching +full:0 +full:x1f0
70 module_param(probe_all, int, 0);
74 static int probe_mask = ~0;
75 module_param(probe_mask, int, 0);
79 module_param(autospeed, int, 0);
83 module_param(pio_mask, int, 0);
86 static int iordy_mask = 0xFFFFFFFF;
87 module_param(iordy_mask, int, 0);
91 module_param(ht6560a, int, 0);
95 module_param(ht6560b, int, 0);
99 module_param(opti82c611a, int, 0);
104 module_param(opti82c46x, int, 0);
113 module_param(qdi, int, 0);
121 module_param(winbond, int, 0);
128 BIOS = 0,
171 static int legacy_port[NR_HOST] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
197 struct legacy_probe *lp = &probe_list[0]; in legacy_probe_add()
201 for (i = 0; i < NR_HOST; i++) { in legacy_probe_add()
202 if (lp->port == 0 && free == NULL) in legacy_probe_add()
222 return 0; in legacy_probe_add()
250 return 0; in legacy_set_mode()
266 * do this. The mode range can be set if it is not 0x1F by setting
303 inb(0x1F5); in pdc20230_set_piomode()
304 outb(inb(0x1F2) | 0x80, 0x1F2); in pdc20230_set_piomode()
305 inb(0x1F2); in pdc20230_set_piomode()
306 inb(0x3F6); in pdc20230_set_piomode()
307 inb(0x3F6); in pdc20230_set_piomode()
308 inb(0x1F2); in pdc20230_set_piomode()
309 inb(0x1F2); in pdc20230_set_piomode()
311 while ((inb(0x1F2) & 0x80) && --tries); in pdc20230_set_piomode()
315 outb(inb(0x1F4) & 0x07, 0x1F4); in pdc20230_set_piomode()
317 rt = inb(0x1F3); in pdc20230_set_piomode()
318 rt &= ~(0x07 << (3 * !adev->devno)); in pdc20230_set_piomode()
321 outb(rt, 0x1F3); in pdc20230_set_piomode()
324 outb(inb(0x1F2) | 0x01, 0x1F2); in pdc20230_set_piomode()
326 inb(0x1F5); in pdc20230_set_piomode()
338 if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3) in pdc_data_xfer_vlb()
356 __le32 pad = 0; in pdc_data_xfer_vlb()
398 inb(0x3E6); in ht6560a_set_piomode()
399 inb(0x3E6); in ht6560a_set_piomode()
400 inb(0x3E6); in ht6560a_set_piomode()
401 inb(0x3E6); in ht6560a_set_piomode()
430 recover = clamp_val(t.recover, 2, 16) & 0x0F; in ht6560b_set_piomode()
432 inb(0x3E6); in ht6560b_set_piomode()
433 inb(0x3E6); in ht6560b_set_piomode()
434 inb(0x3E6); in ht6560b_set_piomode()
435 inb(0x3E6); in ht6560b_set_piomode()
440 u8 rconf = inb(0x3E6); in ht6560b_set_piomode()
441 if (rconf & 0x24) { in ht6560b_set_piomode()
442 rconf &= ~0x24; in ht6560b_set_piomode()
443 outb(rconf, 0x3E6); in ht6560b_set_piomode()
472 outb(reg, 0x22); in opti_syscfg()
473 r = inb(0x24); in opti_syscfg()
500 clock = 1000000000 / khz[ioread8(ap->ioaddr.lbah_addr) & 0x03]; in opti82c611a_set_piomode()
519 rc &= 0x7F; in opti82c611a_set_piomode()
529 rc &= 0xC0; in opti82c611a_set_piomode()
531 rc |= (setup << 4) | 0x04; in opti82c611a_set_piomode()
539 rc &= 0x73; in opti82c611a_set_piomode()
540 rc |= 0x84; in opti82c611a_set_piomode()
544 iowrite8(0x83, ap->ioaddr.nsect_addr); in opti82c611a_set_piomode()
571 sysclk = (opti_syscfg(0xAC) & 0xC0) >> 6; /* BIOS set */ in opti82c46x_set_piomode()
598 rc &= 0x7F; in opti82c46x_set_piomode()
608 rc &= 0xC0; in opti82c46x_set_piomode()
610 rc |= (setup << 4) | 0x04; in opti82c46x_set_piomode()
618 rc &= 0x73; in opti82c46x_set_piomode()
619 rc |= 0x84; in opti82c46x_set_piomode()
623 iowrite8(0x83, ap->ioaddr.nsect_addr); in opti82c46x_set_piomode()
692 recovery = 15 - clamp_val(t.recover, 0, 15); in qdi65x0_set_piomode()
694 timing = (recovery << 4) | active | 0x08; in qdi65x0_set_piomode()
704 outb(0x5F, (ld_qdi->timing & 0xFFF0) + 3); in qdi65x0_set_piomode()
739 if (ata_id_has_dword_io(adev->id) && (slop == 0 || slop == 3) in vlb32_data_xfer()
747 __le32 pad = 0; in vlb32_data_xfer()
768 return 0; in qdi_port()
797 outb(reg, port + 0x01); in winbond_writecfg()
798 outb(val, port + 0x02); in winbond_writecfg()
808 outb(reg, port + 0x01); in winbond_readcfg()
809 val = inb(port + 0x02); in winbond_readcfg()
821 int timing = 0x88 + (ap->port_no * 4) + (adev->devno * 2); in winbond_set_piomode()
823 reg = winbond_readcfg(ld_winbond->timing, 0x81); in winbond_set_piomode()
826 if (reg & 0x40) /* Fast VLB bus, assume 50MHz */ in winbond_set_piomode()
831 active = (clamp_val(t.active, 3, 17) - 1) & 0x0F; in winbond_set_piomode()
832 recovery = (clamp_val(t.recover, 1, 15) + 1) & 0x0F; in winbond_set_piomode()
838 reg = 0x35; in winbond_set_piomode()
840 reg |= 0x08; /* FIFO off */ in winbond_set_piomode()
842 reg |= 0x02; /* IORDY off */ in winbond_set_piomode()
843 reg |= (clamp_val(t.setup, 0, 3) << 6); in winbond_set_piomode()
853 return 0; in winbond_port()
864 ATA_FLAG_NO_IORDY, 0, NULL },
866 0, 0, NULL },
871 ATA_FLAG_NO_IORDY, 0, NULL },
873 ATA_FLAG_NO_IORDY, 0, NULL },
875 0, 0, NULL },
877 0, 0, NULL },
882 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
884 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
886 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE,
902 if (winbond && (probe->port == 0x1F0 || probe->port == 0x170)) { in probe_chip_type()
903 u8 reg = winbond_readcfg(winbond, 0x81); in probe_chip_type()
904 reg |= 0x80; /* jumpered mode off */ in probe_chip_type()
905 winbond_writecfg(winbond, 0x81, reg); in probe_chip_type()
906 reg = winbond_readcfg(winbond, 0x83); in probe_chip_type()
907 reg |= 0xF0; /* local control */ in probe_chip_type()
908 winbond_writecfg(winbond, 0x83, reg); in probe_chip_type()
909 reg = winbond_readcfg(winbond, 0x85); in probe_chip_type()
910 reg |= 0xF0; /* programmable timing */ in probe_chip_type()
911 winbond_writecfg(winbond, 0x85, reg); in probe_chip_type()
913 reg = winbond_readcfg(winbond, 0x81); in probe_chip_type()
918 if (probe->port == 0x1F0) { in probe_chip_type()
922 outb(inb(0x1F2) | 0x80, 0x1F2); in probe_chip_type()
923 inb(0x1F5); in probe_chip_type()
924 inb(0x1F2); in probe_chip_type()
925 inb(0x3F6); in probe_chip_type()
926 inb(0x3F6); in probe_chip_type()
927 inb(0x1F2); in probe_chip_type()
928 inb(0x1F2); in probe_chip_type()
930 if ((inb(0x1F2) & 0x80) == 0) { in probe_chip_type()
935 inb(0x1F5); in probe_chip_type()
939 outb(0x55, 0x1F2); in probe_chip_type()
940 inb(0x1F2); in probe_chip_type()
941 inb(0x1F2); in probe_chip_type()
942 if (inb(0x1F2) == 0x00) in probe_chip_type()
985 u32 iordy = (iordy_mask & mask) ? 0: ATA_FLAG_NO_IORDY; in legacy_init_one()
990 pdev = platform_device_register_simple(DRV_NAME, probe->slot, NULL, 0); in legacy_init_one()
996 devm_request_region(&pdev->dev, io + 0x0206, 1, in legacy_init_one()
1002 ctrl_addr = devm_ioport_map(&pdev->dev, io + 0x0206, 1); in legacy_init_one()
1007 if (controller->setup(pdev, probe, ld) < 0) in legacy_init_one()
1012 ap = host->ports[0]; in legacy_init_one()
1024 ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", io, io + 0x0206); in legacy_init_one()
1026 ret = ata_host_activate(host, probe->irq, ata_sff_interrupt, 0, in legacy_init_one()
1040 return 0; in legacy_init_one()
1066 if (p->vendor == 0x1078 && p->device == 0x0000) { in legacy_check_special_cases()
1071 if (p->vendor == 0x1078 && p->device == 0x0002) { in legacy_check_special_cases()
1076 if (p->vendor == 0x8086 && p->device == 0x1234) { in legacy_check_special_cases()
1078 pci_read_config_word(p, 0x6C, &r); in legacy_check_special_cases()
1079 if (r & 0x8000) { in legacy_check_special_cases()
1081 if (r & 0x4000) in legacy_check_special_cases()
1098 u8 ctrl = (opti_syscfg(0x30) & 0xC0) >> 6; in probe_opti_vlb()
1104 chans = (opti_syscfg(0x3F) & 0x20) ? 2 : 1; in probe_opti_vlb()
1105 ctrl = opti_syscfg(0xAC); in probe_opti_vlb()
1110 legacy_probe_add(0x1F0, 14, OPTI46X, 0); in probe_opti_vlb()
1111 legacy_probe_add(0x170, 15, OPTI46X, 0); in probe_opti_vlb()
1114 legacy_probe_add(0x170, 15, OPTI46X, 0); in probe_opti_vlb()
1116 legacy_probe_add(0x1F0, 14, OPTI46X, 0); in probe_opti_vlb()
1118 legacy_probe_add(0x1F0, 14, OPTI46X, 0); in probe_opti_vlb()
1123 static const unsigned long ide_port[2] = { 0x170, 0x1F0 }; in qdi65_identify_port()
1125 if ((r & 0xF0) == 0xC0) { in qdi65_identify_port()
1130 legacy_probe_add(ide_port[r & 0x01], 14 + (r & 0x01), in qdi65_identify_port()
1133 if (((r & 0xF0) == 0xA0) || (r & 0xF0) == 0x50) { in qdi65_identify_port()
1142 legacy_probe_add(ide_port[r & 0x01], 14 + (r & 0x01), in qdi65_identify_port()
1145 legacy_probe_add(0x1F0, 14, QDI6580DP, port); in qdi65_identify_port()
1146 /* port + 0x02, r & 0x04 */ in qdi65_identify_port()
1147 legacy_probe_add(0x170, 15, QDI6580DP, port + 2); in qdi65_identify_port()
1156 static const unsigned long qd_port[2] = { 0x30, 0xB0 }; in probe_qdi_vlb()
1163 for (i = 0; i < 2; i++) { in probe_qdi_vlb()
1175 outb(0x19, port); in probe_qdi_vlb()
1184 if (res == 0x19) { in probe_qdi_vlb()
1212 int ct = 0; in legacy_init()
1213 int primary = 0; in legacy_init()
1214 int secondary = 0; in legacy_init()
1215 int pci_present = 0; in legacy_init()
1216 struct legacy_probe *pl = &probe_list[0]; in legacy_init()
1217 int slot = 0; in legacy_init()
1226 for (r = 0; r < 6; r++) { in legacy_init()
1227 if (pci_resource_start(p, r) == 0x1f0) in legacy_init()
1229 if (pci_resource_start(p, r) == 0x170) in legacy_init()
1241 winbond = 0x130; /* Default port, alt is 1B0 */ in legacy_init()
1243 if (primary == 0 || all) in legacy_init()
1244 legacy_probe_add(0x1F0, 14, UNKNOWN, 0); in legacy_init()
1245 if (secondary == 0 || all) in legacy_init()
1246 legacy_probe_add(0x170, 15, UNKNOWN, 0); in legacy_init()
1250 legacy_probe_add(0x1E8, 11, UNKNOWN, 0); in legacy_init()
1251 legacy_probe_add(0x168, 10, UNKNOWN, 0); in legacy_init()
1252 legacy_probe_add(0x1E0, 8, UNKNOWN, 0); in legacy_init()
1253 legacy_probe_add(0x160, 12, UNKNOWN, 0); in legacy_init()
1261 for (i = 0; i < NR_HOST; i++, pl++) { in legacy_init()
1262 if (pl->port == 0) in legacy_init()
1267 if (legacy_init_one(pl) == 0) in legacy_init()
1270 if (ct != 0) in legacy_init()
1271 return 0; in legacy_init()
1279 for (i = 0; i < nr_legacy_host; i++) { in legacy_exit()