summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-05-10 00:08:03 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-05-10 00:13:11 +0200
commit645680d62b82455d24fcb178f1cc5208f9942e38 (patch)
tree1a9f928afc34260059bf986fc2caa7fc5b2a2028 /firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
parentd29a11b7a8f4ce230e9385a44f352a559bde753f (diff)
downloadrockbox-645680d62b82455d24fcb178f1cc5208f9942e38.tar.gz
rockbox-645680d62b82455d24fcb178f1cc5208f9942e38.zip
imx233: add pinctrl debug code to track pin uses
Past development has proved that one can mistakely use the same pin for two uses without noticing. Since this causes extremely hard to find bugs, the infrastructure will allow to register pin uses and panic when a conflict is detected. The pinctrl debug now shows the pin uses when its support is compiled in. Change-Id: Idb2d5235ce09207d77aa474d6f158e72b933761a
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c')
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
index b83c49d092..20b46fdc63 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
@@ -56,6 +56,13 @@ static void setup_lcd_pins(bool use_lcdif)
56 /* WARNING 56 /* WARNING
57 * the B1P22 and B1P24 pins are used by the tuner i2c! Do NOT drive 57 * the B1P22 and B1P24 pins are used by the tuner i2c! Do NOT drive
58 * them as lcd_dotclk and lcd_hsync or it will break the tuner! */ 58 * them as lcd_dotclk and lcd_hsync or it will break the tuner! */
59 imx233_pinctrl_acquire_pin(1, 18, "lcd reset");
60 imx233_pinctrl_acquire_pin(1, 19, "lcd rs");
61 imx233_pinctrl_acquire_pin(1, 20, "lcd wr");
62 imx233_pinctrl_acquire_pin(1, 21, "lcd cs");
63 imx233_pinctrl_acquire_pin(1, 23, "lcd enable");
64 imx233_pinctrl_acquire_pin(1, 25, "lcd vsync");
65 imx233_pinctrl_acquire_pin_mask(1, 0x3ffff, "lcd data");
59 if(use_lcdif) 66 if(use_lcdif)
60 { 67 {
61 imx233_set_pin_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */ 68 imx233_set_pin_function(1, 25, PINCTRL_FUNCTION_GPIO); /* lcd_vsync */
@@ -71,7 +78,7 @@ static void setup_lcd_pins(bool use_lcdif)
71 else 78 else
72 { 79 {
73 __REG_SET(HW_PINCTRL_MUXSEL(2)) = 0xffffffff; /* lcd_d{0-15} */ 80 __REG_SET(HW_PINCTRL_MUXSEL(2)) = 0xffffffff; /* lcd_d{0-15} */
74 imx233_enable_gpio_output_mask(1, 0x3ffffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,dotclk,enable,hsync,vsync} */ 81 imx233_enable_gpio_output_mask(1, 0x2bfffff, false); /* lcd_{d{0-17},reset,rs,wr,cs,enable,vsync} */
75 imx233_set_pin_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */ 82 imx233_set_pin_function(1, 16, PINCTRL_FUNCTION_GPIO); /* lcd_d16 */
76 imx233_set_pin_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */ 83 imx233_set_pin_function(1, 17, PINCTRL_FUNCTION_GPIO); /* lcd_d17 */
77 imx233_set_pin_function(1, 19, PINCTRL_FUNCTION_GPIO); /* lcd_rs */ 84 imx233_set_pin_function(1, 19, PINCTRL_FUNCTION_GPIO); /* lcd_rs */