diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2010-11-22 03:39:51 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-15 06:42:49 -0500 |
commit | 96f3e2568456402769f3998e111746941f549dc6 (patch) | |
tree | 20b942c2881fcb43254c48c328b9b1e599c8565f /arch/arm/mach-mx5 | |
parent | 28a4f908acb342350b9ecbfcdf0a999cb83e05aa (diff) |
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) | |||
193 | int ret; | 193 | int ret; |
194 | 194 | ||
195 | /* Set USBH1_STP to GPIO and toggle it */ | 195 | /* Set USBH1_STP to GPIO and toggle it */ |
196 | mxc_iomux_v3_setup_pad(&usbh1stp_gpio); | 196 | mxc_iomux_v3_setup_pad(usbh1stp_gpio); |
197 | ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp"); | 197 | ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp"); |
198 | 198 | ||
199 | if (ret) { | 199 | if (ret) { |
@@ -206,7 +206,7 @@ static int gpio_usbh1_active(void) | |||
206 | gpio_free(BABBAGE_USBH1_STP); | 206 | gpio_free(BABBAGE_USBH1_STP); |
207 | 207 | ||
208 | /* De-assert USB PHY RESETB */ | 208 | /* De-assert USB PHY RESETB */ |
209 | mxc_iomux_v3_setup_pad(&phyreset_gpio); | 209 | mxc_iomux_v3_setup_pad(phyreset_gpio); |
210 | ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset"); | 210 | ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset"); |
211 | 211 | ||
212 | if (ret) { | 212 | if (ret) { |
@@ -352,7 +352,8 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = { | |||
352 | static void __init mxc_board_init(void) | 352 | static void __init mxc_board_init(void) |
353 | { | 353 | { |
354 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; | 354 | iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP; |
355 | iomux_v3_cfg_t power_key = MX51_PAD_EIM_A27__GPIO_2_21; | 355 | iomux_v3_cfg_t power_key = (MX51_PAD_EIM_A27__GPIO_2_21 & |
356 | ~MUX_PAD_CTRL_MASK) | MX51_GPIO_PAD_CTRL_2; | ||
356 | 357 | ||
357 | #if defined(CONFIG_CPU_FREQ_IMX) | 358 | #if defined(CONFIG_CPU_FREQ_IMX) |
358 | get_cpu_op = mx51_get_cpu_op; | 359 | get_cpu_op = mx51_get_cpu_op; |
@@ -364,8 +365,7 @@ static void __init mxc_board_init(void) | |||
364 | imx51_add_fec(NULL); | 365 | imx51_add_fec(NULL); |
365 | 366 | ||
366 | /* Set the PAD settings for the pwr key. */ | 367 | /* Set the PAD settings for the pwr key. */ |
367 | power_key.pad_ctrl = MX51_GPIO_PAD_CTRL_2; | 368 | mxc_iomux_v3_setup_pad(power_key); |
368 | mxc_iomux_v3_setup_pad(&power_key); | ||
369 | imx51_add_gpio_keys(&imx_button_data); | 369 | imx51_add_gpio_keys(&imx_button_data); |
370 | 370 | ||
371 | imx51_add_imx_i2c(0, &babbage_i2c_data); | 371 | imx51_add_imx_i2c(0, &babbage_i2c_data); |
@@ -382,7 +382,7 @@ static void __init mxc_board_init(void) | |||
382 | gpio_usbh1_active(); | 382 | gpio_usbh1_active(); |
383 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | 383 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); |
384 | /* setback USBH1_STP to be function */ | 384 | /* setback USBH1_STP to be function */ |
385 | mxc_iomux_v3_setup_pad(&usbh1stp); | 385 | mxc_iomux_v3_setup_pad(usbh1stp); |
386 | babbage_usbhub_reset(); | 386 | babbage_usbhub_reset(); |
387 | 387 | ||
388 | imx51_add_sdhci_esdhc_imx(0, NULL); | 388 | imx51_add_sdhci_esdhc_imx(0, NULL); |