Skip to contentSkip to conversation

Add support for Eukrea CPU9260/CPU9G20 SBC

PATCH New Eric Benard 3 participants 4 messages Sep 5, 2009 – Sep 22, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for Eukrea CPU9260/CPU9G20 SBC

these boards are built around Atmel's AT91SAM9260/9G20 and have up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND and include a 10/100 Ethernet PHY in RMII mode.

---
 MAINTAINERS                        |    5 +
 MAKEALL                            |    2 +
 Makefile                           |    8 +
 board/eukrea/cpu9260/Makefile      |   59 +++++
 board/eukrea/cpu9260/config.mk     |    1 +
 board/eukrea/cpu9260/cpu9260.c     |  218 +++++++++++++++++
 board/eukrea/cpu9260/led.c         |  153 ++++++++++++
 cpu/arm926ejs/at91/lowlevel_init.S |    3 +-
 include/configs/cpu9260.h          |  453 ++++++++++++++++++++++++++++++++++++
 9 files changed, 901 insertions(+), 1 deletions(-)
 create mode 100644 board/eukrea/cpu9260/Makefile
 create mode 100644 board/eukrea/cpu9260/config.mk
 create mode 100644 board/eukrea/cpu9260/cpu9260.c
 create mode 100644 board/eukrea/cpu9260/led.c
 create mode 100644 include/configs/cpu9260.h
MAINTAINERS +5 -0
index d674753..4b961b1 100644
@@ -525,6 +525,11 @@ Dirk Behme <[email protected]>
 
 	omap3_beagle	ARM CORTEX-A8 (OMAP3530 SoC)
 
+Eric Benard <[email protected]>
+
+	cpu9260	ARM926EJS (AT91SAM9260 SoC)
+	cpu9G20	ARM926EJS (AT91SAM9G20 SoC)
+
 Rishi Bhattacharya <[email protected]>
 
 	omap5912osk	ARM926EJS
MAKEALL +2 -0
index 85f99ef..7a438f7 100755
@@ -605,6 +605,8 @@ LIST_at91="			\
 	at91sam9m10g45ek	\
 	at91sam9rlek		\
 	cmc_pu2			\
+	CPU9260			\
+	CPU9G20			\
 	csb637			\
 	kb9202			\
 	meesc			\
Makefile +8 -0
index dd01b66..1d1ded4 100644
@@ -2863,6 +2863,14 @@ at91sam9rlek_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
+CPU9G20_128M_config \
+CPU9G20_config \
+CPU9260_128M_config \
+CPU9260_config	:	unconfig
+	@mkdir -p $(obj)include
+	@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
+	@$(MKCONFIG) -a cpu9260 arm arm926ejs cpu9260 eukrea at91
+
 meesc_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
 
board/eukrea/cpu9260/Makefile new file +59 -0

59 lines not on this page · raw message

board/eukrea/cpu9260/config.mk new file +1 -0
new file mode 100644
index 0000000..9ce161e
@@ -0,0 +1 @@
+TEXT_BASE = 0x21f00000
board/eukrea/cpu9260/cpu9260.c new file +218 -0

218 lines not on this page · raw message

board/eukrea/cpu9260/led.c new file +153 -0

153 lines not on this page · raw message

cpu/arm926ejs/at91/lowlevel_init.S +2 -1
index 9962ae9..f11ebc6 100644
@@ -194,7 +194,8 @@ SMRDATA:
 	.word CONFIG_SYS_PIOD_PPUDR_VAL
 	.word (AT91_BASE_SYS + AT91_PIOD + PIO_ASR)
 	.word CONFIG_SYS_PIOD_PPUDR_VAL
-#elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9261)
+#elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9261) \
+	|| defined(CONFIG_AT91SAM9G20)
 	.word (AT91_BASE_SYS + AT91_PIOC + PIO_PDR)
 	.word CONFIG_SYS_PIOC_PDR_VAL1
 	.word (AT91_BASE_SYS + AT91_PIOC + PIO_PUDR)
