From a765a2178cae2e39b7384149486b819cedf87603 Mon Sep 17 00:00:00 2001
From: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
Date: Tue, 28 May 2019 10:21:10 -0700
Subject: [PATCH] at91:renaming subtraget legacy to sam9x

renaming subtraget legacy to sam9x for adding new sam9 soc's

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
---
 package/boot/uboot-at91/Makefile                   | 4 ++--
 target/linux/at91/Makefile                         | 5 +++--
 target/linux/at91/image/Makefile                   | 4 ++--
 target/linux/at91/image/{legacy.mk => sam9x.mk}    | 1 -
 target/linux/at91/legacy/target.mk                 | 7 -------
 target/linux/at91/{legacy => sam9x}/config-default | 0
 target/linux/at91/sam9x/target.mk                  | 7 +++++++
 7 files changed, 14 insertions(+), 14 deletions(-)
 rename target/linux/at91/image/{legacy.mk => sam9x.mk} (99%)
 delete mode 100644 target/linux/at91/legacy/target.mk
 rename target/linux/at91/{legacy => sam9x}/config-default (100%)
 create mode 100644 target/linux/at91/sam9x/target.mk

diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 23bd2d2b01..a3262b5cd4 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -26,13 +26,13 @@ endef
 
 define U-Boot/at91sam9m10g45ek_nandflash
   NAME:=AT91SAM9M10G45-EK board (NandFlash)
-  BUILD_SUBTARGET:=legacy
+  BUILD_SUBTARGET:=sam9x
   BUILD_DEVICES:=at91sam9m10g45ek
 endef
 
 define U-Boot/at91sam9x5ek_nandflash
   NAME:=AT91SAM9X5-EK board (NandFlash)
-  BUILD_SUBTARGET:=legacy
+  BUILD_SUBTARGET:=sam9x
   BUILD_DEVICES:=at91sam9g15ek at91sam9g25ek \
                  at91sam9g35ek at91sam9x25ek \
 				 at91sam9x35ek
diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index 4dc70ebac1..6c1ba11c55 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -8,10 +8,11 @@ include $(TOPDIR)/rules.mk
 
 ARCH:=arm
 BOARD:=at91
-MAINTAINER:=Claudio Mignanti <c.mignanti@gmail.com>
+MAINTAINER:=Claudio Mignanti <c.mignanti@gmail.com> \
+   Sandeep Sheriker <sandeep.sheriker@gmail.com>
 BOARDNAME:=Microchip (Atmel AT91)
 FEATURES:=ext4 squashfs targz usb usbgadget ubifs
-SUBTARGETS:=sama5 legacy
+SUBTARGETS:=sama5 sam9x
 
 KERNEL_PATCHVER:=4.14
 
diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile
index f4d942b682..e4c17e3a3c 100644
--- a/target/linux/at91/image/Makefile
+++ b/target/linux/at91/image/Makefile
@@ -13,8 +13,8 @@ define Build/at91-install-zImage
     $(CP) $(KDIR)/zImage $@
 endef
 
-ifeq ($(SUBTARGET),legacy)
-include ./legacy.mk
+ifeq ($(SUBTARGET),sam9x)
+include ./sam9x.mk
 endif
 ifeq ($(SUBTARGET),sama5)
 include ./sama5.mk
diff --git a/target/linux/at91/image/legacy.mk b/target/linux/at91/image/sam9x.mk
similarity index 99%
rename from target/linux/at91/image/legacy.mk
rename to target/linux/at91/image/sam9x.mk
index ae3c163d94..3aada4c72b 100644
--- a/target/linux/at91/image/legacy.mk
+++ b/target/linux/at91/image/sam9x.mk
@@ -130,4 +130,3 @@ define Device/wb45n
   MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955
 endef
 TARGET_DEVICES += wb45n
-
diff --git a/target/linux/at91/legacy/target.mk b/target/linux/at91/legacy/target.mk
deleted file mode 100644
index a3d99bbfb2..0000000000
--- a/target/linux/at91/legacy/target.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-BOARDNAME:=Legacy (ARMv5)
-CPU_TYPE:=arm926ej-s
-
-define Target/Description
-	Build generic firmware for legacy Atmel AT91 platforms
-	using the ARMv5 instruction set.
-endef
diff --git a/target/linux/at91/legacy/config-default b/target/linux/at91/sam9x/config-default
similarity index 100%
rename from target/linux/at91/legacy/config-default
rename to target/linux/at91/sam9x/config-default
diff --git a/target/linux/at91/sam9x/target.mk b/target/linux/at91/sam9x/target.mk
new file mode 100644
index 0000000000..f6da7c003c
--- /dev/null
+++ b/target/linux/at91/sam9x/target.mk
@@ -0,0 +1,7 @@
+BOARDNAME:= SAM9X Boards (ARMv5)
+CPU_TYPE:=arm926ej-s
+
+define Target/Description
+	Build generic firmware for Microchip AT91 SAM9x platforms
+	using the ARMv5 instruction set.
+endef
-- 
2.30.2