From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Binbin Zhou <zhoubb.aaron@gmail.com>
Cc: Binbin Zhou <zhoubinbin@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Marc Zyngier <maz@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Jianmin Lv <lvjianmin@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
loongarch@lists.linux.dev, devicetree@vger.kernel.org,
loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH V3 1/2] dt-bindings: interrupt-controller: Add Loongson EIOINTC
Date: Mon, 24 Apr 2023 10:45:28 +0200 [thread overview]
Message-ID: <169d832c-72c0-6c67-37c3-dbea9e1bc639@linaro.org> (raw)
In-Reply-To: <CAMpQs4Jp8WPKJEuJD-_83oRPBbPELxS5ufqp-nHow0D9D+R+ig@mail.gmail.com>
On 23/04/2023 10:30, Binbin Zhou wrote:
> On Thu, Apr 20, 2023 at 11:52 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 20/04/2023 15:00, Binbin Zhou wrote:
>>>>> +examples:
>>>>> + - |
>>>>> + eiointc: interrupt-controller@1fe11600 {
>>>>> + compatible = "loongson,ls2k0500-eiointc";
>>>>> + reg = <0x1fe11600 0x10>,
>>>>> + <0x1fe11700 0x10>,
>>>>> + <0x1fe11800 0x10>,
>>>>> + <0x1fe114c0 0x4>;
>>>>
>>>> Binding is OK, but are you sure you want to split the address space like
>>>> 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 = <0x1fe10000 0x10000>.
Yes, that's what usually we do.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-04-24 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 7:17 [PATCH V3 0/2] irqchip: loongson-eiointc: Add DT init support Binbin Zhou
2023-04-19 7:17 ` [PATCH V3 1/2] dt-bindings: interrupt-controller: Add Loongson EIOINTC Binbin Zhou
2023-04-19 20:09 ` Krzysztof Kozlowski
2023-04-20 13:00 ` Binbin Zhou
2023-04-20 15:52 ` Krzysztof Kozlowski
2023-04-23 8:30 ` Binbin Zhou
2023-04-24 8:45 ` Krzysztof Kozlowski [this message]
2023-04-21 19:04 ` Rob Herring
2023-04-19 7:17 ` [PATCH V3 2/2] irqchip/loongson-eiointc: Add DT init support Binbin Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=169d832c-72c0-6c67-37c3-dbea9e1bc639@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=devicetree@vger.kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=lvjianmin@loongson.cn \
--cc=maz@kernel.org \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).