diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-07-22 19:20:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-08 14:29:29 -0400 |
commit | 908debc8da0d5a91418f71c6a462f62bd2ac69ef (patch) | |
tree | 886072e213b3a67650a53574be916ec105d15b61 /drivers/bcma/driver_mips.c | |
parent | e3afe0e5be7576ac1282ea9fbbc9b352bb379227 (diff) |
bcma: get CPU clock
Add method to return the clock of the CPU. This is needed by the arch
code to calculate the mips_hpt_frequency.
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_mips.c')
-rw-r--r-- | drivers/bcma/driver_mips.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c index b17233cb75c6..c3e9dff4224e 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c | |||
@@ -166,6 +166,18 @@ static void bcma_core_mips_dump_irq(struct bcma_bus *bus) | |||
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
169 | u32 bcma_cpu_clock(struct bcma_drv_mips *mcore) | ||
170 | { | ||
171 | struct bcma_bus *bus = mcore->core->bus; | ||
172 | |||
173 | if (bus->drv_cc.capabilities & BCMA_CC_CAP_PMU) | ||
174 | return bcma_pmu_get_clockcpu(&bus->drv_cc); | ||
175 | |||
176 | pr_err("No PMU available, need this to get the cpu clock\n"); | ||
177 | return 0; | ||
178 | } | ||
179 | EXPORT_SYMBOL(bcma_cpu_clock); | ||
180 | |||
169 | static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore) | 181 | static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore) |
170 | { | 182 | { |
171 | struct bcma_bus *bus = mcore->core->bus; | 183 | struct bcma_bus *bus = mcore->core->bus; |