diff options
author | Tom Rini <trini@ti.com> | 2014-08-01 21:59:10 +0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-08-09 19:26:34 +0400 |
commit | 6d1966e1236838c8c59d58459901283a0e72dddd (patch) | |
tree | 74cd4064675ebaab03d5da7132736c9642416e39 /common | |
parent | b3dd64f5d537b41fc52a03e697271774891f4a70 (diff) | |
download | u-boot-6d1966e1236838c8c59d58459901283a0e72dddd.tar.xz |
env_fat.c: Make sure our buffer is cache aligned
We must ensure the buffer we read the env into is aligned or we may get
warnings later on.
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/env_fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/env_fat.c b/common/env_fat.c index 328c09d45f..8db0160ceb 100644 --- a/common/env_fat.c +++ b/common/env_fat.c @@ -73,7 +73,7 @@ int saveenv(void) void env_relocate_spec(void) { - char buf[CONFIG_ENV_SIZE]; + ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE); block_dev_desc_t *dev_desc = NULL; disk_partition_t info; int dev, part; @@ -92,7 +92,7 @@ void env_relocate_spec(void) goto err_env_relocate; } - err = file_fat_read(FAT_ENV_FILE, (uchar *)&buf, CONFIG_ENV_SIZE); + err = file_fat_read(FAT_ENV_FILE, buf, CONFIG_ENV_SIZE); if (err == -1) { printf("\n** Unable to read \"%s\" from %s%d:%d **\n", FAT_ENV_FILE, FAT_ENV_INTERFACE, dev, part); |