summaryrefslogtreecommitdiff
path: root/arch/mips/bcm47xx/time.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2011-07-23 03:20:12 +0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-08 22:29:30 +0400
commit08ccf57283f89adbc2ff897ad82d6ad4560db7cd (patch)
tree11d715ac33eab75e57a8e62b0b7d822e316a9145 /arch/mips/bcm47xx/time.c
parent908debc8da0d5a91418f71c6a462f62bd2ac69ef (diff)
downloadlinux-08ccf57283f89adbc2ff897ad82d6ad4560db7cd.tar.xz
bcm47xx: prepare to support different buses
Prepare bcm47xx to support different System buses. Before adding support for bcma it should be possible to build bcm47xx without the need of ssb. With this patch bcm47xx does not directly contain a ssb_bus, but a union contain all the supported system buses. As a SoC just uses one system bus a union is a good choice. 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 'arch/mips/bcm47xx/time.c')
-rw-r--r--arch/mips/bcm47xx/time.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/time.c b/arch/mips/bcm47xx/time.c
index 0c6f47b3fd94..50aea2e1808c 100644
--- a/arch/mips/bcm47xx/time.c
+++ b/arch/mips/bcm47xx/time.c
@@ -30,7 +30,7 @@
void __init plat_time_init(void)
{
- unsigned long hz;
+ unsigned long hz = 0;
/*
* Use deterministic values for initial counter interrupt
@@ -39,7 +39,12 @@ void __init plat_time_init(void)
write_c0_count(0);
write_c0_compare(0xffff);
- hz = ssb_cpu_clock(&ssb_bcm47xx.mipscore) / 2;
+ switch (bcm47xx_bus_type) {
+ case BCM47XX_BUS_TYPE_SSB:
+ hz = ssb_cpu_clock(&bcm47xx_bus.ssb.mipscore) / 2;
+ break;
+ }
+
if (!hz)
hz = 100000000;