#include <linux/delay.h>
#include <asm/io.h>
-#ifdef CONFIG_DM_SERIAL
+#if CONFIG_IS_ENABLED(DM_SERIAL)
#include <asm/arch/atmel_serial.h>
#endif
#include <asm/arch/clk.h>
DECLARE_GLOBAL_DATA_PTR;
-#ifndef CONFIG_DM_SERIAL
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
static void atmel_serial_setbrg_internal(atmel_usart3_t *usart, int id,
int baudrate)
{
static void atmel_serial_setbrg(void)
{
atmel_serial_setbrg_internal((atmel_usart3_t *)CFG_USART_BASE,
- CONFIG_USART_ID, gd->baudrate);
+ CFG_USART_ID, gd->baudrate);
}
static int atmel_serial_init(void)
{
return &atmel_serial_drv;
}
-#endif
-
-#ifdef CONFIG_DM_SERIAL
+#else
enum serial_clk_type {
CLK_TYPE_NORMAL = 0,
CLK_TYPE_DBGU,
priv->usart_clk_rate = clk_rate;
- clk_free(&clk);
-
return 0;
}
#endif