Skip to contentSkip to conversation

ARM: atmel: add sama5d4ek board support

PATCH New Bo Shen 3 participants 9 messages Nov 10, 2014 – Nov 20, 2014

Subsystems (5)
lore
Share & tools
lore

Bo Shen

author
#0 lore raw

v4 cover ARM: atmel: add sama5d4ek board support

This patch series add sama5d4ek board support which supports following features:
- Boot media support: NAND flash/SD card/SPI flash
- Support LCD display
- Support ethernet
- Support USB mass storage

Changes in v4:
- rebase to the mainline master (11ada92)
- Select CPU_V7 in Kconfig.
- Drop CONFIG_ARMV7 in board head file.
Series-changes: 3
- Rewrite the h32mxdiv related code according to Andreas's suggestion.
Series-changes: 2
- Add sama5d4_devices.c to hold soc related code (e.g: get_cpu_name)
- rewrite the clock with H32MXDIV

Changes in v2:
- rewrite the gf table build function by Josh.

Bo Shen (2):
net: macb: enable GMAC IP without GE feature support
ARM: atmel: add sama5d4ek board support

Josh Wu (1):
mtd: atmel_nand: runtime to build gf table for pmecc

 arch/arm/Kconfig                          |   5 +
 arch/arm/cpu/armv7/at91/Makefile          |   1 +
 arch/arm/cpu/armv7/at91/sama5d4_devices.c |  30 +++
 arch/arm/cpu/armv7/at91/timer.c           |   3 +-
 arch/arm/include/asm/arch-at91/at91_pmc.h |   8 +-
 arch/arm/include/asm/arch-at91/clk.h      |  48 ++++-
 arch/arm/include/asm/arch-at91/hardware.h |   2 +
 arch/arm/include/asm/arch-at91/sama5d4.h  | 206 +++++++++++++++++++
 board/atmel/sama5d4ek/Kconfig             |  18 ++
 board/atmel/sama5d4ek/MAINTAINERS         |   8 +
 board/atmel/sama5d4ek/Makefile            |   8 +
 board/atmel/sama5d4ek/sama5d4ek.c         | 317 ++++++++++++++++++++++++++++++
 configs/sama5d4ek_mmc_defconfig           |   3 +
 configs/sama5d4ek_nandflash_defconfig     |   3 +
 configs/sama5d4ek_spiflash_defconfig      |   3 +
 drivers/mtd/nand/atmel_nand.c             |  75 ++++++-
 drivers/mtd/nand/atmel_nand_ecc.h         |   4 +
 drivers/net/macb.c                        |   8 +-
 include/configs/sama5d4ek.h               | 214 ++++++++++++++++++++
 19 files changed, 953 insertions(+), 11 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/at91/sama5d4_devices.c
 create mode 100644 arch/arm/include/asm/arch-at91/sama5d4.h
 create mode 100644 board/atmel/sama5d4ek/Kconfig
 create mode 100644 board/atmel/sama5d4ek/MAINTAINERS
 create mode 100644 board/atmel/sama5d4ek/Makefile
 create mode 100644 board/atmel/sama5d4ek/sama5d4ek.c
 create mode 100644 configs/sama5d4ek_mmc_defconfig
 create mode 100644 configs/sama5d4ek_nandflash_defconfig
 create mode 100644 configs/sama5d4ek_spiflash_defconfig
 create mode 100644 include/configs/sama5d4ek.h
Signature · 1 line
2.1.0.24.g4109c28
author
#1 lore raw

PATCH v4 1/3 mtd: atmel_nand: runtime to build gf table for pmecc

From: Josh Wu <[email protected]>

As in SAMA5D4 SoC, the gf table in ROM code can not be seen. So, when we try to use PMECC, we need to build it when do initialization.
Add a macro NO_GALOIS_TABLE_IN_ROM in soc header file. If it is defined we will build gf table runtime.

