From: wangzhou1@hisilicon•com (Zhou Wang)
To: linux-arm-kernel@lists•infradead.org
Subject: [RFC PATCH v1 2/3] PCI: hisi: Add PCIe host support for Hisilicon Soc Hip05
Date: Thu, 21 May 2015 20:29:24 +0800 [thread overview]
Message-ID: <555DCFA4.7090104@hisilicon.com> (raw)
In-Reply-To: <CAErSpo7TEgY=oJvLU3jyh=FcZqgsSxLi1Cw1mo6w+5WSRkfPMQ@mail.gmail.com>
On 2015/5/21 20:09, Bjorn Helgaas wrote:
> On Wed, May 20, 2015 at 8:41 PM, Zhou Wang <wangzhou1@hisilicon•com> wrote:
>> On 2015/5/20 20:50, Jingoo Han wrote:
>>> On Wed, 20 May 2015 14:21:40 +0800, Zhou Wang wrote:
>
>>>> +/* Configure vmid/asid table in PCIe host */
>>>> +static void hisi_pcie_config_context(struct hisi_pcie *pcie)
>>>> +{
>>>> + int i;
>>>> +
>>>> + hisi_pcie_change_apb_mode(pcie, PCIE_SLV_CONTENT_MODE);
>>>> +
>>>> + for (i = 0; i < 0x400; i++)
>>>> + hisi_pcie_apb_writel(pcie, 0x0, i * 4);
>>>> +
>>>> + for (i = 0x400; i < 0x800; i++)
>>>> + hisi_pcie_apb_writel(pcie, 0x0, i * 4);
>>>
>>> How about the following?
>>>
>>> + for (i = 0; i < 0x800; i++)
>>> + hisi_pcie_apb_writel(pcie, 0x0, i * 4);
>>>
>>
>> This is to configure init value of vmid and asid of each pcie device.
>
> But the combined loop looks functionally equivalent, i.e., I don't
> think the device can tell the difference. Personally I wouldn't mind
> if you kept the two loops separate, but if you do, each one needs a
> comment immediately before it so the reader has a clue that they are
> doing semantically different things. Otherwise it just looks like a
> mistake and the reader wonders why they are split.
>
> Bjorn
Got it. There is a vmid table and a asid table in host controll
registers. They are just adjoining as above. I will combine above loops
with more comments together.
Thanks and Regards,
Zhou
>
> .
>
next prev parent reply other threads:[~2015-05-21 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <000101d092fb$94dde100$be99a300$@com>
2015-05-21 1:41 ` [RFC PATCH v1 2/3] PCI: hisi: Add PCIe host support for Hisilicon Soc Hip05 Zhou Wang
2015-05-21 12:09 ` Bjorn Helgaas
2015-05-21 12:29 ` Zhou Wang [this message]
2015-05-20 6:21 [RFC PATCH v1 0/3] " Zhou Wang
2015-05-20 6:21 ` [RFC PATCH v1 2/3] " Zhou Wang
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=555DCFA4.7090104@hisilicon.com \
--to=wangzhou1@hisilicon$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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