[Tinyx-devel] [PATCH 3/3] Generic: Startup: Changing temporary UART code on main.c to clock subsyst
Status: Planning
Brought to you by:
davidcohen
From: David C. <da...@gm...> - 2008-01-12 16:56:05
|
This patch changes temporary UART code on main.c to use clock subsystem. Signed-off-by: David Cohen <da...@gm...> --- kernel/main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/main.c b/kernel/main.c index 297562b..68d7f95 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -21,6 +21,7 @@ #include <asm/arch-lpc2xxx/lpc2xxx.h> #include <asm/arch-lpc2xxx/start_lpc2148.h> +#include <asm/arch/clock.h> #include <asm/io.h> #include <tinyx/list.h> #include <tinyx/kernel.h> @@ -39,7 +40,7 @@ static void init_uart0(void) { /* unsigned int clk = B115200((CRYSTAL_FREQUENCY * PLL_FACTOR) / VPBDIV_FACTOR); */ - unsigned int clk = B115200(PCLK); + unsigned int clk = B115200(clk_get_rate(PCLK)); __raw_writel(0x5, PINSEL0); __raw_writel(0x80, U0LCR); __raw_writel((clk & 0xff), U0DLL); -- 1.5.3.7 |