]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qd65xx: fix setup of QD6580 Control register
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 26 Feb 2008 20:50:35 +0000 (21:50 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 26 Feb 2008 20:50:35 +0000 (21:50 +0100)
Control register of QD6580 should be setup before probing for devices.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/legacy/qd65xx.c

index bba29df5f21d6094660c777724c38ef9d2de454b..1ec0e970f57797c2ce1725384f2c39fd9446f9f3 100644 (file)
@@ -444,6 +444,8 @@ static int __init qd_probe(int base)
                printk(KERN_DEBUG "qd6580: config=%#x, control=%#x, ID3=%u\n",
                        config, control, QD_ID3);
 
+               outb(QD_DEF_CONTR, QD_CONTROL_PORT);
+
                if (control & QD_CONTR_SEC_DISABLED) {
                        /* secondary disabled */
 
@@ -460,8 +462,6 @@ static int __init qd_probe(int base)
 
                        ide_device_add(idx, &qd65xx_port_info);
 
-                       outb(QD_DEF_CONTR, QD_CONTROL_PORT);
-
                        return 1;
                } else {
                        ide_hwif_t *mate;
@@ -487,8 +487,6 @@ static int __init qd_probe(int base)
 
                        ide_device_add(idx, &qd65xx_port_info);
 
-                       outb(QD_DEF_CONTR, QD_CONTROL_PORT);
-
                        return 0; /* no other qd65xx possible */
                }
        }