* [GIT PULL] Renesas ARM-based SoC for v3.9 #2
From: Simon Horman @ 2013-01-31 6:23 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Arnd,
The following changes since commit 42dd581bc4dba82e8756bb881fa974742250b4c6:
ARM: shmobile: Include sh73a0 DTSI in kzm9g (2013-01-25 09:26:33 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-boards2-for-v3.9
for you to fetch changes up to 2f27c40656fecba44e839c77910f75ee1024df62:
ARM: shmobile: armadillo800eva: set clock rates before timer init (2013-01-30 13:24:07 +0900)
----------------------------------------------------------------
Second round of Renesas ARM-based SoC board changes for v3.9
* Fix to correct timer initialisation on the armadillo 800 eva board
from Hideki EIRAKU
* The remaining of the changes relate to updating boards to
make use of gpio_request_one(). These changes are from Laurent Pinchart.
----------------------------------------------------------------
Hideki EIRAKU (1):
ARM: shmobile: armadillo800eva: set clock rates before timer init
Laurent Pinchart (8):
ARM: shmobile: ag5evm: Use gpio_request_one()
ARM: shmobile: ap4evb: Use gpio_request_one()
ARM: shmobile: armadillo800eva: Use gpio_request_one()
ARM: shmobile: armadillo800eva: Use gpio_set_value() to set GPIO value
ARM: shmobile: kota2: Use gpio_request_one()
ARM: shmobile: bonito: Use gpio_request_one()
ARM: shmobile: kzm9g: Use gpio_request_one()
ARM: shmobile: mackerel: Use gpio_request_one()
arch/arm/mach-shmobile/board-ag5evm.c | 22 ++++-----
arch/arm/mach-shmobile/board-ap4evb.c | 33 ++++----------
arch/arm/mach-shmobile/board-armadillo800eva.c | 57 +++++++++---------------
arch/arm/mach-shmobile/board-bonito.c | 7 ++-
arch/arm/mach-shmobile/board-kota2.c | 9 ++--
arch/arm/mach-shmobile/board-kzm9g.c | 18 +++-----
arch/arm/mach-shmobile/board-mackerel.c | 16 +++----
7 files changed, 57 insertions(+), 105 deletions(-)
^ permalink raw reply
* [PATCH 1/9] ARM: shmobile: ag5evm: Use gpio_request_one()
From: Simon Horman @ 2013-01-31 6:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-ag5evm.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 032d108..5e7fe15 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] */
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/9] ARM: shmobile: ap4evb: Use gpio_request_one()
From: Simon Horman @ 2013-01-31 6:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-ap4evb.c | 33 +++++++++------------------------
1 file changed, 9 insertions(+), 24 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 70d287c..0c59464 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;
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/9] ARM: shmobile: armadillo800eva: Use gpio_request_one()
From: Simon Horman @ 2013-01-31 6:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-armadillo800eva.c | 48 +++++++++---------------
1 file changed, 17 insertions(+), 31 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 5f179e1..efd6a36 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);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 4/9] ARM: shmobile: armadillo800eva: Use gpio_set_value() to set GPIO value
From: Simon Horman @ 2013-01-31 6:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
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 <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-armadillo800eva.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index efd6a36..f107e82 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);
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH 5/9] ARM: shmobile: kota2: Use gpio_request_one()
From: Simon Horman @ 2013-01-31 6:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-kota2.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index bf88f9a..7ec3112 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);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 6/9] ARM: shmobile: bonito: Use gpio_request_one()
From: Simon Horman @ 2013-01-31 6:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-bonito.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index cb8c994..932a9c0 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);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 7/9] ARM: shmobile: kzm9g: Use gpio_request_one()
From: Simon Horman @ 2013-01-31 6:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-kzm9g.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index eadf309..2d08f57 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);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 8/9] ARM: shmobile: mackerel: Use gpio_request_one()
From: Simon Horman @ 2013-01-31 6:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-mackerel.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 002eaf6..8de350f 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);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 9/9] ARM: shmobile: armadillo800eva: set clock rates before timer init
From: Simon Horman @ 2013-01-31 6:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613442-26038-1-git-send-email-horms+renesas@verge.net.au>
From: Hideki EIRAKU <hdk@igel.co.jp>
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 <hdk@igel.co.jp>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-armadillo800eva.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index f107e82..9008ad1 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)
--
1.7.10.4
^ permalink raw reply related
* [GIT PULL] Renesas ARM-based SoC for v3.9 #2
From: Simon Horman @ 2013-01-31 6:26 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Arnd,
The following changes since commit ff8de98d50e551057978ea90d09255c528fde1ac:
ARM: shmobile: r8a7779: scif .irqs used SCIx_IRQ_MUXED() (2013-01-25 12:43:50 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc2-for-v3.9
for you to fetch changes up to dc784e73b45dc055f9dcb174ea5753ea020516fc:
ARM: mach-shmobile: sh73a0: allow unplugging of CPU0 (2013-01-30 13:07:59 +0900)
----------------------------------------------------------------
Second round of Renesas ARM-based SoC changes for v3.9
* Changes to allow unplugging of CPU0 by Ulrich Hecht.
* Changes to add reg and device_type properties to cpus
device trees entries by Simon Horman.
----------------------------------------------------------------
Simon Horman (2):
ARM: mach-shmobile: sh73a0: Add reg and device_type properties to cpus
ARM: mach-shmobile: emev2: Add reg and device_type properties to cpus
Ulrich Hecht (2):
ARM: mach-shmobile: add shmobile_cpu_disable_any()
ARM: mach-shmobile: sh73a0: allow unplugging of CPU0
arch/arm/boot/dts/emev2.dtsi | 7 +++++++
arch/arm/boot/dts/sh73a0.dtsi | 7 +++++++
arch/arm/mach-shmobile/hotplug.c | 6 ++++++
arch/arm/mach-shmobile/include/mach/common.h | 1 +
arch/arm/mach-shmobile/smp-sh73a0.c | 2 +-
5 files changed, 22 insertions(+), 1 deletion(-)
^ permalink raw reply
* [PATCH 1/4] ARM: mach-shmobile: sh73a0: Add reg and device_type properties to cpus
From: Simon Horman @ 2013-01-31 6:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613569-26981-1-git-send-email-horms+renesas@verge.net.au>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/sh73a0.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 721f486..8a59465 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -14,11 +14,18 @@
compatible = "renesas,sh73a0";
cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
cpu at 0 {
+ device_type = "cpu";
compatible = "arm,cortex-a9";
+ reg = <0>;
};
cpu at 1 {
+ device_type = "cpu";
compatible = "arm,cortex-a9";
+ reg = <1>;
};
};
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/4] ARM: mach-shmobile: emev2: Add reg and device_type properties to cpus
From: Simon Horman @ 2013-01-31 6:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613569-26981-1-git-send-email-horms+renesas@verge.net.au>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/emev2.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi
index eb504a6..c8a8c08 100644
--- a/arch/arm/boot/dts/emev2.dtsi
+++ b/arch/arm/boot/dts/emev2.dtsi
@@ -15,11 +15,18 @@
interrupt-parent = <&gic>;
cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
cpu at 0 {
+ device_type = "cpu";
compatible = "arm,cortex-a9";
+ reg = <0>;
};
cpu at 1 {
+ device_type = "cpu";
compatible = "arm,cortex-a9";
+ reg = <1>;
};
};
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/4] ARM: mach-shmobile: add shmobile_cpu_disable_any()
From: Simon Horman @ 2013-01-31 6:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613569-26981-1-git-send-email-horms+renesas@verge.net.au>
From: Ulrich Hecht <ulrich.hecht@gmail.com>
Method to disable any core to be used on platforms where CPU0 does not
need special treatment.
Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/hotplug.c | 6 ++++++
arch/arm/mach-shmobile/include/mach/common.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c
index b09a0bd..a1524e3 100644
--- a/arch/arm/mach-shmobile/hotplug.c
+++ b/arch/arm/mach-shmobile/hotplug.c
@@ -56,6 +56,12 @@ int shmobile_cpu_disable(unsigned int cpu)
return cpu == 0 ? -EPERM : 0;
}
+int shmobile_cpu_disable_any(unsigned int cpu)
+{
+ cpumask_clear_cpu(cpu, &dead_cpus);
+ return 0;
+}
+
int shmobile_cpu_is_dead(unsigned int cpu)
{
return cpumask_test_cpu(cpu, &dead_cpus);
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 64c0622..e48606d 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -84,6 +84,7 @@ static inline int shmobile_cpuidle_init(void) { return 0; }
extern void shmobile_cpu_die(unsigned int cpu);
extern int shmobile_cpu_disable(unsigned int cpu);
+extern int shmobile_cpu_disable_any(unsigned int cpu);
#ifdef CONFIG_HOTPLUG_CPU
extern int shmobile_cpu_is_dead(unsigned int cpu);
--
1.7.10.4
^ permalink raw reply related
* [PATCH 4/4] ARM: mach-shmobile: sh73a0: allow unplugging of CPU0
From: Simon Horman @ 2013-01-31 6:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359613569-26981-1-git-send-email-horms+renesas@verge.net.au>
From: Ulrich Hecht <ulrich.hecht@gmail.com>
sh73a0 deals fine with disabling any core, so we should permit it.
Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/smp-sh73a0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index 9812ea3..acb46a9 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -143,6 +143,6 @@ struct smp_operations sh73a0_smp_ops __initdata = {
#ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = sh73a0_cpu_kill,
.cpu_die = sh73a0_cpu_die,
- .cpu_disable = shmobile_cpu_disable,
+ .cpu_disable = shmobile_cpu_disable_any,
#endif
};
--
1.7.10.4
^ permalink raw reply related
* [GIT PULL v2] Renesas ARM-based SoC for v3.9
From: Simon Horman @ 2013-01-31 6:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130021802.GD28230@verge.net.au>
On Wed, Jan 30, 2013 at 11:18:02AM +0900, Simon Horman wrote:
> On Tue, Jan 29, 2013 at 09:11:38AM -0800, Olof Johansson wrote:
> > On Fri, Jan 25, 2013 at 12:55:18PM +0900, Simon Horman wrote:
> > > Hi Olof, Hi Arnd,
> > >
> > > please consider the following soc enhancements for 3.9.
> > >
> > > This series is based on a merge of the irqchip/gic-vic-move and
> > > timer/cleanup branches in the arm-soc tree. There were a number of
> > > conflicts in this merge, as indicated by the merge commit
> > > 6265b0f325eed54558b35769aecb1d79423295c7. In each case I took care to
> > > match the merge made in the arm-soc tree which is evident in the for-next
> > > branch.
> > >
> > > ----------------------------------------------------------------
> > > The following changes since commit 6265b0f325eed54558b35769aecb1d79423295c7:
> > >
> > > Merge remote-tracking branches 'arm-soc/irqchip/gic-vic-move' and 'arm-soc/timer/cleanup' into soc (2013-01-24 17:57:20 +0900)
> > >
> > > are available in the git repository at:
> > >
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git soc
> > >
> >
> > Merged, thanks. You had resolved the board_bcm conflict slightly differenlty
> > (technically better), but to keep it common with what we have, I added back
> > the extra line of whitespace.
> >
> > By the way, you should look into starting to use signed tags for your pull
> > requests, since it gives you a place to give a short description of the branch
> > (and that description makes it into the commit with 0 work on our behalf :)
>
> Sure, will do.
I have attempted to do so for two pull requests I sent a little earlier
today. Please let me know if I have missed something.
^ permalink raw reply
* [RFC] arm: use built-in byte swap function
From: Borislav Petkov @ 2013-01-31 6:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130200900.9d7cf7908caeaef4ecee1d61@freescale.com>
On Wed, Jan 30, 2013 at 08:09:00PM -0600, Kim Phillips wrote:
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 40e2b12..c8798b9 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -141,6 +141,16 @@ config ARCH_USE_BUILTIN_BSWAP
> instructions should set this. And it shouldn't hurt to set it
> on architectures that don't have such instructions.
>
> +config ARCH_DEFINES_BUILTIN_BSWAP
> + depends on ARCH_USE_BUILTIN_BSWAP
> + bool
> + help
> + ARCH selects this when it wants to control HAVE_BUILTIN_BSWAPxx
This is what threw me off: if ARCH selects this, I don't think we want
to have a help text and the option be user visible? Normally such
options are only bool and are selected automatically by hm.. ARCH, as
you say above and do so below. :-)
> + definitions over those in the generic compiler headers. It
> + can be dependent on a combination of byte swapping instruction
> + availability, the instruction set version, and the state
> + of support in different compiler versions.
> +
> config HAVE_SYSCALL_WRAPPERS
> bool
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 73027aa..b5868c2 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -57,6 +57,8 @@ config ARM
> select CLONE_BACKWARDS
> select OLD_SIGSUSPEND3
> select OLD_SIGACTION
> + select ARCH_USE_BUILTIN_BSWAP
> + select ARCH_DEFINES_BUILTIN_BSWAP
> help
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
^ permalink raw reply
* [PATCH v2 19/27] pci: PCIe driver for Marvell Armada 370/XP systems
From: Thierry Reding @ 2013-01-31 7:10 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130151934.GK23505@n2100.arm.linux.org.uk>
On Wed, Jan 30, 2013 at 03:19:34PM +0000, Russell King - ARM Linux wrote:
> On Wed, Jan 30, 2013 at 03:08:56PM +0000, Russell King - ARM Linux wrote:
> > On Wed, Jan 30, 2013 at 01:03:44PM +0100, Thierry Reding wrote:
> > > On Wed, Jan 30, 2013 at 11:32:46AM +0000, Russell King - ARM Linux wrote:
> > > > On Mon, Jan 28, 2013 at 07:56:28PM +0100, Thomas Petazzoni wrote:
> > > > > +static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
> > > > > + const struct resource *res,
> > > > > + resource_size_t start,
> > > > > + resource_size_t size,
> > > > > + resource_size_t align)
> > > > > +{
> > > > > + if (!(res->flags & IORESOURCE_IO))
> > > > > + return start;
> > > > > +
> > > > > + /*
> > > > > + * The I/O regions must be 64K aligned, because the
> > > > > + * granularity of PCIe I/O address decoding windows is 64 K
> > > > > + */
> > > > > + return round_up(start, SZ_64K);
> > > > > +}
> > > >
> > > > You do realise that this will result in all PCI I/O BARs being rounded
> > > > up to 64K.
> > > >
> > > > I've just been digging through the PCI code and have come across a
> > > > function - pcibios_window_alignment() - which the PCI code allows to be
> > > > overriden which allows you to increase the alignment requirement of
> > > > bridge windows. It takes the PCI bus and window type as arguments.
> > > >
> > > > I'd suggest using that, and checking whether the bus which is passed
> > > > corresponds with a bus which gives you problems, so that you don't
> > > > impose the 64K requirement on downstream bridges.
> > >
> > > That approach isn't going to work very well with multi-platform, though,
> > > since the function can only be overridden on a per-architecture basis.
> >
> > The same can be said of all the various other functions which the PCI
> > stuff expects the arch to provide, yet we seem to cope just fine...
>
> And this (untested) is how it's done:
>
> arch/arm/include/asm/mach/pci.h | 1 +
> arch/arm/kernel/bios32.c | 8 ++++++++
> 2 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
> index db9fedb..bba0cf3 100644
> --- a/arch/arm/include/asm/mach/pci.h
> +++ b/arch/arm/include/asm/mach/pci.h
> @@ -29,6 +29,7 @@ struct hw_pci {
> void (*postinit)(void);
> u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
> int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
> + resource_size_t (*window_align)(struct pci_bus *, unsigned long);
> };
>
> /*
> diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
> index 379cf32..32c3bd9 100644
> --- a/arch/arm/kernel/bios32.c
> +++ b/arch/arm/kernel/bios32.c
> @@ -581,6 +581,14 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
> return start;
> }
>
> +resource_size_t pcibios_window_alignment(struct pci_bus *bus,
> + unsigned long type)
> +{
> + struct pci_sys_data *sys = bus->sysdata;
> +
> + return sys->window_alignment ? sys->window_alignment(bus, type) : 1;
> +}
> +
> /**
> * pcibios_enable_device - Enable I/O and memory.
> * @dev: PCI device to be enabled
Yes, something like that'll work. I had been under the impression that
what you proposed was overriding pcibios_window_alignment() for Marvell
only.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130131/88de3d77/attachment.sig>
^ permalink raw reply
* [PATCH v3] ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL check" bug
From: Koen Kooi @ 2013-01-31 7:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359556760-25214-1-git-send-email-gururaja.hebbar@ti.com>
Op 30 jan. 2013, om 15:39 heeft Hebbar Gururaja <gururaja.hebbar@ti.com> het volgende geschreven:
> am33xx_cm_wait_module_ready() checks if register offset is NULL.
>
> int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
> {
> int i = 0;
>
> if (!clkctrl_offs)
> return 0;
>
> In case of AM33xx, CLKCTRL register offset for different clock domains
> are not uniformly placed. An example of this would be the RTC clock
> domain with CLKCTRL offset at 0x00.
> In such cases the module ready check is skipped which leads to a data
> abort during boot-up when RTC registers is accessed.
>
> Remove this check here to avoid checking module readiness for modules
> with clkctrl register offset at 0x00.
>
> Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
I can confirm that this fixes the crash on boot with CONFIG_RTC_DRV_OMAP=y with 3.8-rc5
regards,
Koen
^ permalink raw reply
* [PATCH] Asoc: Samsung: I2S: Add support for runtime S2R
From: Mark Brown @ 2013-01-31 7:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359547864-1057-1-git-send-email-rcsekar@samsung.com>
On Wed, Jan 30, 2013 at 05:41:04PM +0530, R. Chandrasekar wrote:
> From: "R. Chandrasekar" <rcsekar@samsung.com>
>
> This patch adds runtime suspend to resume support for I2S.
> I2S clk is disabled at suspend and enabled at resume.
Applied, thanks. Please use subject lines appropriate to the subsystem
and keep your signoffs in order:
> Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130131/9c0eda64/attachment.sig>
^ permalink raw reply
* [PATCH 2/6] usb: add devicetree helpers for determining dr_mode and phy_type
From: Sascha Hauer @ 2013-01-31 7:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <510A0BBD.6090209@ti.com>
On Thu, Jan 31, 2013 at 11:44:21AM +0530, kishon wrote:
> Hi,
>
> On Wednesday 30 January 2013 08:59 PM, Sascha Hauer wrote:
> >From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >
> >This adds two little devicetree helper functions for determining the
> >dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
> >the devicetree.
> >
> >Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> >Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> >---
> > drivers/usb/usb-common.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++
> > include/linux/usb/of.h | 27 ++++++++++++++++++
> > include/linux/usb/otg.h | 7 +++++
> > include/linux/usb/phy.h | 9 ++++++
> > 4 files changed, 112 insertions(+)
> > create mode 100644 include/linux/usb/of.h
> >
> >diff --git a/drivers/usb/usb-common.c b/drivers/usb/usb-common.c
> >index d29503e..1c0292c 100644
> >--- a/drivers/usb/usb-common.c
> >+++ b/drivers/usb/usb-common.c
> >@@ -14,6 +14,9 @@
> > #include <linux/kernel.h>
> > #include <linux/module.h>
> > #include <linux/usb/ch9.h>
> >+#include <linux/of.h>
> >+#include <linux/usb/of.h>
> >+#include <linux/usb/otg.h>
> >
> > const char *usb_speed_string(enum usb_device_speed speed)
> > {
> >@@ -32,4 +35,70 @@ const char *usb_speed_string(enum usb_device_speed speed)
> > }
> > EXPORT_SYMBOL_GPL(usb_speed_string);
> >
> >+#ifdef CONFIG_OF
> >+static const char *usb_dr_modes[] = {
> >+ [USB_DR_MODE_UNKNOWN] = "",
> >+ [USB_DR_MODE_HOST] = "host",
> >+ [USB_DR_MODE_PERIPHERAL] = "peripheral",
> >+ [USB_DR_MODE_OTG] = "otg",
> >+};
> >+
> >+/**
> >+ * of_usb_get_dr_mode - Get dual role mode for given device_node
> >+ * @np: Pointer to the given device_node
> >+ *
> >+ * The function gets phy interface string from property 'dr_mode',
> >+ * and returns the correspondig enum usb_phy_dr_mode
> >+ */
> >+enum usb_phy_dr_mode of_usb_get_dr_mode(struct device_node *np)
> >+{
> >+ const char *dr_mode;
> >+ int err, i;
> >+
> >+ err = of_property_read_string(np, "dr_mode", &dr_mode);
> >+ if (err < 0)
> >+ return USB_DR_MODE_UNKNOWN;
> >+
> >+ for (i = 0; i < ARRAY_SIZE(usb_dr_modes); i++)
> >+ if (!strcasecmp(dr_mode, usb_dr_modes[i]))
> >+ return i;
> >+
> >+ return USB_DR_MODE_UNKNOWN;
> >+}
> >+EXPORT_SYMBOL_GPL(of_usb_get_dr_mode);
> >+
> >+static const char *usbphy_modes[] = {
> >+ [USBPHY_INTERFACE_MODE_NA] = "",
> >+ [USBPHY_INTERFACE_MODE_UTMI] = "utmi",
> >+ [USBPHY_INTERFACE_MODE_UTMIW] = "utmi_wide",
> >+ [USBPHY_INTERFACE_MODE_ULPI] = "ulpi",
> >+ [USBPHY_INTERFACE_MODE_SERIAL] = "serial",
> >+ [USBPHY_INTERFACE_MODE_HSIC] = "hsic",
> >+};
> >+
> >+/**
> >+ * of_get_usbphy_mode - Get phy mode for given device_node
>
> %s/of_get_usbphy_mode/of_usb_get_phy_mode
> >+ * @np: Pointer to the given device_node
> >+ *
> >+ * The function gets phy interface string from property 'phy_type',
> >+ * and returns the correspondig enum usb_phy_interface
> >+ */
> >+enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
> >+{
>
> You agreed to move this function inside usb/phy.. no?
Yes, I did, but as mentioned in the introduction mail, the chipidea
driver has to determine the phy type even when phy support (aka
CONFIG_USB_OTG_UTILS) is disabled, so I can't put it in phy/phy.c.
I could add a phy/of.c though. Would that be better?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [PATCH 4/6] usb: chipidea: add PTW and PTS handling
From: Sascha Hauer @ 2013-01-31 7:45 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131030853.GG9777@nchen-desktop>
On Thu, Jan 31, 2013 at 11:08:54AM +0800, Peter Chen wrote:
> On Wed, Jan 30, 2013 at 04:29:40PM +0100, Sascha Hauer wrote:
> > From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >
> > +static void hw_phymode_configure(struct ci13xxx *ci)
> > +{
> > + u32 portsc;
> > +
> > + /*
> > + * The lpm version has the corresponding bits in the devlc register.
> > + * Currently not implemented.
> > + */
> > + if (ci->hw_bank.lpm)
> > + return;
> > +
> > + switch (ci->platdata->phy_mode) {
> > + case USBPHY_INTERFACE_MODE_UTMI:
> > + portsc = PORTSC_PTS_PTW_UTMI;
> > + break;
> > + case USBPHY_INTERFACE_MODE_UTMIW:
> > + portsc = PORTSC_PTS_PTW_UTMIW;
> > + break;
> > + case USBPHY_INTERFACE_MODE_ULPI:
> > + portsc = PORTSC_PTS_PTW_ULPI;
> > + break;
> > + case USBPHY_INTERFACE_MODE_SERIAL:
> > + portsc = PORTSC_PTS_PTW_SERIAL;
> > + break;
> > + case USBPHY_INTERFACE_MODE_HSIC:
> > + portsc = PORTSC_PTS_PTW_HSIC;
> > + break;
> > + default:
> > + return;
> > + }
> > +
> > + hw_write(ci, OP_PORTSC, PORTSC_PTS_PTW, portsc);
> > +
> > + mdelay(10);
> Please use usleep_range, can we recall which platform needs it?
> As we as I know, there is no such delay at FSL internal release
> code.
Then let's drop it. People will complain when they find the platform
that needs it and then we can decide whether we add this unconditionally
or do something better.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [PATCH 4/4] pinctrl/abx500: destroy mutex if returning early due to error
From: Lee Jones @ 2013-01-31 8:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <51097E35.6080100@wwwdotorg.org>
On Wed, 30 Jan 2013, Stephen Warren wrote:
> On 01/30/2013 12:40 PM, Linus Walleij wrote:
> > From: Lee Jones <lee.jones@linaro.org>
> >
> > Current failure path neglects to mutex_destroy() before returning
> > an error due to an invalid parameter or an error received from
> > gpiochip_add(). This patch aims to remedy that behaviour.
>
> > diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
>
> > @@ -1155,11 +1155,13 @@ static int abx500_gpio_probe(struct platform_device *pdev)
> > default:
> > dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n",
> > (int) platid->driver_data);
> > + mutex_destroy(&pct->lock);
> > return -EINVAL;
>
> Especially given there's already a label out_free which performs this
> mutex_destroy(), those last two lines would be better as:
>
> ret = -EINVAL;
> goto out_free;
Yes, that's one way of doing it. I figured it was 6 of one and half a
dozen of the other to be honest.
Either I:
+ mutex_destroy(&pct->lock);
Or:
+ ret = -EINVAL;
+ goto out_free;
- return -EINVAL;
I figured the smallest diff would be best. To be honest, I'm not
bothered either way. If it offends you, I can do it the other way, no
problem. Just let me know quick, so I can get the fixed up patch to
Linus.
NB: There is no 'out_free:' at this point, it has already been
removed.
I'll leave it up to you.
> > }
> >
> > if (!pct->soc) {
> > dev_err(&pdev->dev, "Invalid SOC data\n");
> > + mutex_destroy(&pct->lock);
> > return -EINVAL;
>
> Same there.
>
> > }
> >
> > @@ -1176,6 +1178,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
> > ret = gpiochip_add(&pct->chip);
> > if (ret) {
> > dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
> > + mutex_destroy(&pct->lock);
> > goto out_rem_irq;
>
> And here, just change the goto target to out_free rather than adding the
> mutex_destroy() call.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [alsa-devel] [PATCH 1/2] ASoC: tlv320aic3x: Convert mic bias to a supply widget
From: Peter Ujfalusi @ 2013-01-31 8:02 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359552155-17426-1-git-send-email-gururaja.hebbar@ti.com>
On 01/30/2013 02:22 PM, Hebbar Gururaja wrote:
> @@ -1493,6 +1544,28 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
> aic3x->setup = ai3x_setup;
> }
>
> + if (!of_property_read_u32(np, "ai3x-micbias-vg", &value)) {
> + switch (value) {
> + case 1 :
> + aic3x->micbias_vg = AIC3X_MICBIAS_2_0V;
> + break;
> + case 2 :
> + aic3x->micbias_vg = AIC3X_MICBIAS_2_5V;
> + break;
> + case 3 :
> + aic3x->micbias_vg = AIC3X_MICBIAS_AVDDV;
> + break;
> + default :
> + aic3x->micbias_vg = AIC3X_MICBIAS_OFF;
> + dev_err(&i2c->dev, "Unsuitable MicBias voltage "
> + "found in DT\n");
> + }
> + } else {
> + dev_warn(&i2c->dev, "No MicBias voltage found in DT - "
> + "using default\n");
Since "ai3x-micbias-vg" property is optional I don't think it is appropriate
to print anything here. If you really want a note about this it should be
dev_info().
> + aic3x->micbias_vg = AIC3X_MICBIAS_OFF;
> + }
> +
> } else {
> aic3x->gpio_reset = -1;
> }
> diff --git a/sound/soc/codecs/tlv320aic3x.h b/sound/soc/codecs/tlv320aic3x.h
> index 6db3c41..e521ac3 100644
> --- a/sound/soc/codecs/tlv320aic3x.h
> +++ b/sound/soc/codecs/tlv320aic3x.h
> @@ -238,6 +238,10 @@
> /* Default input volume */
> #define DEFAULT_GAIN 0x20
>
> +/* MICBIAS Control Register */
> +#define MICBIAS_LEVEL_SHIFT (6)
> +#define MICBIAS_LEVEL_MASK (3 << 6)
> +
> /* headset detection / button API */
>
> /* The AIC3x supports detection of stereo headsets (GND + left + right signal)
>
--
P?ter
^ permalink raw reply
* [PATCH 2/6] usb: add devicetree helpers for determining dr_mode and phy_type
From: Sascha Hauer @ 2013-01-31 8:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131023034.GF9777@nchen-desktop>
On Thu, Jan 31, 2013 at 10:30:36AM +0800, Peter Chen wrote:
> On Wed, Jan 30, 2013 at 04:29:38PM +0100, Sascha Hauer wrote:
> > From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> >
> > This adds two little devicetree helper functions for determining the
> > dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
> > the devicetree.
> >
> > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > drivers/usb/usb-common.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++
> > include/linux/usb/of.h | 27 ++++++++++++++++++
> > include/linux/usb/otg.h | 7 +++++
> > include/linux/usb/phy.h | 9 ++++++
> > 4 files changed, 112 insertions(+)
> > create mode 100644 include/linux/usb/of.h
> >
> > diff --git a/drivers/usb/usb-common.c b/drivers/usb/usb-common.c
> > index d29503e..1c0292c 100644
> > --- a/drivers/usb/usb-common.c
> > +++ b/drivers/usb/usb-common.c
> > @@ -14,6 +14,9 @@
> > #include <linux/kernel.h>
> > #include <linux/module.h>
> > #include <linux/usb/ch9.h>
> > +#include <linux/of.h>
> > +#include <linux/usb/of.h>
> > +#include <linux/usb/otg.h>
> >
> > const char *usb_speed_string(enum usb_device_speed speed)
> > {
> > @@ -32,4 +35,70 @@ const char *usb_speed_string(enum usb_device_speed speed)
> > }
> > EXPORT_SYMBOL_GPL(usb_speed_string);
> >
> > +#ifdef CONFIG_OF
> > +static const char *usb_dr_modes[] = {
> > + [USB_DR_MODE_UNKNOWN] = "",
> > + [USB_DR_MODE_HOST] = "host",
> > + [USB_DR_MODE_PERIPHERAL] = "peripheral",
> > + [USB_DR_MODE_OTG] = "otg",
> > +};
> > +
> > +/**
> > + * of_usb_get_dr_mode - Get dual role mode for given device_node
> > + * @np: Pointer to the given device_node
> > + *
> > + * The function gets phy interface string from property 'dr_mode',
> > + * and returns the correspondig enum usb_phy_dr_mode
> > + */
> > +enum usb_phy_dr_mode of_usb_get_dr_mode(struct device_node *np)
> The word "phy" at usb_phy_dr_mode may cause misunderstand, just usb_dr_mode
> is ok
ok, changed.
> > +{
> > + const char *dr_mode;
> > + int err, i;
> > +
> > + err = of_property_read_string(np, "dr_mode", &dr_mode);
> > + if (err < 0)
> > + return USB_DR_MODE_UNKNOWN;
> > +
> > + for (i = 0; i < ARRAY_SIZE(usb_dr_modes); i++)
> > + if (!strcasecmp(dr_mode, usb_dr_modes[i]))
> > + return i;
> Just curious, why not using strcmp?
Probably because this is based on drivers/of/of_net.c which uses
strcasecmp. I never heard that devicetrees are case insensitive, so
I'll change this to strcmp.
> > +
> > + return USB_DR_MODE_UNKNOWN;
> > +}
> > +
> > +#ifdef CONFIG_OF
> > +enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
> > +enum usb_phy_dr_mode of_usb_get_dr_mode(struct device_node *np);
> > +#else
> > +static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
> > +{
> > + return USBPHY_INTERFACE_MODE_NA;
> > +}
> > +
> > +static inline enum usb_phy_dr_mode of_usb_get_dr_mode(struct device_node *np)
> > +{
> > + return USB_DR_MODE_UNKNOWN;
> > +}
> For, dr_mode, if value has not existed, you use *_UNKNOWN, why
> for usbphy, you use *_NA. It is better uniform.
yup, fixed.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox