Patchwork [U-Boot] exynos: uart: Use generic api to the uart clk freq

login
register
mail settings
Submitter Akshay Saraswat
Date March 25, 2013, 9:02 a.m.
Message ID <1364202173-13719-2-git-send-email-akshay.s@samsung.com>
Download mbox | patch
Permalink /patch/230590/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Akshay Saraswat - March 25, 2013, 9:02 a.m.
From: Padmavathi Venna <padma.v@samsung.com>

Use generic api to get the uart clock frequency

This patch depends on:
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/154930

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
---
 drivers/serial/serial_s5p.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Minkyu Kang - June 4, 2013, 8:02 a.m.
On 25/03/13 18:02, Akshay Saraswat wrote:
> From: Padmavathi Venna <padma.v@samsung.com>
> 
> Use generic api to get the uart clock frequency
> 
> This patch depends on:
> http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/154930
> 
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
> ---
>  drivers/serial/serial_s5p.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
> index 3c41242..7058d55 100644
> --- a/drivers/serial/serial_s5p.c
> +++ b/drivers/serial/serial_s5p.c
> @@ -65,7 +65,7 @@ static const int udivslot[] = {
>  void serial_setbrg_dev(const int dev_index)
>  {
>  	struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
> -	u32 uclk = get_uart_clk(dev_index);
> +	u32 uclk = clock_get_periph_rate(PERIPH_ID_UART0 + dev_index);
>  	u32 baudrate = gd->baudrate;
>  	u32 val;
>  
> 

Since clock_get_periph_rate did not implemented on exynos4, exynos4 will get zero.
So, I'll not accept this patch.

Thanks,
Minkyu Kang.

Patch

diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 3c41242..7058d55 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -65,7 +65,7 @@  static const int udivslot[] = {
 void serial_setbrg_dev(const int dev_index)
 {
 	struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
-	u32 uclk = get_uart_clk(dev_index);
+	u32 uclk = clock_get_periph_rate(PERIPH_ID_UART0 + dev_index);
 	u32 baudrate = gd->baudrate;
 	u32 val;