Skip to contentSkip to conversation

mx28evk: Provide default values for SPI bus and chip select

PATCH New Fabio Estevam 4 participants 9 messages Mar 23, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mx28evk: Provide default values for SPI bus and chip select

From: Fabio Estevam <[email protected]>

Provide default values for SPI bus and chip select.

This allows the command "sf probe" to work without passing SPI bus and chip select numbers as arguments.

---
 include/configs/mx28evk.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/mx28evk.h +2 -0
index 04967d7..112fda4 100644
@@ -186,6 +186,8 @@
 /* SPI Flash */
 #ifdef CONFIG_CMD_SF
 #define CONFIG_SPI_FLASH
+#define CONFIG_SF_DEFAULT_BUS	2
+#define CONFIG_SF_DEFAULT_CS	0
 /* this may vary and depends on the installed chip */
 #define CONFIG_SPI_FLASH_SST
 #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 configs: imx: Use CONFIG_SF_DEFAULT_CS

CONFIG_SPI_FLASH_CS is not used anywhere.

Use CONFIG_SF_DEFAULT_CS instead.

---
 include/configs/efikamx.h |    2 +-
 include/configs/m28evk.h  |    2 +-
 include/configs/vision2.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/configs/efikamx.h +1 -1
index af542fa..120055f 100644
@@ -113,7 +113,7 @@
 
 #define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_SST
-#define CONFIG_SPI_FLASH_CS		(1 | 121 << 8)
+#define CONFIG_SF_DEFAULT_CS		(1 | 121 << 8)
 #define CONFIG_SF_DEFAULT_MODE		(SPI_MODE_0)
 #define CONFIG_SF_DEFAULT_SPEED		25000000
 
include/configs/m28evk.h +1 -1
index 4d59153..4b97c71 100644
@@ -252,7 +252,7 @@
 #ifdef	CONFIG_CMD_SF
 #define	CONFIG_SPI_FLASH
 #define	CONFIG_SPI_FLASH_STMICRO
-#define	CONFIG_SPI_FLASH_CS		2
+#define	CONFIG_SF_DEFAULT_CS		2
 #define	CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
 #define	CONFIG_SF_DEFAULT_SPEED		24000000
 
include/configs/vision2.h +1 -1
index 35b71f7..f6904f3 100644
@@ -72,7 +72,7 @@
  * Use gpio 4 pin 25 as chip select for SPI flash
  * This corresponds to gpio 121
  */
-#define CONFIG_SPI_FLASH_CS	(1 | (121 << 8))
+#define CONFIG_SF_DEFAULT_CS	(1 | (121 << 8))
 #define CONFIG_SF_DEFAULT_MODE   SPI_MODE_0
 #define CONFIG_SF_DEFAULT_SPEED  25000000
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 configs: imx: Use CONFIG_SF_DEFAULT_CS

Dear Fabio Estevam,

Quoted 29 lines

CONFIG_SPI_FLASH_CS is not used anywhere.

Use CONFIG_SF_DEFAULT_CS instead.

---
 include/configs/efikamx.h |    2 +-
 include/configs/m28evk.h  |    2 +-
 include/configs/vision2.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/configs/efikamx.h +1 -1
index af542fa..120055f 100644
@@ -113,7 +113,7 @@
 
 #define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_SST
-#define CONFIG_SPI_FLASH_CS		(1 | 121 << 8)
+#define CONFIG_SF_DEFAULT_CS		(1 | 121 << 8)
 #define CONFIG_SF_DEFAULT_MODE		(SPI_MODE_0)
 #define CONFIG_SF_DEFAULT_SPEED		25000000
 
include/configs/m28evk.h +0 -0
index 4d59153..4b97c71 100644

include/configs/m28evk.h line 255

Quoted 5 lines
include/configs/m28evk.h +1 -1
@@ -252,7 +252,7 @@
 #ifdef	CONFIG_CMD_SF
 #define	CONFIG_SPI_FLASH
 #define	CONFIG_SPI_FLASH_STMICRO
-#define	CONFIG_SPI_FLASH_CS		2
+#define	CONFIG_SF_DEFAULT_CS		2

are you sure about this? Are you sure this does the same thing?

Quoted 8 lines
include/configs/m28evk.h +0 -0
 #define	CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
 #define	CONFIG_SF_DEFAULT_SPEED		24000000
 
include/configs/vision2.h +0 -0
index 35b71f7..f6904f3 100644

include/configs/vision2.h line 77

Quoted 7 lines
include/configs/vision2.h +1 -1
@@ -72,7 +72,7 @@
  * Use gpio 4 pin 25 as chip select for SPI flash
  * This corresponds to gpio 121
  */
-#define CONFIG_SPI_FLASH_CS	(1 | (121 << 8))
+#define CONFIG_SF_DEFAULT_CS	(1 | (121 << 8))
 #define CONFIG_SF_DEFAULT_MODE   SPI_MODE_0
 #define CONFIG_SF_DEFAULT_SPEED  25000000

Best regards,
Marek Vasut

#3 lore raw

PATCH 2/2 configs: imx: Use CONFIG_SF_DEFAULT_CS

Quoted 26 lines · Marek Vasut

Dear Fabio Estevam,

Quoted 24 lines

CONFIG_SPI_FLASH_CS is not used anywhere.

Use CONFIG_SF_DEFAULT_CS instead.

