[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] xen/arm: Add i.MX8QM platform support


  • To: sstabellini@xxxxxxxxxx, julien@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, bertrand.marquis@xxxxxxx
  • From: "Peng Fan (OSS)" <peng.fan@xxxxxxxxxxx>
  • Date: Mon, 28 Feb 2022 09:07:11 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FsCR7rC+1KKOTplUp+q9rcVTXAyb/TEnoFHsWncVriA=; b=BgNBqjQlhlmHN9e1DrRznU27RVV0fCMo501/Ww+YjhsahoPpHDTSS/vMpXJk4szKQM0ovjZKBMq2PhBo3gSLwKkswJ8996QhIgX8I17vFD8S3ZlWtytvAz/6HS/4GhcZ7wGKjEZGmHMVtCbY+N8YG0FtSuOLxG3KJBjA/7wVPgH9zb0V+getUq2k90ZrQ/tLOJKNUWcQkrTCXv2/RYpsxEFeF5i2kXSjcZdx1FrUc4cgFYAYDl3CdjdBrPsgBw0Om3/WjFB0BOiBZjGqAedVXx7bLDvEx+70nEeGgMrd5j1jRnhtIQeQb0T3y5T/wXv98n7ALd6BV5Z1uqbg7KFMlQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kCH+/SIbWCm2C9FOwOeomig7vCKzcsAQ6VIhYK2b9zhhrFO3/Bb1PICUl0arGYD/TeLUcW++7gGcVwBiA3Jy/aNnAiCGXHkmhM7qaSY60G6ZwYXTCLaeT3WFGCbJGusBbXm2Wvr8ar6n0ALDWEDatuOnFC6d9qxL+5lVuIk7dZ0xAkliarjaf1RTV5Qi7p+hAJpFa+uhVL433ugjGBYeaMETnWxrKH5RDB/ds9Fh8rf3cVPg0SU0Xjrb8uNRDEnmFhfQBRJEDG6kAE8Jo52aJKSLraQixJALC8KOfuftazcBudH+oQuRzGOZAwimYuP+cQhbt6Mk4OPAZ9Jy+YyPYg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, george.dunlap@xxxxxxxxxx, jbeulich@xxxxxxxx, wl@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, van.freenix@xxxxxxxxx, Peng Fan <peng.fan@xxxxxxx>
  • Delivery-date: Mon, 28 Feb 2022 05:12:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Peng Fan <peng.fan@xxxxxxx>

Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
 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@xxxxxxx>
+ *
+ * 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.