ARM: tegra12: clock: Fix build warnings
Kaz Fukuoka [Wed, 24 Apr 2013 23:18:17 +0000 (16:18 -0700)]
bug 1164664

Change-Id: I9e0ce6db2d2f925f4fe957b42f4f3770be0ff871
Signed-off-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-on: http://git-master/r/223026
Reviewed-by: Hoang Pham <hopham@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Chao Xu <cxu@nvidia.com>

arch/arm/mach-tegra/clock.c

index 4925f9d..21eb63b 100644 (file)
@@ -1083,10 +1083,14 @@ unsigned long tegra_clk_measure_input_freq(void)
        if (osc_freq)
                return osc_freq;
 
-       writel(OSC_FREQ_DET_TRIG | 1, clk_base + OSC_FREQ_DET);
-       do {} while (readl(clk_base + OSC_FREQ_DET_STATUS) & OSC_FREQ_DET_BUSY);
-
-       clock_autodetect = readl(clk_base + OSC_FREQ_DET_STATUS);
+       writel(OSC_FREQ_DET_TRIG | 1,
+               (void *)((uintptr_t)clk_base + OSC_FREQ_DET));
+       do {} while (readl(
+               (void *)((uintptr_t)clk_base + OSC_FREQ_DET_STATUS))
+               & OSC_FREQ_DET_BUSY);
+
+       clock_autodetect = readl(
+               (void *)((uintptr_t)clk_base + OSC_FREQ_DET_STATUS));
        if (clock_autodetect >= 732 - 3 && clock_autodetect <= 732 + 3) {
                osc_freq = 12000000;
        } else if (clock_autodetect >= 794 - 3 && clock_autodetect <= 794 + 3) {