Skip to contentSkip to conversation

Add support for the Calao QIL-A9G20 board

PATCH Superseded Albin Tonnerre 2 participants 3 messages Sep 11, 2009 – Jan 9, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for the Calao QIL-A9G20 board

The Calao SBC35-A9G20 board is manufactured and sold by Calao Systems
<http://www.calao-systems.com>. It is built around an AT91SAM9G20 ARM SoC running at 400MHz. It features an Ethernet port, an SPI RTC backed by an onboard battery , an SD/MMC slot, a CompactFlash slot, 64Mo of SDRAM, 256Mo of NAND flash, two USB host ports, and an USB device port. More informations can be found at <http://www.calao-systems.com/articles.php?lng=en&pg=5936>

---
 MAINTAINERS                       |    2 +
 MAKEALL                           |    2 +
 Makefile                          |   10 ++
 board/calao/qil_a9g20/Makefile    |   55 ++++++++++
 board/calao/qil_a9g20/config.mk   |    1 +
 board/calao/qil_a9g20/qil_a9g20.c |  201 +++++++++++++++++++++++++++++++++++++
 board/calao/qil_a9g20/spi.c       |   57 +++++++++++
 include/configs/qil_a9g20.h       |  200 ++++++++++++++++++++++++++++++++++++
 8 files changed, 528 insertions(+), 0 deletions(-)
 create mode 100644 board/calao/qil_a9g20/Makefile
 create mode 100644 board/calao/qil_a9g20/config.mk
 create mode 100644 board/calao/qil_a9g20/qil_a9g20.c
 create mode 100644 board/calao/qil_a9g20/spi.c
 create mode 100644 include/configs/qil_a9g20.h
MAINTAINERS +2 -0
index e9db278..b1e82f4 100644
@@ -696,6 +696,8 @@ Andrea Scian <[email protected]>
 
 Albin Tonnerre <[email protected]>
 
+	qil_a9260	ARM926EJS (AT91SAM9260 SoC)
+	qil_a9g20	ARM926EJS (AT91SAM9G20 SoC)
 	sbc35_a9g20	ARM926EJS (AT91SAM9G20 SoC)
 	tny_a9260	ARM926EJS (AT91SAM9260 SoC)
 	tny_a9g20	ARM926EJS (AT91SAM9G20 SoC)
MAKEALL +2 -0
index f0ed8ea..531a667 100755
@@ -614,6 +614,8 @@ LIST_at91="			\
 	m501sk			\
 	pm9261			\
 	pm9263			\
+	QIL_A9260		\
+	QIL_A9G20		\
 	SBC35_A9G20		\
 	TNY_A9260		\
 	TNY_A9G20		\
Makefile +10 -0
index 0449a5b..eb542a4 100644
@@ -2897,6 +2897,16 @@ at91sam9g45ekes_config	:	unconfig
 pm9263_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
 
+QIL_A9G20_NANDFLASH_config \
+QIL_A9G20_EEPROM_config \
+QIL_A9G20_config \
+QIL_A9260_NANDFLASH_config \
+QIL_A9260_EEPROM_config \
+QIL_A9260_config	:	unconfig
+	@mkdir -p $(obj)include
+	@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
+	@$(MKCONFIG) -a qil_a9g20 arm arm926ejs qil_a9g20 calao at91
+
 SBC35_A9G20_NANDFLASH_config \
 SBC35_A9G20_EEPROM_config \
 SBC35_A9G20_config	:	unconfig
board/calao/qil_a9g20/Makefile new file +55 -0

55 lines not on this page · raw message

board/calao/qil_a9g20/config.mk new file +1 -0
new file mode 100644
index 0000000..ff2cfd1
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
board/calao/qil_a9g20/qil_a9g20.c new file +201 -0

201 lines not on this page · raw message

board/calao/qil_a9g20/spi.c new file +57 -0

57 lines not on this page · raw message

include/configs/qil_a9g20.h new file +200 -0

200 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 Add support for the Calao QIL-A9G20 board

Dear Albin Tonnerre,

Quoted 29 lines · In message <1252688802-29403-1-git-send-email-albin.tonnerre@free-electrons.com…

The Calao SBC35-A9G20 board is manufactured and sold by Calao Systems
<http://www.calao-systems.com>. It is built around an AT91SAM9G20 ARM SoC running at 400MHz. It features an Ethernet port, an SPI RTC backed by an onboard battery , an SD/MMC slot, a CompactFlash slot, 64Mo of SDRAM, 256Mo of NAND flash, two USB host ports, and an USB device port. More informations can be found at <http://www.calao-systems.com/articles.php?lng=en&pg=5936>

---
 MAINTAINERS                       |    2 +
 MAKEALL                           |    2 +
 Makefile                          |   10 ++
 board/calao/qil_a9g20/Makefile    |   55 ++++++++++
 board/calao/qil_a9g20/config.mk   |    1 +
 board/calao/qil_a9g20/qil_a9g20.c |  201 +++++++++++++++++++++++++++++++++++++
 board/calao/qil_a9g20/spi.c       |   57 +++++++++++
 include/configs/qil_a9g20.h       |  200 ++++++++++++++++++++++++++++++++++++
 8 files changed, 528 insertions(+), 0 deletions(-)
 create mode 100644 board/calao/qil_a9g20/Makefile
 create mode 100644 board/calao/qil_a9g20/config.mk
 create mode 100644 board/calao/qil_a9g20/qil_a9g20.c
 create mode 100644 board/calao/qil_a9g20/spi.c
 create mode 100644 include/configs/qil_a9g20.h
MAINTAINERS +0 -0
index e9db278..b1e82f4 100644

MAINTAINERS Andrea Scian <[email protected]> · line 703

Quoted 8 lines
MAINTAINERS +2 -0
@@ -696,6 +696,8 @@ Andrea Scian <[email protected]>
 
 Albin Tonnerre <[email protected]>
 
+	qil_a9260	ARM926EJS (AT91SAM9260 SoC)
+	qil_a9g20	ARM926EJS (AT91SAM9G20 SoC)
 	sbc35_a9g20	ARM926EJS (AT91SAM9G20 SoC)
 	tny_a9260	ARM926EJS (AT91SAM9260 SoC)
 	tny_a9g20	ARM926EJS (AT91SAM9G20 SoC)

This is a mess.

The Subject mentions adding the QIL-A9G20 board; the commit message says you were adding the SBC35-A9G20 board (which already exists), but actually you seem to be adding the QIL-A9G20 and QIL-A9260 boards?

Please make comments and code match.

MAKEALL LIST_at91=" \ · line 621

Quoted 13 lines
MAKEALL +2 -0
index f0ed8ea..531a667 100755
@@ -614,6 +614,8 @@ LIST_at91="			\
 	m501sk			\
 	pm9261			\
 	pm9263			\
+	QIL_A9260		\
+	QIL_A9G20		\
 	SBC35_A9G20		\
 	TNY_A9260		\
 	TNY_A9G20		\

Ditto.

Quoted 7 lines
Makefile +0 -0
index 0449a5b..eb542a4 100644
@@ -2897,6 +2897,16 @@ at91sam9g45ekes_config	:	unconfig
 pm9263_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91

Makefile at91sam9g45ekes_config : unconfig · line 2908

Quoted 10 lines
Makefile +9 -0
 
+QIL_A9G20_NANDFLASH_config \
+QIL_A9G20_EEPROM_config \
+QIL_A9G20_config \
+QIL_A9260_NANDFLASH_config \
+QIL_A9260_EEPROM_config \
+QIL_A9260_config	:	unconfig
+	@mkdir -p $(obj)include
+	@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
+	@$(MKCONFIG) -a qil_a9g20 arm arm926ejs qil_a9g20 calao at91

Ditto.

...

Quoted 5 lines
board/calao/qil_a9g20/qil_a9g20.c new file +0 -0
new file mode 100644
index 0000000..38f4cce

...

board/calao/qil_a9g20/qil_a9g20.c line 155

