ARM: shmobile: lager: Initialize pinmux
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 8 Apr 2013 09:36:22 +0000 (11:36 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 5 Jun 2013 08:18:24 +0000 (17:18 +0900)
Initialize r8a7790 pinmuxing and register mappings for the two debug
serial ports.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/board-lager.c

index f587187a86031f1c88d236818d712ee31e7d098a..6114edd0a977271f131a6b1b4300590754ea003e 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/irqchip.h>
 #include <linux/kernel.h>
+#include <linux/pinctrl/machine.h>
 #include <linux/platform_device.h>
 #include <mach/common.h>
 #include <mach/r8a7790.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+static const struct pinctrl_map lager_pinctrl_map[] = {
+       /* SCIF0 (CN19: DEBUG SERIAL0) */
+       PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
+                                 "scif0_data", "scif0"),
+       /* SCIF1 (CN20: DEBUG SERIAL1) */
+       PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
+                                 "scif1_data", "scif1"),
+};
+
 static void __init lager_add_standard_devices(void)
 {
        r8a7790_clock_init();
+
+       pinctrl_register_mappings(lager_pinctrl_map,
+                                 ARRAY_SIZE(lager_pinctrl_map));
+       r8a7790_pinmux_init();
+
        r8a7790_add_standard_devices();
 }