Skip to content

Commit

Permalink
ARM: mach-shmobile: sh7377 and G4EVM pinmux support
Browse files Browse the repository at this point in the history
Add support for the sh 7377 pinmux using drivers/sh/pfc.c
and some LEDs on G4EVM.

Signed-off-by: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
NISHIMOTO Hiroki authored and Paul Mundt committed Feb 15, 2010
1 parent 3a7b802 commit 276b4f6
Show file tree
Hide file tree
Showing 6 changed files with 2,153 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-shmobile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ config MACH_G3EVM
config MACH_G4EVM
bool "G4EVM board"
depends on ARCH_SH7377
select ARCH_REQUIRE_GPIOLIB

config MACH_AP4EVB
bool "AP4EVB board"
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-shmobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7367.o intc-sh7372.o

# Pinmux setup
pfc-$(CONFIG_ARCH_SH7367) := pfc-sh7367.o
pfc-$(CONFIG_ARCH_SH7377) := pfc-sh7377.o
obj-$(CONFIG_GENERIC_GPIO) += $(pfc-y)

# Board objects
Expand Down
24 changes: 24 additions & 0 deletions arch/arm/mach-shmobile/board-g4evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <mach/sh7377.h>
#include <mach/common.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -113,6 +115,28 @@ static void __init g4evm_map_io(void)

static void __init g4evm_init(void)
{
sh7377_pinmux_init();

/* Lit DS14 LED */
gpio_request(GPIO_PORT109, NULL);
gpio_direction_output(GPIO_PORT109, 1);
gpio_export(GPIO_PORT109, 1);

/* Lit DS15 LED */
gpio_request(GPIO_PORT110, NULL);
gpio_direction_output(GPIO_PORT110, 1);
gpio_export(GPIO_PORT110, 1);

/* Lit DS16 LED */
gpio_request(GPIO_PORT112, NULL);
gpio_direction_output(GPIO_PORT112, 1);
gpio_export(GPIO_PORT112, 1);

/* Lit DS17 LED */
gpio_request(GPIO_PORT113, NULL);
gpio_direction_output(GPIO_PORT113, 1);
gpio_export(GPIO_PORT113, 1);

sh7377_add_standard_devices();

platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices));
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-shmobile/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ extern void sh7367_pinmux_init(void);
extern void sh7377_init_irq(void);
extern void sh7377_add_early_devices(void);
extern void sh7377_add_standard_devices(void);
extern void sh7377_pinmux_init(void);

extern void sh7372_init_irq(void);
extern void sh7372_add_early_devices(void);
Expand Down
Loading

0 comments on commit 276b4f6

Please sign in to comment.