diff options
| author | Simon Glass <[email protected]> | 2012-07-29 20:53:25 +0000 |
|---|---|---|
| committer | Tom Warren <[email protected]> | 2012-09-07 13:54:30 -0700 |
| commit | b572595ee95829ab62e354c55a8fbd0f4db23935 (patch) | |
| tree | 18ce59921123f5b98f47e4845bef96f191593cd4 /drivers | |
| parent | 057df193b40d31799d41d43bc832a972f658bfe4 (diff) | |
nand: Try to align the default buffers
The NAND layer needs to use cache-aligned buffers by default. Towards this
goal. align the default buffers and their members according to the minimum
DMA alignment defined for the architecture.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Tom Warren <[email protected]>
Acked-by: Scott Wood <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mtd/nand/nand_base.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index bfd668fa0ac..891af1f2ea4 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2936,7 +2936,8 @@ int nand_scan_tail(struct mtd_info *mtd) struct nand_chip *chip = mtd->priv; if (!(chip->options & NAND_OWN_BUFFERS)) - chip->buffers = kmalloc(sizeof(*chip->buffers), GFP_KERNEL); + chip->buffers = memalign(ARCH_DMA_MINALIGN, + sizeof(*chip->buffers)); if (!chip->buffers) return -ENOMEM; |
