[U-Boot] [PATCH v4 3/7] drivers: i2c: mxc: Solve the compiler error when using i2c dm mode

Prabhakar Kushwaha prabhakar.kushwaha at nxp.com
Thu Aug 22 08:33:59 UTC 2019


> -----Original Message-----
> From: Chuanhua Han <chuanhua.han at nxp.com>
> Sent: Wednesday, July 10, 2019 6:30 PM
> To: albert.u.boot at aribaud.net; Priyanka Jain <priyanka.jain at nxp.com>; Udit
> Agarwal <udit.agarwal at nxp.com>; hs at denx.de; Prabhakar Kushwaha
> <prabhakar.kushwaha at nxp.com>
> Cc: u-boot at lists.denx.de; Chuanhua Han <chuanhua.han at nxp.com>
> Subject: [PATCH v4 3/7] drivers: i2c: mxc: Solve the compiler error when
> using i2c dm mode
> 
> This patch solved the following compilation error:
> 
> 1.Remove the definition of CONFIG_SYS_I2C to solve the following
> compilation issue:
> In file included from include/config.h:8:0,
>                  from include/common.h:20:
> include/config_fallbacks.h:51:4: error: #error "Cannot define
> CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
>  #  error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
>     ^~~~~
> In file included from include/config.h:8:0,
>                  from include/common.h:20:
> include/config_fallbacks.h:51:4: error: #error "Cannot define
> CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
>  #  error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
>     ^~~~~
> 
> 2.Remove the definition of CONFIG_SYS_I2C_EARLY_INIT to solve the
> following compilation issue:
> board/freescale/lx2160a/lx2160a.c: In function 'board_early_init_f':
> board/freescale/lx2160a/lx2160a.c:108:2: warning: implicit declaration of
> function 'i2c_early_init_f'; did you mean 'arch_early_init_r'?
> [-Wimplicit-function-declaration]
>   i2c_early_init_f();
>   ^~~~~~~~~~~~~~~~
>   arch_early_init_r
> 
> 3.Move the enable_i2c_clk function definition to resolve the following
> compilation issues:
>   drivers/i2c/mxc_i2c.c: In function 'mxc_i2c_probe':
>   drivers/i2c/mxc_i2c.c:824:8: warning: implicit declaration of function
> 'enable_i2c_clk';
>   did you mean 'enable_irq_wake'? [-Wimplicit-function-declaration]
>   ret = enable_i2c_clk(1, bus->seq);
>         ^~~~~~~~~~~~~~
>         enable_irq_wake
> 
> Signed-off-by: Chuanhua Han <chuanhua.han at nxp.com>
> ---


This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk


More information about the U-Boot mailing list