From patchwork Thu Mar 16 05:19:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Yang X-Patchwork-Id: 13176999 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 EF264C74A5B for ; Thu, 16 Mar 2023 05:21: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=i56Y5ZdJX9GGAZTHrzBl5r7Q2ohCx6YJNlz28b0CHrc=; b=On5vF6R4E5LLRs dgX+iIrjdgTvHOJLEAI0kdogWyjJ+WXWWCR2gvET4PxEx3jTG7aEjyVFqnvVE+mfVG9UnrTQl/sB7 6st8qoORNqh/90vHKsdv1tY+OtE+xcY4CMgNeZx6a3EQglke607aLdse2RXPJax83/8y+Pf6kP11r /tI37gPjQLKUV59/254bpEQ7FEUhPevqbvSFBdOcHgJ6LY0NX5dPpGZUSUpF1jxe2CzKwemQWPr7X oWoq18RHIpn0pLxHSdyn+1OWrS8lyOvt/arj9iIOA7kqTPOISaYU8Hxw5oVUPKCwbYzMUFGI4B5ju NjAqL9CcNlJNvLjTEu/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcg25-00FFgp-39; Thu, 16 Mar 2023 05:20:10 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcg21-00FFfC-2K for linux-arm-kernel@lists.infradead.org; Thu, 16 Mar 2023 05:20:06 +0000 Received: by mail-pj1-x1029.google.com with SMTP id j3-20020a17090adc8300b0023d09aea4a6so4157599pjv.5 for ; Wed, 15 Mar 2023 22:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678944002; 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=cnS/2L5eapvwqGTZQsUuWuWrYgLcDrvgqwnYFYygers=; b=QE826bxyY1maP+6E6wVynxn9Mv6IuqRQViB2FhQD0h/chSW/Kw+weOZ4aZ4wVs81Pf Ing4sukZ64gzdoNgoFnEKc1PUpuvKZmKztMqw5eFxiRCO8X1OIjuVsEGuhYJOkjl/Jqf taUF8/Q8HWqTvOx3TQmc1s2avXtx3xP0JavcyM3wlC2IBVTz17uGXho9CLqP0sRoe65f vdOyOoCURiYufz8tH653p2RPal+y1gioShzqK6otX5Z01blem1kiFqghfcjNxYaJergQ BF9XVxFbTiGT9aWCVT+nHcza7vCFaZ89i89ufYjjHTfRjOfmpXqO04UtM7B/bUPc5DS6 1ROg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678944002; 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=cnS/2L5eapvwqGTZQsUuWuWrYgLcDrvgqwnYFYygers=; b=UjUsbZ8n4G24scRs9VXZ6efiwEPz7OSoZzMobdCWBCtAZcGX9XJ0xLi29ajk/napz6 E6dKnlLRBxd7gITxcfytqauTAVQFy6G7utPeGh0z0POMaVNh2WEULzJEU5ronD1KBniv LEoGwu9M7tsTxtqiABCn18lD9RF4OdouBZH7qIGuM5i4gXUYt/sJFCgVUfAPI4Fl7So/ JAlPcaQ0c6xpnw/decONIulAzUnxJABywRlhrPML9Dw+h8E0o4l95gJksx+eaqpY/hq8 XjOdwA2giFUSTxAbPSpIHQ5YAsa+O/89nI6X+6vJBsP7r9c0vCSWmxrF8jsjBw2JpIkT Desw== X-Gm-Message-State: AO0yUKVCCpPF+T07QsFIUhQWID1awZ3EDm97VUS1qP6nin/lbITxZeje IMDpP7wG1PFn/7SGwlm3ipA= X-Google-Smtp-Source: AK7set9cI/OHaF/cbDFfzC0cU9Z94ikfd7AyHCR0H2ZEwPcKdsECly1zQatRRbZthu1DOkP6YL7UfA== X-Received: by 2002:a17:902:ce92:b0:19c:fd73:5586 with SMTP id f18-20020a170902ce9200b0019cfd735586mr2269077plg.38.1678944002224; Wed, 15 Mar 2023 22:20:02 -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.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 22:20:02 -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 1/3] ARM: hisi: Add S40 IO map Date: Thu, 16 Mar 2023 13:19:33 +0800 Message-Id: <20230316051936.1775033-2-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_222005_766555_34FADE5D X-CRM114-Status: GOOD ( 10.80 ) 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 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c index b8d14b369..9f56b0f56 100644 --- a/arch/arm/mach-hisi/hisilicon.c +++ b/arch/arm/mach-hisi/hisilicon.c @@ -50,3 +50,36 @@ 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,hi3798cv200", + "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