diff mbox series

[v1,2/2] drivers: clk: zynqmp: Add versal-net compatible string

Message ID 20230330091309.16215-3-shubhrajyoti.datta@amd.com (mailing list archive)
State Changes Requested, archived
Headers show
Series clk: zynqmp: Add versal-net compatible string | expand

Commit Message

Shubhrajyoti Datta March 30, 2023, 9:13 a.m. UTC
From: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>

Add compatible string for versal-net.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
---

 drivers/clk/zynqmp/clkc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Krzysztof Kozlowski March 30, 2023, 11:08 a.m. UTC | #1
On 30/03/2023 11:13, Shubhrajyoti Datta wrote:
> From: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
> 
> Add compatible string for versal-net.
> 
> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
> ---
> 
>  drivers/clk/zynqmp/clkc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
> index 5636ff1ce552..1ea5fba20d91 100644
> --- a/drivers/clk/zynqmp/clkc.c
> +++ b/drivers/clk/zynqmp/clkc.c
> @@ -789,6 +789,7 @@ static int zynqmp_clock_probe(struct platform_device *pdev)
>  static const struct of_device_id zynqmp_clock_of_match[] = {
>  	{.compatible = "xlnx,zynqmp-clk"},
>  	{.compatible = "xlnx,versal-clk"},
> +	{.compatible = "xlnx,versal-net-clk"},

Why no driver data? Why do you create new driver matchings if devices
are compatible?

Best regards,
Krzysztof
Michal Simek March 30, 2023, noon UTC | #2
On 3/30/23 13:08, Krzysztof Kozlowski wrote:
> On 30/03/2023 11:13, Shubhrajyoti Datta wrote:
>> From: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
>>
>> Add compatible string for versal-net.
>>
>> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
>> ---
>>
>>   drivers/clk/zynqmp/clkc.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
>> index 5636ff1ce552..1ea5fba20d91 100644
>> --- a/drivers/clk/zynqmp/clkc.c
>> +++ b/drivers/clk/zynqmp/clkc.c
>> @@ -789,6 +789,7 @@ static int zynqmp_clock_probe(struct platform_device *pdev)
>>   static const struct of_device_id zynqmp_clock_of_match[] = {
>>   	{.compatible = "xlnx,zynqmp-clk"},
>>   	{.compatible = "xlnx,versal-clk"},
>> +	{.compatible = "xlnx,versal-net-clk"},
> 
> Why no driver data? Why do you create new driver matchings if devices
> are compatible?

It is the same discussion as we had recently in connection to emmc.
versal-net is new SOC and if any issue happens we would apply workaround based 
on DT compatible string. And by using special compatible string directly from 
beginning will allow us to do changes without change DT.

We actually don't need to update the driver for this. We can just simply list 
new dt binding and use both compatible string in DT like this.
"xlnx,versal-net-clk", "xlnx,versal-clk"

Thanks,
Michal
Krzysztof Kozlowski March 30, 2023, 1:32 p.m. UTC | #3
On 30/03/2023 14:00, Michal Simek wrote:
> 
> 
> On 3/30/23 13:08, Krzysztof Kozlowski wrote:
>> On 30/03/2023 11:13, Shubhrajyoti Datta wrote:
>>> From: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
>>>
>>> Add compatible string for versal-net.
>>>
>>> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
>>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
>>> ---
>>>
>>>   drivers/clk/zynqmp/clkc.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
>>> index 5636ff1ce552..1ea5fba20d91 100644
>>> --- a/drivers/clk/zynqmp/clkc.c
>>> +++ b/drivers/clk/zynqmp/clkc.c
>>> @@ -789,6 +789,7 @@ static int zynqmp_clock_probe(struct platform_device *pdev)
>>>   static const struct of_device_id zynqmp_clock_of_match[] = {
>>>   	{.compatible = "xlnx,zynqmp-clk"},
>>>   	{.compatible = "xlnx,versal-clk"},
>>> +	{.compatible = "xlnx,versal-net-clk"},
>>
>> Why no driver data? Why do you create new driver matchings if devices
>> are compatible?
> 
> It is the same discussion as we had recently in connection to emmc.
> versal-net is new SOC and if any issue happens we would apply workaround based 
> on DT compatible string. And by using special compatible string directly from 
> beginning will allow us to do changes without change DT.

None of these arguments require growing match data. My comment was not
about bindings. My comment was why do you need to grow of_device_id
needlessly?

> 
> We actually don't need to update the driver for this. We can just simply list 
> new dt binding and use both compatible string in DT like this.
> "xlnx,versal-net-clk", "xlnx,versal-clk"


Best regards,
Krzysztof
Michal Simek March 30, 2023, 1:49 p.m. UTC | #4
On 3/30/23 15:32, Krzysztof Kozlowski wrote:
> On 30/03/2023 14:00, Michal Simek wrote:
>>
>>
>> On 3/30/23 13:08, Krzysztof Kozlowski wrote:
>>> On 30/03/2023 11:13, Shubhrajyoti Datta wrote:
>>>> From: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
>>>>
>>>> Add compatible string for versal-net.
>>>>
>>>> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
>>>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
>>>> ---
>>>>
>>>>    drivers/clk/zynqmp/clkc.c | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
>>>> index 5636ff1ce552..1ea5fba20d91 100644
>>>> --- a/drivers/clk/zynqmp/clkc.c
>>>> +++ b/drivers/clk/zynqmp/clkc.c
>>>> @@ -789,6 +789,7 @@ static int zynqmp_clock_probe(struct platform_device *pdev)
>>>>    static const struct of_device_id zynqmp_clock_of_match[] = {
>>>>    	{.compatible = "xlnx,zynqmp-clk"},
>>>>    	{.compatible = "xlnx,versal-clk"},
>>>> +	{.compatible = "xlnx,versal-net-clk"},
>>>
>>> Why no driver data? Why do you create new driver matchings if devices
>>> are compatible?
>>
>> It is the same discussion as we had recently in connection to emmc.
>> versal-net is new SOC and if any issue happens we would apply workaround based
>> on DT compatible string. And by using special compatible string directly from
>> beginning will allow us to do changes without change DT.
> 
> None of these arguments require growing match data. My comment was not
> about bindings. My comment was why do you need to grow of_device_id
> needlessly?

Right.
Shubhrajyoti: Please update only dt binding and for versal-net we will use
new compatible string followed by old one.

Thanks,
Michal
diff mbox series

Patch

diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index 5636ff1ce552..1ea5fba20d91 100644
--- a/drivers/clk/zynqmp/clkc.c
+++ b/drivers/clk/zynqmp/clkc.c
@@ -789,6 +789,7 @@  static int zynqmp_clock_probe(struct platform_device *pdev)
 static const struct of_device_id zynqmp_clock_of_match[] = {
 	{.compatible = "xlnx,zynqmp-clk"},
 	{.compatible = "xlnx,versal-clk"},
+	{.compatible = "xlnx,versal-net-clk"},
 	{},
 };
 MODULE_DEVICE_TABLE(of, zynqmp_clock_of_match);