Hi,

On Mon, Sep 17, 2012 at 09:56:43AM -0700, Tony Lindgren wrote:
> * Fengguang Wu <fengguang...@intel.com> [120916 17:41]:
> > Hi Tony,
> > 
> > FYI, kernel build failed on
> > 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git 
> > tmp-merge
> > head:   a742996f4643b4e9612fe081d146035964cfbd87
> > commit: 7d7e1eba7e92c2f9c76db80adc24836e7a114bfb [31/47] ARM: OMAP2+: 
> > Prepare for irqs.h removal
> > config: x86_64-randconfig-s331 (attached as .config)
> > 
> > All related error/warning messages:
> > 
> > drivers/mfd/twl-core.c:49:22: fatal error: plat/cpu.h: No such file or 
> > directory
> > compilation terminated.
> > 
> > vim +49 drivers/mfd/twl-core.c
> >     44      #include <linux/regulator/machine.h>
> >     45      
> >     46      #include <linux/i2c.h>
> >     47      #include <linux/i2c/twl.h>
> >     48      
> >   > 49      #include <plat/cpu.h>
> >     50      
> >     51      #include "twl-core.h"
> >     52      
> >     53      /*
> >     54       * The TWL4030 "Triton 2" is one of a family of a 
> > multi-function "Power
> 
> OK thanks for letting me know. That include needs to be ifdeffed until
> we remove all cpu_is_omap usage from drivers. I'll take a look and will
> also check if other drivers may have the same issue.

the only use of cpu_is_* in that driver is related to the osc_ck clock
name. Isn't this enough ?

From: Felipe Balbi <ba...@ti.com>
Subject: mfd: twl-core: drop cpu_is_* usage


NYET-Signed-off-by: Felipe Balbi <ba...@ti.com>
---

diff --git a/arch/arm/mach-omap2/clock2430_data.c 
b/arch/arm/mach-omap2/clock2430_data.c
index cacabb0..b2e6080 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -1855,7 +1855,7 @@ static struct omap_clk omap2430_clks[] = {
        /* external root sources */
        CLK(NULL,       "func_32k_ck",  &func_32k_ck,   CK_243X),
        CLK(NULL,       "secure_32k_ck", &secure_32k_ck, CK_243X),
-       CLK(NULL,       "osc_ck",       &osc_ck,        CK_243X),
+       CLK(NULL,       "osc_sys_ck",   &osc_ck,        CK_243X),
        CLK(NULL,       "sys_ck",       &sys_ck,        CK_243X),
        CLK(NULL,       "alt_ck",       &alt_ck,        CK_243X),
        CLK(NULL,       "mcbsp_clks",   &mcbsp_clks,    CK_243X),
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 1c32afe..e4fff17 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1132,11 +1132,7 @@ static void clocks_init(struct device *dev,
        u32 rate;
        u8 ctrl = HFCLK_FREQ_26_MHZ;
 
-#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
-       if (cpu_is_omap2430())
-               osc = clk_get(dev, "osc_ck");
-       else
-               osc = clk_get(dev, "osc_sys_ck");
+       osc = clk_get(dev, "osc_sys_ck");
 
        if (IS_ERR(osc)) {
                printk(KERN_WARNING "Skipping twl internal clock init and "
@@ -1147,18 +1143,6 @@ static void clocks_init(struct device *dev,
        rate = clk_get_rate(osc);
        clk_put(osc);
 
-#else
-       /* REVISIT for non-OMAP systems, pass the clock rate from
-        * board init code, using platform_data.
-        */
-       osc = ERR_PTR(-EIO);
-
-       printk(KERN_WARNING "Skipping twl internal clock init and "
-              "using bootloader value (unknown osc rate)\n");
-
-       return;
-#endif
-
        switch (rate) {
        case 19200000:
                ctrl = HFCLK_FREQ_19p2_MHZ;

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to