From patchwork Sun Feb 9 18:52:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 236086 List-Id: U-Boot discussion From: dariobin at libero.it (Dario Binacchi) Date: Sun, 9 Feb 2020 19:52:45 +0100 Subject: [PATCH] omap: move GPIO_TO_PIN macro to asm/arch-am33xx/gpio Message-ID: <20200209185245.20808-1-dariobin@libero.it> 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 --- 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)