]> git.sur5r.net Git - u-boot/blobdiff - drivers/core/device.c
dm: core: Round up size when allocating so that it is cache line aligned
[u-boot] / drivers / core / device.c
index de63e5335a813f1d5fa15016d43efcac3a162520..9a46a7bbe5e9dea953629413f35809d92def751e 100644 (file)
@@ -254,6 +254,7 @@ static void *alloc_priv(int size, uint flags)
        void *priv;
 
        if (flags & DM_FLAG_ALLOC_PRIV_DMA) {
+               size = ROUND(size, ARCH_DMA_MINALIGN);
                priv = memalign(ARCH_DMA_MINALIGN, size);
                if (priv) {
                        memset(priv, '\0', size);