]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.
authorPaul Mundt <lethal@linux-sh.org>
Thu, 23 Oct 2008 03:35:43 +0000 (12:35 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 23 Oct 2008 03:35:43 +0000 (12:35 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/mach-highlander/Kconfig
arch/sh/boards/mach-highlander/Makefile
arch/sh/boards/mach-highlander/pinmux-r7785rp.c [new file with mode: 0644]
arch/sh/boards/mach-highlander/setup.c
arch/sh/include/mach-common/mach/highlander.h

index fc8f28e04ba3d306a362e191fd6440b4b6416110..08057f62687b7bcc3e3687dabf4b53554500d080 100644 (file)
@@ -18,6 +18,7 @@ config SH_R7780MP
 config SH_R7785RP
        bool "R7785RP board support"
        depends on CPU_SUBTYPE_SH7785
+       select GENERIC_GPIO
 
 endchoice
 
index 20a10080b11fefbb430ed4f8470eda59d9890f94..d93aaf88013447338c36d4c4e2143a800f720db3 100644 (file)
@@ -1,10 +1,10 @@
 #
-# Makefile for the R7780RP-1 specific parts of the kernel
+# Makefile for the Highlander specific parts of the kernel
 #
-irqinit-$(CONFIG_SH_R7780MP)   := irq-r7780mp.o
-irqinit-$(CONFIG_SH_R7785RP)   := irq-r7785rp.o
-irqinit-$(CONFIG_SH_R7780RP)   := irq-r7780rp.o
-obj-y                          := setup.o $(irqinit-y)
+obj-y                          := setup.o
+obj-$(CONFIG_SH_R7780RP)       += irq-r7780rp.o
+obj-$(CONFIG_SH_R7780MP)       += irq-r7780mp.o
+obj-$(CONFIG_SH_R7785RP)       += irq-r7785rp.o pinmux-r7785rp.o
 
 ifneq ($(CONFIG_SH_R7785RP),y)
 obj-$(CONFIG_PUSH_SWITCH)      += psw.o
diff --git a/arch/sh/boards/mach-highlander/pinmux-r7785rp.c b/arch/sh/boards/mach-highlander/pinmux-r7785rp.c
new file mode 100644 (file)
index 0000000..c77a2be
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2008 Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/init.h>
+#include <linux/gpio.h>
+#include <cpu/sh7785.h>
+
+void __init highlander_plat_pinmux_setup(void)
+{
+       /* SCIF0 */
+       gpio_request(GPIO_FN_SCIF0_CTS, NULL);
+       gpio_request(GPIO_FN_SCIF0_RTS, NULL);
+       gpio_request(GPIO_FN_SCIF0_SCK, NULL);
+       gpio_request(GPIO_FN_SCIF0_RXD, NULL);
+       gpio_request(GPIO_FN_SCIF0_TXD, NULL);
+}
index c5a40f7906d789b453ff9e8a4e1fc2961b345fc8..806438b42cacbf68f2748c7a1ed3c04a4df82a98 100644 (file)
@@ -294,6 +294,8 @@ static void __init highlander_setup(char **cmdline_p)
                         (ver >> 12) & 0xf, (ver >> 8) & 0xf,
                         (ver >>  4) & 0xf, ver & 0xf);
 
+       highlander_plat_pinmux_setup();
+
        /*
         * Enable the important clocks right away..
         */
index 306f7359f7d4c345a9cb8b19b7556d79720a3969..bd26a848cb0b3a2a991d31460089baa71800b792 100644 (file)
 
 unsigned char *highlander_plat_irq_setup(void);
 
+#ifdef CONFIG_SH_R7785RP
+void highlander_plat_pinmux_setup(void);
+#else
+#define highlander_plat_pinmux_setup() do { } while (0)
+#endif
+
 #endif  /* __ASM_SH_RENESAS_R7780RP */