serial_lpuart: Fix config check issue when using clk driver in SPL
authorYe Li <ye.li@nxp.com>
Thu, 11 Jul 2019 03:33:34 +0000 (03:33 +0000)
committerTom Rini <trini@konsulko.com>
Sun, 11 Aug 2019 20:43:41 +0000 (16:43 -0400)
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: Ye Li <ye.li@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/serial/serial_lpuart.c

index 57dd4a72c6d1a42404a0b655535cd304d6a5838d..4b0a964d1b0e79d23260301d47f26081243e84ed 100644 (file)
@@ -106,7 +106,7 @@ u32 __weak get_lpuart_clk(void)
        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)
 {
        struct clk per_clk;
@@ -148,7 +148,7 @@ static void _lpuart_serial_setbrg(struct udevice *dev,
        u16 sbr;
        int ret;
 
-       if (IS_ENABLED(CONFIG_CLK)) {
+       if (CONFIG_IS_ENABLED(CLK)) {
                ret = get_lpuart_clk_rate(dev, &clk);
                if (ret)
                        return;
@@ -237,7 +237,7 @@ static void _lpuart32_serial_setbrg_7ulp(struct udevice *dev,
        u32 clk;
        int ret;
 
-       if (IS_ENABLED(CONFIG_CLK)) {
+       if (CONFIG_IS_ENABLED(CLK)) {
                ret = get_lpuart_clk_rate(dev, &clk);
                if (ret)
                        return;
@@ -306,7 +306,7 @@ static void _lpuart32_serial_setbrg(struct udevice *dev,
        u32 sbr;
        int ret;
 
-       if (IS_ENABLED(CONFIG_CLK)) {
+       if (CONFIG_IS_ENABLED(CLK)) {
                ret = get_lpuart_clk_rate(dev, &clk);
                if (ret)
                        return;