[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbL=yOwjC7j=eacg9K2Mb3rwcKy3b0F8y2H9Nz8RsRRcg@mail.gmail.com>
Date: Fri, 28 Nov 2014 16:35:03 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Michal Simek <michal.simek@...inx.com>
Cc: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Soren Brinkmann <soren.brinkmann@...inx.com>,
Olof Johansson <olof@...om.net>, Arnd Bergmann <arnd@...db.de>,
Michal Simek <monstr@...str.eu>,
Josh Cartwright <josh.cartwright@...com>,
Steffen Trumtrar <s.trumtrar@...gutronix.de>,
Rob Herring <robherring2@...il.com>,
Peter Crosthwaite <peter.crosthwaite@...inx.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Grant Likely <grant.likely@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joe Perches <joe@...ches.com>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Antti Palosaari <crope@....fi>,
Jingoo Han <jg1.han@...sung.com>,
Sandeep Nair <sandeep_n@...com>,
Santosh Shilimkar <santosh.shilimkar@...il.com>,
Andy Gross <agross@...eaurora.org>,
Thierry Reding <treding@...dia.com>,
Peter De Schrijver <pdeschrijver@...dia.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 5/6] ARM: zynq: Add OCM controller driver
On Thu, Nov 27, 2014 at 2:57 PM, Michal Simek <michal.simek@...inx.com> wrote:
> On 11/27/2014 02:20 PM, Linus Walleij wrote:
>> On Fri, Nov 14, 2014 at 11:52 AM, Michal Simek <michal.simek@...inx.com> wrote:
>> (...)
>>> + 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists