summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/ssp-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-07-02 02:28:06 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-07-02 02:28:06 +0000
commite34eaf300c96e8d1d75e6027af84fdb3ad096aa0 (patch)
tree4f6be730843de2bd188518cade7de9f131d10ef6 /firmware/target/arm/imx233/ssp-imx233.c
parent88f75d096eb153101f47c3fc75d4ad9cbdbd3de4 (diff)
downloadrockbox-e34eaf300c96e8d1d75e6027af84fdb3ad096aa0.tar.gz
rockbox-e34eaf300c96e8d1d75e6027af84fdb3ad096aa0.tar.bz2
rockbox-e34eaf300c96e8d1d75e6027af84fdb3ad096aa0.zip
imx233/fuze+: simplify ssp pin code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30113 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/ssp-imx233.c')
-rw-r--r--firmware/target/arm/imx233/ssp-imx233.c33
1 files changed, 4 insertions, 29 deletions
diff --git a/firmware/target/arm/imx233/ssp-imx233.c b/firmware/target/arm/imx233/ssp-imx233.c
index 22824964f3..ef137fcfbf 100644
--- a/firmware/target/arm/imx233/ssp-imx233.c
+++ b/firmware/target/arm/imx233/ssp-imx233.c
@@ -180,36 +180,11 @@ void imx233_ssp_setup_ssp2_sd_mmc_pins(bool enable_pullups, unsigned bus_width,
imx233_set_pin_function(0, 24, PINCTRL_FUNCTION_ALT2);
imx233_enable_pin_pullup(0, 20, enable_pullups);
/* SSP_DATA{0-7}*/
- imx233_set_pin_drive_strength(0, 0, drive_strength);
- imx233_set_pin_function(0, 0, PINCTRL_FUNCTION_ALT2);
- imx233_enable_pin_pullup(0, 0, enable_pullups);
-
- if(bus_width >= 4)
- {
- imx233_set_pin_drive_strength(0, 1, drive_strength);
- imx233_set_pin_drive_strength(0, 2, drive_strength);
- imx233_set_pin_drive_strength(0, 3, drive_strength);
- imx233_set_pin_function(0, 1, PINCTRL_FUNCTION_ALT2);
- imx233_set_pin_function(0, 2, PINCTRL_FUNCTION_ALT2);
- imx233_set_pin_function(0, 3, PINCTRL_FUNCTION_ALT2);
- imx233_enable_pin_pullup(0, 1, enable_pullups);
- imx233_enable_pin_pullup(0, 2, enable_pullups);
- imx233_enable_pin_pullup(0, 3, enable_pullups);
- }
- if(bus_width >= 8)
+ for(unsigned i = 0; i < bus_width; i++)
{
- imx233_set_pin_drive_strength(0, 4, drive_strength);
- imx233_set_pin_drive_strength(0, 5, drive_strength);
- imx233_set_pin_drive_strength(0, 6, drive_strength);
- imx233_set_pin_drive_strength(0, 7, drive_strength);
- imx233_set_pin_function(0, 4, PINCTRL_FUNCTION_ALT2);
- imx233_set_pin_function(0, 5, PINCTRL_FUNCTION_ALT2);
- imx233_set_pin_function(0, 6, PINCTRL_FUNCTION_ALT2);
- imx233_set_pin_function(0, 7, PINCTRL_FUNCTION_ALT2);
- imx233_enable_pin_pullup(0, 4, enable_pullups);
- imx233_enable_pin_pullup(0, 5, enable_pullups);
- imx233_enable_pin_pullup(0, 6, enable_pullups);
- imx233_enable_pin_pullup(0, 7, enable_pullups);
+ imx233_set_pin_drive_strength(0, i, drive_strength);
+ imx233_set_pin_function(0, i, PINCTRL_FUNCTION_ALT2);
+ imx233_enable_pin_pullup(0, i, enable_pullups);
}
imx233_enable_gpio_output_mask(0, 0x11000ff, false);