sh: Use sh7722 GPIO on Migo-R board
PATCH 3/9 sh: Use sh7722 GPIO on Migo-R board
From: Magnus Damm <[email protected]>
This patch enables the GPIO code on Migo-R and converts the code from register based pinmux configuration to GPIO based pin by pin setup. Fix whitespace damage while at it and add 2 LEDs and export them to user space.
Signed-off-by Magnus Damm <[email protected]>
---
arch/sh/boards/Kconfig | 1 arch/sh/boards/mach-migor/lcd_qvga.c | 6 - arch/sh/boards/mach-migor/setup.c | 187 +++++++++++++++++++++------------- 3 files changed, 125 insertions(+), 69 deletions(-)
arch/sh/boards/Kconfig +1 -0
@@ -162,6 +162,7 @@ config SH_SH7785LCR_29BIT_PHYSMAPS config SH_MIGOR bool "Migo-R" depends on CPU_SUBTYPE_SH7722 + select GENERIC_GPIO help Select Migo-R if configuring for the SH7722 Migo-R platform by Renesas System Solutions Asia Pte. Ltd.
arch/sh/boards/mach-migor/lcd_qvga.c +4 -2
@@ -17,7 +17,9 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/gpio.h> #include <video/sh_mobile_lcdc.h> +#include <asm/sh7722.h> #include <asm/migor.h> /* LCD Module is a PH240320T according to board schematics. This module
@@ -30,9 +32,9 @@static void reset_lcd_module (void ) { -ctrl_outb (ctrl_inb (PORT_PHDR ) & ~0x04 ,PORT_PHDR ); +gpio_set_value (GPIO_PTH2 ,0 );mdelay (2 ); -ctrl_outb (ctrl_inb (PORT_PHDR ) |0x04 ,PORT_PHDR ); +gpio_set_value (GPIO_PTH2 ,1 );mdelay (1 ); }
arch/sh/boards/mach-migor/setup.c +120 -67
243 lines not on this page · raw message