From: michal.simek@xilinx.com (Michal Simek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 4/7] ARM: zynq: Extend SLCR driver to read OCM configuration
Date: Mon, 1 Dec 2014 14:24:55 +0100 [thread overview]
Message-ID: <bda1e7239b421b43caa1c20f9d34f6f8f94458b3.1417440250.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1417440250.git.michal.simek@xilinx.com>
Get OCM configuration from SLCR.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v5: None
Changes in v4:
- slcr.h has moved to soc/include/ folder. Move definition there too.
Changes in v3: None
Changes in v2: None
arch/arm/mach-zynq/slcr.c | 15 +++++++++++++++
include/soc/zynq/slcr.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
index b77e42d999c8..f7c606e57525 100644
--- a/arch/arm/mach-zynq/slcr.c
+++ b/arch/arm/mach-zynq/slcr.c
@@ -29,6 +29,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
@@ -128,6 +129,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;
+}
+
+/**
* zynq_slcr_cpu_start - Start cpu
* @cpu: cpu number
*/
diff --git a/include/soc/zynq/slcr.h b/include/soc/zynq/slcr.h
index 7b4edab666ee..639723c4f90c 100644
--- a/include/soc/zynq/slcr.h
+++ b/include/soc/zynq/slcr.h
@@ -25,5 +25,6 @@ extern void zynq_slcr_cpu_start(int cpu);
extern bool zynq_slcr_cpu_state_read(int cpu);
extern void zynq_slcr_cpu_state_write(int cpu, bool die);
extern u32 zynq_slcr_get_device_id(void);
+extern u32 zynq_slcr_get_ocm_config(void);
#endif
--
1.8.2.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141201/1f3a481f/attachment.sig>
next prev parent reply other threads:[~2014-12-01 13:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 13:24 [PATCH v5 0/7] Xilinx Zynq OCM support Michal Simek
2014-12-01 13:24 ` [PATCH v5 1/7] ARM: zynq: Extract smp related functions out of common.h Michal Simek
2014-12-01 13:24 ` [PATCH v5 2/7] ARM: zynq: Extract slcr " Michal Simek
2014-12-01 13:24 ` [PATCH v5 3/7] ARM: zynq: Move slcr.h and smp.h to generic location Michal Simek
2014-12-01 13:24 ` Michal Simek [this message]
2014-12-01 13:24 ` [PATCH v5 5/7] devicetree: bindings: Add zynq ocmc node description Michal Simek
2014-12-01 13:24 ` [PATCH v5 6/7] ARM: zynq: Add OCM controller driver Michal Simek
2014-12-01 15:31 ` Arnd Bergmann
2014-12-02 10:52 ` Michal Simek
2014-12-01 13:24 ` [PATCH v5 7/7] ARM: zynq: DT: Add OCM controller node 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=bda1e7239b421b43caa1c20f9d34f6f8f94458b3.1417440250.git.michal.simek@xilinx.com \
--to=michal.simek@xilinx.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).