The PMECC use the BCH algorithm, so based on the build_gf_tables() function in lib/bch.c, we can build the Galois Field lookup table.

---

Changes in v4: None
Changes in v2:
- rewrite the gf table build function by Josh.

 drivers/mtd/nand/atmel_nand.c     | 75 ++++++++++++++++++++++++++++++++++++++-
 drivers/mtd/nand/atmel_nand_ecc.h |  4 +++
 2 files changed, 78 insertions(+), 1 deletion(-)
drivers/mtd/nand/atmel_nand.c +74 -1
index 9114a86..20fcecb 100644
@@ -762,6 +762,62 @@ static int pmecc_choose_ecc(struct atmel_nand_host *host,
 }
 #endif
 
+#if defined(NO_GALOIS_TABLE_IN_ROM)
+static uint16_t *pmecc_galois_table;
+static inline int deg(unsigned int poly)
+{
+	/* polynomial degree is the most-significant bit index */
+	return fls(poly) - 1;
+}
+
+static int build_gf_tables(int mm, unsigned int poly,
+			   int16_t *index_of, int16_t *alpha_to)
+{
+	unsigned int i, x = 1;
+	const unsigned int k = 1 << deg(poly);
+	unsigned int nn = (1 << mm) - 1;
+
+	/* primitive polynomial must be of degree m */
+	if (k != (1u << mm))
+		return -EINVAL;
+
+	for (i = 0; i < nn; i++) {
+		alpha_to[i] = x;
+		index_of[x] = i;
+		if (i && (x == 1))
+			/* polynomial is not primitive (a^i=1 with 0<i<2^m-1) */
+			return -EINVAL;
+		x <<= 1;
+		if (x & k)
+			x ^= poly;
+	}
+
+	alpha_to[nn] = 1;
+	index_of[0] = 0;
+
+	return 0;
+}
+
+static uint16_t *create_lookup_table(int sector_size)
+{
+	int degree = (sector_size == 512) ?
+			PMECC_GF_DIMENSION_13 :
+			PMECC_GF_DIMENSION_14;
+	unsigned int poly = (sector_size == 512) ?
+			PMECC_GF_13_PRIMITIVE_POLY :
+			PMECC_GF_14_PRIMITIVE_POLY;
+	int table_size = (sector_size == 512) ?
+			PMECC_INDEX_TABLE_SIZE_512 :
+			PMECC_INDEX_TABLE_SIZE_1024;
+
+	int16_t *addr = kzalloc(2 * table_size * sizeof(uint16_t), GFP_KERNEL);
+	if (addr && build_gf_tables(degree, poly, addr, addr + table_size))
+		return NULL;
+
+	return (uint16_t *)addr;
+}
+#endif
+
 static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
 		struct mtd_info *mtd)
 {
@@ -809,11 +865,18 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
 	sector_size = host->pmecc_sector_size;
 
 	/* TODO: need check whether cap & sector_size is validate */
-
+#if defined(NO_GALOIS_TABLE_IN_ROM)
+	/*
+	 * As pmecc_rom_base is the begin of the gallois field table, So the
+	 * index offset just set as 0.
+	 */
+	host->pmecc_index_table_offset = 0;
+#else
 	if (host->pmecc_sector_size == 512)
 		host->pmecc_index_table_offset = ATMEL_PMECC_INDEX_OFFSET_512;
 	else
 		host->pmecc_index_table_offset = ATMEL_PMECC_INDEX_OFFSET_1024;
+#endif
 
 	MTDDEBUG(MTD_DEBUG_LEVEL1,
 		"Initialize PMECC params, cap: %d, sector: %d\n",
@@ -822,7 +885,17 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
 	host->pmecc = (struct pmecc_regs __iomem *) ATMEL_BASE_PMECC;
 	host->pmerrloc = (struct pmecc_errloc_regs __iomem *)
 			ATMEL_BASE_PMERRLOC;
+#if defined(NO_GALOIS_TABLE_IN_ROM)
+	pmecc_galois_table = create_lookup_table(host->pmecc_sector_size);
+	if (!pmecc_galois_table) {
+		dev_err(host->dev, "out of memory\n");
+		return -ENOMEM;
+	}
+
+	host->pmecc_rom_base = (void __iomem *)pmecc_galois_table;
+#else
 	host->pmecc_rom_base = (void __iomem *) ATMEL_BASE_ROM;
+#endif
 
 	/* ECC is calculated for the whole page (1 step) */
 	nand->ecc.size = mtd->writesize;
drivers/mtd/nand/atmel_nand_ecc.h +4 -0
index 92d4ec5..eac860d 100644
@@ -141,6 +141,10 @@ struct pmecc_errloc_regs {
 #define PMECC_GF_DIMENSION_13			13
 #define PMECC_GF_DIMENSION_14			14
 
+/* Primitive Polynomial used by PMECC */
+#define PMECC_GF_13_PRIMITIVE_POLY		0x201b
+#define PMECC_GF_14_PRIMITIVE_POLY		0x4443
+
 #define PMECC_INDEX_TABLE_SIZE_512		0x2000
 #define PMECC_INDEX_TABLE_SIZE_1024		0x4000
 
Signature · 1 line
2.1.0.24.g4109c28
#2 lore raw

PATCH v4 1/3 mtd: atmel_nand: runtime to build gf table for pmecc

Dear Bo Shen,

Quoted 15 lines · Bo Shen

From: Josh Wu <[email protected]>

As in SAMA5D4 SoC, the gf table in ROM code can not be seen. So, when we try to use PMECC, we need to build it when do initialization.
Add a macro NO_GALOIS_TABLE_IN_ROM in soc header file. If it is defined we will build gf table runtime.

The PMECC use the BCH algorithm, so based on the build_gf_tables() function in lib/bch.c, we can build the Galois Field lookup table.

---

Quoted 7 lines

Changes in v4: None
Changes in v2:
- rewrite the gf table build function by Josh.

drivers/mtd/nand/atmel_nand.c | 75 ++++++++++++++++++++++++++++++++++++++-
drivers/mtd/nand/atmel_nand_ecc.h | 4 +++

2 files changed, 78 insertions(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bie?mann

author
#3 lore raw

PATCH v4 2/3 net: macb: enable GMAC IP without GE feature support

In reply to Bo Shen

The User Register in GMAC IP is used to select interface type. When with GE feature, it is used to select interface between RGMII and GMII. If without GE feature, it is used to select interface between MII and RMII.

---

Changes in v4: None
Changes in v2: None

 drivers/net/macb.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/macb.c +7 -1
index 375c8a4..6d48252 100644
@@ -565,7 +565,13 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
 	macb_writel(macb, TBQP, macb->tx_ring_dma);
 
 	if (macb_is_gem(macb)) {
-#ifdef CONFIG_RGMII
+		/*
+		 * When the GMAC IP with GE feature, this bit is used to
+		 * select interface between RGMII and GMII.
+		 * When the GMAC IP without GE feature, this bit is used
+		 * to select interface between RMII and MII.
+		 */
+#if defined(CONFIG_RGMII) || defined(CONFIG_RMII)
 		gem_writel(macb, UR, GEM_BIT(RGMII));
 #else
 		gem_writel(macb, UR, 0);
Signature · 1 line
2.1.0.24.g4109c28
#4 lore raw

PATCH v4 2/3 net: macb: enable GMAC IP without GE feature support

Dear Bo Shen,

Quoted 5 lines · Bo Shen

The User Register in GMAC IP is used to select interface type. When with GE feature, it is used to select interface between RGMII and GMII. If without GE feature, it is used to select interface between MII and RMII.

Quoted 8 lines

---

Changes in v4: None
Changes in v2: None

drivers/net/macb.c | 8 +++++++-

1 file changed, 7 insertions(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bie?mann

author
#5 lore raw

PATCH v4 3/3 ARM: atmel: add sama5d4ek board support

In reply to Bo Shen

The code for this board supports following features:
- Boot media support: NAND flash/SD card/SPI flash
- Support LCD display
- Support ethernet
- Support USB mass storage

---

Changes in v4:
- rebase to the mainline master (11ada92)
- Select CPU_V7 in Kconfig.
- Drop CONFIG_ARMV7 in board head file.
Series-changes: 3
- Rewrite the h32mxdiv related code according to Andreas's suggestion.
Series-changes: 2
- Add sama5d4_devices.c to hold soc related code (e.g: get_cpu_name)
- rewrite the clock with H32MXDIV

Changes in v2: None

 arch/arm/Kconfig                          |   5 +
 arch/arm/cpu/armv7/at91/Makefile          |   1 +
 arch/arm/cpu/armv7/at91/sama5d4_devices.c |  30 +++
 arch/arm/cpu/armv7/at91/timer.c           |   3 +-
 arch/arm/include/asm/arch-at91/at91_pmc.h |   8 +-
 arch/arm/include/asm/arch-at91/clk.h      |  48 ++++-
 arch/arm/include/asm/arch-at91/hardware.h |   2 +
 arch/arm/include/asm/arch-at91/sama5d4.h  | 206 +++++++++++++++++++
 board/atmel/sama5d4ek/Kconfig             |  18 ++
 board/atmel/sama5d4ek/MAINTAINERS         |   8 +
 board/atmel/sama5d4ek/Makefile            |   8 +
 board/atmel/sama5d4ek/sama5d4ek.c         | 317 ++++++++++++++++++++++++++++++
 configs/sama5d4ek_mmc_defconfig           |   3 +
 configs/sama5d4ek_nandflash_defconfig     |   3 +
 configs/sama5d4ek_spiflash_defconfig      |   3 +
 include/configs/sama5d4ek.h               | 214 ++++++++++++++++++++
 16 files changed, 868 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/at91/sama5d4_devices.c
 create mode 100644 arch/arm/include/asm/arch-at91/sama5d4.h
 create mode 100644 board/atmel/sama5d4ek/Kconfig
 create mode 100644 board/atmel/sama5d4ek/MAINTAINERS
 create mode 100644 board/atmel/sama5d4ek/Makefile
 create mode 100644 board/atmel/sama5d4ek/sama5d4ek.c
 create mode 100644 configs/sama5d4ek_mmc_defconfig
 create mode 100644 configs/sama5d4ek_nandflash_defconfig
 create mode 100644 configs/sama5d4ek_spiflash_defconfig
 create mode 100644 include/configs/sama5d4ek.h
arch/arm/Kconfig +5 -0
index 22eb2d5..1bcd440 100644
@@ -504,6 +504,10 @@ config TARGET_SAMA5D3XEK
 	select CPU_V7
 	select SUPPORT_SPL
 
+config TARGET_SAMA5D4EK
+	bool "Support sama5d4ek"
+	select CPU_V7
+
 config TARGET_BCM28155_AP
 	bool "Support bcm28155_ap"
 	select CPU_V7
@@ -835,6 +839,7 @@ source "board/atmel/at91sam9rlek/Kconfig"
 source "board/atmel/at91sam9x5ek/Kconfig"
 source "board/atmel/sama5d3_xplained/Kconfig"
 source "board/atmel/sama5d3xek/Kconfig"
+source "board/atmel/sama5d4ek/Kconfig"
 source "board/bachmann/ot1200/Kconfig"
 source "board/balloon3/Kconfig"
 source "board/barco/titanium/Kconfig"
arch/arm/cpu/armv7/at91/Makefile +1 -0
index 0a2e48d..f4f35a4 100644
@@ -9,6 +9,7 @@
 #
 
 obj-$(CONFIG_SAMA5D3)	+= sama5d3_devices.o
+obj-$(CONFIG_SAMA5D4)	+= sama5d4_devices.o
 obj-y += clock.o
 obj-y += cpu.o
 obj-y += reset.o
arch/arm/cpu/armv7/at91/sama5d4_devices.c new file +30 -0
new file mode 100644
index 0000000..2708097
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2014 Atmel
+ *		      Bo Shen <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/sama5d4.h>
+
+char *get_cpu_name()
+{
+	unsigned int extension_id = get_extension_chip_id();
+
+	if (cpu_is_sama5d4())
+		switch (extension_id) {
+		case ARCH_EXID_SAMA5D41:
+			return "SAMA5D41";
+		case ARCH_EXID_SAMA5D42:
+			return "SAMA5D42";
+		case ARCH_EXID_SAMA5D43:
+			return "SAMA5D43";
+		case ARCH_EXID_SAMA5D44:
+			return "SAMA5D44";
+		default:
+			return "Unknown CPU type";
+		}
+	else
+		return "Unknown CPU type";
+}
arch/arm/cpu/armv7/at91/timer.c +2 -1
index e3ebfe0..19bf80b 100644
@@ -65,7 +65,8 @@ int timer_init(void)
 	/* Enable PITC */
 	writel(TIMER_LOAD_VAL | AT91_PIT_MR_EN , &pit->mr);
 
-	gd->arch.timer_rate_hz = gd->arch.mck_rate_hz / 16;
+	gd->arch.timer_rate_hz = get_pit_clk_rate() / 16;
+
 	gd->arch.tbu = 0;
 	gd->arch.tbl = 0;
 
arch/arm/include/asm/arch-at91/at91_pmc.h +5 -3
index 27331ff..7c1578c 100644
@@ -78,7 +78,7 @@ typedef struct at91_pmc {
 #define AT91_PMC_PLLXR_DIV(x)		(x & 0xFF)
 #define AT91_PMC_PLLXR_PLLCOUNT(x)	((x & 0x3F) << 8)
 #define AT91_PMC_PLLXR_OUT(x)		((x & 0x03) << 14)
-#ifdef CONFIG_SAMA5D3
+#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4)
 #define AT91_PMC_PLLXR_MUL(x)		((x & 0x7F) << 18)
 #else
 #define AT91_PMC_PLLXR_MUL(x)		((x & 0x7FF) << 16)
@@ -97,7 +97,7 @@ typedef struct at91_pmc {
 #define AT91_PMC_MCKR_CSS_PLLB		0x00000003
 #define AT91_PMC_MCKR_CSS_MASK		0x00000003
 
-#ifdef CONFIG_SAMA5D3
+#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4)
 #define AT91_PMC_MCKR_PRES_1		0x00000000
 #define AT91_PMC_MCKR_PRES_2		0x00000010
 #define AT91_PMC_MCKR_PRES_4		0x00000020
@@ -126,7 +126,7 @@ typedef struct at91_pmc {
 #else
 #define AT91_PMC_MCKR_MDIV_1		0x00000000
 #define AT91_PMC_MCKR_MDIV_2		0x00000100
-#ifdef CONFIG_SAMA5D3
+#if defined(CONFIG_SAMA5D3) || defined(CONFIG_SAMA5D4)
 #define AT91_PMC_MCKR_MDIV_3		0x00000300
 #endif
 #define AT91_PMC_MCKR_MDIV_4		0x00000200
@@ -136,6 +136,8 @@ typedef struct at91_pmc {
 #define AT91_PMC_MCKR_PLLADIV_1		0x00000000
 #define AT91_PMC_MCKR_PLLADIV_2		0x00001000
 
+#define AT91_PMC_MCKR_H32MXDIV		0x01000000
+
 #define AT91_PMC_IXR_MOSCS		0x00000001
 #define AT91_PMC_IXR_LOCKA		0x00000002
 #define AT91_PMC_IXR_LOCKB		0x00000004
arch/arm/include/asm/arch-at91/clk.h +43 -5

80 lines not on this page · raw message

arch/arm/include/asm/arch-at91/hardware.h +2 -0
index d712a0d..bf0a1bd 100644
@@ -27,6 +27,8 @@
 # include <asm/arch/at91cap9.h>
 #elif defined(CONFIG_SAMA5D3)
 # include <asm/arch/sama5d3.h>
+#elif defined(CONFIG_SAMA5D4)
+# include <asm/arch/sama5d4.h>
 #else
 # error "Unsupported AT91 processor"
 #endif
arch/arm/include/asm/arch-at91/sama5d4.h new file +206 -0

206 lines not on this page · raw message

board/atmel/sama5d4ek/Kconfig new file +18 -0
new file mode 100644
index 0000000..a889895
@@ -0,0 +1,18 @@
+if TARGET_SAMA5D4EK
+
+config SYS_CPU
+	default "armv7"
+
+config SYS_BOARD
+	default "sama5d4ek"
+
+config SYS_VENDOR
+	default "atmel"
+
+config SYS_SOC
+	default "at91"
+
+config SYS_CONFIG_NAME
+	default "sama5d4ek"
+
+endif
board/atmel/sama5d4ek/MAINTAINERS new file +8 -0
new file mode 100644
index 0000000..afe88dd
@@ -0,0 +1,8 @@
+SAMA5D4EK BOARD
+M:	Bo Shen <[email protected]>
+S:	Maintained
+F:	board/atmel/sama5d4ek/
+F:	include/configs/sama5d4ek.h
+F:	configs/sama5d4ek_mmc_defconfig
+F:	configs/sama5d4ek_nandflash_defconfig
+F:	configs/sama5d4ek_spiflash_defconfig
board/atmel/sama5d4ek/Makefile new file +8 -0
new file mode 100644
index 0000000..55823ba
@@ -0,0 +1,8 @@
+#
+# Copyright (C) 2014 Atmel
+#		     Bo Shen <[email protected]>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y += sama5d4ek.o
board/atmel/sama5d4ek/sama5d4ek.c new file +317 -0

317 lines not on this page · raw message

configs/sama5d4ek_mmc_defconfig new file +3 -0
new file mode 100644
index 0000000..16a5ed7
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y
configs/sama5d4ek_nandflash_defconfig new file +3 -0
new file mode 100644
index 0000000..8b7fbc3
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y
configs/sama5d4ek_spiflash_defconfig new file +3 -0
new file mode 100644
index 0000000..63e9b6c
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y
include/configs/sama5d4ek.h new file +214 -0

214 lines not on this page · raw message

Signature · 1 line
2.1.0.24.g4109c28
#6 lore raw

PATCH v4 3/3 ARM: atmel: add sama5d4ek board support

Dear Bo Shen,

Quoted 38 lines · Bo Shen

The code for this board supports following features:
- Boot media support: NAND flash/SD card/SPI flash
- Support LCD display
- Support ethernet
- Support USB mass storage

---

Changes in v4:
- rebase to the mainline master (11ada92)
- Select CPU_V7 in Kconfig.
- Drop CONFIG_ARMV7 in board head file.
Series-changes: 3
- Rewrite the h32mxdiv related code according to Andreas's suggestion.
Series-changes: 2
- Add sama5d4_devices.c to hold soc related code (e.g: get_cpu_name)
- rewrite the clock with H32MXDIV

Changes in v2: None

arch/arm/Kconfig                          |   5 +
arch/arm/cpu/armv7/at91/Makefile          |   1 +
arch/arm/cpu/armv7/at91/sama5d4_devices.c |  30 +++
arch/arm/cpu/armv7/at91/timer.c           |   3 +-
arch/arm/include/asm/arch-at91/at91_pmc.h |   8 +-
arch/arm/include/asm/arch-at91/clk.h      |  48 ++++-
arch/arm/include/asm/arch-at91/hardware.h |   2 +
arch/arm/include/asm/arch-at91/sama5d4.h  | 206 +++++++++++++++++++
board/atmel/sama5d4ek/Kconfig             |  18 ++
board/atmel/sama5d4ek/MAINTAINERS         |   8 +
board/atmel/sama5d4ek/Makefile            |   8 +
board/atmel/sama5d4ek/sama5d4ek.c         | 317 ++++++++++++++++++++++++++++++
configs/sama5d4ek_mmc_defconfig           |   3 +
configs/sama5d4ek_nandflash_defconfig     |   3 +
configs/sama5d4ek_spiflash_defconfig      |   3 +
include/configs/sama5d4ek.h               | 214 ++++++++++++++++++++
16 files changed, 868 insertions(+), 9 deletions(-)
Quoted 10 lines

create mode 100644 arch/arm/cpu/armv7/at91/sama5d4_devices.c create mode 100644 arch/arm/include/asm/arch-at91/sama5d4.h create mode 100644 board/atmel/sama5d4ek/Kconfig create mode 100644 board/atmel/sama5d4ek/MAINTAINERS create mode 100644 board/atmel/sama5d4ek/Makefile create mode 100644 board/atmel/sama5d4ek/sama5d4ek.c create mode 100644 configs/sama5d4ek_mmc_defconfig create mode 100644 configs/sama5d4ek_nandflash_defconfig create mode 100644 configs/sama5d4ek_spiflash_defconfig create mode 100644 include/configs/sama5d4ek.h

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bie?mann

#7 lore raw

PATCH v4 3/3 ARM: atmel: add sama5d4ek board support

In reply to Bo Shen

Hi Bo,

Quoted 24 lines · On Mon, 10 Nov 2014 15:24:02 +0800 Bo Shen <[email protected]> wrote:
configs/sama5d4ek_mmc_defconfig new file +3 -0
new file mode 100644
index 0000000..16a5ed7
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y
configs/sama5d4ek_nandflash_defconfig new file +3 -0
new file mode 100644
index 0000000..8b7fbc3
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y
configs/sama5d4ek_spiflash_defconfig new file +0 -0
new file mode 100644
index 0000000..63e9b6c

configs/sama5d4ek_spiflash_defconfig line 3

Quoted 3 lines
configs/sama5d4ek_spiflash_defconfig new file +3 -0
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y

These three defconfigs added "+S" prefix to CONFIG_ARM and CONFIG_TARGET_SAMA5D4EK but did not define CONFIG_SPL=y

My question is do they support SPL, or not?

Best Regards
Masahiro Yamada

author
#8 lore raw

PATCH v4 3/3 ARM: atmel: add sama5d4ek board support

Hi Masahiro,

Quoted 38 lines · Masahiro Yamada

Hi Bo,

Quoted 24 lines · On Mon, 10 Nov 2014 15:24:02 +0800 Bo Shen <[email protected]> wrote:
configs/sama5d4ek_mmc_defconfig new file +3 -0
new file mode 100644
index 0000000..16a5ed7
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y
configs/sama5d4ek_nandflash_defconfig new file +3 -0
new file mode 100644
index 0000000..8b7fbc3
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y
configs/sama5d4ek_spiflash_defconfig new file +0 -0
new file mode 100644
index 0000000..63e9b6c

configs/sama5d4ek_spiflash_defconfig line 3

Quoted 3 lines
configs/sama5d4ek_spiflash_defconfig new file +3 -0
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SAMA5D4EK=y

These three defconfigs added "+S" prefix to CONFIG_ARM and CONFIG_TARGET_SAMA5D4EK but did not define CONFIG_SPL=y

Quoted 1 line

My question is do they support SPL, or not?

The code applied now won't support SPL. I am preparing the SPL code, will send it soon.

Quoted 5 lines

Best Regards
Masahiro Yamada

Best Regards,
Bo Shen