From: David Yang <mmyangfl@gmail.com>
Cc: David Yang <mmyangfl@gmail.com>, Wei Xu <xuwei5@hisilicon.com>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/4] ARM: hisi: Add S5 IO map
Date: Fri, 17 Mar 2023 16:53:45 +0800 [thread overview]
Message-ID: <20230317085347.10147-3-mmyangfl@gmail.com> (raw)
In-Reply-To: <20230317085347.10147-1-mmyangfl@gmail.com>
Hisilion S5 platform supports ARM Cortex-A7 processors.
Signed-off-by: David Yang <mmyangfl@gmail.com>
---
arch/arm/mach-hisi/hisilicon.c | 37 ++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c
index 2128e6dd5..fecc0b7be 100644
--- a/arch/arm/mach-hisi/hisilicon.c
+++ b/arch/arm/mach-hisi/hisilicon.c
@@ -83,3 +83,40 @@ DT_MACHINE_START(S40, "HiSilicon S40 (Flattened Device Tree)")
.map_io = s40_map_io,
.dt_compat = s40_compat,
MACHINE_END
+
+#define S5_IOCH2_PHYS_BASE 0xff000000
+#define S5_IOCH2_VIRT_BASE 0xfb000000
+#define S5_IOCH2_SIZE 0x00430000
+
+static struct map_desc s5_io_desc[] __initdata = {
+ {
+ .pfn = __phys_to_pfn(S40_IOCH1_PHYS_BASE),
+ .virtual = S40_IOCH1_VIRT_BASE,
+ .length = S40_IOCH1_SIZE,
+ .type = MT_DEVICE,
+ },
+ {
+ .pfn = __phys_to_pfn(S5_IOCH2_PHYS_BASE),
+ .virtual = S5_IOCH2_VIRT_BASE,
+ .length = S5_IOCH2_SIZE,
+ .type = MT_DEVICE,
+ },
+};
+
+static void __init s5_map_io(void)
+{
+ debug_ll_io_init();
+ iotable_init(s5_io_desc, ARRAY_SIZE(s5_io_desc));
+}
+
+static const char *const s5_compat[] __initconst = {
+ "hisilicon,hi3716cv200",
+ "hisilicon,hi3716mv410",
+ "hisilicon,hi3798mv100",
+ NULL,
+};
+
+DT_MACHINE_START(S5, "HiSilicon S5 (Flattened Device Tree)")
+ .map_io = s5_map_io,
+ .dt_compat = s5_compat,
+MACHINE_END
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-03-17 8:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 8:53 [PATCH v2 0/4] ARM: hisi: Support Hi3798 SoC David Yang
2023-03-17 8:53 ` [PATCH v2 1/4] ARM: hisi: Add S40 IO map David Yang
2023-03-17 8:53 ` David Yang [this message]
2023-03-17 8:53 ` [PATCH v2 3/4] ARM: hisi: Support Hi3798 SoC David Yang
2023-03-17 8:53 ` [PATCH v2 4/4] dt-bindings: arm: hisilicon: Add Hi37xx SoCs David Yang
2023-03-17 9:02 ` Krzysztof Kozlowski
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=20230317085347.10147-3-mmyangfl@gmail.com \
--to=mmyangfl@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=xuwei5@hisilicon.com \
/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).