omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio
PATCH 1/1 omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio
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 <[email protected]>
---
arch/arm/include/asm/arch-am33xx/gpio.h | 3 +++ board/ti/am335x/board.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-am33xx/gpio.h +3 -0
@@ -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 */
board/ti/am335x/board.c +0 -1
@@ -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)
Signature · 1 line
2.24.0
PATCH 1/1 omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio
Quoted 3 lines · Dario Binacchi
It's a generic macro like the others found in
gpio.hwhich 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
Quoted 33 lines
Signed-off-by Dario Binacchi <[email protected]>---
arch/arm/include/asm/arch-am33xx/gpio.h | 3 +++ board/ti/am335x/board.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-)arch/arm/include/asm/arch-am33xx/gpio.h +3
-0@@ -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 */ board/ti/am335x/board.c +0
-1@@ -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)