lkml.org 
[lkml]   [2023]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V5 2/3] PCI: Create device tree node for selected devices
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,
>>

\
 
 \ /
  Last update: 2023-03-26 23:26    [W:0.038 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site