arm: Remove ethernut5 board

As per the maintainers at egnite GmbH, they are no longer interested in
supporting this board. Go and remove the platform here. Furthermore,
this is the only AT91SAM9XE platform in-tree so remove supporting code
for that as well.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 64007a2..56d4af5 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -987,8 +987,6 @@
 dtb-$(CONFIG_TARGET_GARDENA_SMART_GATEWAY_AT91SAM) += \
 	at91sam9g25-gardena-smart-gateway.dtb
 
-dtb-$(CONFIG_TARGET_ETHERNUT5) += ethernut5.dtb
-
 dtb-$(CONFIG_TARGET_USB_A9263) += usb_a9263.dtb
 
 dtb-$(CONFIG_TARGET_DEVKIT8000) += omap3-devkit8000.dtb
diff --git a/arch/arm/dts/at91sam9xe.dtsi b/arch/arm/dts/at91sam9xe.dtsi
deleted file mode 100644
index 0278f63..0000000
--- a/arch/arm/dts/at91sam9xe.dtsi
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * at91sam9xe.dtsi - Device Tree Include file for AT91SAM9XE family SoC
- *
- *  Copyright (C) 2015 Atmel,
- *                2015 Alexandre Belloni <alexandre.Belloni@free-electrons.com>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file 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 file 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.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#include "at91sam9260.dtsi"
-
-/ {
-	model = "Atmel AT91SAM9XE family SoC";
-	compatible = "atmel,at91sam9xe", "atmel,at91sam9260";
-
-	sram0: sram@002ff000 {
-		status = "disabled";
-	};
-
-	sram1: sram@00300000 {
-		compatible = "mmio-sram";
-		reg = <0x00300000 0x4000>;
-	};
-};
diff --git a/arch/arm/dts/ethernut5.dts b/arch/arm/dts/ethernut5.dts
deleted file mode 100644
index 5c24dea..0000000
--- a/arch/arm/dts/ethernut5.dts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * ethernut5.dts - Device Tree file for Ethernut 5 board
- *
- * Copyright (C) 2012 egnite GmbH <info@egnite.de>
- *
- * Licensed under GPLv2.
- */
-/dts-v1/;
-#include "at91sam9xe.dtsi"
-
-/ {
-	model = "Ethernut 5";
-	compatible = "egnite,ethernut5", "atmel,at91sam9260", "atmel,at91sam9";
-
-	chosen {
-		bootargs = "console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2";
-	};
-
-	memory {
-		reg = <0x20000000 0x08000000>;
-	};
-
-	clocks {
-		slow_xtal {
-			clock-frequency = <32768>;
-		};
-
-		main_xtal {
-			clock-frequency = <18432000>;
-		};
-	};
-
-	ahb {
-		apb {
-			dbgu: serial@fffff200 {
-				status = "okay";
-			};
-
-			usart0: serial@fffb0000 {
-				status = "okay";
-			};
-
-			usart1: serial@fffb4000 {
-				status = "okay";
-			};
-
-			macb0: ethernet@fffc4000 {
-				phy-mode = "rmii";
-				status = "okay";
-			};
-
-			usb1: gadget@fffa4000 {
-				atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
-				status = "okay";
-			};
-		};
-
-		nand0: nand@40000000 {
-			nand-bus-width = <8>;
-			nand-ecc-mode = "soft";
-			nand-on-flash-bbt;
-			status = "okay";
-
-			gpios = <0
-				 &pioC 14 GPIO_ACTIVE_HIGH
-				 0
-				>;
-
-			root@0 {
-				label = "root";
-				reg = <0x0 0x08000000>;
-			};
-
-			data@20000 {
-				label = "data";
-				reg = <0x08000000 0x38000000>;
-			};
-		};
-
-		usb0: ohci@00500000 {
-			num-ports = <2>;
-			status = "okay";
-		};
-	};
-
-	i2c-gpio-0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		status = "okay";
-
-		pcf8563@50 {
-			compatible = "nxp,pcf8563";
-			reg = <0x51>;
-		};
-	};
-};
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 8a8ac53..7c4ccc4 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -11,10 +11,6 @@
 	bool
 	select CPU_ARM926EJS
 
