Lines Matching +full:0 +full:x53
20 * Don't use LBA48 mode on ALi <= 0xC4
21 * Don't poke 0x79 with a non ALi northbridge
23 * Allow UDMA6 on revisions > 0xC4
54 int pio_fifo = 0x54 + hwif->channel; in ali_fifo_control()
59 fifo &= ~(0x0F << shift); in ali_fifo_control()
68 int port = hwif->channel ? 0x5c : 0x58; in ali_program_timings()
69 int udmat = 0x56 + hwif->channel; in ali_program_timings()
75 udma &= ~(0x0F << shift); in ali_program_timings()
126 ali_fifo_control(hwif, drive, (drive->media == ide_disk) ? 0x05 : 0x00); in ali_set_pio_mode()
128 ali_program_timings(hwif, drive, &t, 0); in ali_set_pio_mode()
138 * No UDMA on revisions <= 0x20
139 * Disk only for revisions < 0xC2
145 if (m5229_revision > 0x20 && m5229_revision < 0xC2) { in ali_udma_filter()
147 return 0; in ali_udma_filter()
150 return 0; in ali_udma_filter()
166 static u8 udma_timing[7] = { 0xC, 0xB, 0xA, 0x9, 0x8, 0xF, 0xD }; in ali_set_dma_mode()
172 u8 tmpbyte = 0x00; in ali_set_dma_mode()
190 ali_program_timings(hwif, drive, &t, 0); in ali_set_dma_mode()
195 pci_read_config_byte(dev, 0x4b, &tmpbyte); in ali_set_dma_mode()
197 pci_write_config_byte(dev, 0x4b, tmpbyte); in ali_set_dma_mode()
212 if (m5229_revision < 0xC2 && drive->media != ide_disk) { in ali_dma_check()
216 return 0; in ali_dma_check()
231 struct pci_dev *north = pci_get_slot(dev->bus, PCI_DEVFN(0,0)); in init_chipset_ali15x3()
239 if (m5229_revision < 0xC2) { in init_chipset_ali15x3()
241 * revision 0x20 (1543-E, 1543-F) in init_chipset_ali15x3()
242 * revision 0xC0, 0xC1 (1543C-C, 1543C-D, 1543C-E) in init_chipset_ali15x3()
243 * clear CD-ROM DMA write bit, m5229, 0x4b, bit 7 in init_chipset_ali15x3()
245 pci_read_config_byte(dev, 0x4b, &tmpbyte); in init_chipset_ali15x3()
249 pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F); in init_chipset_ali15x3()
251 * check m1533, 0x5e, bit 1~4 == 1001 => & 00011110 = 00010010 in init_chipset_ali15x3()
253 if (m5229_revision >= 0x20 && isa_dev) { in init_chipset_ali15x3()
254 pci_read_config_byte(isa_dev, 0x5e, &tmpbyte); in init_chipset_ali15x3()
255 chip_is_1543c_e = ((tmpbyte & 0x1e) == 0x12) ? 1: 0; in init_chipset_ali15x3()
269 * enable "Cable Detection", m5229, 0x4b, bit3 in init_chipset_ali15x3()
271 pci_read_config_byte(dev, 0x4b, &tmpbyte); in init_chipset_ali15x3()
272 pci_write_config_byte(dev, 0x4b, tmpbyte | 0x08); in init_chipset_ali15x3()
277 * box without a device at 0:0.0. The ALi bridge will be at in init_chipset_ali15x3()
278 * 0:0.0 so if we didn't find one we know what is cooking. in init_chipset_ali15x3()
283 if (m5229_revision < 0xC5 && isa_dev) in init_chipset_ali15x3()
286 * set south-bridge's enable bit, m1533, 0x79 in init_chipset_ali15x3()
289 pci_read_config_byte(isa_dev, 0x79, &tmpbyte); in init_chipset_ali15x3()
290 if (m5229_revision == 0xC2) { in init_chipset_ali15x3()
292 * 1543C-B0 (m1533, 0x79, bit 2) in init_chipset_ali15x3()
294 pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x04); in init_chipset_ali15x3()
295 } else if (m5229_revision >= 0xC3) { in init_chipset_ali15x3()
297 * 1553/1535 (m1533, 0x79, bit 1) in init_chipset_ali15x3()
299 pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02); in init_chipset_ali15x3()
305 * CD_ROM DMA on (m5229, 0x53, bit0) in init_chipset_ali15x3()
307 * PIO FIFO off (m5229, 0x53, bit1) in init_chipset_ali15x3()
308 * The hardware will use 0x54h and 0x55h to control PIO FIFO. in init_chipset_ali15x3()
311 * 0x53 changes meaning on later revs - we must no touch in init_chipset_ali15x3()
312 * bit 1 on them. Need to check if 0x20 is the right break. in init_chipset_ali15x3()
314 if (m5229_revision >= 0x20) { in init_chipset_ali15x3()
315 pci_read_config_byte(dev, 0x53, &tmpbyte); in init_chipset_ali15x3()
317 if (m5229_revision <= 0x20) in init_chipset_ali15x3()
318 tmpbyte = (tmpbyte & (~0x02)) | 0x01; in init_chipset_ali15x3()
319 else if (m5229_revision == 0xc7 || m5229_revision == 0xc8) in init_chipset_ali15x3()
320 tmpbyte |= 0x03; in init_chipset_ali15x3()
322 tmpbyte |= 0x01; in init_chipset_ali15x3()
324 pci_write_config_byte(dev, 0x53, tmpbyte); in init_chipset_ali15x3()
329 return 0; in init_chipset_ali15x3()
357 if (pdev->subsystem_vendor == 0x10CF && in ali_cable_override()
358 pdev->subsystem_device == 0x10AF) in ali_cable_override()
362 if (pdev->subsystem_vendor == 0x1071 && in ali_cable_override()
363 pdev->subsystem_device == 0x8317) in ali_cable_override()
370 return 0; in ali_cable_override()
386 if (m5229_revision >= 0xC2) { in ali_cable_detect()
390 * 0x4a bit0 is 0 => primary channel has 80-pin in ali_cable_detect()
391 * 0x4a bit1 is 0 => secondary channel has 80-pin in ali_cable_detect()
399 pci_read_config_byte(dev, 0x4a, &tmpbyte); in ali_cable_detect()
400 if ((tmpbyte & (1 << hwif->channel)) == 0) in ali_cable_detect()
422 1, 11, 0, 12, 0, 14, 0, 15 }; in init_hwif_ali15x3()
429 pci_read_config_byte(isa_dev, 0x58, &ideic); in init_hwif_ali15x3()
432 ideic = ideic & 0x03; in init_hwif_ali15x3()
435 if ((hwif->channel && ideic == 0x03) || in init_hwif_ali15x3()
440 pci_read_config_byte(isa_dev, 0x44, &inmir); in init_hwif_ali15x3()
441 inmir = inmir & 0x0f; in init_hwif_ali15x3()
443 } else if (hwif->channel && !(ideic & 0x01)) { in init_hwif_ali15x3()
447 pci_read_config_byte(isa_dev, 0x75, &inmir); in init_hwif_ali15x3()
448 inmir = inmir & 0x0f; in init_hwif_ali15x3()
451 if(irq >= 0) in init_hwif_ali15x3()
472 if (base == 0) in init_dma_ali15x3()
477 if (ide_pci_check_simplex(hwif, d) < 0) in init_dma_ali15x3()
480 if (ide_pci_set_master(dev, d->name) < 0) in init_dma_ali15x3()
484 outb(inb(base + 2) & 0x60, base + 2); in init_dma_ali15x3()
486 printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", in init_dma_ali15x3()
492 return 0; in init_dma_ali15x3()
540 /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ in alim15x3_init_one()
541 if (rev <= 0xC4) in alim15x3_init_one()
544 if (rev >= 0x20) { in alim15x3_init_one()
545 if (rev == 0x20) in alim15x3_init_one()
548 if (rev < 0xC2) in alim15x3_init_one()
550 else if (rev == 0xC2 || rev == 0xC3) in alim15x3_init_one()
552 else if (rev == 0xC4) in alim15x3_init_one()
561 d.mwdma_mask = d.swdma_mask = 0; in alim15x3_init_one()
564 if (idx == 0) in alim15x3_init_one()
572 { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5229), 0 },
574 { 0, },