From: monstr@monstr.eu (Michal Simek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: zynq: Extend SLCR driver to read OCM configuration
Date: Mon, 06 Oct 2014 19:54:53 +0200 [thread overview]
Message-ID: <5432D76D.70004@monstr.eu> (raw)
In-Reply-To: <30d758b569504e88a9b4a999f08be17b@BN1AFFO11FD055.protection.gbl>
Hi Soren,
On 10/06/2014 05:59 PM, S?ren Brinkmann wrote:
> Hi Michal,
>
> On Mon, 2014-10-06 at 01:44PM +0200, Michal Simek wrote:
>> Get OCM configuration from SLCR.
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> arch/arm/mach-zynq/slcr.c | 15 +++++++++++++++
>> include/soc/zynq/common.h | 1 +
>> 2 files changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
>> index cb7c46165728..0c3e45090c09 100644
>> --- a/arch/arm/mach-zynq/slcr.c
>> +++ b/arch/arm/mach-zynq/slcr.c
>> @@ -27,6 +27,7 @@
>> #define SLCR_A9_CPU_RST_CTRL_OFFSET 0x244 /* CPU Software Reset Control */
>> #define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */
>> #define SLCR_PSS_IDCODE 0x530 /* PS IDCODE */
>> +#define SLCR_OCM_CFG_OFFSET 0x910 /* OCM Address Mapping */
>>
>> #define SLCR_UNLOCK_MAGIC 0xDF0D
>> #define SLCR_A9_CPU_CLKSTOP 0x10
>> @@ -126,6 +127,20 @@ void zynq_slcr_system_reset(void)
>> }
>>
>> /**
>> + * zynq_slcr_get_ocm_config - Get SLCR OCM config
>> + *
>> + * Return: OCM config bits
>> + */
>> +u32 zynq_slcr_get_ocm_config(void)
>> +{
>> + u32 val;
>> +
>> + zynq_slcr_read(&val, SLCR_OCM_CFG_OFFSET);
>> +
>> + return val;
>> +}
>
> a different idea would be, instead of creating this specific API call
> for the OCMC to let the OCMC driver use regmap and making git a subnode
> of the SLCR.
> In the long run that might be a better option otherwise we'll end up
> with a whole bunch of zynq_slcr_get_foo() calls for each driver that
> needs to read an SLCR register.
yes using regmap is also possible and I know that.
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/20141006/59ff5cfe/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Michal Simek <monstr@monstr.eu>
To: "Sören Brinkmann" <soren.brinkmann@xilinx.com>,
"Michal Simek" <michal.simek@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org,
Steffen Trumtrar <s.trumtrar@pengutronix.de>,
Rob Herring <robherring2@gmail.com>,
Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
Russell King <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] ARM: zynq: Extend SLCR driver to read OCM configuration
Date: Mon, 06 Oct 2014 19:54:53 +0200 [thread overview]
Message-ID: <5432D76D.70004@monstr.eu> (raw)
In-Reply-To: <30d758b569504e88a9b4a999f08be17b@BN1AFFO11FD055.protection.gbl>
[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]
Hi Soren,
On 10/06/2014 05:59 PM, Sören Brinkmann wrote:
> Hi Michal,
>
> On Mon, 2014-10-06 at 01:44PM +0200, Michal Simek wrote:
>> Get OCM configuration from SLCR.
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> arch/arm/mach-zynq/slcr.c | 15 +++++++++++++++
>> include/soc/zynq/common.h | 1 +
>> 2 files changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
>> index cb7c46165728..0c3e45090c09 100644
>> --- a/arch/arm/mach-zynq/slcr.c
>> +++ b/arch/arm/mach-zynq/slcr.c
>> @@ -27,6 +27,7 @@
>> #define SLCR_A9_CPU_RST_CTRL_OFFSET 0x244 /* CPU Software Reset Control */
>> #define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */
>> #define SLCR_PSS_IDCODE 0x530 /* PS IDCODE */
>> +#define SLCR_OCM_CFG_OFFSET 0x910 /* OCM Address Mapping */
>>
>> #define SLCR_UNLOCK_MAGIC 0xDF0D
>> #define SLCR_A9_CPU_CLKSTOP 0x10
>> @@ -126,6 +127,20 @@ void zynq_slcr_system_reset(void)
>> }
>>
>> /**
>> + * zynq_slcr_get_ocm_config - Get SLCR OCM config
>> + *
>> + * Return: OCM config bits
>> + */
>> +u32 zynq_slcr_get_ocm_config(void)
>> +{
>> + u32 val;
>> +
>> + zynq_slcr_read(&val, SLCR_OCM_CFG_OFFSET);
>> +
>> + return val;
>> +}
>
> a different idea would be, instead of creating this specific API call
> for the OCMC to let the OCMC driver use regmap and making git a subnode
> of the SLCR.
> In the long run that might be a better option otherwise we'll end up
> with a whole bunch of zynq_slcr_get_foo() calls for each driver that
> needs to read an SLCR register.
yes using regmap is also possible and I know that.
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-10-06 17:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 11:44 [PATCH 1/3] ARM: zynq: Move common.h to generic location Michal Simek
2014-10-06 11:44 ` Michal Simek
2014-10-06 11:44 ` [PATCH 2/3] ARM: zynq: Enable generic allocator Michal Simek
2014-10-06 11:44 ` Michal Simek
2014-10-06 11:44 ` [PATCH 3/3] ARM: zynq: Extend SLCR driver to read OCM configuration Michal Simek
2014-10-06 11:44 ` Michal Simek
2014-10-06 15:59 ` Sören Brinkmann
2014-10-06 15:59 ` Sören Brinkmann
2014-10-06 17:54 ` Michal Simek [this message]
2014-10-06 17:54 ` Michal Simek
2014-10-13 20:24 ` [PATCH 1/3] ARM: zynq: Move common.h to generic location Sören Brinkmann
2014-10-13 20:24 ` Sören Brinkmann
[not found] ` <20141013202453.GQ13679@xsjandreislx>
2014-10-20 13:14 ` Michal Simek
2014-10-20 13:14 ` 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=5432D76D.70004@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.