From: monstr@monstr.eu (Michal Simek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 5/6] ARM: zynq: Add OCM controller driver
Date: Mon, 01 Dec 2014 15:24:36 +0100 [thread overview]
Message-ID: <547C7A24.8090403@monstr.eu> (raw)
In-Reply-To: <CACRpkdbL=yOwjC7j=eacg9K2Mb3rwcKy3b0F8y2H9Nz8RsRRcg@mail.gmail.com>
On 11/28/2014 04:35 PM, Linus Walleij wrote:
> On Thu, Nov 27, 2014 at 2:57 PM, Michal Simek <michal.simek@xilinx.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@xilinx.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.
I have fixed it.
>> 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.
I have tried it and I can just use it without any problem.
I have sent v5 with origin version but in cover letter there
is a code for that.
>> 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... :(
ok - fair enough. One option is to keep it as is. The second
option is to allocate any hardcoded size or size passed via DT.
But run-time detection is the best IMHO.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141201/b338bd77/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
To: Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Michal Simek
<michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Soren Brinkmann
<soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Josh Cartwright <josh.cartwright-acOepvfBmUk@public.gmane.org>,
Steffen Trumtrar
<s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Peter Crosthwaite
<peter.crosthwaite-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>,
Mauro Carvalho Chehab
<mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
Antti Palosaari <crope-X3B1VOXEql0@public.gmane.org>,
Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Sandee
Subject: Re: [PATCH v4 5/6] ARM: zynq: Add OCM controller driver
Date: Mon, 01 Dec 2014 15:24:36 +0100 [thread overview]
Message-ID: <547C7A24.8090403@monstr.eu> (raw)
In-Reply-To: <CACRpkdbL=yOwjC7j=eacg9K2Mb3rwcKy3b0F8y2H9Nz8RsRRcg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]
On 11/28/2014 04:35 PM, Linus Walleij wrote:
> On Thu, Nov 27, 2014 at 2:57 PM, Michal Simek <michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> wrote:
>> On 11/27/2014 02:20 PM, Linus Walleij wrote:
>>> On Fri, Nov 14, 2014 at 11:52 AM, Michal Simek <michal.simek@xilinx.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.
I have fixed it.
>> 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.
I have tried it and I can just use it without any problem.
I have sent v5 with origin version but in cover letter there
is a code for that.
>> 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... :(
ok - fair enough. One option is to keep it as is. The second
option is to allocate any hardcoded size or size passed via DT.
But run-time detection is the best IMHO.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Michal Simek <monstr@monstr.eu>
To: Linus Walleij <linus.walleij@linaro.org>,
Michal Simek <michal.simek@xilinx.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Soren Brinkmann <soren.brinkmann@xilinx.com>,
Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
Josh Cartwright <josh.cartwright@ni.com>,
Steffen Trumtrar <s.trumtrar@pengutronix.de>,
Rob Herring <robherring2@gmail.com>,
Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Grant Likely <grant.likely@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Joe Perches <joe@perches.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Antti Palosaari <crope@iki.fi>, Jingoo Han <jg1.han@samsung.com>,
Sandeep Nair <sandeep_n@ti.com>,
Santosh Shilimkar <santosh.shilimkar@gmail.com>,
Andy Gross <agross@codeaurora.org>,
Thierry Reding <treding@nvidia.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 5/6] ARM: zynq: Add OCM controller driver
Date: Mon, 01 Dec 2014 15:24:36 +0100 [thread overview]
Message-ID: <547C7A24.8090403@monstr.eu> (raw)
In-Reply-To: <CACRpkdbL=yOwjC7j=eacg9K2Mb3rwcKy3b0F8y2H9Nz8RsRRcg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]
On 11/28/2014 04:35 PM, Linus Walleij wrote:
> On Thu, Nov 27, 2014 at 2:57 PM, Michal Simek <michal.simek@xilinx.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@xilinx.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.
I have fixed it.
>> 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.
I have tried it and I can just use it without any problem.
I have sent v5 with origin version but in cover letter there
is a code for that.
>> 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... :(
ok - fair enough. One option is to keep it as is. The second
option is to allocate any hardcoded size or size passed via DT.
But run-time detection is the best IMHO.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2014-12-01 14:24 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 10:52 [PATCH v4 0/6] Xilinx Zynq OCM support Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-14 10:52 ` [PATCH v4 1/6] ARM: zynq: Extract smp related functions out of common.h Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-14 10:52 ` [PATCH v4 2/6] ARM: zynq: Extract slcr " Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-14 10:52 ` [PATCH v4 3/6] ARM: zynq: Move slcr.h and smp.h to generic location Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-14 10:52 ` [PATCH v4 4/6] ARM: zynq: Extend SLCR driver to read OCM configuration Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-14 15:15 ` Sören Brinkmann
2014-11-14 15:15 ` Sören Brinkmann
2014-11-14 10:52 ` [PATCH v4 5/6] ARM: zynq: Add OCM controller driver Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-27 13:20 ` Linus Walleij
2014-11-27 13:20 ` Linus Walleij
2014-11-27 13:20 ` Linus Walleij
2014-11-27 13:57 ` Michal Simek
2014-11-27 13:57 ` Michal Simek
2014-11-27 13:57 ` Michal Simek
2014-11-28 15:35 ` Linus Walleij
2014-11-28 15:35 ` Linus Walleij
2014-11-28 15:35 ` Linus Walleij
2014-12-01 14:24 ` Michal Simek [this message]
2014-12-01 14:24 ` Michal Simek
2014-12-01 14:24 ` Michal Simek
2014-11-14 10:52 ` [PATCH v4 6/6] ARM: zynq: DT: Add OCM controller node Michal Simek
2014-11-14 10:52 ` Michal Simek
2014-11-16 10:51 ` Andreas Färber
2014-11-16 10:51 ` Andreas Färber
2014-11-16 19:32 ` Sören Brinkmann
2014-11-16 19:32 ` Sören Brinkmann
2014-11-16 19:32 ` Sören Brinkmann
2014-11-16 23:00 ` Peter Crosthwaite
2014-11-16 23:00 ` Peter Crosthwaite
2014-11-18 7:56 ` Michal Simek
2014-11-18 7:56 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=547C7A24.8090403@monstr.eu \
--to=monstr@monstr.eu \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.