Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4289611rwr; Sun, 23 Apr 2023 02:28:14 -0700 (PDT) X-Google-Smtp-Source: AKy350a/NvbKRb4dqZu/U7QQLgPlKBJ7XlYU2nDHgrKL4ZUeBsyL9FUkyYjSd9z0CAMRNAJsaO2c X-Received: by 2002:a05:6a20:394c:b0:f2:2654:2b60 with SMTP id r12-20020a056a20394c00b000f226542b60mr11124358pzg.6.1682242094170; Sun, 23 Apr 2023 02:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682242094; cv=none; d=google.com; s=arc-20160816; b=N19zy4Oj/hWMPYFAR7hMCN1Ac49hS3lV738KbBIfl5/pX0lmHDQDlYTBn8i64FBC7V 7nGiRIfim1cP+lyEEvOnhqL4+dLQlpHcbJgMBPF2BgTQnwnDhpPnkaWY5L0Q2VZtNXLY YccehS/HxSKUV89FaamUpHwvoc1zOQkWJBQmirfmJgEKRLrwP0R9HVXth0Dp6+noTZIx kYJrqPOgLK7oy5CptocflTg7mDNlyh0k0YP6izA40e7bkfaDKYGIGqttrFaQjYZjtDKJ K7Ipa6MftYEVIVD5u9v91nYrubeuLzdQc99PqVlHJnxaHbVVzpkzw6lSX511/QW+Tix6 Ut7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7QYHi1U0H8xeoz+ojliRlXjskKQpNh5ZppQiWqXTPmg=; b=oAP5DkEU1Xb9qtZD+FecXyWbHjbXohZaHsO49gDux3hMeo1Gx4IArfZCViZD9/GNH5 wQOwxFMzcL7jufw9OTzz25omi+ncQCQZipZSGNhMKsN95X12CtZeXiNctBLeDCJgd6UR WiwniPtyzWKFIe70gDboVHvJpOPtmV0Cpn0S56w/Jzb7gAvNp8C1Aeq8GUNo0/KvlSlY g5W1I1WVPKsWoKBP2VTbfnHZKO3WuB830QGJ3vbFYP9XQGakYgqbndXZed2tKPa2o2mn sI98NM1GXy4ZrYrTkuie9wF/HzRi3vGuBhBSF/JB4Zko/+ZBtKrRqiTA0d9W7QTAbue6 SsAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=n29GfRgV; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b0050f8a43b1b9si8394242pgb.187.2023.04.23.02.28.03; Sun, 23 Apr 2023 02:28:14 -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=20221208 header.b=n29GfRgV; 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 S229741AbjDWIbQ (ORCPT + 99 others); Sun, 23 Apr 2023 04:31:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbjDWIbN (ORCPT ); Sun, 23 Apr 2023 04:31:13 -0400 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB21E19A6; Sun, 23 Apr 2023 01:31:12 -0700 (PDT) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-54f8af6dfa9so47945067b3.2; Sun, 23 Apr 2023 01:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682238672; x=1684830672; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7QYHi1U0H8xeoz+ojliRlXjskKQpNh5ZppQiWqXTPmg=; b=n29GfRgV2KM71xU0PJGUus7tcaVrQNRqxRyd9+C9ZSMxc8Yq/JBo/iyYfjmiVoYYVj qyYpoSFV4EujOpAf8Wg1c+bCAVeXWsCkfQ2qKGa6aDClLJX5kdMICEN5JxRZPiOnrkjZ qk8nMo0M7GYahnpKfhmGCnZ2lgiCs82VuqTGk/yZSDcJrz9qMsp44xHGI8IK2GGFO1HA GyjMDS0KD10qaZ9TDbZt84E4LOQ5QQnu+EG/eKNjMOhMSRaOXXguE6q9kSopTiTOtl/k Ekx4/5wyneuO1PYQCELdkr6kn6rI2Vtz5FpnjdZPRMk3rnc9ySYn59vCp02SK2gn1IL/ uRYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682238672; x=1684830672; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7QYHi1U0H8xeoz+ojliRlXjskKQpNh5ZppQiWqXTPmg=; b=ZoJbyuTPEOy0lV8epccSQuhV71kkqpuvokxgNk5Nj0K3r4nPSYZYCDZPvFsBQC/GrI Ii8ZWx4Guy3jYjtj7fdcmeKoRi2MXUiH3m/VK/GgDONU5YJbqjUI+t6cEaWvZXP0a+dh 1BSosqGndsWAxh2gMLHkywwQT0cLjnBCBvTwquDji09n0Stna5WfffPqczkHPe9udpmg sKb8OYeW0BUD06LAqKR1dh/0Gt59lV43FkBPb37Jpqt7uvpqXKVM1E2TAU78gRYKgpbo PjNpovYhA7m6RlgLgxIso76PfDvO8WvY+yyTDsfKQOdn9Jy+OsoOtQNNEOsEWGYEbfo+ OvZQ== X-Gm-Message-State: AAQBX9dvUsIsQU2OqLAySRyBjf82cl+SDAEAqkYoHveqm3hdi1Dw8+ej 6OLyedjfWjor2xg0YpXC7HF2MVVtQjmNufjWkbo= X-Received: by 2002:a0d:df4a:0:b0:54f:b4fa:3271 with SMTP id i71-20020a0ddf4a000000b0054fb4fa3271mr5522576ywe.21.1682238671839; Sun, 23 Apr 2023 01:31:11 -0700 (PDT) MIME-Version: 1.0 References: <3b9c4f05eaf14bc3b16aebec3ff84c8a2d52c4a5.1681887790.git.zhoubinbin@loongson.cn> <75231886-cdf6-cfde-d6b9-183b1fbf98da@linaro.org> In-Reply-To: <75231886-cdf6-cfde-d6b9-183b1fbf98da@linaro.org> From: Binbin Zhou Date: Sun, 23 Apr 2023 16:30:57 +0800 Message-ID: Subject: Re: [PATCH V3 1/2] dt-bindings: interrupt-controller: Add Loongson EIOINTC To: Krzysztof Kozlowski Cc: Binbin Zhou , Huacai Chen , WANG Xuerui , Jiaxun Yang , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Jianmin Lv , Huacai Chen , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, loongarch@lists.linux.dev, devicetree@vger.kernel.org, loongson-kernel@lists.loongnix.cn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 20, 2023 at 11:52=E2=80=AFPM Krzysztof Kozlowski wrote: > > On 20/04/2023 15:00, Binbin Zhou wrote: > >>> +examples: > >>> + - | > >>> + eiointc: interrupt-controller@1fe11600 { > >>> + compatible =3D "loongson,ls2k0500-eiointc"; > >>> + reg =3D <0x1fe11600 0x10>, > >>> + <0x1fe11700 0x10>, > >>> + <0x1fe11800 0x10>, > >>> + <0x1fe114c0 0x4>; > >> > >> Binding is OK, but are you sure you want to split the address space li= ke > >> this? It looks like two address spaces (enable+clear+status should be > >> one). Are you sure this is correct? > >> > > Hi Krzysztof: > > > > These registers are all in the range of chip configuration registers, > > in the case of LS2K0500, which has a base address of 0x1fe10000. > > However, the individual register addresses are not contiguous with > > each other, and most are distributed across modules, so I feel that > > they should be listed in detail as they are used. > > Do you want to say that: > Between 0x1fe11600 and 0x1fe11700 there are EIOINTC registers and other > (independent) module registers? No, this section is all EIO-related configuration, but there will be undefined space here. Throughout the chip configuration space, there are some relatively common areas, such as the definition of 0x1fe1_14c0. Because our chip supports two interrupt modes, node legacy I/O interrupt and extended I/O interrupt, both modes require interrupt routing registers. Their registers are then defined together: the legacy interrupt I/O start address is 0x1fe1_1400, while the extended I/O interrupt start address is 0x1fe1_14c0. Then I have carefully compared the chip configuration space in LS2K0500 and LS2K2000 and can see that: 1. The chip configuration space base addresses are different, but they both have a size of 64KB; 2. The offset addresses of the EIO related registers are the same, for example the offset of the enable register is 0x1600. Wouldn't it be better to declare the entire configuration space (64KB) directly in the dts and use the offsets to access the corresponding registers? Example: reg =3D <0x1fe10000 0x10000>. Thanks. Binbin > > Best regards, > Krzysztof