]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/asm-arm/arch-mx31/mx31.h
i.MX31: add a simple gpio driver
[karo-tx-uboot.git] / include / asm-arm / arch-mx31 / mx31.h
index f89a401bbcf3f8b9d11d381fabd55b098fcb1d98..1d475dde7ef4f33eba7a7f1996160051bc67b79b 100644 (file)
 #ifndef __ASM_ARCH_MX31_H
 #define __ASM_ARCH_MX31_H
 
-u32 mx31_get_mpl_dpdgck_clk(void);
-u32 mx31_get_mcu_main_clk(void);
-u32 mx31_get_ipg_clk(void);
-void mx31_gpio_mux(unsigned long mode);
+extern u32 mx31_get_ipg_clk(void);
+extern void mx31_gpio_mux(unsigned long mode);
+
+enum mx31_gpio_direction {
+       MX31_GPIO_DIRECTION_IN,
+       MX31_GPIO_DIRECTION_OUT,
+};
+
+#ifdef CONFIG_MX31_GPIO
+extern int mx31_gpio_direction(unsigned int gpio,
+                              enum mx31_gpio_direction direction);
+extern void mx31_gpio_set(unsigned int gpio, unsigned int value);
+#else
+static inline int mx31_gpio_direction(unsigned int gpio,
+                                     enum mx31_gpio_direction direction)
+{
+       return 1;
+}
+static inline void mx31_gpio_set(unsigned int gpio, unsigned int value)
+{
+}
+#endif
 
 #endif /* __ASM_ARCH_MX31_H */