View | Details | Raw Unified | Return to bug 9306 | Differences between
and this patch

Collapse All | Expand All

(-)linux.vanilla-2.6.24-rc3-mm2/drivers/parport/parport_pc.c (-6 / +40 lines)
Lines 1540-1545 Link Here
1540
	smsc_check(0x3f0,0x44);
1540
	smsc_check(0x3f0,0x44);
1541
	smsc_check(0x370,0x44);
1541
	smsc_check(0x370,0x44);
1542
}
1542
}
1543
1544
static void __devinit detect_and_report_ite(void)
1545
{
1546
	u16 dev;
1547
	if (verbose_probing)
1548
		printk(KERN_DEBUG "IT8705 Super-IO detection, now testing Ports 2F0, 370 ...\n");
1549
	if (!request_region(0x2e, 1, __FUNCTION__))
1550
		return;
1551
	outb(0x87, 0x2e);
1552
	outb(0x01, 0x2e);
1553
	outb(0x55, 0x2e);
1554
	outb(0x55, 0x2e);
1555
	outb(0x20, 0x2e);
1556
	dev = inb(0x2f) << 8;
1557
	outb(0x21, 0x2e);
1558
	dev |= inb(0x2f);
1559
	
1560
	if (dev == 0x8712 || dev == 0x8705 || dev == 0x8715 ||
1561
	    dev == 0x8716 || dev == 0x8718 || dev == 0x8726) {
1562
		printk(KERN_INFO "IT%04X SuperIO detected.\n");
1563
	
1564
		outb(0x07, 0x2E);	/* Parallel Port */
1565
		outb(0x03, 0x2F);
1566
		outb(0xF0, 0x2E);	/* BOOT 0x80 off */
1567
		r = inb(0x2f);
1568
		outb(0xF0, 0x2E);
1569
		outb(r | 8, 0x2F);
1570
		outb(0x02, 0x2E);	/* Lock */
1571
		outb(0x02, 0x2F);
1572
1573
		release_region(0x2e, 1);
1574
	}
1575
}
1543
#endif /* CONFIG_PARPORT_PC_SUPERIO */
1576
#endif /* CONFIG_PARPORT_PC_SUPERIO */
1544
1577
1545
static int get_superio_dma (struct parport *p)
1578
static int get_superio_dma (struct parport *p)
Lines 3159-3182 Link Here
3159
	int count = 0, err;
3192
	int count = 0, err;
3160
3193
3161
#ifdef CONFIG_PARPORT_PC_SUPERIO
3194
#ifdef CONFIG_PARPORT_PC_SUPERIO
3162
	detect_and_report_winbond ();
3195
	detect_and_report_it87();
3163
	detect_and_report_smsc ();
3196
	detect_and_report_winbond();
3197
	detect_and_report_smsc();
3164
#endif
3198
#endif
3165
3199
3166
	/* Onboard SuperIO chipsets that show themselves on the PCI bus. */
3200
	/* Onboard SuperIO chipsets that show themselves on the PCI bus. */
3167
	count += parport_pc_init_superio (autoirq, autodma);
3201
	count += parport_pc_init_superio(autoirq, autodma);
3168
3202
3169
	/* PnP ports, skip detection if SuperIO already found them */
3203
	/* PnP ports, skip detection if SuperIO already found them */
3170
	if (!count) {
3204
	if (!count) {
3171
		err = pnp_register_driver (&parport_pc_pnp_driver);
3205
		err = pnp_register_driver(&parport_pc_pnp_driver);
3172
		if (!err)
3206
		if (!err)
3173
			pnp_registered_parport = 1;
3207
			pnp_registered_parport = 1;
3174
	}
3208
	}
3175
3209
3176
	/* ISA ports and whatever (see asm/parport.h). */
3210
	/* ISA ports and whatever (see asm/parport.h). */
3177
	parport_pc_find_nonpci_ports (autoirq, autodma);
3211
	parport_pc_find_nonpci_ports(autoirq, autodma);
3178
3212
3179
	err = pci_register_driver (&parport_pc_pci_driver);
3213
	err = pci_register_driver(&parport_pc_pci_driver);
3180
	if (!err)
3214
	if (!err)
3181
		pci_registered_parport = 1;
3215
		pci_registered_parport = 1;
3182
}
3216
}

Return to bug 9306