public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: clement.leger@bootlin.com
To: Lizhi Hou <lizhi.hou@amd.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, robh@kernel.org,
	frowand.list@gmail.com, helgaas@kernel.org, max.zhen@amd.com,
	sonal.santan@amd.com, larry.liu@amd.com, brian.xu@amd.com,
	stefano.stabellini@xilinx.com, trix@redhat.com,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Allan.Nielsen@microchip.com, Horatiu.Vultur@microchip.com,
	Steen.Hegelund@microchip.com
Subject: Re: [PATCH V5 2/3] PCI: Create device tree node for selected devices
Date: Wed, 04 Jan 2023 06:57:14 +0100	[thread overview]
Message-ID: <7eb33924fc380669893571747b999660@bootlin.com> (raw)
In-Reply-To: <bee02801-c3a4-4717-61a0-290494a097bc@amd.com>

Le 2023-01-04 01:31, Lizhi Hou a écrit :
> On 1/3/23 06:48, Clément Léger wrote:
>> Le Thu, 15 Dec 2022 09:30:45 -0800,
>> Lizhi Hou <lizhi.hou@amd.com> a écrit :
>> 
>>> +
>>> +static int of_pci_prop_address_cells(struct pci_dev *pdev,
>>> +				     struct of_changeset *ocs,
>>> +				     struct device_node *np)
>>> +{
>>> +	return of_changeset_add_prop_u32(ocs, np, "#address_cells",
>>> +					 OF_PCI_ADDRESS_CELLS);
>>> +}
>> Hi Lizhi,
>> 
>> This should be #address-cells and not #address_cells.
>> 
>>> +
>>> +static int of_pci_prop_size_cells(struct pci_dev *pdev,
>>> +				  struct of_changeset *ocs,
>>> +				  struct device_node *np)
>>> +{
>>> +	return of_changeset_add_prop_u32(ocs, np, "#size_cells",
>>> +					 OF_PCI_SIZE_CELLS);
>>> +}
>> Ditto here, this should be #size-cells and not #size_cells. Was this
>> really tested ?
> 
> I will fix this.  I verified the properties are generated and did not
> notice the '_' error.

Hi Lizhi,

The most important thing to test is if a driver can correctly retrieve 
resource
of the device using a node added below the created PCI device node. This 
is
resolved using the whole hierarchy ranges, address-cells and size-cells 
properties.

If not correctly set, this will fail (and it fails).

Clément

> 
> 
> Thanks,
> 
> Lizhi
> 
>> 
>> Thanks,
>> 

  reply	other threads:[~2023-01-04  5:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 17:30 [PATCH V5 0/3] Generate device tree node for pci devices Lizhi Hou
2022-12-15 17:30 ` [PATCH V5 1/3] of: dynamic: Add interfaces for creating device node dynamically Lizhi Hou
2023-01-02 13:50   ` Clément Léger
2023-01-03 18:34     ` Lizhi Hou
2022-12-15 17:30 ` [PATCH V5 2/3] PCI: Create device tree node for selected devices Lizhi Hou
2023-01-02 13:56   ` Clément Léger
2023-01-03 18:44     ` Lizhi Hou
2023-01-03 19:34       ` clement.leger
2023-01-02 17:16   ` Clément Léger
2023-01-03 19:45     ` Lizhi Hou
2023-01-04  0:29       ` Lizhi Hou
2023-01-03 14:48   ` Clément Léger
2023-01-04  0:31     ` Lizhi Hou
2023-01-04  5:57       ` clement.leger [this message]
2023-01-03 15:38   ` Clément Léger
2022-12-15 17:30 ` [PATCH V5 3/3] PCI: Add PCI quirks to generate device tree node for Xilinx Alveo U50 Lizhi Hou
  -- strict thread matches above, loose matches on Subject: below --
2022-12-09 19:38 [PATCH V5 0/3] Generate device tree node for pci devices Lizhi Hou
2022-12-09 19:38 ` [PATCH V5 2/3] PCI: Create device tree node for selected devices Lizhi Hou

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=7eb33924fc380669893571747b999660@bootlin.com \
    --to=clement.leger@bootlin.com \
    --cc=Allan.Nielsen@microchip.com \
    --cc=Horatiu.Vultur@microchip.com \
    --cc=Steen.Hegelund@microchip.com \
    --cc=brian.xu@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=helgaas@kernel.org \
    --cc=larry.liu@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=max.zhen@amd.com \
    --cc=robh@kernel.org \
    --cc=sonal.santan@amd.com \
    --cc=stefano.stabellini@xilinx.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=trix@redhat.com \
    /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