diff options
Diffstat (limited to 'drivers/bcma/driver_chipcommon.c')
-rw-r--r-- | drivers/bcma/driver_chipcommon.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c index a4c3ebcc4c86..ffd74e51f02d 100644 --- a/drivers/bcma/driver_chipcommon.c +++ b/drivers/bcma/driver_chipcommon.c | |||
@@ -22,12 +22,9 @@ static inline u32 bcma_cc_write32_masked(struct bcma_drv_cc *cc, u16 offset, | |||
22 | return value; | 22 | return value; |
23 | } | 23 | } |
24 | 24 | ||
25 | void bcma_core_chipcommon_init(struct bcma_drv_cc *cc) | 25 | void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc) |
26 | { | 26 | { |
27 | u32 leddc_on = 10; | 27 | if (cc->early_setup_done) |
28 | u32 leddc_off = 90; | ||
29 | |||
30 | if (cc->setup_done) | ||
31 | return; | 28 | return; |
32 | 29 | ||
33 | if (cc->core->id.rev >= 11) | 30 | if (cc->core->id.rev >= 11) |
@@ -36,6 +33,22 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc) | |||
36 | if (cc->core->id.rev >= 35) | 33 | if (cc->core->id.rev >= 35) |
37 | cc->capabilities_ext = bcma_cc_read32(cc, BCMA_CC_CAP_EXT); | 34 | cc->capabilities_ext = bcma_cc_read32(cc, BCMA_CC_CAP_EXT); |
38 | 35 | ||
36 | if (cc->capabilities & BCMA_CC_CAP_PMU) | ||
37 | bcma_pmu_early_init(cc); | ||
38 | |||
39 | cc->early_setup_done = true; | ||
40 | } | ||
41 | |||
42 | void bcma_core_chipcommon_init(struct bcma_drv_cc *cc) | ||
43 | { | ||
44 | u32 leddc_on = 10; | ||
45 | u32 leddc_off = 90; | ||
46 | |||
47 | if (cc->setup_done) | ||
48 | return; | ||
49 | |||
50 | bcma_core_chipcommon_early_init(cc); | ||
51 | |||
39 | if (cc->core->id.rev >= 20) { | 52 | if (cc->core->id.rev >= 20) { |
40 | bcma_cc_write32(cc, BCMA_CC_GPIOPULLUP, 0); | 53 | bcma_cc_write32(cc, BCMA_CC_GPIOPULLUP, 0); |
41 | bcma_cc_write32(cc, BCMA_CC_GPIOPULLDOWN, 0); | 54 | bcma_cc_write32(cc, BCMA_CC_GPIOPULLDOWN, 0); |