Commit f7fed1b5 authored by Komal Shah's avatar Komal Shah Committed by Tony Lindgren

[PATCH] ARM: OMAP: [PATCH] OMAP24xx serial.c clock update

Moved UART clock initialisation code from clock.c
to serial.c
Signed-off-by: default avatarKomal Shah <komal_shah802003@yahoo.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 39352eab
...@@ -1080,13 +1080,5 @@ int __init omap2_clk_init(void) ...@@ -1080,13 +1080,5 @@ int __init omap2_clk_init(void)
if (cpu_is_omap2430()) if (cpu_is_omap2430())
clk_use(&sdrc_ick); clk_use(&sdrc_ick);
/* FIXME: Move these to serial setup */
clk_use(&uart1_ick);
clk_use(&uart1_fck);
clk_use(&uart2_ick);
clk_use(&uart2_fck);
clk_use(&uart3_ick);
clk_use(&uart3_fck);
return 0; return 0;
} }
...@@ -18,10 +18,18 @@ ...@@ -18,10 +18,18 @@
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/common.h> #include <asm/arch/common.h>
#include <asm/arch/board.h> #include <asm/arch/board.h>
static struct clk * uart1_ick = NULL;
static struct clk * uart1_fck = NULL;
static struct clk * uart2_ick = NULL;
static struct clk * uart2_fck = NULL;
static struct clk * uart3_ick = NULL;
static struct clk * uart3_fck = NULL;
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.membase = (char *)IO_ADDRESS(OMAP_UART1_BASE), .membase = (char *)IO_ADDRESS(OMAP_UART1_BASE),
...@@ -105,6 +113,54 @@ void __init omap_serial_init() ...@@ -105,6 +113,54 @@ void __init omap_serial_init()
continue; continue;
} }
switch (i) {
case 0:
uart1_ick = clk_get(NULL, "uart1_ick");
if (IS_ERR(uart1_ick))
printk("Could not get uart1_ick\n");
else {
clk_use(uart1_ick);
}
uart1_fck = clk_get(NULL, "uart1_fck");
if (IS_ERR(uart1_fck))
printk("Could not get uart1_fck\n");
else {
clk_use(uart1_fck);
}
break;
case 1:
uart2_ick = clk_get(NULL, "uart2_ick");
if (IS_ERR(uart2_ick))
printk("Could not get uart2_ick\n");
else {
clk_use(uart2_ick);
}
uart2_fck = clk_get(NULL, "uart2_fck");
if (IS_ERR(uart2_fck))
printk("Could not get uart2_fck\n");
else {
clk_use(uart2_fck);
}
break;
case 2:
uart3_ick = clk_get(NULL, "uart3_ick");
if (IS_ERR(uart3_ick))
printk("Could not get uart3_ick\n");
else {
clk_use(uart3_ick);
}
uart3_fck = clk_get(NULL, "uart3_fck");
if (IS_ERR(uart3_fck))
printk("Could not get uart3_fck\n");
else {
clk_use(uart3_fck);
}
break;
}
omap_serial_reset(p); omap_serial_reset(p);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment