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

David Jander
2010-08-23T09:14:40Z

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.