Quoted 10 lines
board/calao/qil_a9g20/qil_a9g20.c new file +10 -0
+int board_init(void)
+{
+	/* Enable Ctrlc */
+	console_init_f();
+
+#ifdef CONFIG_QIL_A9G20
+	gd->bd->bi_arch_number = MACH_TYPE_QIL_A9G20;
+#else
+	gd->bd->bi_arch_number = MACH_TYPE_QIL_A9260;
+#endif

Please avoid the #ifdef here; use for example a #define in the board config file instead.

...

board/calao/qil_a9g20/qil_a9g20.c line 192

Quoted 12 lines
board/calao/qil_a9g20/qil_a9g20.c new file +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

You must not initialize the Ethernet interface unless U-Boot is running a network coimmand. And you should then disable it again before booting Linux. Please read the FAQ and fix the Linux driver issues in Linux.

...

board/calao/qil_a9g20/qil_a9g20.c

Quoted 10 lines
board/calao/qil_a9g20/qil_a9g20.c new file +10 -0
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE

You are undefining some pretty useful commands here (like bdinfo, iminfo, source, etc.) Is ther eany special reason for doing this?

...

board/calao/qil_a9g20/qil_a9g20.c

Quoted 6 lines
board/calao/qil_a9g20/qil_a9g20.c new file +6 -0
+/* USB */
+#define CONFIG_USB_ATMEL
+#define CONFIG_USB_OHCI_NEW		1
+#define CONFIG_DOS_PARTITION		1
+#define CONFIG_SYS_USB_OHCI_CPU_INIT	1
+#define CONFIG_SYS_USB_OHCI_REGS_BASE	0x00500000	/* AT91SAM9260_UHP_BASE */

Line too long. Please fix globally.

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
It would seem that evil retreats when forcibly confronted
	-- Yarnek of Excalbia, "The Savage Curtain", stardate 5906.5
#2 lore raw

PATCH v2 1/1 Add support for the Calao QIL-A9G20 and QIL-A9260 boards

The Calao QIL-A9G20 and QIL-A9260 boards are manufactured and sold by Calao Systems <http://www.calao-systems.com>. They are respectively built around an AT91SAM9G20 ARM SoC running at 400MHz and an AT91SAM9260 SoC running at 200MHz. They feature an Ethernet port, an SPI RTC backed by an onboard battery, an SD/MMC slot, a CompactFlash slot, 64Mo of SDRAM, 256Mo of NAND flash, two USB host ports, and an USB device port. More information can be found at
<http://www.calao-systems.com/articles.php?lng=en&pg=5936>

---
Changes in v2:
- Remove QIL_A9xxx_EEPROM_config targets, as putting the env in EEPROM doesn't work currently
- Fix inconsistencies between Makefile, MAINTAINERS and the commit message
- use a #define in the config file to define the correct MACH_TYPE according to the CPU
- remove uses of CONFIG_RESET_PHY_R
- Fix some lines that were too long
- don't #undef CONFIG_CMD_{BDI,IMI,LOADS,SOURCE}

 MAINTAINERS                       |    2 +
 MAKEALL                           |    2 +
 Makefile                          |    8 ++
 board/calao/qil_a9g20/Makefile    |   55 ++++++++++
 board/calao/qil_a9g20/config.mk   |    1 +
 board/calao/qil_a9g20/qil_a9g20.c |  181 ++++++++++++++++++++++++++++++++++
 board/calao/qil_a9g20/spi.c       |   57 +++++++++++
 include/configs/qil_a9g20.h       |  197 +++++++++++++++++++++++++++++++++++++
 8 files changed, 503 insertions(+), 0 deletions(-)
 create mode 100644 board/calao/qil_a9g20/Makefile
 create mode 100644 board/calao/qil_a9g20/config.mk
 create mode 100644 board/calao/qil_a9g20/qil_a9g20.c
 create mode 100644 board/calao/qil_a9g20/spi.c
 create mode 100644 include/configs/qil_a9g20.h
MAINTAINERS +2 -0
index 9734b1d..11d40a9 100644
@@ -724,6 +724,8 @@ Nick Thompson <[email protected]>
 
 Albin Tonnerre <[email protected]>
 
+	qil_a9260	ARM926EJS (AT91SAM9260 SoC)
+	qil_a9g20	ARM926EJS (AT91SAM9G20 SoC)
 	sbc35_a9g20	ARM926EJS (AT91SAM9G20 SoC)
 	tny_a9260	ARM926EJS (AT91SAM9260 SoC)
 	tny_a9g20	ARM926EJS (AT91SAM9G20 SoC)
MAKEALL +2 -0
index ab1bb6f..940d74e 100755
@@ -654,6 +654,8 @@ LIST_at91="			\
 	m501sk			\
 	pm9261			\
 	pm9263			\
+	QIL_A9260		\
+	QIL_A9G20		\
 	SBC35_A9G20		\
 	TNY_A9260		\
 	TNY_A9G20		\
Makefile +8 -0
index ed6156f..c8c4af6 100644
@@ -2857,6 +2857,14 @@ at91sam9g45ekes_config	:	unconfig
 pm9263_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
 
+QIL_A9G20_NANDFLASH_config \
+QIL_A9G20_config \
+QIL_A9260_NANDFLASH_config \
+QIL_A9260_config	:	unconfig
+	@mkdir -p $(obj)include
+	@echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
+	@$(MKCONFIG) -a qil_a9g20 arm arm926ejs qil_a9g20 calao at91
+
 SBC35_A9G20_NANDFLASH_config \
 SBC35_A9G20_EEPROM_config \
 SBC35_A9G20_config	:	unconfig
board/calao/qil_a9g20/Makefile new file +55 -0

55 lines not on this page · raw message

board/calao/qil_a9g20/config.mk new file +1 -0
new file mode 100644
index 0000000..ff2cfd1
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
board/calao/qil_a9g20/qil_a9g20.c new file +181 -0

181 lines not on this page · raw message

board/calao/qil_a9g20/spi.c new file +57 -0

57 lines not on this page · raw message

include/configs/qil_a9g20.h new file +197 -0

197 lines not on this page · raw message

Signature · 1 line
1.6.3.3