From 73df2d5c7e981f0a27de02f913e7ad553e11e6ef Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Mon, 6 Feb 2023 16:26:26 +0100
Subject: arcv2: newer Linux kernel use haps_hs and DW uart

---
 target/linux/Config.in.kernelcfg     | 2 +-
 target/linux/Config.in.kernelversion | 1 -
 target/linux/config/Config.in.arc    | 2 +-
 target/linux/config/Config.in.serial | 8 ++++++--
 4 files changed, 8 insertions(+), 5 deletions(-)

(limited to 'target/linux')

diff --git a/target/linux/Config.in.kernelcfg b/target/linux/Config.in.kernelcfg
index 7e04336a8..171e11c0a 100644
--- a/target/linux/Config.in.kernelcfg
+++ b/target/linux/Config.in.kernelcfg
@@ -36,7 +36,7 @@ config ADK_TARGET_LINUX_KERNEL_DEFCONFIG
 	default "imx_v6_v7_defconfig" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
 	default "mvebu_defconfig" if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
 	default "nsim_700_defconfig" if ADK_TARGET_CPU_ARC_ARC700 && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
-	default "nsim_hs_defconfig" if ADK_TARGET_CPU_ARC_ARCHS && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
+	default "haps_hs_defconfig" if ADK_TARGET_CPU_ARC_ARCHS && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
 	default "10m50_defconfig" if ADK_TARGET_SYSTEM_QEMU_NIOS2
 	default "ag101p_defconfig" if ADK_TARGET_SYSTEM_ANDES_AG101P
 	default "bb.org_defconfig" if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
diff --git a/target/linux/Config.in.kernelversion b/target/linux/Config.in.kernelversion
index 5f05f0e18..40d1cc61c 100644
--- a/target/linux/Config.in.kernelversion
+++ b/target/linux/Config.in.kernelversion
@@ -20,7 +20,6 @@ default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_ARCH_FRV
 default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_SYSTEM_ST_STM32F429
 default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_SYSTEM_ST_STM32F769
 default ADK_TARGET_LINUX_KERNEL_VERSION_4_9 if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB
-default ADK_TARGET_LINUX_KERNEL_VERSION_4_19 if ADK_TARGET_ARCH_ARC
 default ADK_TARGET_LINUX_KERNEL_VERSION_5_4 if ADK_TARGET_ARCH_C6X
 default ADK_TARGET_LINUX_KERNEL_VERSION_5_15
 
diff --git a/target/linux/config/Config.in.arc b/target/linux/config/Config.in.arc
index ead549b73..4edd670d0 100644
--- a/target/linux/config/Config.in.arc
+++ b/target/linux/config/Config.in.arc
@@ -20,7 +20,7 @@ config ADK_LINUX_KERNEL_ARC_BUILTIN_DTB_NAME
 	string
 	depends on ADK_TARGET_ARCH_ARC
 	default "hsdk" if ADK_TARGET_CPU_ARC_ARCHS && ADK_TARGET_SYSTEM_SYNOPSYS_HSDK
-	default "nsim_hs" if ADK_TARGET_CPU_ARC_ARCHS && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
+	default "haps_hs" if ADK_TARGET_CPU_ARC_ARCHS && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
 	default "nsim_700" if ADK_TARGET_CPU_ARC_ARC700 && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
 	
 
diff --git a/target/linux/config/Config.in.serial b/target/linux/config/Config.in.serial
index d9f904184..e23b040e1 100644
--- a/target/linux/config/Config.in.serial
+++ b/target/linux/config/Config.in.serial
@@ -90,6 +90,8 @@ config ADK_LINUX_KERNEL_SERIAL_BFIN
 config ADK_LINUX_KERNEL_SERIAL_8250
 	bool "8250 serial driver"
 	select ADK_LINUX_KERNEL_SERIAL_8250_CONSOLE
+	select ADK_LINUX_KERNEL_SERIAL_OF_PLATFORM if ADK_TARGET_CPU_ARC_ARCHS && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
+	select ADK_LINUX_KERNEL_SERIAL_8250_DW if ADK_TARGET_CPU_ARC_ARCHS && ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
 	select ADK_LINUX_KERNEL_SERIAL_OF_PLATFORM if ADK_TARGET_SYSTEM_XILINX_KINTEX7 \
 						|| ADK_TARGET_SYSTEM_IMGTEC_CI20 \
 						|| ADK_TARGET_SYSTEM_QEMU_CSKY \
@@ -140,6 +142,7 @@ config ADK_LINUX_KERNEL_SERIAL_8250
 		|| ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG \
 		|| ADK_TARGET_SYSTEM_ORANGE_PI0 \
 		|| ADK_TARGET_SYSTEM_SYNOPSYS_HSDK \
+		|| ADK_TARGET_CPU_ARC_ARCHS \
 		|| ADK_TARGET_SYSTEM_SOM_C6745 \
 		|| ADK_TARGET_SYSTEM_ROCKPI4_PLUS
 	default y if ADK_TARGET_SYSTEM_XILINX_KINTEX7
@@ -171,6 +174,7 @@ config ADK_LINUX_KERNEL_SERIAL_8250
 	default y if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
 	default y if ADK_TARGET_SYSTEM_ORANGE_PI0
 	default y if ADK_TARGET_SYSTEM_SYNOPSYS_HSDK
+	default y if ADK_TARGET_CPU_ARC_ARCHS
 	default y if ADK_TARGET_SYSTEM_SOM_C6745
 	default y if ADK_TARGET_SYSTEM_ROCKPI4_PLUS
 	default n
@@ -208,8 +212,8 @@ config ADK_LINUX_KERNEL_SERIAL_ETRAXFS
 config ADK_LINUX_KERNEL_SERIAL_ARC
 	bool "ARC serial driver"
 	select ADK_LINUX_KERNEL_SERIAL_ARC_CONSOLE
-	depends on ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
-	default y if ADK_TARGET_SYSTEM_SYNOPSYS_NSIM
+	depends on ADK_TARGET_SYSTEM_SYNOPSYS_NSIM && ADK_TARGET_CPU_ARC_ARC700
+	default y if ADK_TARGET_SYSTEM_SYNOPSYS_NSIM && ADK_TARGET_CPU_ARC_ARC700
 	default n
 	help
 	  Serial driver for nSIM ARC simulator.
-- 
cgit v1.2.3