ARM: shmobile: Add early debugging support using SCIF(A)
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 14 Nov 2014 15:49:47 +0000 (16:49 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 08:34:10 +0000 (17:34 +0900)
commit1fe7493109a0357c9e65695679bea617da692ca9
treefd5ca5e7274aac17e95b22234d3ba4390fdc4c2d
parenta68b3f9a4e3db2856e237a2742b910abe2e389c0
ARM: shmobile: Add early debugging support using SCIF(A)

Add serial port debug macros for the SCIF(A) serial ports.
This includes all supported shmobile SoCs, except for EMEV2.

The configuration logic (both Kconfig and #ifdef) is more complicated than
one would expect, for several reasons:
  1. Not all SoCs have the same serial devices, and they're not always
     at the same addresses.
  2. There are two different types: SCIF and SCIFA. Fortunately they can
     easily be distinguished by physical address.
  3. Not all boards use the same serial port for the console.
     The defaults correspond to the boards that are supported in
     mainline. If you want to use a different serial port, just change
     the value of CONFIG_DEBUG_UART_PHYS, and the rest will auto-adapt.
  4. debug_ll_io_init() maps the SCIF(A) registers to a fixed virtual
     address. 0xfdxxxxxx was chosen, as it should lie below VMALLOC_END
     = 0xff000000, and must not conflict with the 2 MiB reserved region
     at PCI_IO_VIRT_BASE = 0xfee00000.
       - On SoCs not using the legacy machine_desc.map_io(),
 debug_ll_io_init() is called by the ARM core code.
       - On SoCs using the legacy machine_desc.map_io(),
 debug_ll_io_init() must be called explicitly. Calls are added
 for r8a7740, r8a7779, sh7372, and sh73a0.

This was derived from the r8a7790 version by Laurent Pinchart.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7a2071c58f36450fbf44a27d2e5d371c18534a25)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/Kconfig.debug
MAINTAINERS
arch/arm/Kconfig.debug
arch/arm/include/debug/renesas-scif.S [new file with mode: 0644]
arch/arm/mach-shmobile/setup-r8a7740.c
arch/arm/mach-shmobile/setup-r8a7779.c
arch/arm/mach-shmobile/setup-sh7372.c
arch/arm/mach-shmobile/setup-sh73a0.c