Skip to content

Commit

Permalink
sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Oct 23, 2008
1 parent 0835f12 commit 61dc6ea
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
1 change: 1 addition & 0 deletions arch/sh/boards/mach-highlander/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config SH_R7780MP
config SH_R7785RP
bool "R7785RP board support"
depends on CPU_SUBTYPE_SH7785
select GENERIC_GPIO

endchoice

Expand Down
10 changes: 5 additions & 5 deletions arch/sh/boards/mach-highlander/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
20 changes: 20 additions & 0 deletions arch/sh/boards/mach-highlander/pinmux-r7785rp.c
Original file line number Diff line number Diff line change
@@ -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);
}
2 changes: 2 additions & 0 deletions arch/sh/boards/mach-highlander/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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..
*/
Expand Down
6 changes: 6 additions & 0 deletions arch/sh/include/mach-common/mach/highlander.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,10 @@

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 */

0 comments on commit 61dc6ea

Please sign in to comment.