* [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 @ 2011-04-01 19:29 Fabio Estevam 2011-04-01 19:29 ` [PATCH 2/3] ARM: mach-mx5/mx53_evk.c: Fix SD3 registration Fabio Estevam 2011-04-03 23:28 ` [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 Fabio Estevam 0 siblings, 2 replies; 6+ messages in thread From: Fabio Estevam @ 2011-04-01 19:29 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- arch/arm/mach-mx5/board-mx53_loco.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 10a1bea..249de6b 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c @@ -28,6 +28,7 @@ #include <mach/hardware.h> #include <mach/imx-uart.h> #include <mach/iomux-mx53.h> +#include <mach/esdhc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -40,6 +41,8 @@ #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) +#define SD3_GPIO_CD IMX_GPIO_NR(3, 11) +#define SD3_GPIO_WP IMX_GPIO_NR(3, 12) static iomux_v3_cfg_t mx53_loco_pads[] = { /* FEC */ @@ -227,6 +230,11 @@ static const struct imxi2c_platform_data mx53_loco_i2c_data __initconst = { .bitrate = 100000, }; +static struct esdhc_platform_data sd3_pdata = { + .wp_gpio = SD3_GPIO_WP, + .cd_gpio = SD3_GPIO_CD, +}; + static void __init mx53_loco_board_init(void) { mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, @@ -238,7 +246,7 @@ static void __init mx53_loco_board_init(void) imx53_add_imx_i2c(0, &mx53_loco_i2c_data); imx53_add_imx_i2c(1, &mx53_loco_i2c_data); imx53_add_sdhci_esdhc_imx(0, NULL); - imx53_add_sdhci_esdhc_imx(2, NULL); + imx53_add_sdhci_esdhc_imx(2, &sd3_pdata); imx_add_gpio_keys(&loco_button_data); } -- 1.6.0.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] ARM: mach-mx5/mx53_evk.c: Fix SD3 registration 2011-04-01 19:29 [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 Fabio Estevam @ 2011-04-01 19:29 ` Fabio Estevam 2011-04-01 19:29 ` [PATCH 3/3] ARM: mx5/mx53_evk: Add write-protect and card-detect for SD1 and SD3 Fabio Estevam 2011-04-03 23:28 ` [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 Fabio Estevam 1 sibling, 1 reply; 6+ messages in thread From: Fabio Estevam @ 2011-04-01 19:29 UTC (permalink / raw) To: linux-arm-kernel On the MX53EVK board there are two eSDHC ports available: SD1 and SD3. Fix the argument passed to the esdhc registration function to correctly register SD3. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- arch/arm/mach-mx5/board-mx53_evk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index 2af3f43..a6e0cad 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c @@ -129,7 +129,7 @@ static void __init mx53_evk_board_init(void) imx53_add_imx_i2c(1, &mx53_evk_i2c_data); imx53_add_sdhci_esdhc_imx(0, NULL); - imx53_add_sdhci_esdhc_imx(1, NULL); + imx53_add_sdhci_esdhc_imx(2, NULL); spi_register_board_info(mx53_evk_spi_board_info, ARRAY_SIZE(mx53_evk_spi_board_info)); -- 1.6.0.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] ARM: mx5/mx53_evk: Add write-protect and card-detect for SD1 and SD3 2011-04-01 19:29 ` [PATCH 2/3] ARM: mach-mx5/mx53_evk.c: Fix SD3 registration Fabio Estevam @ 2011-04-01 19:29 ` Fabio Estevam 0 siblings, 0 replies; 6+ messages in thread From: Fabio Estevam @ 2011-04-01 19:29 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- arch/arm/mach-mx5/board-mx53_evk.c | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index a6e0cad..7c240fc 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c @@ -33,10 +33,15 @@ #include <asm/mach/time.h> #include <mach/imx-uart.h> #include <mach/iomux-mx53.h> +#include <mach/esdhc.h> #define MX53_EVK_FEC_PHY_RST IMX_GPIO_NR(7, 6) #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) +#define EVK_SD1_CD IMX_GPIO_NR(3, 13) +#define EVK_SD1_WP IMX_GPIO_NR(3, 14) +#define EVK_SD3_CD IMX_GPIO_NR(3, 11) +#define EVK_SD3_WP IMX_GPIO_NR(3, 12) #include "crm_regs.h" #include "devices-imx53.h" @@ -60,6 +65,11 @@ static iomux_v3_cfg_t mx53_evk_pads[] = { /* ecspi chip select lines */ MX53_PAD_EIM_EB2__GPIO2_30, MX53_PAD_EIM_D19__GPIO3_19, + + MX53_PAD_EIM_DA11__GPIO3_11, /* SD3 Card-Detect */ + MX53_PAD_EIM_DA12__GPIO3_12, /* SD3 Write-Protect */ + MX53_PAD_EIM_DA13__GPIO3_13, /* SD1 Card-Detect */ + MX53_PAD_EIM_DA14__GPIO3_14, /* SD1 Write-Protect */ }; static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = { @@ -117,6 +127,16 @@ static const struct spi_imx_master mx53_evk_spi_data __initconst = { .num_chipselect = ARRAY_SIZE(mx53_evk_spi_cs), }; +static struct esdhc_platform_data sd1_pdata = { + .wp_gpio = EVK_SD1_WP, + .cd_gpio = EVK_SD1_CD, +}; + +static struct esdhc_platform_data sd3_pdata = { + .wp_gpio = EVK_SD3_WP, + .cd_gpio = EVK_SD3_CD, +}; + static void __init mx53_evk_board_init(void) { mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads, @@ -128,8 +148,8 @@ static void __init mx53_evk_board_init(void) imx53_add_imx_i2c(0, &mx53_evk_i2c_data); imx53_add_imx_i2c(1, &mx53_evk_i2c_data); - imx53_add_sdhci_esdhc_imx(0, NULL); - imx53_add_sdhci_esdhc_imx(2, NULL); + imx53_add_sdhci_esdhc_imx(0, &sd1_pdata); + imx53_add_sdhci_esdhc_imx(2, &sd3_pdata); spi_register_board_info(mx53_evk_spi_board_info, ARRAY_SIZE(mx53_evk_spi_board_info)); -- 1.6.0.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 2011-04-01 19:29 [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 Fabio Estevam 2011-04-01 19:29 ` [PATCH 2/3] ARM: mach-mx5/mx53_evk.c: Fix SD3 registration Fabio Estevam @ 2011-04-03 23:28 ` Fabio Estevam 2011-04-04 0:01 ` Wolfram Sang 1 sibling, 1 reply; 6+ messages in thread From: Fabio Estevam @ 2011-04-03 23:28 UTC (permalink / raw) To: linux-arm-kernel Hi Sascha, On 4/1/2011 4:29 PM, Fabio Estevam wrote: > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> > --- > arch/arm/mach-mx5/board-mx53_loco.c | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) Please don?t apply this patch yet. After further testing I realize that I get the following errors after applying this patch: mmc1: new high speed SDHC card at address aaaa mmcblk1: mmc1:aaaa SD08G 7.40 GiB mmcblk1: p1 p2 mmc1: Timeout waiting for hardware interrupt. mmcblk1: retrying using single block read mmcblk1: error -84 transferring data, sector 32769, nr 32, card status 0x900 end_request: I/O error, dev mmcblk1, sector 32769 Buffer I/O error on device mmcblk1p2, logical block 0 mmcblk1: error -84 transferring data, sector 32770, nr 31, card status 0x900 end_request: I/O error, dev mmcblk1, sector 32770 Buffer I/O error on device mmcblk1p2, logical block 1 mmcblk1: error -84 transferring data, sector 32771, nr 30, card status 0x900 end_request: I/O error, dev mmcblk1, sector 32771 Will start debugging it. Regards, Fabio Estevam ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 2011-04-03 23:28 ` [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 Fabio Estevam @ 2011-04-04 0:01 ` Wolfram Sang 2011-04-04 2:37 ` Fabio Estevam 0 siblings, 1 reply; 6+ messages in thread From: Wolfram Sang @ 2011-04-04 0:01 UTC (permalink / raw) To: linux-arm-kernel Hi Fabio, > mmcblk1: error -84 transferring data, sector 32769, nr 32, card status 0x900 Last time I had -EILSEQ, the buswidth-caps were wrong. Does the board support 8bit-width? Hope it helps, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110404/aad41c86/attachment.sig> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 2011-04-04 0:01 ` Wolfram Sang @ 2011-04-04 2:37 ` Fabio Estevam 0 siblings, 0 replies; 6+ messages in thread From: Fabio Estevam @ 2011-04-04 2:37 UTC (permalink / raw) To: linux-arm-kernel Hi Wolfram, On Sun, Apr 3, 2011 at 9:01 PM, Wolfram Sang <w.sang@pengutronix.de> wrote: > Hi Fabio, > >> mmcblk1: error -84 transferring data, sector 32769, nr 32, card status 0x900 > > Last time I had -EILSEQ, the buswidth-caps were wrong. Does the board support > 8bit-width? Yes, esdhc3 port on mx53_loco board supports 8-bit width. Regards, Fabio Estevam ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-04-04 2:37 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-01 19:29 [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 Fabio Estevam 2011-04-01 19:29 ` [PATCH 2/3] ARM: mach-mx5/mx53_evk.c: Fix SD3 registration Fabio Estevam 2011-04-01 19:29 ` [PATCH 3/3] ARM: mx5/mx53_evk: Add write-protect and card-detect for SD1 and SD3 Fabio Estevam 2011-04-03 23:28 ` [PATCH 1/3] ARM: mx5/mx53_loco: Add write-protect and card-detect for SD3 Fabio Estevam 2011-04-04 0:01 ` Wolfram Sang 2011-04-04 2:37 ` Fabio Estevam
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).