~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/parport/parport_pc.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1488
1488
 
1489
1489
        outb(key, io);
1490
1490
        outb(key, io);     /* Write Magic Sequence to EFER, extended
1491
 
                              funtion enable register */
 
1491
                              function enable register */
1492
1492
        outb(0x20, io);    /* Write EFIR, extended function index register */
1493
1493
        devid = inb(io + 1);  /* Read EFDR, extended function data register */
1494
1494
        outb(0x21, io);
1527
1527
        x_oldid = inb(io + 2);
1528
1528
 
1529
1529
        outb(key, io);     /* Write Magic Byte to EFER, extended
1530
 
                              funtion enable register */
 
1530
                              function enable register */
1531
1531
        outb(0x20, io + 2);  /* Write EFIR, extended function index register */
1532
1532
        devid = inb(io + 2);  /* Read EFDR, extended function data register */
1533
1533
        outb(0x21, io + 1);
1569
1569
 
1570
1570
        outb(key, io);
1571
1571
        outb(key, io);     /* Write Magic Sequence to EFER, extended
1572
 
                              funtion enable register */
 
1572
                              function enable register */
1573
1573
        outb(0x0d, io);    /* Write EFIR, extended function index register */
1574
1574
        oldid = inb(io + 1);  /* Read EFDR, extended function data register */
1575
1575
        outb(0x0e, io);
1621
1621
        u8 origval, r;
1622
1622
        if (verbose_probing)
1623
1623
                printk(KERN_DEBUG "IT8705 Super-IO detection, now testing port 2E ...\n");
1624
 
        if (!request_region(0x2e, 2, __func__))
 
1624
        if (!request_muxed_region(0x2e, 2, __func__))
1625
1625
                return;
1626
1626
        origval = inb(0x2e);            /* Save original value */
1627
1627
        outb(0x87, 0x2e);
2550
2550
                                         const struct parport_pc_via_data *via)
2551
2551
{
2552
2552
        short inta_addr[6] = { 0x2A0, 0x2C0, 0x220, 0x240, 0x1E0 };
2553
 
        struct resource *base_res;
2554
2553
        u32 ite8872set;
2555
2554
        u32 ite8872_lpt, ite8872_lpthi;
2556
2555
        u8 ite8872_irq, type;
2561
2560
 
2562
2561
        /* make sure which one chip */
2563
2562
        for (i = 0; i < 5; i++) {
2564
 
                base_res = request_region(inta_addr[i], 32, "it887x");
2565
 
                if (base_res) {
 
2563
                if (request_region(inta_addr[i], 32, "it887x")) {
2566
2564
                        int test;
2567
2565
                        pci_write_config_dword(pdev, 0x60,
2568
2566
                                                0xe5000000 | inta_addr[i]);
2571
2569
                        test = inb(inta_addr[i]);
2572
2570
                        if (test != 0xff)
2573
2571
                                break;
2574
 
                        release_region(inta_addr[i], 0x8);
 
2572
                        release_region(inta_addr[i], 32);
2575
2573
                }
2576
2574
        }
2577
2575
        if (i >= 5) {
2635
2633
        /*
2636
2634
         * Release the resource so that parport_pc_probe_port can get it.
2637
2635
         */
2638
 
        release_resource(base_res);
 
2636
        release_region(inta_addr[i], 32);
2639
2637
        if (parport_pc_probe_port(ite8872_lpt, ite8872_lpthi,
2640
2638
                                   irq, PARPORT_DMA_NONE, &pdev->dev, 0)) {
2641
2639
                printk(KERN_INFO