From patchwork Fri Mar 17 08:53:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Yang X-Patchwork-Id: 13178765 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 F2FEBC7618A for ; Fri, 17 Mar 2023 08:55:10 +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=HyTkjg6IdL2bPrRm9uuTbxlDAS/SL891gvm3b/iq2AY=; b=rY9j2k6PM/TWFo Wws6tfeVA4uvVMUOybS/sRJP2355VY/KZe/MZubRdXUF0Xwrs/Umz/UN19mb03/FSaTL25L5ESIfu 57vlzlQ4uz4opEOSywTu1lRnZfem4sefb4nKFPu0Zle3o67SqKrUPcDGDEk57txdwTPsAW+rRB4Y3 w/oCqApl4191HAZITM0a1KhbHhd4RVFOvH6AN1Fu9VfNW9365gOaJy3UZIG2D+V09UI3K5qHrnKpk kMLTs6AyWEKJ1XNQ+yHj+DYdkYeytXHlYuHw/6E7pX/euhJsAJciEwSZ2avugOF3PGBJVwIKMsoaE pzX7OB7ywGsvAFjOqwBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pd5r0-001ZeM-1x; Fri, 17 Mar 2023 08:54:26 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pd5qx-001Zcv-39 for linux-arm-kernel@lists.infradead.org; Fri, 17 Mar 2023 08:54:25 +0000 Received: by mail-pj1-x1034.google.com with SMTP id fy10-20020a17090b020a00b0023b4bcf0727so4529367pjb.0 for ; Fri, 17 Mar 2023 01:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679043261; 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=NAnpP91EEdF2z/jZBxaUpB4jiBizu8KLOHQYo1Pjrr8=; b=Mv6WklCG+Z9x32igzYqf8sCx7tqzbE8IQBJX1pk4OY+uIbWIuWqhwmwSFHy72vLxfZ Inyz/r6KieKg6DNROW+uGm1v0+/j7S1KX5W5xDSuwD/qIFDbF64WiqCQ6b0Xcxs+g4BH YtvJvsilA5EQlctvxlWa+09VeAa1EWNAP34ImxKrXXyWf04vD7ANtofQFNOt3zXlwl7h KWiUFqu7mhVt4Iy8JPZVwyNF2zkXwF+shu4LzYvctGjMssjO9SJ8pUHmJIRuVC1UW0Qy r+4OqraQ8IiJw7jWXd1vLjZ0+5L3ataGz4qQgolMkTQBUwbHmWiEo2AO1uPNbS+zq9WF Kcbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679043261; 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=NAnpP91EEdF2z/jZBxaUpB4jiBizu8KLOHQYo1Pjrr8=; b=t3W20tmGFmqQ9kOgxjYCjiFu+iBu1J0bYhu5EH2PvhuD6dl+k6HH9IcBm8XvzR997F 2bW1kKlZembtstzchwdmvBBlcG8Q7G6Vok0b0T2pC5nF9YqGQxUCvwFFefmq+Gd3eEA5 g+QiLp5D6a8+88Ap4p7vgfaAxpifdPGLB/Y1zckpF0bGd5z58Wde5Yjl3AO7zVyQn4PJ wz5clCN4WPeGtW3bIinWYPj2/SWyLDuu/G58iYyNfGXlwh0QpDlJRPYEaHreleyFiZm9 tFvrpRSJqCPKH/6uPipDuKwsHkwR48wbMYSBzDbRSdk/6aTiNrYcIlSepdpalZpVp74F NKTg== X-Gm-Message-State: AO0yUKW7TwHCmoXtuWrpoakaXDXsAjtoxXEaw2w3yz9WkOkuk/l3d8Xh 2AigCCZjetNUmAffm5oX/hU= X-Google-Smtp-Source: AK7set+EaSWGJb3gVkFlnF4T05lKVmaKaQXFNKlGNKTHBWlLDjR6bJAmr6pYBB17lB4rU5GZ77Rcug== X-Received: by 2002:a17:902:f98c:b0:19e:524f:272f with SMTP id ky12-20020a170902f98c00b0019e524f272fmr5964931plb.42.1679043261350; Fri, 17 Mar 2023 01:54:21 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 01:54:20 -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 2/4] ARM: hisi: Add S5 IO map Date: Fri, 17 Mar 2023 16:53:45 +0800 Message-Id: <20230317085347.10147-3-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_015424_013845_BAA475D1 X-CRM114-Status: GOOD ( 10.60 ) 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 S5 platform supports ARM Cortex-A7 processors. Signed-off-by: David Yang --- 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