[PATCH 24/133] [Jaunty SRU] ARM.imx51 Freescale:ENGR00110144 [MX51]Two esdhc port can't work simultaneously.

Bryan Wu bryan.wu at canonical.com
Fri Jul 10 05:31:28 UTC 2009


Brad Figg wrote:
> From: Richard Zhu <r65037 at freescale.com>
> 
> On MX51 3DS platform, these two esdhc share a global struct
> in linux driver, this sharing would cause the unexpected
> clock gate on/off operations, that would make one esdhc
> port can't generate the INT normally. So let each esdhc
> port has its own global private struct.
> 
> Signed-off-by: Richard Zhu <r65037 at freescale.com>
> Signed-off-by: Brad Figg <brad.figg at canonical.com>
> ---
>  arch/arm/mach-mx51/mx51_3stack.c |   13 ++++++++++++-
>  drivers/mmc/host/mx_sdhci.c      |   10 +++++-----
>  2 files changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-mx51/mx51_3stack.c b/arch/arm/mach-mx51/mx51_3stack.c
> index 4b66a0c..764874f 100644
> --- a/arch/arm/mach-mx51/mx51_3stack.c
> +++ b/arch/arm/mach-mx51/mx51_3stack.c
> @@ -487,6 +487,17 @@ static struct mxc_mmc_platform_data mmc_data = {

Here is a little bit name confusing. It should be mmc1_data.

>  	.clock_mmc = "esdhc_clk",
>  	.power_mmc = NULL,
>  };
> +static struct mxc_mmc_platform_data mmc1_data = {

This should be mmc2_data.

> +	.ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30 |
> +	    MMC_VDD_31_32,
> +	.caps = MMC_CAP_4_BIT_DATA,
> +	.min_clk = 150000,
> +	.max_clk = 50000000,
> +	.card_inserted_state = 0,
> +	.status = sdhc_get_card_det_status,
> +	.wp_status = sdhc_write_protect,
> +	.clock_mmc = "esdhc_clk",
> +};
>  
>  /*!
>   * Resource definition for the SDHC1
> @@ -548,7 +559,7 @@ static struct platform_device mxcsdhc2_device = {
>  	.id = 1,
>  	.dev = {
>  		.release = mxc_nop_release,
> -		.platform_data = &mmc_data,
> +		.platform_data = &mmc1_data,

mxcsdhc1_device should use &mmc1_data, while mxcsdhc2_device should use &mmc2_data;

-Bryan

>  		},
>  	.num_resources = ARRAY_SIZE(mxcsdhc2_resources),
>  	.resource = mxcsdhc2_resources,




More information about the kernel-team mailing list