Hi Tom, On Thu, Oct 20, 2011 at 12:31 PM, Tom Warren <twar...@nvidia.com> wrote: > Simon, > >> -----Original Message----- >> From: Simon Glass [mailto:s...@chromium.org] >> Sent: Thursday, October 20, 2011 12:03 PM >> To: U-Boot Mailing List >> Cc: Albert ARIBAUD; Tom Warren; Stephen Warren; Simon Glass >> Subject: [PATCH 5/8] tegra2: Enable SPI environment on Seaboard >> >> This uses the SPI flash on Seaboard to store an 8KB environment. >> >> Signed-off-by: Simon Glass <s...@chromium.org> > > Great to see these patches going up!
Yes - testing is a bit tricky at present since we are so many patches behind. I will send a summary email to the list with what I think are the outstanding Tegra patches. > >> --- >> include/configs/harmony.h | 3 +++ >> include/configs/seaboard.h | 6 ++++++ >> include/configs/tegra2-common.h | 3 +-- >> 3 files changed, 10 insertions(+), 2 deletions(-) >> >> diff --git a/include/configs/harmony.h b/include/configs/harmony.h >> index 89e4911..ce0ae9f 100644 >> --- a/include/configs/harmony.h >> +++ b/include/configs/harmony.h >> @@ -58,4 +58,7 @@ >> #define CONFIG_EFI_PARTITION >> #define CONFIG_CMD_EXT2 >> #define CONFIG_CMD_FAT >> + >> +/* Environment not stored */ >> +#define CONFIG_ENV_IS_NOWHERE >> #endif /* __CONFIG_H */ >> diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h >> index 7e8c8cc..bd83a84 100644 >> --- a/include/configs/seaboard.h >> +++ b/include/configs/seaboard.h >> @@ -63,4 +63,10 @@ >> #define CONFIG_EFI_PARTITION >> #define CONFIG_CMD_EXT2 >> #define CONFIG_CMD_FAT >> + >> +/* Environment in SPI */ >> +#define CONFIG_ENV_IS_IN_SPI_FLASH >> + >> +#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE >> +#define CONFIG_ENV_OFFSET ((4 << 20) - CONFIG_ENV_SECT_SIZE) > > First, why not use a SZ_4M equate here? 4 << 20 is a bit hard to decode on a > quick read. While I may (or may not) agree with you, I didn't want to annoy Wolfgang who doesn't like the SZ macros. > Second, you are assuming here that all SPI chips will be 4MB/32Mbit. While > that's true on > All extant Seaboards, it may not always be true. Maybe we should provide the > expected size > in a #define in the SPI section in seaboard.h? Yes I will add a SPI flash size into seaboard.h, thanks. Regards, Simon > >> #endif /* __CONFIG_H */ >> diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2- >> common.h >> index 73e0f05..2dd6fa4 100644 >> --- a/include/configs/tegra2-common.h >> +++ b/include/configs/tegra2-common.h >> @@ -50,8 +50,7 @@ >> #define CONFIG_OF_LIBFDT /* enable passing of devicetree */ >> >> /* Environment */ >> -#define CONFIG_ENV_IS_NOWHERE >> -#define CONFIG_ENV_SIZE 0x20000 /* Total Size >> Environment */ >> +#define CONFIG_ENV_SIZE 0x2000 /* Total Size >> Environment */ > > Same deal here - using SZ_8K just reads better to me. > >> >> /* >> * Size of malloc() pool >> -- >> 1.7.3.1 > > Thanks, > > Tom > > ----------------------------------------------------------------------------------- > This email message is for the sole use of the intended recipient(s) and may > contain > confidential information. Any unauthorized review, use, disclosure or > distribution > is prohibited. If you are not the intended recipient, please contact the > sender by > reply email and destroy all copies of the original message. > ----------------------------------------------------------------------------------- > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot