#include <command.h>
#include <watchdog.h>
#include <malloc.h>
+#include <memalign.h>
#include <div64.h>
#include <asm/errno.h>
patt_count = ARRAY_SIZE(patterns);
- buf = malloc(nand->erasesize);
+ buf = malloc_cache_aligned(nand->erasesize);
if (buf == NULL) {
puts("Out of memory for erase block buffer\n");
return -ENOMEM;