ARM: shmobile: use common extra gpio functions on g4evm

This patch switch over to use common extra gpio method,
and reduced a waste of code on SH-ARM.

But these functions should be replaced by correct
gpio function in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
Kuninori Morimoto 2012-06-25 03:41:27 -07:00 коммит произвёл Rafael J. Wysocki
Родитель 5ca1d44f6a
Коммит 6f00294fc0
1 изменённых файлов: 10 добавлений и 28 удалений

Просмотреть файл

@ -271,24 +271,6 @@ static struct platform_device *g4evm_devices[] __initdata = {
#define GPIO_SDHID1_D3 0xe6052106
#define GPIO_SDHICMD1 0xe6052107
/*
* FIXME !!
*
* gpio_pull_up is quick_hack.
*
* current gpio frame work doesn't have
* the method to control only pull up/down/free.
* this function should be replaced by correct gpio function
*/
static void __init gpio_pull_up(u32 addr)
{
u8 data = __raw_readb(addr);
data &= 0x0F;
data |= 0xC0;
__raw_writeb(data, addr);
}
static void __init g4evm_init(void)
{
sh7377_pinmux_init();
@ -351,11 +333,11 @@ static void __init g4evm_init(void)
gpio_request(GPIO_FN_SDHID0_3, NULL);
gpio_request(GPIO_FN_SDHICMD0, NULL);
gpio_request(GPIO_FN_SDHIWP0, NULL);
gpio_pull_up(GPIO_SDHID0_D0);
gpio_pull_up(GPIO_SDHID0_D1);
gpio_pull_up(GPIO_SDHID0_D2);
gpio_pull_up(GPIO_SDHID0_D3);
gpio_pull_up(GPIO_SDHICMD0);
gpio_request_pullup(GPIO_SDHID0_D0);
gpio_request_pullup(GPIO_SDHID0_D1);
gpio_request_pullup(GPIO_SDHID0_D2);
gpio_request_pullup(GPIO_SDHID0_D3);
gpio_request_pullup(GPIO_SDHICMD0);
/* SDHI1 */
gpio_request(GPIO_FN_SDHICLK1, NULL);
@ -364,11 +346,11 @@ static void __init g4evm_init(void)
gpio_request(GPIO_FN_SDHID1_2, NULL);
gpio_request(GPIO_FN_SDHID1_3, NULL);
gpio_request(GPIO_FN_SDHICMD1, NULL);
gpio_pull_up(GPIO_SDHID1_D0);
gpio_pull_up(GPIO_SDHID1_D1);
gpio_pull_up(GPIO_SDHID1_D2);
gpio_pull_up(GPIO_SDHID1_D3);
gpio_pull_up(GPIO_SDHICMD1);
gpio_request_pullup(GPIO_SDHID1_D0);
gpio_request_pullup(GPIO_SDHID1_D1);
gpio_request_pullup(GPIO_SDHID1_D2);
gpio_request_pullup(GPIO_SDHID1_D3);
gpio_request_pullup(GPIO_SDHICMD1);
sh7377_add_standard_devices();