Re: mc13xxx-core: kernel hangs after 'regmap_read'

From: Mark Brown
Date: Thu May 24 2012 - 18:21:07 EST


On Thu, May 24, 2012 at 09:42:29PM +0200, philippe.retornaz@xxxxxxx wrote:

> Sadly, after looking at the imx31 datasheet it seems it's a hardware
> limitation. We could maybe workaround it by using DMA to access the
> CSPI but even with dma, this would need a single transfer in order
> to keep the CS signal asserted.

Oh dear, though the DMA approach sounds like it might be doable...

> Thus, we need to workaround this in the regmap-spi or mc13783-spi driver.
> Either we find a way to have regmap-spi to use 32bits transfert or
> we implement a custom bus inside mc13783-spi.

Like I said in my previous message the ideal thing would be that the SPI
driver would handle this, that'll ensure that the fix gets propagated to
the maximum possible set of users and is nicer from an abstraction point
of view.

A regmap internal workaround can possibly use Stephen Warren's stuff for
allowing buses to specify endianness stuff that was posted earlier today
though there's a few more tricks needed since this combines reads and
writes. We may also need to extend the SPI bus to make the capabilities
of the controller discoverable, right now I'm not sure that regmap can
discover when it could activate any more complex stuff. If we can make
it cheap enough to decide it'd probably be a small performance win even
where the controllers don't have issues.
--
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/