All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio
@ 2020-02-09 18:52 Dario Binacchi
  2020-02-10  4:24 ` Lokesh Vutla
  0 siblings, 1 reply; 2+ messages in thread
From: Dario Binacchi @ 2020-02-09 18:52 UTC (permalink / raw)
  To: u-boot

It's a generic macro like the others found in gpio.h which can now also
be used in other modules besides the one in which it was previously
defined.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
---

 arch/arm/include/asm/arch-am33xx/gpio.h | 3 +++
 board/ti/am335x/board.c                 | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-am33xx/gpio.h b/arch/arm/include/asm/arch-am33xx/gpio.h
index 24dc4bb1d0..8146f28d36 100644
--- a/arch/arm/include/asm/arch-am33xx/gpio.h
+++ b/arch/arm/include/asm/arch-am33xx/gpio.h
@@ -27,4 +27,7 @@
 
 /* GPIO SETDATAOUT register */
 #define GPIO_SETDATAOUT(x)		(1 << x)
+
+#define GPIO_TO_PIN(bank, gpio)		(32 * (bank) + (gpio))
+
 #endif /* _GPIO_AM33xx_H */
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 3d7f73843c..ec4e43296d 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -43,7 +43,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* GPIO that controls power to DDR on EVM-SK */
-#define GPIO_TO_PIN(bank, gpio)		(32 * (bank) + (gpio))
 #define GPIO_DDR_VTT_EN		GPIO_TO_PIN(0, 7)
 #define ICE_GPIO_DDR_VTT_EN	GPIO_TO_PIN(0, 18)
 #define GPIO_PR1_MII_CTRL	GPIO_TO_PIN(3, 4)
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio
  2020-02-09 18:52 [PATCH] omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio Dario Binacchi
@ 2020-02-10  4:24 ` Lokesh Vutla
  0 siblings, 0 replies; 2+ messages in thread
From: Lokesh Vutla @ 2020-02-10  4:24 UTC (permalink / raw)
  To: u-boot



On 10/02/20 12:22 AM, Dario Binacchi wrote:
> It's a generic macro like the others found in gpio.h which can now also
> be used in other modules besides the one in which it was previously
> defined.

hmm.. who is the user of this macro? Any drivers should directly use gpio uclass
apis. These board specific macros are meant to be deprecated.

Thanks and regards,
Lokesh

> 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> ---
> 
>  arch/arm/include/asm/arch-am33xx/gpio.h | 3 +++
>  board/ti/am335x/board.c                 | 1 -
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/arch-am33xx/gpio.h b/arch/arm/include/asm/arch-am33xx/gpio.h
> index 24dc4bb1d0..8146f28d36 100644
> --- a/arch/arm/include/asm/arch-am33xx/gpio.h
> +++ b/arch/arm/include/asm/arch-am33xx/gpio.h
> @@ -27,4 +27,7 @@
>  
>  /* GPIO SETDATAOUT register */
>  #define GPIO_SETDATAOUT(x)		(1 << x)
> +
> +#define GPIO_TO_PIN(bank, gpio)		(32 * (bank) + (gpio))
> +
>  #endif /* _GPIO_AM33xx_H */
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 3d7f73843c..ec4e43296d 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -43,7 +43,6 @@
>  DECLARE_GLOBAL_DATA_PTR;
>  
>  /* GPIO that controls power to DDR on EVM-SK */
> -#define GPIO_TO_PIN(bank, gpio)		(32 * (bank) + (gpio))
>  #define GPIO_DDR_VTT_EN		GPIO_TO_PIN(0, 7)
>  #define ICE_GPIO_DDR_VTT_EN	GPIO_TO_PIN(0, 18)
>  #define GPIO_PR1_MII_CTRL	GPIO_TO_PIN(3, 4)
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-10  4:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-09 18:52 [PATCH] omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio Dario Binacchi
2020-02-10  4:24 ` Lokesh Vutla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.