Skip to contentSkip to conversation

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

PATCH New Ye Li 3 participants 3 messages Jul 11, 2019 – Aug 13, 2019

lore
Share & tools
lore

Ye Li

author
#0 lore raw

PATCH 1/1 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

---
 drivers/serial/serial_lpuart.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/serial/serial_lpuart.c +4 -4
index a357b00..5f6329f 100644
@@ -105,7 +105,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;
@@ -147,7 +147,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;
@@ -236,7 +236,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;
@@ -305,7 +305,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;
Signature · 1 line
2.7.4
#1 lore raw

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

Quoted 9 lines · Ye Li

Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will check the CONFIG_SPL_CLK when building SPL

---
 drivers/serial/serial_lpuart.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
#2 lore raw

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

In reply to Ye Li
Quoted 5 lines · Ye Li

Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will check the CONFIG_SPL_CLK when building SPL

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190813/e62ff1ac/attachment.sig>