ARM: shmobile: koelsch: Enable SCIF0 and SCIF1 serial ports in DT
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 30 Apr 2014 00:31:46 +0000 (02:31 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 14 May 2014 00:56:38 +0000 (09:56 +0900)
SCIF0 and SCIF1 are used as debug serial ports. Enable them and
configure pinmuxing appropriately. We can now remove the clkdev
registration hack for SCIF devices from the Koelsch reference board
file.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au: added aliases to avoid device renumbering]
[horms+renesas@verge.net.au: resolved conflicts]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r8a7791-koelsch.dts
arch/arm/mach-shmobile/board-koelsch-reference.c
arch/arm/mach-shmobile/setup-r8a7791.c

index bdd73e6657b27a76ee2d2f7c37abdced267b96ae..10c6b4012e12e755ec6be06698afd2a4cbde0d58 100644 (file)
        model = "Koelsch";
        compatible = "renesas,koelsch", "renesas,r8a7791";
 
+       aliases {
+               serial6 = &scif0;
+               serial7 = &scif1;
+       };
+
        chosen {
                bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
        };
 };
 
 &pfc {
-       pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
+       pinctrl-0 = <&du_pins>;
        pinctrl-names = "default";
 
        i2c2_pins: i2c {
        status = "okay";
 };
 
+&scif0 {
+       pinctrl-0 = <&scif0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&scif1 {
+       pinctrl-0 = <&scif1_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &sdhi0 {
        pinctrl-0 = <&sdhi0_pins>;
        pinctrl-names = "default";
index bd9093221f769fd1ddddac3484a1a7109b9218b4..0b0ce5a92548632b3ac9cf1cdad2d696e606a784 100644 (file)
@@ -87,21 +87,6 @@ static void __init koelsch_add_du_device(void)
  */
 static const struct clk_name clk_names[] __initconst = {
        { "cmt0", "fck", "sh-cmt-48-gen2.0" },
-       { "scifa0", NULL, "sh-sci.0" },
-       { "scifa1", NULL, "sh-sci.1" },
-       { "scifb0", NULL, "sh-sci.2" },
-       { "scifb1", NULL, "sh-sci.3" },
-       { "scifb2", NULL, "sh-sci.4" },
-       { "scifa2", NULL, "sh-sci.5" },
-       { "scif0", NULL, "sh-sci.6" },
-       { "scif1", NULL, "sh-sci.7" },
-       { "scif2", NULL, "sh-sci.8" },
-       { "scif3", NULL, "sh-sci.9" },
-       { "scif4", NULL, "sh-sci.10" },
-       { "scif5", NULL, "sh-sci.11" },
-       { "scifa3", NULL, "sh-sci.12" },
-       { "scifa4", NULL, "sh-sci.13" },
-       { "scifa5", NULL, "sh-sci.14" },
        { "du0", "du.0", "rcar-du-r8a7791" },
        { "du1", "du.1", "rcar-du-r8a7791" },
        { "lvds0", "lvds.0", "rcar-du-r8a7791" },
index 561653d639d74ec9cd80e6ba778cdfbb4ab3227f..b3f42b5b172444e3405b1b16a1d2835105415c32 100644 (file)
@@ -181,6 +181,11 @@ static const struct resource thermal_resources[] __initconst = {
                                        ARRAY_SIZE(thermal_resources))
 
 void __init r8a7791_add_dt_devices(void)
+{
+       r8a7791_register_cmt(0);
+}
+
+void __init r8a7791_add_standard_devices(void)
 {
        r8a7791_register_scif(0);
        r8a7791_register_scif(1);
@@ -197,11 +202,6 @@ void __init r8a7791_add_dt_devices(void)
        r8a7791_register_scif(12);
        r8a7791_register_scif(13);
        r8a7791_register_scif(14);
-       r8a7791_register_cmt(0);
-}
-
-void __init r8a7791_add_standard_devices(void)
-{
        r8a7791_add_dt_devices();
        r8a7791_register_irqc(0);
        r8a7791_register_thermal();