This patch rename GPIO definitions from GPIO_... to S5P_GPIO_...
This changes was done to enable cmd_gpio for EXYNOS and
cmd_gpio has GPIO_INPUT same as s5p_gpio driver and hence
getting a error during compilation.
Build tested for s5p_goni, origen, smdk5250, s5pc210_universal,
trats, smdkc100, smdkv310 config files.
Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
---
Changes in V2:
- New patch
Changes in V3:
- Created a table to know the base address of input bank.
Changes in V4:
- Moved the function name_to_gpio to s5p gpio driver and
renamed to s5p_name_to_gpio.
Changes in V5:
- Rebased on latest u-boot-samsung tree
arch/arm/cpu/armv7/exynos/pinmux.c | 134 +++---
arch/arm/include/asm/arch-exynos/gpio.h | 26 +++---
arch/arm/include/asm/arch-s5pc1xx/gpio.h | 26 +++---
board/samsung/goni/goni.c|4 +-
board/samsung/origen/origen.c|8 +-
board/samsung/smdk5250/smdk5250.c|8 +-
board/samsung/smdkc100/smdkc100.c|2 +-
board/samsung/smdkv310/smdkv310.c| 10 +-
board/samsung/trats/trats.c | 17 ++--
board/samsung/universal_c210/universal.c | 36
drivers/gpio/s5p_gpio.c | 20 ++--
11 files changed, 146 insertions(+), 145 deletions(-)
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c
b/arch/arm/cpu/armv7/exynos/pinmux.c
index 2fb5963..d70980b 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -50,8 +50,8 @@ static void exynos5_uart_config(int peripheral)
break;
}
for (i = start; i start + count; i++) {
- gpio_set_pull(i, GPIO_PULL_NONE);
- gpio_cfg_pin(i, GPIO_FUNC(0x2));
+ gpio_set_pull(i, S5P_GPIO_PULL_NONE);
+ gpio_cfg_pin(i, S5P_GPIO_FUNC(0x2));
}
}
@@ -63,7 +63,7 @@ static int exynos5_mmc_config(int peripheral, int flags)
case PERIPH_ID_SDMMC0:
start = EXYNOS5_GPIO_C00;
start_ext = EXYNOS5_GPIO_C10;
- gpio_func = GPIO_FUNC(0x2);
+ gpio_func = S5P_GPIO_FUNC(0x2);
break;
case PERIPH_ID_SDMMC1:
start = EXYNOS5_GPIO_C20;
@@ -72,7 +72,7 @@ static int exynos5_mmc_config(int peripheral, int flags)
case PERIPH_ID_SDMMC2:
start = EXYNOS5_GPIO_C30;
start_ext = EXYNOS5_GPIO_C43;
- gpio_func = GPIO_FUNC(0x3);
+ gpio_func = S5P_GPIO_FUNC(0x3);
break;
case PERIPH_ID_SDMMC3:
start = EXYNOS5_GPIO_C40;
@@ -87,19 +87,19 @@ static int exynos5_mmc_config(int peripheral, int flags)
if (flags PINMUX_FLAG_8BIT_MODE) {
for (i = start_ext; i = (start_ext + 3); i++) {
gpio_cfg_pin(i, gpio_func);
- gpio_set_pull(i, GPIO_PULL_UP);
- gpio_set_drv(i, GPIO_DRV_4X);
+ gpio_set_pull(i, S5P_GPIO_PULL_UP);
+ gpio_set_drv(i, S5P_GPIO_DRV_4X);
}
}
for (i = 0; i 2; i++) {
- gpio_cfg_pin(start + i, GPIO_FUNC(0x2));
- gpio_set_pull(start + i, GPIO_PULL_NONE);
- gpio_set_drv(start + i, GPIO_DRV_4X);
+ gpio_cfg_pin(start + i, S5P_GPIO_FUNC(0x2));
+ gpio_set_pull(start + i, S5P_GPIO_PULL_NONE);
+ gpio_set_drv(start + i, S5P_GPIO_DRV_4X);
}
for (i = 3; i = 6; i++) {
- gpio_cfg_pin(start + i, GPIO_FUNC(0x2));
- gpio_set_pull(start + i, GPIO_PULL_UP);
- gpio_set_drv(start + i, GPIO_DRV_4X);
+ gpio_cfg_pin(start + i, S5P_GPIO_FUNC(0x2));
+ gpio_set_pull(start + i, S5P_GPIO_PULL_UP);
+ gpio_set_drv(start + i, S5P_GPIO_DRV_4X);
}
return 0;
@@ -125,12 +125,12 @@ static void exynos5_sromc_config(int flags)
* GPY1[3] EBI_DATA_RDn(2)
*/
gpio_cfg_pin(EXYNOS5_GPIO_Y00 + (flags PINMUX_FLAG_BANK),
-GPIO_FUNC(2));
- gpio_cfg_pin(EXYNOS5_GPIO_Y04, GPIO_FUNC(2));
- gpio_cfg_pin(EXYNOS5_GPIO_Y05, GPIO_FUNC(2));
+S5P_GPIO_FUNC(2));
+ gpio_cfg_pin(EXYNOS5_GPIO_Y04, S5P_GPIO_FUNC(2));
+ gpio_cfg_pin(EXYNOS5_GPIO_Y05, S5P_GPIO_FUNC(2));
for (i = 0; i 4; i++)
- gpio_cfg_pin(EXYNOS5_GPIO_Y10 + i, GPIO_FUNC(2));
+ gpio_cfg_pin(EXYNOS5_GPIO_Y10 + i, S5P_GPIO_FUNC(2));
/*
* EBI: 8 Addrss Lines
@@ -165,14 +165,14 @@ static void exynos5_sromc_config(int flags)
* GPY6[7] EBI_DATA[15](2)
*/
for (i = 0; i 8; i++) {
- gpio_cfg_pin(EXYNOS5_GPIO_Y30 + i, GPIO_FUNC(2));
- gpio_set_pull(EXYNOS5_GPIO_Y30 + i, GPIO_PULL_UP);
+