Skip to content

RFC sh: Early serial console rework V2

Magnus Damm linux-sh 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5sh-sci: disable callback typo fixdrivers/serial/sh-sci.c+1 -10 replies
2/5Driver Core: Early platform driver bufferdrivers/base/platform.c include/linux/platform_device.h+37 -122 replies
3/5sh-sci: Extend sh-sci driver with early consolearch/sh/Kconfig.debug arch/sh/kernel/early_printk.c drivers/serial/sh-sci.c+49 -180 replies
4/5sh: Break out SH7724 serial portsarch/sh/kernel/cpu/sh4a/setup-sh7724.c+101 -440 replies
5/5sh: Remove old early serial console codearch/sh/Kconfig.debug arch/sh/kernel/early_printk.c+0 -1630 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/05][RFC] sh: Early serial console rework V2

sh: Early serial console rework V2

[PATCH 01/05] sh-sci: disable callback typo fix [PATCH 02/05] Driver Core: Early platform driver buffer [PATCH 03/05] sh-sci: Extend sh-sci driver with early console [PATCH 04/05] sh: Break out SH7724 serial ports [PATCH 05/05] sh: Remove old early serial console code

These patches move the early serial console code into the sh-sci driver. Apart from removing duplicated code, this also allows for a wider range of supported ports - SCI, SCIF and SCIFA should now be supported. The rework allows us to select the early serial console port with the kernel command line. As an example, to enable early serial console on KFR2R09, simply add the following to the kernel command line: "earlyprintk=sh-sci.1,115200".

If the SuperH specific bits look OK then I'll break out serial port data for other processors as well and submit the driver core bits to LKML.

Tested on sh7724 / KFR2R09.

---

 arch/sh/Kconfig.debug                  |   21 ----
 arch/sh/kernel/cpu/sh4a/setup-sh7724.c |  145 +++++++++++++++++++++---------
 arch/sh/kernel/early_printk.c          |  153 --------------------------------
 arch/sh/kernel/setup.c                 |    5 +
 drivers/base/platform.c                |   29 ++++--
 drivers/serial/sh-sci.c                |   58 ++++++++++--
 include/linux/platform_device.h        |   20 +++-
 7 files changed, 193 insertions(+), 238 deletions(-)