Add support for NetusG20
Subsystems (3)
PATCH 1/1 Add support for NetusG20
Add support for the NetusG20 board by Acmesystems srl. This board is based on AT91SAM9G20 SoC.
--- MAKEALL | 1 + Makefile | 3 + arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c | 5 + board/acmesystems/netusg20/Makefile | 56 +++++++ board/acmesystems/netusg20/config.mk | 1 + board/acmesystems/netusg20/led.c | 40 +++++ board/acmesystems/netusg20/netusg20.c | 152 +++++++++++++++++ board/acmesystems/netusg20/partition.c | 39 +++++ include/configs/netusg20.h | 181 +++++++++++++++++++++ 9 files changed, 478 insertions(+), 0 deletions(-) create mode 100644 board/acmesystems/netusg20/Makefile create mode 100644 board/acmesystems/netusg20/config.mk create mode 100644 board/acmesystems/netusg20/led.c create mode 100644 board/acmesystems/netusg20/netusg20.c create mode 100644 board/acmesystems/netusg20/partition.c create mode 100644 include/configs/netusg20.h
MAKEALL +1 -0
@@ -684,6 +684,7 @@ LIST_at91=" \ meesc \ mp2usb \ m501sk \ + netusg20 \ otc570 \ pm9261 \ pm9263 \
Makefile +3 -0
@@ -2867,6 +2867,9 @@ at91sam9g45ekes_config : unconfig fi; @$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91 +netusg20_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs netusg20 acmesystems at91 + otc570_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs otc570 esd at91
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +5 -0
@@ -59,7 +59,12 @@ void at91_serial3_hw_init(void) {at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE ; +#ifdef CONFIG_NETUSG20 +/* pull-up active on DRXD*/ +at91_set_a_periph (AT91_PIO_PORTB ,14 ,1 ); +#else at91_set_a_periph (AT91_PIO_PORTB ,14 ,0 );/* DRXD */ +#endif at91_set_a_periph (AT91_PIO_PORTB ,15 ,1 );/* DTXD */ writel (1 <<AT91_ID_SYS , &pmc->pcer); }
board/acmesystems/netusg20/Makefile new file +56 -0
56 lines not on this page · raw message
board/acmesystems/netusg20/config.mk new file +1 -0
@@ -0,0 +1 @@ +TEXT_BASE = 0x23f00000
board/acmesystems/netusg20/led.c new file +40 -0
@@ -0,0 +1,40 @@ +/* +* (C) Copyright 2007-2008 +* Stelian Pop <[email protected]> +* Lead Tech Design <www.leadtechdesign.com> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program 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 program 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. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> +#include <asm/arch/at91sam9260.h> +#include <asm/arch/at91_pmc.h> +#include <asm/arch/gpio.h> +#include <asm/arch/io.h> + + +void coloured_LED_init (void ) +{ +/* Enable clock */ +at91_sys_write (AT91_PMC_PCER ,1 <<AT91SAM9260_ID_PIOA ); + +at91_set_gpio_output (CONFIG_RED_LED ,1 ); + +at91_set_gpio_value (CONFIG_RED_LED ,1 ); +}
board/acmesystems/netusg20/netusg20.c new file +152 -0
152 lines not on this page · raw message
board/acmesystems/netusg20/partition.c new file +39 -0
@@ -0,0 +1,39 @@ +/* +* (C) Copyright 2008 +* Ulf Samuelsson <[email protected]> +* +* This program 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 program 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. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +* +*/ +#include <common.h> +#include <config.h> +#include <asm/hardware.h> +#include <dataflash.h> + +AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS ]; + +struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS ] = { + {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 ,1 } +}; + +/*define the area offsets*/ +dataflash_protect_t area_list[NB_DATAFLASH_AREA ] = { + {0x00000000 ,0x000041FF ,FLAG_PROTECT_SET ,0 ,"Bootstrap" }, + {0x00004200 ,0x000083FF ,FLAG_PROTECT_CLEAR ,0 ,"Environment" }, + {0x00008400 ,0x00041FFF ,FLAG_PROTECT_SET ,0 ,"U-Boot" }, + {0x00042000 ,0x00251FFF ,FLAG_PROTECT_CLEAR ,0 ,"Kernel" }, + {0x00252000 ,0xFFFFFFFF ,FLAG_PROTECT_CLEAR ,0 ,"FS" }, +};
include/configs/netusg20.h new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 1/1 Add support for NetusG20
Dear Claudio Mignanti,
Quoted 13 lines · In message <[email protected]> you wrote:
Add support for the NetusG20 board by Acmesystems srl. This board is based on AT91SAM9G20 SoC.
Signed-off-by Claudio Mignanti <[email protected]>--- MAKEALL | 1 + Makefile | 3 + arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c | 5 + board/acmesystems/netusg20/Makefile | 56 +++++++ board/acmesystems/netusg20/config.mk | 1 + board/acmesystems/netusg20/led.c | 40 +++++ board/acmesystems/netusg20/netusg20.c | 152 +++++++++++++++++ board/acmesystems/netusg20/partition.c | 39 +++++
Quoted 8 lines
include/configs/netusg20.h | 181 +++++++++++++++++++++ 9 files changed, 478 insertions(+), 0 deletions(-) create mode 100644 board/acmesystems/netusg20/Makefile create mode 100644 board/acmesystems/netusg20/config.mk create mode 100644 board/acmesystems/netusg20/led.c create mode 100644 board/acmesystems/netusg20/netusg20.c create mode 100644 board/acmesystems/netusg20/partition.c create mode 100644 include/configs/netusg20.h
Entry to MAINTAINERS missing.
Makefile at91sam9g45ekes_config : unconfig · line 2874
Quoted 13 lines
Makefile +3
-0@@ -2867,6 +2867,9 @@ at91sam9g45ekes_config : unconfig fi; @$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91 +netusg20_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs netusg20 acmesystems at91 + otc570_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs otc570 esd at91
NAK. Please rebase your patch against current code. We don't add boards to the top level Makefile any more. Add the definition to boards.cfg instead.
Quoted 7 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +0
-0@@ -59,7 +59,12 @@ void at91_serial3_hw_init(void) {at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE ;
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c void at91_serial3_hw_init(void) · line 70
Quoted 10 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +5
-0+#ifdef CONFIG_NETUSG20 +/* pull-up active on DRXD*/ +at91_set_a_periph (AT91_PIO_PORTB ,14 ,1 ); +#else at91_set_a_periph (AT91_PIO_PORTB ,14 ,0 );/* DRXD */ +#endif at91_set_a_periph (AT91_PIO_PORTB ,15 ,1 );/* DTXD */ writel (1 <<AT91_ID_SYS , &pmc->pcer); }
Please do not add board specific defines to common code. If really needed, add a feature-specific #define.
...
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 12 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +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
This doesn't look right to me.
...
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 9 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +9
-0+/* +* Hardware drivers +*/ +#define CONFIG_AT91_GPIO 1 +#define CONFIG_ATMEL_USART 1 +#undef CONFIG_USART0 +#undef CONFIG_USART1 +#undef CONFIG_USART2 +#define CONFIG_USART3 1/* USART 3 is DBGU */
Do not undef what is not defined anyway.
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 4 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +4
-0+/* LED */ +#define CONFIG_AT91_LED +#define CONFIG_RED_LED AT91_PIN_PA9/* this is the power led */ +#define CONFIG_GREEN_LED AT91_PIN_PA6/* this is the user led */
Please use consistent code. Either ALWAYS use a TAB after a #define, or (better) always use a SPACE.
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 10 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +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
What is the exact reason for undefing pretty useful commands like bdi, imi, or source?
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 7 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +7
-0+/* MMC */ +#define CONFIG_MMC +#define CONFIG_CMD_MMC +#define CONFIG_ATMEL_MCI +#define CONFIG_CMD_AUTOSCRIPT +#define CONFIG_CMD_IMI +#define CONFIG_CMD_SOURCE
...especially, if you enable these later, connected to a completely misleading comment (imi and source are in no way related to MMC support).
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 4 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +4
-0+#define CONFIG_ENV_IS_IN_DATAFLASH 1 +#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400) +#define CONFIG_ENV_OFFSET 0x4200 +#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
Line too long. Please fix globally.
Best regards,
Wolfgang Denk
Signature · 9 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 'What shall we do?' said Twoflower. 'Panic?' said Rincewind hope- fully. He always held that panic was the best means of survival; back in the olden days, his theory went, people faced with hungry sabre- toothed tigers could be divided very simply in those who panicked and those who stood there saying 'What a magnificent brute!' or 'Here, pussy.' - Terry Pratchett, _The Light Fantastic_
PATCH 1/1 Add support for NetusG20
Dear Wolfgang Denk,
thanks for your review.
2010/7/5 Wolfgang Denk <[email protected]>:
Quoted 25 lines
Dear Claudio Mignanti,
Quoted 14 lines · In message <[email protected]> you wrote:
Add support for the NetusG20 board by Acmesystems srl. This board is based on AT91SAM9G20 SoC.
Signed-off-by Claudio Mignanti <[email protected]>---
?MAKEALL ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 + ?Makefile ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?3 + ?arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c | ? ?5 + ?board/acmesystems/netusg20/Makefile ? ? ? ? ? ? ? | ? 56 +++++++ ?board/acmesystems/netusg20/config.mk ? ? ? ? ? ? ?| ? ?1 + ?board/acmesystems/netusg20/led.c ? ? ? ? ? ? ? ? ?| ? 40 +++++ ?board/acmesystems/netusg20/netusg20.c ? ? ? ? ? ? | ?152 +++++++++++++++++ ?board/acmesystems/netusg20/partition.c ? ? ? ? ? ?| ? 39 +++++ ?include/configs/netusg20.h ? ? ? ? ? ? ? ? ? ? ? ?| ?181 +++++++++++++++++++++Quoted 7 lines
?9 files changed, 478 insertions(+), 0 deletions(-) ?create mode 100644 board/acmesystems/netusg20/Makefile ?create mode 100644
board/acmesystems/netusg20/config.mk?create mode 100644board/acmesystems/netusg20/led.c?create mode 100644board/acmesystems/netusg20/netusg20.c?create mode 100644board/acmesystems/netusg20/partition.c?create mode 100644include/configs/netusg20.h
Quoted 1 line
Entry to
MAINTAINERSmissing.
Ok
Quoted 27 lines
Quoted 12 lines
Makefile +0
-0@@ -2867,6 +2867,9 @@ at91sam9g45ekes_config ?: ? ? ? unconfig ? ? ? fi;? ? ? @$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91
Makefile +3
-0+netusg20_config: ? ? unconfig + ? ? @$(MKCONFIG) $(@:_config=) arm arm926ejs netusg20 acmesystems at91 +Quoted 2 lines
?otc570_config ? ? ? ?: ? ? ? unconfig
? ? ? @$(MKCONFIG) $(@:_config=) arm arm926ejs otc570 esd at91NAK. Please rebase your patch against current code. We don't add boards to the top level
Makefileany more. Add the definition to boards.cfg instead.Quoted 8 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +0
-0@@ -59,7 +59,12 @@ void at91_serial3_hw_init(void) ?{ ? ? ? at91_pmc_t ? ? ?*pmc ? ?= (at91_pmc_t *) AT91_PMC_BASE;
Quoted 13 lines
Quoted 9 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +4
-0+#ifdef CONFIG_NETUSG20 + ? ? /* pull-up active on DRXD*/ + ? ? at91_set_a_periph(AT91_PIO_PORTB, 14, 1); +#else ? ? ?
at91_set_a_periph(AT91_PIO_PORTB, 14, 0); ? ? ? ? ? ? ? /* DRXD */ +#endif
? ? ?at91_set_a_periph(AT91_PIO_PORTB, 15, 1); ? ? ? ? ? ? ? /* DTXD */ ? ? ?writel(1 << AT91_ID_SYS, &pmc->pcer);
?}Please do not add board specific defines to common code. If really needed, add a feature-specific #define.
Something like this is better?
/* DRXD */ at91_set_a_periph(AT91_PIO_PORTB, 14, CONFIG_AT91SAM9260_DRXD_PULLUP); at91_set_a_periph(AT91_PIO_PORTB, 15, 1); /* DTXD */
Quoted 15 lines
...
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 12 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +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 This doesn't look right to me.
This part was copied from board/atmel/at91sam9260ek/at91sam9260ek.c
Quoted 7 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
Quoted 4 lines
arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c +4
-0+/* LED */ +#define CONFIG_AT91_LED +#define ? ? ?CONFIG_RED_LED ? ? ? ? ?AT91_PIN_PA9 ? ?/* this is the power led */ +#define ? ? ?CONFIG_GREEN_LED ? ? ? ?AT91_PIN_PA6 ? ?/* this is the user led */Please use consistent code. Either ALWAYS use a TAB after a #define, or (better) always use a SPACE.
ops sorry I will be more consistent
Best Regards