Message ID | 20221017091201.199457-1-prabhakar.mahadev-lad.rj@bp.renesas.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1346903wrs; Mon, 17 Oct 2022 02:16:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+Yw4jiwy9qFHdODzAljoI243I2AFRz2GDGOZnhbeFUe1clRVs0agxfxXHw8XWhWEDkoJ9 X-Received: by 2002:a63:8b44:0:b0:45f:952f:c426 with SMTP id j65-20020a638b44000000b0045f952fc426mr9728135pge.623.1665998170643; Mon, 17 Oct 2022 02:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665998170; cv=none; d=google.com; s=arc-20160816; b=x9U4Wa118KRCcIpwLep2vH8MFAxsg/LfwcQBeAm1glkgTiMEOboMKyelmIP7qqxodz Xq4KUlkLWWXndtlEE60S/vQw1aapj+4PtsiwobMk47eYbtxCo6pqsL5H/ec18NBuQCDO O7zGPb4gPqFxPeMnSrzErs+vCs2lwMnP9Xt3D4OviNPyjhoj40c8PxYHhHku6z5f6fLG pNFdSYLUACbi1OfTRjRi63QbTac3+xPlu11lWnmsEu+fg2pxUKbQHijM90ehhwbbk4OC lf23YdfsRjs9yjJvN1OAdfmE5NFIwNOXm1SNbZAzzI6/HKt/1omBss14qKJaYpLd1tYP Y+pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uXahj3ItpGR0T2qFyurrngY0xMNOuQK04rAbGGKXwg8=; b=dyOkwEQdr8OM2V1HbPIPd1iKlcJBYpjEaYbWpmnnEYYR3T7OkjoJ8DqQnZrTi0dqWh JZri9zuPicppyVLTrr6FGpLKEPP0ZTpohh1dmq9h5TJxDTN5ELtWTdDkNIIXadQvxJDL wRTvarzBzMxrRloX7A+cEH3SC9gUiz/Cg4wTv/HJ4M9+Mn+HK2Ib2d4MvXa+7XE7bKbv GP3+D9buEyq0PdrbDjjTzVwkN7Ku7UseP1g5zZk109olIc+2n7zFpa/N2c9uPGx0663B GFgj2VM0ooCVtDeRVnwIP0Z6992P5hcFAsmXSq0/9nUMQaxh/wZt05v43yEt6vhADU/H 8Oew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=T1YEkzHb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a056a0014c400b00551ca67fe88si11853424pfu.50.2022.10.17.02.15.57; Mon, 17 Oct 2022 02:16:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=T1YEkzHb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230510AbiJQJM1 (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Mon, 17 Oct 2022 05:12:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbiJQJMX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Oct 2022 05:12:23 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B207E1275C; Mon, 17 Oct 2022 02:12:18 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id n12so17429968wrp.10; Mon, 17 Oct 2022 02:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uXahj3ItpGR0T2qFyurrngY0xMNOuQK04rAbGGKXwg8=; b=T1YEkzHbvBFPw6bVHeAtex0uCKQnDI8cVLHbej+rFZDjaj8k0w6de65Z/eZYN99O/q yRGdzP7R32VWRwcJy2R6jcIA81/wPVUBQgwXiqyvGU9ry/dpbdxm+3iPPPAwUTPcDfKM DxxtrA+m4vsH7dnp7ILArBYf1h9BU1S2uJmyqFbTYzm4rumhAkWBDkqV1y8EZpAI2gL1 5bNKfbu3q4fQIjCr0MV4HW+Z1UJoEdzQRDOjw0NMUt0ogFpHRdIaR+MOzIegaojUqaLu e45zoL0+0IFBum2N4+0A1D8JZeV2fNPaiHvRjrpeDR9JnoIK7/0kKXMzQaWW7K2lXc3B S+0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uXahj3ItpGR0T2qFyurrngY0xMNOuQK04rAbGGKXwg8=; b=rSYxZWNsZl/zEULnVcPvFbumPHAdmpRYc5Qj/r47bFslkmnSLTsJDviIZSIx+vsOQx 2wdMGNNNC7w9KIPsA9pYw4Gy6fmKJ9k8p8GIKpsQyGC6FShaRrr36J9BD9sKxTmYNYBS KORTpLTwuvJKDSDz0BQN/9vFHavsih1gzspHrKeSrhiZaAQpS1I19DirBs8ZxipIGzhO k51oNJlPymp3FT5VvNeSuhd57+8TgBeoFDVXYXgyONrVH/hMnfzI8/Wv8GTbBcmRDFNg 3yxbaIniRYnsjDFU7e2vXcd/rDTYMnt0bkb576GVWwgU1EIzFxtbRkPsOKOWaQAAssSf o+qQ== X-Gm-Message-State: ACrzQf0jR+/WtNbFAZzX80z3Gtg0YDqmZBlLcZ2bJBmlR9BDhMJZLeqP 7cvg+MDLJAULaZ9dUc4jnjw= X-Received: by 2002:adf:de8f:0:b0:22e:361b:6a05 with SMTP id w15-20020adfde8f000000b0022e361b6a05mr5773321wrl.311.1665997937143; Mon, 17 Oct 2022 02:12:17 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:fc4d:6548:d8bd:5bd]) by smtp.gmail.com with ESMTPSA id n14-20020a5d400e000000b0022ae401e9e0sm7921503wrp.78.2022.10.17.02.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 02:12:16 -0700 (PDT) From: Prabhakar <prabhakar.csengg@gmail.com> X-Google-Original-From: Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> To: Geert Uytterhoeven <geert+renesas@glider.be>, Magnus Damm <magnus.damm@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>, soc@kernel.org, linux-arm-kernel@lists.infradead.org, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, linux-riscv@lists.infradead.org Cc: Conor Dooley <conor.dooley@microchip.com>, Samuel Holland <samuel@sholland.org>, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar <prabhakar.csengg@gmail.com>, Biju Das <biju.das.jz@bp.renesas.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Subject: [RFC RESEND PATCH 0/2] RZ/G2UL separate out SoC specific parts Date: Mon, 17 Oct 2022 10:11:59 +0100 Message-Id: <20221017091201.199457-1-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746925697962458189?= X-GMAIL-MSGID: =?utf-8?q?1746925697962458189?= |
Series |
RZ/G2UL separate out SoC specific parts
|
|
Message
Lad, Prabhakar
Oct. 17, 2022, 9:11 a.m. UTC
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Hi All,
This patch series aims to split up the RZ/G2UL SoC DTSI into common parts
so that this can be shared with the RZ/Five SoC.
Implementation is based on the discussion [0] where I have used option#2.
The Renesas RZ/G2UL (ARM64) and RZ/Five (RISC-V) have almost the same
identical blocks to avoid duplication a base SoC dtsi (r9a07g043.dtsi) is
created which will be used by the RZ/G2UL (r9a07g043u.dtsi) and RZ/Five
(r9a07g043F.dtsi)
Sending this as an RFC to get some feedback.
r9a07g043f.dtsi will look something like below:
#include <dt-bindings/interrupt-controller/irq.h>
#define SOC_PERIPHERAL_IRQ_NUMBER(nr) (nr + 32)
#define SOC_PERIPHERAL_IRQ(nr, na) SOC_PERIPHERAL_IRQ_NUMBER(nr) na
#include <arm64/renesas/r9a07g043.dtsi>
/ {
...
...
};
Although patch#2 can be merged into patch#1 just wanted to keep them separated
for easier review.
RFC-> RESEND RFC
* Patches rebased on [1]
RFC: [2]
[0] https://lore.kernel.org/linux-arm-kernel/Yyt8s5+pyoysVNeC@spud/T/
[1] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20221009230044.10961-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
[2] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20220929172356.301342-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
Cheers,
Prabhakar
Lad Prabhakar (2):
arm64: dts: renesas: r9a07g043: Introduce SOC_PERIPHERAL_IRQ() macro
to specify interrupt property
arm64: dts: renesas: r9a07g043: Split out RZ/G2UL SoC specific parts
arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 347 ++++++++----------
arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 72 ++++
.../boot/dts/renesas/r9a07g043u11-smarc.dts | 2 +-
3 files changed, 220 insertions(+), 201 deletions(-)
create mode 100644 arch/arm64/boot/dts/renesas/r9a07g043u.dtsi
Comments
Hi Prabhakar, (now replying to the latest version) On Mon, Oct 17, 2022 at 11:12 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > This patch series aims to split up the RZ/G2UL SoC DTSI into common parts > so that this can be shared with the RZ/Five SoC. > > Implementation is based on the discussion [0] where I have used option#2. > > The Renesas RZ/G2UL (ARM64) and RZ/Five (RISC-V) have almost the same > identical blocks to avoid duplication a base SoC dtsi (r9a07g043.dtsi) is > created which will be used by the RZ/G2UL (r9a07g043u.dtsi) and RZ/Five > (r9a07g043F.dtsi) Thanks for your series! > Sending this as an RFC to get some feedback. > > r9a07g043f.dtsi will look something like below: > > #include <dt-bindings/interrupt-controller/irq.h> > > #define SOC_PERIPHERAL_IRQ_NUMBER(nr) (nr + 32) > #define SOC_PERIPHERAL_IRQ(nr, na) SOC_PERIPHERAL_IRQ_NUMBER(nr) na Originally, when I assumed incorrectly that dtc does not support arithmetic, I used "nr" and "na" in the macro I proposed to mean RISC-V ("r") resp. ARM ("a") interrupt number. Apparently the names stuck, although the second parameter now has a completely different meaning ;-) However, as the NCEPLIC does support interrupt flags, unlike the SiFive PLIC, there is no need to have the flags parameter in the macro. Moreover, it looks like the SOC_PERIPHERAL_IRQ_NUMBER() intermediate is not needed, so you can just write: #define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > #include <arm64/renesas/r9a07g043.dtsi> > > / { > ... > ... > }; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert. Thank you for the review. On Tue, Oct 25, 2022 at 1:42 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Prabhakar, > > (now replying to the latest version) > > On Mon, Oct 17, 2022 at 11:12 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > This patch series aims to split up the RZ/G2UL SoC DTSI into common parts > > so that this can be shared with the RZ/Five SoC. > > > > Implementation is based on the discussion [0] where I have used option#2. > > > > The Renesas RZ/G2UL (ARM64) and RZ/Five (RISC-V) have almost the same > > identical blocks to avoid duplication a base SoC dtsi (r9a07g043.dtsi) is > > created which will be used by the RZ/G2UL (r9a07g043u.dtsi) and RZ/Five > > (r9a07g043F.dtsi) > > Thanks for your series! > > > Sending this as an RFC to get some feedback. > > > > r9a07g043f.dtsi will look something like below: > > > > #include <dt-bindings/interrupt-controller/irq.h> > > > > #define SOC_PERIPHERAL_IRQ_NUMBER(nr) (nr + 32) > > #define SOC_PERIPHERAL_IRQ(nr, na) SOC_PERIPHERAL_IRQ_NUMBER(nr) na > > Originally, when I assumed incorrectly that dtc does not support > arithmetic, I used "nr" and "na" in the macro I proposed to mean RISC-V > ("r") resp. ARM ("a") interrupt number. Apparently the names stuck, > although the second parameter now has a completely different meaning ;-) > > However, as the NCEPLIC does support interrupt flags, unlike the SiFive > PLIC, there is no need to have the flags parameter in the macro. > > Moreover, it looks like the SOC_PERIPHERAL_IRQ_NUMBER() > intermediate is not needed, so you can just write: > > #define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > Agreed, I'll change it as per your suggestion and send a v2. Cheers, Prabhakar