aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-05-10 20:08:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-11 14:50:41 -0400
commit1073e4ee595265086a592a056d903bf4fcc8885a (patch)
tree1cd9726f80abf3625df6ac7c31ffd68087c7bff1
parentf59a59fea3be78c2bda23cb7f55225b33c502c3c (diff)
bcma: add missing GPIO defines, use PULL register only when available
Similar patch was commited to ssb. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/bcma/driver_chipcommon.c6
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h5
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c
index caf596091d4d..606102256b44 100644
--- a/drivers/bcma/driver_chipcommon.c
+++ b/drivers/bcma/driver_chipcommon.c
@@ -29,8 +29,10 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
29 if (cc->core->id.rev >= 35) 29 if (cc->core->id.rev >= 35)
30 cc->capabilities_ext = bcma_cc_read32(cc, BCMA_CC_CAP_EXT); 30 cc->capabilities_ext = bcma_cc_read32(cc, BCMA_CC_CAP_EXT);
31 31
32 bcma_cc_write32(cc, 0x58, 0); 32 if (cc->core->id.rev >= 20) {
33 bcma_cc_write32(cc, 0x5C, 0); 33 bcma_cc_write32(cc, BCMA_CC_GPIOPULLUP, 0);
34 bcma_cc_write32(cc, BCMA_CC_GPIOPULLDOWN, 0);
35 }
34 36
35 if (cc->capabilities & BCMA_CC_CAP_PMU) 37 if (cc->capabilities & BCMA_CC_CAP_PMU)
36 bcma_pmu_init(cc); 38 bcma_pmu_init(cc);
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 4f8fd6a4c1e6..083c3b6cd5ce 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -113,6 +113,8 @@
113#define BCMA_CC_FLASHDATA 0x0048 113#define BCMA_CC_FLASHDATA 0x0048
114#define BCMA_CC_BCAST_ADDR 0x0050 114#define BCMA_CC_BCAST_ADDR 0x0050
115#define BCMA_CC_BCAST_DATA 0x0054 115#define BCMA_CC_BCAST_DATA 0x0054
116#define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */
117#define BCMA_CC_GPIOPULLDOWN 0x005C /* Rev >= 20 only */
116#define BCMA_CC_GPIOIN 0x0060 118#define BCMA_CC_GPIOIN 0x0060
117#define BCMA_CC_GPIOOUT 0x0064 119#define BCMA_CC_GPIOOUT 0x0064
118#define BCMA_CC_GPIOOUTEN 0x0068 120#define BCMA_CC_GPIOOUTEN 0x0068
@@ -121,6 +123,9 @@
121#define BCMA_CC_GPIOIRQ 0x0074 123#define BCMA_CC_GPIOIRQ 0x0074
122#define BCMA_CC_WATCHDOG 0x0080 124#define BCMA_CC_WATCHDOG 0x0080
123#define BCMA_CC_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ 125#define BCMA_CC_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */
126#define BCMA_CC_GPIOTIMER_OFFTIME 0x0000FFFF
127#define BCMA_CC_GPIOTIMER_OFFTIME_SHIFT 0
128#define BCMA_CC_GPIOTIMER_ONTIME 0xFFFF0000
124#define BCMA_CC_GPIOTIMER_ONTIME_SHIFT 16 129#define BCMA_CC_GPIOTIMER_ONTIME_SHIFT 16
125#define BCMA_CC_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ 130#define BCMA_CC_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */
126#define BCMA_CC_CLOCK_N 0x0090 131#define BCMA_CC_CLOCK_N 0x0090