openwrt/target/linux/layerscape/patches-4.4/3007-armv8-aarch32-Run-32-b...

80 lines
2.4 KiB
Diff

From 3a827762e11670ca815bd4ee305f5faf5f02acb9 Mon Sep 17 00:00:00 2001
From: Alison Wang <b18965@freescale.com>
Date: Tue, 17 May 2016 17:23:51 +0800
Subject: [PATCH 07/70] armv8: aarch32: Run 32-bit Linux in AArch32 execution
state
This patch adds AArch32 execution state support for LS1043A. Verified
32-bit Linux kernel can run on LS1043ARDB board.
Signed-off-by: Ebony Zhu <ebony.zhu@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
---
arch/arm/mach-imx/Kconfig | 10 ++++++++++
arch/arm/mach-imx/Makefile | 4 +++-
arch/arm/mach-imx/mach-ls1043a.c | 21 +++++++++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/mach-imx/mach-ls1043a.c
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -612,6 +612,16 @@ endchoice
endif
+config ARCH_LAYERSCAPE
+ bool "Freescale Layerscape SoC support"
+ select ARM_GIC
+ select HAVE_ARM_ARCH_TIMER
+ select PCI_LAYERSCAPE if PCI
+ select LS1_MSI if PCI_MSI
+
+ help
+ This enables support for Freescale Layerscape SoC family.
+
source "arch/arm/mach-imx/devices/Kconfig"
endif
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -75,7 +75,7 @@ obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.
obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
obj-$(CONFIG_HAVE_IMX_SRC) += src.o
-ifneq ($(CONFIG_SOC_IMX6)$(CONFIG_SOC_LS1021A),)
+ifneq ($(CONFIG_SOC_IMX6)$(CONFIG_SOC_LS1021A)$(CONFIG_ARCH_LAYERSCAPE),)
AFLAGS_headsmp.o :=-Wa,-march=armv7-a
obj-$(CONFIG_SMP) += headsmp.o platsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
@@ -101,4 +101,6 @@ obj-$(CONFIG_SOC_VF610) += mach-vf610.o
obj-$(CONFIG_SOC_LS1021A) += mach-ls1021a.o
+obj-$(CONFIG_ARCH_LAYERSCAPE) += mach-ls1043a.o
+
obj-y += devices/
--- /dev/null
+++ b/arch/arm/mach-imx/mach-ls1043a.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2015-2016 Freescale Semiconductor, Inc.
+ *
+ * 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.
+ */
+
+#include <asm/mach/arch.h>
+
+#include "common.h"
+
+static const char * const ls1043a_dt_compat[] __initconst = {
+ "fsl,ls1043a",
+ NULL,
+};
+
+DT_MACHINE_START(LS1043A, "Freescale LS1043A")
+ .dt_compat = ls1043a_dt_compat,
+MACHINE_END