public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Yang <mmyangfl@gmail.com>
To: unlisted-recipients:; (no To-header on input)
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 1/4] ARM: hisi: Add S40 IO map
Date: Fri, 17 Mar 2023 16:53:44 +0800	[thread overview]
Message-ID: <20230317085347.10147-2-mmyangfl@gmail.com> (raw)
In-Reply-To: <20230317085347.10147-1-mmyangfl@gmail.com>

Hisilion S40 platform supports ARM Cortex-A9 processors.

Signed-off-by: David Yang <mmyangfl@gmail.com>
---
 arch/arm/mach-hisi/hisilicon.c | 35 +++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c
index b8d14b369..2128e6dd5 100644
--- a/arch/arm/mach-hisi/hisilicon.c
+++ b/arch/arm/mach-hisi/hisilicon.c
@@ -46,7 +46,40 @@ static const char *const hi3xxx_compat[] __initconst = {
 	NULL,
 };
 
-DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)")
+DT_MACHINE_START(HI3620, "HiSilicon Hi3620 (Flattened Device Tree)")
 	.map_io		= hi3620_map_io,
 	.dt_compat	= hi3xxx_compat,
 MACHINE_END
+
+#define S40_IOCH1_PHYS_BASE		0xf8000000
+#define S40_IOCH1_VIRT_BASE		0xf9000000
+#define S40_IOCH1_SIZE			0x02000000
+
+static struct map_desc s40_io_desc[] __initdata = {
+	{
+		.pfn		= __phys_to_pfn(S40_IOCH1_PHYS_BASE),
+		.virtual	= S40_IOCH1_VIRT_BASE,
+		.length		= S40_IOCH1_SIZE,
+		.type		= MT_DEVICE,
+	},
+};
+
+static void __init s40_map_io(void)
+{
+	debug_ll_io_init();
+	iotable_init(s40_io_desc, ARRAY_SIZE(s40_io_desc));
+}
+
+static const char *const s40_compat[] __initconst = {
+	"hisilicon,hi3796cv200",
+	"hisilicon,hi3796mv200",
+	"hisilicon,hi3798cv200",
+	"hisilicon,hi3798mv200",
+	"hisilicon,hi3798mv300",
+	NULL,
+};
+
+DT_MACHINE_START(S40, "HiSilicon S40 (Flattened Device Tree)")
+	.map_io		= s40_map_io,
+	.dt_compat	= s40_compat,
+MACHINE_END
-- 
2.39.2


  reply	other threads:[~2023-03-17  8:54 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 ` David Yang [this message]
2023-03-17  8:53 ` [PATCH v2 2/4] ARM: hisi: Add S5 IO map David Yang
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-2-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