summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/pinctrl-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-06-17 22:30:58 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-06-17 22:30:58 +0000
commit2cf33133820ee17e4b5d2d622db15dedff1a1f6e (patch)
tree60eddf4c3f16d5d274bc111ce53db02cfe75a6e8 /firmware/target/arm/imx233/pinctrl-imx233.h
parentd4800fa3851d2d89c1be03ec99af81f277892579 (diff)
downloadrockbox-2cf33133820ee17e4b5d2d622db15dedff1a1f6e.tar.gz
rockbox-2cf33133820ee17e4b5d2d622db15dedff1a1f6e.tar.bz2
rockbox-2cf33133820ee17e4b5d2d622db15dedff1a1f6e.zip
fuze+: add more clocking code, add dma code, add ssp code, add stub usb code, update storage to SD + MMC, beginning of the driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30010 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/pinctrl-imx233.h')
-rw-r--r--firmware/target/arm/imx233/pinctrl-imx233.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/pinctrl-imx233.h b/firmware/target/arm/imx233/pinctrl-imx233.h
index 291b5c8ff7..4e3a9a035e 100644
--- a/firmware/target/arm/imx233/pinctrl-imx233.h
+++ b/firmware/target/arm/imx233/pinctrl-imx233.h
@@ -106,4 +106,20 @@ static inline void imx233_set_pin_function(unsigned bank, unsigned pin, unsigned
__REG_SET(HW_PINCTRL_MUXSEL(2 * bank + pin / 16)) = function << (2 * (pin % 16));
}
+static inline void imx233_enable_pin_pullup(unsigned bank, unsigned pin, bool enable)
+{
+ if(enable)
+ __REG_SET(HW_PINCTRL_PULL(bank)) = 1 << pin;
+ else
+ __REG_CLR(HW_PINCTRL_PULL(bank)) = 1 << pin;
+}
+
+static inline void imx233_enable_pin_pullup_mask(unsigned bank, uint32_t pin_msk, bool enable)
+{
+ if(enable)
+ __REG_SET(HW_PINCTRL_PULL(bank)) = pin_msk;
+ else
+ __REG_CLR(HW_PINCTRL_PULL(bank)) = pin_msk;
+}
+
#endif /* __PINCTRL_IMX233_H__ */