[PATCH v4 5/6] ARM: zynq: Add OCM controller driver

Linus Walleij linus.walleij at linaro.org
Thu Nov 27 05:20:24 PST 2014


On Fri, Nov 14, 2014 at 11:52 AM, Michal Simek <michal.simek at xilinx.com> wrote:

> The driver provide memory allocator which can
> be used by others drivers to allocate memory inside OCM.
> All location for 64kB blocks are supported

Allocation?

> and driver is trying to allocate the largest continuous
> block of memory.

Isn't all genalloc allocations continuous?

(...)
> +       zynq_ocmc->pool = devm_gen_pool_create(&pdev->dev,
> +                                              ilog2(ZYNQ_OCMC_GRANULARITY),
> +                                              -1);

Do this:

#include <linux/sizes.h>

zynq_ocmc->pool = devm_gen_pool_create(&pdev->dev,
                                       ilog2(SZ_64K),
                                       -1);

And get rid of the #define for ZYNQ_OCMC_GRANULARITY

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list