[U-Boot] [PATCH] Use common function to set GPIOs for MX3 and MX5

David Jander david.jander at protonic.nl
Mon Aug 23 11:14:40 CEST 2010


On Monday 23 August 2010 10:50:53 am David Jander wrote:
> I am just now picking up where I left last week, so give me a few hours and
>  I should have something working, I guess.

Ok, I guess I was pessimistic. There is a weird bug in mxc_spi.c: CPOL is 
negated!
I just saw that in the mx51evk.h header file CONFIG_FSL_PMIC_MODE was set to 
low-active clock (CPOL=1), which is not supposed to work. But it did work, and 
on the scope clock-polarity was active-high.

In spi_cfg(), I saw this line:

if (!(mode & SPI_CPOL))
	sclkpol = 1;

AFAIK, this should be:

if (mode & SPI_CPOL)
	sclkpol = 1;

At least for the MX51. Can you confirm that this is different on the MX31?

Now I get a correct flash id.

Best regards,

-- 
David Jander
Protonic Holland.


More information about the U-Boot mailing list