From: Michael Williamson Date: Tue, 31 Aug 2010 18:30:15 +0000 (-0400) Subject: davinci: Add machine checks to DA8XX serial console init routines X-Git-Tag: v2.6.37-rc1~122^2~1^2~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1aa5f2a9c1575279baf06e94a4bd3b3b86b7f176;p=karo-tx-linux.git davinci: Add machine checks to DA8XX serial console init routines This patch adds machine checks in the serial console init routines for the DA8XX EVM boards. This is needed because there are other DA8XX based machines that use a different UART/tty as the console and may be included in a common kernel build. Signed-off-by: Michael Williamson Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index de82739c00ec..ef1ab0b6576e 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -598,6 +598,9 @@ static __init void da830_evm_init(void) #ifdef CONFIG_SERIAL_8250_CONSOLE static int __init da830_evm_console_init(void) { + if (!machine_is_davinci_da830_evm()) + return 0; + return add_preferred_console("ttyS", 2, "115200"); } console_initcall(da830_evm_console_init); diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index c1d45d7ac45b..ac2297c69a92 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -859,6 +859,9 @@ static __init void da850_evm_init(void) #ifdef CONFIG_SERIAL_8250_CONSOLE static int __init da850_evm_console_init(void) { + if (!machine_is_davinci_da850_evm()) + return 0; + return add_preferred_console("ttyS", 2, "115200"); } console_initcall(da850_evm_console_init);