ARM: socfpga: Enable saveenv for SD/MMC
PATCH 1/1 ARM: socfpga: Enable saveenv for SD/MMC
From: Dinh Nguyen <[email protected]>
Enable the able to save the environment variables when SD/MMC is used.
--- include/configs/socfpga_common.h | 5 +++++ 1 file changed, 5 insertions(+)
include/configs/socfpga_common.h +5 -0
@@ -160,6 +160,9 @@/* FIXME */ /* using smaller max blk cnt to avoid flooding the limited stack we have */ #define CONFIG_SYS_MMC_MAX_BLK_COUNT 256/* FIXME -- SPL only? */ +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ +#define CONFIG_ENV_OFFSET 512/* just after the MBR */ #endif /*
@@ -282,7 +285,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 !definedCONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_IS_NOWHERE +#endif #define CONFIG_ENV_SIZE 4096/*
Signature · 1 line
2.4.5
PATCH 1/1 ARM: socfpga: Enable saveenv for SD/MMC
Quoted 5 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
Enable the able to save the environment variables when SD/MMC is used.
Signed-off-by Dinh Nguyen <[email protected]>
Hi,
this should be done per-board, so I'd suggest the following:
1) Rename include/configs/socfpga_cyclone5.h to socfpga_cyclone5_socdk.h (to make it in-line with the naming in boards/altera/ , sorry, I forgot about this bit :( You'd also have to fix the MAINTAINERS file to match the adjusted filename).
2) Rename socfpga_arria5.h to socfpga_arria5_socdk.h
3) Enable this for both boards in socfpga_*_socdk.h
Can you do that please ?
Thanks!
Quoted 19 lines
--- include/configs/socfpga_common.h | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/include/configs/socfpga_common.hindex 38ae763..f6a79ad 100644include/configs/socfpga_common.h +3
-0@@ -160,6 +160,9 @@/* FIXME */ /* using smaller max blk cnt to avoid flooding the limited stack we have */ #define CONFIG_SYS_MMC_MAX_BLK_COUNT 256/* FIXME -- SPL only? */ +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0/* device 0 */ +#define CONFIG_ENV_OFFSET 512/* just after the MBR */ #endif /*
include/configs/socfpga_common.h unsigned int cm_get_qspi_controller_clk_hz(void); · line 293
Quoted 9 lines
include/configs/socfpga_common.h +2
-0@@ -282,7 +285,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 !definedCONFIG_ENV_IS_IN_MMC #define CONFIG_ENV_IS_NOWHERE +#endif #define CONFIG_ENV_SIZE 4096/*
Best regards,
Marek Vasut
PATCH 1/1 ARM: socfpga: Enable saveenv for SD/MMC
Quoted 18 lines · Marek Vasut
Quoted 5 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
Enable the able to save the environment variables when SD/MMC is used.
Signed-off-by Dinh Nguyen <[email protected]>Hi,
this should be done per-board, so I'd suggest the following:
1) Renameinclude/configs/socfpga_cyclone5.htosocfpga_cyclone5_socdk.h(to make it in-line with the naming in boards/altera/ , sorry, I forgot about this bit :( You'd also have to fix theMAINTAINERSfile to match the adjusted filename).
2) Renamesocfpga_arria5.htosocfpga_arria5_socdk.h
3) Enable this for both boards in socfpga_*_socdk.h
Quoted 2 lines
Can you do that please ?
Yes, I can do that.
Dinh
PATCH 1/1 ARM: socfpga: Enable saveenv for SD/MMC
Quoted 22 lines · Dinh Nguyen
Quoted 21 lines · Marek Vasut
On Tuesday, September 15, 2015 at 09:47:23 PM,
dinguyen at opensource.altera.comQuoted 5 lines · wrote:
From: Dinh Nguyen <[email protected]>
Enable the able to save the environment variables when SD/MMC is used.
Signed-off-by Dinh Nguyen <[email protected]>Hi,
this should be done per-board, so I'd suggest the following:
1) Renameinclude/configs/socfpga_cyclone5.htosocfpga_cyclone5_socdk.h(to make it in-line with the naming in boards/altera/ , sorry, I forgot
about this bit :( You'd also have to fix the
MAINTAINERSfile to match the adjusted filename).
Quoted 6 lines
Quoted 4 lines
2) Rename
socfpga_arria5.htosocfpga_arria5_socdk.h
3) Enable this for both boards in socfpga_*_socdk.hCan you do that please ?
Yes, I can do that.
Thanks!
btw when doing the rename of the files, use git format-patch -M -C , this will only mark the move in the patch, without doing the removal and insertion of a file, so the diff will be shorter while retaining all the information.
Best regards,
Marek Vasut
PATCH 1/1 ARM: socfpga: Enable saveenv for SD/MMC
In reply to Marek VasutQuoted 11 lines · Marek Vasut
Quoted 5 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
Enable the able to save the environment variables when SD/MMC is used.
Signed-off-by Dinh Nguyen <[email protected]>Hi,
this should be done per-board, so I'd suggest the following:
Why? MMC layout is same on all of them...
Quoted 1 line
Quoted 1 line
#define
CONFIG_ENV_SIZE4096
While you are changing that, bigger environment size would be welcome. 32K?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 ARM: socfpga: Enable saveenv for SD/MMC
Quoted 7 lines · Pavel Machek
Quoted 6 lines · Marek Vasut
Quoted 4 lines · dinguyen at opensource.altera.com
From: Dinh Nguyen <[email protected]>
Enable the able to save the environment variables when SD/MMC is used.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Dinh Nguyen <[email protected]>Hi,
this should be done per-board, so I'd suggest the following:
Why? MMC layout is same on all of them...
It doesn't have to be identical. And other boards might want to use e.g. SPI NOR as the environment storage device (I have such a custom board here). So this is definitely a board specific thing.
Quoted 4 lines
Quoted 1 line
Quoted 1 line
#define CONFIG_ENV_SIZE 4096While you are changing that, bigger environment size would be welcome. 32K?
Yes.
Thanks,
Stefan