Skip to contentSkip to conversation

arm: socfpga: rename socfpga_cyclone5 and socfpga_arria5 config files

PATCH New dinguyen at opensource.altera.com 4 participants 8 messages Sep 22, 2015 – Sep 23, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm: socfpga: rename socfpga_cyclone5 and socfpga_arria5 config files

From: Dinh Nguyen <[email protected]>

Rename the socfpga_cyclone5.h to socfpga_cyclone5_socdk.h, and socfpga_arria.h to socfpga_arria5_socdk.h. This matches the other SoCFPGA board config files.

---
 arch/arm/mach-socfpga/Kconfig                                    | 4 ++--
 include/configs/{socfpga_arria5.h => socfpga_arria5_socdk.h}     | 0
 include/configs/{socfpga_cyclone5.h => socfpga_cyclone5_socdk.h} | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename include/configs/{socfpga_arria5.h => socfpga_arria5_socdk.h} (100%)
 rename include/configs/{socfpga_cyclone5.h => socfpga_cyclone5_socdk.h} (100%)
arch/arm/mach-socfpga/Kconfig +2 -2
index 089280a..a413ea4 100644
@@ -50,8 +50,8 @@ config SYS_SOC
 	default "socfpga"
 
 config SYS_CONFIG_NAME
-	default "socfpga_arria5" if TARGET_SOCFPGA_ARRIA5_SOCDK
-	default "socfpga_cyclone5" if TARGET_SOCFPGA_CYCLONE5_SOCDK
+	default "socfpga_arria5_socdk" if TARGET_SOCFPGA_ARRIA5_SOCDK
+	default "socfpga_cyclone5_socdk" if TARGET_SOCFPGA_CYCLONE5_SOCDK
 	default "socfpga_de0_nano_soc" if TARGET_SOCFPGA_TERASIC_DE0_NANO
 	default "socfpga_mcvevk" if TARGET_SOCFPGA_DENX_MCVEVK
 	default "socfpga_sockit" if TARGET_SOCFPGA_TERASIC_SOCKIT
include/configs/socfpga_arria5_socdk.h renamed from include/configs/socfpga_arria5.h +0 -0
similarity index 100%
rename from include/configs/socfpga_arria5.h
rename to include/configs/socfpga_arria5_socdk.h
include/configs/socfpga_cyclone5_socdk.h renamed from include/configs/socfpga_cyclone5.h +0 -0
similarity index 100%
rename from include/configs/socfpga_cyclone5.h
rename to include/configs/socfpga_cyclone5_socdk.h
Signature · 1 line
2.4.5
#1 lore raw

PATCH 2/3 arm: socfpga: update MAINTAINERS' file for cyclone5_socdk and arria5_socdk

From: Dinh Nguyen <[email protected]>

commit "arm: socfpga: rename socfpga_cyclone5 and socfpga_arria5 config files" renames the configs files, so we should update the MAINTAINERS' entry. At the same time, update the email for Dinh Nguyen.

---
 board/altera/arria5-socdk/MAINTAINERS   | 4 ++--
 board/altera/cyclone5-socdk/MAINTAINERS | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
board/altera/arria5-socdk/MAINTAINERS +2 -2
index 30f2477..ba35b36 100644
@@ -1,7 +1,7 @@
 SOCFPGA BOARD
-M:	Dinh Nguyen <[email protected]>
+M:	Dinh Nguyen <[email protected]>
 M:	Chin-Liang See <[email protected]>
 S:	Maintained
 F:	board/altera/arria5-socdk/
-F:	include/configs/socfpga_arria5.h
+F:	include/configs/socfpga_arria5_socdk.h
 F:	configs/socfpga_arria5_defconfig
board/altera/cyclone5-socdk/MAINTAINERS +2 -2
index f218ca4..6374d59 100644
@@ -1,9 +1,9 @@
 SOCFPGA BOARD
-M:	Dinh Nguyen <[email protected]>
+M:	Dinh Nguyen <[email protected]>
 M:	Chin-Liang See <[email protected]>
 S:	Maintained
 F:	board/altera/cyclone5-socdk/