-config AT91SAM9XE
-	bool
-	select CPU_ARM926EJS
-
 config AT91SAM9261
 	bool
 	select CPU_ARM926EJS
@@ -75,10 +71,6 @@
 	select AT91SAM9260
 	select BOARD_EARLY_INIT_F
 
-config TARGET_ETHERNUT5
-	bool "Ethernut5 board"
-	select AT91SAM9XE
-
 config TARGET_GURNARD
 	bool "Support gurnard"
 	select AT91SAM9G45
@@ -340,21 +332,6 @@
 config SYS_SOC
 	default "at91"
 
-config AT91_EFLASH
-	bool "Support AT91 flash driver"
-	depends on AT91SAM9XE
-	select USE_SYS_MAX_FLASH_BANKS
-	help
-	  Enable the driver for the embedded flash used in the Atmel
-	  AT91SAM9XE devices.
-
-config EFLASH_PROTSECTORS
-	int "Number of flash sectors to protect from erasing"
-	depends on AT91_EFLASH
-	help
-	  If non-zero, this will be the number of sectors of the flash to disallow
-	  U-Boot to ease, starting from the beginning of flash.
-
 config AT91_GPIO_PULLUP
 	bool "Keep pullups on peripheral pins"
 	depends on CPU_ARM926EJS
@@ -389,7 +366,6 @@
 source "board/bluewater/gurnard/Kconfig"
 source "board/calao/usb_a9263/Kconfig"
 source "board/conclusive/kstr-sama5d27/Kconfig"
-source "board/egnite/ethernut5/Kconfig"
 source "board/esd/meesc/Kconfig"
 source "board/gardena/smart-gateway-at91sam/Kconfig"
 source "board/l+g/vinco/Kconfig"
diff --git a/arch/arm/mach-at91/arm926ejs/Makefile b/arch/arm/mach-at91/arm926ejs/Makefile
index 902dd3a..a891686 100644
--- a/arch/arm/mach-at91/arm926ejs/Makefile
+++ b/arch/arm/mach-at91/arm926ejs/Makefile
@@ -5,7 +5,6 @@
 
 obj-$(CONFIG_AT91SAM9260)	+= at91sam9260_devices.o
 obj-$(CONFIG_AT91SAM9G20)	+= at91sam9260_devices.o
-obj-$(CONFIG_AT91SAM9XE)	+= at91sam9260_devices.o
 obj-$(CONFIG_AT91SAM9261)	+= at91sam9261_devices.o
 obj-$(CONFIG_AT91SAM9G10)	+= at91sam9261_devices.o
 obj-$(CONFIG_AT91SAM9263)	+= at91sam9263_devices.o
@@ -15,7 +14,6 @@
 obj-$(CONFIG_AT91SAM9N12)	+= at91sam9n12_devices.o
 obj-$(CONFIG_AT91SAM9X5)	+= at91sam9x5_devices.o
 obj-$(CONFIG_SAM9X60)		+= sam9x60_devices.o
-obj-$(CONFIG_AT91_EFLASH)	+= eflash.o
 obj-y += clock.o
 obj-y += cpu.o
 ifndef CONFIG_$(SPL_TPL_)SYSRESET
diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
deleted file mode 100644
index bb66700..0000000
--- a/arch/arm/mach-at91/arm926ejs/eflash.c
+++ /dev/null
@@ -1,255 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2010
- * Reinhard Meyer, EMK Elektronik, reinhard.meyer@emk-elektronik.de
- */
-
-/*
- * this driver supports the enhanced embedded flash in the Atmel
- * AT91SAM9XE devices with the following geometry:
- *
- * AT91SAM9XE128: 1 plane of  8 regions of 32 pages (total  256 pages)
- * AT91SAM9XE256: 1 plane of 16 regions of 32 pages (total  512 pages)
- * AT91SAM9XE512: 1 plane of 32 regions of 32 pages (total 1024 pages)
- * (the exact geometry is read from the flash at runtime, so any
- *  future devices should already be covered)
- *
- * Regions can be write/erase protected.
- * Whole (!) pages can be individually written with erase on the fly.
- * Writing partial pages will corrupt the rest of the page.
- *
- * The flash is presented to u-boot with each region being a sector,
- * having the following effects:
- * Each sector can be hardware protected (protect on/off).
- * Each page in a sector can be rewritten anytime.
- * Since pages are erased when written, the "erase" does nothing.
- * The first "CONFIG_EFLASH_PROTSECTORS" cannot be unprotected
- * by u-Boot commands.
- *
- * Note: Redundant environment will not work in this flash since
- * it does use partial page writes. Make sure the environment spans
- * whole pages!
- */
-
-/*
- * optional TODOs (nice to have features):
- *
- * make the driver coexist with other NOR flash drivers
- *	(use an index into flash_info[], requires work
- *	in those other drivers, too)
- * Make the erase command fill the sectors with 0xff
- *	(if the flashes grow larger in the future and
- *	someone puts a jffs2 into them)
- * do a read-modify-write for partially programmed pages
- */
-#include <display_options.h>
-#include <flash.h>
-#include <log.h>
-#include <asm/io.h>
-#include <asm/arch/hardware.h>
-#include <asm/arch/at91_common.h>
-#include <asm/arch/at91_eefc.h>
-#include <asm/arch/at91_dbu.h>
-
-/* checks to detect configuration errors */
-#if CONFIG_SYS_MAX_FLASH_BANKS!=1
-#error eflash: this driver can only handle 1 bank
-#endif
-
-/* global structure */
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
-static u32 pagesize;
-
-unsigned long flash_init(void)
-{
-	at91_eefc_t *eefc = (at91_eefc_t *) ATMEL_BASE_EEFC;
-	at91_dbu_t *dbu = (at91_dbu_t *) ATMEL_BASE_DBGU;
-	u32 id, size, nplanes, planesize, nlocks;
-	u32 addr, i, tmp=0;
-
-	debug("eflash: init\n");
-
-	flash_info[0].flash_id = FLASH_UNKNOWN;
-
-	/* check if its an AT91ARM9XE SoC */
-	if ((readl(&dbu->cidr) & AT91_DBU_CID_ARCH_MASK) != AT91_DBU_CID_ARCH_9XExx) {
-		puts("eflash: not an AT91SAM9XE\n");
-		return 0;
-	}
-
-	/* now query the eflash for its structure */
-	writel(AT91_EEFC_FCR_KEY | AT91_EEFC_FCR_FCMD_GETD, &eefc->fcr);
-	while ((readl(&eefc->fsr) & AT91_EEFC_FSR_FRDY) == 0)
-		;
-	id = readl(&eefc->frr);		/* word 0 */
-	size = readl(&eefc->frr);	/* word 1 */
-	pagesize = readl(&eefc->frr);	/* word 2 */
-	nplanes = readl(&eefc->frr);	/* word 3 */
-	planesize = readl(&eefc->frr);	/* word 4 */
-	debug("id=%08x size=%u pagesize=%u planes=%u planesize=%u\n",
-		id, size, pagesize, nplanes, planesize);
-	for (i=1; i<nplanes; i++) {
-		tmp = readl(&eefc->frr);	/* words 5..4+nplanes-1 */
-	};
-	nlocks = readl(&eefc->frr);	/* word 4+nplanes */
-	debug("nlocks=%u\n", nlocks);
-	/* since we are going to use the lock regions as sectors, check count */
-	if (nlocks > CONFIG_SYS_MAX_FLASH_SECT) {
-		printf("eflash: number of lock regions(%u) "\
-			"> CONFIG_SYS_MAX_FLASH_SECT. reducing...\n",
-			nlocks);
-		nlocks = CONFIG_SYS_MAX_FLASH_SECT;
-	}
-	flash_info[0].size = size;
-	flash_info[0].sector_count = nlocks;
-	flash_info[0].flash_id = id;
-
-	addr = ATMEL_BASE_FLASH;
-	for (i=0; i<nlocks; i++) {
-		tmp = readl(&eefc->frr);	/* words 4+nplanes+1.. */
-		flash_info[0].start[i] = addr;
-		flash_info[0].protect[i] = 0;
-		addr += tmp;
-	};
-
-	/* now read the protection information for all regions */
-	writel(AT91_EEFC_FCR_KEY | AT91_EEFC_FCR_FCMD_GLB, &eefc->fcr);
-	while ((readl(&eefc->fsr) & AT91_EEFC_FSR_FRDY) == 0)
-		;
-	for (i=0; i<flash_info[0].sector_count; i++) {
-		if (i%32 == 0)
-			tmp = readl(&eefc->frr);
-		flash_info[0].protect[i] = (tmp >> (i%32)) & 1;
-#if CONFIG_VAL(EFLASH_PROTSECTORS)
-		if (i < CONFIG_EFLASH_PROTSECTORS)
-			flash_info[0].protect[i] = 1;
-#endif
-	}
-
-	return size;
-}
-
-void flash_print_info(flash_info_t *info)
-{
-	int i;
-
-	puts("AT91SAM9XE embedded flash\n  Size: ");
-	print_size(info->size, " in ");
-	printf("%d Sectors\n", info->sector_count);
-
-	printf("  Sector Start Addresses:");
-	for (i=0; i<info->sector_count; ++i) {
-		if ((i % 5) == 0)
-			printf("\n   ");
-		printf(" %08lX%s",
-			info->start[i],
-			info->protect[i] ? " (RO)" : "     "
-		);
-	}
-	printf ("\n");
-	return;
-}
-
-int flash_real_protect (flash_info_t *info, long sector, int prot)
-{
-	at91_eefc_t *eefc = (at91_eefc_t *) ATMEL_BASE_EEFC;
-	u32 pagenum = (info->start[sector]-ATMEL_BASE_FLASH)/pagesize;
-	u32 i, tmp=0;
-
-	debug("protect sector=%ld prot=%d\n", sector, prot);
-
-#if CONFIG_VAL(EFLASH_PROTSECTORS)
-	if (sector < CONFIG_EFLASH_PROTSECTORS) {
-		if (!prot) {
-			printf("eflash: sector %lu cannot be unprotected\n",
-				sector);
-		}
-		return 1; /* return anyway, caller does not care for result */
-	}
-#endif
-	if (prot) {
-		writel(AT91_EEFC_FCR_KEY | AT91_EEFC_FCR_FCMD_SLB |
-			(pagenum << AT91_EEFC_FCR_FARG_SHIFT), &eefc->fcr);
-	} else {
-		writel(AT91_EEFC_FCR_KEY | AT91_EEFC_FCR_FCMD_CLB |
-			(pagenum << AT91_EEFC_FCR_FARG_SHIFT), &eefc->fcr);
-	}
-	while ((readl(&eefc->fsr) & AT91_EEFC_FSR_FRDY) == 0)
-		;
-	/* now re-read the protection information for all regions */
-	writel(AT91_EEFC_FCR_KEY | AT91_EEFC_FCR_FCMD_GLB, &eefc->fcr);
-	while ((readl(&eefc->fsr) & AT91_EEFC_FSR_FRDY) == 0)
-		;
-	for (i=0; i<info->sector_count; i++) {
-		if (i%32 == 0)
-			tmp = readl(&eefc->frr);
-		info->protect[i] = (tmp >> (i%32)) & 1;
-	}
-	return 0;
-}
-
-static u32 erase_write_page (u32 pagenum)
-{
-	at91_eefc_t *eefc = (at91_eefc_t *) ATMEL_BASE_EEFC;
-
-	debug("erase+write page=%u\n", pagenum);
-
-	/* give erase and write page command */
-	writel(AT91_EEFC_FCR_KEY | AT91_EEFC_FCR_FCMD_EWP |
-		(pagenum << AT91_EEFC_FCR_FARG_SHIFT), &eefc->fcr);
-	while ((readl(&eefc->fsr) & AT91_EEFC_FSR_FRDY) == 0)
-		;
-	/* return status */
-	return readl(&eefc->fsr)
-		& (AT91_EEFC_FSR_FCMDE | AT91_EEFC_FSR_FLOCKE);
-}
-
-int flash_erase(flash_info_t *info, int s_first, int s_last)
-{
-	debug("erase first=%d last=%d\n", s_first, s_last);
-	puts("this flash does not need and support erasing!\n");
-	return 0;
-}
-
-/*
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- */
-
-int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-	u32 pagenum;
-	u32 *src32, *dst32;
-	u32 i;
-
-	debug("write src=%08lx addr=%08lx cnt=%lx\n",
-		(ulong)src, addr, cnt);
-
-	/* REQUIRE addr to be on a page start, abort if not */
-	if (addr % pagesize) {
-		printf ("eflash: start %08lx is not on page start\n"\
-			"        write aborted\n", addr);
-		return 1;
-	}
-
-	/* now start copying data */
-	pagenum = (addr-ATMEL_BASE_FLASH)/pagesize;
-	src32 = (u32 *) src;
-	dst32 = (u32 *) addr;
-	while (cnt > 0) {
-		i = pagesize / 4;
-		/* fill page buffer */
-		while (i--)
-			*dst32++ = *src32++;
-		/* write page */
-		if (erase_write_page(pagenum))
-			return 1;
-		pagenum++;
-		if (cnt > pagesize)
-			cnt -= pagesize;
-		else
-			cnt = 0;
-	}
-	return 0;
-}
diff --git a/arch/arm/mach-at91/include/mach/at91_dbu.h b/arch/arm/mach-at91/include/mach/at91_dbu.h
deleted file mode 100644
index 91bb686..0000000
--- a/arch/arm/mach-at91/include/mach/at91_dbu.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2010
- * Reinhard Meyer, reinhard.meyer@emk-elektronik.de
- *
- * Debug Unit
- * Based on AT91SAM9XE datasheet
- */
-
-#ifndef AT91_DBU_H
-#define AT91_DBU_H
-
-#ifndef __ASSEMBLY__
-
-typedef struct at91_dbu {
-	u32	cr;	/* Control Register WO */
-	u32	mr;	/* Mode Register  RW */
-	u32	ier;	/* Interrupt Enable Register WO */
-	u32	idr;	/* Interrupt Disable Register WO */
-	u32	imr;	/* Interrupt Mask Register RO */
-	u32	sr;	/* Status Register RO */
-	u32	rhr;	/* Receive Holding Register RO */
-	u32	thr;	/* Transmit Holding Register WO */
-	u32	brgr;	/* Baud Rate Generator Register RW */
-	u32	res1[7];/* 0x0024 - 0x003C Reserved */
-	u32	cidr;	/* Chip ID Register RO */
-	u32	exid;	/* Chip ID Extension Register RO */
-	u32	fnr;	/* Force NTRST Register RW */
-} at91_dbu_t;
-
-#endif /* __ASSEMBLY__ */
-
-#define AT91_DBU_CID_ARCH_MASK		0x0ff00000
-#define AT91_DBU_CID_ARCH_9xx		0x01900000
-#define AT91_DBU_CID_ARCH_9XExx	0x02900000
-
-#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_eefc.h b/arch/arm/mach-at91/include/mach/at91_eefc.h
deleted file mode 100644
index e7bb2bf..0000000
--- a/arch/arm/mach-at91/include/mach/at91_eefc.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2010
- * Reinhard Meyer, reinhard.meyer@emk-elektronik.de
- *
- * Enhanced Embedded Flash Controller
- * Based on AT91SAM9XE datasheet
- */
-
-#ifndef AT91_EEFC_H
-#define AT91_EEFC_H
-
-#ifndef __ASSEMBLY__
-
-typedef struct at91_eefc {
-	u32	fmr;	/* Flash Mode Register RW */
-	u32	fcr;	/* Flash Command Register WO */
-	u32	fsr;	/* Flash Status Register RO */
-	u32	frr;	/* Flash Result Register RO */
-} at91_eefc_t;
-
-#endif /* __ASSEMBLY__ */
-
-#define AT91_EEFC_FMR_FWS_MASK	0x00000f00
-#define AT91_EEFC_FMR_FRDY_BIT	0x00000001
-
-#define AT91_EEFC_FCR_KEY		0x5a000000
-#define AT91_EEFC_FCR_FARG_MASK	0x00ffff00
-#define AT91_EEFC_FCR_FARG_SHIFT	8
-#define AT91_EEFC_FCR_FCMD_GETD	0x0
-#define AT91_EEFC_FCR_FCMD_WP		0x1
-#define AT91_EEFC_FCR_FCMD_WPL		0x2
-#define AT91_EEFC_FCR_FCMD_EWP		0x3
-#define AT91_EEFC_FCR_FCMD_EWPL	0x4
-#define AT91_EEFC_FCR_FCMD_EA		0x5
-#define AT91_EEFC_FCR_FCMD_SLB		0x8
-#define AT91_EEFC_FCR_FCMD_CLB		0x9
-#define AT91_EEFC_FCR_FCMD_GLB		0xA
-#define AT91_EEFC_FCR_FCMD_SGPB	0xB
-#define AT91_EEFC_FCR_FCMD_CGPB	0xC
-#define AT91_EEFC_FCR_FCMD_GGPB	0xD
-
-#define AT91_EEFC_FSR_FRDY	1
-#define AT91_EEFC_FSR_FCMDE	2
-#define AT91_EEFC_FSR_FLOCKE	4
-
-#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 103db26..bdd46ee 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -7,7 +7,7 @@
  * Reinhard Meyer, EMK Elektronik, reinhard.meyer@emk-elektronik.de
  *
  * Definitions for the SoCs:
