diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2010-11-22 09:39:51 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-15 12:42:49 +0100 |
commit | 96f3e2568456402769f3998e111746941f549dc6 (patch) | |
tree | 20b942c2881fcb43254c48c328b9b1e599c8565f /arch/arm/mach-mx5 | |
parent | ARM: mx5: check for error in ioremap (diff) | |
download | linux-96f3e2568456402769f3998e111746941f549dc6.tar.xz linux-96f3e2568456402769f3998e111746941f549dc6.zip |
MXC IOMUX-V3 replace struct pad_desc with bitmapped cookie (step 2)
This patch actually replaces the 'struct pad_desc' with a u64 cookie
to facilitate adding platform specific pad_ctrl settings to an
existing pad definition.
So, instead of:
iomux_v3_cfg_t power_key = MX51_PAD_EIM_A27__GPIO_2_21;
power_key.pad_ctrl = MX51_GPIO_PAD_CTRL_2;
mxc_iomux_v3_setup_pad(&power_key);
one can write:
mxc_iomux_v3_setup_pad((MX51_PAD_EIM_A27__GPIO_2_21 & ~MUX_PAD_CTRL_MASK) | MX51_GPIO_PAD_CTRL_2);
Patch applies to branch 'imx-for-2.6.38' of git://git.pengutronix.de/git/imx/linux-2.6
Signed-Off-By: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_babbage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 368a315e9ace..24e335ca7627 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c @@ -193,7 +193,7 @@ static int gpio_usbh1_active(void) int ret; /* Set USBH1_STP to GPIO and toggle it */ - mxc_iomux_v3_setup_pad(&usbh1stp_gpio); + mxc_iomux_v3_setup_pad(usbh1stp_gpio); ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp"); if (ret) { @@ -206,7 +206,7 @@ static int gpio_usbh1_active(void) gpio_free(BABBAGE_USBH1_STP); /* De-assert USB PHY RESETB */ - mxc_iomux_v3_setup_pad(&phyreset_gpio); + mxc_iomux_v3_setup_pad(phyreset_gpio); ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset"); if (ret) { @@ -352,7 +352,8 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = { static void __init mxc_board_init(void) { iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; - iomux_v3_cfg_t power_key = MX51_PAD_EIM_A27__GPIO_2_21; + iomux_v3_cfg_t power_key = (MX51_PAD_EIM_A27__GPIO_2_21 & + ~MUX_PAD_CTRL_MASK) | MX51_GPIO_PAD_CTRL_2; #if defined(CONFIG_CPU_FREQ_IMX) get_cpu_op = mx51_get_cpu_op; @@ -364,8 +365,7 @@ static void __init mxc_board_init(void) imx51_add_fec(NULL); /* Set the PAD settings for the pwr key. */ - power_key.pad_ctrl = MX51_GPIO_PAD_CTRL_2; - mxc_iomux_v3_setup_pad(&power_key); + mxc_iomux_v3_setup_pad(power_key); imx51_add_gpio_keys(&imx_button_data); imx51_add_imx_i2c(0, &babbage_i2c_data); @@ -382,7 +382,7 @@ static void __init mxc_board_init(void) gpio_usbh1_active(); mxc_register_device(&mxc_usbh1_device, &usbh1_config); /* setback USBH1_STP to be function */ - mxc_iomux_v3_setup_pad(&usbh1stp); + mxc_iomux_v3_setup_pad(usbh1stp); babbage_usbhub_reset(); imx51_add_sdhci_esdhc_imx(0, NULL); |