diff mbox series

[v2,3/4] serial: atmel-usart: include arch specific headers only for AT91

Message ID 20260112131258.182173-3-robert.marko@sartura.hr
State New
Delegated to: Eugen Hristev
Headers show
Series [v2,1/4] arm: at91: move atmel_serial.h to include/dm/platform_data | expand

Commit Message

Robert Marko Jan. 12, 2026, 1:12 p.m. UTC
Microchip LAN969x will not include any arch specific clk.h nor hardware.h,
so in order to support it only include <asm/arch/clk.h> and
<asm/arch/hardware.h> when AT91 is selected.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
Changes in v2:
* Use IS_ENABLED instead of CONFIG_IS_ENABLED when checking for
CONFIG_ARCH_AT91 as there is no SPL equivelant and CONFIG_IS_ENABLED
evaluates as CONFIG_ARCH_AT91 is not set thus not including the required
platform specific clock header.

 drivers/serial/atmel_usart.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index d6c3d4cbcc8..fb1c76fea8d 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -20,8 +20,10 @@ 
 #if CONFIG_IS_ENABLED(DM_SERIAL)
 #include <dm/platform_data/atmel_serial.h>
 #endif
+#if IS_ENABLED(CONFIG_ARCH_AT91)
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
+#endif
 
 #include "atmel_usart.h"