diff mbox series

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

Message ID 20240131114952.305805-3-john.ernberg@actia.se (mailing list archive)
State Superseded
Headers show
Series Xen: ARM: Improved NXP iMX8 platform support | expand

Commit Message

John Ernberg Jan. 31, 2024, 11:50 a.m. UTC
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(+)

Comments

Julien Grall Jan. 31, 2024, 12:29 p.m. UTC | #1
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,
John Ernberg Jan. 31, 2024, 3:31 p.m. UTC | #2
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
diff mbox series

Patch

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 */ },
 };