From patchwork Fri Mar 17 08:53:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Yang X-Patchwork-Id: 13178763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25E66C6FD1D for ; Fri, 17 Mar 2023 08:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3AIjFZssjzic9HGpc4hTXQVfCqhq7cxguRpG6xTWgq8=; b=vEJSKOhKM44Yjg pPmkSIiVxaQ0lJEhPBaZS/rv24iQDCNweAR0jni3YxB020siZn9y0psCmt8pWjgIUZjRTBvmE7Ccn J/0T5sGWlDkalCbT9zyJaOef7cJPrz+8gI5mFh823C0ubjaKzqYWyfsuGXg8a6LwlAJVE6tt10fOe vyC8X2elYbpV0amZSUgGErGwRp2GbUYjHWq7mK7nKG+nt4AxG6CemwGJb0IwjJHpIvM9PhmQ5muuW rTy2CSUlrUQNSS44ZPzoippuHeQJCVFfFMrCj2dKT9xVo09vKogaMXNZgONfZgSsTqekyyEZ3ASRK uw+vr6ldNK2xFq/aTscQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pd5qu-001ZcN-1K; Fri, 17 Mar 2023 08:54:20 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pd5qq-001ZbD-1k for linux-arm-kernel@lists.infradead.org; Fri, 17 Mar 2023 08:54:17 +0000 Received: by mail-pj1-x102b.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so4509786pjz.1 for ; Fri, 17 Mar 2023 01:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679043254; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QOLGWcJbI33pKMiOKcsUUwQ3x27zjj86CViw4xcRW1I=; b=AY5X+pY0r49N1+Yqjy40dRA/4DcZQwQ9zZhaZKoPz5nHc+f37CXzCPfvsszYbrdzZc Kq3c617MzE84KZ36XW0iCJ1tzrHBNZnp4srUT1KN2V16XyQ+bw2J6v1DhLcKR/+4wBoF HHKDddAVDHYcOYhc6omcY+0Voew7lhp42uRTdnEfpeY+kbRmzwoRylNcmjMfAzKsX4bu uTnjIjxZiyv+H90XGCbSmN29eJr9b/XSzVJFmRJr+j1DLsfd4zLEfd5MSPhUwG+mBn7u AURs1iXfGHvyQW7X56lGVNvToSO+QcZ+K4fuqjOotJxXXqM0/hHbf5I/N4vLHEtNQS8Z yjqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679043254; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QOLGWcJbI33pKMiOKcsUUwQ3x27zjj86CViw4xcRW1I=; b=HN6HwRveONeLd9dVJkSHghku6kHRL5RXIQqr9Ymyh3Sf3LJ8MbUPSOwSxdR4/TyXBD ky1HkTLrH9Y22UFs/YpHxeMA5eV+KBx9BD35MauHS6Ms8UdW8tCekTHXDKgC4eoYfsQj CwS+cx+4HbaIyK3oou7sQQ8UMC+c1/vWgxWtN1WyVIUjeJEscRfiq3HRnHd6dIZr/P/6 EZwxF13fGLmfuEH9vJSpsj4tcxHLvqmBBR/+p6HTIWkHgUeoxjIH0L/qT4PjBGpzLJm2 1clC+iurXgVF7bbCqwWbgjuJRs0EZ7tUvnmqgFMGyHHkeVrQ6k2W+itqkHAQuDa+6Az8 jFPw== X-Gm-Message-State: AO0yUKWPghYnQbP25htYy5nwF/b6elsjHs0CTMffvVB14DM2DHfhge1Y ojvptFc7oOqVr0EKa7iM2Ps= X-Google-Smtp-Source: AK7set9BBRQyv/R21Y65BrGAavRWs9ugscwwJTs0DSwsY5hYxvlrxH/v5kNkz1HR0a96Lm65ad9zFQ== X-Received: by 2002:a17:903:187:b0:19c:eda7:e0fd with SMTP id z7-20020a170903018700b0019ceda7e0fdmr7385531plg.59.1679043254381; Fri, 17 Mar 2023 01:54:14 -0700 (PDT) Received: from d.home.yangfl.dn42 ([104.28.245.204]) by smtp.gmail.com with ESMTPSA id jh17-20020a170903329100b0019a96a6543esm1030775plb.184.2023.03.17.01.54.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 01:54:13 -0700 (PDT) From: David Yang To: Cc: David Yang , Wei Xu , Russell King , 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 Message-Id: <20230317085347.10147-2-mmyangfl@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230317085347.10147-1-mmyangfl@gmail.com> References: <20230317085347.10147-1-mmyangfl@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230317_015416_601919_389BA4E9 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hisilion S40 platform supports ARM Cortex-A9 processors. Signed-off-by: David Yang --- 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