blackfin: bf60x: fix compiling warning
authorBob Liu <lliubbo@gmail.com>
Thu, 17 May 2012 06:21:22 +0000 (14:21 +0800)
committerBob Liu <lliubbo@gmail.com>
Mon, 21 May 2012 06:54:26 +0000 (14:54 +0800)
Fix several compiling warning for bf60x.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
arch/blackfin/kernel/gptimers.c
arch/blackfin/mach-bf609/boards/ezkit.c
arch/blackfin/mach-common/cpufreq.c

index f7afe570f880c2afc4361e2e273103e3efee3a98..d776773d38694818ae4e891a3274a43515e3e5de 100644 (file)
@@ -332,13 +332,15 @@ static void _disable_gptimers(uint16_t mask)
 
 void disable_gptimers(uint16_t mask)
 {
+#ifndef CONFIG_BF60x
        int i;
        _disable_gptimers(mask);
-#ifndef CONFIG_BF60x
        for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i)
                if (mask & (1 << i))
                        bfin_write(&group_regs[BFIN_TIMER_OCTET(i)]->status, trun_mask[i]);
        SSYNC();
+#else
+       _disable_gptimers(mask);
 #endif
 }
 EXPORT_SYMBOL(disable_gptimers);
index 0c96754b4d39e61ed957ffaeb0d918cefda95fb5..1222cfb90d183d7f4870e4634e3346f2ca6d6210 100644 (file)
@@ -105,6 +105,8 @@ static struct platform_device bfin_rotary_device = {
 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
 #include <linux/stmmac.h>
 
+static unsigned short pins[] = P_RMII0;
+
 static struct stmmac_mdio_bus_data phy_private_data = {
        .bus_id = 0,
        .phy_mask = 1,
@@ -1283,7 +1285,6 @@ static int __init ezkit_init(void)
                                ARRAY_SIZE(bfin_i2c_board_info1));
 
 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
-       unsigned short pins[] = P_RMII0;
        if (!peripheral_request_list(pins, "emac0"))
                printk(KERN_ERR "%s(): request emac pins failed\n", __func__);
 #endif
index 3b688797c78fe5865e382fd5fe114bf3ffa415fe..6e87dc13f6bfa1dde4dbfa72e4ce506b711cad62 100644 (file)
@@ -111,6 +111,7 @@ static unsigned int bfin_getfreq_khz(unsigned int cpu)
        return get_cclk() / 1000;
 }
 
+#ifdef CONFIG_BF60x
 unsigned long cpu_set_cclk(int cpu, unsigned long new)
 {
        struct clk *clk;
@@ -124,11 +125,15 @@ unsigned long cpu_set_cclk(int cpu, unsigned long new)
        clk_put(clk);
        return ret;
 }
+#endif
 
 static int bfin_target(struct cpufreq_policy *poli,
                        unsigned int target_freq, unsigned int relation)
 {
-       unsigned int index, plldiv, cpu;
+#ifndef CONFIG_BF60x
+       unsigned int plldiv;
+#endif
+       unsigned int index, cpu;
        unsigned long flags, cclk_hz;
        struct cpufreq_freqs freqs;
        static unsigned long lpj_ref;