bcma: get CPU clock
[pandora-kernel.git] / drivers / bcma / driver_mips.c
index b17233c..c3e9dff 100644 (file)
@@ -166,6 +166,18 @@ static void bcma_core_mips_dump_irq(struct bcma_bus *bus)
        }
 }
 
+u32 bcma_cpu_clock(struct bcma_drv_mips *mcore)
+{
+       struct bcma_bus *bus = mcore->core->bus;
+
+       if (bus->drv_cc.capabilities & BCMA_CC_CAP_PMU)
+               return bcma_pmu_get_clockcpu(&bus->drv_cc);
+
+       pr_err("No PMU available, need this to get the cpu clock\n");
+       return 0;
+}
+EXPORT_SYMBOL(bcma_cpu_clock);
+
 static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
 {
        struct bcma_bus *bus = mcore->core->bus;