ssb: cc: clear GPIOPULL registers on init
authorRafał Miłecki <zajec5@gmail.com>
Sun, 24 Apr 2011 09:04:19 +0000 (11:04 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Apr 2011 18:50:20 +0000 (14:50 -0400)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/ssb/driver_chipcommon.c
include/linux/ssb/ssb_driver_chipcommon.h

index 7c031fdc8205eff8475ecbd11dc098f3beb0c584..b4b3733aefcf74a976cf7c42aea04648fb1abd8a 100644 (file)
@@ -260,6 +260,12 @@ void ssb_chipcommon_init(struct ssb_chipcommon *cc)
        if (cc->dev->id.revision >= 11)
                cc->status = chipco_read32(cc, SSB_CHIPCO_CHIPSTAT);
        ssb_dprintk(KERN_INFO PFX "chipcommon status is 0x%x\n", cc->status);
+
+       if (cc->dev->id.revision >= 20) {
+               chipco_write32(cc, SSB_CHIPCO_GPIOPULLUP, 0);
+               chipco_write32(cc, SSB_CHIPCO_GPIOPULLDOWN, 0);
+       }
+
        ssb_pmu_init(cc);
        chipco_powercontrol_init(cc);
        ssb_chipco_set_clockmode(cc, SSB_CLKMODE_FAST);
index 4f2d77a0c021ea21df709946391572a84bb422a6..a08d693d832461fe84805e372776dc98bf8cbb9b 100644 (file)
 #define SSB_CHIPCO_FLASHDATA           0x0048
 #define SSB_CHIPCO_BCAST_ADDR          0x0050
 #define SSB_CHIPCO_BCAST_DATA          0x0054
+#define SSB_CHIPCO_GPIOPULLUP          0x0058          /* Rev >= 20 only */
+#define SSB_CHIPCO_GPIOPULLDOWN                0x005C          /* Rev >= 20 only */
 #define SSB_CHIPCO_GPIOIN              0x0060
 #define SSB_CHIPCO_GPIOOUT             0x0064
 #define SSB_CHIPCO_GPIOOUTEN           0x0068