From: Heiko Stuebner <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/8] arm: v7: add read_mpidr function for arm32
Date: Fri, 5 Apr 2019 10:30:06 +0200 [thread overview]
Message-ID: <20190405083013.5473-2-heiko@sntech.de> (raw)
In-Reply-To: <20190405083013.5473-1-heiko@sntech.de>
Function to get the contents of the mpidr register, similar to
its arm64 counterpart.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm/include/asm/system.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index aed2e3c51e..b5332f4347 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -364,6 +364,15 @@ static inline int is_hyp(void)
#endif
}
+static inline unsigned long read_mpidr(void)
+{
+ unsigned long val;
+
+ asm volatile ("mrc p15, 0, %0, c0, c0, 5" : "=r" (val));
+
+ return val;
+}
+
static inline unsigned int get_cr(void)
{
unsigned int val;
--
2.20.1
next prev parent reply other threads:[~2019-04-05 8:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 8:30 [U-Boot] [PATCH 0/8] arm-trusted-firmware support for rk3288 Heiko Stuebner
2019-04-05 8:30 ` Heiko Stuebner [this message]
2019-04-16 10:29 ` [U-Boot] [PATCH 1/8] arm: v7: add read_mpidr function for arm32 Matthias Brugger
2019-04-05 8:30 ` [U-Boot] [PATCH 2/8] spl: atf: add arm32 variant Heiko Stuebner
2019-04-05 8:30 ` [U-Boot] [PATCH 3/8] rockchip: rk3288: move TPL options to generic position Heiko Stuebner
2019-04-16 9:37 ` Jagan Teki
2019-04-05 8:30 ` [U-Boot] [PATCH 4/8] rockchip: rk3288: adjust load addresses Heiko Stuebner
2019-04-05 8:30 ` [U-Boot] [PATCH 5/8] rockchip: rk3288: reserve first 2MB when build with ATF support Heiko Stuebner
2019-05-07 2:29 ` Kever Yang
2019-04-05 8:30 ` [U-Boot] [PATCH 6/8] rockchip: rk3288: split evb into its two entities Heiko Stuebner
2019-04-05 8:30 ` [U-Boot] [PATCH 7/8] rockchip: rk3288: convert rk3288-evb to use tpl Heiko Stuebner
2019-05-07 2:32 ` Kever Yang
2019-04-05 8:30 ` [U-Boot] [PATCH 8/8] rockchip: rk3288: make both evb variants use atf Heiko Stuebner
2019-05-07 2:28 ` Kever Yang
[not found] ` <526672816.2740575.1557194072777.JavaMail.javamailuser@localhost>
2019-05-07 7:51 ` Heiko Stuebner
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=20190405083013.5473-2-heiko@sntech.de \
--to=heiko@sntech.de \
--cc=u-boot@lists.denx.de \
/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