include/configs/cpu9260.h new file +453 -0

453 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 Add support for Eukrea CPU9260/CPU9G20 SBC

Quoted 5 lines · Eric Benard

these boards are built around Atmel's AT91SAM9260/9G20 and have up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND and include a 10/100 Ethernet PHY in RMII mode.

Quoted 17 lines
---
 MAINTAINERS                        |    5 +
 MAKEALL                            |    2 +
 Makefile                           |    8 +
 board/eukrea/cpu9260/Makefile      |   59 +++++
 board/eukrea/cpu9260/config.mk     |    1 +
 board/eukrea/cpu9260/cpu9260.c     |  218 +++++++++++++++++
 board/eukrea/cpu9260/led.c         |  153 ++++++++++++
 cpu/arm926ejs/at91/lowlevel_init.S |    3 +-
 include/configs/cpu9260.h          |  453 ++++++++++++++++++++++++++++++++++++
 9 files changed, 901 insertions(+), 1 deletions(-)
 create mode 100644 board/eukrea/cpu9260/Makefile
 create mode 100644 board/eukrea/cpu9260/config.mk
 create mode 100644 board/eukrea/cpu9260/cpu9260.c
 create mode 100644 board/eukrea/cpu9260/led.c
 create mode 100644 include/configs/cpu9260.h

it's looks fine

Best Regards,
J.

#2 lore raw

PATCH 1/1 Add support for Eukrea CPU9260/CPU9G20 SBC

Hi Jean-Christophe,

Jean-Christophe PLAGNIOL-VILLARD a ?crit :

Quoted 23 lines · Eric Benard
Quoted 5 lines

these boards are built around Atmel's AT91SAM9260/9G20 and have up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND and include a 10/100 Ethernet PHY in RMII mode.

Quoted 17 lines
---
 MAINTAINERS                        |    5 +
 MAKEALL                            |    2 +
 Makefile                           |    8 +
 board/eukrea/cpu9260/Makefile      |   59 +++++
 board/eukrea/cpu9260/config.mk     |    1 +
 board/eukrea/cpu9260/cpu9260.c     |  218 +++++++++++++++++
 board/eukrea/cpu9260/led.c         |  153 ++++++++++++
 cpu/arm926ejs/at91/lowlevel_init.S |    3 +-
 include/configs/cpu9260.h          |  453 ++++++++++++++++++++++++++++++++++++
 9 files changed, 901 insertions(+), 1 deletions(-)
 create mode 100644 board/eukrea/cpu9260/Makefile
 create mode 100644 board/eukrea/cpu9260/config.mk
 create mode 100644 board/eukrea/cpu9260/cpu9260.c
 create mode 100644 board/eukrea/cpu9260/led.c
 create mode 100644 include/configs/cpu9260.h
Quoted 2 lines

it's looks fine

do you plan to merge it or should I fix anything ?

Thanks,
Eric

#3 lore raw

PATCH 1/1 Add support for Eukrea CPU9260/CPU9G20 SBC

In reply to Eric Benard

Dear Eric Benard,

Quoted 21 lines · In message <[email protected]> you wrote:

these boards are built around Atmel's AT91SAM9260/9G20 and have up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND and include a 10/100 Ethernet PHY in RMII mode.

---
 MAINTAINERS                        |    5 +
 MAKEALL                            |    2 +
 Makefile                           |    8 +
 board/eukrea/cpu9260/Makefile      |   59 +++++
 board/eukrea/cpu9260/config.mk     |    1 +
 board/eukrea/cpu9260/cpu9260.c     |  218 +++++++++++++++++
 board/eukrea/cpu9260/led.c         |  153 ++++++++++++
 cpu/arm926ejs/at91/lowlevel_init.S |    3 +-
 include/configs/cpu9260.h          |  453 ++++++++++++++++++++++++++++++++++++
 9 files changed, 901 insertions(+), 1 deletions(-)
 create mode 100644 board/eukrea/cpu9260/Makefile
 create mode 100644 board/eukrea/cpu9260/config.mk
 create mode 100644 board/eukrea/cpu9260/cpu9260.c
 create mode 100644 board/eukrea/cpu9260/led.c
 create mode 100644 include/configs/cpu9260.h

