summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRichard Zhu <r65037@freescale.com>2009-08-07 09:35:25 +0800
committerJustin Waters <justin.waters@timesys.com>2009-10-13 11:05:06 -0400
commitb2dffc1ca1d61998431fbf48f519e4d92e388bc0 (patch)
tree6b48003b61acf4d1980387ac24ceb9cd84b8d539 /arch
parentc85d29329ef5395fc3cb5ba0e5a68a85b491f20b (diff)
ENGR00114920 MX25: Pin mux warning when install camera modules
Fix the iomux confliction between the sim and camera modules Signed-off-by: Richard Zhu <r65037@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx25/mx25_3stack_gpio.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/mach-mx25/mx25_3stack_gpio.c b/arch/arm/mach-mx25/mx25_3stack_gpio.c
index 99aad7df6112..2cb140d5798f 100644
--- a/arch/arm/mach-mx25/mx25_3stack_gpio.c
+++ b/arch/arm/mach-mx25/mx25_3stack_gpio.c
@@ -29,6 +29,9 @@
* @ingroup GPIO_MX25
*/
static struct mxc_iomux_pin_cfg __initdata mxc_iomux_pins[] = {
+};
+
+static struct mxc_iomux_pin_cfg __initdata sim_iomux_pins[] = {
/* SIM1 */
/* SIM1 CLK */
{
@@ -105,6 +108,15 @@ static struct mxc_iomux_pin_cfg __initdata mxc_iomux_pins[] = {
},
};
+static int __initdata enable_sim = { 0 };
+static int __init sim_setup(char *__unused)
+{
+ enable_sim = 1;
+ return 1;
+}
+
+__setup("sim", sim_setup);
+
/*!
* This system-wide GPIO function initializes the pins during system startup.
* All the statically linked device drivers should put the proper GPIO
@@ -114,7 +126,8 @@ static struct mxc_iomux_pin_cfg __initdata mxc_iomux_pins[] = {
*/
void __init mx25_3stack_gpio_init(void)
{
- int i;
+ int i, num = 0;
+ struct mxc_iomux_pin_cfg *pin_ptr;
for (i = 0; i < ARRAY_SIZE(mxc_iomux_pins); i++) {
mxc_request_iomux(mxc_iomux_pins[i].pin,
@@ -126,6 +139,20 @@ void __init mx25_3stack_gpio_init(void)
mxc_iomux_set_input(mxc_iomux_pins[i].in_select,
mxc_iomux_pins[i].in_mode);
}
+
+ if (enable_sim) {
+ pin_ptr = sim_iomux_pins;
+ num = ARRAY_SIZE(sim_iomux_pins);
+ }
+
+ for (i = 0; i < num; i++) {
+ mxc_request_iomux(pin_ptr[i].pin, pin_ptr[i].mux_mode);
+ if (pin_ptr[i].pad_cfg)
+ mxc_iomux_set_pad(pin_ptr[i].pin, pin_ptr[i].pad_cfg);
+ if (pin_ptr[i].in_select)
+ mxc_iomux_set_input(pin_ptr[i].in_select,
+ pin_ptr[i].in_mode);
+ }
}
/*!