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

From: philippe . retornaz
Date: Thu May 24 2012 - 15:42:33 EST


Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> a écrit :

On Thu, May 24, 2012 at 02:39:02PM -0300, Fabio Estevam wrote:
On Thu, May 24, 2012 at 1:41 PM, Uwe Kleine-König

> The imx spi driver can do both (GPIO and hardware CS) because not all
> pins that can do hardware CS are available as GPIO.

Right, unfortunately on mx31 the SPI CS pins cannot be used as GPIOs.

On mx51evk the SPI CS are used as GPIOs and that probably explains why
it worked on mx51evk and fails on mx31pdk.

Oh dear, this affects regmap but it'll probably also affect other things
- how plausible is it that we'll be able to fix in the driver (assuming
it's not just hardware misprogramming)? We can probably manage to come
up with something for regmap but it's the wrong level to fix things.


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.

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.

Thanks,

Philippe
--
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/