Merge branch 'master' of git://git.denx.de/u-boot
[oweals/u-boot.git] / arch / arm / include / asm / arch-stm32f7 / gpio.h
index 2942cd923c09189b3b1f7d70dbb05d8c938e2007..56e469e3023821b9d6843340080e40929cfa31a8 100644 (file)
@@ -7,6 +7,7 @@
 
 #ifndef _STM32_GPIO_H_
 #define _STM32_GPIO_H_
+#include <asm/gpio.h>
 
 enum stm32_gpio_port {
        STM32_GPIO_PORT_A = 0,
@@ -96,6 +97,22 @@ struct stm32_gpio_ctl {
        enum stm32_gpio_af      af;
 };
 
+struct stm32_gpio_regs {
+       u32 moder;      /* GPIO port mode */
+       u32 otyper;     /* GPIO port output type */
+       u32 ospeedr;    /* GPIO port output speed */
+       u32 pupdr;      /* GPIO port pull-up/pull-down */
+       u32 idr;        /* GPIO port input data */
+       u32 odr;        /* GPIO port output data */
+       u32 bsrr;       /* GPIO port bit set/reset */
+       u32 lckr;       /* GPIO port configuration lock */
+       u32 afr[2];     /* GPIO alternate function */
+};
+
+struct stm32_gpio_priv {
+       struct stm32_gpio_regs *regs;
+};
+
 static inline unsigned stm32_gpio_to_port(unsigned gpio)
 {
        return gpio / 16;
@@ -106,8 +123,4 @@ static inline unsigned stm32_gpio_to_pin(unsigned gpio)
        return gpio % 16;
 }
 
-int stm32_gpio_config(const struct stm32_gpio_dsc *gpio_dsc,
-               const struct stm32_gpio_ctl *gpio_ctl);
-int stm32_gpout_set(const struct stm32_gpio_dsc *gpio_dsc, int state);
-
 #endif /* _STM32_GPIO_H_ */