summaryrefslogtreecommitdiffstats
path: root/disk/part_dos.c
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2012-03-03 12:02:20 +0000
committerAnatolij Gustschin <agust@denx.de>2012-04-30 16:54:50 +0200
commitdec049d92427a4bf8bf4083f4ebaedbc5dc83e7b (patch)
treeac44b8f2edb0c33b0dd0f8f68dabca07d414f45b /disk/part_dos.c
parent330a091c11d48539cc5cbaab708514fe7b386f8c (diff)
downloadu-boot-dec049d92427a4bf8bf4083f4ebaedbc5dc83e7b.tar.gz
u-boot-dec049d92427a4bf8bf4083f4ebaedbc5dc83e7b.tar.xz
u-boot-dec049d92427a4bf8bf4083f4ebaedbc5dc83e7b.zip
part_dos: align disk buffers on cache line to enable DMA and cache
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'disk/part_dos.c')
-rw-r--r--disk/part_dos.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c
index b5bcb3735c..c028aaf1b1 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -87,7 +87,7 @@ static int test_block_type(unsigned char *buffer)
int test_part_dos (block_dev_desc_t *dev_desc)
{
- unsigned char buffer[dev_desc->blksz];
+ ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
if ((dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) buffer) != 1) ||
(buffer[DOS_PART_MAGIC_OFFSET + 0] != 0x55) ||
@@ -102,7 +102,7 @@ int test_part_dos (block_dev_desc_t *dev_desc)
static void print_partition_extended (block_dev_desc_t *dev_desc, int ext_part_sector, int relative,
int part_num)
{
- unsigned char buffer[dev_desc->blksz];
+ ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
dos_partition_t *pt;
int i;
@@ -166,7 +166,7 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part
int relative, int part_num,
int which_part, disk_partition_t *info)
{
- unsigned char buffer[dev_desc->blksz];
+ ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
dos_partition_t *pt;
int i;