From: David Jander Date: Mon, 23 Aug 2010 11:14:40 +0200 Subject: [U-Boot] [PATCH] Use common function to set GPIOs for MX3 and MX5 In-Reply-To: <201008231050.53956.david.jander@protonic.nl> References: <1282292411-6087-1-git-send-email-sbabic@denx.de> <4C6E84BD.4030706@denx.de> <201008231050.53956.david.jander@protonic.nl> Message-ID: <201008231114.40225.david.jander@protonic.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.