U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
March 2009
- 174 participants
- 417 discussions
Hi All;
Is there an available port for IMX31 3stack with NAND boot.
I am looking for a U-boot port for IMX31 stack( which supports NAND boot.
The closest matches i know of as of now are as follows:
MX-31 ADS
MX-31 Phycore
Openmoko U-boot (Samsung processor though ARM) - This is the only one
on ARM which allows NAND boot.
I haven't digged up further so I am not sure at this point which
"port" would be a good enough one as a starting point if no existing
port exists.
Thanks in Advance!
-Munro
3
15
Signed-off-by: Ladislav Michl <ladis(a)linux-mips.org>
---
cpu/arm925t/interrupts.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/cpu/arm925t/interrupts.c b/cpu/arm925t/interrupts.c
index 3ef4554..ce3c4ad 100644
--- a/cpu/arm925t/interrupts.c
+++ b/cpu/arm925t/interrupts.c
@@ -57,7 +57,7 @@ int interrupt_init (void)
/* init the timestamp and lastdec value */
reset_timer_masked();
- return (0);
+ return 0;
}
/*
@@ -84,17 +84,17 @@ void udelay (unsigned long usec)
{
ulong tmo, tmp;
- if(usec >= 1000){ /* if "big" number, spread normalization to seconds */
+ if (usec >= 1000) { /* if "big" number, spread normalization to seconds */
tmo = usec / 1000; /* start to normalize for usec to ticks per sec */
- tmo *= CONFIG_SYS_HZ; /* find number of "ticks" to wait to achieve target */
+ tmo *= CONFIG_SYS_HZ; /* find number of "ticks" to wait to achieve target */
tmo /= 1000; /* finish normalize. */
- }else{ /* else small number, don't kill it prior to HZ multiply */
+ } else { /* else small number, don't kill it prior to HZ multiply */
tmo = usec * CONFIG_SYS_HZ;
tmo /= (1000*1000);
}
tmp = get_timer (0); /* get current timestamp */
- if( (tmo + tmp + 1) < tmp ) /* if setting this fordward will roll time stamp */
+ if ((tmo + tmp + 1) < tmp) /* if setting this fordward will roll time stamp */
reset_timer_masked (); /* reset "advancing" timestamp to 0, set lastdec value */
else
tmo += tmp; /* else, set advancing stamp wake up time */
@@ -136,7 +136,7 @@ void udelay_masked (unsigned long usec)
#ifdef CONFIG_INNOVATOROMAP1510
#define LOOPS_PER_MSEC 60 /* tuned on omap1510 */
volatile int i, time_remaining = LOOPS_PER_MSEC*usec;
- for (i=time_remaining; i>0; i--) { }
+ for (i=time_remaining; i>0; i--) { }
#else
ulong tmo;
@@ -145,7 +145,7 @@ void udelay_masked (unsigned long usec)
if (usec >= 1000) { /* if "big" number, spread normalization to seconds */
tmo = usec / 1000; /* start to normalize for usec to ticks per sec */
- tmo *= CONFIG_SYS_HZ; /* find number of "ticks" to wait to achieve target */
+ tmo *= CONFIG_SYS_HZ; /* find number of "ticks" to wait to achieve target */
tmo /= 1000; /* finish normalize. */
} else { /* else small number, don't kill it prior to HZ multiply */
tmo = usec * CONFIG_SYS_HZ;
@@ -176,8 +176,5 @@ unsigned long long get_ticks(void)
*/
ulong get_tbclk (void)
{
- ulong tbclk;
-
- tbclk = CONFIG_SYS_HZ;
- return tbclk;
+ return CONFIG_SYS_HZ;
}
--
1.5.3.8
2
1

[U-Boot] [PATCH 3/3] OMAP: use {read, write}l to access timer registers
by Ladislav Michl 31 Mar '09
by Ladislav Michl 31 Mar '09
31 Mar '09
Signed-off-by: Ladislav Michl <ladis(a)linux-mips.org>
---
cpu/arm925t/interrupts.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/cpu/arm925t/interrupts.c b/cpu/arm925t/interrupts.c
index 361047b..e5c77f7 100644
--- a/cpu/arm925t/interrupts.c
+++ b/cpu/arm925t/interrupts.c
@@ -35,24 +35,21 @@
#include <common.h>
#include <arm925t.h>
#include <configs/omap1510.h>
+#include <asm/io.h>
#define TIMER_LOAD_VAL 0xffffffff
-/* macro to read the 32 bit timer */
-#define READ_TIMER (*(volatile ulong *)(CONFIG_SYS_TIMERBASE+8))
-
-static ulong timestamp;
-static ulong lastdec;
+static uint32_t timestamp;
+static uint32_t lastdec;
/* nothing really to do with interrupts, just starts up a counter. */
int interrupt_init (void)
{
- int32_t val;
-
/* Start the decrementer ticking down from 0xffffffff */
- *((int32_t *) (CONFIG_SYS_TIMERBASE + LOAD_TIM)) = TIMER_LOAD_VAL;
- val = MPUTIM_ST | MPUTIM_AR | MPUTIM_CLOCK_ENABLE | (CONFIG_SYS_PTV << MPUTIM_PTV_BIT);
- *((int32_t *) (CONFIG_SYS_TIMERBASE + CNTL_TIMER)) = val;
+ __raw_writel(TIMER_LOAD_VAL, CONFIG_SYS_TIMERBASE + LOAD_TIM);
+ __raw_writel(MPUTIM_ST | MPUTIM_AR | MPUTIM_CLOCK_ENABLE |
+ (CONFIG_SYS_PTV << MPUTIM_PTV_BIT),
+ CONFIG_SYS_TIMERBASE + CNTL_TIMER);
/* init the timestamp and lastdec value */
reset_timer_masked();
@@ -106,13 +103,13 @@ void udelay (unsigned long usec)
void reset_timer_masked (void)
{
/* reset time */
- lastdec = READ_TIMER; /* capure current decrementer value time */
+ lastdec = __raw_readl(CONFIG_SYS_TIMERBASE + READ_TIM);
timestamp = 0; /* start "advancing" time stamp from 0 */
}
ulong get_timer_masked (void)
{
- ulong now = READ_TIMER; /* current tick value */
+ uint32_t now = __raw_readl(CONFIG_SYS_TIMERBASE + READ_TIM);
if (lastdec >= now) { /* normal mode (non roll) */
/* normal mode */
--
1.5.3.8
2
1
Essential for any marketer:
==> 164,981 Dentists
==> 158,097 Addresses
==> 163,814 Contact Phone #
==> 77,663 Fax Nos.
==> 45,061 E-Mail Addresses
from today until this Friday this can be yours for just $296 (usually $592)
To inquire please write to MaxineValenzuela(a)statlists.com
By emailing delete9(a)statlists.com you will have your email taken off
1
0
Hi Wolfgang,
Please pull
The following changes since commit 88685b5f62274167ad2ba8a58e108d89ff71955b:
Wolfgang Denk (1):
VCMA9: fix compile errors
are available in the git repository at:
git://git.denx.de/u-boot-arm.git master
Jean-Christophe PLAGNIOL-VILLARD (19):
s3c4510b: move specific code to soc directory
s3c44b0: move i2c driver to drivers/i2c
s3c44b0: move rtc driver to drivers/rtc
s3c44b0: move serial driver to drivers/serial
s3c44b0: extract cache from cpu.c
sa1100: move serial driver to drivers/serial
netarm: move serial driver to drivers/serial
imx31: move serial driver to drivers/serial
s3c64xx: move usb driver to drivers/usb
ks8695: move serial driver to drivers/serial
lpc2292: move serial driver to drivers/serial
arm720t/clps7111: move serial driver to drivers/serial
omap3: remove duplicate interrupts code
imx: move serial driver to drivers/serial
davinci: move nand driver to drivers/mtd/nand
davinci: move i2c driver to drivers/i2c
s3c24x0: move serial driver to drivers/serial
s3c24x0: move i2c driver to drivers/i2c
s3c2410: move nand driver to drivers/mtd/nand
Ladislav Michl (7):
Remove nowhere used symbol CONFIG_SYS_CLKS_IN_HZ
NetStar: update crcit utility
NetStar: use generic flash driver
NetStar: add RTC support
OMAP: reindent timer code
OMAP: rename timer divisor
OMAP: use {read,write}l to access timer registers
Makefile | 2 +-
board/netstar/Makefile | 2 +-
board/netstar/crcit.c | 14 +-
board/netstar/flash.c | 343 ----------------
board/netstar/netstar.c | 20 +
cpu/arm1136/mx31/Makefile | 2 +-
cpu/arm1136/omap24xx/interrupts.c | 2 +-
cpu/arm1176/s3c64xx/Makefile | 1 -
cpu/arm720t/Makefile | 2 +-
cpu/arm720t/cpu.c | 62 ---
cpu/arm720t/s3c4510b/Makefile | 46 ++
cpu/arm720t/s3c4510b/cache.c | 86 ++++
cpu/arm720t/serial.c | 202 ---------
cpu/arm920t/imx/Makefile | 2 +-
cpu/arm920t/ks8695/Makefile | 2 +-
cpu/arm920t/s3c24x0/Makefile | 3 +-
cpu/arm925t/interrupts.c | 40 +-
cpu/arm926ejs/davinci/Makefile | 2 +-
cpu/arm926ejs/omap/timer.c | 2 +-
cpu/arm_cortexa8/omap3/interrupts.c | 130 +------
cpu/s3c44b0/Makefile | 2 +-
cpu/s3c44b0/cache.c | 91 ++++
cpu/s3c44b0/cpu.c | 430 --------------------
cpu/sa1100/Makefile | 2 +-
drivers/i2c/Makefile | 3 +
.../davinci/i2c.c => drivers/i2c/davinci_i2c.c | 5 -
.../s3c24x0/i2c.c => drivers/i2c/s3c24x0_i2c.c | 5 -
drivers/i2c/s3c44b0_i2c.c | 315 ++++++++++++++
drivers/mtd/nand/Makefile | 2 +
.../nand.c => drivers/mtd/nand/davinci_nand.c | 9 -
.../nand.c => drivers/mtd/nand/s3c2410_nand.c | 8 -
drivers/rtc/Makefile | 1 +
drivers/rtc/s3c44b0_rtc.c | 102 +++++
drivers/serial/Makefile | 9 +
.../serial.c => drivers/serial/serial_clps7111.c | 97 ++---
.../imx/serial.c => drivers/serial/serial_imx.c | 6 -
.../serial.c => drivers/serial/serial_ks8695.c | 0
drivers/serial/serial_lpc2292.c | 105 +++++
.../mx31/serial.c => drivers/serial/serial_mx31.c | 6 -
{cpu/arm720t => drivers/serial}/serial_netarm.c | 5 -
.../serial.c => drivers/serial/serial_s3c24x0.c | 4 -
.../serial.c => drivers/serial/serial_s3c44b0.c | 0
.../serial.c => drivers/serial/serial_sa1100.c | 0
drivers/usb/Makefile | 1 +
.../s3c64xx/usb.c => drivers/usb/s3c64xx_usb.c | 0
include/asm-arm/arch-arm720t/hardware.h | 4 +-
.../s3c4510b.h => arch-s3c4510b/hardware.h} | 0
include/configs/ADNPESC1.h | 1 -
include/configs/B2.h | 6 +-
include/configs/DK1C20.h | 1 -
include/configs/DK1S10.h | 1 -
include/configs/EXBITGEN.h | 2 -
include/configs/SMN42.h | 3 +-
include/configs/SX1.h | 8 +-
include/configs/VCMA9.h | 4 +-
include/configs/W7OLMC.h | 2 -
include/configs/W7OLMG.h | 2 -
include/configs/actux1.h | 2 -
include/configs/actux2.h | 2 -
include/configs/actux3.h | 2 -
include/configs/actux4.h | 2 -
include/configs/apollon.h | 7 +-
include/configs/armadillo.h | 3 +-
include/configs/assabet.h | 3 +-
include/configs/cerf250.h | 2 -
include/configs/cm4008.h | 3 +-
include/configs/cm41xx.h | 3 +-
include/configs/cradle.h | 2 -
include/configs/csb226.h | 2 -
include/configs/csb272.h | 1 -
include/configs/csb472.h | 1 -
include/configs/davinci_dvevm.h | 1 +
include/configs/davinci_schmoogie.h | 1 +
include/configs/davinci_sffsdr.h | 1 +
include/configs/davinci_sonata.h | 1 +
include/configs/delta.h | 2 -
include/configs/dnp1110.h | 3 +-
include/configs/eNET.h | 2 -
include/configs/ep7312.h | 3 +-
include/configs/evb4510.h | 2 -
include/configs/gcplus.h | 3 +-
include/configs/hymod.h | 2 -
include/configs/impa7.h | 3 +-
include/configs/innokom.h | 2 -
include/configs/integratorap.h | 1 -
include/configs/integratorcp.h | 1 -
include/configs/ixdp425.h | 2 -
include/configs/ixdpg425.h | 1 -
include/configs/lart.h | 3 +-
include/configs/logodl.h | 2 -
include/configs/lpc2292sodimm.h | 3 +-
include/configs/lpd7a400.h | 2 -
include/configs/lpd7a404.h | 2 -
include/configs/lubbock.h | 2 -
include/configs/modnet50.h | 3 +-
include/configs/mx1ads.h | 2 +-
include/configs/mx1fs2.h | 5 +-
include/configs/netstar.h | 35 +-
include/configs/nmdk8815.h | 1 -
include/configs/ns9750dev.h | 2 -
include/configs/omap1510inn.h | 8 +-
include/configs/omap1610h2.h | 6 +-
include/configs/omap1610inn.h | 6 +-
include/configs/omap2420h4.h | 12 +-
include/configs/omap3_beagle.h | 8 +-
include/configs/omap3_evm.h | 9 +-
include/configs/omap3_overo.h | 9 +-
include/configs/omap3_pandora.h | 9 +-
include/configs/omap3_zoom1.h | 8 +-
include/configs/omap5912osk.h | 6 +-
include/configs/omap730p2.h | 9 +-
include/configs/pdnb3.h | 1 -
include/configs/pleb2.h | 2 -
include/configs/pxa255_idp.h | 2 -
include/configs/sbc2410x.h | 4 +-
include/configs/sc520_cdp.h | 2 -
include/configs/sc520_spunk.h | 2 -
include/configs/scb9328.h | 3 +-
include/configs/shannon.h | 3 +-
include/configs/smdk2400.h | 3 +-
include/configs/smdk2410.h | 3 +-
include/configs/smdk6400.h | 1 +
include/configs/trab.h | 3 +-
include/configs/trizepsiv.h | 2 -
include/configs/versatile.h | 1 -
include/configs/voiceblue.h | 8 +-
include/configs/wepep250.h | 2 -
include/configs/xaeniax.h | 2 -
include/configs/xm250.h | 2 -
include/configs/xsengine.h | 1 -
include/configs/zylonite.h | 2 -
131 files changed, 936 insertions(+), 1538 deletions(-)
delete mode 100644 board/netstar/flash.c
create mode 100644 cpu/arm720t/s3c4510b/Makefile
create mode 100644 cpu/arm720t/s3c4510b/cache.c
delete mode 100644 cpu/arm720t/serial.c
create mode 100644 cpu/s3c44b0/cache.c
rename cpu/arm926ejs/davinci/i2c.c => drivers/i2c/davinci_i2c.c (98%)
rename cpu/arm920t/s3c24x0/i2c.c => drivers/i2c/s3c24x0_i2c.c (99%)
create mode 100644 drivers/i2c/s3c44b0_i2c.c
rename cpu/arm926ejs/davinci/nand.c => drivers/mtd/nand/davinci_nand.c (98%)
rename cpu/arm920t/s3c24x0/nand.c => drivers/mtd/nand/s3c2410_nand.c (96%)
create mode 100644 drivers/rtc/s3c44b0_rtc.c
copy cpu/sa1100/serial.c => drivers/serial/serial_clps7111.c (56%)
rename cpu/arm920t/imx/serial.c => drivers/serial/serial_imx.c (97%)
rename cpu/arm920t/ks8695/serial.c => drivers/serial/serial_ks8695.c (100%)
create mode 100644 drivers/serial/serial_lpc2292.c
rename cpu/arm1136/mx31/serial.c => drivers/serial/serial_mx31.c (99%)
rename {cpu/arm720t => drivers/serial}/serial_netarm.c (99%)
rename cpu/arm920t/s3c24x0/serial.c => drivers/serial/serial_s3c24x0.c (97%)
rename cpu/s3c44b0/serial.c => drivers/serial/serial_s3c44b0.c (100%)
rename cpu/sa1100/serial.c => drivers/serial/serial_sa1100.c (100%)
rename cpu/arm1176/s3c64xx/usb.c => drivers/usb/s3c64xx_usb.c (100%)
rename include/asm-arm/{arch-arm720t/s3c4510b.h => arch-s3c4510b/hardware.h} (100%)
Best Regards,
J.
3
8

31 Mar '09
Hi All,
I want to create an elf file which U-Boot understands and I should
be able to use bootelf command to boot it.
I searched the email archives and I did not find anything
helpful.
Does anybody has any pointers?
I am working using standard gnu cross compiler, on
an MCF5484 evaluation kit.
Regards,
Arun C
2
1

[U-Boot] [PATCH 1/1] at91: add support for the PM9263 board of Ronetix
by RONETIX - Ilko Iliev 31 Mar '09
by RONETIX - Ilko Iliev 31 Mar '09
31 Mar '09
The PM9263 board is based on the AT91SAM9263-EK board.
Here is the page on Ronetix website:
http://www.ronetix.at/starter_kit_9263.html
Signed-off-by: Ilko Iliev <iliev(a)ronetix.at>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj(a)jcrosoft.com>
---
MAINTAINERS | 4 +
MAKEALL | 1 +
Makefile | 4 +
board/ronetix/pm9263/Makefile | 61 +++
board/ronetix/pm9263/config.mk | 1 +
.../lowlevel_init.S => board/ronetix/pm9263/led.c | 32 +-
board/ronetix/pm9263/lowlevel_init.S | 279 +++++++++++++
board/ronetix/pm9263/partition.c | 47 +++
board/ronetix/pm9263/pm9263.c | 413
++++++++++++++++++++
cpu/arm926ejs/at91/Makefile | 5 +-
cpu/arm926ejs/at91/config.mk | 2 +-
cpu/arm926ejs/at91/lowlevel_init.S | 2 +
cpu/arm926ejs/at91/{u-boot.lds => u-boot.lds.S} | 9 +-
include/asm-arm/arch-at91/at91sam9263.h | 1 +
include/asm-arm/arch-at91/at91sam9_sdramc.h | 87 ++++
include/asm-arm/arch-at91/hardware.h | 17 +
include/configs/pm9263.h | 367 +++++++++++++++++
tools/Makefile | 3 +
tools/logos/ronetix.bmp | Bin 0 -> 5638 bytes
19 files changed, 1315 insertions(+), 20 deletions(-)
create mode 100644 board/ronetix/pm9263/Makefile
create mode 100644 board/ronetix/pm9263/config.mk
copy cpu/arm926ejs/at91/lowlevel_init.S => board/ronetix/pm9263/led.c (65%)
create mode 100644 board/ronetix/pm9263/lowlevel_init.S
create mode 100644 board/ronetix/pm9263/partition.c
create mode 100644 board/ronetix/pm9263/pm9263.c
rename cpu/arm926ejs/at91/{u-boot.lds => u-boot.lds.S} (90%)
create mode 100644 include/asm-arm/arch-at91/at91sam9_sdramc.h
create mode 100644 include/configs/pm9263.h
create mode 100644 tools/logos/ronetix.bmp
diff --git a/MAINTAINERS b/MAINTAINERS
index 25b28d6..efd04f0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -204,6 +204,10 @@ Klaus Heydeck <heydeck(a)kieback-peter.de>
KUP4K MPC855
KUP4X MPC859
+Ilko Iliev <iliev(a)ronetix.at>
+
+ PM9263 AT91SAM9263
+
Gary Jennejohn <garyj(a)denx.de>
quad100hd PPC405EP
diff --git a/MAKEALL b/MAKEALL
index 89f1c55..2cde057 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -581,6 +581,7 @@ LIST_at91=" \
kb9202 \
mp2usb \
m501sk \
+ pm9263 \
"
#########################################################################
diff --git a/Makefile b/Makefile
index a9f25c9..51cb69d 100644
--- a/Makefile
+++ b/Makefile
@@ -2743,6 +2743,9 @@ at91sam9rlek_config : unconfig
fi;
@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
+pm9263_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
+
########################################################################
## ARM Integrator boards - see doc/README-integrator for more info.
integratorap_config \
@@ -3511,6 +3514,7 @@ clean:
$(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom \
$(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \
$(obj)board/{bf533-ezkit,bf533-stamp,bf537-stamp,bf561-ezkit}/u-boot.lds \
+ $(obj)cpu/arm926ejs/at91/u-boot.lds \
$(obj)cpu/blackfin/bootrom-asm-offsets.[chs]
@rm -f $(obj)include/bmp_logo.h
@rm -f $(obj)nand_spl/{u-boot-spl,u-boot-spl.map,System.map}
diff --git a/board/ronetix/pm9263/Makefile b/board/ronetix/pm9263/Makefile
new file mode 100644
index 0000000..270abd8
--- /dev/null
+++ b/board/ronetix/pm9263/Makefile
@@ -0,0 +1,61 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, wd(a)denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop <stelian.pop(a)leadtechdesign.com>
+# Lead Tech Design <www.leadtechdesign.com>
+# Ilko Iliev <www.ronetix.at>
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS-y += pm9263.o
+COBJS-y += led.o
+COBJS-$(CONFIG_HAS_DATAFLASH) += partition.o
+
+ifndef CONFIG_SKIP_LOWLEVEL_INIT
+SOBJS-y := lowlevel_init.o
+endif
+
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
+SOBJS := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/ronetix/pm9263/config.mk b/board/ronetix/pm9263/config.mk
new file mode 100644
index 0000000..ff2cfd1
--- /dev/null
+++ b/board/ronetix/pm9263/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
diff --git a/cpu/arm926ejs/at91/lowlevel_init.S b/board/ronetix/pm9263/led.c
similarity index 65%
copy from cpu/arm926ejs/at91/lowlevel_init.S
copy to board/ronetix/pm9263/led.c
index ec6ad5d..fe1a1d2 100644
--- a/cpu/arm926ejs/at91/lowlevel_init.S
+++ b/board/ronetix/pm9263/led.c
@@ -1,9 +1,8 @@
/*
- * AT91CAP9/SAM9 setup stuff
- *
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop(a)leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
+ * Ilko Iliev <www.ronetix.at>
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -24,20 +23,21 @@
* MA 02111-1307 USA
*/
-#include <config.h>
-#include <version.h>
-
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-
-.globl lowlevel_init
-lowlevel_init:
+#include <common.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
- /*
- * Clocks/SDRAM initialization is handled by at91bootstrap,
- * no need to do it here...
- */
- mov pc, lr
+void coloured_LED_init(void)
+{
+ /* Enable clock */
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_PIOB |
+ 1 << AT91SAM9263_ID_PIOCDE);
- .ltorg
+ at91_set_gpio_output(CONFIG_RED_LED, 1);
+ at91_set_gpio_output(CONFIG_GREEN_LED, 1);
-#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
+ at91_set_gpio_value(CONFIG_RED_LED, 0);
+ at91_set_gpio_value(CONFIG_GREEN_LED, 1);
+}
diff --git a/board/ronetix/pm9263/lowlevel_init.S
b/board/ronetix/pm9263/lowlevel_init.S
new file mode 100644
index 0000000..7b506ae
--- /dev/null
+++ b/board/ronetix/pm9263/lowlevel_init.S
@@ -0,0 +1,279 @@
+/*
+ * Memory Setup stuff - taken from blob memsetup.S
+ *
+ * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw(a)its.tudelft.nl) and
+ * Jan-Derk Bakker (J.D.Bakker(a)its.tudelft.nl)
+ *
+ * Copyright (C) 2008 Ronetix Ilko Iliev (www.ronetix.at)
+ * Copyright (C) 2009 Jean-Christopher PLAGNIOL-VILLARD
<plagnioj(a)jcrosoft.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 <config.h>
+#include <version.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_pio.h>
+#include <asm/arch/at91_rstc.h>
+#include <asm/arch/at91_wdt.h>
+#include <asm/arch/at91sam9_sdramc.h>
+#include <asm/arch/at91sam9_smc.h>
+#include <asm/arch/at91sam9263_matrix.h>
+
+_TEXT_BASE:
+ .word TEXT_BASE
+
+.globl lowlevel_init
+.type lowlevel_init,function
+lowlevel_init:
+
+ mov r5, pc /* r5 = POS1 + 4 current */
+POS1:
+ ldr r0, =POS1 /* r0 = POS1 compile */
+ ldr r2, _TEXT_BASE
+ sub r0, r0, r2 /* r0 = POS1-_TEXT_BASE (POS1 relative) */
+ sub r5, r5, r0 /* r0 = TEXT_BASE-1 */
+ sub r5, r5, #4 /* r1 = text base - current */
+
+ /* memory control configuration 1 */
+ ldr r0, =SMRDATA
+ ldr r2, =SMRDATA1
+ ldr r1, _TEXT_BASE
+ sub r0, r0, r1
+ sub r2, r2, r1
+ add r0, r0, r5
+ add r2, r2, r5
+0:
+ /* the address */
+ ldr r1, [r0], #4
+ /* the value */
+ ldr r3, [r0], #4
+ str r3, [r1]
+ cmp r2, r0
+ bne 0b
+
+/*
----------------------------------------------------------------------------
+ * PMC Init Step 1.
+ *
----------------------------------------------------------------------------
+ * - Check if the PLL is already initialized
+ *
----------------------------------------------------------------------------
+ */
+ ldr r1, =(AT91_BASE_SYS + AT91_PMC_MCKR)
+ ldr r0, [r1]
+ and r0, r0, #3
+ cmp r0, #0
+ bne PLL_setup_end
+
+/*
---------------------------------------------------------------------------
+ * - Enable the Main Oscillator
+ *
---------------------------------------------------------------------------
+ */
+ ldr r1, =(AT91_BASE_SYS + AT91_CKGR_MOR)
+ ldr r2, =(AT91_BASE_SYS + AT91_PMC_SR)
+ ldr r0, =0x0000FF01
+ str r0, [r1] /* Enable main oscillator, OSCOUNT = 0xFF */
+
+ /* Reading the PMC Status to detect when the Main Oscillator is
enabled */
+ mov r4, #AT91_PMC_MOSCS
+MOSCS_Loop:
+ ldr r3, [r2]
+ and r3, r4, r3
+ cmp r3, #AT91_PMC_MOSCS
+ bne MOSCS_Loop
+
+/*
----------------------------------------------------------------------------
+ * PMC Init Step 2.
+ *
----------------------------------------------------------------------------
+ * Setup PLLA
+ *
----------------------------------------------------------------------------
+ */
+ ldr r1, =(AT91_BASE_SYS + AT91_CKGR_PLLAR)
+ ldr r0, =CONFIG_SYS_PLLAR_VAL
+ str r0, [r1]
+
+ /* Reading the PMC Status register to detect when the PLLA is locked */
+ mov r4, #AT91_PMC_LOCKA
+MOSCS_Loop1:
+ ldr r3, [r2]
+ and r3, r4, r3
+ cmp r3, #AT91_PMC_LOCKA
+ bne MOSCS_Loop1
+
+/*
----------------------------------------------------------------------------
+ * PMC Init Step 3.
+ *
----------------------------------------------------------------------------
+ * - Switch on the Main Oscillator 18.432 MHz
+ *
----------------------------------------------------------------------------
+ */
+ ldr r1, =(AT91_BASE_SYS + AT91_PMC_MCKR)
+
+ /* -Master Clock Controller register PMC_MCKR */
+ ldr r0, =CONFIG_SYS_MCKR1_VAL
+ str r0, [r1]
+
+ /* Reading the PMC Status to detect when the Master clock is ready */
+ mov r4, #AT91_PMC_MCKRDY
+MCKRDY_Loop:
+ ldr r3, [r2]
+ and r3, r4, r3
+ cmp r3, #AT91_PMC_MCKRDY
+ bne MCKRDY_Loop
+
+ ldr r0, =CONFIG_SYS_MCKR2_VAL
+ str r0, [r1]
+
+ /* Reading the PMC Status to detect when the Master clock is ready */
+ mov r4, #AT91_PMC_MCKRDY
+MCKRDY_Loop1:
+ ldr r3, [r2]
+ and r3, r4, r3
+ cmp r3, #AT91_PMC_MCKRDY
+ bne MCKRDY_Loop1
+
+PLL_setup_end:
+
+/*
----------------------------------------------------------------------------
+ * - memory control configuration 2
+ *
----------------------------------------------------------------------------
+ */
+ ldr r0, =(AT91_BASE_SYS + AT91_SDRAMC_TR)
+ ldr r1, [r0]
+ cmp r1, #0
+ bne SDRAM_setup_end
+
+ ldr r0, =SMRDATA1
+ ldr r2, =SMRDATA2
+ ldr r1, _TEXT_BASE
+ sub r0, r0, r1
+ sub r2, r2, r1
+ add r0, r0, r5
+ add r2, r2, r5
+
+2:
+ /* the address */
+ ldr r1, [r0], #4
+ /* the value */
+ ldr r3, [r0], #4
+ str r3, [r1]
+ cmp r2, r0
+ bne 2b
+
+SDRAM_setup_end:
+ /* everything is fine now */
+ mov pc, lr
+
+ .ltorg
+
+SMRDATA:
+ .word (AT91_BASE_SYS + AT91_WDT_MR)
+ .word CONFIG_SYS_WDTC_WDMR_VAL
+
+ .word (AT91_BASE_SYS + AT91_PIOD + PIO_PDR)
+ .word CONFIG_SYS_PIOD_PDR_VAL1
+ .word (AT91_BASE_SYS + AT91_PIOD + PIO_PUDR)
+ .word CONFIG_SYS_PIOD_PPUDR_VAL
+ .word (AT91_BASE_SYS + AT91_PIOD + PIO_ASR)
+ .word CONFIG_SYS_PIOD_PPUDR_VAL
+
+ .word (AT91_BASE_SYS + AT91_MATRIX_EBI0CSA)
+ .word CONFIG_SYS_MATRIX_EBI0CSA_VAL
+ .word (AT91_BASE_SYS + AT91_MATRIX_EBI1CSA)
+ .word CONFIG_SYS_MATRIX_EBI1CSA_VAL
+
+ /* flash */
+ .word (AT91_BASE_SYS + AT91_SMC_MODE(0))
+ .word CONFIG_SYS_SMC0_CTRL0_VAL
+
+ .word (AT91_BASE_SYS + AT91_SMC_CYCLE(0))
+ .word CONFIG_SYS_SMC0_CYCLE0_VAL
+
+ .word (AT91_BASE_SYS + AT91_SMC_PULSE(0))
+ .word CONFIG_SYS_SMC0_PULSE0_VAL
+
+ .word (AT91_BASE_SYS + AT91_SMC_SETUP(0))
+ .word CONFIG_SYS_SMC0_SETUP0_VAL
+
+ /* PSRAM */
+ .word (AT91_BASE_SYS + AT91_SMC1_MODE(0))
+ .word CONFIG_SYS_SMC1_CTRL0_VAL
+
+ .word (AT91_BASE_SYS + AT91_SMC1_CYCLE(0))
+ .word CONFIG_SYS_SMC1_CYCLE0_VAL
+
+ .word (AT91_BASE_SYS + AT91_SMC1_PULSE(0))
+ .word CONFIG_SYS_SMC1_PULSE0_VAL
+
+ .word (AT91_BASE_SYS + AT91_SMC1_SETUP(0))
+ .word CONFIG_SYS_SMC1_SETUP0_VAL
+
+SMRDATA1:
+ .word (AT91_BASE_SYS + AT91_SDRAMC_MR)
+ .word CONFIG_SYS_SDRC_MR_VAL1
+ .word (AT91_BASE_SYS + AT91_SDRAMC_TR)
+ .word CONFIG_SYS_SDRC_TR_VAL1
+ .word (AT91_BASE_SYS + AT91_SDRAMC_CR)
+ .word CONFIG_SYS_SDRC_CR_VAL
+ .word (AT91_BASE_SYS + AT91_SDRAMC_MDR)
+ .word CONFIG_SYS_SDRC_MDR_VAL
+ .word (AT91_BASE_SYS + AT91_SDRAMC_MR)
+ .word CONFIG_SYS_SDRC_MR_VAL2
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL1
+ .word (AT91_BASE_SYS + AT91_SDRAMC_MR)
+ .word CONFIG_SYS_SDRC_MR_VAL3
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL2
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL3
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL4
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL5
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL6
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL7
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL8
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL9
+ .word (AT91_BASE_SYS + AT91_SDRAMC_MR)
+ .word CONFIG_SYS_SDRC_MR_VAL4
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL10
+ .word (AT91_BASE_SYS + AT91_SDRAMC_MR)
+ .word CONFIG_SYS_SDRC_MR_VAL5
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL11
+ .word (AT91_BASE_SYS + AT91_SDRAMC_TR)
+ .word CONFIG_SYS_SDRC_TR_VAL2
+ .word AT91_SDRAM_BASE
+ .word CONFIG_SYS_SDRAM_VAL12
+ /* User reset enable*/
+ .word (AT91_BASE_SYS + AT91_RSTC_MR)
+ .word CONFIG_SYS_RSTC_RMR_VAL
+#ifdef CONFIG_SYS_MATRIX_MCFG_REMAP
+ /* MATRIX_MCFG - REMAP all masters */
+ .word (AT91_BASE_SYS + AT91_MATRIX_MCFG0)
+ .word 0x1FF
+#endif
+
+SMRDATA2:
+ .word 0
diff --git a/board/ronetix/pm9263/partition.c
b/board/ronetix/pm9263/partition.c
new file mode 100644
index 0000000..95ac398
--- /dev/null
+++ b/board/ronetix/pm9263/partition.c
@@ -0,0 +1,47 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf(a)atmel.com>
+ * Ilko Iliev <www.ronetix.at>
+ *
+ * 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_CS0, 0}, /* Logical adress, CS */
+};
+
+/*define the area offsets*/
+#ifdef CONFIG_SYS_USE_DATAFLASH
+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"},
+};
+#else
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+ {0x00000000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, ""},
+};
+
+#endif
diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
new file mode 100644
index 0000000..801b268
--- /dev/null
+++ b/board/ronetix/pm9263/pm9263.c
@@ -0,0 +1,413 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop(a)leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ * Copyright (C) 2008 Ronetix Ilko Iliev (www.ronetix.at)
+ * Copyright (C) 2009 Jean-Christopher PLAGNIOL-VILLARD
<plagnioj(a)jcrosoft.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/sizes.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/at91sam9263_matrix.h>
+#include <asm/arch/at91sam9_smc.h>
+#include <asm/arch/at91_common.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_rstc.h>
+#include <asm/arch/clk.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
+#include <lcd.h>
+#include <atmel_lcdc.h>
+#include <dataflash.h>
+#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
+#include <net.h>
+#endif
+#include <netdev.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
------------------------------------------------------------------------- */
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+#ifdef CONFIG_CMD_NAND
+static void pm9263_nand_hw_init(void)
+{
+ unsigned long csa;
+
+ /* Enable CS3 */
+ csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
+ at91_sys_write(AT91_MATRIX_EBI0CSA,
+ csa | AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA);
+
+ /* Configure SMC CS3 for NAND/SmartMedia */
+ at91_sys_write(AT91_SMC_SETUP(3),
+ AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(1) |
+ AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(1));
+ at91_sys_write(AT91_SMC_PULSE(3),
+ 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 |
+#ifdef CONFIG_SYS_NAND_DBW_16
+ AT91_SMC_DBW_16 |
+#else /* CONFIG_SYS_NAND_DBW_8 */
+ AT91_SMC_DBW_8 |
+#endif
+ AT91_SMC_TDF_(2));
+
+ /* Configure RDY/BSY */
+ at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
+
+ /* Enable NandFlash */
+ at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
+}
+#endif
+
+#ifdef CONFIG_MACB
+static void pm9263_macb_hw_init(void)
+{
+ /*
+ * PB27 enables the 50MHz oscillator for Ethernet PHY
+ * 1 - enable
+ * 0 - disable
+ */
+ at91_set_gpio_output(AT91_PIN_PB27, 1);
+ at91_set_gpio_value(AT91_PIN_PB27, 1); /* 1- enable, 0 - disable */
+
+ /* Enable clock */
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_EMAC);
+
+ /*
+ * Disable pull-up on:
+ * RXDV (PC25) => PHY normal mode (not Test mode)
+ * ERX0 (PE25) => PHY ADDR0
+ * ERX1 (PE26) => PHY ADDR1 => PHYADDR = 0x0
+ *
+ * PHY has internal pull-down
+ */
+ writel(pin_to_mask(AT91_PIN_PC25),
+ pin_to_controller(AT91_PIN_PC0) + PIO_PUDR);
+ writel(pin_to_mask(AT91_PIN_PE25) |
+ pin_to_mask(AT91_PIN_PE26),
+ pin_to_controller(AT91_PIN_PE0) + PIO_PUDR);
+
+
+ /* Re-enable pull-up */
+ writel(pin_to_mask(AT91_PIN_PC25),
+ pin_to_controller(AT91_PIN_PC0) + PIO_PUER);
+ writel(pin_to_mask(AT91_PIN_PE25) |
+ pin_to_mask(AT91_PIN_PE26),
+ pin_to_controller(AT91_PIN_PE0) + PIO_PUER);
+
+ at91_macb_hw_init();
+}
+#endif
+
+#ifdef CONFIG_LCD
+vidinfo_t panel_info = {
+ vl_col: 240,
+ vl_row: 320,
+ vl_clk: 4965000,
+ vl_sync: ATMEL_LCDC_INVLINE_INVERTED |
+ ATMEL_LCDC_INVFRAME_INVERTED,
+ vl_bpix: 3,
+ vl_tft: 1,
+ vl_hsync_len: 5,
+ vl_left_margin: 1,
+ vl_right_margin:33,
+ vl_vsync_len: 1,
+ vl_upper_margin:1,
+ vl_lower_margin:0,
+ mmio: AT91SAM9263_LCDC_BASE,
+};
+
+void lcd_enable(void)
+{
+ at91_set_gpio_value(AT91_PIN_PA22, 1); /* power up */
+}
+
+void lcd_disable(void)
+{
+ at91_set_gpio_value(AT91_PIN_PA22, 0); /* power down */
+}
+
+#ifdef CONFIG_LCD_IN_PSRAM
+
+#define PSRAM_CRE_PIN AT91_PIN_PB29
+#define PSRAM_CTRL_REG (PHYS_PSRAM + PHYS_PSRAM_SIZE - 2)
+
+/* Initialize the PSRAM memory */
+static int pm9263_lcd_hw_psram_init(void)
+{
+ volatile uint16_t x;
+
+ /* setup PB29 as output */
+ at91_set_gpio_output(PSRAM_CRE_PIN, 1);
+
+ at91_set_gpio_value(PSRAM_CRE_PIN, 0); /* set PSRAM_CRE_PIN to
'0' */
+
+ /* PSRAM: write BCR */
+ x = readw(PSRAM_CTRL_REG);
+ x = readw(PSRAM_CTRL_REG);
+ writew(1, PSRAM_CTRL_REG); /* 0 - RCR,1 - BCR */
+ writew(0x9d4f, PSRAM_CTRL_REG); /* write the BCR */
+
+ /* write RCR of the PSRAM */
+ x = readw(PSRAM_CTRL_REG);
+ x = readw(PSRAM_CTRL_REG);
+ writew(0, PSRAM_CTRL_REG); /* 0 - RCR,1 - BCR */
+ /* set RCR; 0x10-async mode,0x90-page mode */
+ writew(0x90, PSRAM_CTRL_REG);
+
+ /*
+ * test to see if the PSRAM is MT45W2M16A or MT45W2M16B
+ * MT45W2M16B - CRE must be 0
+ * MT45W2M16A - CRE must be 1
+ */
+ writew(0x1234, PHYS_PSRAM);
+ writew(0x5678, PHYS_PSRAM + 2);
+
+ /* test if the chip is MT45W2M16B */
+ if ((readw(PHYS_PSRAM) != 0x1234) || (readw(PHYS_PSRAM+2) != 0x5678)) {
+ /* try with CRE=1 (MT45W2M16A) */
+ at91_set_gpio_value(PSRAM_CRE_PIN, 1); /* set PSRAM_CRE_PIN to
'1' */
+
+ /* write RCR of the PSRAM */
+ x = readw(PSRAM_CTRL_REG);
+ x = readw(PSRAM_CTRL_REG);
+ writew(0, PSRAM_CTRL_REG); /* 0 - RCR,1 - BCR */
+ /* set RCR;0x10-async mode,0x90-page mode */
+ writew(0x90, PSRAM_CTRL_REG);
+
+
+ writew(0x1234, PHYS_PSRAM);
+ writew(0x5678, PHYS_PSRAM+2);
+ if ((readw(PHYS_PSRAM) != 0x1234)
+ || (readw(PHYS_PSRAM + 2) != 0x5678))
+ return 1;
+
+ }
+
+ /* Bus matrix */
+ at91_sys_write( AT91_MATRIX_PRAS5, AT91_MATRIX_M5PR );
+ at91_sys_write( AT91_MATRIX_SCFG5, AT91_MATRIX_ARBT_FIXED_PRIORITY |
+ (AT91_MATRIX_FIXED_DEFMSTR & (5 << 18)) |
+ AT91_MATRIX_DEFMSTR_TYPE_FIXED |
+ (AT91_MATRIX_SLOT_CYCLE & (0x80 << 0)));
+
+ return 0;
+}
+#endif
+
+static void pm9263_lcd_hw_init(void)
+{
+ at91_set_A_periph(AT91_PIN_PC0, 0); /* LCDVSYNC */
+ at91_set_A_periph(AT91_PIN_PC1, 0); /* LCDHSYNC */
+ at91_set_A_periph(AT91_PIN_PC2, 0); /* LCDDOTCK */
+ at91_set_A_periph(AT91_PIN_PC3, 0); /* LCDDEN */
+ at91_set_B_periph(AT91_PIN_PB9, 0); /* LCDCC */
+ at91_set_A_periph(AT91_PIN_PC6, 0); /* LCDD2 */
+ at91_set_A_periph(AT91_PIN_PC7, 0); /* LCDD3 */
+ at91_set_A_periph(AT91_PIN_PC8, 0); /* LCDD4 */
+ at91_set_A_periph(AT91_PIN_PC9, 0); /* LCDD5 */
+ at91_set_A_periph(AT91_PIN_PC10, 0); /* LCDD6 */
+ at91_set_A_periph(AT91_PIN_PC11, 0); /* LCDD7 */
+ at91_set_A_periph(AT91_PIN_PC14, 0); /* LCDD10 */
+ at91_set_A_periph(AT91_PIN_PC15, 0); /* LCDD11 */
+ at91_set_A_periph(AT91_PIN_PC16, 0); /* LCDD12 */
+ at91_set_B_periph(AT91_PIN_PC12, 0); /* LCDD13 */
+ at91_set_A_periph(AT91_PIN_PC18, 0); /* LCDD14 */
+ at91_set_A_periph(AT91_PIN_PC19, 0); /* LCDD15 */
+ at91_set_A_periph(AT91_PIN_PC22, 0); /* LCDD18 */
+ at91_set_A_periph(AT91_PIN_PC23, 0); /* LCDD19 */
+ at91_set_A_periph(AT91_PIN_PC24, 0); /* LCDD20 */
+ at91_set_B_periph(AT91_PIN_PC17, 0); /* LCDD21 */
+ at91_set_A_periph(AT91_PIN_PC26, 0); /* LCDD22 */
+ at91_set_A_periph(AT91_PIN_PC27, 0); /* LCDD23 */
+
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_LCDC);
+
+ /* Power Control */
+ at91_set_gpio_output(AT91_PIN_PA22, 1);
+ at91_set_gpio_value(AT91_PIN_PA22, 0); /* power down */
+
+#ifdef CONFIG_LCD_IN_PSRAM
+ /* initialize te PSRAM */
+ int stat = pm9263_lcd_hw_psram_init();
+
+ gd->fb_base = (stat == 0) ? PHYS_PSRAM : AT91SAM9263_SRAM0_BASE;
+#else
+ gd->fb_base = AT91SAM9263_SRAM0_BASE;
+#endif
+
+}
+
+#ifdef CONFIG_LCD_INFO
+#include <nand.h>
+#include <version.h>
+
+extern flash_info_t flash_info[];
+
+void lcd_show_board_info(void)
+{
+ ulong dram_size, nand_size, flash_size, dataflash_size;
+ int i;
+ char temp[32];
+
+ lcd_printf ("%s\n", U_BOOT_VERSION);
+ lcd_printf ("(C) 2009 Ronetix GmbH\n");
+ lcd_printf ("support(a)ronetix.at\n");
+ lcd_printf ("%s CPU at %s MHz",
+ AT91_CPU_NAME,
+ strmhz(temp, get_cpu_clk_rate()));
+
+ dram_size = 0;
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
+ dram_size += gd->bd->bi_dram[i].size;
+
+ nand_size = 0;
+ for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++)
+ nand_size += nand_info[i].size;
+
+ flash_size = 0;
+ for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++)
+ flash_size += flash_info[i].size;
+
+ dataflash_size = 0;
+ for (i = 0; i < CONFIG_SYS_MAX_DATAFLASH_BANKS; i++)
+ dataflash_size += (unsigned int)
dataflash_info[i].Device.pages_number *
+ dataflash_info[i].Device.pages_size;
+
+ lcd_printf ("%ld MB SDRAM, %ld MB NAND\n%ld MB NOR Flash\n"
+ "4 MB PSRAM, %ld MB DataFlash\n",
+ dram_size >> 20,
+ nand_size >> 20,
+ flash_size >> 20,
+ dataflash_size >> 20);
+}
+#endif /* CONFIG_LCD_INFO */
+
+#endif /* CONFIG_LCD */
+
+int board_init(void)
+{
+ /* Enable Ctrlc */
+ console_init_f();
+
+ at91_sys_write(AT91_PMC_PCER,
+ (1 << AT91SAM9263_ID_PIOA) |
+ (1 << AT91SAM9263_ID_PIOCDE) |
+ (1 << AT91SAM9263_ID_PIOB));
+
+ /* arch number of AT91SAM9263EK-Board */
+ gd->bd->bi_arch_number = MACH_TYPE_PM9263;
+
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+
+ at91_serial_hw_init();
+#ifdef CONFIG_CMD_NAND
+ pm9263_nand_hw_init();
+#endif
+#ifdef CONFIG_HAS_DATAFLASH
+ at91_spi0_hw_init(1 << 0);
+#endif
+#ifdef CONFIG_MACB
+ pm9263_macb_hw_init();
+#endif
+#ifdef CONFIG_USB_OHCI_NEW
+ at91_uhp_hw_init();
+#endif
+#ifdef CONFIG_LCD
+ pm9263_lcd_hw_init();
+#endif
+ return 0;
+}
+
+int dram_init(void)
+{
+ gd->bd->bi_dram[0].start = PHYS_SDRAM;
+ gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+ return 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
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_MACB
+ rc = macb_eth_initialize(0, (void *)AT91SAM9263_BASE_EMAC, 0x01);
+#endif
+ return rc;
+}
+
+#ifdef CONFIG_DISPLAY_BOARDINFO
+int checkboard (void)
+{
+ char *ss;
+ char buf[32];
+
+ printf ("Board : Ronetix PM9263\n");
+ printf ("Crystal frequency: %8s MHz\n",
+ strmhz(buf, get_main_clk_rate()));
+ printf ("CPU clock : %8s MHz\n",
+ strmhz(buf, get_cpu_clk_rate()));
+ printf ("Master clock : %8s MHz\n",
+ strmhz(buf, get_mck_clk_rate()));
+
+ switch (gd->fb_base) {
+ case PHYS_PSRAM:
+ ss = "(PSRAM)";
+ break;
+
+ case AT91SAM9263_SRAM0_BASE:
+ ss = "(Internal SRAM)";
+ break;
+
+ default:
+ ss = "";
+ break;
+ }
+ printf("Video memory : 0x%08lX %s\n", gd->fb_base, ss );
+
+ printf ("\n");
+ return 0;
+}
+#endif
diff --git a/cpu/arm926ejs/at91/Makefile b/cpu/arm926ejs/at91/Makefile
index 275673c..685cee1 100644
--- a/cpu/arm926ejs/at91/Makefile
+++ b/cpu/arm926ejs/at91/Makefile
@@ -69,11 +69,14 @@ SOBJS = lowlevel_init.o
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
-all: $(obj).depend $(LIB)
+all: $(obj).depend $(LIB) $(obj)u-boot.lds
$(LIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
+$(obj)u-boot.lds: u-boot.lds.S
+ $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -DCONFIG_BOARDDIR=$(BOARDDIR) -P
$^ > $@
+
#########################################################################
# defines $(obj).depend target
diff --git a/cpu/arm926ejs/at91/config.mk b/cpu/arm926ejs/at91/config.mk
index 06177e6..147bd4c 100644
--- a/cpu/arm926ejs/at91/config.mk
+++ b/cpu/arm926ejs/at91/config.mk
@@ -1,2 +1,2 @@
PLATFORM_CPPFLAGS += $(call cc-option,-mtune=arm926ejs,)
-LDSCRIPT := $(SRCTREE)/cpu/arm926ejs/at91/u-boot.lds
+LDSCRIPT := $(OBJTREE)/cpu/arm926ejs/at91/u-boot.lds
diff --git a/cpu/arm926ejs/at91/lowlevel_init.S
b/cpu/arm926ejs/at91/lowlevel_init.S
index ec6ad5d..54b3f3d 100644
--- a/cpu/arm926ejs/at91/lowlevel_init.S
+++ b/cpu/arm926ejs/at91/lowlevel_init.S
@@ -30,6 +30,8 @@
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
.globl lowlevel_init
+.weak lowlevel_init
+.set lowlevel_init,function
lowlevel_init:
/*
diff --git a/cpu/arm926ejs/at91/u-boot.lds b/cpu/arm926ejs/at91/u-boot.lds.S
similarity index 90%
rename from cpu/arm926ejs/at91/u-boot.lds
rename to cpu/arm926ejs/at91/u-boot.lds.S
index ebb1f93..4e82bca 100644
--- a/cpu/arm926ejs/at91/u-boot.lds
+++ b/cpu/arm926ejs/at91/u-boot.lds.S
@@ -21,6 +21,8 @@
* MA 02111-1307 USA
*/
+#include <config.h>
+
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
OUTPUT_ARCH(arm)
@@ -32,8 +34,11 @@ SECTIONS
. = ALIGN(4);
.text :
{
- cpu/arm926ejs/start.o (.text)
- *(.text)
+ cpu/arm926ejs/start.o (.text)
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+ board/CONFIG_BOARDDIR/lowlevel_init.o (.text)
+#endif
+ *(.text)
}
. = ALIGN(4);
diff --git a/include/asm-arm/arch-at91/at91sam9263.h
b/include/asm-arm/arch-at91/at91sam9263.h
index 98251cb..07b265f 100644
--- a/include/asm-arm/arch-at91/at91sam9263.h
+++ b/include/asm-arm/arch-at91/at91sam9263.h
@@ -106,6 +106,7 @@
#define AT91_USART2 AT91SAM9263_BASE_US2
#define AT91_SMC AT91_SMC0
+#define AT91_SDRAMC AT91_SDRAMC0
/*
* Internal Memory.
diff --git a/include/asm-arm/arch-at91/at91sam9_sdramc.h
b/include/asm-arm/arch-at91/at91sam9_sdramc.h
new file mode 100644
index 0000000..5af2b54
--- /dev/null
+++ b/include/asm-arm/arch-at91/at91sam9_sdramc.h
@@ -0,0 +1,87 @@
+/*
+ * [origin: Linux kernel arch/arm/mach-at91/include/mach/at91_wdt.h]
+ *
+ * Copyright (C) 2009 Jean-Christophe PLAGNIOL-VILLARD
<plagnioj(a)jcrosoft.com>
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
+ * SDRAM Controllers (SDRAMC) - System peripherals registers.
+ * Based on AT91SAM9261 datasheet revision D.
+ *
+ * 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.
+ */
+
+#ifndef AT91SAM9_SDRAMC_H
+#define AT91SAM9_SDRAMC_H
+
+/* SDRAM Controller (SDRAMC) registers */
+#define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM
Controller Mode Register */
+#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
+#define AT91_SDRAMC_MODE_NORMAL 0
+#define AT91_SDRAMC_MODE_NOP 1
+#define AT91_SDRAMC_MODE_PRECHARGE 2
+#define AT91_SDRAMC_MODE_LMR 3
+#define AT91_SDRAMC_MODE_REFRESH 4
+#define AT91_SDRAMC_MODE_EXT_LMR 5
+#define AT91_SDRAMC_MODE_DEEP 6
+
+#define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM
Controller Refresh Timer Register */
+#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh
Timer Counter */
+
+#define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM
Controller Configuration Register */
+#define AT91_SDRAMC_NC (3 << 0) /* Number of
Column Bits */
+#define AT91_SDRAMC_NC_8 (0 << 0)
+#define AT91_SDRAMC_NC_9 (1 << 0)
+#define AT91_SDRAMC_NC_10 (2 << 0)
+#define AT91_SDRAMC_NC_11 (3 << 0)
+#define AT91_SDRAMC_NR (3 << 2) /* Number of Row
Bits */
+#define AT91_SDRAMC_NR_11 (0 << 2)
+#define AT91_SDRAMC_NR_12 (1 << 2)
+#define AT91_SDRAMC_NR_13 (2 << 2)
+#define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */
+#define AT91_SDRAMC_NB_2 (0 << 4)
+#define AT91_SDRAMC_NB_4 (1 << 4)
+#define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */
+#define AT91_SDRAMC_CAS_1 (1 << 5)
+#define AT91_SDRAMC_CAS_2 (2 << 5)
+#define AT91_SDRAMC_CAS_3 (3 << 5)
+#define AT91_SDRAMC_DBW (1 << 7) /* Data Bus Width */
+#define AT91_SDRAMC_DBW_32 (0 << 7)
+#define AT91_SDRAMC_DBW_16 (1 << 7)
+#define AT91_SDRAMC_TWR (0xf << 8) /* Write
Recovery Delay */
+#define AT91_SDRAMC_TRC (0xf << 12) /* Row Cycle
Delay */
+#define AT91_SDRAMC_TRP (0xf << 16) /* Row
Precharge Delay */
+#define AT91_SDRAMC_TRCD (0xf << 20) /* Row to Column
Delay */
+#define AT91_SDRAMC_TRAS (0xf << 24) /* Active to
Precharge Delay */
+#define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self
Refresh to Active Delay */
+
+#define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM
Controller Low Power Register */
+#define AT91_SDRAMC_LPCB (3 << 0) /* Low-power
Configurations */
+#define AT91_SDRAMC_LPCB_DISABLE 0
+#define AT91_SDRAMC_LPCB_SELF_REFRESH 1
+#define AT91_SDRAMC_LPCB_POWER_DOWN 2
+#define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3
+#define AT91_SDRAMC_PASR (7 << 4) /* Partial Array
Self Refresh */
+#define AT91_SDRAMC_TCSR (3 << 8) /* Temperature
Compensated Self Refresh */
+#define AT91_SDRAMC_DS (3 << 10) /* Drive Strength */
+#define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to
define when Low Power Mode is enabled */
+#define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12)
+#define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12)
+#define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12)
+
+#define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM
Controller Interrupt Enable Register */
+#define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM
Controller Interrupt Disable Register */
+#define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM
Controller Interrupt Mask Register */
+#define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM
Controller Interrupt Status Register */
+#define AT91_SDRAMC_RES (1 << 0) /* Refresh Error
Status */
+
+#define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory
Device Register */
+#define AT91_SDRAMC_MD (3 << 0) /* Memory Device
Type */
+#define AT91_SDRAMC_MD_SDRAM 0
+#define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1
+
+
+#endif
diff --git a/include/asm-arm/arch-at91/hardware.h
b/include/asm-arm/arch-at91/hardware.h
index 82b4b23..756a242 100644
--- a/include/asm-arm/arch-at91/hardware.h
+++ b/include/asm-arm/arch-at91/hardware.h
@@ -53,6 +53,23 @@
#error "Unsupported AT91 processor"
#endif
+/* External Memory Map */
+#define AT91_CHIPSELECT_0 0x10000000
+#define AT91_CHIPSELECT_1 0x20000000
+#define AT91_CHIPSELECT_2 0x30000000
+#define AT91_CHIPSELECT_3 0x40000000
+#define AT91_CHIPSELECT_4 0x50000000
+#define AT91_CHIPSELECT_5 0x60000000
+#define AT91_CHIPSELECT_6 0x70000000
+#define AT91_CHIPSELECT_7 0x80000000
+
+/* SDRAM */
+#ifdef CONFIG_DRAM_BASE
+#define AT91_SDRAM_BASE CONFIG_DRAM_BASE
+#else
+#define AT91_SDRAM_BASE AT91_CHIPSELECT_1
+#endif
+
/* Clocks */
#define AT91_SLOW_CLOCK 32768 /* slow clock */
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
new file mode 100644
index 0000000..9ae737f
--- /dev/null
+++ b/include/configs/pm9263.h
@@ -0,0 +1,367 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop(a)leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ * Ilko Iliev <www.ronetix.at>
+ *
+ * Configuation settings for the RONETIX PM9263 board.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* ARM asynchronous clock */
+#define AT91_CPU_NAME "AT91SAM9263"
+
+#define CONFIG_DISPLAY_BOARDINFO
+
+#define MASTER_PLL_DIV 15
+#define MASTER_PLL_MUL 162
+#define MAIN_PLL_DIV 2 /* 2 or 4 */
+#define AT91_MAIN_CLOCK 18432000
+
+#define CONFIG_SYS_HZ 1000000
+
+#define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
+#define CONFIG_AT91SAM9263 1 /* It's an Atmel AT91SAM9263 SoC*/
+#define CONFIG_PM9263 1 /* on a Ronetix PM9263 Board */
+#define CONFIG_ARCH_CPU_INIT
+#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
+
+/* clocks */
+#define CONFIG_SYS_MOR_VAL 0x00002001 /* CKGR_MOR - enable main
osc. */
+#define CONFIG_SYS_PLLAR_VAL \
+ (0x2000BF00 | ((MASTER_PLL_MUL - 1) << 16) | (MASTER_PLL_DIV))
+
+#if (MAIN_PLL_DIV == 2)
+/* PCK/2 = MCK Master Clock from PLLA */
+#define CONFIG_SYS_MCKR1_VAL 0x00000100
+/* PCK/2 = MCK Master Clock from PLLA */
+#define CONFIG_SYS_MCKR2_VAL 0x00000102
+#else
+/* PCK/4 = MCK Master Clock from PLLA */
+#define CONFIG_SYS_MCKR1_VAL 0x00000200
+/* PCK/4 = MCK Master Clock from PLLA */
+#define CONFIG_SYS_MCKR2_VAL 0x00000202
+#endif
+/* define PDC[31:16] as DATA[31:16] */
+#define CONFIG_SYS_PIOD_PDR_VAL1 0xFFFF0000
+/* no pull-up for D[31:16] */
+#define CONFIG_SYS_PIOD_PPUDR_VAL 0xFFFF0000
+/* EBI0_CSA, CS1 SDRAM, CS3 NAND Flash, 3.3V memories */
+#define CONFIG_SYS_MATRIX_EBI0CSA_VAL 0x0001010A
+/* EBI1_CSA, 3.3v, no pull-ups */
+#define CONFIG_SYS_MATRIX_EBI1CSA_VAL 0x00010100
+
+/* SDRAM */
+/* SDRAMC_MR Mode register */
+#define CONFIG_SYS_SDRC_MR_VAL1 0
+/* SDRAMC_TR - Refresh Timer register */
+#define CONFIG_SYS_SDRC_TR_VAL1 0x13C
+#define CONFIG_SYS_SDRC_CR_VAL 0x85227279 /*CL3*/
+/* Memory Device Register -> SDRAM */
+#define CONFIG_SYS_SDRC_MDR_VAL 0
+#define CONFIG_SYS_SDRC_MR_VAL2 0x00000002 /* SDRAMC_MR */
+#define CONFIG_SYS_SDRAM_VAL1 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRC_MR_VAL3 4 /* SDRC_MR */
+#define CONFIG_SYS_SDRAM_VAL2 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRAM_VAL3 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRAM_VAL4 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRAM_VAL5 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRAM_VAL6 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRAM_VAL7 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRAM_VAL8 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRAM_VAL9 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRC_MR_VAL4 3 /* SDRC_MR */
+#define CONFIG_SYS_SDRAM_VAL10 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRC_MR_VAL5 0 /* SDRC_MR */
+#define CONFIG_SYS_SDRAM_VAL11 0 /* SDRAM_BASE */
+#define CONFIG_SYS_SDRC_TR_VAL2 1200 /* SDRAM_TR */
+#define CONFIG_SYS_SDRAM_VAL12 0 /* SDRAM_BASE */
+
+/* setup SMC0, CS0 (NOR Flash) - 16-bit, 15 WS */
+#define CONFIG_SYS_SMC0_SETUP0_VAL 0x0A0A0A0A /* SMC_SETUP */
+#define CONFIG_SYS_SMC0_PULSE0_VAL 0x0B0B0B0B /* SMC_PULSE */
+#define CONFIG_SYS_SMC0_CYCLE0_VAL 0x00160016 /* SMC_CYCLE */
+#define CONFIG_SYS_SMC0_CTRL0_VAL 0x00161003 /* SMC_MODE */
+
+/* setup SMC1, CS0 (PSRAM) - 16-bit */
+#define CONFIG_SYS_SMC1_SETUP0_VAL 0x00000000 /* SMC_SETUP */
+#define CONFIG_SYS_SMC1_PULSE0_VAL 0x07020707 /* SMC_PULSE */
+#define CONFIG_SYS_SMC1_CYCLE0_VAL 0x00080008 /* SMC_CYCLE */
+#define CONFIG_SYS_SMC1_CTRL0_VAL 0x31001000 /* SMC_MODE */
+
+#define CONFIG_SYS_RSTC_RMR_VAL 0xA5000301 /* user reset
enable */
+
+/* Watchdog */
+#define CONFIG_SYS_WDTC_WDMR_VAL 0x3fff8fff /* disable watchdog */
+
+/* */
+
+#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS 1
+#define CONFIG_INITRD_TAG 1
+
+#undef CONFIG_SKIP_LOWLEVEL_INIT
+#undef CONFIG_SKIP_RELOCATE_UBOOT
+#define CONFIG_USER_LOWLEVEL_INIT 1
+
+/*
+ * Hardware drivers
+ */
+#define CONFIG_ATMEL_USART 1
+#undef CONFIG_USART0
+#undef CONFIG_USART1
+#undef CONFIG_USART2
+#define CONFIG_USART3 1 /* USART 3 is DBGU */
+
+/* LCD */
+#define CONFIG_LCD 1
+#define LCD_BPP LCD_COLOR8
+#define CONFIG_LCD_LOGO 1
+#undef LCD_TEST_PATTERN
+#define CONFIG_LCD_INFO 1
+#define CONFIG_LCD_INFO_BELOW_LOGO 1
+#define CONFIG_SYS_WHITE_ON_BLACK 1
+#define CONFIG_ATMEL_LCD 1
+#define CONFIG_ATMEL_LCD_BGR555 1
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
+
+#define CONFIG_LCD_IN_PSRAM 1
+
+/* LED */
+#define CONFIG_AT91_LED
+#define CONFIG_RED_LED AT91_PIN_PB7 /* this is the power
led */
+#define CONFIG_GREEN_LED AT91_PIN_PB8 /* this is the user1 led */
+
+#define CONFIG_BOOTDELAY 3
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE 1
+#define CONFIG_BOOTP_BOOTPATH 1
+#define CONFIG_BOOTP_GATEWAY 1
+#define CONFIG_BOOTP_HOSTNAME 1
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMLS
+
+#define CONFIG_CMD_PING 1
+#define CONFIG_CMD_DHCP 1
+#define CONFIG_CMD_NAND 1
+#define CONFIG_CMD_USB 1
+
+/* SDRAM */
+#define CONFIG_NR_DRAM_BANKS 1
+#define PHYS_SDRAM 0x20000000
+#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
+
+/* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
+#define CONFIG_HAS_DATAFLASH 1
+#define CONFIG_SYS_SPI_WRITE_TOUT (5 * CONFIG_SYS_HZ)
+#define CONFIG_SYS_MAX_DATAFLASH_BANKS 1
+#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 /* CS0 */
+#define AT91_SPI_CLK 15000000
+#define DATAFLASH_TCSS (0x1a << 16)
+#define DATAFLASH_TCHS (0x1 << 24)
+
+/* NOR flash, if populated */
+#define CONFIG_SYS_FLASH_CFI 1
+#define CONFIG_FLASH_CFI_DRIVER 1
+#define PHYS_FLASH_1 0x10000000
+#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1
+#define CONFIG_SYS_MAX_FLASH_SECT 256
+#define CONFIG_SYS_MAX_FLASH_BANKS 1
+
+/* NAND flash */
+#ifdef CONFIG_CMD_NAND
+#define CONFIG_NAND_ATMEL
+#define CONFIG_SYS_NAND_MAX_CHIPS 1
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define CONFIG_SYS_NAND_BASE 0x40000000
+#define CONFIG_SYS_NAND_DBW_8 1
+/* our ALE is AD21 */
+#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
+/* our CLE is AD22 */
+#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
+#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD15
+#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PB30
+#endif
+
+#define CONFIG_CMD_JFFS2 1
+#define CONFIG_JFFS2_CMDLINE 1
+#define CONFIG_JFFS2_NAND 1
+#define CONFIG_JFFS2_DEV "nand0" /* NAND device jffs2 lives on */
+#define CONFIG_JFFS2_PART_OFFSET 0 /* start of jffs2 partition */
+#define CONFIG_JFFS2_PART_SIZE (256 * 1024 * 1024) /* partition
size*/
+
+/* PSRAM */
+#define PHYS_PSRAM 0x70000000
+#define PHYS_PSRAM_SIZE 0x00400000 /* 4MB */
+
+/* Ethernet */
+#define CONFIG_MACB 1
+#define CONFIG_RMII 1
+#define CONFIG_NET_MULTI 1
+#define CONFIG_NET_RETRY_COUNT 20
+#define CONFIG_RESET_PHY_R 1
+
+/* 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 0x00a00000 /*
AT91SAM9263_UHP_BASE */
+#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263"
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
+#define CONFIG_USB_STORAGE 1
+
+#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
+
+#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
+#define CONFIG_SYS_MEMTEST_END 0x23e00000
+
+#define CONFIG_SYS_USE_FLASH 1
+#undef CONFIG_SYS_USE_DATAFLASH
+#undef CONFIG_SYS_USE_NANDFLASH
+
+#ifdef CONFIG_SYS_USE_DATAFLASH
+
+/* bootstrap + u-boot + env + linux in dataflash on CS0 */
+#define CONFIG_ENV_IS_IN_DATAFLASH
+#define CFG_MONITOR_BASE (CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
+#define CONFIG_ENV_OFFSET 0x4200
+#define CONFIG_ENV_ADDR (CFG_DATAFLASH_LOGIC_ADDR_CS0 +
CONFIG_ENV_OFFSET)
+#define CONFIG_ENV_SIZE 0x4200
+#define CONFIG_BOOTCOMMAND "cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
+ "root=/dev/mtdblock0 " \
+ "mtdparts=at91_nand:-(root) "\
+ "rw rootfstype=jffs2"
+
+#elif defined(CONFIG_SYS_USE_NANDFLASH) /* CFG_USE_NANDFLASH */
+
+/* bootstrap + u-boot + env + linux in nandflash */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET 0x60000
+#define CONFIG_ENV_OFFSET_REDUND 0x80000
+#define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
+#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000;
bootm"
+#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
+ "root=/dev/mtdblock5 " \
+ "mtdparts=at91_nand:" \
+ "128k(bootstrap)ro," \
+ "256k(uboot)ro," \
+ "128k(env1)ro," \
+ "128k(env2)ro," \
+ "2M(linux)," \
+ "-(root) " \
+ "rw rootfstype=jffs2"
+
+#elif defined(CONFIG_SYS_USE_FLASH) /* CFG_USE_FLASH */
+
+#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_OFFSET 0x40000
+#define CONFIG_ENV_SECT_SIZE 0x10000
+#define CONFIG_ENV_SIZE 0x10000
+#define CONFIG_ENV_OVERWRITE 1
+
+/* JFFS Partition offset set */
+#define CONFIG_SYS_JFFS2_FIRST_BANK 0
+#define CONFIG_SYS_JFFS2_NUM_BANKS 1
+
+/* 512k reserved for u-boot */
+#define CONFIG_SYS_JFFS2_FIRST_SECTOR 11
+
+#define CONFIG_BOOTCOMMAND "run flashboot"
+#define CONFIG_ROOTPATH /ronetix/rootfs
+#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds\n"
+
+#define CONFIG_CON_ROT "fbcon=rotate:3 "
+#define CONFIG_BOOTARGS "root=/dev/mtdblock4 rootfstype=jffs2 "\
+ CONFIG_CON_ROT
+
+#define MTDIDS_DEFAULT "nor0=physmap-flash.0,nand0=nand"
+#define MTDPARTS_DEFAULT \
+ "mtdparts=physmap-flash.0:" \
+ "256k(u-boot)ro," \
+ "64k(u-boot-env)ro," \
+ "1408k(kernel)," \
+ "-(rootfs);" \
+ "nand:-(nand)"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "mtdids=" MTDIDS_DEFAULT "\0" \
+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
+ "partition=nand0,0\0" \
+ "ramargs=setenv bootargs $(bootargs) $(mtdparts)\0" \
+ "nfsargs=setenv bootargs root=/dev/nfs rw " \
+ CONFIG_CON_ROT \
+ "nfsroot=$(serverip):$(rootpath) $(mtdparts)\0" \
+ "addip=setenv bootargs $(bootargs) " \
+ "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)"\
+ ":$(hostname):eth0:off\0" \
+ "ramboot=tftpboot 0x22000000 vmImage;" \
+ "run ramargs;run addip;bootm 22000000\0" \
+ "nfsboot=tftpboot 0x22000000 vmImage;" \
+ "run nfsargs;run addip;bootm 22000000\0" \
+ "flashboot=run ramargs;run addip;bootm 0x10050000\0" \
+ ""
+
+#else
+#error "Undefined memory device"
+#endif
+
+#define CONFIG_BAUDRATE 115200
+#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
+
+#define CONFIG_SYS_PROMPT "u-boot-pm9263> "
+#define CONFIG_SYS_CBSIZE 256
+#define CONFIG_SYS_MAXARGS 16
+#define CONFIG_SYS_PBSIZE \
+ (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_LONGHELP 1
+#define CONFIG_CMDLINE_EDITING 1
+
+#define ROUND(A, B) (((A) + (B)) & ~((B) - 1))
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128 *
1024, 0x1000)
+#define CONFIG_SYS_GBL_DATA_SIZE 128 /* 128 bytes for initial data */
+
+#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
+
+#ifdef CONFIG_USE_IRQ
+#error CONFIG_USE_IRQ not supported
+#endif
+
+#endif
diff --git a/tools/Makefile b/tools/Makefile
index 9e9ee15..fbc64ba 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -47,6 +47,9 @@ endif
ifeq ($(VENDOR),atmel)
LOGO_BMP= logos/atmel.bmp
endif
+ifeq ($(VENDOR),ronetix)
+LOGO_BMP= logos/ronetix.bmp
+endif
#-------------------------------------------------------------------------
diff --git a/tools/logos/ronetix.bmp b/tools/logos/ronetix.bmp
new file mode 100644
index
0000000000000000000000000000000000000000..f956813915c7822ba11a3ab81ad9f48fa2849a5c
GIT binary patch
literal 5638
zcmd6qPgoO26u>9!GQ+G%SPCLU3BjO7DVS2!)VBPyv;owl)Y#NEim_WTHkD<1;K-39
z#~e9w<jB#ZM~*q>m?KAyee-X3!v|>l=~v&!<IT>_y!q{$nKzT!2e=mr!EFeoptJ*;
z01crI_z%(p&tp>mhDWYa;C)92{Mo3(=GupBu6<k+sE=zRff7PfD3MB`R4R>9=`>2G
zGbo+Opp4LIl$oAJ(?YXoI-5mVp?UCgfU@~K$_p)mzXQ-Z$`^~^w~mTni^XN|4dvx!
zv<#X`*TJr$<<(UfqmEX=W`tdXao~Av4XuGrXX{`$U@Wj3VDojf0d`|!6K!m6!Wa#-
z3AQNg7TVm}LR&(&!Dj<)ZEvG((ABjD_-R17hPG=p=-)s!u(jF_s_pEc9ih9>w~2Ok
zchRoUJ+!;GhxR~gwI<kow7<{w4ZLrn{WoCun&=JKJ#OE=MQ=g(_Yc7yKt0%l19Tv?
z4t0m9Ua!M5w+&QpfYuLD18k$&1bc*<+%~xdJv>B*LXXhV(GmKFecD3DKW)CSnf{~!
zBg8l!!D`vjQg$o3*_l?ET`0j9J)fMJnal@1Z4oNCOcq#mc1o7j|EZaZXgJTSMW>2r
zF*WC?mXqaxC-x|(WTDI=l$tk#FWHN38kTYnrx&8wI4+oux-1(qjL;>&<CJcNMwvtO
zgR-IiDztQ?ZSWkr2*r{q-Vo<55`|DVZ=fWNm9!14aK2VR=QEQiF;dSW7~UTjVl1*n
zc!87JB`Xl3TAAa_3F`;l)3^>T-EQs-Uxs4I;w?ycg<Up88$U*F%9Oo{G2$}8M@<Nb
z5~s)1PR$WECwuD}ZO!B{zH-$24xf+cIADT}+b8ll>{YMqiL(-*l2GFlJjrW#{3tc<
zD!kQh56>87Y(nzsfPxjx@%dIhw@>sUb{Hl@$Ir5Z63w3!KZl1>0OGJ%f-Ai$BACt#
zB*|x9m3&UGhlk;d*|;3{&XSfNZBB^0Tlq$1vuL`*=fmAqHy~?kr|_{HfnJohUw|c8
z(&538B}t_C`1)WFY(1aE<amk?tG2vGOvf?4dHGSs_#|}K@xwj5c~DMRe-J;$Zp%T9
z3@df2@R&Bw5nO_N6**1tF>3NPUrx4#|L%FQ##`c75R0ASh;tL%|9d`HEjeqVQ>|j7
zUw|Lut6ub?ho>ZwoL_t<U&WSQ%`8hm$>R&muXJ`={Md@(YL}~<nn^#~`0=Y=^6}JW
zdY|~Ym*kwlZf64lK5BI;iP|p&;HiA<iQFT68N%GPPk7lRFu(4A#=}J8y$@eTb~Ah6
zn=c0WsNVIM%G2R=J~k)O1fI+*GUOiLsGC$vlXlqtc6j&v&SSCraO4?yY~|Bq66>9O
zY(`Bj#nyese*InJsr`XRZtCb+7iJ$VEj@lAVth7V`xREA!Z9J@oBlIjp;PhUNP(??
z7aRIT142dxA-1KzmWKJnP|F^L2|Jt59I1*U3pT~K!k^~j8=BaK$5IMKxt@aaD?W>a
z)izzw>(A&Zv%kKM4aTqO2&&De!|PEJ+y)E&9ekN78FfP)#ENg7=NUL-j!A&e3G+R#
z`DU;h-srEemtVw&hK6Eef6CrZL`zCcUsPj4OPbGLkS+PyynBHU1ILNHKk4<y+yV0h
zJ|=<<XE(?KU$&CZO=~>!dX+7I&hY^7t91#O=Wj{Zh$mOY5eCCTLX+_$m+xq~9p&`u
z{Gds(I*6r{y^0@WD>f$fLw$`?c2O)c+?&hYcf_F~_^Mab#w2)xv8RI)Z)h;~gXCkg
zJSo6jdg3TRW0tAp5x4{Lcv0Lh&R<I|Uc9KgdVH(|)8buUbV2lm-q?hIr%Vw)r(fY=
zG6!z{xE2@T8v?+el-p5*n)3Wr75o?g0lu70I?A;&#)ROLPl5Zl&&P6l(pr0J2T4}#
z!6aNQ+ZxZ3ht%@028<6ql{|3%oyO-T+ptcvp2bGA%;pXCZ1(%vz8|i(hWb4-<6U#T
zj)4MP2H?&ZnbRk(+4)!n=jZsKieUW4OIcUx3Y`)^R{f^Wj<!l?&j{q(MfD@V>hg|q
z#u8Q}Lhq=7uG4d;i$!v53DTIHDQb4hBanA}5YvFMFJDVvW$TJ^DhxkHL12El1TJx^
zC~7NGR{W!!v1+CA>Xi<sTRuyk!)ImHO`aMFl>o$m(`t*rCcY;s7<-sf1#TRb%oShY
z&4(`XJPFCeOzCeD1H8Va0S99b)R0Tbl$NB<FCU+e=SjG0>K_;S^IzW3dt~sMt{VyI
z1g&pj)STBZKbnO+Df3F}2;L_4`P`JgAn=fLA?jMx+VulJm8casoIK}x6A#|-s;d4^
zBSD7)dChC|;S2e~i9XdP4)8IjOC7u-dgso6-?C^=^zsoa?}<GU9}5iOJn`i>=YOSR
NZ2eYzcz8HI_77a#1d{*&
literal 0
HcmV?d00001
--
1.6.1.3
--
With best regards,
Ilko Iliev
Ronetix Development Tools GmbH
CPU Modules, JTAG/BDM Emulators and Flash Programmers
Waidhausenstrasse 13/5, 1140 Vienna, Austria
E-Mail: iliev(a)ronetix.at; Web: www.ronetix.at
1
0
I am using a custom board with MPC8313E processor. In u-boot prompt, when i
do TFTP of large size files, sometime it hangs completely and, sometimes it
says bus fault, prints following message and resets the board.
/////////////////////////////////////////////////message
printed/////////////////////////////////////////////////
Bus Fault @ 0x00000900, fixup 0x00000000
Machine check in kernel mode.
Caused by (from msr): regs 07f85b48 Unknown values in msr
NIP: 00000900 XER: 20000000 LR: 07FC709C REGS: 07f85b48 TRAP: 0200 DAR:
07F85F58
MSR: 00001000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
GPR00: 00000000 07F85C38 00000080 FFFFFFFF 07FFCD80 07FEDB88 07FEDB88
07FED124
GPR08: 07FEDB98 4E800020 07FEDBB0 0000000C 07F85B28 F54ADC0C 07FF0000
09FA8000
GPR16: 7347FB13 00000000 00000000 00000000 00000000 00000000 00000000
00000000
GPR24: 07F89ED8 00000000 07F85FBC 00000003 00000000 07F85F58 0FFF1390
07FED054
Call backtrace:
07FC70D4 07FC7274 07FC73F8 07FAE0E8 07FC4724 07FCBDDC 07FCB4D0
07FCB6DC 07FBAAC4 07FCBDDC 07FCB4D0 07FCB62C 07FBA2B4 07FAC84C
07FAB66C 00420400
machine check
Resetting the board.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
Please help me with what could be the reason for this ?
--
View this message in context: http://www.nabble.com/Board-Reset-issue-tp22802830p22802830.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
2
2

[U-Boot] [PATCH] Add "source" command; prepare removal of "autoscr" command
by Wolfgang Denk 31 Mar '09
by Wolfgang Denk 31 Mar '09
31 Mar '09
According to the doc/feature-removal-schedule.txt, the "autoscr"
command will be replaced by the "source" command in approximately 6
months from now.
This patch prepares this change and starts a 6 month transition
period as follows:
- The new "source" command has been added, which implements exactly
the same functionlaity as the old "autoscr" command before
- The old "autoscr" command name is kept as an alias for compatibility
- Command sequences, script files atc. have been adapted to use the
new "source" command
- Related environment variables ("autoscript", "autoscript_uname")
have *not* been adapted yet; these will be renamed when the support
for the "autoscr" command get's finally dropped.
Signed-off-by: Wolfgang Denk <wd(a)denx.de>
---
README | 10 +-
board/cray/L1/L1.c | 2 +-
board/cray/L1/bootscript.hush | 2 +-
board/esd/common/cmd_loadpci.c | 6 +-
board/pn62/cmd_pn62.c | 7 +-
common/Makefile | 4 +-
common/cmd_autoscript.c | 241 ------------------------------------
common/cmd_load.c | 7 +-
common/cmd_net.c | 7 +-
common/cmd_source.c | 252 ++++++++++++++++++++++++++++++++++++++
doc/feature-removal-schedule.txt | 20 ++-
include/common.h | 4 +-
include/config_cmd_all.h | 2 +-
include/config_cmd_default.h | 2 +-
include/configs/APC405.h | 14 +-
include/configs/CRAYL1.h | 26 ++--
include/configs/DU440.h | 12 +-
include/configs/EP1C20.h | 2 +-
include/configs/GEN860T.h | 2 +-
include/configs/MVBC_P.h | 12 +-
include/configs/MVBLM7.h | 12 +-
include/configs/NETPHONE.h | 2 +-
include/configs/NETTA2.h | 2 +-
include/configs/NX823.h | 4 +-
include/configs/PN62.h | 6 +-
include/configs/TOP860.h | 8 +-
include/configs/TQM5200.h | 2 +-
include/configs/VoVPN-GW.h | 4 +-
include/configs/afeb9260.h | 6 +-
include/configs/apollon.h | 2 +-
include/configs/at91cap9adk.h | 4 +-
include/configs/at91sam9260ek.h | 6 +-
include/configs/at91sam9261ek.h | 6 +-
include/configs/at91sam9263ek.h | 6 +-
include/configs/at91sam9rlek.h | 6 +-
include/configs/atngw100.h | 2 +-
include/configs/atstk1002.h | 2 +-
include/configs/atstk1006.h | 2 +-
include/configs/eNET.h | 6 +-
include/configs/favr-32-ezkit.h | 2 +-
include/configs/grsim.h | 26 ++--
include/configs/grsim_leon2.h | 22 ++--
include/configs/gth2.h | 14 +-
include/configs/keymile-common.h | 2 +-
include/configs/lwmon.h | 4 +-
include/configs/lwmon5.h | 2 +-
include/configs/mp2usb.h | 4 +-
include/configs/mx1fs2.h | 6 +-
include/configs/omap2420h4.h | 2 +-
include/configs/omap3_beagle.h | 2 +-
include/configs/omap3_evm.h | 2 +-
include/configs/omap3_overo.h | 2 +-
include/configs/omap3_pandora.h | 2 +-
include/configs/omap3_zoom1.h | 2 +-
include/configs/sc3.h | 24 ++--
include/configs/scb9328.h | 4 +-
include/configs/stxxtc.h | 2 +-
include/configs/vct.h | 38 +++---
include/configs/wepep250.h | 6 +-
59 files changed, 454 insertions(+), 436 deletions(-)
delete mode 100644 common/cmd_autoscript.c
create mode 100644 common/cmd_source.c
diff --git a/README b/README
index 32d9acd..fcc4d7c 100644
--- a/README
+++ b/README
@@ -593,7 +593,6 @@ The following options need to be configured:
except those marked below with a "*".
CONFIG_CMD_ASKENV * ask for env variable
- CONFIG_CMD_AUTOSCRIPT Autoscript Support
CONFIG_CMD_BDI bdinfo
CONFIG_CMD_BEDBUG * Include BedBug Debugger
CONFIG_CMD_BMP * BMP support
@@ -654,6 +653,7 @@ The following options need to be configured:
(requires CONFIG_CMD_I2C)
CONFIG_CMD_SETGETDCR Support for DCR Register access
(4xx only)
+ CONFIG_CMD_SOURCE "source" command Support
CONFIG_CMD_SPI * SPI serial bus support
CONFIG_CMD_USB * USB support
CONFIG_CMD_VFD * VFD support (TRAB)
@@ -1789,7 +1789,7 @@ The following options need to be configured:
Note: overly (ab)use of the default environment is
discouraged. Make sure to check other ways to preset
- the environment like the autoscript function or the
+ the environment like the "source" command or the
boot command first.
- DataFlash Support:
@@ -1948,8 +1948,8 @@ Legacy uImage format:
81 common/cmd_net.c NetLoop() back without error
-82 common/cmd_net.c size == 0 (File with size 0 loaded)
82 common/cmd_net.c trying automatic boot
- 83 common/cmd_net.c running autoscript
- -83 common/cmd_net.c some error in automatic boot or autoscript
+ 83 common/cmd_net.c running "source" command
+ -83 common/cmd_net.c some error in automatic boot or "source" command
84 common/cmd_net.c end without errors
FIT uImage format:
@@ -2952,7 +2952,7 @@ Some configuration options can be set using Environment Variables:
autoscript - if set to "yes" commands like "loadb", "loady",
"bootp", "tftpb", "rarpboot" and "nfs" will attempt
to automatically run script images (by internally
- calling "autoscript").
+ calling "source").
autoscript_uname - if script image is in a format (FIT) this
variable is used to get script subimage unit name.
diff --git a/board/cray/L1/L1.c b/board/cray/L1/L1.c
index 1c82bdf..8a06ecc 100644
--- a/board/cray/L1/L1.c
+++ b/board/cray/L1/L1.c
@@ -164,7 +164,7 @@ int misc_init_r (void)
setenv ("ethaddr", e);
}
}
- sprintf (bootcmd,"autoscript %X",(unsigned)bootscript);
+ sprintf (bootcmd,"source %X",(unsigned)bootscript);
setenv ("bootcmd", bootcmd);
return (0);
}
diff --git a/board/cray/L1/bootscript.hush b/board/cray/L1/bootscript.hush
index ec4839b..f2f78ad 100644
--- a/board/cray/L1/bootscript.hush
+++ b/board/cray/L1/bootscript.hush
@@ -31,7 +31,7 @@ if printenv bootscript
tftp $tftp_addr $bootcript
if imi $tftp_addr
then
- autoscript $tftp_addr
+ source $tftp_addr
fi
fi
diff --git a/board/esd/common/cmd_loadpci.c b/board/esd/common/cmd_loadpci.c
index 0a6626e..c779f79 100644
--- a/board/esd/common/cmd_loadpci.c
+++ b/board/esd/common/cmd_loadpci.c
@@ -30,7 +30,7 @@
#if defined(CONFIG_CMD_BSP)
extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
-extern int do_autoscript (cmd_tbl_t *, int, int, char *[]);
+extern int do_source (cmd_tbl_t *, int, int, char *[]);
#define ADDRMASK 0xfffff000
@@ -98,12 +98,12 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
case 1:
/*
- * Boot image via autoscr
+ * Boot image via "source" command
*/
printf("executing script at addr 0x%s ...\n", addr);
local_args[0] = addr;
local_args[1] = NULL;
- do_autoscript(cmdtp, 0, 1, local_args);
+ do_source(cmdtp, 0, 1, local_args);
break;
case 2:
diff --git a/board/pn62/cmd_pn62.c b/board/pn62/cmd_pn62.c
index 10d0df6..b9f3bdb 100644
--- a/board/pn62/cmd_pn62.c
+++ b/board/pn62/cmd_pn62.c
@@ -152,12 +152,13 @@ int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
rcode = do_bootm (cmdtp, 0, 1, local_args);
}
-#ifdef CONFIG_AUTOSCRIPT
+#ifdef CONFIG_SOURCE
if (load_addr) {
char *s;
if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
- printf ("Running autoscript at addr 0x%08lX", load_addr);
+ printf ("Running "source" command at addr 0x%08lX",
+ load_addr);
s = getenv ("autoscript_uname");
if (s)
@@ -165,7 +166,7 @@ int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
else
puts (" ...\n");
- rcode = autoscript (load_addr, s);
+ rcode = source (load_addr, s);
}
}
#endif
diff --git a/common/Makefile b/common/Makefile
index 23171ca..eb8e283 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -61,8 +61,8 @@ COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
# command
COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
-COBJS-$(CONFIG_AUTOSCRIPT) += cmd_autoscript.o
-COBJS-$(CONFIG_CMD_AUTOSCRIPT) += cmd_autoscript.o
+COBJS-$(CONFIG_SOURCE) += cmd_source.o
+COBJS-$(CONFIG_CMD_SOURCE) += cmd_source.o
COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
deleted file mode 100644
index e5a9bc0..0000000
--- a/common/cmd_autoscript.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * (C) Copyright 2001
- * Kyle Harris, kharris(a)nexus-tech.net
- *
- * 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
- */
-
-/*
- * autoscript allows a remote host to download a command file and,
- * optionally, binary data for automatically updating the target. For
- * example, you create a new kernel image and want the user to be
- * able to simply download the image and the machine does the rest.
- * The kernel image is postprocessed with mkimage, which creates an
- * image with a script file prepended. If enabled, autoscript will
- * verify the script and contents of the download and execute the
- * script portion. This would be responsible for erasing flash,
- * copying the new image, and rebooting the machine.
- */
-
-/* #define DEBUG */
-
-#include <common.h>
-#include <command.h>
-#include <image.h>
-#include <malloc.h>
-#include <asm/byteorder.h>
-#if defined(CONFIG_8xx)
-#include <mpc8xx.h>
-#endif
-#ifdef CONFIG_SYS_HUSH_PARSER
-#include <hush.h>
-#endif
-
-int
-autoscript (ulong addr, const char *fit_uname)
-{
- ulong len;
- image_header_t *hdr;
- ulong *data;
- char *cmd;
- int rcode = 0;
- int verify;
-#if defined(CONFIG_FIT)
- const void* fit_hdr;
- int noffset;
- const void *fit_data;
- size_t fit_len;
-#endif
-
- verify = getenv_yesno ("verify");
-
- switch (genimg_get_format ((void *)addr)) {
- case IMAGE_FORMAT_LEGACY:
- hdr = (image_header_t *)addr;
-
- if (!image_check_magic (hdr)) {
- puts ("Bad magic number\n");
- return 1;
- }
-
- if (!image_check_hcrc (hdr)) {
- puts ("Bad header crc\n");
- return 1;
- }
-
- if (verify) {
- if (!image_check_dcrc (hdr)) {
- puts ("Bad data crc\n");
- return 1;
- }
- }
-
- if (!image_check_type (hdr, IH_TYPE_SCRIPT)) {
- puts ("Bad image type\n");
- return 1;
- }
-
- /* get length of script */
- data = (ulong *)image_get_data (hdr);
-
- if ((len = uimage_to_cpu (*data)) == 0) {
- puts ("Empty Script\n");
- return 1;
- }
-
- /*
- * scripts are just multi-image files with one component, seek
- * past the zero-terminated sequence of image lengths to get
- * to the actual image data
- */
- while (*data++);
- break;
-#if defined(CONFIG_FIT)
- case IMAGE_FORMAT_FIT:
- if (fit_uname == NULL) {
- puts ("No FIT subimage unit name\n");
- return 1;
- }
-
- fit_hdr = (const void *)addr;
- if (!fit_check_format (fit_hdr)) {
- puts ("Bad FIT image format\n");
- return 1;
- }
-
- /* get script component image node offset */
- noffset = fit_image_get_node (fit_hdr, fit_uname);
- if (noffset < 0) {
- printf ("Can't find '%s' FIT subimage\n", fit_uname);
- return 1;
- }
-
- if (!fit_image_check_type (fit_hdr, noffset, IH_TYPE_SCRIPT)) {
- puts ("Not a image image\n");
- return 1;
- }
-
- /* verify integrity */
- if (verify) {
- if (!fit_image_check_hashes (fit_hdr, noffset)) {
- puts ("Bad Data Hash\n");
- return 1;
- }
- }
-
- /* get script subimage data address and length */
- if (fit_image_get_data (fit_hdr, noffset, &fit_data, &fit_len)) {
- puts ("Could not find script subimage data\n");
- return 1;
- }
-
- data = (ulong *)fit_data;
- len = (ulong)fit_len;
- break;
-#endif
- default:
- puts ("Wrong image format for autoscript\n");
- return 1;
- }
-
- debug ("** Script length: %ld\n", len);
-
- if ((cmd = malloc (len + 1)) == NULL) {
- return 1;
- }
-
- /* make sure cmd is null terminated */
- memmove (cmd, (char *)data, len);
- *(cmd + len) = 0;
-
-#ifdef CONFIG_SYS_HUSH_PARSER /*?? */
- rcode = parse_string_outer (cmd, FLAG_PARSE_SEMICOLON);
-#else
- {
- char *line = cmd;
- char *next = cmd;
-
- /*
- * break into individual lines,
- * and execute each line;
- * terminate on error.
- */
- while (*next) {
- if (*next == '\n') {
- *next = '\0';
- /* run only non-empty commands */
- if (*line) {
- debug ("** exec: \"%s\"\n",
- line);
- if (run_command (line, 0) < 0) {
- rcode = 1;
- break;
- }
- }
- line = next + 1;
- }
- ++next;
- }
- if (rcode == 0 && *line)
- rcode = (run_command(line, 0) >= 0);
- }
-#endif
- free (cmd);
- return rcode;
-}
-
-/**************************************************/
-#if defined(CONFIG_CMD_AUTOSCRIPT)
-int
-do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
- ulong addr;
- int rcode;
- const char *fit_uname = NULL;
-
- /* Find script image */
- if (argc < 2) {
- addr = CONFIG_SYS_LOAD_ADDR;
- debug ("* autoscr: default load address = 0x%08lx\n", addr);
-#if defined(CONFIG_FIT)
- } else if (fit_parse_subimage (argv[1], load_addr, &addr, &fit_uname)) {
- debug ("* autoscr: subimage '%s' from FIT image at 0x%08lx\n",
- fit_uname, addr);
-#endif
- } else {
- addr = simple_strtoul(argv[1], NULL, 16);
- debug ("* autoscr: cmdline image address = 0x%08lx\n", addr);
- }
-
- printf ("## Executing script at %08lx\n", addr);
- rcode = autoscript (addr, fit_uname);
- return rcode;
-}
-
-U_BOOT_CMD(
- autoscr, 2, 0, do_autoscript,
- "run script from memory",
- "[addr] - run script starting at addr"
- " - A valid autoscr header must be present\n"
-#if defined(CONFIG_FIT)
- "For FIT format uImage addr must include subimage\n"
- "unit name in the form of addr:<subimg_uname>\n"
-#endif
-);
-#endif
diff --git a/common/cmd_load.c b/common/cmd_load.c
index 88fba88..d5eaac7 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -513,12 +513,13 @@ int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
}
-#ifdef CONFIG_AUTOSCRIPT
+#ifdef CONFIG_SOURCE
if (load_addr) {
char *s;
if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
- printf ("Running autoscript at addr 0x%08lX", load_addr);
+ printf ("Running "source" command at addr 0x%08lX",
+ load_addr);
s = getenv ("autoscript_uname");
if (s)
@@ -526,7 +527,7 @@ int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
else
puts (" ...\n");
- rcode = autoscript (load_addr, s);
+ rcode = source (load_addr, s);
}
}
#endif
diff --git a/common/cmd_net.c b/common/cmd_net.c
index a687849..9bef7a2 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -222,9 +222,10 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
rcode = do_bootm (cmdtp, 0, 1, local_args);
}
-#ifdef CONFIG_AUTOSCRIPT
+#ifdef CONFIG_SOURCE
if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
- printf ("Running autoscript at addr 0x%08lX", load_addr);
+ printf ("Running "source" command at addr 0x%08lX",
+ load_addr);
s = getenv ("autoscript_uname");
if (s)
@@ -233,7 +234,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
puts (" ...\n");
show_boot_progress (83);
- rcode = autoscript (load_addr, s);
+ rcode = source (load_addr, s);
}
#endif
if (rcode < 0)
diff --git a/common/cmd_source.c b/common/cmd_source.c
new file mode 100644
index 0000000..62e93a3
--- /dev/null
+++ b/common/cmd_source.c
@@ -0,0 +1,252 @@
+/*
+ * (C) Copyright 2001
+ * Kyle Harris, kharris(a)nexus-tech.net
+ *
+ * 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
+ */
+
+/*
+ * The "source" command allows to define "script images", i. e. files
+ * that contain command sequences that can be executed by the command
+ * interpreter. It returns the exit status of the last command
+ * executed from the script. This is very similar to running a shell
+ * script in a UNIX shell, hence the name for the command.
+ */
+
+/* #define DEBUG */
+
+#include <common.h>
+#include <command.h>
+#include <image.h>
+#include <malloc.h>
+#include <asm/byteorder.h>
+#if defined(CONFIG_8xx)
+#include <mpc8xx.h>
+#endif
+#ifdef CONFIG_SYS_HUSH_PARSER
+#include <hush.h>
+#endif
+
+int
+source (ulong addr, const char *fit_uname)
+{
+ ulong len;
+ image_header_t *hdr;
+ ulong *data;
+ char *cmd;
+ int rcode = 0;
+ int verify;
+#if defined(CONFIG_FIT)
+ const void* fit_hdr;
+ int noffset;
+ const void *fit_data;
+ size_t fit_len;
+#endif
+
+ verify = getenv_yesno ("verify");
+
+ switch (genimg_get_format ((void *)addr)) {
+ case IMAGE_FORMAT_LEGACY:
+ hdr = (image_header_t *)addr;
+
+ if (!image_check_magic (hdr)) {
+ puts ("Bad magic number\n");
+ return 1;
+ }
+
+ if (!image_check_hcrc (hdr)) {
+ puts ("Bad header crc\n");
+ return 1;
+ }
+
+ if (verify) {
+ if (!image_check_dcrc (hdr)) {
+ puts ("Bad data crc\n");
+ return 1;
+ }
+ }
+
+ if (!image_check_type (hdr, IH_TYPE_SCRIPT)) {
+ puts ("Bad image type\n");
+ return 1;
+ }
+
+ /* get length of script */
+ data = (ulong *)image_get_data (hdr);
+
+ if ((len = uimage_to_cpu (*data)) == 0) {
+ puts ("Empty Script\n");
+ return 1;
+ }
+
+ /*
+ * scripts are just multi-image files with one component, seek
+ * past the zero-terminated sequence of image lengths to get
+ * to the actual image data
+ */
+ while (*data++);
+ break;
+#if defined(CONFIG_FIT)
+ case IMAGE_FORMAT_FIT:
+ if (fit_uname == NULL) {
+ puts ("No FIT subimage unit name\n");
+ return 1;
+ }
+
+ fit_hdr = (const void *)addr;
+ if (!fit_check_format (fit_hdr)) {
+ puts ("Bad FIT image format\n");
+ return 1;
+ }
+
+ /* get script component image node offset */
+ noffset = fit_image_get_node (fit_hdr, fit_uname);
+ if (noffset < 0) {
+ printf ("Can't find '%s' FIT subimage\n", fit_uname);
+ return 1;
+ }
+
+ if (!fit_image_check_type (fit_hdr, noffset, IH_TYPE_SCRIPT)) {
+ puts ("Not a image image\n");
+ return 1;
+ }
+
+ /* verify integrity */
+ if (verify) {
+ if (!fit_image_check_hashes (fit_hdr, noffset)) {
+ puts ("Bad Data Hash\n");
+ return 1;
+ }
+ }
+
+ /* get script subimage data address and length */
+ if (fit_image_get_data (fit_hdr, noffset, &fit_data, &fit_len)) {
+ puts ("Could not find script subimage data\n");
+ return 1;
+ }
+
+ data = (ulong *)fit_data;
+ len = (ulong)fit_len;
+ break;
+#endif
+ default:
+ puts ("Wrong image format for "source" command\n");
+ return 1;
+ }
+
+ debug ("** Script length: %ld\n", len);
+
+ if ((cmd = malloc (len + 1)) == NULL) {
+ return 1;
+ }
+
+ /* make sure cmd is null terminated */
+ memmove (cmd, (char *)data, len);
+ *(cmd + len) = 0;
+
+#ifdef CONFIG_SYS_HUSH_PARSER /*?? */
+ rcode = parse_string_outer (cmd, FLAG_PARSE_SEMICOLON);
+#else
+ {
+ char *line = cmd;
+ char *next = cmd;
+
+ /*
+ * break into individual lines,
+ * and execute each line;
+ * terminate on error.
+ */
+ while (*next) {
+ if (*next == '\n') {
+ *next = '\0';
+ /* run only non-empty commands */
+ if (*line) {
+ debug ("** exec: \"%s\"\n",
+ line);
+ if (run_command (line, 0) < 0) {
+ rcode = 1;
+ break;
+ }
+ }
+ line = next + 1;
+ }
+ ++next;
+ }
+ if (rcode == 0 && *line)
+ rcode = (run_command(line, 0) >= 0);
+ }
+#endif
+ free (cmd);
+ return rcode;
+}
+
+/**************************************************/
+#if defined(CONFIG_CMD_SOURCE)
+int
+do_source (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+ ulong addr;
+ int rcode;
+ const char *fit_uname = NULL;
+
+ /* Find script image */
+ if (argc < 2) {
+ addr = CONFIG_SYS_LOAD_ADDR;
+ debug ("* source: default load address = 0x%08lx\n", addr);
+#if defined(CONFIG_FIT)
+ } else if (fit_parse_subimage (argv[1], load_addr, &addr, &fit_uname)) {
+ debug ("* source: subimage '%s' from FIT image at 0x%08lx\n",
+ fit_uname, addr);
+#endif
+ } else {
+ addr = simple_strtoul(argv[1], NULL, 16);
+ debug ("* source: cmdline image address = 0x%08lx\n", addr);
+ }
+
+ printf ("## Executing script at %08lx\n", addr);
+ rcode = source (addr, fit_uname);
+ return rcode;
+}
+
+U_BOOT_CMD(
+ source, 2, 0, do_source,
+ "run script from memory",
+ "[addr] - run script starting at addr"
+ " - A valid image header must be present\n"
+#if defined(CONFIG_FIT)
+ "For FIT format uImage addr must include subimage\n"
+ "unit name in the form of addr:<subimg_uname>\n"
+#endif
+);
+
+/*
+ * Keep for now for backward compatibility;
+ * remove later when support for "autoscr" goes away.
+ */
+U_BOOT_CMD(
+ autoscr, 2, 0, do_source,
+ "run script from memory",
+ "[addr] - run script starting at addr"
+ " - A valid image header must be present\n"
+#if defined(CONFIG_FIT)
+ "For FIT format uImage addr must include subimage\n"
+ "unit name in the form of addr:<subimg_uname>\n"
+#endif
+);
+#endif
diff --git a/doc/feature-removal-schedule.txt b/doc/feature-removal-schedule.txt
index 9ba7a04..cd429a4 100644
--- a/doc/feature-removal-schedule.txt
+++ b/doc/feature-removal-schedule.txt
@@ -8,12 +8,20 @@ file.
---------------------------
What: "autoscr" command
-When: August 2009
-Why: "autosrc" is an ugly and completely non-standard name. The "autoscr"
- command is deprecated and will be replaced the "source" command as
- used by other shells such as bash. Both commands will be supported
- for a transition period of 6 months after which "autoscr" will be
- removed.
+When: Release 2009-09
+
+Why: "autosrc" is an ugly and completely non-standard name.
+ The "autoscr" command is deprecated and will be replaced by
+
+ the "source" command as used by other shells such as bash.
+
+ Starting with March 2009, both commands will be supported for
+ a transition period of 6 months after which "autoscr" will be
+ removed. During the transition period existing scripts and
+ environment variable names remain untouched for maximum
+ compatibiltiy; thse will be changed when support for the
+ "autoscr" command get's finally dropped.
+
Who: Peter Tyser <ptyser(a)xes-inc.com>
---------------------------
diff --git a/include/common.h b/include/common.h
index 952ddff..20c058a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -234,8 +234,8 @@ int mac_read_from_eeprom(void);
/* common/flash.c */
void flash_perror (int);
-/* common/cmd_autoscript.c */
-int autoscript (ulong addr, const char *fit_uname);
+/* common/cmd_source.c */
+int source (ulong addr, const char *fit_uname);
extern ulong load_addr; /* Default Load Address */
diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h
index db1f55c..c5e0d26 100644
--- a/include/config_cmd_all.h
+++ b/include/config_cmd_all.h
@@ -15,7 +15,6 @@
#define CONFIG_CMD_AMBAPP /* AMBA Plug & Play Bus print utility */
#define CONFIG_CMD_ASKENV /* ask for env variable */
-#define CONFIG_CMD_AUTOSCRIPT /* Autoscript Support */
#define CONFIG_CMD_BDI /* bdinfo */
#define CONFIG_CMD_BEDBUG /* Include BedBug Debugger */
#define CONFIG_CMD_BMP /* BMP support */
@@ -76,6 +75,7 @@
#define CONFIG_CMD_SETEXPR /* setexpr support */
#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
#define CONFIG_CMD_SNTP /* SNTP support */
+#define CONFIG_CMD_SOURCE /* "source" command support */
#define CONFIG_CMD_SPI /* SPI utility */
#define CONFIG_CMD_TERMINAL /* built-in Serial Terminal */
#define CONFIG_CMD_UNIVERSE /* Tundra Universe Support */
diff --git a/include/config_cmd_default.h b/include/config_cmd_default.h
index 3667602..0376e44 100644
--- a/include/config_cmd_default.h
+++ b/include/config_cmd_default.h
@@ -16,7 +16,6 @@
* hardware, not fully tested, etc.).
*/
-#define CONFIG_CMD_AUTOSCRIPT /* Autoscript Support */
#define CONFIG_CMD_BDI /* bdinfo */
#define CONFIG_CMD_BOOTD /* bootd */
#define CONFIG_CMD_CONSOLE /* coninfo */
@@ -37,6 +36,7 @@
#define CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_RUN /* run command in env variable */
#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
+#define CONFIG_CMD_SOURCE /* "source" command support */
#define CONFIG_CMD_XIMG /* Load part of Multi Image */
#endif /* _CONFIG_CMD_DEFAULT_H */
diff --git a/include/configs/APC405.h b/include/configs/APC405.h
index 7453518..41eaaab 100644
--- a/include/configs/APC405.h
+++ b/include/configs/APC405.h
@@ -124,19 +124,19 @@
*/
#include <config_cmd_default.h>
+#define CONFIG_CMD_DATE
#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_IDE
-#define CONFIG_CMD_FAT
+#define CONFIG_CMD_EEPROM
#define CONFIG_CMD_ELF
-#define CONFIG_CMD_DATE
+#define CONFIG_CMD_FAT
#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_IRQ
#define CONFIG_CMD_MII
+#define CONFIG_CMD_PCI
#define CONFIG_CMD_PING
-#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_SOURCE
#define CONFIG_CMD_USB
-#define CONFIG_CMD_AUTOSCRIPT
#define CONFIG_MAC_PARTITION
#define CONFIG_DOS_PARTITION
diff --git a/include/configs/CRAYL1.h b/include/configs/CRAYL1.h
index 527c846..150bd29 100644
--- a/include/configs/CRAYL1.h
+++ b/include/configs/CRAYL1.h
@@ -74,32 +74,32 @@
#define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
#define CONFIG_SYS_HUSH_PARSER 1
#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
-#define CONFIG_AUTOSCRIPT 1
+#define CONFIG_SOURCE 1
/*
* Command line configuration.
*/
+#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_BDI
-#define CONFIG_CMD_IMI
-#define CONFIG_CMD_FLASH
-#define CONFIG_CMD_MEMORY
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_SAVEENV
#define CONFIG_CMD_CONSOLE
-#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DIAG
#define CONFIG_CMD_ECHO
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IMI
#define CONFIG_CMD_IMMAP
+#define CONFIG_CMD_MEMORY
+#define CONFIG_CMD_NET
#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DATE
#define CONFIG_CMD_RUN
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_DIAG
-#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_SAVEENV
#define CONFIG_CMD_SETGETDCR
+#define CONFIG_CMD_SOURCE
/*
diff --git a/include/configs/DU440.h b/include/configs/DU440.h
index 85c0e61..e6abbdc 100644
--- a/include/configs/DU440.h
+++ b/include/configs/DU440.h
@@ -290,14 +290,13 @@ int du440_phy_addr(int devnum);
#include <config_cmd_default.h>
-#define CONFIG_CMD_AUTOSCRIPT
-#define CONFIG_CMD_BSP
+#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_BMP
+#define CONFIG_CMD_BSP
#define CONFIG_CMD_DATE
-#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_DTT
#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_DTT
#define CONFIG_CMD_EEPROM
#define CONFIG_CMD_ELF
#define CONFIG_CMD_FAT
@@ -309,9 +308,10 @@ int du440_phy_addr(int devnum);
#define CONFIG_CMD_NFS
#define CONFIG_CMD_PCI
#define CONFIG_CMD_PING
-#define CONFIG_CMD_USB
#define CONFIG_CMD_REGINFO
#define CONFIG_CMD_SDRAM
+#define CONFIG_CMD_SOURCE
+#define CONFIG_CMD_USB
#define CONFIG_SUPPORT_VFAT
@@ -428,7 +428,7 @@ int du440_phy_addr(int devnum);
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
-#define CONFIG_AUTOSCRIPT 1
+#define CONFIG_SOURCE 1
#define CONFIG_OF_LIBFDT
#define CONFIG_OF_BOARD_SETUP
diff --git a/include/configs/EP1C20.h b/include/configs/EP1C20.h
index a0904d4..8941e4d 100644
--- a/include/configs/EP1C20.h
+++ b/include/configs/EP1C20.h
@@ -180,7 +180,6 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_SAVES
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_BOOTD
#undef CONFIG_CMD_CONSOLE
#undef CONFIG_CMD_FPGA
@@ -188,6 +187,7 @@
#undef CONFIG_CMD_ITEST
#undef CONFIG_CMD_NFS
#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_XIMG
diff --git a/include/configs/GEN860T.h b/include/configs/GEN860T.h
index a399d22..8f18ab2 100644
--- a/include/configs/GEN860T.h
+++ b/include/configs/GEN860T.h
@@ -152,7 +152,7 @@
/*
* Set default IP stuff just to get bootstrap entries into the
- * environment so that we can autoscript the full default environment.
+ * environment so that we can source the full default environment.
*/
#define CONFIG_ETHADDR 9a:52:63:15:85:25
#define CONFIG_SERVERIP 10.0.4.201
diff --git a/include/configs/MVBC_P.h b/include/configs/MVBC_P.h
index cd910ea..edbc701 100644
--- a/include/configs/MVBC_P.h
+++ b/include/configs/MVBC_P.h
@@ -73,8 +73,8 @@
#define MV_INITRD_LENGTH 0x00300000
#define MV_SCRATCH_ADDR 0x00000000
#define MV_SCRATCH_LENGTH MV_INITRD_LENGTH
-#define MV_AUTOSCR_ADDR 0xff840000
-#define MV_AUTOSCR_ADDR2 0xff850000
+#define MV_SOURCE_ADDR 0xff840000
+#define MV_SOURCE_ADDR2 0xff850000
#define MV_DTB_ADDR 0xfffc0000
#define CONFIG_SHOW_BOOT_PROGRESS 1
@@ -130,8 +130,8 @@
#define CONFIG_RESET_TO_RETRY 1000
#define CONFIG_BOOTCOMMAND "if imi ${autoscr_addr}; \
- then autoscr ${autoscr_addr}; \
- else autoscr ${autoscr_addr2}; \
+ then source ${autoscr_addr}; \
+ else source ${autoscr_addr2}; \
fi;"
#define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs"
@@ -149,8 +149,8 @@
"fpga=0\0" \
"fpgadata=" MK_STR(MV_FPGA_DATA) "\0" \
"fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0" \
- "autoscr_addr=" MK_STR(MV_AUTOSCR_ADDR) "\0" \
- "autoscr_addr2=" MK_STR(MV_AUTOSCR_ADDR2) "\0" \
+ "autoscr_addr=" MK_STR(MV_SOURCE_ADDR) "\0" \
+ "autoscr_addr2=" MK_STR(MV_SOURCE_ADDR2) "\0" \
"mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0" \
"mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0" \
"mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0" \
diff --git a/include/configs/MVBLM7.h b/include/configs/MVBLM7.h
index 4ecf806..3cf3bb2 100644
--- a/include/configs/MVBLM7.h
+++ b/include/configs/MVBLM7.h
@@ -411,8 +411,8 @@
#define MV_FPGA_SIZE 0x00076ca2
#define MV_KERNEL_ADDR 0xff810000
#define MV_INITRD_ADDR 0xffb00000
-#define MV_AUTOSCR_ADDR 0xff804000
-#define MV_AUTOSCR_ADDR2 0xff806000
+#define MV_SOURCE_ADDR 0xff804000
+#define MV_SOURCE_ADDR2 0xff806000
#define MV_DTB_ADDR 0xff808000
#define MV_INITRD_LENGTH 0x00400000
@@ -423,8 +423,8 @@
#define MV_INITRD_ADDR_RAM 0x01000000
#define CONFIG_BOOTCOMMAND "if imi ${autoscr_addr}; \
- then autoscr ${autoscr_addr}; \
- else autoscr ${autoscr_addr2}; \
+ then source ${autoscr_addr}; \
+ else source ${autoscr_addr2}; \
fi;"
#define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs"
@@ -437,8 +437,8 @@
"fpga=0\0" \
"fpgadata=" MK_STR(MV_FPGA_DATA) "\0" \
"fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0" \
- "autoscr_addr=" MK_STR(MV_AUTOSCR_ADDR) "\0" \
- "autoscr_addr2=" MK_STR(MV_AUTOSCR_ADDR2) "\0" \
+ "autoscr_addr=" MK_STR(MV_SOURCE_ADDR) "\0" \
+ "autoscr_addr2=" MK_STR(MV_SOURCE_ADDR2) "\0" \
"mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0" \
"mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0" \
"mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0" \
diff --git a/include/configs/NETPHONE.h b/include/configs/NETPHONE.h
index 2d04d89..796938a 100644
--- a/include/configs/NETPHONE.h
+++ b/include/configs/NETPHONE.h
@@ -71,7 +71,7 @@
"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \
"bootm"
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
#define CONFIG_LOADS_ECHO 0 /* echo off for serial download */
#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */
diff --git a/include/configs/NETTA2.h b/include/configs/NETTA2.h
index 4a27027..a14b2dd 100644
--- a/include/configs/NETTA2.h
+++ b/include/configs/NETTA2.h
@@ -71,7 +71,7 @@
"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
"bootm"
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
#define CONFIG_LOADS_ECHO 0 /* echo off for serial download */
#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */
diff --git a/include/configs/NX823.h b/include/configs/NX823.h
index 9182223..5054d5e 100644
--- a/include/configs/NX823.h
+++ b/include/configs/NX823.h
@@ -55,7 +55,7 @@
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */
#undef CONFIG_WATCHDOG /* watchdog disabled, for now */
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
/*
* BOOTP options
@@ -72,7 +72,7 @@
*/
#include <config_cmd_default.h>
-#define CONFIG_CMD_AUTOSCRIPT
+#define CONFIG_CMD_SOURCE
/* call various generic functions */
diff --git a/include/configs/PN62.h b/include/configs/PN62.h
index 06c11e6..562c5c3 100644
--- a/include/configs/PN62.h
+++ b/include/configs/PN62.h
@@ -59,11 +59,11 @@
#define CONFIG_CMD_PCI
#define CONFIG_CMD_BSP
-#undef CONFIG_CMD_AUTOSCRIPT
-#undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_SAVEENV
#undef CONFIG_CMD_FLASH
#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SAVEENV
+#undef CONFIG_CMD_SOURCE
#define CONFIG_BAUDRATE 19200 /* console baudrate */
diff --git a/include/configs/TOP860.h b/include/configs/TOP860.h
index 8c2befb..b9e450d 100644
--- a/include/configs/TOP860.h
+++ b/include/configs/TOP860.h
@@ -125,7 +125,7 @@
#define CONFIG_CMD_BEDBUG
-#define CONFIG_AUTOSCRIPT 1
+#define CONFIG_SOURCE 1
#define CONFIG_SYS_LOADS_BAUD_CHANGE 1
#undef CONFIG_LOADS_ECHO /* NO echo on for serial download */
@@ -419,15 +419,12 @@
/*
* Set default IP stuff just to get bootstrap entries into the
- * environment so that we can autoscript the full default environment.
+ * environment so that we can source the full default environment.
*/
#define CONFIG_ETHADDR 9a:52:63:15:85:25
#define CONFIG_SERVERIP 10.0.4.200
#define CONFIG_IPADDR 10.0.4.111
-/*-----------------------------------------------------------------------
- * Defaults for Autoscript
- */
#define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */
#define CONFIG_SYS_TFTP_LOADADDR 0x00100000
@@ -438,5 +435,4 @@
*/
#define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
-
#endif /* __CONFIG_H */
diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h
index d374981..fe1d102 100644
--- a/include/configs/TQM5200.h
+++ b/include/configs/TQM5200.h
@@ -253,7 +253,7 @@
#define CUSTOM_ENV_SETTINGS \
"bootfile=cam5200/uImage\0" \
"u-boot=cam5200/u-boot.bin\0" \
- "setup=tftp 200000 cam5200/setup.img; autoscr 200000\0"
+ "setup=tftp 200000 cam5200/setup.img; source 200000\0"
#endif
#if defined(CONFIG_TQM5200_B)
diff --git a/include/configs/VoVPN-GW.h b/include/configs/VoVPN-GW.h
index 5f9a17f..b2d75e3 100644
--- a/include/configs/VoVPN-GW.h
+++ b/include/configs/VoVPN-GW.h
@@ -150,11 +150,9 @@
* Command line configuration.
*/
-#define CONFIG_CMD_AUTOSCRIPT
#define CONFIG_CMD_BDI
#define CONFIG_CMD_CONSOLE
#define CONFIG_CMD_ECHO
-#define CONFIG_CMD_SAVEENV
#define CONFIG_CMD_FLASH
#define CONFIG_CMD_IMI
#define CONFIG_CMD_IMLS
@@ -164,6 +162,8 @@
#define CONFIG_CMD_NET
#define CONFIG_CMD_PING
#define CONFIG_CMD_RUN
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_SOURCE
/*
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 33a67ca..fa27119 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -69,11 +69,11 @@
*/
#include <config_cmd_default.h>
#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
#define CONFIG_CMD_PING 1
#define CONFIG_CMD_DHCP 1
diff --git a/include/configs/apollon.h b/include/configs/apollon.h
index f83dd9c..b0af2a9 100644
--- a/include/configs/apollon.h
+++ b/include/configs/apollon.h
@@ -127,7 +127,7 @@
#define CONFIG_MTD_PARTITIONS
#endif
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_SOURCE
#ifndef CONFIG_SYS_USE_NOR
# undef CONFIG_CMD_FLASH
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 7e7f124..2ddbd17 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -91,10 +91,10 @@
*/
#include <config_cmd_default.h>
#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_IMI
#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
#define CONFIG_CMD_PING 1
#define CONFIG_CMD_DHCP 1
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 1fae3a3..1a5f9a4 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -86,11 +86,11 @@
*/
#include <config_cmd_default.h>
#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
#define CONFIG_CMD_PING 1
#define CONFIG_CMD_DHCP 1
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 752d7e9..4d50932 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -90,11 +90,11 @@
*/
#include <config_cmd_default.h>
#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
#define CONFIG_CMD_PING 1
#define CONFIG_CMD_DHCP 1
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index dd500ca..78e0081 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -91,11 +91,11 @@
*/
#include <config_cmd_default.h>
#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
#define CONFIG_CMD_PING 1
#define CONFIG_CMD_DHCP 1
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 7a4039c..a48f2cb 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -82,12 +82,12 @@
*/
#include <config_cmd_default.h>
#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_IMI
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMI
#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_USB
#define CONFIG_CMD_NAND 1
diff --git a/include/configs/atngw100.h b/include/configs/atngw100.h
index c998952..4ed5514 100644
--- a/include/configs/atngw100.h
+++ b/include/configs/atngw100.h
@@ -117,9 +117,9 @@
#define CONFIG_CMD_SF
#define CONFIG_CMD_SPI
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_XIMG
#define CONFIG_ATMEL_USART 1
diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h
index 2284277..b258f2d 100644
--- a/include/configs/atstk1002.h
+++ b/include/configs/atstk1002.h
@@ -142,9 +142,9 @@
#define CONFIG_CMD_JFFS2
#define CONFIG_CMD_MMC
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_XIMG
#define CONFIG_ATMEL_USART 1
diff --git a/include/configs/atstk1006.h b/include/configs/atstk1006.h
index 8cfa312..f93118e 100644
--- a/include/configs/atstk1006.h
+++ b/include/configs/atstk1006.h
@@ -142,9 +142,9 @@
#define CONFIG_CMD_JFFS2
#define CONFIG_CMD_MMC
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_XIMG
#define CONFIG_ATMEL_USART 1
diff --git a/include/configs/eNET.h b/include/configs/eNET.h
index 84e1aef..8169d10 100644
--- a/include/configs/eNET.h
+++ b/include/configs/eNET.h
@@ -70,16 +70,15 @@
*/
#include <config_cmd_default.h>
-#define CONFIG_CMD_AUTOSCRIPT /* Autoscript Support */
#define CONFIG_CMD_BDI /* bdinfo */
#define CONFIG_CMD_BOOTD /* bootd */
#define CONFIG_CMD_CONSOLE /* coninfo */
#define CONFIG_CMD_ECHO /* echo arguments */
-#define CONFIG_CMD_SAVEENV /* saveenv */
#define CONFIG_CMD_FLASH /* flinfo, erase, protect */
#define CONFIG_CMD_FPGA /* FPGA configuration Support */
#define CONFIG_CMD_IMI /* iminfo */
#define CONFIG_CMD_IMLS /* List all found images */
+#define CONFIG_CMD_IRQ /* IRQ Information */
#define CONFIG_CMD_ITEST /* Integer (and string) test */
#define CONFIG_CMD_LOADB /* loadb */
#define CONFIG_CMD_LOADS /* loads */
@@ -88,9 +87,10 @@
#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_RUN /* run command in env variable */
+#define CONFIG_CMD_SAVEENV /* saveenv */
#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
+#define CONFIG_CMD_SOURCE /* "source" command Support */
#define CONFIG_CMD_XIMG /* Load part of Multi Image */
-#define CONFIG_CMD_IRQ /* IRQ Information */
#define CONFIG_BOOTDELAY 15
#define CONFIG_BOOTARGS "root=/dev/mtdblock0 console=ttyS0,9600"
diff --git a/include/configs/favr-32-ezkit.h b/include/configs/favr-32-ezkit.h
index 21802df..739ff0d 100644
--- a/include/configs/favr-32-ezkit.h
+++ b/include/configs/favr-32-ezkit.h
@@ -139,9 +139,9 @@
#define CONFIG_CMD_JFFS2
#define CONFIG_CMD_MMC
-#undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_FPGA
#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_XIMG
#define CONFIG_ATMEL_USART 1
diff --git a/include/configs/grsim.h b/include/configs/grsim.h
index a9eaa4a..c3f1a31 100644
--- a/include/configs/grsim.h
+++ b/include/configs/grsim.h
@@ -65,23 +65,23 @@
/*
* Supported commands
*/
-#define CONFIG_CMD_AMBAPP /* AMBA Plyg&Play information */
-#define CONFIG_CMD_AUTOSCRIPT /* Autoscript Support */
-#define CONFIG_CMD_BDI /* bdinfo */
-#define CONFIG_CMD_CONSOLE /* coninfo */
+#define CONFIG_CMD_AMBAPP /* AMBA Plyg&Play information */
+#define CONFIG_CMD_BDI /* bdinfo */
+#define CONFIG_CMD_CONSOLE /* coninfo */
#define CONFIG_CMD_DIAG
-#define CONFIG_CMD_ECHO /* echo arguments */
-#define CONFIG_CMD_FPGA /* FPGA configuration Support */
+#define CONFIG_CMD_ECHO /* echo arguments */
+#define CONFIG_CMD_FPGA /* FPGA configuration Support */
#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_ITEST /* Integer (and string) test */
-#define CONFIG_CMD_LOADB /* loadb */
-#define CONFIG_CMD_LOADS /* loads */
+#define CONFIG_CMD_ITEST /* Integer (and string) test */
+#define CONFIG_CMD_LOADB /* loadb */
+#define CONFIG_CMD_LOADS /* loads */
#define CONFIG_CMD_MISC /* Misc functions like sleep etc */
-#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
+#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_RUN /* run command in env variable */
-#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
-#define CONFIG_CMD_XIMG /* Load part of Multi Image */
+#define CONFIG_CMD_RUN /* run command in env variable */
+#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
+#define CONFIG_CMD_SOURCE /* "source" command support */
+#define CONFIG_CMD_XIMG /* Load part of Multi Image */
/*
* Autobooting
diff --git a/include/configs/grsim_leon2.h b/include/configs/grsim_leon2.h
index 58f26fd..7ebbf25 100644
--- a/include/configs/grsim_leon2.h
+++ b/include/configs/grsim_leon2.h
@@ -64,21 +64,21 @@
/*
* Supported commands
*/
-#define CONFIG_CMD_AUTOSCRIPT /* Autoscript Support */
-#define CONFIG_CMD_BDI /* bdinfo */
-#define CONFIG_CMD_CONSOLE /* coninfo */
+#define CONFIG_CMD_BDI /* bdinfo */
+#define CONFIG_CMD_CONSOLE /* coninfo */
#define CONFIG_CMD_DIAG
-#define CONFIG_CMD_ECHO /* echo arguments */
-#define CONFIG_CMD_FPGA /* FPGA configuration Support */
+#define CONFIG_CMD_ECHO /* echo arguments */
+#define CONFIG_CMD_FPGA /* FPGA configuration Support */
#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_ITEST /* Integer (and string) test */
-#define CONFIG_CMD_LOADB /* loadb */
-#define CONFIG_CMD_LOADS /* loads */
+#define CONFIG_CMD_ITEST /* Integer (and string) test */
+#define CONFIG_CMD_LOADB /* loadb */
+#define CONFIG_CMD_LOADS /* loads */
#define CONFIG_CMD_MISC /* Misc functions like sleep etc */
#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_RUN /* run command in env variable */
-#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
-#define CONFIG_CMD_XIMG /* Load part of Multi Image */
+#define CONFIG_CMD_RUN /* run command in env variable */
+#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
+#define CONFIG_CMD_SOURCE /* "source" command support */
+#define CONFIG_CMD_XIMG /* Load part of Multi Image */
/*
* Autobooting
diff --git a/include/configs/gth2.h b/include/configs/gth2.h
index b1b4842..677baea 100644
--- a/include/configs/gth2.h
+++ b/include/configs/gth2.h
@@ -90,18 +90,18 @@
#define CONFIG_CMD_IDE
#define CONFIG_CMD_DHCP
-#undef CONFIG_CMD_SAVEENV
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_ELF
#undef CONFIG_CMD_FAT
#undef CONFIG_CMD_FLASH
#undef CONFIG_CMD_FPGA
-#undef CONFIG_CMD_MII
-#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_LOADB
-#undef CONFIG_CMD_ELF
-#undef CONFIG_CMD_BDI
-#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_MII
#undef CONFIG_CMD_NFS
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_SAVEENV
+#undef CONFIG_CMD_SOURCE
/*
diff --git a/include/configs/keymile-common.h b/include/configs/keymile-common.h
index 58b95f4..b2e37ec 100644
--- a/include/configs/keymile-common.h
+++ b/include/configs/keymile-common.h
@@ -240,7 +240,7 @@
"new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0" \
"new_esw=run set_new_esw_script; " \
"tftp ${autoscr_ws} ${new_esw_script}; " \
- "iminfo ${autoscr_ws}; autoscr ${autoscr_ws} \0" \
+ "iminfo ${autoscr_ws}; source ${autoscr_ws} \0" \
"bootlimit=0 \0" \
CONFIG_KM_DEF_ENV_IOMUX \
CONFIG_KM_DEF_ENV_PRIVATE \
diff --git a/include/configs/lwmon.h b/include/configs/lwmon.h
index d52a5e0..8f00773 100644
--- a/include/configs/lwmon.h
+++ b/include/configs/lwmon.h
@@ -93,7 +93,7 @@
* 3 = 0x3C+0x3F = F3 + F6 : enable test mode
*/
-#define CONFIG_BOOTCOMMAND "autoscr 40040000;saveenv"
+#define CONFIG_BOOTCOMMAND "source 40040000;saveenv"
/* "gatewayip=10.8.211.250\0" \ */
#define CONFIG_EXTRA_ENV_SETTINGS \
@@ -108,7 +108,7 @@
"key_magic2=3A+3C\0" \
"key_cmd2=echo *** Entering Update Mode ***;" \
"if fatload ide 0:3 10000 update.scr;" \
- "then autoscr 10000;" \
+ "then source 10000;" \
"else echo *** UPDATE FAILED ***;" \
"fi\0" \
"key_magic3=3C+3F\0" \
diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h
index 05055c8..777a4d6 100644
--- a/include/configs/lwmon5.h
+++ b/include/configs/lwmon5.h
@@ -313,7 +313,7 @@
"cp.b 200000 FFF80000 80000\0" \
"upd=run load update\0" \
"lwe_env=tftp 200000 /tftpboot.dev/lwmon5/env_uboot.bin;" \
- "autoscr 200000\0" \
+ "source 200000\0" \
""
#define CONFIG_BOOTCOMMAND "run flash_self"
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index 9ac7e9a..edaa174 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -163,15 +163,15 @@
#else
- #define CONFIG_CMD_USB
#define CONFIG_CMD_CACHE
+ #define CONFIG_CMD_USB
- #undef CONFIG_CMD_AUTOSCRIPT
#undef CONFIG_CMD_BDI
#undef CONFIG_CMD_FPGA
#undef CONFIG_CMD_IMI
#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_MISC
+ #undef CONFIG_CMD_SOURCE
#endif
diff --git a/include/configs/mx1fs2.h b/include/configs/mx1fs2.h
index a19eb78..cba0803 100644
--- a/include/configs/mx1fs2.h
+++ b/include/configs/mx1fs2.h
@@ -51,12 +51,12 @@
#define CONFIG_CMD_JFFS2
-#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_NET
#undef CONFIG_CMD_PING
-#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_SOURCE
/*
diff --git a/include/configs/omap2420h4.h b/include/configs/omap2420h4.h
index 983b5f2..13b89ac 100644
--- a/include/configs/omap2420h4.h
+++ b/include/configs/omap2420h4.h
@@ -135,7 +135,7 @@
#define CONFIG_CMD_I2C
#define CONFIG_CMD_JFFS2
- #undef CONFIG_CMD_AUTOSCRIPT
+ #undef CONFIG_CMD_SOURCE
#endif
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 0f9344b..c20981c 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -174,7 +174,7 @@
"rootfstype=jffs2\0" \
"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc ...; " \
- "autoscr ${loadaddr}\0" \
+ "source ${loadaddr}\0" \
"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index f4498a9..db82899 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -167,7 +167,7 @@
"rootfstype=jffs2\0" \
"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc ...; " \
- "autoscr ${loadaddr}\0" \
+ "source ${loadaddr}\0" \
"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index dee0417..64cc1c4 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -161,7 +161,7 @@
"rootfstype=jffs2\0" \
"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc ...; " \
- "autoscr ${loadaddr}\0" \
+ "source ${loadaddr}\0" \
"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 00c0374..592ec75 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -163,7 +163,7 @@
"rootfstype=jffs2\0" \
"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc ...; " \
- "autoscr ${loadaddr}\0" \
+ "source ${loadaddr}\0" \
"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index f8ae163..70ec036 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -171,7 +171,7 @@
"rootfstype=jffs2\0" \
"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc ...; " \
- "autoscr ${loadaddr}\0" \
+ "source ${loadaddr}\0" \
"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
diff --git a/include/configs/sc3.h b/include/configs/sc3.h
index 5b68ef9..97e1da2 100644
--- a/include/configs/sc3.h
+++ b/include/configs/sc3.h
@@ -122,7 +122,7 @@
"rootpath=/opt/eldk/ppc_4xx\0" \
"bootfile=/tftpboot/sc3/uImage\0" \
"u-boot=/tftpboot/sc3/u-boot.bin\0" \
- "setup=tftp 200000 /tftpboot/sc3/setup.img;autoscr 200000\0" \
+ "setup=tftp 200000 /tftpboot/sc3/setup.img;source 200000\0" \
"kernel_addr=FFE08000\0" \
""
#undef CONFIG_BOOTCOMMAND
@@ -186,20 +186,20 @@
#include <config_cmd_default.h>
-#define CONFIG_CMD_AUTOSCRIPT
-#define CONFIG_CMD_PCI
-#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_NAND
-#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_IDE
+#define CONFIG_CMD_CACHE
#define CONFIG_CMD_DATE
#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_CACHE
#define CONFIG_CMD_ELF
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_IDE
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SOURCE
#undef CONFIG_WATCHDOG /* watchdog disabled */
diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h
index 5971df7..a038901 100644
--- a/include/configs/scb9328.h
+++ b/include/configs/scb9328.h
@@ -53,9 +53,9 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
-#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_SOURCE
/*
diff --git a/include/configs/stxxtc.h b/include/configs/stxxtc.h
index 5a5f772..147233d 100644
--- a/include/configs/stxxtc.h
+++ b/include/configs/stxxtc.h
@@ -68,7 +68,7 @@
"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
"bootm"
-#define CONFIG_AUTOSCRIPT
+#define CONFIG_SOURCE
#define CONFIG_LOADS_ECHO 0 /* echo off for serial download */
#undef CONFIG_SYS_LOADS_BAUD_CHANGE /* don't allow baudrate change */
diff --git a/include/configs/vct.h b/include/configs/vct.h
index 5371e2d..d202522 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -301,38 +301,38 @@ int vct_gpio_get(int pin);
* (NOR/OneNAND) usage and Linux kernel booting.
*/
#if defined(CONFIG_VCT_SMALL_IMAGE)
+#undef CONFIG_CMD_ASKENV
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_CACHE
+#undef CONFIG_CMD_CONSOLE
+#undef CONFIG_CMD_CRC32
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_EEPROM
#undef CONFIG_CMD_EEPROM
-#undef CONFIG_CMD_I2C
-#undef CONFIG_CMD_NET
-#undef CONFIG_CMD_PING
-#undef CONFIG_CMD_SNTP
#undef CONFIG_CMD_ELF
-#undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_CACHE
-#undef CONFIG_CMD_BEDBUG
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_FAT
+#undef CONFIG_CMD_I2C
+#undef CONFIG_CMD_I2C
#undef CONFIG_CMD_IRQ
#undef CONFIG_CMD_ITEST
+#undef CONFIG_CMD_LOADB
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_LOADY
#undef CONFIG_CMD_MII
#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_PING
#undef CONFIG_CMD_REGINFO
+#undef CONFIG_CMD_SNTP
+#undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_STRINGS
#undef CONFIG_CMD_TERMINAL
-#undef CONFIG_CMD_ASKENV
-#undef CONFIG_CMD_CRC32
-#undef CONFIG_CMD_DHCP
-#undef CONFIG_CMD_EEPROM
-#undef CONFIG_CMD_I2C
-#undef CONFIG_CMD_LOADB
-#undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_LOADY
-#undef CONFIG_CMD_BDI
#undef CONFIG_CMD_USB
-#undef CONFIG_CMD_FAT
#undef CONFIG_DRIVER_SMC911X
#undef CONFIG_SOFT_I2C
-#undef CONFIG_AUTOSCRIPT
+#undef CONFIG_SOURCE
#undef CONFIG_SYS_LONGHELP
#undef CONFIG_TIMESTAMP
#endif /* CONFIG_VCT_SMALL_IMAGE */
diff --git a/include/configs/wepep250.h b/include/configs/wepep250.h
index d0afd29..1d529b3 100644
--- a/include/configs/wepep250.h
+++ b/include/configs/wepep250.h
@@ -49,10 +49,10 @@
*/
#include <config_cmd_default.h>
-#undef CONFIG_CMD_NET
-#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_CONSOLE
-#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_SOURCE
/*
--
1.6.0.6
3
3
This patch adds support for Faraday Technology RTC IP - FTRTC
Signed-off-by: Po-Yu Chuang <ratbert at faraday-tech.com>
---
diff -ruN u-boot-2009.03/drivers/rtc/ftrtc.c FA5A320LINUX26_u-boot/drivers/rtc/ftrtc.c
--- u-boot-2009.03/drivers/rtc/ftrtc.c 1970-01-01 08:00:00.000000000 +0800
+++ FA5A320LINUX26_u-boot/drivers/rtc/ftrtc.c 2009-03-31 16:28:40.000000000 +0800
@@ -0,0 +1,110 @@
+/*
+ * Faraday FTRTC Real Time Clock
+ *
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert(a)faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#undef DEBUG
+
+#include <config.h>
+#include <common.h>
+#include <asm/io.h>
+#include <rtc.h>
+#include "ftrtc.h"
+
+static unsigned int rtc = CONFIG_SYS_RTC_BASE;
+
+static void
+ftrtc_enable(void)
+{
+ outl(FTRTC_CR_ENABLE, rtc + FTRTC_OFFSET_CR);
+}
+
+/*
+ * return current time in seconds
+ */
+static unsigned long
+ftrtc_time(void)
+{
+ unsigned long day;
+ unsigned long hour;
+ unsigned long minute;
+ unsigned long second;
+ unsigned long second2;
+
+ do {
+ second = inl(rtc + FTRTC_OFFSET_SEC);
+ day = inl(rtc + FTRTC_OFFSET_DAY);
+ hour = inl(rtc + FTRTC_OFFSET_HOUR);
+ minute = inl(rtc + FTRTC_OFFSET_MIN);
+ second2 = inl(rtc + FTRTC_OFFSET_SEC);
+ } while (second != second2);
+
+ return day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 + second;
+}
+
+/*
+ * Get the current time from the RTC
+ */
+
+int
+rtc_get(struct rtc_time *tmp)
+{
+ unsigned long now;
+
+ debug("rtc_get(): record register: %x\n", inl(rtc + FTRTC_OFFSET_RECORD));
+
+ now = ftrtc_time() + inl(rtc + FTRTC_OFFSET_RECORD);
+
+ to_tm(now, tmp);
+
+ return 0;
+}
+
+/*
+ * Set the RTC
+ */
+int
+rtc_set(struct rtc_time *tmp)
+{
+ unsigned long new;
+ unsigned long now;
+
+ debug("rtc_set(): DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n",
+ tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
+ tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+
+ new = mktime(tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_hour,
+ tmp->tm_min, tmp->tm_sec);
+
+ now = ftrtc_time();
+
+ debug("rtc_set(): write %x to record register\n", new - now);
+
+ outl(new - now, rtc + FTRTC_OFFSET_RECORD);
+
+ return 0;
+}
+
+void
+rtc_reset(void)
+{
+ debug("rtc_reset()\n");
+ ftrtc_enable();
+}
+
diff -ruN u-boot-2009.03/drivers/rtc/ftrtc.h FA5A320LINUX26_u-boot/drivers/rtc/ftrtc.h
--- u-boot-2009.03/drivers/rtc/ftrtc.h 1970-01-01 08:00:00.000000000 +0800
+++ FA5A320LINUX26_u-boot/drivers/rtc/ftrtc.h 2009-03-31 15:19:32.000000000 +0800
@@ -0,0 +1,44 @@
+/*
+ * Faraday FTRTC Real Time Clock
+ *
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert(a)faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __FTRTC_H
+#define __FTRTC_H
+
+#define FTRTC_OFFSET_SEC 0x00
+#define FTRTC_OFFSET_MIN 0x04
+#define FTRTC_OFFSET_HOUR 0x08
+#define FTRTC_OFFSET_DAY 0x0c
+#define FTRTC_OFFSET_ALRM_SEC 0x10
+#define FTRTC_OFFSET_ALRM_MIN 0x14
+#define FTRTC_OFFSET_ALRM_HOUR 0x18
+#define FTRTC_OFFSET_RECORD 0x1c
+#define FTRTC_OFFSET_CR 0x20
+
+/*
+ * RTC Control Register
+ */
+#define FTRTC_CR_ENABLE (1 << 0)
+#define FTRTC_CR_INTERRUPT_SEC (1 << 1) /* enable interrupt per second */
+#define FTRTC_CR_INTERRUPT_MIN (1 << 2) /* enable interrupt per minute */
+#define FTRTC_CR_INTERRUPT_HR (1 << 3) /* enable interrupt per hour */
+#define FTRTC_CR_INTERRUPT_DAY (1 << 4) /* enable interrupt per day */
+
+#endif /* __FTRTC_H */
diff -ruN u-boot-2009.03/drivers/rtc/Makefile FA5A320LINUX26_u-boot/drivers/rtc/Makefile
--- u-boot-2009.03/drivers/rtc/Makefile 2009-03-22 05:04:41.000000000 +0800
+++ FA5A320LINUX26_u-boot/drivers/rtc/Makefile 2009-03-25 10:29:04.000000000 +0800
@@ -40,6 +40,7 @@
COBJS-$(CONFIG_RTC_DS164x) += ds164x.o
COBJS-$(CONFIG_RTC_DS174x) += ds174x.o
COBJS-$(CONFIG_RTC_DS3231) += ds3231.o
+COBJS-$(CONFIG_RTC_FTRTC) += ftrtc.o
COBJS-$(CONFIG_RTC_ISL1208) += isl1208.o
COBJS-$(CONFIG_RTC_M41T11) += m41t11.o
COBJS-$(CONFIG_RTC_M41T60) += m41t60.o
2
1