aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_chipcommon.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-09-29 20:29:49 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-10-19 15:52:18 -0400
commit49655bb8a51565f0375a4f783334c9de78134be5 (patch)
tree2e1b63c9fa53e5e53190ff2d9d652dd057158846 /drivers/bcma/driver_chipcommon.c
parentMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next (diff)
downloadlinux-dev-49655bb8a51565f0375a4f783334c9de78134be5.tar.xz
linux-dev-49655bb8a51565f0375a4f783334c9de78134be5.zip
bcma: just do the necessary things in early register on SoCs
Some parts of the initialization for chip common and the pcie core are accessing the sprom struct, but it is not initialized at that stage. Just do the necessary thing in the early register on SoCs and not the complete initialization to read out the nvram from the flash chip. After it is possible to read out the nvram, the sprom should be parsed from it and the full initialization of the cores should be run. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_chipcommon.c')
-rw-r--r--drivers/bcma/driver_chipcommon.c23
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,
return value;
}
-void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
+void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)
{
- u32 leddc_on = 10;
- u32 leddc_off = 90;
-
- if (cc->setup_done)
+ if (cc->early_setup_done)
return;
if (cc->core->id.rev >= 11)
@@ -36,6 +33,22 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
if (cc->core->id.rev >= 35)
cc->capabilities_ext = bcma_cc_read32(cc, BCMA_CC_CAP_EXT);
+ if (cc->capabilities & BCMA_CC_CAP_PMU)
+ bcma_pmu_early_init(cc);
+
+ cc->early_setup_done = true;
+}
+
+void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
+{
+ u32 leddc_on = 10;
+ u32 leddc_off = 90;
+
+ if (cc->setup_done)
+ return;
+
+ bcma_core_chipcommon_early_init(cc);
+
if (cc->core->id.rev >= 20) {
bcma_cc_write32(cc, BCMA_CC_GPIOPULLUP, 0);
bcma_cc_write32(cc, BCMA_CC_GPIOPULLDOWN, 0);