From: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
xen/arch/arm/Kconfig.debug | 3 +++
xen/arch/arm/platforms/Makefile | 1 +
xen/arch/arm/platforms/imx8qm.c | 44 +++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+)
create mode 100644 xen/arch/arm/platforms/imx8qm.c
diff --git a/xen/arch/arm/Kconfig.debug b/xen/arch/arm/Kconfig.debug
index 9ecb446b3a..43ccd8fe62 100644
--- a/xen/arch/arm/Kconfig.debug
+++ b/xen/arch/arm/Kconfig.debug
@@ -143,6 +143,9 @@ choice
config EARLY_PRINTK_HIKEY960
bool "Early printk with pl011 with Hikey 960"
select EARLY_UART_PL011
+ config EARLY_PRINTK_IMX8QM
+ bool "Early printk with i.MX LPUART with i.MX8QM"
+ select EARLY_UART_IMX_LPUART
config EARLY_PRINTK_JUNO
bool "Early printk with pl011 on Juno platform"
select EARLY_UART_PL011
diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
index 8632f4115f..bec6e55d1f 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o
obj-$(CONFIG_ALL64_PLAT) += thunderx.o
obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o
obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o
+obj-$(CONFIG_ALL64_PLAT) += imx8qm.o
obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o
obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
diff --git a/xen/arch/arm/platforms/imx8qm.c b/xen/arch/arm/platforms/imx8qm.c
new file mode 100644
index 0000000000..289c18e5f9
--- /dev/null
+++ b/xen/arch/arm/platforms/imx8qm.c
@@ -0,0 +1,44 @@
+/*
+ * xen/arch/arm/platforms/imx8qm.c
+ *
+ * i.MX 8QM setup
+ *
+ * Copyright 2022 NXP
+ *
+ * Peng Fan <peng.fan@nxp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <xen/delay.h>
+#include <xen/mm.h>
+#include <xen/vmap.h>
+#include <asm/io.h>
+#include <asm/platform.h>
+
+static const char * const imx8qm_dt_compat[] __initconst =
+{
+ "fsl,imx8qm",
+ NULL
+};
+
+PLATFORM_START(imx8qm, "i.MX 8")
+ .compatible = imx8qm_dt_compat,
+PLATFORM_END
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
2.30.0
Hi Peng,
On 28/02/2022 01:07, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> xen/arch/arm/Kconfig.debug | 3 +++
> xen/arch/arm/platforms/Makefile | 1 +
> xen/arch/arm/platforms/imx8qm.c | 44 +++++++++++++++++++++++++++++++++
> 3 files changed, 48 insertions(+)
> create mode 100644 xen/arch/arm/platforms/imx8qm.c
>
> diff --git a/xen/arch/arm/Kconfig.debug b/xen/arch/arm/Kconfig.debug
> index 9ecb446b3a..43ccd8fe62 100644
> --- a/xen/arch/arm/Kconfig.debug
> +++ b/xen/arch/arm/Kconfig.debug
> @@ -143,6 +143,9 @@ choice
> config EARLY_PRINTK_HIKEY960
> bool "Early printk with pl011 with Hikey 960"
> select EARLY_UART_PL011
> + config EARLY_PRINTK_IMX8QM
> + bool "Early printk with i.MX LPUART with i.MX8QM"
> + select EARLY_UART_IMX_LPUART
The goal of platform specific early printk is to select to UART address
(see EARLY_UART_BASE_ADDRESS).
However, we have deprecated them. So we should avoid adding new ones.
> config EARLY_PRINTK_JUNO
> bool "Early printk with pl011 on Juno platform"
> select EARLY_UART_PL011
> diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
> index 8632f4115f..bec6e55d1f 100644
> --- a/xen/arch/arm/platforms/Makefile
> +++ b/xen/arch/arm/platforms/Makefile
> @@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o
> obj-$(CONFIG_ALL64_PLAT) += thunderx.o
> obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o
> obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o
> +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o
> obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o
> obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
> diff --git a/xen/arch/arm/platforms/imx8qm.c b/xen/arch/arm/platforms/imx8qm.c
> new file mode 100644
> index 0000000000..289c18e5f9
> --- /dev/null
> +++ b/xen/arch/arm/platforms/imx8qm.c
> @@ -0,0 +1,44 @@
> +/*
> + * xen/arch/arm/platforms/imx8qm.c
> + *
> + * i.MX 8QM setup
> + *
> + * Copyright 2022 NXP
> + *
> + * Peng Fan <peng.fan@nxp.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <xen/delay.h>
> +#include <xen/mm.h>
> +#include <xen/vmap.h>
> +#include <asm/io.h>
> +#include <asm/platform.h>
> +
> +static const char * const imx8qm_dt_compat[] __initconst =
> +{
> + "fsl,imx8qm",
> + NULL
> +};
> +
> +PLATFORM_START(imx8qm, "i.MX 8")
> + .compatible = imx8qm_dt_compat,
> +PLATFORM_END
We are only adding new platform definition when quirks are necessary. Do
you need specific quirks for the i.MX8QM?
A somewhat related question, is this series enough to boot Xen upstream
on the board?
Cheers,
--
Julien Grall
> Subject: Re: [PATCH 3/3] xen/arm: Add i.MX8QM platform support
>
> Hi Peng,
>
> On 28/02/2022 01:07, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> > xen/arch/arm/Kconfig.debug | 3 +++
> > xen/arch/arm/platforms/Makefile | 1 +
> > xen/arch/arm/platforms/imx8qm.c | 44
> +++++++++++++++++++++++++++++++++
> > 3 files changed, 48 insertions(+)
> > create mode 100644 xen/arch/arm/platforms/imx8qm.c
> >
> > diff --git a/xen/arch/arm/Kconfig.debug b/xen/arch/arm/Kconfig.debug
> > index 9ecb446b3a..43ccd8fe62 100644
> > --- a/xen/arch/arm/Kconfig.debug
> > +++ b/xen/arch/arm/Kconfig.debug
> > @@ -143,6 +143,9 @@ choice
> > config EARLY_PRINTK_HIKEY960
> > bool "Early printk with pl011 with Hikey 960"
> > select EARLY_UART_PL011
> > + config EARLY_PRINTK_IMX8QM
> > + bool "Early printk with i.MX LPUART with i.MX8QM"
> > + select EARLY_UART_IMX_LPUART
>
> The goal of platform specific early printk is to select to UART address (see
> EARLY_UART_BASE_ADDRESS).
>
> However, we have deprecated them. So we should avoid adding new ones.
>
> > config EARLY_PRINTK_JUNO
> > bool "Early printk with pl011 on Juno platform"
> > select EARLY_UART_PL011
> > diff --git a/xen/arch/arm/platforms/Makefile
> > b/xen/arch/arm/platforms/Makefile index 8632f4115f..bec6e55d1f 100644
> > --- a/xen/arch/arm/platforms/Makefile
> > +++ b/xen/arch/arm/platforms/Makefile
> > @@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o
> > obj-$(CONFIG_ALL64_PLAT) += thunderx.o
> > obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o
> > obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o
> > +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o
> > obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o
> > obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o diff --git
> > a/xen/arch/arm/platforms/imx8qm.c b/xen/arch/arm/platforms/imx8qm.c
> > new file mode 100644 index 0000000000..289c18e5f9
> > --- /dev/null
> > +++ b/xen/arch/arm/platforms/imx8qm.c
> > @@ -0,0 +1,44 @@
> > +/*
> > + * xen/arch/arm/platforms/imx8qm.c
> > + *
> > + * i.MX 8QM setup
> > + *
> > + * Copyright 2022 NXP
> > + *
> > + * Peng Fan <peng.fan@nxp.com>
> > + *
> > + * This program is free software; you can redistribute it and/or
> > +modify
> > + * it under the terms of the GNU General Public License as published
> > +by
> > + * the Free Software Foundation; either version 2 of the License, or
> > + * (at your option) any later version.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> > + * GNU General Public License for more details.
> > + */
> > +
> > +#include <xen/delay.h>
> > +#include <xen/mm.h>
> > +#include <xen/vmap.h>
> > +#include <asm/io.h>
> > +#include <asm/platform.h>
> > +
> > +static const char * const imx8qm_dt_compat[] __initconst = {
> > + "fsl,imx8qm",
> > + NULL
> > +};
> > +
> > +PLATFORM_START(imx8qm, "i.MX 8")
> > + .compatible = imx8qm_dt_compat,
> > +PLATFORM_END
>
> We are only adding new platform definition when quirks are necessary. Do
> you need specific quirks for the i.MX8QM?
>
> A somewhat related question, is this series enough to boot Xen upstream on
> the board?
Boot xen upstream, no need specific quirk.
Thanks,
Peng.
>
> Cheers,
>
> --
> Julien Grall
Hi Peng,
On 18/03/2022 05:24, Peng Fan wrote:
>> Subject: Re: [PATCH 3/3] xen/arm: Add i.MX8QM platform support
>> On 28/02/2022 01:07, Peng Fan (OSS) wrote:
>>> +static const char * const imx8qm_dt_compat[] __initconst = {
>>> + "fsl,imx8qm",
>>> + NULL
>>> +};
>>> +
>>> +PLATFORM_START(imx8qm, "i.MX 8")
>>> + .compatible = imx8qm_dt_compat,
>>> +PLATFORM_END
>>
>> We are only adding new platform definition when quirks are necessary. Do
>> you need specific quirks for the i.MX8QM?
>>
>> A somewhat related question, is this series enough to boot Xen upstream on
>> the board?
>
> Boot xen upstream, no need specific quirk.
That's great to hear! Then this file should not be necessary at all.
Please drop it.
Cheers,
--
Julien Grall
© 2016 - 2026 Red Hat, Inc.