aboutsummaryrefslogtreecommitdiff
path: root/drivers/bcma/driver_pci.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2011-07-23 01:20:07 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-08-08 14:29:24 -0400
commit517f43e5a922d51ac960424de4f72676fe6a7390 (patch)
tree02920911d43c4e480ac0eba21c15587776b16d6b /drivers/bcma/driver_pci.c
parent67a5c29e1623edda5ff3f0355af533e72a245ad9 (diff)
bcma: add functions to scan cores needed on SoCs
The chip common and mips core have to be setup early in the boot process to get the cpu clock. bcma_bus_early_register() gets pointers to some space to store the core data and searches for the chip common and mips core and initializes chip common. After that was done and the kernel is out of early boot we just have to run bcma_bus_register() and it will search for the other cores, initialize and register them. The cores are getting the same numbers as before. Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_pci.c')
-rw-r--r--drivers/bcma/driver_pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c
index 25f3ddf3382..4e082100fa9 100644
--- a/drivers/bcma/driver_pci.c
+++ b/drivers/bcma/driver_pci.c
@@ -189,6 +189,9 @@ static bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
void bcma_core_pci_init(struct bcma_drv_pci *pc)
{
+ if (pc->setup_done)
+ return;
+
if (bcma_core_pci_is_in_hostmode(pc)) {
#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
bcma_core_pci_hostmode_init(pc);
@@ -198,6 +201,8 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
} else {
bcma_core_pci_clientmode_init(pc);
}
+
+ pc->setup_done = true;
}
int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,