- * AT91SAM9260, AT91SAM9G20, AT91SAM9XE
+ * AT91SAM9260, AT91SAM9G20
  *
  * Note that those SoCs are mostly software and pin compatible,
  * therefore this file applies to all of them. Differences between
@@ -142,15 +142,7 @@
 /*
  * SoC specific defines
  */
-#if defined(CONFIG_AT91SAM9XE)
-# define ATMEL_CPU_NAME		"AT91SAM9XE"
-# define ATMEL_ID_TWI1		25	/* TWI 1 */
-# define ATMEL_BASE_FLASH	0x00200000	/* Internal FLASH */
-# define ATMEL_BASE_SRAM	0x00300000	/* Internal SRAM */
-# define ATMEL_BASE_TWI1	0xfffd8000
-# define ATMEL_BASE_EEFC	0xfffffa00
-# define ATMEL_BASE_GPBR	0xfffffd60
-#elif defined(CONFIG_AT91SAM9260)
+#if defined(CONFIG_AT91SAM9260)
 # define ATMEL_CPU_NAME		"AT91SAM9260"
 # define ATMEL_ID_USART5	25	/* USART 5 */
 # define ATMEL_BASE_SRAM0	0x00200000	/* Internal SRAM 0 */
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
index 0a16c8f..988ef49 100644
--- a/arch/arm/mach-at91/include/mach/hardware.h
+++ b/arch/arm/mach-at91/include/mach/hardware.h
@@ -9,8 +9,7 @@
 
 #if defined(CONFIG_AT91RM9200)
 # include <asm/arch/at91rm9200.h>
-#elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20) || \
-	defined(CONFIG_AT91SAM9XE)
+#elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
 # include <asm/arch/at91sam9260.h>
 #elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9G10)
 # include <asm/arch/at91sam9261.h>