[U-Boot] [PATCH 3/4] s5p6442: Support serial driver

Minkyu Kang promsoft at gmail.com
Mon Mar 29 08:15:14 CEST 2010


Dear Joonyoung Shim,

On 29 March 2010 11:56, Joonyoung Shim <jy0922.shim at samsung.com> wrote:
> This patch is for serial support of s5p6442 SoC.
>
> Cc: Minkyu Kang <mk7.kang at samsung.com>
> Cc: Kyungmin Park <kyungmin.park at samsung.com>
> Signed-off-by: Joonyoung Shim <jy0922.shim at samsung.com>
> ---
>  common/serial.c             |    2 +-
>  drivers/serial/Makefile     |    1 +
>  drivers/serial/serial_s5p.c |    5 +++++
>  include/serial.h            |    2 +-
>  4 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/common/serial.c b/common/serial.c
> index 94e1921..385c42b 100644
> --- a/common/serial.c
> +++ b/common/serial.c
> @@ -69,7 +69,7 @@ struct serial_device *__default_serial_console (void)
>  #else
>  #error "CONFIG_SERIAL? missing."
>  #endif
> -#elif defined(CONFIG_S5PC1XX)
> +#elif defined(CONFIG_S5PC1XX) || defined(CONFIG_S5P64XX)
>  #if defined(CONFIG_SERIAL0)
>        return &s5p_serial0_device;
>  #elif defined(CONFIG_SERIAL1)
> diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
> index 71392e6..110b7e1 100644
> --- a/drivers/serial/Makefile
> +++ b/drivers/serial/Makefile
> @@ -34,6 +34,7 @@ COBJS-$(CONFIG_SYS_NS16550) += ns16550.o
>  COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
>  COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
>  COBJS-$(CONFIG_S5PC1XX) += serial_s5p.o
> +COBJS-$(CONFIG_S5P64XX) += serial_s5p.o
>  COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
>  COBJS-$(CONFIG_CLPS7111_SERIAL) += serial_clps7111.o
>  COBJS-$(CONFIG_IMX_SERIAL) += serial_imx.o
> diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
> index 68b8d01..1e7426d 100644
> --- a/drivers/serial/serial_s5p.c
> +++ b/drivers/serial/serial_s5p.c
> @@ -31,10 +31,15 @@ static inline struct s5p_uart *s5p_get_base_uart(int dev_index)
>  {
>        u32 offset = dev_index * sizeof(struct s5p_uart);
>
> +#ifdef CONFIG_S5PC1XX
>        if (cpu_is_s5pc100())
>                return (struct s5p_uart *)(S5PC100_UART_BASE + offset);
>        else
>                return (struct s5p_uart *)(S5PC110_UART_BASE + offset);
> +#elif CONFIG_S5P64XX
> +       if (cpu_is_s5p6442())
> +               return (struct s5p_uart *)(S5P6442_UART_BASE + offset);

need else or return.

> +#endif
>  }
>
>  /*
> diff --git a/include/serial.h b/include/serial.h
> index 4caf790..bf15212 100644
> --- a/include/serial.h
> +++ b/include/serial.h
> @@ -43,7 +43,7 @@ extern struct serial_device s3c24xx_serial1_device;
>  extern struct serial_device s3c24xx_serial2_device;
>  #endif
>
> -#if defined(CONFIG_S5PC1XX)
> +#if defined(CONFIG_S5PC1XX) || defined(CONFIG_S5P64XX)
>  extern struct serial_device s5p_serial0_device;
>  extern struct serial_device s5p_serial1_device;
>  extern struct serial_device s5p_serial2_device;
> --
> 1.6.3.3
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

Thanks
Minkyu Kang
-- 
from. prom.
www.promsoft.net


More information about the U-Boot mailing list