diff mbox series

[v2,1/1] PCI: layerscape: Add EP mode support for ls1028a

Message ID 20230112193442.1513372-1-Frank.Li@nxp.com (mailing list archive)
State Superseded
Delegated to: Krzysztof WilczyƄski
Headers show
Series [v2,1/1] PCI: layerscape: Add EP mode support for ls1028a | expand

Commit Message

Frank Li Jan. 12, 2023, 7:34 p.m. UTC
From: Xiaowei Bao <xiaowei.bao@nxp.com>

Add PCIe EP mode support for ls1028a.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp>
Acked-by:  Roy Zang <Roy.Zang@nxp.com>

---

Added 
Signed-off-by: Frank Li <Frank.Li@nxp>
Acked-by:  Roy Zang <Roy.Zang@nxp.com>


All other patches were already accepte by maintainer in 
https://lore.kernel.org/lkml/20211112223457.10599-1-leoyang.li@nxp.com/

But missed this one.

Re-post.

 drivers/pci/controller/dwc/pci-layerscape-ep.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Frank Li Feb. 2, 2023, 5:41 p.m. UTC | #1
> Subject: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for
> ls1028a
> 
> Caution: EXT Email
> 
> From: Xiaowei Bao <xiaowei.bao@nxp.com>
> 
> Add PCIe EP mode support for ls1028a.
> 
> Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> Signed-off-by: Frank Li <Frank.Li@nxp>
> Acked-by:  Roy Zang <Roy.Zang@nxp.com>
> 

[Frank Li] ping

> ---
> 
> Added
> Signed-off-by: Frank Li <Frank.Li@nxp>
> Acked-by:  Roy Zang <Roy.Zang@nxp.com>
> 
> 
> All other patches were already accepte by maintainer in
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.k
> ernel.org%2Flkml%2F20211112223457.10599-1-
> leoyang.li%40nxp.com%2F&data=05%7C01%7Cfrank.li%40nxp.com%7C29d1
> 5c05d59346e552be08daf4d573e5%7C686ea1d3bc2b4c6fa92cd99c5c301635%
> 7C0%7C0%7C638091494850726163%7CUnknown%7CTWFpbGZsb3d8eyJWIjo
> iMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30
> 00%7C%7C%7C&sdata=0wnHTyuX%2FyLAiioKNvlFbBM83nVyF%2FCdhqsEmV
> f2sI4%3D&reserved=0
> 
> But missed this one.
> 
> Re-post.
> 
>  drivers/pci/controller/dwc/pci-layerscape-ep.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c
> b/drivers/pci/controller/dwc/pci-layerscape-ep.c
> index ad99707b3b99..ed5cfc9408d9 100644
> --- a/drivers/pci/controller/dwc/pci-layerscape-ep.c
> +++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c
> @@ -112,6 +112,7 @@ static const struct ls_pcie_ep_drvdata
> lx2_ep_drvdata = {
>  static const struct of_device_id ls_pcie_ep_of_match[] = {
>         { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
>         { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
> +       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
>         { .compatible = "fsl,ls2088a-pcie-ep", .data = &ls2_ep_drvdata },
>         { .compatible = "fsl,lx2160ar2-pcie-ep", .data = &lx2_ep_drvdata },
>         { },
> --
> 2.34.1
Alok Tiwari Feb. 3, 2023, 5:17 a.m. UTC | #2
{ .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
+       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
	{ .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },

can it be like this for better readability. ?

Thanks,
Alok

On 2/2/2023 11:11 PM, Frank Li wrote:
>> Subject: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for
>> ls1028a
>>
>> Caution: EXT Email
>>
>> From: Xiaowei Bao <xiaowei.bao@nxp.com>
>>
>> Add PCIe EP mode support for ls1028a.
>>
>> Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
>> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>> Signed-off-by: Frank Li <Frank.Li@nxp>
>> Acked-by:  Roy Zang <Roy.Zang@nxp.com>
>>
> [Frank Li] ping
>
>> ---
>>
>> Added
>> Signed-off-by: Frank Li <Frank.Li@nxp>
>> Acked-by:  Roy Zang <Roy.Zang@nxp.com>
>>
>>
>> All other patches were already accepte by maintainer in
>> https://urldefense.com/v3/__https://eur01.safelinks.protection.outlook.com/?url=https*3A*2F*2Flore.k__;JSUl!!ACWV5N9M2RV99hQ!PIKq0-lb3ccjBcAZNFo48kfWvbGPlh7_Wiws1olaNdTthUzhcGFrpLbw3vOMDaeops5LkajDO_y_vGPyuhE$
>> ernel.org%2Flkml%2F20211112223457.10599-1-
>> leoyang.li%40nxp.com%2F&data=05%7C01%7Cfrank.li%40nxp.com%7C29d1
>> 5c05d59346e552be08daf4d573e5%7C686ea1d3bc2b4c6fa92cd99c5c301635%
>> 7C0%7C0%7C638091494850726163%7CUnknown%7CTWFpbGZsb3d8eyJWIjo
>> iMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30
>> 00%7C%7C%7C&sdata=0wnHTyuX%2FyLAiioKNvlFbBM83nVyF%2FCdhqsEmV
>> f2sI4%3D&reserved=0
>>
>> But missed this one.
>>
>> Re-post.
>>
>>   drivers/pci/controller/dwc/pci-layerscape-ep.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c
>> b/drivers/pci/controller/dwc/pci-layerscape-ep.c
>> index ad99707b3b99..ed5cfc9408d9 100644
>> --- a/drivers/pci/controller/dwc/pci-layerscape-ep.c
>> +++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c
>> @@ -112,6 +112,7 @@ static const struct ls_pcie_ep_drvdata
>> lx2_ep_drvdata = {
>>   static const struct of_device_id ls_pcie_ep_of_match[] = {
>>          { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
>>          { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
>> +       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
>>          { .compatible = "fsl,ls2088a-pcie-ep", .data = &ls2_ep_drvdata },
>>          { .compatible = "fsl,lx2160ar2-pcie-ep", .data = &lx2_ep_drvdata },
>>          { },
>> --
>> 2.34.1
Frank Li Feb. 7, 2023, 4:20 p.m. UTC | #3
> Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP
> mode support for ls1028a
> 
> Caution: EXT Email
> 
>          { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
> +       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
>         { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
> 
> can it be like this for better readability. ?

It is just chip name and follow name conversion, which already upstreamed and documented. 
Why do you think it not is good readability? 

Frank Li 

> 
> Thanks,
> Alok
>
Bjorn Helgaas Feb. 8, 2023, 10:23 p.m. UTC | #4
On Tue, Feb 07, 2023 at 04:20:21PM +0000, Frank Li wrote:
> > Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP
> > mode support for ls1028a
> > 
> >          { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
> > +       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
> >         { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
> > 
> > can it be like this for better readability. ?
> 
> It is just chip name and follow name conversion, which already
> upstreamed and documented. 
>
> Why do you think it not is good readability? 

I thought maybe ALOK's point was to sort the list, which does make a
lot of sense.  But if you want to sort by the .data member, I would
think you would make .compatible a secondary sort key, which means
ls1028a would come before ls1046a, so you would end up with this
instead:

 static const struct of_device_id ls_pcie_ep_of_match[] = {
+       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
        { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
        { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
        { .compatible = "fsl,ls2088a-pcie-ep", .data = &ls2_ep_drvdata },
        { .compatible = "fsl,lx2160ar2-pcie-ep", .data = &lx2_ep_drvdata },
        { },
 };
Alok Tiwari Feb. 9, 2023, 10:37 a.m. UTC | #5
yes, it is more about sort the list using .data and .compatible. key

much better if it we keep this as suggested by Frank,

  static const struct of_device_id ls_pcie_ep_of_match[] = {
+       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
         { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
         { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },



Thanks,

Alok

On 2/9/2023 3:53 AM, Bjorn Helgaas wrote:
> On Tue, Feb 07, 2023 at 04:20:21PM +0000, Frank Li wrote:
>>> Subject: Re: [External] : RE: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP
>>> mode support for ls1028a
>>>
>>>           { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
>>> +       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
>>>          { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
>>>
>>> can it be like this for better readability. ?
>> It is just chip name and follow name conversion, which already
>> upstreamed and documented.
>>
>> Why do you think it not is good readability?
> I thought maybe ALOK's point was to sort the list, which does make a
> lot of sense.  But if you want to sort by the .data member, I would
> think you would make .compatible a secondary sort key, which means
> ls1028a would come before ls1046a, so you would end up with this
> instead:
>
>   static const struct of_device_id ls_pcie_ep_of_match[] = {
> +       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
>          { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
>          { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
>          { .compatible = "fsl,ls2088a-pcie-ep", .data = &ls2_ep_drvdata },
>          { .compatible = "fsl,lx2160ar2-pcie-ep", .data = &lx2_ep_drvdata },
>          { },
>   };
>
Frank Li Feb. 9, 2023, 3:12 p.m. UTC | #6
> 
> Caution: EXT Email
> 
> yes, it is more about sort the list using .data and .compatible. key
> 
> much better if it we keep this as suggested by Frank,
> 
>   static const struct of_device_id ls_pcie_ep_of_match[] = {
> +       { .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
>          { .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
>          { .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },

Thanks, v3 sent.
Frank Li
> 
> 
> 
> Thanks,
> 
> Alok
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c b/drivers/pci/controller/dwc/pci-layerscape-ep.c
index ad99707b3b99..ed5cfc9408d9 100644
--- a/drivers/pci/controller/dwc/pci-layerscape-ep.c
+++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c
@@ -112,6 +112,7 @@  static const struct ls_pcie_ep_drvdata lx2_ep_drvdata = {
 static const struct of_device_id ls_pcie_ep_of_match[] = {
 	{ .compatible = "fsl,ls1046a-pcie-ep", .data = &ls1_ep_drvdata },
 	{ .compatible = "fsl,ls1088a-pcie-ep", .data = &ls2_ep_drvdata },
+	{ .compatible = "fsl,ls1028a-pcie-ep", .data = &ls1_ep_drvdata },
 	{ .compatible = "fsl,ls2088a-pcie-ep", .data = &ls2_ep_drvdata },
 	{ .compatible = "fsl,lx2160ar2-pcie-ep", .data = &lx2_ep_drvdata },
 	{ },