-F:	include/configs/socfpga_cyclone5.h
+F:	include/configs/socfpga_cyclone5_socdk.h
 F:	configs/socfpga_cyclone5_defconfig
 
 SOCRATES BOARD
Signature · 1 line
2.4.5
#2 lore raw

PATCH 2/3 arm: socfpga: update MAINTAINERS' file for cyclone5_socdk and arria5_socdk

Quoted 7 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

commit "arm: socfpga: rename socfpga_cyclone5 and socfpga_arria5 config files" renames the configs files, so we should update the MAINTAINERS' entry. At the same time, update the email for Dinh Nguyen.

#3 lore raw

PATCH 3/3 arm: socfpga: Enable saveenv for SD/MMC

In reply to dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Enable the able to save the environment variables when SD/MMC is used.

---
v2: Move this option to be on a per-board basis
Add config for socfpga_cyclone5 and socfpga_arria5

---
 include/configs/socfpga_arria5_socdk.h   | 4 ++++
 include/configs/socfpga_common.h         | 2 ++
 include/configs/socfpga_cyclone5_socdk.h | 4 ++++
 include/configs/socfpga_de0_nano_soc.h   | 4 ++++
 4 files changed, 14 insertions(+)
include/configs/socfpga_arria5_socdk.h +4 -0
index 3193684..b75b0a2 100644
@@ -59,6 +59,10 @@
 
 #endif
 
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV		0	/* device 0 */
+#define CONFIG_ENV_OFFSET		512	/* just after the MBR */
+
 /* USB */
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
include/configs/socfpga_common.h +2 -0
index a2811ba..249d70f 100644
@@ -281,7 +281,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
+#if !defined CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_IS_NOWHERE
+#endif
 #define CONFIG_ENV_SIZE			4096
 
 /*
include/configs/socfpga_cyclone5_socdk.h +4 -0
index 9e733e5..fa67b25 100644
@@ -59,6 +59,10 @@
 
 #endif
 
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV		0	/* device 0 */
+#define CONFIG_ENV_OFFSET		512	/* just after the MBR */
+
 /* USB */
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
include/configs/socfpga_de0_nano_soc.h +4 -0
index 2508d03..191e1f7 100644
@@ -55,6 +55,10 @@
 
 #endif
 
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV		0	/* device 0 */
+#define CONFIG_ENV_OFFSET		512	/* just after the MBR */
+
 /* USB */
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
Signature · 1 line
2.4.5
#4 lore raw

PATCH 3/3 arm: socfpga: Enable saveenv for SD/MMC

Quoted 35 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Enable the able to save the environment variables when SD/MMC is used.

---
v2: Move this option to be on a per-board basis
Add config for socfpga_cyclone5 and socfpga_arria5

---
 include/configs/socfpga_arria5_socdk.h   | 4 ++++
 include/configs/socfpga_common.h         | 2 ++
 include/configs/socfpga_cyclone5_socdk.h | 4 ++++
 include/configs/socfpga_de0_nano_soc.h   | 4 ++++
 4 files changed, 14 insertions(+)
(quoted diff) +0 -0

b/include/configs/socfpga_arria5_socdk.h index 3193684..b75b0a2 100644

include/configs/socfpga_arria5_socdk.h +4 -0
@@ -59,6 +59,10 @@
 
 #endif
 
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV		0	/* device 0 */
+#define CONFIG_ENV_OFFSET		512	/* just after the MBR */
+
 /* USB */
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
(quoted diff) +0 -0

b/include/configs/socfpga_common.h index a2811ba..249d70f 100644

include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 287

Quoted 7 lines
include/configs/socfpga_common.h +2 -0
@@ -281,7 +281,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
+#if !defined CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_IS_NOWHERE
+#endif
 #define CONFIG_ENV_SIZE			4096

This would explode for boards which store env in for example QSPI,

You should just define ENV_IS_NOWHERE for all the other boards.

I picked the other two patches though :)

Best regards,
Marek Vasut

#5 lore raw

PATCH 3/3 arm: socfpga: Enable saveenv for SD/MMC

Quoted 47 lines · Marek Vasut
Quoted 35 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Enable the able to save the environment variables when SD/MMC is used.

---
v2: Move this option to be on a per-board basis
Add config for socfpga_cyclone5 and socfpga_arria5

