Patchwork [U-Boot] m28: Properly configure the SPI flash chipselect

login
register
mail settings
Submitter Marek Vasut
Date Oct. 12, 2012, 1:36 a.m.
Message ID <1350005816-21683-1-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/191037/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Marek Vasut - Oct. 12, 2012, 1:36 a.m.
The SPI flash is not properly detected by plain "sf probe" due to
it being located on different bus and different chipselect. Fix
this problem.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
---
 include/configs/m28evk.h |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Marek Vasut - Oct. 12, 2012, 2:08 a.m.
Dear Tom Rini,

> The SPI flash is not properly detected by plain "sf probe" due to
> it being located on different bus and different chipselect. Fix
> this problem.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@ti.com>
[...]

Please apply for .10 release, this is an important bugfix. Tested by DUTS as of 
now.

Best regards,
Marek Vasut
Stefano Babic - Oct. 12, 2012, 7:47 a.m.
Am 12/10/2012 04:08, schrieb Marek Vasut:
> Dear Tom Rini,
> 
>> The SPI flash is not properly detected by plain "sf probe" due to
>> it being located on different bus and different chipselect. Fix
>> this problem.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Tom Rini <trini@ti.com>
> [...]
> 
> Please apply for .10 release, this is an important bugfix. Tested by DUTS as of 
> now.

So should Tom apply it directly to u-boot/master or do you think we
follow the usual path through u-boot-imx/master ?

Stefano
Marek Vasut - Oct. 12, 2012, 8:07 a.m.
Dear Stefano Babic,

> Am 12/10/2012 04:08, schrieb Marek Vasut:
> > Dear Tom Rini,
> > 
> >> The SPI flash is not properly detected by plain "sf probe" due to
> >> it being located on different bus and different chipselect. Fix
> >> this problem.
> >> 
> >> Signed-off-by: Marek Vasut <marex@denx.de>
> >> Cc: Stefano Babic <sbabic@denx.de>
> >> Cc: Tom Rini <trini@ti.com>
> > 
> > [...]
> > 
> > Please apply for .10 release, this is an important bugfix. Tested by DUTS
> > as of now.
> 
> So should Tom apply it directly to u-boot/master or do you think we
> follow the usual path through u-boot-imx/master ?

I don't have any further patches, so if Tom is OK with picking it up directly, 
WFM.

Best regards,
Marek Vasut
Stefano Babic - Oct. 12, 2012, 10:48 a.m.
Am 12/10/2012 10:07, schrieb Marek Vasut:
> Dear Stefano Babic,
> 
>> Am 12/10/2012 04:08, schrieb Marek Vasut:
>>> Dear Tom Rini,
>>>
>>>> The SPI flash is not properly detected by plain "sf probe" due to
>>>> it being located on different bus and different chipselect. Fix
>>>> this problem.
>>>>
>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>> Cc: Stefano Babic <sbabic@denx.de>
>>>> Cc: Tom Rini <trini@ti.com>
>>>
>>> [...]
>>>
>>> Please apply for .10 release, this is an important bugfix. Tested by DUTS
>>> as of now.
>>
>> So should Tom apply it directly to u-boot/master or do you think we
>> follow the usual path through u-boot-imx/master ?
> 
> I don't have any further patches, so if Tom is OK with picking it up directly, 
> WFM.

Ok, fine with m, of course !

Stefano
Tom Rini - Oct. 12, 2012, 7:17 p.m.
On Fri, Oct 12, 2012 at 03:36:56AM +0200, Marek Vasut wrote:

> The SPI flash is not properly detected by plain "sf probe" due to
> it being located on different bus and different chipselect. Fix
> this problem.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@ti.com>

Applied to u-boot/master, thanks!

Patch

diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 9eb2a54..bdbb820 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -246,18 +246,20 @@ 
 #define	CONFIG_MXS_SPI_DMA_ENABLE
 #define	CONFIG_SPI_HALF_DUPLEX
 #define	CONFIG_DEFAULT_SPI_BUS		2
+#define	CONFIG_DEFAULT_SPI_CS		0
 #define	CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0
 
 /* SPI FLASH */
 #ifdef	CONFIG_CMD_SF
 #define	CONFIG_SPI_FLASH
 #define	CONFIG_SPI_FLASH_STMICRO
-#define	CONFIG_SF_DEFAULT_CS		2
-#define	CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
+#define	CONFIG_SF_DEFAULT_BUS		2
+#define	CONFIG_SF_DEFAULT_CS		0
 #define	CONFIG_SF_DEFAULT_SPEED		40000000
+#define	CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
 
-#define	CONFIG_ENV_SPI_CS		0
 #define	CONFIG_ENV_SPI_BUS		2
+#define	CONFIG_ENV_SPI_CS		0
 #define	CONFIG_ENV_SPI_MAX_HZ		40000000
 #define	CONFIG_ENV_SPI_MODE		SPI_MODE_0
 #endif