Skip to contentSkip to conversation

sh: sh7722 earlyprintk using early platform sh-sci

RFC PATCH New Magnus Damm 1 participant 1 message May 14, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 sh: sh7722 earlyprintk using early platform sh-sci

From: Magnus Damm <[email protected]>

This patch shows how to use sh-sci for earlyprintk using the early platform interface. Only sh7722 is supported and one per uart per platform device is required.

To enable early printk on the first serial port, pass "earlyprintk=sh-sci.0" on the kernel command line.

---

 arch/sh/Kconfig.debug                  |   26 -----
 arch/sh/kernel/cpu/sh4a/setup-sh7722.c |   74 ++++++++++------
 arch/sh/kernel/early_printk.c          |  142 --------------------------------
 arch/sh/kernel/setup.c                 |    5 +
 drivers/serial/sh-sci.c                |   51 +++++++++--
 5 files changed, 93 insertions(+), 205 deletions(-)
arch/sh/Kconfig.debug +0 -26
@@ -19,34 +19,8 @@ config SH_STANDARD_BIOS
 	  mask ROM and no flash (WindowsCE machines fall in this category).
 	  If unsure, say N.
 
-config EARLY_SCIF_CONSOLE
-	bool "Use early SCIF console"
-	help
-	  This enables an early console using a fixed SCIF port. This can
-	  be used by platforms that are either not running the SH
-	  standard BIOS, or do not wish to use the BIOS callbacks for the
-	  serial I/O.
-
-config EARLY_SCIF_CONSOLE_PORT
-	hex
-	depends on EARLY_SCIF_CONSOLE
-	default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
-	default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
-	default "0xf8420000" if CPU_SUBTYPE_SH7619
-	default "0xff804000" if CPU_SUBTYPE_MXG
-	default "0xffc30000" if CPU_SUBTYPE_SHX3
-	default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763 || \
-				CPU_SUBTYPE_SH7722 || CPU_SUBTYPE_SH7366 || \
-				CPU_SUBTYPE_SH7343
-	default "0xffea0000" if CPU_SUBTYPE_SH7785
-	default "0xfffe8000" if CPU_SUBTYPE_SH7203
-	default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
-	default "0xffe80000" if CPU_SH4
-	default "0x00000000"
-
 config EARLY_PRINTK
 	bool "Early printk support"
-	depends on SH_STANDARD_BIOS || EARLY_SCIF_CONSOLE
 	help
 	  Say Y here to redirect kernel printk messages to the serial port
 	  used by the SH-IPL bootloader, starting very early in the boot
arch/sh/kernel/cpu/sh4a/setup-sh7722.c +46 -28

100 lines not on this page · raw message

arch/sh/kernel/early_printk.c +0 -142

159 lines not on this page · raw message

arch/sh/kernel/setup.c +5 -0
@@ -386,6 +386,11 @@ void __init setup_arch(char **cmdline_p)
 
 	plat_early_device_setup();
 
+#ifdef CONFIG_EARLY_PRINTK
+	/* Let earlyprintk output early console messages */
+	early_platform_driver_probe("earlyprintk", 1, 1);
+#endif
+
 	sh_mv_setup();
 
 	/*
drivers/serial/sh-sci.c +42 -9

103 lines not on this page · raw message