---
 include/configs/efikamx.h |    2 +-
 include/configs/m28evk.h  |    2 +-
 include/configs/vision2.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/configs/efikamx.h +1 -1
index af542fa..120055f 100644
@@ -113,7 +113,7 @@
 
 #define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_SST
-#define CONFIG_SPI_FLASH_CS		(1 | 121 << 8)
+#define CONFIG_SF_DEFAULT_CS		(1 | 121 << 8)
 #define CONFIG_SF_DEFAULT_MODE		(SPI_MODE_0)
 #define CONFIG_SF_DEFAULT_SPEED		25000000
 
Quoted 12 lines

include/configs/m28evk.h line 255

Quoted 10 lines
include/configs/m28evk.h +1 -1
index 4d59153..4b97c71 100644
@@ -252,7 +252,7 @@
 #ifdef	CONFIG_CMD_SF
 #define	CONFIG_SPI_FLASH
 #define	CONFIG_SPI_FLASH_STMICRO
-#define	CONFIG_SPI_FLASH_CS		2
+#define	CONFIG_SF_DEFAULT_CS		2

are you sure about this? Are you sure this does the same thing?

Are we sure that CONFIG_SPI_FLASH_CS has still a meaning ? It seems to me that SPI flash uses now CONFIG_SF_DEFAULT_CS, and we should exchange other boards exactly as Fabio does for mx28evk. Is there still code using CONFIG_SPI_FLASH_CS ?

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH 2/2 configs: imx: Use CONFIG_SF_DEFAULT_CS

Dear Stefano Babic,

Quoted 45 lines · Marek Vasut
Quoted 35 lines

Dear Fabio Estevam,

Quoted 33 lines

CONFIG_SPI_FLASH_CS is not used anywhere.

Use CONFIG_SF_DEFAULT_CS instead.

---

 include/configs/efikamx.h |    2 +-
 include/configs/m28evk.h  |    2 +-
 include/configs/vision2.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/configs/efikamx.h +1 -1
index af542fa..120055f 100644
@@ -113,7 +113,7 @@
 
 #define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_SST
 
-#define CONFIG_SPI_FLASH_CS		(1 | 121 << 8)
+#define CONFIG_SF_DEFAULT_CS		(1 | 121 << 8)
 
 #define CONFIG_SF_DEFAULT_MODE		(SPI_MODE_0)

#define CONFIG_SF_DEFAULT_SPEED 25000000

include/configs/m28evk.h +0 -0
index 4d59153..4b97c71 100644
@@ -252,7 +252,7 @@
 
Quoted 8 lines

include/configs/m28evk.h line 255

Quoted 6 lines
include/configs/m28evk.h +1 -1
 #ifdef	CONFIG_CMD_SF
 #define	CONFIG_SPI_FLASH
 #define	CONFIG_SPI_FLASH_STMICRO
 
-#define	CONFIG_SPI_FLASH_CS		2
+#define	CONFIG_SF_DEFAULT_CS		2

are you sure about this? Are you sure this does the same thing?

Quoted 4 lines

Are we sure that CONFIG_SPI_FLASH_CS has still a meaning ? It seems to me that SPI flash uses now CONFIG_SF_DEFAULT_CS, and we should exchange other boards exactly as Fabio does for mx28evk. Is there still code using CONFIG_SPI_FLASH_CS ?

No, that's why I'm asking. And I see no use of CONFIG_SPI_FLASH_CS. All right then:

Quoted 3 lines

Best regards,
Stefano Babic

Best regards,
Marek Vasut

#5 lore raw

PATCH 2/2 configs: imx: Use CONFIG_SF_DEFAULT_CS

Quoted 5 lines · Marek Vasut

No, that's why I'm asking. And I see no use of CONFIG_SPI_FLASH_CS. All right then:

Ok, then everything is clear.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#6 lore raw

PATCH 2/2 configs: imx: Use CONFIG_SF_DEFAULT_CS

In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam

CONFIG_SPI_FLASH_CS is not used anywhere.

Use CONFIG_SF_DEFAULT_CS instead.

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#7 lore raw

PATCH 1/2 mx28evk: Provide default values for SPI bus and chip select

In reply to Fabio Estevam

Dear Fabio Estevam,

Quoted 8 lines

From: Fabio Estevam <[email protected]>

Provide default values for SPI bus and chip select.

This allows the command "sf probe" to work without passing SPI bus and chip select numbers as arguments.

Quoted 9 lines
---
 include/configs/mx28evk.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/mx28evk.h +0 -0
index 04967d7..112fda4 100644

include/configs/mx28evk.h line 193

Quoted 8 lines
include/configs/mx28evk.h +2 -0
@@ -186,6 +186,8 @@
 /* SPI Flash */
 #ifdef CONFIG_CMD_SF
 #define CONFIG_SPI_FLASH
+#define CONFIG_SF_DEFAULT_BUS	2
+#define CONFIG_SF_DEFAULT_CS	0
 /* this may vary and depends on the installed chip */
 #define CONFIG_SPI_FLASH_SST
 #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0

Best regards,
Marek Vasut

#8 lore raw

PATCH 1/2 mx28evk: Provide default values for SPI bus and chip select

In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Provide default values for SPI bus and chip select.

This allows the command "sf probe" to work without passing SPI bus and chip select numbers as arguments.

---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================