From patchwork Thu Mar 16 05:19:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Yang X-Patchwork-Id: 13176997 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 E21A3C6FD19 for ; Thu, 16 Mar 2023 05:21:07 +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=MPyeTmxEpCNwStbcEmZZh7bqwcxySPk/8vbCUIRyEcI=; b=nux65ESFsGNAFp 44zdShFeh9GGjhLm5iaxvAsnj4ZVMn9JpHyVZKpBHMbVt6js6nkkTrDZUEe7NOpOmhuntgi2y0VLx QRYO4fBYqwVM9BmGk91Cx7OzaIDsCmvxcgsRBq2boK5S2eAnxlVgX471ilVh0tHathdGwKb/ZubfA 1w3ol2ijEXYI/jur/X3Ohy0tifSTQPkVUw1S3+udJwgGfNNm/jEuNLWnvJfuBmpNZBFN/+8Yu3PRR TXN8zHflS6p7oAASAhUMd08e5IxMfbBZBM4gB/HwJJOFSXzu8z3BeXoPnWCXbEgbp3U9KlekkU/Zu CT+cgWER1ZAArIqB+6Kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcg2C-00FFi3-2c; Thu, 16 Mar 2023 05:20:16 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcg24-00FFeJ-2f for linux-arm-kernel@lists.infradead.org; Thu, 16 Mar 2023 05:20:10 +0000 Received: by mail-pj1-x1032.google.com with SMTP id qe8-20020a17090b4f8800b0023f07253a2cso444275pjb.3 for ; Wed, 15 Mar 2023 22:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678944008; 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=LN29kza4KP9+va9q8WQlQCM3UUiFt6hAQqDjXosgzqs=; b=muzRYG4npi5Fc+pBJCCHrt/h4NEe3GwxCYPXhlBC2XF0Ypm5YpzWQOkTd/7jltf4rI ha9wslI/6XTVb5f4gwyFVZfmazKVY0Z14ReT6xI2FPYBPf/AZYte+I+3N+OH3F+nugRY vQB70q2AnoeOUU6nLsIKS6woKvEQwiqWlTIiRruqr7unVdkDlQEuRZH7/w0QKE4e7zgp JG0gmv+wjyRoQ1TVYL8k81h5BEHGGafjiZH4nzUrN/JtucKJ2U1EgqtsnUuPTWF1fSiV GsrUVx/EZmQZZ/s/AxcKQ5GpSSwVLO8M8148R7rkeTDXFqWx+io6wqB5mHta8lwr46ab uAhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678944008; 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=LN29kza4KP9+va9q8WQlQCM3UUiFt6hAQqDjXosgzqs=; b=P1HX3mrK7dpMp6VNf+gR+oR9dejbBVEoi0xkDQSMN5a0PwtpCTjdQaFrifWDc1v2gD SJ0oATB1K9GPa4QDC1/zTJLliu3y3GUjF0JHc5mSpUSYcBMHgEElbRGCAZE/hT4z93WJ eVJYwcTLdOfiCFJSDhWQCK/pl7e8PidapzrIywSW3fR0IJ2ZU68hhQmnkkgW400ZVGMD KZbgRqlAdw9sClXMO/QdSKS1Rq3NObrrRjFaMtAYfHI1vuCDecLCyRWCaUDO3Nf7W1Ok Zf4+VoFby6JhP6kurVw17lo+pIan4RKhFT/gxaLJQ646Ac+qV1l90x8NN7tQsWOxKVfi X69g== X-Gm-Message-State: AO0yUKVs9Hb0gXvTa3yDMpxglhHryZDZMIAnlsbA2d9ZFpn6AZkDLPD7 mm3MNWvdxNmowm5JkZ8seUg= X-Google-Smtp-Source: AK7set+PvqwxPTJ0mHbgfxxOfLfXi24zg5IjBzLiPkmV1jFA5jjMCPOv+hdI7+J7/GWt5tb0wf1SOQ== X-Received: by 2002:a17:90b:388d:b0:234:b082:48a2 with SMTP id mu13-20020a17090b388d00b00234b08248a2mr2448834pjb.28.1678944008407; Wed, 15 Mar 2023 22:20:08 -0700 (PDT) Received: from d.home.yangfl.dn42 ([104.28.213.199]) by smtp.gmail.com with ESMTPSA id jh1-20020a170903328100b0019a593e45f1sm4475708plb.261.2023.03.15.22.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 22:20:08 -0700 (PDT) From: David Yang To: mmyangfl@gmail.com Cc: Wei Xu , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] ARM: hisi: Add S5 IO map Date: Thu, 16 Mar 2023 13:19:34 +0800 Message-Id: <20230316051936.1775033-3-mmyangfl@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316051936.1775033-1-mmyangfl@gmail.com> References: <20230316051936.1775033-1-mmyangfl@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_222008_864299_A450FD07 X-CRM114-Status: GOOD ( 10.84 ) 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 9f56b0f56..f9109df8c 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(S5_IOCH2_PHYS_BASE), + .virtual = S5_IOCH2_VIRT_BASE, + .length = S5_IOCH2_SIZE, + .type = MT_DEVICE, + }, + { + .pfn = __phys_to_pfn(S40_IOCH1_PHYS_BASE), + .virtual = S40_IOCH1_VIRT_BASE, + .length = S40_IOCH1_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