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 <[email protected]>
---
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 --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"
 
-- 
2.52.0

Reply via email to