Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965252AbaKNKw1 (ORCPT ); Fri, 14 Nov 2014 05:52:27 -0500 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33926 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965144AbaKNKwW (ORCPT ); Fri, 14 Nov 2014 05:52:22 -0500 From: Michal Simek To: linux-arm-kernel@lists.infradead.org, Soren Brinkmann , Olof Johansson , Arnd Bergmann Cc: monstr@monstr.eu, Josh Cartwright , Steffen Trumtrar , Rob Herring , Peter Crosthwaite , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH v4 4/6] ARM: zynq: Extend SLCR driver to read OCM configuration Date: Fri, 14 Nov 2014 11:52:05 +0100 Message-Id: <1b945376f9979a3b3e7c1231ea7ecead78026b07.1415962281.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: References: In-Reply-To: References: Content-Type: multipart/signed; boundary="=_mimegpg-monstr-desktop-14121-1415962338-0001"; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. The Internet standard for MIME PGP messages, RFC 2015, was published in 1996. To open this message correctly you will need to install E-mail or Usenet software that supports modern Internet standards. --=_mimegpg-monstr-desktop-14121-1415962338-0001 Get OCM configuration from SLCR. Signed-off-by: Michal Simek --- 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 --=_mimegpg-monstr-desktop-14121-1415962338-0001 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAlRl3uIACgkQykllyylKDCGrMgCgiEN5CbT9Oq9/E0S1XXzzNJx6 y5sAnAnp7JoDLpbxktnSnr7xFrtskQAp =9pwG -----END PGP SIGNATURE----- --=_mimegpg-monstr-desktop-14121-1415962338-0001-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/