From 9e4da84a950d018ba84aa61efdc7a96f669871b8 Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Wed, 27 Jul 2022 12:58:04 +0200
Subject: [PATCH] arch/csky: drop architecture

We currently have no internal and no external toolchain for csky.
The website is down (no https:// available, and the http:// index
page is 404).

This commit removes the architecture entry; remnants will be dropped in
followup changes.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Guo Ren <ren_guo@c-sky.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 Config.in.legacy    |  7 ++++++
 DEVELOPERS          |  1 -
 arch/Config.in      | 14 ------------
 arch/Config.in.csky | 52 ---------------------------------------------
 arch/arch.mk.csky   | 26 -----------------------
 5 files changed, 7 insertions(+), 93 deletions(-)
 delete mode 100644 arch/Config.in.csky
 delete mode 100644 arch/arch.mk.csky

diff --git a/Config.in.legacy b/Config.in.legacy
index 949bca1cd0..24b4236ade 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2022.08"
 
+config BR2_csky
+	bool "csky architecture removed"
+	select BR2_LEGACY
+	help
+	  The csky architecture was removed, by lack of toolchain
+	  support.
+
 config BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
 	bool "mesa DRI i915 driver removed"
 	select BR2_LEGACY
diff --git a/DEVELOPERS b/DEVELOPERS
index 6d6f25affd..700533dbf7 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1186,7 +1186,6 @@ F:	support/testing/tests/package/sample_python_pybind.py
 F:	support/testing/tests/package/test_python_pybind.py
 
 N:	Guo Ren <ren_guo@c-sky.com>
-F:	arch/Config.in.csky
 F:	board/csky/
 F:	configs/csky_*
 
diff --git a/arch/Config.in b/arch/Config.in
index 1d38c7a065..1c0c400a98 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -70,16 +70,6 @@ config BR2_aarch64_be
 	  http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
 	  http://en.wikipedia.org/wiki/ARM
 
-config BR2_csky
-	bool "csky"
-	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
-	select BR2_USE_MMU
-	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
-	help
-	  csky is processor IP from china.
-	  http://www.c-sky.com/
-	  http://www.github.com/c-sky
-
 config BR2_i386
 	bool "i386"
 	select BR2_USE_MMU
@@ -376,10 +366,6 @@ if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_aarch64_be
 source "arch/Config.in.arm"
 endif
 
-if BR2_csky
-source "arch/Config.in.csky"
-endif
-
 if BR2_m68k
 source "arch/Config.in.m68k"
 endif
diff --git a/arch/Config.in.csky b/arch/Config.in.csky
deleted file mode 100644
index b20b39e225..0000000000
--- a/arch/Config.in.csky
+++ /dev/null
@@ -1,52 +0,0 @@
-choice
-	prompt "Target Architecture Variant"
-	default BR2_ck610
-	help
-	  Specific CPU variant to use
-
-config BR2_ck610
-	# Not supported by upstream gcc <= 9, and handled as a special
-	# exception in package/gcc/Config.in.host
-	bool "ck610"
-
-config BR2_ck807
-	bool "ck807"
-
-config BR2_ck810
-	bool "ck810"
-
-config BR2_ck860
-	bool "ck860"
-
-endchoice
-
-config BR2_CSKY_FPU
-	bool "Enable FPU coprocessor"
-	depends on BR2_ck810 || BR2_ck807 || BR2_ck860
-	help
-	  You can say N here if your C-SKY CPU doesn't have a
-	  Floating-Point Coprocessor or if you don't need FPU support
-	  for your user-space programs.
-
-config BR2_CSKY_VDSP
-	bool "Enable VDSP enhanced instructions Co-processor"
-	depends on BR2_CSKY_FPU
-
-config BR2_GCC_TARGET_FLOAT_ABI
-	default "soft"		if !BR2_CSKY_FPU
-	default "hard"		if BR2_CSKY_FPU
-
-config BR2_ARCH
-	default "csky"
-
-config BR2_NORMALIZED_ARCH
-	default "csky"
-
-config BR2_ENDIAN
-	default "LITTLE"
-
-config BR2_READELF_ARCH_NAME
-	default "CSKY"
-
-# vim: ft=kconfig
-# -*- mode:kconfig; -*-
diff --git a/arch/arch.mk.csky b/arch/arch.mk.csky
deleted file mode 100644
index fb59ae22fd..0000000000
--- a/arch/arch.mk.csky
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Configure the GCC_TARGET_ARCH variable and append the
-# appropriate C-SKY ISA extensions.
-#
-
-ifeq ($(BR2_csky),y)
-
-ifeq ($(BR2_ck610),y)
-GCC_TARGET_CPU := ck610
-else ifeq ($(BR2_ck807),y)
-GCC_TARGET_CPU := ck807
-else ifeq ($(BR2_ck810),y)
-GCC_TARGET_CPU := ck810
-else ifeq ($(BR2_ck860),y)
-GCC_TARGET_CPU := ck860
-endif
-
-ifeq ($(BR2_CSKY_FPU),y)
-GCC_TARGET_CPU := $(GCC_TARGET_CPU)f
-endif
-
-ifeq ($(BR2_CSKY_VDSP),y)
-GCC_TARGET_CPU := $(GCC_TARGET_CPU)v
-endif
-
-endif