mxs: mmc: Problems resetting first SSP/MMC module upon boot

Shawn Guo shawn.guo at
Thu Sep 6 21:01:45 EDT 2012

On Thu, Sep 06, 2012 at 03:34:30PM +0200, Peter Turczak wrote:
> Hi,
> while porting kernel 3.5 (pulled from the arm-soc git tree) to a new board based upon an MXS processor (ARM926EJ-S) I encountered a strange problem initializing the two ssp/mmc.
> Given situation:
> - The device has two mmc devices on board, connected to SSP0 and SSP2.
> - When booting from the MMC both mmc are properly detected.
> - When booting from usb, ethernet or NAND flash first mmc to be initialized in the machine init function fails. So when doing (example given is nearly literally from the code, the board name is not yet allocated with the registry):
>         mx28_add_mxs_mmc(2, &board_mmc_pdata[2]);
>         mx28_add_mxs_mmc(0, &board_mmc_pdata[0]);
>    mmc0 works, mmc2 does not. When initializing mmc0 first mmc0 works.

When initializing mmc0 first, you meant mmc0 works or does not work?

> - The init fails when trying to reset the respective ssp block in stmp_reset_block() from lib/stmp_device.c due to a timeout waiting for CLKGATE to become set again after setting the SFTRST   bit.
> Things I tried:
> - Check code of lib/stmp_device.c against reference manual of processor (i.MX28 Applications Processor Reference Manual, Rev. 1, 2010) says in section 39.5.10 (Correct Way to Soft Reset a Block): Seems ok, as it successfully resets some other blocks.
> - Added a routine to also wait for (de-) assertion of the reset/clock gating bits as advised by the reference manual. No success here.
> - Checked the pin muxing, just to be sure. Not expecting anything and as expected gained nothing.
> Ideas: 
> - Maybe it the clock derivation is not set up properly before resetting as at least two ssp-modules seem to derive the clock from the same clock source. But I have no idea how to test or debug this.
ssp0 and ssp1 share one clock source, while ssp2 and ssp3 share
another one.  I'm not sure if it's the cause, but 3.5 kernel did miss
one bug fix below.

  64e2bc4 clk: mxs: imx28: decrease the frequency of ref_io1 for SSP2 and SSP3

You can get it from 3.6-rc1 kernel.

> Therefore help is very much appreciated, maybe I'm missing something here.
> Thank you in advance,
>   Peter Turczak
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at


More information about the linux-arm-kernel mailing list