diff --git a/arch/arm/configs/ap4evb_defconfig b/arch/arm/configs/ap4evb_defconfig index 261913d05b4a6ffedebbd1dc25a176b0d676ff0e..e14229be767694bdccefd85c6ba1aca39c145237 100644 --- a/arch/arm/configs/ap4evb_defconfig +++ b/arch/arm/configs/ap4evb_defconfig @@ -322,7 +322,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySC0,115200" +CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=sh-sci.0,115200" # CONFIG_XIP_KERNEL is not set CONFIG_KEXEC=y CONFIG_ATAGS_PROC=y diff --git a/arch/arm/configs/g3evm_defconfig b/arch/arm/configs/g3evm_defconfig index d323ff7efa25ddaa37dc8ae042c5dd318f74a191..3c19031961dbcef21a790970dced87f5f956f1a1 100644 --- a/arch/arm/configs/g3evm_defconfig +++ b/arch/arm/configs/g3evm_defconfig @@ -317,7 +317,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySC1,115200" +CONFIG_CMDLINE="console=ttySC1,115200 earlyprintk=sh-sci.1,115200" # CONFIG_XIP_KERNEL is not set CONFIG_KEXEC=y CONFIG_ATAGS_PROC=y diff --git a/arch/arm/configs/g4evm_defconfig b/arch/arm/configs/g4evm_defconfig index ce8e05fe1a103b3d9e50fa441befe350ade37108..8ee79a537134849eab82ab7908b480cc1a632a45 100644 --- a/arch/arm/configs/g4evm_defconfig +++ b/arch/arm/configs/g4evm_defconfig @@ -322,7 +322,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySC4,115200" +CONFIG_CMDLINE="console=ttySC4,115200 earlyprintk=sh-sci.4,115200" # CONFIG_XIP_KERNEL is not set CONFIG_KEXEC=y CONFIG_ATAGS_PROC=y diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 88893dbf710783738c209909f692156768401a74..800e7dd9e9d15e2e4f4a146472e39e8013a096af 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile @@ -3,7 +3,7 @@ # # Common objects -obj-y := timer.o +obj-y := timer.o console.o # CPU objects obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index a8d815c962327b77f4899462e4e9d79d43900c24..94b545b3fe820914309492331a7b5d78d821ad96 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -105,9 +105,10 @@ static void __init ap4evb_map_io(void) { iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); - /* setup early devices and clocks here as well */ + /* setup early devices, clocks and console here as well */ sh7372_add_early_devices(); sh7367_clock_init(); /* use g3 clocks for now */ + shmobile_setup_console(); } static void __init ap4evb_init(void) diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c index b4b202718e4d6875a11044108a9939266967368d..eba2311beba2271daf4bb80ff7d6dd30c775d9b9 100644 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ b/arch/arm/mach-shmobile/board-g3evm.c @@ -105,9 +105,10 @@ static void __init g3evm_map_io(void) { iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc)); - /* setup early devices and clocks here as well */ + /* setup early devices, clocks and console here as well */ sh7367_add_early_devices(); sh7367_clock_init(); + shmobile_setup_console(); } static void __init g3evm_init(void) diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c index 0d2948f17766d3d3308db78f897be4d93d7338f5..0ddde038588e0721e7f09869754911f721fa3fd1 100644 --- a/arch/arm/mach-shmobile/board-g4evm.c +++ b/arch/arm/mach-shmobile/board-g4evm.c @@ -105,9 +105,10 @@ static void __init g4evm_map_io(void) { iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); - /* setup early devices and clocks here as well */ + /* setup early devices, clocks and console here as well */ sh7377_add_early_devices(); sh7367_clock_init(); /* use g3 clocks for now */ + shmobile_setup_console(); } static void __init g4evm_init(void) diff --git a/arch/arm/mach-shmobile/console.c b/arch/arm/mach-shmobile/console.c new file mode 100644 index 0000000000000000000000000000000000000000..9411a5bf4fd6ede59d8f939b9074727c23543aa8 --- /dev/null +++ b/arch/arm/mach-shmobile/console.c @@ -0,0 +1,31 @@ +/* + * SH-Mobile Console + * + * Copyright (C) 2010 Magnus Damm + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include +#include +#include +#include +#include + +void __init shmobile_setup_console(void) +{ + parse_early_param(); + + /* Let earlyprintk output early console messages */ + early_platform_driver_probe("earlyprintk", 1, 1); +} diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index a12eb4d75f6381d1a8d8bf5a4da56646d70ad07e..f5986ea561f33eb31b44056dd696db7215e633bb 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -2,6 +2,7 @@ #define __ARCH_MACH_COMMON_H extern struct sys_timer shmobile_timer; +extern void shmobile_setup_console(void); extern void sh7367_init_irq(void); extern void sh7367_add_early_devices(void);