[PATCH v1 16/24] pci: Add PCI controller driver for OcteonTX / TX2

Stefan Roese sr at denx.de
Wed Aug 5 15:25:39 CEST 2020


Hi Simon,

On 31.07.20 20:44, Simon Glass wrote:
> Hi Stefan,
> 
> On Thu, 30 Jul 2020 at 10:26, Stefan Roese <sr at denx.de> wrote:
>>
>> Hi Simon,
>>
>> On 28.07.20 21:01, Simon Glass wrote:
>>> Hi Stefan,
>>>
>>> On Fri, 24 Jul 2020 at 04:09, Stefan Roese <sr at denx.de> wrote:
>>>>
>>>> From: Suneel Garapati <sgarapati at marvell.com>
>>>>
>>>> Adds support for PCI ECAM/PEM controllers found on OcteonTX
>>>> or OcteonTX2 SoC platforms.
>>>>
>>>> Signed-off-by: Suneel Garapati <sgarapati at marvell.com>
>>>> Cc: Simon Glass <sjg at chromium.org>
>>>> Cc: Bin Meng <bmeng.cn at gmail.com>
>>>>
>>>> Signed-off-by: Stefan Roese <sr at denx.de>
>>>> ---
>>>>
>>>> Changes in v1:
>>>> - Change patch subject
>>>> - Remove inclusion of common.h
>>>> - Remove #ifdef's and use driver specific data instead
>>>> - Add comments to struct
>>>> - Add some helper functions to reduce code size
>>>> - Misc coding style changes (blank lines etc)
>>>> - Use debug() instead of printf() in some cases
>>>>
>>>>    drivers/pci/Kconfig        |   8 +
>>>>    drivers/pci/Makefile       |   1 +
>>>>    drivers/pci/pci_octeontx.c | 344 +++++++++++++++++++++++++++++++++++++
>>>>    3 files changed, 353 insertions(+)
>>>>    create mode 100644 drivers/pci/pci_octeontx.c
>>>
>>> Reviewed-by: Simon Glass <sjg at chromium.org>
>>>
>>>>
> 
> [,,]
> 
>>>> +static int pci_octeontx_probe(struct udevice *dev)
>>>> +{
>>>> +       struct octeontx_pci *pcie = (struct octeontx_pci *)dev_get_priv(dev);
>>>> +       int err;
>>>> +
>>>> +       pcie->type = dev_get_driver_data(dev);
>>>> +
>>>> +       err = fdt_get_resource(gd->fdt_blob, dev->node.of_offset, "reg", 0,
>>>> +                              &pcie->cfg);
>>>
>>> We really should have a livetree API for this.
>>
>> Is this mandatory for this patch to get accepted? Or can I add this
>> to my list and post this later and port this driver to using these
>> livetree functions then?
> 
> No, you have my review tag and later is fine.

Okay.

>>
>> BTW: Do you have an example for a similar function added to livetree,
>> so that I can choose the "correct" naming?
> 
> Well we have dev_read_resource() so I'm hoping that they are not too
> far away from what you need.

I've now added dev_read_pci_bus_range() in the next patchset version
and selected OF_LIVE for both new platforms (Octeon TX & TX2).

Thanks,
Stefan


More information about the U-Boot mailing list