From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 5/6] ARM: mxs/mx23evk: add mmc device
Date: Tue, 22 Feb 2011 09:33:44 +0100 [thread overview]
Message-ID: <20110222083344.GV22310@pengutronix.de> (raw)
In-Reply-To: <1298284979-14853-6-git-send-email-shawn.guo@freescale.com>
On Mon, Feb 21, 2011 at 06:42:58PM +0800, Shawn Guo wrote:
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
> arch/arm/mach-mxs/Kconfig | 1 +
> arch/arm/mach-mxs/mach-mx23evk.c | 47 ++++++++++++++++++++++++++++++++++++++
> 2 files changed, 48 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
> index cd2fbdf..f47fae3 100644
> --- a/arch/arm/mach-mxs/Kconfig
> +++ b/arch/arm/mach-mxs/Kconfig
> @@ -19,6 +19,7 @@ config MACH_MX23EVK
> bool "Support MX23EVK Platform"
> select SOC_IMX23
> select MXS_HAVE_AMBA_DUART
> + select MXS_HAVE_PLATFORM_MMC
> default y
> help
> Include support for MX23EVK platform. This includes specific
> diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c
> index aa06400..21519e3 100644
> --- a/arch/arm/mach-mxs/mach-mx23evk.c
> +++ b/arch/arm/mach-mxs/mach-mx23evk.c
> @@ -26,17 +26,64 @@
>
> #include "devices-mx23.h"
>
> +#define MX23EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(1, 30)
> +#define MX23EVK_MMC0_SLOT_POWER MXS_GPIO_NR(1, 29)
> +
> static const iomux_cfg_t mx23evk_pads[] __initconst = {
> /* duart */
> MX23_PAD_PWM0__DUART_RX | MXS_PAD_4MA,
> MX23_PAD_PWM1__DUART_TX | MXS_PAD_4MA,
> +
> + /* mmc */
> + MX23_PAD_SSP1_DATA0__SSP1_DATA0 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_SSP1_DATA1__SSP1_DATA1 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_SSP1_DATA2__SSP1_DATA2 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_SSP1_DATA3__SSP1_DATA3 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_GPMI_D08__SSP1_DATA4 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_GPMI_D09__SSP1_DATA5 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_GPMI_D10__SSP1_DATA6 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_GPMI_D11__SSP1_DATA7 |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_SSP1_CMD__SSP1_CMD |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
> + MX23_PAD_SSP1_DETECT__SSP1_DETECT |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
> + MX23_PAD_SSP1_SCK__SSP1_SCK |
> + (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
> + /* write protect */
> + MX23_PAD_PWM4__GPIO_1_30 |
> + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
> + /* slot power enable */
> + MX23_PAD_PWM3__GPIO_1_29 |
> + (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
> +};
> +
> +static struct mxs_mmc_platform_data mx23_mmc_pdata __initdata = {
> + .wp_gpio = MX23EVK_MMC0_WRITE_PROTECT,
> + .flags = SLOTF_8_BIT_CAPABLE,
can this be const?
> };
>
> static void __init mx23evk_init(void)
> {
> + int ret;
> +
> mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));
>
> mx23_add_duart();
> +
> + /* power on mmc slot by writing 0 to the gpio */
> + ret = gpio_request_one(MX23EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT,
> + "mmc0-slot-power");
> + if (ret)
> + pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
> + mx23_add_mmc(0, &mx23_mmc_pdata);
> }
>
> static void __init mx23evk_timer_init(void)
> --
> 1.7.1
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2011-02-22 8:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 10:42 [PATCH v3] Add mmc device for i.MX23/28 Shawn Guo
2011-02-21 10:42 ` [PATCH v3 1/6] ARM: mxs/clock: fix base address missing in name##_set_parent Shawn Guo
2011-02-21 10:42 ` [PATCH v3 2/6] ARM: mxs: make ssp error irq definition consistent Shawn Guo
2011-02-22 8:20 ` Uwe Kleine-König
2011-02-21 10:42 ` [PATCH v3 3/6] ARM: mxs: dynamically allocate mmc device Shawn Guo
2011-02-22 8:31 ` Uwe Kleine-König
2011-02-22 12:39 ` Shawn Guo
2011-02-22 18:33 ` Uwe Kleine-König
2011-03-16 10:31 ` [PATCH v4 " Uwe Kleine-König
2011-02-21 10:42 ` [PATCH v3 4/6] ARM: mxs: fix typo "GPO" in iomux-mx23.h Shawn Guo
2011-02-25 20:55 ` Uwe Kleine-König
2011-02-21 10:42 ` [PATCH v3 5/6] ARM: mxs/mx23evk: add mmc device Shawn Guo
2011-02-21 17:42 ` Wolfram Sang
2011-02-22 8:33 ` Uwe Kleine-König [this message]
2011-02-22 12:22 ` Shawn Guo
2011-02-22 8:49 ` [PATCH v4] " Shawn Guo
2011-02-22 10:35 ` Wolfram Sang
2011-02-21 10:42 ` [PATCH v3 6/6] ARM: mxs/mx28evk: " Shawn Guo
2011-02-22 8:50 ` [PATCH v4] " Shawn Guo
2011-02-22 10:35 ` Wolfram Sang
2011-03-25 11:46 ` mx28 sdio problems (was: Re: [PATCH v4] ARM: mxs/mx28evk: add mmc device) Marc Kleine-Budde
2011-03-26 14:13 ` Shawn Guo
2011-03-29 10:05 ` mx28 sdio problems Marc Kleine-Budde
2011-02-21 17:40 ` [PATCH v3] Add mmc device for i.MX23/28 Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110222083344.GV22310@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).