提交 af325e95 编写于 作者: Y Ye Li 提交者: Tom Rini

serial_lpuart: Fix config check issue when using clk driver in SPL

Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will
check the CONFIG_SPL_CLK when building SPL
Signed-off-by: NYe Li <ye.li@nxp.com>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 d44f7932
...@@ -106,7 +106,7 @@ u32 __weak get_lpuart_clk(void) ...@@ -106,7 +106,7 @@ u32 __weak get_lpuart_clk(void)
return CONFIG_SYS_CLK_FREQ; return CONFIG_SYS_CLK_FREQ;
} }
#if IS_ENABLED(CONFIG_CLK) #if CONFIG_IS_ENABLED(CLK)
static int get_lpuart_clk_rate(struct udevice *dev, u32 *clk) static int get_lpuart_clk_rate(struct udevice *dev, u32 *clk)
{ {
struct clk per_clk; struct clk per_clk;
...@@ -148,7 +148,7 @@ static void _lpuart_serial_setbrg(struct udevice *dev, ...@@ -148,7 +148,7 @@ static void _lpuart_serial_setbrg(struct udevice *dev,
u16 sbr; u16 sbr;
int ret; int ret;
if (IS_ENABLED(CONFIG_CLK)) { if (CONFIG_IS_ENABLED(CLK)) {
ret = get_lpuart_clk_rate(dev, &clk); ret = get_lpuart_clk_rate(dev, &clk);
if (ret) if (ret)
return; return;
...@@ -237,7 +237,7 @@ static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev, ...@@ -237,7 +237,7 @@ static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev,
u32 clk; u32 clk;
int ret; int ret;
if (IS_ENABLED(CONFIG_CLK)) { if (CONFIG_IS_ENABLED(CLK)) {
ret = get_lpuart_clk_rate(dev, &clk); ret = get_lpuart_clk_rate(dev, &clk);
if (ret) if (ret)
return; return;
...@@ -306,7 +306,7 @@ static void _lpuart32_serial_setbrg(struct udevice *dev, ...@@ -306,7 +306,7 @@ static void _lpuart32_serial_setbrg(struct udevice *dev,
u32 sbr; u32 sbr;
int ret; int ret;
if (IS_ENABLED(CONFIG_CLK)) { if (CONFIG_IS_ENABLED(CLK)) {
ret = get_lpuart_clk_rate(dev, &clk); ret = get_lpuart_clk_rate(dev, &clk);
if (ret) if (ret)
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册