diff options
author | Valentin Longchamp <valentin.longchamp@epfl.ch> | 2009-08-12 05:29:21 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-14 06:41:13 -0400 |
commit | 2718c15c5fffa9d05e5076451ab4fc81caac313f (patch) | |
tree | 2e887fd36c8e7f1c4662aeaf1543b1c3306bf0c9 | |
parent | 8b1a540c245d68a77dbd909359cfc709b6a3a1bf (diff) |
mx31moboard: two GPIOS are used to reset other microcontrolers on the robot
Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-marxbot.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 53ce7ff0637c..3e2b73051b94 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -47,6 +47,8 @@ static unsigned int marxbot_pins[] = { | |||
47 | MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, MX31_PIN_CSI_VSYNC__CSI_VSYNC, | 47 | MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, MX31_PIN_CSI_VSYNC__CSI_VSYNC, |
48 | MX31_PIN_GPIO3_0__GPIO3_0, MX31_PIN_GPIO3_1__GPIO3_1, | 48 | MX31_PIN_GPIO3_0__GPIO3_0, MX31_PIN_GPIO3_1__GPIO3_1, |
49 | MX31_PIN_TXD2__GPIO1_28, | 49 | MX31_PIN_TXD2__GPIO1_28, |
50 | /* dsPIC resets */ | ||
51 | MX31_PIN_STXD5__GPIO1_21, MX31_PIN_SRXD5__GPIO1_22, | ||
50 | }; | 52 | }; |
51 | 53 | ||
52 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) | 54 | #define SDHC2_CD IOMUX_TO_GPIO(MX31_PIN_ATA_DIOR) |
@@ -102,6 +104,22 @@ static struct imxmmc_platform_data sdhc2_pdata = { | |||
102 | .exit = marxbot_sdhc2_exit, | 104 | .exit = marxbot_sdhc2_exit, |
103 | }; | 105 | }; |
104 | 106 | ||
107 | #define TRSLAT_RST_B IOMUX_TO_GPIO(MX31_PIN_STXD5) | ||
108 | #define DSPICS_RST_B IOMUX_TO_GPIO(MX31_PIN_SRXD5) | ||
109 | |||
110 | static void dspics_resets_init(void) | ||
111 | { | ||
112 | if (!gpio_request(TRSLAT_RST_B, "translator-rst")) { | ||
113 | gpio_direction_output(TRSLAT_RST_B, 1); | ||
114 | gpio_export(TRSLAT_RST_B, false); | ||
115 | } | ||
116 | |||
117 | if (!gpio_request(DSPICS_RST_B, "dspics-rst")) { | ||
118 | gpio_direction_output(DSPICS_RST_B, 1); | ||
119 | gpio_export(DSPICS_RST_B, false); | ||
120 | } | ||
121 | } | ||
122 | |||
105 | /* | 123 | /* |
106 | * system init for baseboard usage. Will be called by mx31moboard init. | 124 | * system init for baseboard usage. Will be called by mx31moboard init. |
107 | */ | 125 | */ |
@@ -112,5 +130,7 @@ void __init mx31moboard_marxbot_init(void) | |||
112 | mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins), | 130 | mxc_iomux_setup_multiple_pins(marxbot_pins, ARRAY_SIZE(marxbot_pins), |
113 | "marxbot"); | 131 | "marxbot"); |
114 | 132 | ||
133 | dspics_resets_init(); | ||
134 | |||
115 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 135 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); |
116 | } | 136 | } |