[PATCH 2/2] xen/drivers: imx-lpuart: Add iMX8QXP compatible

John Ernberg posted 2 patches 2 years ago
There is a newer version of this series
[PATCH 2/2] xen/drivers: imx-lpuart: Add iMX8QXP compatible
Posted by John Ernberg 2 years ago
Allow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM,
only the compatible is needed.

Signed-off-by: John Ernberg <john.ernberg@actia.se>
---
 xen/drivers/char/imx-lpuart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/drivers/char/imx-lpuart.c b/xen/drivers/char/imx-lpuart.c
index 77f70c2719..c85e81109a 100644
--- a/xen/drivers/char/imx-lpuart.c
+++ b/xen/drivers/char/imx-lpuart.c
@@ -257,6 +257,7 @@ static int __init imx_lpuart_init(struct dt_device_node *dev,
 static const struct dt_device_match imx_lpuart_dt_compat[] __initconst =
 {
     DT_MATCH_COMPATIBLE("fsl,imx8qm-lpuart"),
+    DT_MATCH_COMPATIBLE("fsl,imx8qxp-lpuart"),
     { /* sentinel */ },
 };
 
-- 
2.43.0
Re: [PATCH 2/2] xen/drivers: imx-lpuart: Add iMX8QXP compatible
Posted by Julien Grall 2 years ago
Hi John,

On 31/01/2024 11:50, John Ernberg wrote:
> Allow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM,
> only the compatible is needed.
> 
> Signed-off-by: John Ernberg <john.ernberg@actia.se>

With one remark below:

Acked-by: Julien Grall <jgrall@amazon.com>

> ---
>   xen/drivers/char/imx-lpuart.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/xen/drivers/char/imx-lpuart.c b/xen/drivers/char/imx-lpuart.c
> index 77f70c2719..c85e81109a 100644
> --- a/xen/drivers/char/imx-lpuart.c
> +++ b/xen/drivers/char/imx-lpuart.c
> @@ -257,6 +257,7 @@ static int __init imx_lpuart_init(struct dt_device_node *dev,
>   static const struct dt_device_match imx_lpuart_dt_compat[] __initconst =
>   {
>       DT_MATCH_COMPATIBLE("fsl,imx8qm-lpuart"),
> +    DT_MATCH_COMPATIBLE("fsl,imx8qxp-lpuart"),

IIUC the binding, the Device-Tree node compatible should have both 
fsl,imx8qm-lpuart and fsl,imx8qxp-lpuart. In fact, the Linux driver 
doesn't recognize the first compatible.

So maybe we can remove the first one.

Cheers,

-- 
Julien Grall
Re: [PATCH 2/2] xen/drivers: imx-lpuart: Add iMX8QXP compatible
Posted by John Ernberg 2 years ago
Hi Julien,

On 1/31/24 13:29, Julien Grall wrote:
> Hi John,
> 
> On 31/01/2024 11:50, John Ernberg wrote:
>> Allow the uart to probe also with iMX8QXP. The ip-block is the same as 
>> in the QM,
>> only the compatible is needed.
>>
>> Signed-off-by: John Ernberg <john.ernberg@actia.se>
> 
> With one remark below:
> 
> Acked-by: Julien Grall <jgrall@amazon.com>
> 
>> ---
>>   xen/drivers/char/imx-lpuart.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/xen/drivers/char/imx-lpuart.c 
>> b/xen/drivers/char/imx-lpuart.c
>> index 77f70c2719..c85e81109a 100644
>> --- a/xen/drivers/char/imx-lpuart.c
>> +++ b/xen/drivers/char/imx-lpuart.c
>> @@ -257,6 +257,7 @@ static int __init imx_lpuart_init(struct 
>> dt_device_node *dev,
>>   static const struct dt_device_match imx_lpuart_dt_compat[] 
>> __initconst =
>>   {
>>       DT_MATCH_COMPATIBLE("fsl,imx8qm-lpuart"),
>> +    DT_MATCH_COMPATIBLE("fsl,imx8qxp-lpuart"),
> 
> IIUC the binding, the Device-Tree node compatible should have both 
> fsl,imx8qm-lpuart and fsl,imx8qxp-lpuart. In fact, the Linux driver 
> doesn't recognize the first compatible.
> 
> So maybe we can remove the first one.

It's listed in the bindings but the Linux driver indeed never looks for 
qm, it should be safe to drop. I'll drop this in V2.

> 
> Cheers,
> 

Thanks! // John Ernberg