Re: MMC: Make the configuration memory resource optional

From: Guennadi Liakhovetski
Date: Wed Aug 05 2009 - 09:33:15 EST


Hi Ian

On Mon, 3 Aug 2009, Ian Molton wrote:

> Guennadi Liakhovetski wrote:
>
> > > I cant see _why_ this should be a problem, as this disables the card
> > > clock,
> > > not HCLK. Could you debug further in tmio_mmc_clk_stop() please and see if
> > > reordering only one of the two IO accesses cures this?
> >
> > Not sure I understood the "reordering only one of the two IO accesses"
> > correctly, but I swapped the two sd_ctrl_write16() calls in
> > tmio_mmc_clk_stop() and no, it didn't cure the problem.
>
> I meant can you reorder them so that only one or the other is after the reset.
> Thus eliminating one (perhaps) as the cause of the problem.

With my patches the tmio_mmc_clk_stop() function looked like this
(pseudocode):

tmio_mmc_clk_stop()
{
CTL_CLK_AND_WAIT_CTL = 0x0000;
msleep(10);
CTL_SD_CARD_CLK_CTL &= ~0x0100;
msleep(10);
clk_disable(clk);
}

I splitted the clk_disable() call out in a separate function and moved
_only_ it after the reset() call - it worked too. Does this answer your
question?

> Does your chip actually use the tmio-type reset, or has it a hard reset line
> or something?

No idea. As you know, this is not a separate chip, it is a built in
controller into the sh7722 (probably, also other) SuperH SoC, so, I doubt
it has a separate external reset line. Just like Magnus I have no
datasheet for that block in SoC.

> Also is your issue that the driver doesnt work, or that you cant access
> registers from something like userspace ?

The driver doesn't work. Which means in this case - no interrupts, the mmc
tasklet in in "D."

Thanks
Guennadi
---
Guennadi Liakhovetski
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/