ARM S3C2410 add new board GEC2410
Subsystems (6)
PATCH 1/1 ARM S3C2410 add new board GEC2410
This patch add a S3C2410-based new board GEC2410.
--- Makefile | 7 + board/gec/gec2410/Makefile | 51 ++++ board/gec/gec2410/config.mk | 32 +++ board/gec/gec2410/flash.c | 433 +++++++++++++++++++++++++++++++++ board/gec/gec2410/gec2410.c | 147 +++++++++++ board/gec/gec2410/lowlevel_init.S | 169 +++++++++++++ board/gec/gec2410/u-boot-nand.lds | 61 +++++ cpu/arm920t/s3c24x0/timer.c | 1 + cpu/arm920t/start.S | 36 +++ drivers/mtd/nand/s3c2410_nand.c | 46 +++- drivers/net/cs8900.c | 2 +- include/configs/gec2410.h | 288 ++++++++++++++++++++++ nand_spl/board/gec/gec2410/Makefile | 102 ++++++++ nand_spl/board/gec/gec2410/config.mk | 40 +++ nand_spl/board/gec/gec2410/u-boot.lds | 60 +++++ 15 files changed, 1469 insertions(+), 6 deletions(-) create mode 100644 board/gec/gec2410/Makefile create mode 100644 board/gec/gec2410/config.mk create mode 100644 board/gec/gec2410/flash.c create mode 100644 board/gec/gec2410/gec2410.c create mode 100644 board/gec/gec2410/lowlevel_init.S create mode 100644 board/gec/gec2410/u-boot-nand.lds create mode 100644 include/configs/gec2410.h create mode 100644 nand_spl/board/gec/gec2410/Makefile create mode 100644 nand_spl/board/gec/gec2410/config.mk create mode 100644 nand_spl/board/gec/gec2410/u-boot.lds
Makefile +7 -0
@@ -2951,6 +2951,13 @@ davinci_dm365evm_config : unconfig davinci_dm6467evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs dm6467evm davinci davinci +gec2410_config : unconfig + @mkdir -p $(obj)include $(obj)board/gec/gec2410 + @mkdir -p $(obj)nand_spl/board/gec/gec2410 + @echo "RAM_TEXT = 0x33e00000" >> $(obj)board/gec/gec2410/config.tmp + @$(MKCONFIG) $(@:_config=) arm arm920t gec2410 gec s3c24x0 + @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk + imx27lite_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27
board/gec/gec2410/Makefile new file +51 -0
51 lines not on this page · raw message
board/gec/gec2410/config.mk new file +32 -0
@@ -0,0 +1,32 @@ +# +# (C) Copyright 2002 +# Gary Jennejohn, DENX Software Engineering, <[email protected]> +# David Mueller, ELSOFT AG, <[email protected]> +# +# GuangDong Embedded Software Center GEC2410 board with S3C2410X (ARM920T) cpu +# +# see http://www.gd-emb.com/sales_detail/menu-2410.html for more information on GEC2410 +# + +# +# GEC2410 has 1 bank of 64 MB DRAM +# +# 3000'0000 to 3400'0000 +# +# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 +# optionally with a ramdisk at 3080'0000 +# +# we load ourself to 33e0'0000 +# +# download area is 3300'c000 +# + +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +ifndef CONFIG_NAND_SPL +TEXT_BASE = $(RAM_TEXT) +else +TEXT_BASE = 0 +endif + +LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot-nand.lds
board/gec/gec2410/flash.c new file +433 -0
433 lines not on this page · raw message
board/gec/gec2410/gec2410.c new file +147 -0
147 lines not on this page · raw message
board/gec/gec2410/lowlevel_init.S new file +169 -0
169 lines not on this page · raw message
board/gec/gec2410/u-boot-nand.lds new file +61 -0
61 lines not on this page · raw message
cpu/arm920t/s3c24x0/timer.c +1 -0
@@ -188,6 +188,7 @@ ulong get_tbclk(void) tbclk = timer_load_val *100 ;#elif defined(CONFIG_SBC2410X ) || \ defined(CONFIG_SMDK2410 ) || \ + defined(CONFIG_GEC2410 ) || \ defined(CONFIG_VCMA9 ) tbclk =CONFIG_SYS_HZ ;#else
cpu/arm920t/start.S +36 -0
@@ -27,6 +27,10 @@ #include <common.h> #include <config.h> +#if !defined(CONFIG_ENABLE_MMU) && !defined(CONFIG_SYS_PHY_UBOOT_BASE) +#define CONFIG_SYS_PHY_UBOOT_BASE CONFIG_SYS_UBOOT_BASE +#endif + /* ************************************************************************* *
@@ -38,6 +42,7 @@ .globl _start _start: b start_code +#ifndef CONFIG_NAND_SPL ldr pc, _undefined_instruction ldr pc, _software_interrupt ldr pc, _prefetch_abort
@@ -53,7 +58,13 @@ _data_abort: .word data_abort _not_used: .word not_used _irq: .word irq _fiq: .word fiq +_pad: .word 0x12345678 /* now 16*4=64 */ +#else + . = _start + 64 +#endif +.global _end_vect +_end_vect: .balignl 16,0xdeadbeef
@@ -73,6 +84,14 @@ _fiq: .word fiq _TEXT_BASE: .word TEXT_BASE +/* + * Below variable is very important because we use MMU in U-Boot. + * Without it, we cannot run code correctly before MMU is ON. + * by scsuh. + */ +_TEXT_PHY_BASE: + .word CONFIG_SYS_PHY_UBOOT_BASE + .globl _armboot_start _armboot_start: .word _start
@@ -114,8 +133,10 @@ start_code: orr r0, r0, #0xd3 msr cpsr, r0 +#ifndef CONFIG_NAND_SPL bl coloured_LED_init bl red_LED_on +#endif #if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) /*
@@ -176,6 +197,7 @@ copyex: bl cpu_init_crit #endif +#ifndef CONFIG_NAND_SPL #ifndef CONFIG_SKIP_RELOCATE_UBOOT relocate: /* relocate U-Boot to RAM */ adr r0, _start /* r0 <- current position of code */
@@ -194,9 +216,13 @@ copy_loop: cmp r0, r2 /* until source end addreee [r2] */ ble copy_loop #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ +#endif /* CONFIG_NAND_SPL */ /* Set up the stack */ stack_setup: +#ifdef CONFIG_MEMORY_UPPER_CODE + ldr sp, =(CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE - 0xc) +#else ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */
@@ -204,6 +230,7 @@ stack_setup: sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif sub sp, r0, #12 /* leave 3 words for abort-stack */ +#endif /* CONFIG_MEMORY_UPPER_CODE */ clear_bss: ldr r0, _bss_start /* find start of bss segment */
@@ -215,9 +242,14 @@ clbss_l:str r2, [r0] /* clear loop... */ cmp r0, r1 ble clbss_l +#ifndef CONFIG_NAND_SPL ldr pc, _start_armboot _start_armboot: .word start_armboot +#else + b nand_boot +/* .word nand_boot */ +#endif /*
@@ -234,6 +266,7 @@ _start_armboot: .word start_armboot #ifndef CONFIG_SKIP_LOWLEVEL_INIT cpu_init_crit: +#ifndef CONFIG_NAND_SPL /* * flush v4 I/D caches */
@@ -251,6 +284,7 @@ cpu_init_crit: orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache mcr p15, 0, r0, c1, c0, 0 +#endif /* CONFIG_NAND_SPL */ /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will
@@ -264,6 +298,7 @@ cpu_init_crit: mov pc, lr #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ +#ifndef CONFIG_NAND_SPL /* ************************************************************************* *
@@ -434,3 +469,4 @@ fiq: bl do_fiq #endif +#endif /* CONFIG_NAND_SPL */
drivers/mtd/nand/s3c2410_nand.c +41 -5
78 lines not on this page · raw message
drivers/net/cs8900.c +1 -1
@@ -320,12 +320,12 @@ int cs8900_initialize(u8 dev_num, int base_addr) }memset (priv,0 ,sizeof (*priv)); priv->regs = (struct cs8900_regs *)base_addr; + dev->priv = priv;/* Load MAC address from EEPROM */ cs8900_get_enetaddr (dev); dev->iobase = base_addr; - dev->priv = priv; dev->init = cs8900_init; dev->halt = cs8900_halt; dev->send = cs8900_send;
include/configs/gec2410.h new file +288 -0
288 lines not on this page · raw message
nand_spl/board/gec/gec2410/Makefile new file +102 -0
102 lines not on this page · raw message
nand_spl/board/gec/gec2410/config.mk new file +40 -0
@@ -0,0 +1,40 @@ +# +# (C) Copyright 2006 +# Stefan Roese, DENX Software Engineering, sr at denx.de. +# +# 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 +# +# +# GEC2410 Study Platform (gec2410) board + +# TEXT_BASE for SPL: +# +# On S3C2410 platforms the SPL is located in SRAM@0. +# +TEXT_BASE = 0 + +include $(TOPDIR)/board/$(BOARDDIR)/config.mk + +# PAD_TO used to generate a 4kByte binary needed for the combined image +# -> PAD_TO = TEXT_BASE + 4096 +PAD_TO := $(shell expr $$[$(TEXT_BASE) + 4096]) + +ifeq ($(debug),1) +PLATFORM_CPPFLAGS += -DDEBUG +endif
nand_spl/board/gec/gec2410/u-boot.lds new file +60 -0
60 lines not on this page · raw message
Signature · 1 line
1.6.0.4
PATCH 1/1 ARM S3C2410 add new board GEC2410
nand_spl/board/gec/gec2410/config.mk line 36
Quoted 3 lines · Hui.Tang
nand_spl/board/gec/gec2410/config.mk new file +3
-0+# PAD_TO used to generate a 4kByte binary needed for the combined image +# -> PAD_TO = TEXT_BASE + 4096 +PAD_TO := $(shell expr $$[$(TEXT_BASE) + 4096])
Wasn't there a thread about this construct causing problems in certain environments? It looks like a bashism, and a deprecated (according to the man page) and redundant (you're already using expr) one at that.
Does $(shell expr $(TEXT_BASE) + 4096) work?
-Scott
PATCH 1/1 ARM S3C2410 add new board GEC2410
In reply to Hui.TangDear Hui.Tang
2009/10/29 Hui.Tang <[email protected]>:
Quoted 19 lines
This patch add a S3C2410-based new board GEC2410.
Signed-off-by Hui.Tang <[email protected]>---
?Makefile ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?7 + ?board/gec/gec2410/Makefile ? ? ? ? ? ?| ? 51 ++++ ?board/gec/gec2410/config.mk ? ? ? ? ? | ? 32 +++ ?board/gec/gec2410/flash.c ? ? ? ? ? ? | ?433 +++++++++++++++++++++++++++++++++ ?board/gec/gec2410/gec2410.c ? ? ? ? ? | ?147 +++++++++++ ?board/gec/gec2410/lowlevel_init.S ? ? | ?169 +++++++++++++ ?board/gec/gec2410/u-boot-nand.lds ? ? | ? 61 +++++ ?cpu/arm920t/s3c24x0/timer.c ? ? ? ? ? | ? ?1 + ?cpu/arm920t/start.S ? ? ? ? ? ? ? ? ? | ? 36 +++ ?drivers/mtd/nand/s3c2410_nand.c ? ? ? | ? 46 +++- ?drivers/net/cs8900.c ? ? ? ? ? ? ? ? ?| ? ?2 +- ?include/configs/gec2410.h ? ? ? ? ? ? | ?288 ++++++++++++++++++++++ ?nand_spl/board/gec/gec2410/Makefile ? | ?102 ++++++++ ?nand_spl/board/gec/gec2410/config.mk ?| ? 40 +++ ?nand_spl/board/gec/gec2410/u-boot.lds | ? 60 +++++
Quoted 12 lines
?15 files changed, 1469 insertions(+), 6 deletions(-) ?create mode 100644 board/gec/gec2410/Makefile ?create mode 100644
board/gec/gec2410/config.mk?create mode 100644board/gec/gec2410/flash.c?create mode 100644board/gec/gec2410/gec2410.c?create mode 100644board/gec/gec2410/lowlevel_init.S?create mode 100644board/gec/gec2410/u-boot-nand.lds?create mode 100644include/configs/gec2410.h?create mode 100644 nand_spl/board/gec/gec2410/Makefile ?create mode 100644nand_spl/board/gec/gec2410/config.mk?create mode 100644nand_spl/board/gec/gec2410/u-boot.lds
thanks for your patch.
First, please do checkpatch and fix the style problems. (total: 20 errors, 106 warnings, 1614 lines checked) Second, please separate your patch (board, cpu, soc, spl, etc..) Third, please fix the copyright. I couldn't find your name. And then, we will review your patch.
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH 1/1 ARM S3C2410 add new board GEC2410
Quoted 33 lines
2009/10/29 Hui.Tang <[email protected]>:
Quoted 21 lines
This patch add a S3C2410-based new board GEC2410.
Signed-off-by Hui.Tang <[email protected]>--- Makefile | 7 + board/gec/gec2410/Makefile | 51 ++++ board/gec/gec2410/config.mk | 32 +++ board/gec/gec2410/flash.c | 433 +++++++++++++++++++++++++++++++++ board/gec/gec2410/gec2410.c | 147 +++++++++++ board/gec/gec2410/lowlevel_init.S | 169 +++++++++++++ board/gec/gec2410/u-boot-nand.lds | 61 +++++ cpu/arm920t/s3c24x0/timer.c | 1 + cpu/arm920t/start.S | 36 +++ drivers/mtd/nand/s3c2410_nand.c | 46 +++- drivers/net/cs8900.c | 2 +- include/configs/gec2410.h | 288 ++++++++++++++++++++++ nand_spl/board/gec/gec2410/Makefile | 102 ++++++++ nand_spl/board/gec/gec2410/config.mk | 40 +++ nand_spl/board/gec/gec2410/u-boot.lds | 60 +++++ 15 files changed, 1469 insertions(+), 6 deletions(-) create mode 100644 board/gec/gec2410/Makefile create mode 100644 board/gec/gec2410/config.mkQuoted 9 lines
create mode 100644 board/gec/gec2410/flash.c create mode 100644 board/gec/gec2410/gec2410.c create mode 100644 board/gec/gec2410/lowlevel_init.S create mode 100644 board/gec/gec2410/u-boot-nand.lds create mode 100644 include/configs/gec2410.h create mode 100644 nand_spl/board/gec/gec2410/Makefile create mode 100644 nand_spl/board/gec/gec2410/config.mk create mode 100644 nand_spl/board/gec/gec2410/u-boot.lds
Quoted 7 lines
thanks for your patch.
First, please do checkpatch and fix the style problems. (total: 20 errors, 106 warnings, 1614 lines checked) Second, please separate your patch (board, cpu, soc, spl, etc..) Third, please fix the copyright. I couldn't find your name. And then, we will review your patch.
You should also add an entry to MAINTAINERS and MAKEALL when you resubmit your board support patch.
Best,
Peter