...

Quoted 7 lines

index dd01b66..1d1ded4 100644

Makefile +0 -0
@@ -2863,6 +2863,14 @@ at91sam9rlek_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 

Makefile at91sam9rlek_config : unconfig · line 2875

Quoted 10 lines
Makefile +8 -0
+CPU9G20_128M_config \
+CPU9G20_config \
+CPU9260_128M_config \
+CPU9260_config	:	unconfig
+	@mkdir -p $(obj)include
+	@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
+	@$(MKCONFIG) -a cpu9260 arm arm926ejs cpu9260 eukrea at91
+
 meesc_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91

Please use the new "-t" option to mkconfig to simplify the Makefile entry.

Quoted 30 lines
Makefile +30 -0
+#ifdef CONFIG_CMD_NAND
+static void cpu9260_nand_hw_init(void)
+{
+	unsigned long csa;
+
+	/* Enable CS3 */
+	csa = at91_sys_read(AT91_MATRIX_EBICSA);
+	at91_sys_write(AT91_MATRIX_EBICSA,
+		       csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
+
+	/* Configure SMC CS3 for NAND/SmartMedia */
+#if defined(CONFIG_CPU9G20)
+	at91_sys_write(AT91_SMC_SETUP(3),
+		       AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) |
+		       AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0));
+	at91_sys_write(AT91_SMC_PULSE(3),
+		       AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(4) |
+		       AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(4));
+	at91_sys_write(AT91_SMC_CYCLE(3),
+		       AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7));
+	at91_sys_write(AT91_SMC_MODE(3),
+		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+		       AT91_SMC_EXNWMODE_DISABLE |
+		       AT91_SMC_DBW_8 |
+		       AT91_SMC_TDF_(3));
+#elif defined(CONFIG_CPU9260)
+	at91_sys_write(AT91_SMC_SETUP(3),
+		       AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) |
+		       AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0));
+	at91_sys_write(AT91_SMC_PULSE(3),

Makefile at91sam9rlek_config : unconfig

Quoted 10 lines
Makefile +10 -0
+		       AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
+		       AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
+	at91_sys_write(AT91_SMC_CYCLE(3),
+		       AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
+	at91_sys_write(AT91_SMC_MODE(3),
+		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+		       AT91_SMC_EXNWMODE_DISABLE |
+		       AT91_SMC_DBW_8 |
+		       AT91_SMC_TDF_(2));
+#endif

The code here looks the same to me, there are just minor differences in the data. Please #define appropriate variables in the respective board config files and get rid of the #if in this common file.

...

Makefile

Quoted 11 lines
Makefile +11 -0
+int board_init(void)
+{
+	/* Enable Ctrlc */
+	console_init_f();
+
+	/* arch number of the board */
+#if defined(CONFIG_CPU9G20)
+	gd->bd->bi_arch_number = MACH_TYPE_CPUAT9260;
+#elif defined(CONFIG_CPU9260)
+	gd->bd->bi_arch_number = MACH_TYPE_CPUAT9260;
+#endif

Ditto here.

Makefile

Quoted 12 lines
Makefile +12 -0
+#ifdef CONFIG_RESET_PHY_R
+void reset_phy(void)
+{
+#ifdef CONFIG_MACB
+	/*
+	 * Initialize ethernet HW addr prior to starting Linux,
+	 * needed for nfsroot
+	 */
+	eth_init(gd->bd);
+#endif
+}
+#endif

Ethernet must not be unconditionally initilaized. Only when U-Boot runs a network command it may do that, and then it should disable the interface again before booting Linux. Please see the FAQ, and fix the Linux driver issue in Linux.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No more blah, blah, blah!
	-- Kirk, "Miri", stardate 2713.6