Thread (16 messages) 16 messages, 6 authors, 2014-12-01

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

From: Linus Walleij <hidden>
Date: 2014-11-28 15:35:06
Also in: linux-devicetree, lkml

On Thu, Nov 27, 2014 at 2:57 PM, Michal Simek [off-list ref] wrote:
On 11/27/2014 02:20 PM, Linus Walleij wrote:
quoted
On Fri, Nov 14, 2014 at 11:52 AM, Michal Simek [off-list ref] wrote:
quoted
(...)
quoted
+       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
ilog2 from 32 is different to ilog2 from ilog2 from 0x10000.
Bah I misread the code, forget this comment.

Maybe it's more like I wanted

+#define ZYNQ_OCMC_BLOCK_SIZE   0x10000

To be replaced with SZ_64K

But it's a petty detail anyway.
Do you have any opinion regarding calling zynq_slcr_get_ocm_config()?

Is it better to expose slcr this interface to drivers?
Or use regmap and read this value directly?
Depends on what provides that call. The pattern I usually follow
is to expose the mixed-registers range as a syscon device
using drivers/mfd/syscon.c and then use one of the methods from
<linux/mfd/syscon.h> to look up a reference to the regmap and
use it to access misc registers.
Also I do read for CONFIG_SMP case jump trampoline size - maybe
you can have better idea how this can be done.
No I have no clue about that... :(

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help