From ffdfe2d50d47b26320bbfbbad7c0d03b105ec23a Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 24 Dec 2012 20:03:45 -0800 Subject: ARM: shmobile: fix sample amixer settings for mackerel This patch updates FSI-AK4643 amixer setting Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-mackerel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 2fed62f66045..002eaf689f8f 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -202,9 +202,7 @@ * * it needs amixer settings for playing * - * amixer set "Headphone" on - * amixer set "HPOUTL Mixer DACH" on - * amixer set "HPOUTR Mixer DACH" on + * amixer set "Headphone Enable" on */ /* Fixed 3.3V and 1.8V regulators to be used by multiple devices */ -- cgit v1.2.3 From d2b0812d4f01ea25a52bd30db90134a2cee1f78d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 24 Dec 2012 20:03:56 -0800 Subject: ARM: shmobile: add sample amixer settings for ap4evb FSI2A-AK4643 needs amixer setting to use it. This patch adds quick setting guide Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ap4evb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 99ef190d0909..70d287c28a62 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -143,6 +143,10 @@ * * SW41 : ON : SH-Mobile AP4 Audio Mode * : OFF : Bluetooth Audio Mode + * + * it needs amixer settings for playing + * + * amixer set "Headphone Enable" on */ /* -- cgit v1.2.3 From 1a695b3d0fe70a680e60f28bac7aad5c95b88226 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 24 Dec 2012 20:04:05 -0800 Subject: ARM: shmobile: add sample amixer settings for armadillo800eva wm8978 codec requires amixer settings for capture. This patch adds sample amixer settings on comment area. Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 5353adf6b828..5f179e1cb157 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -124,6 +124,14 @@ * this command is required when playback. * * # amixer set "Headphone" 50 + * + * this command is required when capture. + * + * # amixer set "Input PGA" 15 + * # amixer set "Left Input Mixer MicP" on + * # amixer set "Left Input Mixer MicN" on + * # amixer set "Right Input Mixer MicN" on + * # amixer set "Right Input Mixer MicP" on */ /* -- cgit v1.2.3 From cf24450528094e44c8b20008b79ff60ff522152c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 9 Jan 2013 01:52:42 +0100 Subject: ARM: shmobile: kzm9g: Use of_machine_is_compatible() The machine number is hardcoded to ~0 on DT-enabled machines, making machine_is_*() always fail when support for more than one machine is compiled into the kernel. Replace the machine_is_kzm9g() call with of_machine_is_compatible("renesas,kzm9g"). Signed-off-by: Laurent Pinchart Acked-by: Linus Walleij Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index c02448d6847f..eadf309dd473 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -623,7 +623,7 @@ static int __init as3711_enable_lcdc_backlight(void) 0x45, 0xf0, }; - if (!machine_is_kzm9g()) + if (!of_machine_is_compatible("renesas,kzm9g")) return 0; if (!a) -- cgit v1.2.3 From f3347b7a33512d55e11de419be335b7d8de9a572 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:28 +0100 Subject: ARM: shmobile: ag5evm: Use gpio_request_one() Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ag5evm.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 032d10817e79..5e7fe157f5a6 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c @@ -479,11 +479,10 @@ static void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) static int power_gpio = -EINVAL; if (power_gpio < 0) { - int ret = gpio_request(GPIO_PORT114, "sdhi1_power"); - if (!ret) { + int ret = gpio_request_one(GPIO_PORT114, GPIOF_OUT_INIT_LOW, + "sdhi1_power"); + if (!ret) power_gpio = GPIO_PORT114; - gpio_direction_output(power_gpio, 0); - } } /* @@ -604,14 +603,11 @@ static void __init ag5evm_init(void) gpio_request(GPIO_FN_MMCD0_5_PU, NULL); gpio_request(GPIO_FN_MMCD0_6_PU, NULL); gpio_request(GPIO_FN_MMCD0_7_PU, NULL); - gpio_request(GPIO_PORT208, NULL); /* Reset */ - gpio_direction_output(GPIO_PORT208, 1); + gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */ /* enable SMSC911X */ - gpio_request(GPIO_PORT144, NULL); /* PINTA2 */ - gpio_direction_input(GPIO_PORT144); - gpio_request(GPIO_PORT145, NULL); /* RESET */ - gpio_direction_output(GPIO_PORT145, 1); + gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */ + gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */ /* FSI A */ gpio_request(GPIO_FN_FSIACK, NULL); @@ -626,15 +622,13 @@ static void __init ag5evm_init(void) gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL); /* LCD panel */ - gpio_request(GPIO_PORT217, NULL); /* RESET */ - gpio_direction_output(GPIO_PORT217, 0); + gpio_request_one(GPIO_PORT217, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ mdelay(1); gpio_set_value(GPIO_PORT217, 1); mdelay(100); /* LCD backlight controller */ - gpio_request(GPIO_PORT235, NULL); /* RESET */ - gpio_direction_output(GPIO_PORT235, 0); + gpio_request_one(GPIO_PORT235, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ lcd_backlight_set_brightness(0); /* enable SDHI0 on CN15 [SD I/F] */ -- cgit v1.2.3 From 5683eafdfd039681a0d30c402a0675b521313659 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:29 +0100 Subject: ARM: shmobile: ap4evb: Use gpio_request_one() Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ap4evb.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 70d287c28a62..0c59464230fb 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -1046,9 +1046,7 @@ static int ts_get_pendown_state(void) gpio_free(GPIO_TSC_IRQ); - gpio_request(GPIO_TSC_PORT, NULL); - - gpio_direction_input(GPIO_TSC_PORT); + gpio_request_one(GPIO_TSC_PORT, GPIOF_IN, NULL); val = gpio_get_value(GPIO_TSC_PORT); @@ -1129,18 +1127,10 @@ static void __init ap4evb_init(void) gpio_request(GPIO_FN_IRQ6_39, NULL); /* enable Debug switch (S6) */ - gpio_request(GPIO_PORT32, NULL); - gpio_request(GPIO_PORT33, NULL); - gpio_request(GPIO_PORT34, NULL); - gpio_request(GPIO_PORT35, NULL); - gpio_direction_input(GPIO_PORT32); - gpio_direction_input(GPIO_PORT33); - gpio_direction_input(GPIO_PORT34); - gpio_direction_input(GPIO_PORT35); - gpio_export(GPIO_PORT32, 0); - gpio_export(GPIO_PORT33, 0); - gpio_export(GPIO_PORT34, 0); - gpio_export(GPIO_PORT35, 0); + gpio_request_one(GPIO_PORT32, GPIOF_IN | GPIOF_EXPORT, NULL); + gpio_request_one(GPIO_PORT33, GPIOF_IN | GPIOF_EXPORT, NULL); + gpio_request_one(GPIO_PORT34, GPIOF_IN | GPIOF_EXPORT, NULL); + gpio_request_one(GPIO_PORT35, GPIOF_IN | GPIOF_EXPORT, NULL); /* SDHI0 */ gpio_request(GPIO_FN_SDHICD0, NULL); @@ -1188,8 +1178,7 @@ static void __init ap4evb_init(void) gpio_request(GPIO_FN_FSIAILR, NULL); gpio_request(GPIO_FN_FSIAISLD, NULL); gpio_request(GPIO_FN_FSIAOSLD, NULL); - gpio_request(GPIO_PORT161, NULL); - gpio_direction_output(GPIO_PORT161, 0); /* slave */ + gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ gpio_request(GPIO_PORT9, NULL); gpio_request(GPIO_PORT10, NULL); @@ -1197,8 +1186,7 @@ static void __init ap4evb_init(void) gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */ /* card detect pin for MMC slot (CN7) */ - gpio_request(GPIO_PORT41, NULL); - gpio_direction_input(GPIO_PORT41); + gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL); /* setup FSI2 port B (HDMI) */ gpio_request(GPIO_FN_FSIBCK, NULL); @@ -1286,11 +1274,8 @@ static void __init ap4evb_init(void) gpio_request(GPIO_FN_LCDDISP, NULL); gpio_request(GPIO_FN_LCDDCK, NULL); - gpio_request(GPIO_PORT189, NULL); /* backlight */ - gpio_direction_output(GPIO_PORT189, 1); - - gpio_request(GPIO_PORT151, NULL); /* LCDDON */ - gpio_direction_output(GPIO_PORT151, 1); + gpio_request_one(GPIO_PORT189, GPIOF_OUT_INIT_HIGH, NULL); /* backlight */ + gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ lcdc_info.clock_source = LCDC_CLK_BUS; lcdc_info.ch[0].interface_type = RGB18; -- cgit v1.2.3 From 0f69e708159ded249fb73f8fe40508100a2cc54e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:30 +0100 Subject: ARM: shmobile: armadillo800eva: Use gpio_request_one() Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva.c | 48 +++++++++----------------- 1 file changed, 17 insertions(+), 31 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 5f179e1cb157..efd6a36ef769 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -1000,16 +1000,12 @@ static void __init eva_init(void) gpio_request(GPIO_FN_LCD0_DISP, NULL); gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL); - gpio_request(GPIO_PORT61, NULL); /* LCDDON */ - gpio_direction_output(GPIO_PORT61, 1); - - gpio_request(GPIO_PORT202, NULL); /* LCD0_LED_CONT */ - gpio_direction_output(GPIO_PORT202, 0); + gpio_request_one(GPIO_PORT61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ + gpio_request_one(GPIO_PORT202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */ /* Touchscreen */ gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */ - gpio_request(GPIO_PORT166, NULL); /* TP_RST_B */ - gpio_direction_output(GPIO_PORT166, 1); + gpio_request_one(GPIO_PORT166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */ /* GETHER */ gpio_request(GPIO_FN_ET_CRS, NULL); @@ -1032,12 +1028,10 @@ static void __init eva_init(void) gpio_request(GPIO_FN_ET_RX_DV, NULL); gpio_request(GPIO_FN_ET_RX_CLK, NULL); - gpio_request(GPIO_PORT18, NULL); /* PHY_RST */ - gpio_direction_output(GPIO_PORT18, 1); + gpio_request_one(GPIO_PORT18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */ /* USB */ - gpio_request(GPIO_PORT159, NULL); /* USB_DEVICE_MODE */ - gpio_direction_input(GPIO_PORT159); + gpio_request_one(GPIO_PORT159, GPIOF_IN, NULL); /* USB_DEVICE_MODE */ if (gpio_get_value(GPIO_PORT159)) { /* USB Host */ @@ -1051,8 +1045,7 @@ static void __init eva_init(void) * and select GPIO_PORT209 here */ gpio_request(GPIO_FN_IRQ7_PORT209, NULL); - gpio_request(GPIO_PORT209, NULL); - gpio_direction_input(GPIO_PORT209); + gpio_request_one(GPIO_PORT209, GPIOF_IN, NULL); platform_device_register(&usbhsf_device); usb = &usbhsf_device; @@ -1067,12 +1060,9 @@ static void __init eva_init(void) gpio_request(GPIO_FN_SDHI0_D3, NULL); gpio_request(GPIO_FN_SDHI0_WP, NULL); - gpio_request(GPIO_PORT17, NULL); /* SDHI0_18/33_B */ - gpio_request(GPIO_PORT74, NULL); /* SDHI0_PON */ - gpio_request(GPIO_PORT75, NULL); /* SDSLOT1_PON */ - gpio_direction_output(GPIO_PORT17, 0); - gpio_direction_output(GPIO_PORT74, 1); - gpio_direction_output(GPIO_PORT75, 1); + gpio_request_one(GPIO_PORT17, GPIOF_OUT_INIT_LOW, NULL); /* SDHI0_18/33_B */ + gpio_request_one(GPIO_PORT74, GPIOF_OUT_INIT_HIGH, NULL); /* SDHI0_PON */ + gpio_request_one(GPIO_PORT75, GPIOF_OUT_INIT_HIGH, NULL); /* SDSLOT1_PON */ /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */ @@ -1109,12 +1099,10 @@ static void __init eva_init(void) gpio_request(GPIO_FN_VIO_CKO, NULL); /* CON1/CON15 Camera */ - gpio_request(GPIO_PORT173, NULL); /* STANDBY */ - gpio_request(GPIO_PORT172, NULL); /* RST */ - gpio_request(GPIO_PORT158, NULL); /* CAM_PON */ - gpio_direction_output(GPIO_PORT173, 0); - gpio_direction_output(GPIO_PORT172, 1); - gpio_direction_output(GPIO_PORT158, 0); /* see mt9t111_power() */ + gpio_request_one(GPIO_PORT173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */ + gpio_request_one(GPIO_PORT172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */ + /* see mt9t111_power() */ + gpio_request_one(GPIO_PORT158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */ /* FSI-WM8978 */ gpio_request(GPIO_FN_FSIAIBT, NULL); @@ -1141,15 +1129,13 @@ static void __init eva_init(void) * DBGMD/LCDC0/FSIA MUX * DBGMD_SELECT_B should be set after setting PFC Function. */ - gpio_request(GPIO_PORT176, NULL); - gpio_direction_output(GPIO_PORT176, 1); + gpio_request_one(GPIO_PORT176, GPIOF_OUT_INIT_HIGH, NULL); /* * We can switch CON8/CON14 by SW1.5, * but it needs after DBGMD_SELECT_B */ - gpio_request(GPIO_PORT6, NULL); - gpio_direction_input(GPIO_PORT6); + gpio_request_one(GPIO_PORT6, GPIOF_IN, NULL); if (gpio_get_value(GPIO_PORT6)) { /* CON14 enable */ } else { @@ -1163,8 +1149,8 @@ static void __init eva_init(void) gpio_request(GPIO_FN_SDHI1_CD, NULL); gpio_request(GPIO_FN_SDHI1_WP, NULL); - gpio_request(GPIO_PORT16, NULL); /* SDSLOT2_PON */ - gpio_direction_output(GPIO_PORT16, 1); + /* SDSLOT2_PON */ + gpio_request_one(GPIO_PORT16, GPIOF_OUT_INIT_HIGH, NULL); platform_device_register(&sdhi1_device); } -- cgit v1.2.3 From 2173441d56e6282f79aaf1f47172e8506f27a25e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:31 +0100 Subject: ARM: shmobile: armadillo800eva: Use gpio_set_value() to set GPIO value The GPIO is already configured as an output, there's no reason to use gpio_direction_output() just to set the output value. Use gpio_set_value() instead. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index efd6a36ef769..f107e82d7e43 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -708,9 +708,9 @@ static int mt9t111_power(struct device *dev, int mode) /* video1 (= CON1 camera) expect 24MHz */ clk_set_rate(mclk, clk_round_rate(mclk, 24000000)); clk_enable(mclk); - gpio_direction_output(GPIO_PORT158, 1); + gpio_set_value(GPIO_PORT158, 1); } else { - gpio_direction_output(GPIO_PORT158, 0); + gpio_set_value(GPIO_PORT158, 0); clk_disable(mclk); } -- cgit v1.2.3 From 6c52bce43697c093ea1437337148b4fb9450af07 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:33 +0100 Subject: ARM: shmobile: kota2: Use gpio_request_one() Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kota2.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index bf88f9a8b7ac..7ec3112e971f 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c @@ -474,10 +474,8 @@ static void __init kota2_init(void) gpio_request(GPIO_FN_D15_NAF15, NULL); gpio_request(GPIO_FN_CS5A_, NULL); gpio_request(GPIO_FN_WE0__FWE, NULL); - gpio_request(GPIO_PORT144, NULL); /* PINTA2 */ - gpio_direction_input(GPIO_PORT144); - gpio_request(GPIO_PORT145, NULL); /* RESET */ - gpio_direction_output(GPIO_PORT145, 1); + gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */ + gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */ /* KEYSC */ gpio_request(GPIO_FN_KEYIN0_PU, NULL); @@ -509,8 +507,7 @@ static void __init kota2_init(void) gpio_request(GPIO_FN_MMCD0_6, NULL); gpio_request(GPIO_FN_MMCD0_7, NULL); gpio_request(GPIO_FN_MMCCMD0, NULL); - gpio_request(GPIO_PORT208, NULL); /* Reset */ - gpio_direction_output(GPIO_PORT208, 1); + gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */ /* SDHI0 (microSD) */ gpio_request(GPIO_FN_SDHICD0_PU, NULL); -- cgit v1.2.3 From 89aaf5c0caefdadb61da81d8c143c5c2fb4b974a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:32 +0100 Subject: ARM: shmobile: bonito: Use gpio_request_one() Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-bonito.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c index cb8c994e1430..932a9c0926bc 100644 --- a/arch/arm/mach-shmobile/board-bonito.c +++ b/arch/arm/mach-shmobile/board-bonito.c @@ -392,8 +392,7 @@ static void __init bonito_init(void) /* * base board settings */ - gpio_request(GPIO_PORT176, NULL); - gpio_direction_input(GPIO_PORT176); + gpio_request_one(GPIO_PORT176, GPIOF_IN, NULL); if (!gpio_get_value(GPIO_PORT176)) { u16 bsw2; u16 bsw3; @@ -462,8 +461,8 @@ static void __init bonito_init(void) gpio_request(GPIO_FN_LCD0_DISP, NULL); gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL); - gpio_request(GPIO_PORT61, NULL); /* LCDDON */ - gpio_direction_output(GPIO_PORT61, 1); + gpio_request_one(GPIO_PORT61, GPIOF_OUT_INIT_HIGH, + NULL); /* LCDDON */ /* backlight on */ bonito_fpga_write(LCDCR, 1); -- cgit v1.2.3 From abb192f8b90180fd099ee47b8c3817e1209ef80e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:34 +0100 Subject: ARM: shmobile: kzm9g: Use gpio_request_one() Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-kzm9g.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c index eadf309dd473..2d08f57631d0 100644 --- a/arch/arm/mach-shmobile/board-kzm9g.c +++ b/arch/arm/mach-shmobile/board-kzm9g.c @@ -672,8 +672,7 @@ static void __init kzm_init(void) gpio_request(GPIO_FN_CS4_, NULL); /* CS4 */ /* SMSC */ - gpio_request(GPIO_PORT224, NULL); /* IRQ3 */ - gpio_direction_input(GPIO_PORT224); + gpio_request_one(GPIO_PORT224, GPIOF_IN, NULL); /* IRQ3 */ /* LCDC */ gpio_request(GPIO_FN_LCDD23, NULL); @@ -703,14 +702,11 @@ static void __init kzm_init(void) gpio_request(GPIO_FN_LCDDISP, NULL); gpio_request(GPIO_FN_LCDDCK, NULL); - gpio_request(GPIO_PORT222, NULL); /* LCDCDON */ - gpio_request(GPIO_PORT226, NULL); /* SC */ - gpio_direction_output(GPIO_PORT222, 1); - gpio_direction_output(GPIO_PORT226, 1); + gpio_request_one(GPIO_PORT222, GPIOF_OUT_INIT_HIGH, NULL); /* LCDCDON */ + gpio_request_one(GPIO_PORT226, GPIOF_OUT_INIT_HIGH, NULL); /* SC */ /* Touchscreen */ - gpio_request(GPIO_PORT223, NULL); /* IRQ8 */ - gpio_direction_input(GPIO_PORT223); + gpio_request_one(GPIO_PORT223, GPIOF_IN, NULL); /* IRQ8 */ /* enable MMCIF */ gpio_request(GPIO_FN_MMCCLK0, NULL); @@ -734,8 +730,7 @@ static void __init kzm_init(void) gpio_request(GPIO_FN_SDHID0_1, NULL); gpio_request(GPIO_FN_SDHID0_0, NULL); gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL); - gpio_request(GPIO_PORT15, NULL); - gpio_direction_output(GPIO_PORT15, 1); /* power */ + gpio_request_one(GPIO_PORT15, GPIOF_OUT_INIT_HIGH, NULL); /* power */ /* enable Micro SD */ gpio_request(GPIO_FN_SDHID2_0, NULL); @@ -744,8 +739,7 @@ static void __init kzm_init(void) gpio_request(GPIO_FN_SDHID2_3, NULL); gpio_request(GPIO_FN_SDHICMD2, NULL); gpio_request(GPIO_FN_SDHICLK2, NULL); - gpio_request(GPIO_PORT14, NULL); - gpio_direction_output(GPIO_PORT14, 1); /* power */ + gpio_request_one(GPIO_PORT14, GPIOF_OUT_INIT_HIGH, NULL); /* power */ /* I2C 3 */ gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL); -- cgit v1.2.3 From f96be91ad23f44df9ab2e3370e42e2515ea59481 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 24 Jan 2013 13:16:35 +0100 Subject: ARM: shmobile: mackerel: Use gpio_request_one() Replace occurences of gpio_request() and gpio_direction_*() by calls to gpio_request_one(). Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-mackerel.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 002eaf689f8f..8de350fe2a97 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -1406,11 +1406,10 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_LCDDISP, NULL); gpio_request(GPIO_FN_LCDDCK, NULL); - gpio_request(GPIO_PORT31, NULL); /* backlight */ - gpio_direction_output(GPIO_PORT31, 0); /* off by default */ + /* backlight, off by default */ + gpio_request_one(GPIO_PORT31, GPIOF_OUT_INIT_LOW, NULL); - gpio_request(GPIO_PORT151, NULL); /* LCDDON */ - gpio_direction_output(GPIO_PORT151, 1); + gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ /* USBHS0 */ gpio_request(GPIO_FN_VBUS0_0, NULL); @@ -1426,8 +1425,7 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_FSIAILR, NULL); gpio_request(GPIO_FN_FSIAISLD, NULL); gpio_request(GPIO_FN_FSIAOSLD, NULL); - gpio_request(GPIO_PORT161, NULL); - gpio_direction_output(GPIO_PORT161, 0); /* slave */ + gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ gpio_request(GPIO_PORT9, NULL); gpio_request(GPIO_PORT10, NULL); @@ -1481,8 +1479,7 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_SDHID1_0, NULL); #endif /* card detect pin for MMC slot (CN7) */ - gpio_request(GPIO_PORT41, NULL); - gpio_direction_input(GPIO_PORT41); + gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL); /* enable SDHI2 */ gpio_request(GPIO_FN_SDHICMD2, NULL); @@ -1493,8 +1490,7 @@ static void __init mackerel_init(void) gpio_request(GPIO_FN_SDHID2_0, NULL); /* card detect pin for microSD slot (CN23) */ - gpio_request(GPIO_PORT162, NULL); - gpio_direction_input(GPIO_PORT162); + gpio_request_one(GPIO_PORT162, GPIOF_IN, NULL); /* MMCIF */ gpio_request(GPIO_FN_MMCD0_0, NULL); -- cgit v1.2.3 From 2f27c40656fecba44e839c77910f75ee1024df62 Mon Sep 17 00:00:00 2001 From: Hideki EIRAKU Date: Fri, 18 Jan 2013 14:02:05 +0900 Subject: ARM: shmobile: armadillo800eva: set clock rates before timer init Previously clock rates were set after initialization of timer. Therefore the timer used the default extal1 clock rate (25MHz) instead of the correct rate for this board (24MHz). Signed-off-by: Hideki EIRAKU Acked-by: Kuninori Morimoto Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-armadillo800eva.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-shmobile') diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index f107e82d7e43..9008ad102a88 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -1169,8 +1169,6 @@ static void __init eva_init(void) platform_add_devices(eva_devices, ARRAY_SIZE(eva_devices)); - eva_clock_init(); - rmobile_add_device_to_domain("A4LC", &lcdc0_device); rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device); if (usb) @@ -1181,6 +1179,9 @@ static void __init eva_earlytimer_init(void) { r8a7740_clock_init(MD_CK0 | MD_CK2); shmobile_earlytimer_init(); + + /* the rate of extal1 clock must be set before late_time_init */ + eva_clock_init(); } static void __init eva_add_early_devices(void) -- cgit v1.2.3