[U-Boot] [PATCH v8 1/2] S5P: Exynos: Add GPIO pin numbering and rename definitions

Jaehoon Chung jh80.chung at samsung.com
Wed Apr 16 13:38:44 CEST 2014


Hi, Akshay.

Did you test exynos4 board?
I have tested your patch-set with the exynos4 board(TRATS2).
It didn't work. 

Occurred DATA_ABORT.
gpio_set_pull(EXYNOS4x12_GPIO_X15,...);

Add the comment at below.

On 04/16/2014 02:32 PM, Akshay Saraswat wrote:
> This patch includes following changes :
> * Adds gpio pin numbering support for EXYNOS SOCs.
>   To have consistent 0..n-1 GPIO numbering the banks are divided
>   into different parts where ever they have holes in them.
> 
> * Rename GPIO definitions from GPIO_... to S5P_GPIO_...
>   These changes were 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.
> 
> * Adds support for name to gpio conversion in s5p_gpio to enable
>   gpio command EXYNOS SoCs. Function has been added to asm/gpio.h
>   to decode the input gpio name to gpio number.
>   Example: SMDK5420 # gpio set gpa00
> 
> Signed-off-by: Leela Krishna Amudala <l.krishna at samsung.com>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
> Signed-off-by: Akshay Saraswat <akshay.s at samsung.com>
> ---
>  arch/arm/cpu/armv7/exynos/pinmux.c       |  403 +++----
>  arch/arm/include/asm/arch-exynos/cpu.h   |   17 +-
>  arch/arm/include/asm/arch-exynos/gpio.h  | 1778 +++++++++++++++++++++++++-----
>  arch/arm/include/asm/arch-s5pc1xx/gpio.h |  941 +++++++++++++---
>  board/samsung/arndale/arndale.c          |   11 +-
>  board/samsung/goni/goni.c                |   26 +-
>  board/samsung/smdk5250/exynos5-dt.c      |   20 +-
>  board/samsung/smdk5250/smdk5250.c        |   19 +-
>  board/samsung/smdk5420/smdk5420.c        |   15 +-
>  board/samsung/smdkc100/smdkc100.c        |    5 +-
>  board/samsung/smdkv310/smdkv310.c        |   17 +-
>  board/samsung/trats/trats.c              |   39 +-
>  board/samsung/trats2/trats2.c            |   74 +-
>  board/samsung/universal_c210/universal.c |   51 +-
>  drivers/gpio/s5p_gpio.c                  |  194 +++-
>  15 files changed, 2779 insertions(+), 831 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
> index 9edb475..e26eb51 100644
> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
> @@ -13,30 +13,23 @@

[..snip..]

> -
> +#if 0
>  /* functions */
>  void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg);
>  void s5p_gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en);
> @@ -244,6 +29,7 @@ unsigned int s5p_gpio_get_value(struct s5p_gpio_bank *bank, int gpio);
>  void s5p_gpio_set_pull(struct s5p_gpio_bank *bank, int gpio, int mode);
>  void s5p_gpio_set_drv(struct s5p_gpio_bank *bank, int gpio, int mode);
>  void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode);
> +#endif

Why did you use the "#if 0 ~ #endif".
If it didn't need to use, it can be removed, isn't?

Best Regards,
Jaehoon Chung



More information about the U-Boot mailing list