Add support for Embest SBC2440-II Board
Subsystems (7)
PATCH v2 1/1 Add support for Embest SBC2440-II Board
Implementation based on the existing u-boot support for S3C2410-based boards. u-boot programmed into NOR flash.
Tested on an SBC2440-II Board using tftp to copy the files from a server and programming them into NAND flash.
MAKEALL used to build all LIST_ARM9 targets only - no other architectures built as the changes only affect ARM9-based boards.
Changes since v1:
- removed all network-related parameters from board config file as requested by Ben Warren
--- MAKEALL | 1 + Makefile | 3 + board/embest/sbc2440ii/Makefile | 55 +++++++ board/embest/sbc2440ii/config.mk | 25 ++++ board/embest/sbc2440ii/lowlevel_init.S | 219 ++++++++++++++++++++++++++++ board/embest/sbc2440ii/sbc2440ii.c | 127 ++++++++++++++++ board/embest/sbc2440ii/u-boot.lds | 56 +++++++ common/serial.c | 4 +- cpu/arm920t/s3c24x0/speed.c | 83 ++++++++--- cpu/arm920t/s3c24x0/timer.c | 6 +- cpu/arm920t/s3c24x0/usb.c | 6 +- cpu/arm920t/s3c24x0/usb_ohci.c | 2 + cpu/arm920t/start.S | 35 ++++-- drivers/i2c/s3c24x0_i2c.c | 18 +++ drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/s3c2410_nand.c | 223 ++++++++++++++++++++++++----- drivers/rtc/s3c24x0_rtc.c | 2 + drivers/serial/serial_s3c24x0.c | 2 + include/common.h | 3 +- include/configs/sbc2440ii.h | 246 ++++++++++++++++++++++++++++++++ include/s3c2440.h | 231 ++++++++++++++++++++++++++++++ include/s3c24x0.h | 83 +++++++++++ 22 files changed, 1356 insertions(+), 76 deletions(-) create mode 100644 board/embest/sbc2440ii/Makefile create mode 100644 board/embest/sbc2440ii/config.mk create mode 100644 board/embest/sbc2440ii/lowlevel_init.S create mode 100644 board/embest/sbc2440ii/sbc2440ii.c create mode 100644 board/embest/sbc2440ii/u-boot.lds create mode 100644 include/configs/sbc2440ii.h create mode 100644 include/s3c2440.h
MAKEALL +1 -0
@@ -515,6 +515,7 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ sbc2410x \ + sbc2440ii \ scb9328 \ smdk2400 \ smdk2410 \
Makefile +3 -0
@@ -2876,6 +2876,9 @@ omap730p2_cs3boot_config : unconfig sbc2410x_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 +sbc2440ii_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t sbc2440ii embest s3c24x0 + scb9328_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx
board/embest/sbc2440ii/Makefile new file +55 -0
55 lines not on this page · raw message
board/embest/sbc2440ii/config.mk new file +25 -0
@@ -0,0 +1,25 @@ +# +# (C) Copyright 2002 +# Gary Jennejohn, DENX Software Engineering, <[email protected]> +# David Mueller, ELSOFT AG, <[email protected]> +# +# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu +# +# see http://www.samsung.com/ for more information on SAMSUNG +# +# Modified for EMBEST SBC2440-II board with S3C2440 (ARM920T) cpu by: +# (C) Copyright 2009 +# Kevin Morfitt, Fearnside Systems Ltd, <[email protected]> + +# +# SBC2440-II has 1 bank of 64 MB DRAM +# +# 3000'0000 to 3800'0000 +# +# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 +# +# we load ourself to 33F8'0000 +# +# download area is 3000'0000 + +TEXT_BASE = 0x33F80000
board/embest/sbc2440ii/lowlevel_init.S new file +219 -0
219 lines not on this page · raw message
board/embest/sbc2440ii/sbc2440ii.c new file +127 -0
127 lines not on this page · raw message
board/embest/sbc2440ii/u-boot.lds new file +56 -0
56 lines not on this page · raw message
common/serial.c +2 -2
@@ -58,7 +58,7 @@ struct serial_device *__default_serial_console (void)#else return &serial0_device;#endif -#elif defined(CONFIG_S3C2410) +#elif defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)#if defined(CONFIG_SERIAL1 )return &s3c24xx_serial0_device;#elif defined(CONFIG_SERIAL2 )
@@ -131,7 +131,7 @@ void serial_initialize (void)#if defined (CONFIG_STUART )serial_register (&serial_stuart_device);#endif -#if defined(CONFIG_S3C2410 ) +#if defined(CONFIG_S3C2410 ) || defined(CONFIG_S3C2440 )serial_register (&s3c24xx_serial0_device);serial_register (&s3c24xx_serial1_device);serial_register (&s3c24xx_serial2_device);
cpu/arm920t/s3c24x0/speed.c +59 -24
120 lines not on this page · raw message
cpu/arm920t/s3c24x0/timer.c +5 -1
@@ -30,12 +30,15 @@*/ #include <common.h> -#if defined(CONFIG_S3C2400 ) || defined (CONFIG_S3C2410 ) || defined (CONFIG_TRAB ) +#if defined(CONFIG_S3C2400 ) || defined(CONFIG_S3C2410 ) || \ + defined(CONFIG_S3C2440 ) || defined(CONFIG_TRAB )#if defined(CONFIG_S3C2400 )#include <s3c2400.h> #elif defined(CONFIG_S3C2410 )#include <s3c2410.h> +#elif defined(CONFIG_S3C2440 ) +#include <s3c2440.h> #endif int timer_load_val =0 ;
@@ -177,6 +180,7 @@ ulong get_tbclk (void) tbclk = timer_load_val *100 ;#elif defined(CONFIG_SBC2410X ) || \ defined(CONFIG_SMDK2410 ) || \ + defined(CONFIG_SBC2440II ) || \ defined(CONFIG_VCMA9 ) tbclk =CONFIG_SYS_HZ ;#else
cpu/arm920t/s3c24x0/usb.c +5 -1
@@ -24,12 +24,16 @@#include <common.h> #if defined(CONFIG_USB_OHCI_NEW ) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT ) -# if defined(CONFIG_S3C2400 ) || defined(CONFIG_S3C2410 ) +# if defined(CONFIG_S3C2400 ) || \ + defined(CONFIG_S3C2410 ) || \ + defined(CONFIG_S3C2440 )#if defined(CONFIG_S3C2400 )# include <s3c2400.h> #elif defined(CONFIG_S3C2410 )# include <s3c2410.h> +#elif defined(CONFIG_S3C2440 ) +#include <s3c2440.h> #endif int usb_cpu_init (void )
cpu/arm920t/s3c24x0/usb_ohci.c +2 -0
@@ -42,6 +42,8 @@#include <s3c2400.h> #elif defined(CONFIG_S3C2410 )#include <s3c2410.h> +#elif defined(CONFIG_S3C2440 ) +#include <s3c2440.h> #endif #include <malloc.h>
cpu/arm920t/start.S +26 -9
@@ -132,20 +132,30 @@ copyex: bne copyex #endif -#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) +#if defined(CONFIG_S3C2400) || \ + defined(CONFIG_S3C2410) || \ + defined(CONFIG_S3C2440) /* turn off the watchdog */ # if defined(CONFIG_S3C2400) -# define pWTCON 0x15300000 -# define INTMSK 0x14400008 /* Interupt-Controller base addresses */ +# define pWTCON 0x15300000 +# define INTMSK 0x14400008 /* Interupt-Controller base addresses */ # define CLKDIVN 0x14800014 /* clock divisor register */ #else -# define pWTCON 0x53000000 -# define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ +# define pWTCON 0x53000000 +# define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ # define INTSUBMSK 0x4A00001C # define CLKDIVN 0x4C000014 /* clock divisor register */ # endif +# if defined(CONFIG_S3C2440) +# define INTSMASK 0xffff +# define CLKDIVVAL 0x5 +#else +# define INTSMASK 0x3ff +# define CLKDIVVAL 0x3 +# endif + ldr r0, =pWTCON mov r1, #0x0 str r1, [r0]
@@ -156,8 +166,8 @@ copyex: mov r1, #0xffffffff ldr r0, =INTMSK str r1, [r0] -# if defined(CONFIG_S3C2410) - ldr r1, =0x3ff +# if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440) + ldr r1, =INTSMASK ldr r0, =INTSUBMSK str r1, [r0] # endif
@@ -165,9 +175,16 @@ copyex: /* FCLK:HCLK:PCLK = 1:2:4 */ /* default FCLK is 120 MHz ! */ ldr r0, =CLKDIVN - mov r1, #3 + mov r1, #CLKDIVVAL str r1, [r0] -#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */ + +#ifdef CONFIG_S3C2440 + /* Set asynchronous bus mode */ + mrc p15, 0, r1, c1, c0, 0 /* read ctrl register */ + orr r1, r1, #0xc0000000 /* Asynchronous */ + mcr p15, 0, r1, c1, c0, 0 /* write ctrl register */ +#endif /* CONFIG_S3C2440 */ +#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 || CONFIG_S3C2440 */ /* * we do sys-critical inits only at reboot,
drivers/i2c/s3c24x0_i2c.c +18 -0
@@ -31,6 +31,8 @@#include <s3c2400.h> #elif defined(CONFIG_S3C2410 )#include <s3c2410.h> +#elif defined(CONFIG_S3C2440 ) +#include <s3c2440.h> #endif #include <i2c.h>
@@ -66,6 +68,9 @@ static int GetI2CSDA(void)#ifdef CONFIG_S3C2400 return (gpio->PGDAT &0x0020 ) >>5 ;#endif +#ifdef CONFIG_S3C2440 +return (gpio->GPEDAT &0x8000 ) >>15 ; +#endif }#if 0
@@ -85,6 +90,9 @@ static void SetI2CSCL(int x)#ifdef CONFIG_S3C2400 gpio->PGDAT = (gpio->PGDAT & ~0x0040 ) | (x&1 ) <<6 ;#endif +#ifdef CONFIG_S3C2440 + gpio->GPEDAT = (gpio->GPEDAT & ~0x4000 ) | (x&1 ) <<14 ; +#endif }
@@ -142,6 +150,9 @@ void i2c_init (int speed, int slaveadd)#ifdef CONFIG_S3C2400 ulong old_gpecon = gpio->PGCON;#endif +#ifdef CONFIG_S3C2440 +ulong old_gpecon = gpio->GPECON; +#endif /* bus still busy probably by (most) previously interrupted transfer */ #ifdef CONFIG_S3C2410
@@ -152,6 +163,10 @@ void i2c_init (int speed, int slaveadd)/* set I2CSDA and I2CSCL (PG5, PG6) to GPIO */ gpio->PGCON = (gpio->PGCON & ~0x00003c00 ) |0x00001000 ;#endif +#ifdef CONFIG_S3C2440 +/* set I2CSDA and I2CSCL (GPE15, GPE14) to GPIO */ + gpio->GPECON = (gpio->GPECON & ~0xF0000000 ) |0x10000000 ; +#endif /* toggle I2CSCL until bus idle */ SetI2CSCL (0 );
@@ -174,6 +189,9 @@ void i2c_init (int speed, int slaveadd)#ifdef CONFIG_S3C2400 gpio->PGCON = old_gpecon;#endif +#ifdef CONFIG_S3C2440 + gpio->GPECON = old_gpecon; +#endif }/* calculate prescaler and divisor values */
drivers/mtd/nand/Makefile +1 -1
@@ -41,7 +41,7 @@ COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o -COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.c +COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o endif
drivers/mtd/nand/s3c2410_nand.c +186 -37
309 lines not on this page · raw message
drivers/rtc/s3c24x0_rtc.c +2 -0
@@ -34,6 +34,8 @@#include <s3c2400.h> #elif defined(CONFIG_S3C2410 )#include <s3c2410.h> +#elif defined(CONFIG_S3C2440 ) +#include <s3c2440.h> #endif #include <rtc.h>
drivers/serial/serial_s3c24x0.c +2 -0
@@ -23,6 +23,8 @@#include <s3c2400.h> #elif defined(CONFIG_S3C2410 )#include <s3c2410.h> +#elif defined(CONFIG_S3C2440 ) +#include <s3c2440.h> #endif DECLARE_GLOBAL_DATA_PTR ;
include/common.h +2 -1
@@ -490,7 +490,8 @@ ulong get_OPB_freq (void);ulong get_PCI_freq (void );#endif #if defined(CONFIG_S3C2400 ) || defined(CONFIG_S3C2410 ) || \ - defined(CONFIG_LH7A40X ) || defined(CONFIG_S3C6400 ) + defined(CONFIG_LH7A40X ) || defined(CONFIG_S3C6400 ) || \ + defined(CONFIG_S3C2440 )void s3c2410_irq (void );#define ARM920_IRQ_CALLBACK s3c2410_irqulong get_FCLK (void );
include/configs/sbc2440ii.h new file +246 -0
246 lines not on this page · raw message
include/s3c2440.h new file +231 -0
231 lines not on this page · raw message
include/s3c24x0.h +83 -0
107 lines not on this page · raw message
Signature · 1 line
1.6.0.6