---
 include/configs/socfpga_arria5_socdk.h   | 4 ++++
 include/configs/socfpga_common.h         | 2 ++
 include/configs/socfpga_cyclone5_socdk.h | 4 ++++
 include/configs/socfpga_de0_nano_soc.h   | 4 ++++
 4 files changed, 14 insertions(+)
(quoted diff) +0 -0

b/include/configs/socfpga_arria5_socdk.h index 3193684..b75b0a2 100644

include/configs/socfpga_arria5_socdk.h +4 -0
@@ -59,6 +59,10 @@
 
 #endif
 
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV               0       /* device 0 */
+#define CONFIG_ENV_OFFSET            512     /* just after the MBR */
+
 /* USB */
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2_REG_ADDR     SOCFPGA_USB1_ADDRESS
(quoted diff) +0 -0

b/include/configs/socfpga_common.h index a2811ba..249d70f 100644

include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 287

Quoted 7 lines
include/configs/socfpga_common.h +2 -0
@@ -281,7 +281,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
+#if !defined CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_IS_NOWHERE
+#endif
 #define CONFIG_ENV_SIZE                      4096

This would explode for boards which store env in for example QSPI,

Quoted 2 lines

You should just define ENV_IS_NOWHERE for all the other boards.

I can add the saveenv support for SD/MMC for the sockit as well. What does the mcvevk support?

Dinh

#6 lore raw

PATCH 3/3 arm: socfpga: Enable saveenv for SD/MMC

Quoted 56 lines · Dinh Nguyen
Quoted 55 lines · Marek Vasut

On Wednesday, September 23, 2015 at 12:01:34 AM,
dinguyen at opensource.altera.com

Quoted 51 lines · wrote:

From: Dinh Nguyen <[email protected]>

Enable the able to save the environment variables when SD/MMC is used.

---
v2: Move this option to be on a per-board basis

Add config for socfpga_cyclone5 and socfpga_arria5

---

 include/configs/socfpga_arria5_socdk.h   | 4 ++++
 include/configs/socfpga_common.h         | 2 ++
 include/configs/socfpga_cyclone5_socdk.h | 4 ++++
 include/configs/socfpga_de0_nano_soc.h   | 4 ++++
 4 files changed, 14 insertions(+)
(quoted diff) +0 -0

b/include/configs/socfpga_arria5_socdk.h index 3193684..b75b0a2 100644

include/configs/socfpga_arria5_socdk.h +4 -0
@@ -59,6 +59,10 @@
 
 #endif
 
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV               0       /* device 0 */
+#define CONFIG_ENV_OFFSET            512     /* just after the MBR */
+
 
 /* USB */
 #ifdef CONFIG_CMD_USB

#define CONFIG_USB_DWC2_REG_ADDR SOCFPGA_USB1_ADDRESS

(quoted diff) +0 -0

b/include/configs/socfpga_common.h index a2811ba..249d70f 100644

include/configs/socfpga_common.h +2 -0
@@ -281,7 +281,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
 
+#if !defined CONFIG_ENV_IS_IN_MMC
 
 #define CONFIG_ENV_IS_NOWHERE
 
+#endif
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

#define CONFIG_ENV_SIZE 4096

This would explode for boards which store env in for example QSPI,

You should just define ENV_IS_NOWHERE for all the other boards.

I can add the saveenv support for SD/MMC for the sockit as well. What does the mcvevk support?

The SoCkit supports SD/MMC and QSPI, that's the problem. The MCVEVK supports SD/MMC only (well, eMMC to be precise).

I am positive there will be some board which does QSPI env (like the sockit can do) and then the above won't work. That's why the env config should be configured for each board separately.

Best regards,
Marek Vasut

#7 lore raw

PATCH 1/3 arm: socfpga: rename socfpga_cyclone5 and socfpga_arria5 config files

In reply to dinguyen at opensource.altera.com
Quoted 8 lines · dinguyen at opensource.altera.com

From: Dinh Nguyen <[email protected]>

Rename the socfpga_cyclone5.h to socfpga_cyclone5_socdk.h, and socfpga_arria.h to socfpga_arria5_socdk.h. This matches the other SoCFPGA board config files.