Skip to contentSkip to conversation

S5P: Exynos: Add GPIO pin numbering and rename definitions

PATCH Superseded Akshay Saraswat 3 participants 4 messages Apr 16, 2014

v8 of 13 Superseded Latest is v13 →

lore
Share & tools
lore
#0 lore raw

PATCH v8 1/2 S5P: Exynos: Add GPIO pin numbering and rename definitions

Dear Jaehoon Chung,

Quoted 6 lines

Hi, Akshay.

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

No, I didn't test it over Exynos4 boards. I don't have any working. Thanks for testing. :-)

Quoted 51 lines

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

Add the comment at below.

Quoted 41 lines · Akshay Saraswat

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

---
 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(-)
arch/arm/cpu/armv7/exynos/pinmux.c +0 -0
index 9edb475..e26eb51 100644
@@ -13,30 +13,23 @@

[..snip..]

Quoted 14 lines

arch/arm/cpu/armv7/exynos/pinmux.c unsigned int s5p_gpio_get_value(struct s5p_gpio_bank *bank, int gpio); · line 32

Quoted 10 lines
arch/arm/cpu/armv7/exynos/pinmux.c +2 -1
-
+#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?

Apologies, missed it while cleanup. Will remove it.

Quoted 4 lines

Best Regards,
Jaehoon Chung

Regards,
Akshay Saraswat

#1 lore raw

PATCH v8 1/2 S5P: Exynos: Add GPIO pin numbering and rename definitions

Quoted 4 lines · Akshay Saraswat

Dear Jaehoon Chung,

Quoted 2 lines

Hi, Akshay.

Quoted 8 lines
Quoted 4 lines

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

No, I didn't test it over Exynos4 boards. I don't have any working. Thanks for testing. :-)

Did you tested the return gpio bank address for whole Exynos5 gpio enum?

Quoted 69 lines
Quoted 51 lines

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

Add the comment at below.

Quoted 41 lines · Akshay Saraswat

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

---
  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(-)
arch/arm/cpu/armv7/exynos/pinmux.c +0 -0
index 9edb475..e26eb51 100644
@@ -13,30 +13,23 @@

[..snip..]

Quoted 14 lines

arch/arm/cpu/armv7/exynos/pinmux.c unsigned int s5p_gpio_get_value(struct s5p_gpio_bank *bank, int gpio); · line 32

Quoted 10 lines
arch/arm/cpu/armv7/exynos/pinmux.c +2 -1
-
+#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?

Apologies, missed it while cleanup. Will remove it.

Quoted 1 line
Quoted 7 lines
Quoted 3 lines

Best Regards,
Jaehoon Chung

Regards,
Akshay Saraswat

Thank you,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
#2 lore raw

PATCH v8 1/2 S5P: Exynos: Add GPIO pin numbering and rename definitions

Hi,

Quoted 11 lines · Przemyslaw Marczak
Quoted 9 lines · Akshay Saraswat

Dear Jaehoon Chung,

Hi, Akshay.

Quoted 6 lines

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

Quoted 5 lines
Quoted 4 lines

No, I didn't test it over Exynos4 boards. I don't have any working. Thanks for testing. :-)

Did you tested the return gpio bank address for whole Exynos5 gpio enum?

This was tested extensively for the snow and pit Chrome OS devices (5250 and 54xx).

Regards,
Simon

#3 lore raw

PATCH v8 1/2 S5P: Exynos: Add GPIO pin numbering and rename definitions

Hi,

Quoted 20 lines · Simon Glass

Hi,

On 16 April 2014 07:48, Przemyslaw Marczak <[email protected] <mailto:[email protected]>> wrote:

On 04/16/2014 03:27 PM, Akshay Saraswat wrote:

Dear Jaehoon Chung,

Hi, Akshay.

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

No, I didn't test it over Exynos4 boards. I don't have any working. Thanks for testing. :-)

Quoted 8 lines

Did you tested the return gpio bank address for whole Exynos5 gpio enum?

This was tested extensively for the snow and pit Chrome OS devices (5250 and 54xx).
Regards,
Simon

Great, I can do the same for configs: exynos4, exynos4x12 and we can ask Mateusz (added on CC) if he could do this for s5pc110(goni).

Thanks

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com