ARM: NUC900: enable uart support for nuc932
Subsystems (2)
PATCH 4/4 ARM: NUC900: enable uart support for nuc932
Dear Russell,
This patch enables uart support for nuc932.
--- arch/arm/mach-w90x900/clock.h | 2 ++ arch/arm/mach-w90x900/cpu.h | 2 +- arch/arm/mach-w90x900/mach-nuc932evb.c | 1 + arch/arm/mach-w90x900/nuc932.c | 10 ++++++++++ arch/arm/mach-w90x900/nuc932.h | 1 + 5 files changed, 15 insertions(+), 1 deletions(-)
arch/arm/mach-w90x900/clock.h +2 -0
@@ -14,8 +14,10 @@#ifndef CONFIG_CPU_NUC932 #define EXTCLK 15000000 +#define UARTCLK 11313600#else #define EXTCLK 27000000 +#define UARTCLK 57139200#endif void nuc900_clk_enable (struct clk *clk,int enable);
arch/arm/mach-w90x900/cpu.h +1 -1
@@ -30,7 +30,7 @@ .membase = name##_BA, \ .mapbase = name##_PA, \ .irq = IRQ_##name, \ - .uartclk = 11313600, \ + .uartclk = UARTCLK, \ .regshift = 2, \ .iotype = UPIO_MEM, \ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
arch/arm/mach-w90x900/mach-nuc932evb.c +1 -0
@@ -23,6 +23,7 @@ static void __init nuc932evb_map_io(void) {nuc932_map_io ();nuc932_init_clocks (); +nuc932_init_uartclk (); }static void __init nuc932evb_init (void )
arch/arm/mach-w90x900/nuc932.c +10 -0
@@ -80,6 +80,16 @@ void __init nuc932_map_io(void)nuc900_map_io (nuc932evb_iodesc,ARRAY_SIZE (nuc932evb_iodesc)); } +/*enable NUC932 uart clock*/ + +void __init nuc932_init_uartclk (void ) +{ +struct clk *ck_uart =clk_get (NULL ,"uart" ); +BUG_ON (IS_ERR (ck_uart)); + +clk_enable (ck_uart); +} +/*Init NUC932 clock*/ void __init nuc932_init_clocks (void )
arch/arm/mach-w90x900/nuc932.h +1 -0
@@ -26,3 +26,4 @@ extern struct sys_timer nuc900_timer;extern void nuc932_board_init (void );extern void nuc932_init_clocks (void );extern void nuc932_map_io (void ); +extern void nuc932_init_uartclk (void );
Signature · 1 line
1.5.6.3
arch/arm/mach-w90x900/clock.h line 21
Quoted 13 lines · Wan ZongShun
arch/arm/mach-w90x900/clock.h +2
-0@@ -14,8 +14,10 @@#ifndef CONFIG_CPU_NUC932 #define EXTCLK 15000000 +#define UARTCLK 11313600#else #define EXTCLK 27000000 +#define UARTCLK 57139200#endif
As far as I can see, these are the only thing which prevent a single kernel being built to cover both NUC900 and NUC932.
Can we make their selection something which is done at runtime instead of compile time? This comments goes for patch 5837/1 in the patch system as well.
2009/12/4 Russell King - ARM Linux <[email protected]>:
Quoted 18 lines · Wan ZongShun
arch/arm/mach-w90x900/clock.h line 21
Quoted 13 lines
arch/arm/mach-w90x900/clock.h +2
-0@@ -14,8 +14,10 @@ #ifndef CONFIG_CPU_NUC932 #define EXTCLK 15000000 +#define UARTCLK 11313600 #else #define EXTCLK 27000000 +#define UARTCLK 57139200 #endifAs far as I can see, these are the only thing which prevent a single kernel being built to cover both NUC900 and NUC932.
Quoted 4 lines
Can we make their selection something which is done at runtime instead of compile time? This comments goes for patch 5837/1 in the patch system as well.
Do you mean that I should use following form instead?
"if (machine_is_nuc932evb())"
code....
Signature · 3 lines
linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel