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
July 2012
- 184 participants
- 583 discussions
On 16/07/2012 08:26, Andreas Salvisberg wrote:
> Dear Mr. Babic
>
>
Hi,
please use the U-Boot ML for U-Boot related questions. You will find
much more help than asking to a single person and your questions can
interest many other people.
>
> I try to run a USB Host on a i.MX53 Board. Unfortunately USB does not
> work. I got the following error message: „EHCI timed out on TD -
> token=0x80008c80“.
>
>
>
> On a discussion on GMANE I found a post of you, that you run USB on a
> mx53_loco.
>
> Can you tell me on which source base you are working?
I tested when patches were submitted on a MX53QSB. I have tried now, and
USB seems working.
U-Boot 2011.12-00518-gf56cab3 (Mar 23 2012 - 13:03:38)
CPU: Freescale i.MX53 rev2.1 at 800 MHz
Reset cause: POR
Board: MX53 LOCO
DRAM: 1 GiB
WARNING: Caches not enabled
MMC: FSL_SDHC: 0, FSL_SDHC: 1
In: serial
Out: serial
Err: serial
Net: FEC
Hit any key to stop autoboot: 0
MX53LOCO U-Boot > usb start
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s) found
scanning bus for ethernet devices... 0 Ethernet Device(s) found
However, with last TOT I get errors:
ERROR: v7_dcache_inval_range - stop address is not aligned - 0xaf56b960
and of course it is not working. Some "git bisect" is needed here...
>
> Do you use the UBoot sources from Freescale?
Absolutely not, only mainline U-Boot.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic(a)denx.de
=====================================================================
1
0

Re: [U-Boot] [PATCH] fsl: board EEPROM has the CRC in the wrong location
by Tabi Timur-B04825 15 Jul '12
by Tabi Timur-B04825 15 Jul '12
15 Jul '12
Or Yoram-R56270 wrote:
> 1. Correct the v1 documentation to specify 23 MAC addresses and placing the CRC at 0xCC.
> 2. Create a new code and documentation for v2, specifying 31 MAC addresses and placing the CRC at 0xFC.
Both of these are unnecessary. My patch fixes the code to match the spec
*and* handles the CRC problem transparently. It also doesn't do anything
controversial that the current code doesn't already do. Really, this is a
non-issue.
--
Timur Tabi
Linux kernel developer at Freescale
1
0
I have a new Zyxel NSA320. It is unmodified. At the uboot prompt I
printenv and save all environment variables. Next I pulled code from
https://github.com/psch2/uboot-nsa320, compiled and used kwboot to load
new uboot. No problems so far. Now if I reload all environment variables I
saved and boot the kernel loads but does not execute. Any ideas?
NSA320> boot
NAND read: device 0 offset 0xc80000, size 0xa00000
10485760 bytes read: OK
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-2.6.31.8
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5909960 Bytes = 5.6 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing
Linux...............................................................................................................................................................................................................................................................................
done, booting the kernel.
Richard
2
4
Hi Simon, Wolfgang and others,
just want to open new topic about FDT driver initialization function
declaration.
There are some drivers which can be simple move to fdt initialization.
I have in my mind ethernet drivers and then systemace (I have ported it).
Ethernet drivers use include/netdev.h file where all initialization
functions are declared.
For example:
diff --git a/include/netdev.h b/include/netdev.h
index 4724717..96e62ee 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -105,6 +105,10 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,
int xilinx_ll_temac_eth_init(bd_t *bis, unsigned long base_addr, int flags,
unsigned long ctrl_addr);
+#ifdef CONFIG_OF_CONTROL
+int xilinx_emaclite_init(bd_t *bis);
+#endif
+
/*
* As long as the Xilinx xps_ll_temac ethernet driver has not its own interface
* exported by a public hader file, we need a global definition at this point.
But where is the right place for systemace FDT initialization?
include/fdtdec.h?
or create new header and include it to fdtdec.h?
In this case it makes sense to add all FDT driven configuration to one header file
to see what drivers can be used. Even for network drivers.
Also listing all required parameters can be capture there.
What do you think?
Thanks for your comments.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
7
25
Hi,
Thank you for your reply.
I have the U-boot source code of SAMSUNG EXYNOS SMDKV310 board. When i
compiled the U-boot source code I got uboot.bin file and bl1.bin file.
Actually bl1.bin file is extracted from the uboot.bin file by using the
mkbl2 tool(tool's source code is present in the U-boot source itself)and
used as a first stage bootloader.Uboot.bin file is used as a second stage
bootloader.
"bl1.bin responsibility is to load the second stage bootloader from
the sd card to SD RAM".*I have the doubt in the bl1.bin file *how the above
mentioned transforming is done from the following device copy function.
#define SDMMC_ReadBlocks_eMMC_ByCPU(uNumOfBlks, uDstAddr) \
(((void(*)(u32, u32*))(*((u32
*)EXT_eMMC43_BL2_ByCPU_ADDRESS)))(uNumOfBlks, uDstAddr))
The above MACRO is the Physical adress which is mapped to IRAM
The above indirect function is present in the following source code path
board/samsung/smdkv310/lowlevel_init.S.
Actually I have to design the IROM code similar to SAMSUNG EXYNOS SOC.
Please Help me in this.
Thanks
Balaji
2
1
From: Rob Herring <rob.herring(a)calxeda.com>
CONFIG_STACKSIZE is not referenced anywhere except on AVR32, but present
in most ARM boards. The IRQ and FIQ stacks are not setup in start.S, but
arch/arm/lib/board.c, so also remove those comments.
Cc: Albert ARIBAUD <albert.u.boot(a)aribaud.net>
Signed-off-by: Rob Herring <rob.herring(a)calxeda.com>
---
include/configs/SX1.h | 3 ---
include/configs/VCMA9.h | 2 --
include/configs/a320evb.h | 3 ---
include/configs/actux1.h | 6 ------
include/configs/actux2.h | 6 ------
include/configs/actux3.h | 7 -------
include/configs/actux4.h | 6 ------
include/configs/adp-ag101.h | 7 -------
include/configs/adp-ag101p.h | 7 -------
include/configs/adp-ag102.h | 7 -------
include/configs/afeb9260.h | 2 --
include/configs/am3517_crane.h | 7 -------
include/configs/am3517_evm.h | 7 -------
include/configs/apollon.h | 7 -------
include/configs/at91rm9200ek.h | 1 -
include/configs/at91sam9260ek.h | 2 --
include/configs/at91sam9261ek.h | 2 --
include/configs/at91sam9263ek.h | 2 --
include/configs/at91sam9m10g45ek.h | 2 --
include/configs/at91sam9rlek.h | 2 --
include/configs/balloon3.h | 1 -
include/configs/ca9x4_ct_vxp.h | 1 -
include/configs/calimain.h | 1 -
include/configs/cam_enc_4xx.h | 1 -
include/configs/cm4008.h | 3 ---
include/configs/cm41xx.h | 3 ---
include/configs/cm_t35.h | 7 -------
include/configs/colibri_pxa270.h | 3 ---
include/configs/cpu9260.h | 2 --
include/configs/cpuat91.h | 1 -
include/configs/da830evm.h | 1 -
include/configs/da850evm.h | 1 -
include/configs/davinci_dm355evm.h | 1 -
include/configs/davinci_dm355leopard.h | 1 -
include/configs/davinci_dm365evm.h | 1 -
include/configs/davinci_dm6467evm.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/devkit3250.h | 1 -
include/configs/devkit8000.h | 3 ---
include/configs/dig297.h | 3 ---
include/configs/dvlhost.h | 3 ---
include/configs/ea20.h | 1 -
include/configs/eb_cpux9k2.h | 2 --
include/configs/edminiv2.h | 1 -
include/configs/efikamx.h | 7 -------
include/configs/enbw_cmc.h | 1 -
include/configs/ethernut5.h | 4 ++--
include/configs/flea3.h | 8 --------
include/configs/hawkboard.h | 1 -
include/configs/highbank.h | 3 ---
include/configs/igep00x0.h | 7 -------
include/configs/ima3-mx53.h | 3 ---
include/configs/imx27lite-common.h | 1 -
include/configs/imx31_litekit.h | 7 -------
include/configs/imx31_phycore.h | 7 -------
include/configs/integratorap.h | 3 ---
include/configs/integratorcp.h | 3 ---
include/configs/jadecpu.h | 2 --
include/configs/jornada.h | 6 ------
include/configs/km/km_arm.h | 1 -
include/configs/lubbock.h | 3 ---
include/configs/m28evk.h | 1 -
include/configs/mcx.h | 7 -------
include/configs/meesc.h | 2 --
include/configs/mv-common.h | 1 -
include/configs/mx1ads.h | 3 ---
include/configs/mx25pdk.h | 3 ---
include/configs/mx28evk.h | 1 -
include/configs/mx31ads.h | 7 -------
include/configs/mx31pdk.h | 7 -------
include/configs/mx35pdk.h | 8 --------
include/configs/mx51evk.h | 7 -------
include/configs/mx53ard.h | 3 ---
include/configs/mx53evk.h | 3 ---
include/configs/mx53loco.h | 3 ---
include/configs/mx53smd.h | 3 ---
include/configs/mx6qarm2.h | 1 -
include/configs/mx6qsabrelite.h | 1 -
include/configs/nhk8815.h | 1 -
include/configs/ns9750dev.h | 3 ---
include/configs/omap1510inn.h | 3 ---
include/configs/omap2420h4.h | 3 ---
include/configs/omap3_beagle.h | 7 -------
include/configs/omap3_evm_common.h | 6 ------
include/configs/omap3_logic.h | 7 -------
include/configs/omap3_mvblx.h | 7 -------
include/configs/omap3_overo.h | 7 -------
include/configs/omap3_pandora.h | 7 -------
include/configs/omap3_sdp3430.h | 7 -------
include/configs/omap3_zoom1.h | 7 -------
include/configs/omap3_zoom2.h | 7 -------
include/configs/omap4_common.h | 3 ---
include/configs/omap5912osk.h | 3 ---
include/configs/omap5_evm.h | 3 ---
include/configs/omap730p2.h | 4 ----
include/configs/origen.h | 3 ---
include/configs/otc570.h | 2 --
include/configs/palmld.h | 1 -
include/configs/palmtc.h | 1 -
include/configs/pdnb3.h | 3 ---
include/configs/pm9261.h | 2 --
include/configs/pm9263.h | 2 --
include/configs/pm9g45.h | 2 --
include/configs/pxa255_idp.h | 3 ---
include/configs/qong.h | 6 ------
include/configs/s5p_goni.h | 3 ---
include/configs/s5pc210_universal.h | 3 ---
include/configs/sbc35_a9g20.h | 1 -
include/configs/scb9328.h | 2 --
include/configs/smdk2410.h | 3 ---
include/configs/smdk5250.h | 3 ---
include/configs/smdk6400.h | 7 -------
include/configs/smdkc100.h | 7 -------
include/configs/smdkv310.h | 3 ---
include/configs/snapper9260.h | 1 -
include/configs/spear-common.h | 3 ---
include/configs/tam3517-common.h | 6 ------
include/configs/tegra2-common.h | 6 ------
include/configs/tnetv107x_evm.h | 1 -
include/configs/tny_a9260.h | 2 --
include/configs/top9000.h | 1 -
include/configs/trats.h | 3 ---
include/configs/tricorder.h | 3 ---
include/configs/trizepsiv.h | 3 ---
include/configs/tt01.h | 3 ---
include/configs/tx25.h | 1 -
include/configs/vct.h | 1 -
include/configs/versatile.h | 3 ---
include/configs/vision2.h | 5 -----
include/configs/vpac270.h | 1 -
include/configs/xaeniax.h | 3 ---
include/configs/zipitz2.h | 1 -
include/configs/zmx25.h | 1 -
136 files changed, 2 insertions(+), 451 deletions(-)
diff --git a/include/configs/SX1.h b/include/configs/SX1.h
index ea09368..1c4f305 100644
--- a/include/configs/SX1.h
+++ b/include/configs/SX1.h
@@ -141,10 +141,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h
index 6ad4a6b..a173607 100644
--- a/include/configs/VCMA9.h
+++ b/include/configs/VCMA9.h
@@ -193,9 +193,7 @@
/*
* Stack sizes
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 * 1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4 * 1024) /* FIQ stack */
diff --git a/include/configs/a320evb.h b/include/configs/a320evb.h
index a2b347a..899383d 100644
--- a/include/configs/a320evb.h
+++ b/include/configs/a320evb.h
@@ -106,10 +106,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 * 1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4 * 1024) /* FIQ stack */
diff --git a/include/configs/actux1.h b/include/configs/actux1.h
index bdd2239..de29eb9 100644
--- a/include/configs/actux1.h
+++ b/include/configs/actux1.h
@@ -105,12 +105,6 @@
115200, 230400 }
#define CONFIG_SERIAL_RTS_ACTIVE 1
-/*
- * Stack sizes
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
-
/* Expansion bus settings */
#define CONFIG_SYS_EXP_CS0 0xbd113842
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index c55571c..d2cc26c 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -98,12 +98,6 @@
115200, 230400 }
#define CONFIG_SERIAL_RTS_ACTIVE 1
-/*
- * Stack sizes
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
-
/* Expansion bus settings */
#define CONFIG_SYS_EXP_CS0 0xbd113042
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index 78ee2b5..7165db0 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -96,13 +96,6 @@
115200, 230400 }
#define CONFIG_SERIAL_RTS_ACTIVE 1
-/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
-
/* Expansion bus settings */
#define CONFIG_SYS_EXP_CS0 0xbd113442
diff --git a/include/configs/actux4.h b/include/configs/actux4.h
index c1105df..c34dca2 100644
--- a/include/configs/actux4.h
+++ b/include/configs/actux4.h
@@ -103,12 +103,6 @@
115200, 230400 }
#define CONFIG_SERIAL_RTS_ACTIVE 1
-/*
- * Stack sizes
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
-
/* Expansion bus settings */
#define CONFIG_SYS_EXP_CS0 0xbd113003
diff --git a/include/configs/adp-ag101.h b/include/configs/adp-ag101.h
index 6bf0add..b6e3844 100644
--- a/include/configs/adp-ag101.h
+++ b/include/configs/adp-ag101.h
@@ -145,13 +145,6 @@
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*
* Size of malloc() pool
*/
/* 512kB is suggested, (CONFIG_ENV_SIZE + 128 * 1024) was not enough */
diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h
index 747d061..ef55e35 100644
--- a/include/configs/adp-ag101p.h
+++ b/include/configs/adp-ag101p.h
@@ -145,13 +145,6 @@
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*
* Size of malloc() pool
*/
/* 512kB is suggested, (CONFIG_ENV_SIZE + 128 * 1024) was not enough */
diff --git a/include/configs/adp-ag102.h b/include/configs/adp-ag102.h
index 35f88cc..eea44db 100644
--- a/include/configs/adp-ag102.h
+++ b/include/configs/adp-ag102.h
@@ -219,13 +219,6 @@
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*
* Size of malloc() pool
*/
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024)
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 6715cb4..8192771 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -170,8 +170,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 54ab3eb..dd99370 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -256,13 +256,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index ed0a601..6bc1d0a 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -253,13 +253,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/apollon.h b/include/configs/apollon.h
index aebca71..83b1818 100644
--- a/include/configs/apollon.h
+++ b/include/configs/apollon.h
@@ -207,13 +207,6 @@
#define CONFIG_SYS_HZ ((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV))
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE SZ_128K /* regular stack */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1 /* CS1 may or may not be populated */
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index 2abcaff..f4e8c90 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -224,7 +224,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_4K \
- GENERATED_GBL_DATA_SIZE)
-#define CONFIG_STACKSIZE SZ_32K /* regular stack */
#define CONFIG_STACKSIZE_IRQ SZ_4K /* Unsure if to big or to small*/
#define CONFIG_STACKSIZE_FIQ SZ_4K /* Unsure if to big or to small*/
#endif /* __AT91RM9200EK_CONFIG_H__ */
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 07b1968..286090e 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -236,8 +236,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 6fd0b83..825e150 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -238,8 +238,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 61a622a..fceccd5 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -349,8 +349,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
#undef CONFIG_USE_IRQ
#endif
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index f8b3095..160d6a9 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -193,8 +193,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 45f8baf..6def83e 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -188,8 +188,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
#undef CONFIG_USE_IRQ
#endif
diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h
index 97fdc2c..d32fb50 100644
--- a/include/configs/balloon3.h
+++ b/include/configs/balloon3.h
@@ -104,7 +104,6 @@
/*
* Stack sizes
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/ca9x4_ct_vxp.h b/include/configs/ca9x4_ct_vxp.h
index 14b8146..79c178b 100644
--- a/include/configs/ca9x4_ct_vxp.h
+++ b/include/configs/ca9x4_ct_vxp.h
@@ -106,7 +106,6 @@
#define CONFIG_BOOTDELAY 2
/* Stack sizes are set up in start.S using the settings below */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 * 1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4 * 1024) /* FIQ stack */
diff --git a/include/configs/calimain.h b/include/configs/calimain.h
index e31e40b..ffc67ec 100644
--- a/include/configs/calimain.h
+++ b/include/configs/calimain.h
@@ -161,7 +161,6 @@
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (16 << 20))
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
/*
* Serial Driver info
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index 771ac9c..cfa404f 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -191,7 +191,6 @@
#define CONFIG_TIMESTAMP
/* U-Boot memory configuration */
-#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
#define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
#define CONFIG_SYS_MEMTEST_START 0x80000000 /* physical address */
#define CONFIG_SYS_MEMTEST_END 0x81000000 /* test 16MB RAM */
diff --git a/include/configs/cm4008.h b/include/configs/cm4008.h
index 408e918..955ee9f 100644
--- a/include/configs/cm4008.h
+++ b/include/configs/cm4008.h
@@ -97,10 +97,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/cm41xx.h b/include/configs/cm41xx.h
index d85a600..955e6ea 100644
--- a/include/configs/cm41xx.h
+++ b/include/configs/cm41xx.h
@@ -97,10 +97,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 782d28c..f586ab5 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -278,13 +278,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1 /* CS1 is never populated */
diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h
index 1f02f3f..e2ea909 100644
--- a/include/configs/colibri_pxa270.h
+++ b/include/configs/colibri_pxa270.h
@@ -118,10 +118,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 * 1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4 * 1024) /* FIQ stack */
diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h
index a877066..fef61b8 100644
--- a/include/configs/cpu9260.h
+++ b/include/configs/cpu9260.h
@@ -511,8 +511,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - \
GENERATED_GBL_DATA_SIZE)
-#define CONFIG_STACKSIZE (32 * 1024)
-
#if defined(CONFIG_USE_IRQ)
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h
index dc676df..f80a910 100644
--- a/include/configs/cpuat91.h
+++ b/include/configs/cpuat91.h
@@ -211,7 +211,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - \
GENERATED_GBL_DATA_SIZE)
-#define CONFIG_STACKSIZE (32 * 1024)
#define CONFIG_STACKSIZE_IRQ (4 * 1024)
#define CONFIG_STACKSIZE_FIQ (4 * 1024)
diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h
index 51dc664..bb2261d 100644
--- a/include/configs/da830evm.h
+++ b/include/configs/da830evm.h
@@ -53,7 +53,6 @@
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + \
(32 << 20))
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
/*
* Serial Driver info
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index e6adb1f..6c2ef67 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -62,7 +62,6 @@
#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ( \
DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \
diff --git a/include/configs/davinci_dm355evm.h b/include/configs/davinci_dm355evm.h
index a30d24c..0b4f978 100644
--- a/include/configs/davinci_dm355evm.h
+++ b/include/configs/davinci_dm355evm.h
@@ -170,7 +170,6 @@
#define CONFIG_NET_RETRY_COUNT 10
/* U-Boot memory configuration */
-#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
#define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
#define CONFIG_SYS_MEMTEST_START 0x87000000 /* physical address */
#define CONFIG_SYS_MEMTEST_END 0x88000000 /* test 16MB RAM */
diff --git a/include/configs/davinci_dm355leopard.h b/include/configs/davinci_dm355leopard.h
index 1cd3d2e..2abd61f 100644
--- a/include/configs/davinci_dm355leopard.h
+++ b/include/configs/davinci_dm355leopard.h
@@ -130,7 +130,6 @@
#define CONFIG_NET_RETRY_COUNT 10
/* U-Boot memory configuration */
-#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
#define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
#define CONFIG_SYS_MEMTEST_START 0x87000000 /* physical address */
#define CONFIG_SYS_MEMTEST_END 0x88000000 /* test 16MB RAM */
diff --git a/include/configs/davinci_dm365evm.h b/include/configs/davinci_dm365evm.h
index bcf10ca..afca4bb 100644
--- a/include/configs/davinci_dm365evm.h
+++ b/include/configs/davinci_dm365evm.h
@@ -202,7 +202,6 @@
#define CONFIG_TIMESTAMP
/* U-Boot memory configuration */
-#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
#define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */
#define CONFIG_SYS_MEMTEST_START 0x87000000 /* physical address */
#define CONFIG_SYS_MEMTEST_END 0x88000000 /* test 16MB RAM */
diff --git a/include/configs/davinci_dm6467evm.h b/include/configs/davinci_dm6467evm.h
index 6734ea3..0b36c84 100644
--- a/include/configs/davinci_dm6467evm.h
+++ b/include/configs/davinci_dm6467evm.h
@@ -54,7 +54,6 @@ extern unsigned int davinci_arm_clk_get(void);
#define CONFIG_SYS_MEMTEST_START 0x80000000
#define CONFIG_SYS_MEMTEST_END 0x81000000 /* 16MB RAM test */
#define CONFIG_NR_DRAM_BANKS 1
-#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
#define PHYS_SDRAM_1 0x80000000 /* DDR Start */
#define PHYS_SDRAM_1_SIZE (256 << 20) /* DDR size 256MB */
diff --git a/include/configs/davinci_dvevm.h b/include/configs/davinci_dvevm.h
index e4443ec..b4f7fc4 100644
--- a/include/configs/davinci_dvevm.h
+++ b/include/configs/davinci_dvevm.h
@@ -74,7 +74,6 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000 /* memtest start address */
#define CONFIG_SYS_MEMTEST_END 0x81000000 /* 16MB RAM test */
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
#define PHYS_SDRAM_1 0x80000000 /* DDR Start */
#define PHYS_SDRAM_1_SIZE 0x10000000 /* DDR size 256MB */
diff --git a/include/configs/davinci_schmoogie.h b/include/configs/davinci_schmoogie.h
index 93df4ff..5c28fb6 100644
--- a/include/configs/davinci_schmoogie.h
+++ b/include/configs/davinci_schmoogie.h
@@ -44,7 +44,6 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000 /* memtest start address */
#define CONFIG_SYS_MEMTEST_END 0x81000000 /* 16MB RAM test */
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
#define PHYS_SDRAM_1 0x80000000 /* DDR Start */
#define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */
#define DDR_4BANKS /* 4-bank DDR2 (128MB) */
diff --git a/include/configs/davinci_sffsdr.h b/include/configs/davinci_sffsdr.h
index 23b0ba7..6002c25 100644
--- a/include/configs/davinci_sffsdr.h
+++ b/include/configs/davinci_sffsdr.h
@@ -44,7 +44,6 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000 /* memtest start address */
#define CONFIG_SYS_MEMTEST_END 0x81000000 /* 16MB RAM test */
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
#define PHYS_SDRAM_1 0x80000000 /* DDR Start */
#define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */
#define DDR_4BANKS /* 4-bank DDR2 (128MB) */
diff --git a/include/configs/davinci_sonata.h b/include/configs/davinci_sonata.h
index 36a8c06..bdfe6bb 100644
--- a/include/configs/davinci_sonata.h
+++ b/include/configs/davinci_sonata.h
@@ -76,7 +76,6 @@
#define CONFIG_SYS_MEMTEST_START 0x80000000 /* memtest start address */
#define CONFIG_SYS_MEMTEST_END 0x81000000 /* 16MB RAM test */
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
#define PHYS_SDRAM_1 0x80000000 /* DDR Start */
#define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */
#define DDR_4BANKS /* 4-bank DDR2 (128MB) */
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 9f15ffb..18d7374 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -41,7 +41,6 @@
* Memory configurations
*/
#define CONFIG_NR_DRAM_BANKS 1
-#define CONFIG_STACKSIZE SZ_32K
#define CONFIG_SYS_MALLOC_LEN SZ_1M
#define CONFIG_SYS_GBL_DATA_SIZE 128
#define CONFIG_SYS_SDRAM_BASE EMC_DYCS0_BASE
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 037a5bb..647b7b1 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -274,9 +274,6 @@
#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
#define CONFIG_SYS_HZ 1000
-/* The stack sizes are set up in start.S using the settings below */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
diff --git a/include/configs/dig297.h b/include/configs/dig297.h
index 4845d51..0e6cd94 100644
--- a/include/configs/dig297.h
+++ b/include/configs/dig297.h
@@ -260,10 +260,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack 4 KiB */
#define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack 4 KiB */
diff --git a/include/configs/dvlhost.h b/include/configs/dvlhost.h
index 4eda91e..dce501a 100644
--- a/include/configs/dvlhost.h
+++ b/include/configs/dvlhost.h
@@ -106,10 +106,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
/* Expansion bus settings */
#define CONFIG_SYS_EXP_CS0 0xbd113442
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index a9caa81..337d504 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -65,7 +65,6 @@
#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
/*
* Serial Driver info
diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h
index 4d8be2b..d4104de 100644
--- a/include/configs/eb_cpux9k2.h
+++ b/include/configs/eb_cpux9k2.h
@@ -61,8 +61,6 @@
#define CONFIG_SYS_PBSIZE \
(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
/*
* ARM asynchronous clock
*/
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
index 6a67aa5..f0fb488 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -228,7 +228,6 @@
#define CONFIG_DISPLAY_CPUINFO /* Display cpu info */
#define CONFIG_NR_DRAM_BANKS 1
-#define CONFIG_STACKSIZE 0x00100000
#define CONFIG_SYS_LOAD_ADDR 0x00800000
#define CONFIG_SYS_MEMTEST_START 0x00400000
#define CONFIG_SYS_MEMTEST_END 0x007fffff
diff --git a/include/configs/efikamx.h b/include/configs/efikamx.h
index 143b0f0..439b5f3 100644
--- a/include/configs/efikamx.h
+++ b/include/configs/efikamx.h
@@ -246,13 +246,6 @@
#define CONFIG_CMDLINE_EDITING
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/enbw_cmc.h b/include/configs/enbw_cmc.h
index c1a0f6a..9f965b8 100644
--- a/include/configs/enbw_cmc.h
+++ b/include/configs/enbw_cmc.h
@@ -71,7 +71,6 @@
#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
/*
* Serial Driver info
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index f89e9ea..e1d0268 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -53,8 +53,8 @@
/* 32kB internal SRAM */
#define CONFIG_SRAM_BASE 0x00300000 /*AT91SAM9XE_SRAM_BASE */
#define CONFIG_SRAM_SIZE (32 << 10)
-#define CONFIG_STACKSIZE (CONFIG_SRAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SRAM_BASE + CONFIG_STACKSIZE)
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SRAM_BASE + CONFIG_SRAM_SIZE - \
+ GENERATED_GBL_DATA_SIZE)
/* 128MB SDRAM in 1 bank */
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/flea3.h b/include/configs/flea3.h
index 6c5fcac..7765d0e 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -147,14 +147,6 @@
#define CONFIG_SYS_HZ 1000
-
-/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/*
* Physical Memory Map
*/
diff --git a/include/configs/hawkboard.h b/include/configs/hawkboard.h
index c6e8859..36eb32f 100644
--- a/include/configs/hawkboard.h
+++ b/include/configs/hawkboard.h
@@ -86,7 +86,6 @@
#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 16*1024*1024)
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256*1024) /* regular stack */
/*
* Serial Driver info
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index 791f3f5..e0abd2f 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -94,10 +94,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
index 88e2e3a..b21ae8a 100644
--- a/include/configs/igep00x0.h
+++ b/include/configs/igep00x0.h
@@ -225,13 +225,6 @@
#define CONFIG_SYS_HZ 1000
/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*
* Physical Memory Map
*
*/
diff --git a/include/configs/ima3-mx53.h b/include/configs/ima3-mx53.h
index 17fa4a1..567061a 100644
--- a/include/configs/ima3-mx53.h
+++ b/include/configs/ima3-mx53.h
@@ -133,9 +133,6 @@
#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
-/* Stack sizes */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
#define PHYS_SDRAM_1 CSD0_BASE_ADDR
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index 7d2876b..b3f382c 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -94,7 +94,6 @@
#define CONFIG_SYS_MEMTEST_START 0xA0000000
#define CONFIG_SYS_MEMTEST_END 0xA1000000 /* 16MB RAM test */
#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
-#define CONFIG_STACKSIZE (256 * 1024) /* regular stack */
#define PHYS_SDRAM_1 0xA0000000 /* DDR Start */
#define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */
diff --git a/include/configs/imx31_litekit.h b/include/configs/imx31_litekit.h
index a340e97..8cca478 100644
--- a/include/configs/imx31_litekit.h
+++ b/include/configs/imx31_litekit.h
@@ -139,13 +139,6 @@
#define CONFIG_CMDLINE_EDITING 1
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/imx31_phycore.h b/include/configs/imx31_phycore.h
index 1728358..b31af9c 100644
--- a/include/configs/imx31_phycore.h
+++ b/include/configs/imx31_phycore.h
@@ -143,13 +143,6 @@
#define CONFIG_CMDLINE_EDITING
/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h
index 2252d93..4692834 100644
--- a/include/configs/integratorap.h
+++ b/include/configs/integratorap.h
@@ -103,10 +103,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
index ca2d92d..5542b88 100644
--- a/include/configs/integratorcp.h
+++ b/include/configs/integratorcp.h
@@ -114,10 +114,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/jadecpu.h b/include/configs/jadecpu.h
index 2badadb..132b598 100644
--- a/include/configs/jadecpu.h
+++ b/include/configs/jadecpu.h
@@ -204,8 +204,6 @@
#define CONFIG_SYS_MALLOC_LEN (10 << 20)
#define CONFIG_SYS_MEM_TOP_HIDE (4 << 20)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
/*
* Clock reset generator init
*/
diff --git a/include/configs/jornada.h b/include/configs/jornada.h
index 84ad2d8..93cf1fa 100644
--- a/include/configs/jornada.h
+++ b/include/configs/jornada.h
@@ -88,12 +88,6 @@
#define CONFIG_SYS_CPUSPEED 0x0a /* core clock 206MHz */
#define CONFIG_SYS_BAUDRATE_TABLE { 19200, 38400, 57600, 115200 }
-/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#define CONFIG_SYS_FLASH_CFI 1
#define CONFIG_FLASH_CFI_DRIVER 1
#define CONFIG_FLASH_CFI_WIDTH FLASH_CFI_32BIT
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index 011f838..cf0e647 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -151,7 +151,6 @@
#define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */
#define CONFIG_DISPLAY_CPUINFO /* Display cpu info */
#define CONFIG_NR_DRAM_BANKS 4
-#define CONFIG_STACKSIZE 0x00100000 /* regular stack- 1M */
#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */
/*
diff --git a/include/configs/lubbock.h b/include/configs/lubbock.h
index 4b9b290..1384763 100644
--- a/include/configs/lubbock.h
+++ b/include/configs/lubbock.h
@@ -137,10 +137,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 3abaadc..d79af6c 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -88,7 +88,6 @@
#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
#define PHYS_SDRAM_1 0x40000000 /* Base address */
#define PHYS_SDRAM_1_SIZE 0x20000000 /* Max 512 MB RAM */
-#define CONFIG_STACKSIZE 0x00010000 /* 128 KB stack */
#define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
#define CONFIG_SYS_GBL_DATA_SIZE 128 /* Initial data */
#define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start adr */
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 970c882..23833eb 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -253,13 +253,6 @@
#define CONFIG_SYS_HZ 1000
/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/meesc.h b/include/configs/meesc.h
index 1e897e2..46d970d 100644
--- a/include/configs/meesc.h
+++ b/include/configs/meesc.h
@@ -221,8 +221,6 @@
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + \
128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
# error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 27b4899..7086d1d 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -105,7 +105,6 @@
#define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */
#define CONFIG_BOARD_EARLY_INIT_F /* call board_init_f for early inits */
#define CONFIG_DISPLAY_CPUINFO /* Display cpu info */
-#define CONFIG_STACKSIZE 0x00100000 /* regular stack- 1M */
#define CONFIG_SYS_LOAD_ADDR 0x00800000 /* default load adr- 8M */
#define CONFIG_SYS_MEMTEST_START 0x00800000 /* 8M */
#define CONFIG_SYS_MEMTEST_END 0x00ffffff /*(_16M -1) */
diff --git a/include/configs/mx1ads.h b/include/configs/mx1ads.h
index 665e33d..c32d5a8 100644
--- a/include/configs/mx1ads.h
+++ b/include/configs/mx1ads.h
@@ -134,10 +134,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h
index efca287..359a308 100644
--- a/include/configs/mx25pdk.h
+++ b/include/configs/mx25pdk.h
@@ -49,9 +49,6 @@
#define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE/2)
#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE)
-/* Stack sizes */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/* Serial Info */
#define CONFIG_MXC_UART
#define CONFIG_MXC_UART_BASE UART1_BASE
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 51b172d..ef68eaa 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -76,7 +76,6 @@
#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */
#define PHYS_SDRAM_1 0x40000000 /* Base address */
#define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */
-#define CONFIG_STACKSIZE (128 * 1024) /* 128 KB stack */
#define CONFIG_SYS_MALLOC_LEN 0x00400000 /* 4 MB for malloc */
#define CONFIG_SYS_MEMTEST_START 0x40000000 /* Memtest start adr */
#define CONFIG_SYS_MEMTEST_END 0x40400000 /* 4 MB RAM test */
diff --git a/include/configs/mx31ads.h b/include/configs/mx31ads.h
index cc720e8..081fbf6 100644
--- a/include/configs/mx31ads.h
+++ b/include/configs/mx31ads.h
@@ -155,13 +155,6 @@
#define CONFIG_CMDLINE_EDITING 1
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index 7634de7..17d3143 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -151,13 +151,6 @@
#define CONFIG_CMDLINE_EDITING
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index 016864a..52a4bea 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -162,14 +162,6 @@
#define CONFIG_SYS_HZ 1000
-
-/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/*
* Physical Memory Map
*/
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index bd04c02..0c71543 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -216,13 +216,6 @@
#define CONFIG_CMDLINE_EDITING
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/mx53ard.h b/include/configs/mx53ard.h
index f4512ff..490513f 100644
--- a/include/configs/mx53ard.h
+++ b/include/configs/mx53ard.h
@@ -156,9 +156,6 @@
#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
-/* Stack sizes */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 2
#define PHYS_SDRAM_1 CSD0_BASE_ADDR
diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h
index a5f32e3..17d5793 100644
--- a/include/configs/mx53evk.h
+++ b/include/configs/mx53evk.h
@@ -166,9 +166,6 @@
#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
-/* Stack sizes */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
#define PHYS_SDRAM_1 CSD0_BASE_ADDR
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 8b4e008..027bd27 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -178,9 +178,6 @@
#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
-/* Stack sizes */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 2
#define PHYS_SDRAM_1 CSD0_BASE_ADDR
diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h
index 0d7086d..bf539c6 100644
--- a/include/configs/mx53smd.h
+++ b/include/configs/mx53smd.h
@@ -154,9 +154,6 @@
#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
-/* Stack sizes */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 2
#define PHYS_SDRAM_1 CSD0_BASE_ADDR
diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h
index a155c77..78e114a 100644
--- a/include/configs/mx6qarm2.h
+++ b/include/configs/mx6qarm2.h
@@ -141,7 +141,6 @@
#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
-#define CONFIG_STACKSIZE (128 * 1024)
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
index 5b566a8..00920b9 100644
--- a/include/configs/mx6qsabrelite.h
+++ b/include/configs/mx6qsabrelite.h
@@ -188,7 +188,6 @@
#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
-#define CONFIG_STACKSIZE (128 * 1024)
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h
index 37a66ab..d8ef86e 100644
--- a/include/configs/nhk8815.h
+++ b/include/configs/nhk8815.h
@@ -85,7 +85,6 @@
#define CONFIG_SYS_TEXT_BASE 0x00000000
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + (1<<20))
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
# define CONFIG_STACKSIZE_IRQ (4 * 1024) /* IRQ stack */
# define CONFIG_STACKSIZE_FIQ (4 * 1024) /* FIQ stack */
diff --git a/include/configs/ns9750dev.h b/include/configs/ns9750dev.h
index f465a56..c530c38 100644
--- a/include/configs/ns9750dev.h
+++ b/include/configs/ns9750dev.h
@@ -126,10 +126,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/omap1510inn.h b/include/configs/omap1510inn.h
index f591a86..d35f162 100644
--- a/include/configs/omap1510inn.h
+++ b/include/configs/omap1510inn.h
@@ -138,10 +138,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/omap2420h4.h b/include/configs/omap2420h4.h
index 13762cc..9ef5f53 100644
--- a/include/configs/omap2420h4.h
+++ b/include/configs/omap2420h4.h
@@ -194,10 +194,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE SZ_128K /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ SZ_4K /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ SZ_4K /* FIQ stack */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 268215c..d00b7d7 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -342,13 +342,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index 20192a9..f25e8dc 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -52,12 +52,6 @@
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
/*
- * Stack sizes
- * These values are used in start.S
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*
* Physical Memory Map
* Note 1: CS1 may or may not be populated
* Note 2: SDRAM size is expected to be at least 32MB
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 2e1e6b9..730c29c 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -286,13 +286,6 @@
#define CONFIG_SYS_HZ 1000
/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h
index 6a13046..19a7512 100644
--- a/include/configs/omap3_mvblx.h
+++ b/include/configs/omap3_mvblx.h
@@ -247,13 +247,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index d29b326..a9acb01 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -231,13 +231,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 604b53d..6bef148 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -217,13 +217,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index 1d8b0ab..3730204 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -293,13 +293,6 @@
#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
#define CONFIG_SYS_HZ 1000
-/*
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* Regular stack */
-
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
#define CONFIG_SYS_INIT_RAM_SIZE 0x800
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index 0f72ebe..70b8805 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -249,13 +249,6 @@
#define CONFIG_SYS_HZ 1000
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index b60ece3..eaf499a 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -218,13 +218,6 @@
#define CONFIG_SYS_HZ ((V_SCLK) / (2 << CONFIG_SYS_PTV))
/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using these settings
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*-----------------------------------------------------------------------
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
index 8448142..88b46c9 100644
--- a/include/configs/omap4_common.h
+++ b/include/configs/omap4_common.h
@@ -210,10 +210,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128 << 10) /* Regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack */
diff --git a/include/configs/omap5912osk.h b/include/configs/omap5912osk.h
index 639d4a3..33e8fb0 100644
--- a/include/configs/omap5912osk.h
+++ b/include/configs/omap5912osk.h
@@ -140,10 +140,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/omap5_evm.h b/include/configs/omap5_evm.h
index 60c7a29..68a3978 100644
--- a/include/configs/omap5_evm.h
+++ b/include/configs/omap5_evm.h
@@ -212,10 +212,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128 << 10) /* Regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack */
diff --git a/include/configs/omap730p2.h b/include/configs/omap730p2.h
index f1cadb2..21b8778 100644
--- a/include/configs/omap730p2.h
+++ b/include/configs/omap730p2.h
@@ -149,11 +149,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/origen.h b/include/configs/origen.h
index 172bf14..9784fe8 100644
--- a/include/configs/origen.h
+++ b/include/configs/origen.h
@@ -116,9 +116,6 @@
#define CONFIG_SYS_HZ 1000
-/* Stack sizes */
-#define CONFIG_STACKSIZE (256 << 10) /* 256KB */
-
/* ORIGEN has 4 bank of DRAM */
#define CONFIG_NR_DRAM_BANKS 4
#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
diff --git a/include/configs/otc570.h b/include/configs/otc570.h
index 7abc42a..1cfd1d9 100644
--- a/include/configs/otc570.h
+++ b/include/configs/otc570.h
@@ -274,8 +274,6 @@
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + \
128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
# error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/palmld.h b/include/configs/palmld.h
index 70b794d..bcaaa3b 100644
--- a/include/configs/palmld.h
+++ b/include/configs/palmld.h
@@ -132,7 +132,6 @@
/*
* Stack sizes
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/palmtc.h b/include/configs/palmtc.h
index 7cf2c63..6d91f27 100644
--- a/include/configs/palmtc.h
+++ b/include/configs/palmtc.h
@@ -133,7 +133,6 @@
/*
* Stack sizes
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h
index 19b80d1..633e6d3 100644
--- a/include/configs/pdnb3.h
+++ b/include/configs/pdnb3.h
@@ -120,10 +120,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index cdb3593..25ef5a6 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -380,8 +380,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
GENERATED_GBL_DATA_SIZE)
-#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index d202d0a..e528780 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -412,8 +412,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
GENERATED_GBL_DATA_SIZE)
-#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h
index c766330..7eed387 100644
--- a/include/configs/pm9g45.h
+++ b/include/configs/pm9g45.h
@@ -188,8 +188,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
GENERATED_GBL_DATA_SIZE)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/pxa255_idp.h b/include/configs/pxa255_idp.h
index f143ed0..63e2688 100644
--- a/include/configs/pxa255_idp.h
+++ b/include/configs/pxa255_idp.h
@@ -253,10 +253,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/qong.h b/include/configs/qong.h
index e824e17..485e1b1 100644
--- a/include/configs/qong.h
+++ b/include/configs/qong.h
@@ -212,12 +212,6 @@
#define CONFIG_SYS_HUSH_PARSER /* Use the HUSH parser */
#define CONFIG_MISC_INIT_R
-/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
/*-----------------------------------------------------------------------
* Physical Memory Map
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 16be764..36f1a57 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -189,9 +189,6 @@
#define CONFIG_SYS_HZ 1000
-/* Stack sizes */
-#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
-
/* Goni has 3 banks of DRAM, but swap the bank */
#define CONFIG_NR_DRAM_BANKS 3
#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* OneDRAM Bank #0 */
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 721301f..7727624 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -214,9 +214,6 @@
#define CONFIG_SYS_HZ 1000
-/* Stack sizes */
-#define CONFIG_STACKSIZE (256 << 10) /* regular stack 256KB */
-
/* Universal has 2 banks of DRAM */
#define CONFIG_NR_DRAM_BANKS 2
#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* LDDDR2 DMC 0 */
diff --git a/include/configs/sbc35_a9g20.h b/include/configs/sbc35_a9g20.h
index 316e3fb..19807f9 100644
--- a/include/configs/sbc35_a9g20.h
+++ b/include/configs/sbc35_a9g20.h
@@ -182,7 +182,6 @@
* Size of malloc() pool
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
-#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h
index 1494a2e..bf38afd 100644
--- a/include/configs/scb9328.h
+++ b/include/configs/scb9328.h
@@ -100,8 +100,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128<<10) )
-#define CONFIG_STACKSIZE (120<<10) /* stack size */
-
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4<<10) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4<<10) /* FIQ stack */
diff --git a/include/configs/smdk2410.h b/include/configs/smdk2410.h
index 8792c85..5bf1a4c 100644
--- a/include/configs/smdk2410.h
+++ b/include/configs/smdk2410.h
@@ -150,10 +150,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
index 2360a8f..dfd9db0 100644
--- a/include/configs/smdk5250.h
+++ b/include/configs/smdk5250.h
@@ -127,9 +127,6 @@
#define CONFIG_RD_LVL
-/* Stack sizes */
-#define CONFIG_STACKSIZE (256 << 10) /* 256KB */
-
#define CONFIG_NR_DRAM_BANKS 8
#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE
diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h
index 04caeef..d4dc8ef 100644
--- a/include/configs/smdk6400.h
+++ b/include/configs/smdk6400.h
@@ -141,13 +141,6 @@
#define CONFIG_SYS_HZ 1000
-/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE 0x40000 /* regular stack 256KB */
-
/**********************************
Support Clock Settings
**********************************
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index fd9f96d..22de344 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -182,13 +182,6 @@
#define CONFIG_SYS_HZ 1000
-/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (256 << 10) /* 256 KiB */
-
/* SMDKC100 has 1 banks of DRAM, we use only one in U-Boot */
#define CONFIG_NR_DRAM_BANKS 1
#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* SDRAM Bank #1 */
diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h
index 41d7780..492cf4b 100644
--- a/include/configs/smdkv310.h
+++ b/include/configs/smdkv310.h
@@ -115,9 +115,6 @@
#define CONFIG_SYS_HZ 1000
-/* Stack sizes */
-#define CONFIG_STACKSIZE (256 << 10) /* 256KB */
-
/* SMDKV310 has 4 bank of DRAM */
#define CONFIG_NR_DRAM_BANKS 4
#define SDRAM_BANK_SIZE (512UL << 20UL) /* 512 MB */
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 8af3c02..f470edd 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -162,7 +162,6 @@
/* U-Boot memory settings */
#define CONFIG_SYS_MALLOC_LEN (1 << 20)
-#define CONFIG_STACKSIZE (256 << 10)
/* Command line configuration */
#include <config_cmd_default.h>
diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
index ab1b332..e534c1d 100644
--- a/include/configs/spear-common.h
+++ b/include/configs/spear-common.h
@@ -199,9 +199,6 @@
#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY
-/* Stack sizes */
-#define CONFIG_STACKSIZE (128*1024)
-
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024)
#define CONFIG_STACKSIZE_FIQ (4*1024)
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 777f77c..1cbe511 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -183,12 +183,6 @@
#define CONFIG_SYS_HZ 1000
/*
- * Stack sizes
- * The stack sizes are set up in start.S using the settings below
- */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
-/*
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h
index 52dc38e..3a77a21 100644
--- a/include/configs/tegra2-common.h
+++ b/include/configs/tegra2-common.h
@@ -172,13 +172,7 @@
#define CONFIG_SYS_LOAD_ADDR (0xA00800) /* default */
#define CONFIG_SYS_HZ 1000
-/*-----------------------------------------------------------------------
- * Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
- */
#define CONFIG_STACKBASE 0x2800000 /* 40MB */
-#define CONFIG_STACKSIZE 0x20000 /* 128K regular stack*/
/*-----------------------------------------------------------------------
* Physical Memory Map
diff --git a/include/configs/tnetv107x_evm.h b/include/configs/tnetv107x_evm.h
index 2272ad2..23cab88 100644
--- a/include/configs/tnetv107x_evm.h
+++ b/include/configs/tnetv107x_evm.h
@@ -55,7 +55,6 @@
#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1
#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 16*1024*1024)
#define CONFIG_NR_DRAM_BANKS 1
-#define CONFIG_STACKSIZE (256*1024)
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
#define CONFIG_SYS_INIT_RAM_SIZE 0x1000
diff --git a/include/configs/tny_a9260.h b/include/configs/tny_a9260.h
index def5306..a1343f4 100644
--- a/include/configs/tny_a9260.h
+++ b/include/configs/tny_a9260.h
@@ -166,8 +166,6 @@
*/
#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)
-#define CONFIG_STACKSIZE (32 * 1024) /* regular stack */
-
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/top9000.h b/include/configs/top9000.h
index 1a5f680..b8f6ca0 100644
--- a/include/configs/top9000.h
+++ b/include/configs/top9000.h
@@ -303,7 +303,6 @@ extern void read_factory_r(void);
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN \
ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_STACKSIZE (32*1024)
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif
diff --git a/include/configs/trats.h b/include/configs/trats.h
index d2dfc9f..cadb1e9 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -165,9 +165,6 @@
#define CONFIG_SYS_HZ 1000
-/* Stack sizes */
-#define CONFIG_STACKSIZE (256 << 10) /* regular stack 256KB */
-
/* TRATS has 2 banks of DRAM */
#define CONFIG_NR_DRAM_BANKS 2
#define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* LDDDR2 DMC 0 */
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 56336ae..db94442 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -245,9 +245,6 @@
#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
#define CONFIG_SYS_HZ 1000
-/* The stack sizes are set up in start.S using the settings below */
-#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
diff --git a/include/configs/trizepsiv.h b/include/configs/trizepsiv.h
index b4ec8f0..c61e888 100644
--- a/include/configs/trizepsiv.h
+++ b/include/configs/trizepsiv.h
@@ -179,10 +179,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/tt01.h b/include/configs/tt01.h
index 2b2e7fd..cc68a42 100644
--- a/include/configs/tt01.h
+++ b/include/configs/tt01.h
@@ -86,9 +86,6 @@
/* default load address, 1MB up the road */
#define CONFIG_SYS_LOAD_ADDR (PHYS_SDRAM_1+0x100000)
-/* The stack sizes are set up in start.S using the settings below */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
/* Size of malloc() pool, make sure possible frame buffer fits */
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 10*1024*1024)
diff --git a/include/configs/tx25.h b/include/configs/tx25.h
index 6821528..c8a49bb 100644
--- a/include/configs/tx25.h
+++ b/include/configs/tx25.h
@@ -84,7 +84,6 @@
/* 8MB DRAM test */
#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1
#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1+0x0800000)
-#define CONFIG_STACKSIZE (256 * 1024) /* regular stack */
/*
* Serial Info
diff --git a/include/configs/vct.h b/include/configs/vct.h
index 0a5ce64..b4b0949 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -47,7 +47,6 @@
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_MONITOR_LEN (256 << 10)
-#define CONFIG_STACKSIZE (256 << 10)
#define CONFIG_SYS_MALLOC_LEN (1 << 20)
#define CONFIG_SYS_BOOTPARAMS_LEN (128 << 10)
#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
diff --git a/include/configs/versatile.h b/include/configs/versatile.h
index ff23a92..e8ab2bc 100644
--- a/include/configs/versatile.h
+++ b/include/configs/versatile.h
@@ -146,10 +146,7 @@
/*-----------------------------------------------------------------------
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4 * 1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4 * 1024) /* FIQ stack */
diff --git a/include/configs/vision2.h b/include/configs/vision2.h
index 24905a0..bb161ff 100644
--- a/include/configs/vision2.h
+++ b/include/configs/vision2.h
@@ -178,11 +178,6 @@
#define CONFIG_SYS_HUSH_PARSER
/*
- * Stack sizes
- */
-#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
-
-/*
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 2
diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h
index 01f0b6c..ca0ba07 100644
--- a/include/configs/vpac270.h
+++ b/include/configs/vpac270.h
@@ -168,7 +168,6 @@
/*
* Stack sizes
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/xaeniax.h b/include/configs/xaeniax.h
index 0ed3bf4..e7f3d10 100644
--- a/include/configs/xaeniax.h
+++ b/include/configs/xaeniax.h
@@ -183,10 +183,7 @@
/*
* Stack sizes
- *
- * The stack sizes are set up in start.S using the settings below
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h
index a330bd0..86abb01 100644
--- a/include/configs/zipitz2.h
+++ b/include/configs/zipitz2.h
@@ -155,7 +155,6 @@ unsigned char zipitz2_spi_read(void);
/*
* Stack sizes
*/
-#define CONFIG_STACKSIZE (128*1024) /* regular stack */
#ifdef CONFIG_USE_IRQ
#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h
index c9f737d..072945a 100644
--- a/include/configs/zmx25.h
+++ b/include/configs/zmx25.h
@@ -171,6 +171,5 @@
* Size of malloc() pool
*/
#define CONFIG_SYS_MALLOC_LEN (0x400000 - 0x8000)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
#endif /* __CONFIG_H */
--
1.7.9.5
2
4

[U-Boot] [PATCH] cfb_console: Add support for some ANSI terminal escape codes
by Pali Rohár 13 Jul '12
by Pali Rohár 13 Jul '12
13 Jul '12
Hello,
I'm sending new patch which add support for ANSI terminal in cfb_console
driver. This patch comes from RX-51 patch series, but more cfb patches were
commited to u-boot git. This is last patch for cfb driver, so I'm sending
it separatly. Changes from last version: this patch is rebased on top of
u-boot master and has fixed comment style problems.
diff --git a/README b/README
index 67dc444..5528004 100644
--- a/README
+++ b/README
@@ -621,6 +621,9 @@ The following options need to be configured:
additional board info beside
the logo
+ When CONFIG_CFB_CONSOLE_ANSI is defined, console will have
+ ANSI terminal support. Needed for CONFIG_CMDLINE_EDITING.
+
When CONFIG_CFB_CONSOLE is defined, video console is
default i/o. Serial console can be forced with
environment 'console=serial'.
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 92fa77d..8ead72c 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -381,6 +381,11 @@ static u32 eorx, fgx, bgx; /* color pats */
static int cfb_do_flush_cache;
+static char ansi_buf[10] = { 0, };
+static int ansi_buf_size;
+static int ansi_colors_need_revert;
+static int ansi_cursor_hidden;
+
static const int video_font_draw_table8[] = {
0x00000000, 0x000000ff, 0x0000ff00, 0x0000ffff,
0x00ff0000, 0x00ff00ff, 0x00ffff00, 0x00ffffff,
@@ -608,6 +613,14 @@ static void video_putchar(int xx, int yy, unsigned char c)
video_drawchars(xx, yy + video_logo_height, &c, 1);
}
+static void console_swap_colors(void)
+{
+ eorx = fgx;
+ fgx = bgx;
+ bgx = eorx;
+ eorx = fgx ^ bgx;
+}
+
#if defined(CONFIG_CONSOLE_CURSOR) || defined(CONFIG_VIDEO_SW_CURSOR)
static void video_set_cursor(void)
{
@@ -691,6 +704,21 @@ static void memcpyl(int *d, int *s, int c)
}
#endif
+static void console_clear(void)
+{
+#ifdef VIDEO_HW_RECTFILL
+ video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
+ 0, /* dest pos x */
+ video_logo_height, /* dest pos y */
+ VIDEO_VISIBLE_COLS, /* frame width */
+ VIDEO_VISIBLE_ROWS, /* frame height */
+ bgx /* fill color */
+ );
+#else
+ memsetl(CONSOLE_ROW_FIRST, CONSOLE_SIZE, bgx);
+#endif
+}
+
static void console_clear_line(int line, int begin, int end)
{
#ifdef VIDEO_HW_RECTFILL
@@ -764,9 +792,54 @@ static void console_back(void)
}
}
-static void console_newline(void)
+static void console_cursor_fix(void)
+{
+ if (console_row < 0)
+ console_row = 0;
+ if (console_row >= CONSOLE_ROWS)
+ console_row = CONSOLE_ROWS-1;
+ if (console_col < 0)
+ console_col = 0;
+ if (console_col >= CONSOLE_COLS)
+ console_col = CONSOLE_COLS-1;
+}
+
+static void console_cursor_up(int n)
+{
+ console_row -= n;
+ console_cursor_fix();
+}
+
+static void console_cursor_down(int n)
+{
+ console_row += n;
+ console_cursor_fix();
+}
+
+static void console_cursor_left(int n)
+{
+ console_col -= n;
+ console_cursor_fix();
+}
+
+static void console_cursor_right(int n)
+{
+ console_col += n;
+ console_cursor_fix();
+}
+
+static void console_cursor_set_position(int row, int col)
{
- console_row++;
+ if (console_row != -1)
+ console_row = row;
+ if (console_col != -1)
+ console_col = col;
+ console_cursor_fix();
+}
+
+static void console_newline(int n)
+{
+ console_row += n;
console_col = 0;
/* Check if we need to scroll the terminal */
@@ -775,20 +848,28 @@ static void console_newline(void)
console_scrollup();
/* Decrement row number */
- console_row--;
+ console_row = CONSOLE_ROWS-1;
}
}
+static void console_previewsline(int n)
+{
+ /* FIXME: also scroll terminal ? */
+ console_row -= n;
+ console_cursor_fix();
+}
+
static void console_cr(void)
{
console_col = 0;
}
-void video_putc(const char c)
+static void parse_putc(const char c)
{
static int nl = 1;
- CURSOR_OFF;
+ if (!ansi_cursor_hidden)
+ CURSOR_OFF;
switch (c) {
case 13: /* back to first column */
@@ -797,7 +878,7 @@ void video_putc(const char c)
case '\n': /* next line */
if (console_col || (!console_col && nl))
- console_newline();
+ console_newline(1);
nl = 1;
break;
@@ -806,7 +887,7 @@ void video_putc(const char c)
console_col &= ~0x0007;
if (console_col >= CONSOLE_COLS)
- console_newline();
+ console_newline(1);
break;
case 8: /* backspace */
@@ -823,11 +904,225 @@ void video_putc(const char c)
/* check for newline */
if (console_col >= CONSOLE_COLS) {
- console_newline();
+ console_newline(1);
nl = 0;
}
}
- CURSOR_SET;
+
+ if (!ansi_cursor_hidden)
+ CURSOR_SET;
+}
+
+void video_putc(const char c)
+{
+#ifdef CONFIG_CFB_CONSOLE_ANSI
+ int i;
+
+ if (c == 27) {
+ for (i = 0; i < ansi_buf_size; ++i)
+ parse_putc(ansi_buf[i]);
+ ansi_buf[0] = 27;
+ ansi_buf_size = 1;
+ return;
+ }
+
+ if (ansi_buf_size > 0) {
+ /*
+ * 0 - ESC
+ * 1 - [
+ * 2 - num1
+ * 3 - ..
+ * 4 - ;
+ * 5 - num2
+ * 6 - ..
+ * - cchar
+ */
+ int next = 0;
+
+ int flush = 0;
+ int fail = 0;
+
+ int num1 = 0;
+ int num2 = 0;
+ int cchar = 0;
+
+ ansi_buf[ansi_buf_size++] = c;
+
+ if (ansi_buf_size >= sizeof(ansi_buf))
+ fail = 1;
+
+ for (i = 0; i < ansi_buf_size; ++i) {
+ if (fail)
+ break;
+
+ switch (next) {
+ case 0:
+ if (ansi_buf[i] == 27)
+ next = 1;
+ else
+ fail = 1;
+ break;
+
+ case 1:
+ if (ansi_buf[i] == '[')
+ next = 2;
+ else
+ fail = 1;
+ break;
+
+ case 2:
+ if (ansi_buf[i] >= '0' && ansi_buf[i] <= '9') {
+ num1 = ansi_buf[i]-'0';
+ next = 3;
+ } else if (ansi_buf[i] != '?') {
+ --i;
+ num1 = 1;
+ next = 4;
+ }
+ break;
+
+ case 3:
+ if (ansi_buf[i] >= '0' && ansi_buf[i] <= '9') {
+ num1 *= 10;
+ num1 += ansi_buf[i]-'0';
+ } else {
+ --i;
+ next = 4;
+ }
+ break;
+
+ case 4:
+ if (ansi_buf[i] != ';') {
+ --i;
+ next = 7;
+ } else
+ next = 5;
+ break;
+
+ case 5:
+ if (ansi_buf[i] >= '0' && ansi_buf[i] <= '9') {
+ num2 = ansi_buf[i]-'0';
+ next = 6;
+ } else
+ fail = 1;
+ break;
+
+ case 6:
+ if (ansi_buf[i] >= '0' && ansi_buf[i] <= '9') {
+ num2 *= 10;
+ num2 += ansi_buf[i]-'0';
+ } else {
+ --i;
+ next = 7;
+ }
+ break;
+
+ case 7:
+ if ((ansi_buf[i] >= 'A' && ansi_buf[i] <= 'H')
+ || ansi_buf[i] == 'J'
+ || ansi_buf[i] == 'K'
+ || ansi_buf[i] == 'h'
+ || ansi_buf[i] == 'l'
+ || ansi_buf[i] == 'm') {
+ cchar = ansi_buf[i];
+ flush = 1;
+ } else
+ fail = 1;
+ break;
+ }
+ }
+
+ if (fail) {
+ for (i = 0; i < ansi_buf_size; ++i)
+ parse_putc(ansi_buf[i]);
+ ansi_buf_size = 0;
+ return;
+ }
+
+ if (flush) {
+ if (!ansi_cursor_hidden)
+ CURSOR_OFF;
+ ansi_buf_size = 0;
+ switch (cchar) {
+ case 'A':
+ /* move cursor num1 rows up */
+ console_cursor_up(num1);
+ break;
+ case 'B':
+ /* move cursor num1 rows down */
+ console_cursor_down(num1);
+ break;
+ case 'C':
+ /* move cursor num1 columns forward */
+ console_cursor_right(num1);
+ break;
+ case 'D':
+ /* move cursor num1 columns back */
+ console_cursor_left(num1);
+ break;
+ case 'E':
+ /* move cursor num1 rows up at begin of row */
+ console_previewsline(num1);
+ break;
+ case 'F':
+ /* move cursor num1 rows down at begin of row */
+ console_newline(num1);
+ break;
+ case 'G':
+ /* move cursor to column num1 */
+ console_cursor_set_position(-1, num1-1);
+ break;
+ case 'H':
+ /* move cursor to row num1, column num2 */
+ console_cursor_set_position(num1-1, num2-1);
+ break;
+ case 'J':
+ /* clear console and move cursor to 0, 0 */
+ console_clear();
+ console_cursor_set_position(0, 0);
+ break;
+ case 'K':
+ /* clear line */
+ if (num1 == 0)
+ console_clear_line(console_row,
+ console_col,
+ CONSOLE_COLS-1);
+ else if (num1 == 1)
+ console_clear_line(console_row,
+ 0, console_col);
+ else
+ console_clear_line(console_row,
+ 0, CONSOLE_COLS-1);
+ break;
+ case 'h':
+ ansi_cursor_hidden = 0;
+ break;
+ case 'l':
+ ansi_cursor_hidden = 1;
+ break;
+ case 'm':
+ if (num1 == 0) { /* reset swapped colors */
+ if (ansi_colors_need_revert) {
+ console_swap_colors();
+ ansi_colors_need_revert = 0;
+ }
+ } else if (num1 == 7) { /* once swap colors */
+ if (!ansi_colors_need_revert) {
+ console_swap_colors();
+ ansi_colors_need_revert = 1;
+ }
+ }
+ break;
+ }
+ if (!ansi_cursor_hidden)
+ CURSOR_SET;
+ }
+ } else {
+ parse_putc(c);
+ }
+#else
+ parse_putc(c);
+#endif
}
void video_puts(const char *s)
--
1.7.9.5
--
Pali Rohár
pali.rohar(a)gmail.com
1
1
Introduce ne2k_register_io(in, out), which allows user to supply two functions.
One for reading data from the card, the other for writing data to the card. Then
introduce drivers' private data, which carry pointers to these functions and are
passed throughout the driver.
The private data will carry more entries later.
Signed-off-by: Marek Vasut <marek.vasut(a)gmail.com>
---
drivers/net/ne2000_base.c | 318 +++++++++++++++++++++++++++------------------
include/netdev.h | 2 +
2 files changed, 191 insertions(+), 129 deletions(-)
NOTE: Formating not cleaned up, only relevant change made!
diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index 88f2b37..35a8581 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -76,10 +76,7 @@ Add SNMP
#include <command.h>
#include <net.h>
#include <malloc.h>
-
-/* forward definition of function used for the uboot interface */
-void uboot_push_packet_len(int len);
-void uboot_push_tx_done(int key, int val);
+#include <errno.h>
/* NE2000 base header file */
#include "ne2000_base.h"
@@ -94,12 +91,37 @@ void uboot_push_tx_done(int key, int val);
static dp83902a_priv_data_t nic; /* just one instance of the card supported */
+uint32_t ne2k_default_in(uint8_t *addr, uint32_t offset)
+{
+ uint32_t ret;
+ DP_IN(addr, offset, ret);
+ return ret;
+}
+
+void ne2k_default_out(uint8_t *addr, uint32_t offset, uint32_t val)
+{
+ DP_OUT(addr, offset, val);
+}
+
+struct ne2k_io_accessors {
+ uint32_t (*in)(uint8_t *addr, uint32_t offset);
+ void (*out)(uint8_t *addr, uint32_t offset, uint32_t val);
+};
+
+struct ne2k_private_data {
+ struct ne2k_io_accessors io;
+};
+
+/* forward definition of function used for the uboot interface */
+void uboot_push_packet_len(struct ne2k_private_data *pdata, int len);
+void uboot_push_tx_done(int key, int val);
+
/**
* This function reads the MAC address from the serial EEPROM,
* used if PROM read fails. Does nothing for ax88796 chips (sh boards)
*/
static bool
-dp83902a_init(unsigned char *enetaddr)
+dp83902a_init(struct eth_device *dev)
{
dp83902a_priv_data_t *dp = &nic;
u8* base;
@@ -116,13 +138,17 @@ dp83902a_init(unsigned char *enetaddr)
DEBUG_LINE();
#if defined(NE2000_BASIC_INIT)
+ unsigned char *enetaddr = dev->enetaddr;
+ struct ne2k_private_data *pdata = dev->priv;
+ const struct ne2k_io_accessors *io = &pdata->io;
+
/* AX88796L doesn't need */
/* Prepare ESA */
- DP_OUT(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE1); /* Select page 1 */
+ io->out(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE1); /* Select page 1 */
/* Use the address from the serial EEPROM */
for (i = 0; i < 6; i++)
- DP_IN(base, DP_P1_PAR0+i, dp->esa[i]);
- DP_OUT(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE0); /* Select page 0 */
+ dp->esa[i] = io->in(base, DP_P1_PAR0+i);
+ io->out(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE0); /* Select page 0 */
printf("NE2000 - %s ESA: %02x:%02x:%02x:%02x:%02x:%02x\n",
"eeprom",
@@ -139,16 +165,18 @@ dp83902a_init(unsigned char *enetaddr)
}
static void
-dp83902a_stop(void)
+dp83902a_stop(struct eth_device *dev)
{
dp83902a_priv_data_t *dp = &nic;
+ struct ne2k_private_data *pdata = dev->priv;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
DEBUG_FUNCTION();
- DP_OUT(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_STOP); /* Brutal */
- DP_OUT(base, DP_ISR, 0xFF); /* Clear any pending interrupts */
- DP_OUT(base, DP_IMR, 0x00); /* Disable all interrupts */
+ io->out(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_STOP); /* Brutal */
+ io->out(base, DP_ISR, 0xFF); /* Clear any pending interrupts */
+ io->out(base, DP_IMR, 0x00); /* Disable all interrupts */
dp->running = false;
}
@@ -160,9 +188,12 @@ dp83902a_stop(void)
* the hardware ready to send/receive packets.
*/
static void
-dp83902a_start(u8 * enaddr)
+dp83902a_start(struct eth_device *dev)
{
dp83902a_priv_data_t *dp = &nic;
+ unsigned char *enaddr = dev->enetaddr;
+ struct ne2k_private_data *pdata = dev->priv;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
int i;
@@ -170,37 +201,37 @@ dp83902a_start(u8 * enaddr)
DEBUG_FUNCTION();
- DP_OUT(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_STOP); /* Brutal */
- DP_OUT(base, DP_DCR, DP_DCR_INIT);
- DP_OUT(base, DP_RBCH, 0); /* Remote byte count */
- DP_OUT(base, DP_RBCL, 0);
- DP_OUT(base, DP_RCR, DP_RCR_MON); /* Accept no packets */
- DP_OUT(base, DP_TCR, DP_TCR_LOCAL); /* Transmitter [virtually] off */
- DP_OUT(base, DP_TPSR, dp->tx_buf1); /* Transmitter start page */
+ io->out(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_STOP); /* Brutal */
+ io->out(base, DP_DCR, DP_DCR_INIT);
+ io->out(base, DP_RBCH, 0); /* Remote byte count */
+ io->out(base, DP_RBCL, 0);
+ io->out(base, DP_RCR, DP_RCR_MON); /* Accept no packets */
+ io->out(base, DP_TCR, DP_TCR_LOCAL); /* Transmitter [virtually] off */
+ io->out(base, DP_TPSR, dp->tx_buf1); /* Transmitter start page */
dp->tx1 = dp->tx2 = 0;
dp->tx_next = dp->tx_buf1;
dp->tx_started = false;
dp->running = true;
- DP_OUT(base, DP_PSTART, dp->rx_buf_start); /* Receive ring start page */
- DP_OUT(base, DP_BNDRY, dp->rx_buf_end - 1); /* Receive ring boundary */
- DP_OUT(base, DP_PSTOP, dp->rx_buf_end); /* Receive ring end page */
+ io->out(base, DP_PSTART, dp->rx_buf_start); /* Receive ring start page */
+ io->out(base, DP_BNDRY, dp->rx_buf_end - 1); /* Receive ring boundary */
+ io->out(base, DP_PSTOP, dp->rx_buf_end); /* Receive ring end page */
dp->rx_next = dp->rx_buf_start - 1;
dp->running = true;
- DP_OUT(base, DP_ISR, 0xFF); /* Clear any pending interrupts */
- DP_OUT(base, DP_IMR, DP_IMR_All); /* Enable all interrupts */
- DP_OUT(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE1 | DP_CR_STOP); /* Select page 1 */
- DP_OUT(base, DP_P1_CURP, dp->rx_buf_start); /* Current page - next free page for Rx */
+ io->out(base, DP_ISR, 0xFF); /* Clear any pending interrupts */
+ io->out(base, DP_IMR, DP_IMR_All); /* Enable all interrupts */
+ io->out(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE1 | DP_CR_STOP); /* Select page 1 */
+ io->out(base, DP_P1_CURP, dp->rx_buf_start); /* Current page - next free page for Rx */
dp->running = true;
for (i = 0; i < ETHER_ADDR_LEN; i++) {
/* FIXME */
/*((vu_short*)( base + ((DP_P1_PAR0 + i) * 2) +
* 0x1400)) = enaddr[i];*/
- DP_OUT(base, DP_P1_PAR0+i, enaddr[i]);
+ io->out(base, DP_P1_PAR0+i, enaddr[i]);
}
/* Enable and start device */
- DP_OUT(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
- DP_OUT(base, DP_TCR, DP_TCR_NORMAL); /* Normal transmit operations */
- DP_OUT(base, DP_RCR, DP_RCR_AB); /* Accept broadcast, no errors, no multicast */
+ io->out(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
+ io->out(base, DP_TCR, DP_TCR_NORMAL); /* Normal transmit operations */
+ io->out(base, DP_RCR, DP_RCR_AB); /* Accept broadcast, no errors, no multicast */
dp->running = true;
}
@@ -211,9 +242,10 @@ dp83902a_start(u8 * enaddr)
*/
static void
-dp83902a_start_xmit(int start_page, int len)
+dp83902a_start_xmit(struct ne2k_private_data *pdata, int start_page, int len)
{
dp83902a_priv_data_t *dp = (dp83902a_priv_data_t *) &nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
DEBUG_FUNCTION();
@@ -224,12 +256,12 @@ dp83902a_start_xmit(int start_page, int len)
printf("TX already started?!?\n");
#endif
- DP_OUT(base, DP_ISR, (DP_ISR_TxP | DP_ISR_TxE));
- DP_OUT(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
- DP_OUT(base, DP_TBCL, len & 0xFF);
- DP_OUT(base, DP_TBCH, len >> 8);
- DP_OUT(base, DP_TPSR, start_page);
- DP_OUT(base, DP_CR, DP_CR_NODMA | DP_CR_TXPKT | DP_CR_START);
+ io->out(base, DP_ISR, (DP_ISR_TxP | DP_ISR_TxE));
+ io->out(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
+ io->out(base, DP_TBCL, len & 0xFF);
+ io->out(base, DP_TBCH, len >> 8);
+ io->out(base, DP_TPSR, start_page);
+ io->out(base, DP_CR, DP_CR_NODMA | DP_CR_TXPKT | DP_CR_START);
dp->tx_started = true;
}
@@ -239,9 +271,10 @@ dp83902a_start_xmit(int start_page, int len)
* that there is free buffer space (dp->tx_next).
*/
static void
-dp83902a_send(u8 *data, int total_len, u32 key)
+dp83902a_send(struct ne2k_private_data *pdata, u8 *data, int total_len, u32 key)
{
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
int len, start_page, pkt_len, i, isr;
#if DEBUG & 4
@@ -271,7 +304,7 @@ dp83902a_send(u8 *data, int total_len, u32 key)
printf("TX prep page %d len %d\n", start_page, pkt_len);
#endif
- DP_OUT(base, DP_ISR, DP_ISR_RDC); /* Clear end of DMA */
+ io->out(base, DP_ISR, DP_ISR_RDC); /* Clear end of DMA */
{
/*
* Dummy read. The manual sez something slightly different,
@@ -279,15 +312,14 @@ dp83902a_send(u8 *data, int total_len, u32 key)
* does (i.e., also read data).
*/
- u16 tmp;
int len = 1;
- DP_OUT(base, DP_RSAL, 0x100 - len);
- DP_OUT(base, DP_RSAH, (start_page - 1) & 0xff);
- DP_OUT(base, DP_RBCL, len);
- DP_OUT(base, DP_RBCH, 0);
- DP_OUT(base, DP_CR, DP_CR_PAGE0 | DP_CR_RDMA | DP_CR_START);
- DP_IN_DATA(dp->data, tmp);
+ io->out(base, DP_RSAL, 0x100 - len);
+ io->out(base, DP_RSAH, (start_page - 1) & 0xff);
+ io->out(base, DP_RBCL, len);
+ io->out(base, DP_RBCH, 0);
+ io->out(base, DP_CR, DP_CR_PAGE0 | DP_CR_RDMA | DP_CR_START);
+ io->in(dp->data, 0);
}
#ifdef CYGHWR_NS_DP83902A_PLF_BROKEN_TX_DMA
@@ -299,11 +331,11 @@ dp83902a_send(u8 *data, int total_len, u32 key)
#endif
/* Send data to device buffer(s) */
- DP_OUT(base, DP_RSAL, 0);
- DP_OUT(base, DP_RSAH, start_page);
- DP_OUT(base, DP_RBCL, pkt_len & 0xFF);
- DP_OUT(base, DP_RBCH, pkt_len >> 8);
- DP_OUT(base, DP_CR, DP_CR_WDMA | DP_CR_START);
+ io->out(base, DP_RSAL, 0);
+ io->out(base, DP_RSAH, start_page);
+ io->out(base, DP_RBCL, pkt_len & 0xFF);
+ io->out(base, DP_RBCH, pkt_len >> 8);
+ io->out(base, DP_CR, DP_CR_WDMA | DP_CR_START);
/* Put data into buffer */
#if DEBUG & 4
@@ -316,7 +348,7 @@ dp83902a_send(u8 *data, int total_len, u32 key)
if (0 == (++dx % 16)) printf("\n ");
#endif
- DP_OUT_DATA(dp->data, *data++);
+ io->out(dp->data, 0, *data++);
len--;
}
#if DEBUG & 4
@@ -329,7 +361,7 @@ dp83902a_send(u8 *data, int total_len, u32 key)
/* Padding to 802.3 length was required */
for (i = total_len; i < pkt_len;) {
i++;
- DP_OUT_DATA(dp->data, 0);
+ io->out(dp->data, 0, 0);
}
}
@@ -344,11 +376,11 @@ dp83902a_send(u8 *data, int total_len, u32 key)
/* Wait for DMA to complete */
do {
- DP_IN(base, DP_ISR, isr);
+ isr = io->in(base, DP_ISR);
} while ((isr & DP_ISR_RDC) == 0);
/* Then disable DMA */
- DP_OUT(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
+ io->out(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
/* Start transmit if not already going */
if (!dp->tx_started) {
@@ -357,7 +389,7 @@ dp83902a_send(u8 *data, int total_len, u32 key)
} else {
dp->tx_int = 2; /* Expecting interrupt from BUF2 */
}
- dp83902a_start_xmit(start_page, pkt_len);
+ dp83902a_start_xmit(pdata, start_page, pkt_len);
}
}
@@ -369,23 +401,23 @@ dp83902a_send(u8 *data, int total_len, u32 key)
* 'dp83902a_recv' will be called to actually fetch it from the hardware.
*/
static void
-dp83902a_RxEvent(void)
+dp83902a_RxEvent(struct ne2k_private_data *pdata)
{
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
- u8 rsr;
u8 rcv_hdr[4];
int i, len, pkt, cur;
DEBUG_FUNCTION();
- DP_IN(base, DP_RSR, rsr);
+ io->in(base, DP_RSR);
while (true) {
/* Read incoming packet header */
- DP_OUT(base, DP_CR, DP_CR_PAGE1 | DP_CR_NODMA | DP_CR_START);
- DP_IN(base, DP_P1_CURP, cur);
- DP_OUT(base, DP_P1_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
- DP_IN(base, DP_BNDRY, pkt);
+ io->out(base, DP_CR, DP_CR_PAGE1 | DP_CR_NODMA | DP_CR_START);
+ cur = io->in(base, DP_P1_CURP);
+ io->out(base, DP_P1_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
+ pkt = io->in(base, DP_BNDRY);
pkt += 1;
if (pkt == dp->rx_buf_end)
@@ -394,27 +426,27 @@ dp83902a_RxEvent(void)
if (pkt == cur) {
break;
}
- DP_OUT(base, DP_RBCL, sizeof(rcv_hdr));
- DP_OUT(base, DP_RBCH, 0);
- DP_OUT(base, DP_RSAL, 0);
- DP_OUT(base, DP_RSAH, pkt);
+ io->out(base, DP_RBCL, sizeof(rcv_hdr));
+ io->out(base, DP_RBCH, 0);
+ io->out(base, DP_RSAL, 0);
+ io->out(base, DP_RSAH, pkt);
if (dp->rx_next == pkt) {
if (cur == dp->rx_buf_start)
- DP_OUT(base, DP_BNDRY, dp->rx_buf_end - 1);
+ io->out(base, DP_BNDRY, dp->rx_buf_end - 1);
else
- DP_OUT(base, DP_BNDRY, cur - 1); /* Update pointer */
+ io->out(base, DP_BNDRY, cur - 1); /* Update pointer */
return;
}
dp->rx_next = pkt;
- DP_OUT(base, DP_ISR, DP_ISR_RDC); /* Clear end of DMA */
- DP_OUT(base, DP_CR, DP_CR_RDMA | DP_CR_START);
+ io->out(base, DP_ISR, DP_ISR_RDC); /* Clear end of DMA */
+ io->out(base, DP_CR, DP_CR_RDMA | DP_CR_START);
#ifdef CYGHWR_NS_DP83902A_PLF_BROKEN_RX_DMA
CYGACC_CALL_IF_DELAY_US(10);
#endif
/* read header (get data size)*/
for (i = 0; i < sizeof(rcv_hdr);) {
- DP_IN_DATA(dp->data, rcv_hdr[i++]);
+ rcv_hdr[i++] = io->in(dp->data, 0);
}
#if DEBUG & 5
@@ -424,12 +456,12 @@ dp83902a_RxEvent(void)
len = ((rcv_hdr[3] << 8) | rcv_hdr[2]) - sizeof(rcv_hdr);
/* data read */
- uboot_push_packet_len(len);
+ uboot_push_packet_len(pdata, len);
if (rcv_hdr[1] == dp->rx_buf_start)
- DP_OUT(base, DP_BNDRY, dp->rx_buf_end - 1);
+ io->out(base, DP_BNDRY, dp->rx_buf_end - 1);
else
- DP_OUT(base, DP_BNDRY, rcv_hdr[1] - 1); /* Update pointer */
+ io->out(base, DP_BNDRY, rcv_hdr[1] - 1); /* Update pointer */
}
}
@@ -441,9 +473,10 @@ dp83902a_RxEvent(void)
* efficient processing in the upper layers of the stack.
*/
static void
-dp83902a_recv(u8 *data, int len)
+dp83902a_recv(struct ne2k_private_data *pdata, u8 *data, int len)
{
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
int i, mlen;
u8 saved_char = 0;
@@ -459,13 +492,13 @@ dp83902a_recv(u8 *data, int len)
#endif
/* Read incoming packet data */
- DP_OUT(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
- DP_OUT(base, DP_RBCL, len & 0xFF);
- DP_OUT(base, DP_RBCH, len >> 8);
- DP_OUT(base, DP_RSAL, 4); /* Past header */
- DP_OUT(base, DP_RSAH, dp->rx_next);
- DP_OUT(base, DP_ISR, DP_ISR_RDC); /* Clear end of DMA */
- DP_OUT(base, DP_CR, DP_CR_RDMA | DP_CR_START);
+ io->out(base, DP_CR, DP_CR_PAGE0 | DP_CR_NODMA | DP_CR_START);
+ io->out(base, DP_RBCL, len & 0xFF);
+ io->out(base, DP_RBCH, len >> 8);
+ io->out(base, DP_RSAL, 4); /* Past header */
+ io->out(base, DP_RSAH, dp->rx_next);
+ io->out(base, DP_ISR, DP_ISR_RDC); /* Clear end of DMA */
+ io->out(base, DP_CR, DP_CR_RDMA | DP_CR_START);
#ifdef CYGHWR_NS_DP83902A_PLF_BROKEN_RX_DMA
CYGACC_CALL_IF_DELAY_US(10);
#endif
@@ -489,7 +522,7 @@ dp83902a_recv(u8 *data, int len)
{
u8 tmp;
- DP_IN_DATA(dp->data, tmp);
+ tmp = io->in(dp->data, 0);
#if DEBUG & 4
printf(" %02x", tmp);
if (0 == (++dx % 16)) printf("\n ");
@@ -506,16 +539,16 @@ dp83902a_recv(u8 *data, int len)
}
static void
-dp83902a_TxEvent(void)
+dp83902a_TxEvent(struct ne2k_private_data *pdata)
{
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
- u8 tsr;
u32 key;
DEBUG_FUNCTION();
- DP_IN(base, DP_TSR, tsr);
+ io->in(base, DP_TSR);
if (dp->tx_int == 1) {
key = dp->tx1_key;
dp->tx1 = 0;
@@ -526,10 +559,10 @@ dp83902a_TxEvent(void)
/* Start next packet if one is ready */
dp->tx_started = false;
if (dp->tx1) {
- dp83902a_start_xmit(dp->tx1, dp->tx1_len);
+ dp83902a_start_xmit(pdata, dp->tx1, dp->tx1_len);
dp->tx_int = 1;
} else if (dp->tx2) {
- dp83902a_start_xmit(dp->tx2, dp->tx2_len);
+ dp83902a_start_xmit(pdata, dp->tx2, dp->tx2_len);
dp->tx_int = 2;
} else {
dp->tx_int = 0;
@@ -543,16 +576,16 @@ dp83902a_TxEvent(void)
* interrupt.
*/
static void
-dp83902a_ClearCounters(void)
+dp83902a_ClearCounters(struct ne2k_private_data *pdata)
{
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
- u8 cnt1, cnt2, cnt3;
- DP_IN(base, DP_FER, cnt1);
- DP_IN(base, DP_CER, cnt2);
- DP_IN(base, DP_MISSED, cnt3);
- DP_OUT(base, DP_ISR, DP_ISR_CNT);
+ io->in(base, DP_FER);
+ io->in(base, DP_CER);
+ io->in(base, DP_MISSED);
+ io->out(base, DP_ISR, DP_ISR_CNT);
}
/*
@@ -560,55 +593,57 @@ dp83902a_ClearCounters(void)
* out in section 7.0 of the datasheet.
*/
static void
-dp83902a_Overflow(void)
+dp83902a_Overflow(struct ne2k_private_data *pdata)
{
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *)&nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
u8 isr;
/* Issue a stop command and wait 1.6ms for it to complete. */
- DP_OUT(base, DP_CR, DP_CR_STOP | DP_CR_NODMA);
+ io->out(base, DP_CR, DP_CR_STOP | DP_CR_NODMA);
CYGACC_CALL_IF_DELAY_US(1600);
/* Clear the remote byte counter registers. */
- DP_OUT(base, DP_RBCL, 0);
- DP_OUT(base, DP_RBCH, 0);
+ io->out(base, DP_RBCL, 0);
+ io->out(base, DP_RBCH, 0);
/* Enter loopback mode while we clear the buffer. */
- DP_OUT(base, DP_TCR, DP_TCR_LOCAL);
- DP_OUT(base, DP_CR, DP_CR_START | DP_CR_NODMA);
+ io->out(base, DP_TCR, DP_TCR_LOCAL);
+ io->out(base, DP_CR, DP_CR_START | DP_CR_NODMA);
/*
* Read in as many packets as we can and acknowledge any and receive
* interrupts. Since the buffer has overflowed, a receive event of
* some kind will have occured.
*/
- dp83902a_RxEvent();
- DP_OUT(base, DP_ISR, DP_ISR_RxP|DP_ISR_RxE);
+ dp83902a_RxEvent(pdata);
+ io->out(base, DP_ISR, DP_ISR_RxP|DP_ISR_RxE);
/* Clear the overflow condition and leave loopback mode. */
- DP_OUT(base, DP_ISR, DP_ISR_OFLW);
- DP_OUT(base, DP_TCR, DP_TCR_NORMAL);
+ io->out(base, DP_ISR, DP_ISR_OFLW);
+ io->out(base, DP_TCR, DP_TCR_NORMAL);
/*
* If a transmit command was issued, but no transmit event has occured,
* restart it here.
*/
- DP_IN(base, DP_ISR, isr);
+ isr = io->in(base, DP_ISR);
if (dp->tx_started && !(isr & (DP_ISR_TxP|DP_ISR_TxE))) {
- DP_OUT(base, DP_CR, DP_CR_NODMA | DP_CR_TXPKT | DP_CR_START);
+ io->out(base, DP_CR, DP_CR_NODMA | DP_CR_TXPKT | DP_CR_START);
}
}
static void
-dp83902a_poll(void)
+dp83902a_poll(struct ne2k_private_data *pdata)
{
struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic;
+ const struct ne2k_io_accessors *io = &pdata->io;
u8 *base = dp->base;
u8 isr;
- DP_OUT(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE0 | DP_CR_START);
- DP_IN(base, DP_ISR, isr);
+ io->out(base, DP_CR, DP_CR_NODMA | DP_CR_PAGE0 | DP_CR_START);
+ isr = io->in(base, DP_ISR);
while (0 != isr) {
/*
* The CNT interrupt triggers when the MSB of one of the error
@@ -616,7 +651,7 @@ dp83902a_poll(void)
* we should read their values to reset them.
*/
if (isr & DP_ISR_CNT) {
- dp83902a_ClearCounters();
+ dp83902a_ClearCounters(pdata);
}
/*
* Check for overflow. It's a special case, since there's a
@@ -624,27 +659,27 @@ dp83902a_poll(void)
* a running state.a
*/
if (isr & DP_ISR_OFLW) {
- dp83902a_Overflow();
+ dp83902a_Overflow(pdata);
} else {
/*
* Other kinds of interrupts can be acknowledged simply by
* clearing the relevant bits of the ISR. Do that now, then
* handle the interrupts we care about.
*/
- DP_OUT(base, DP_ISR, isr); /* Clear set bits */
+ io->out(base, DP_ISR, isr); /* Clear set bits */
if (!dp->running) break; /* Is this necessary? */
/*
* Check for tx_started on TX event since these may happen
* spuriously it seems.
*/
if (isr & (DP_ISR_TxP|DP_ISR_TxE) && dp->tx_started) {
- dp83902a_TxEvent();
+ dp83902a_TxEvent(pdata);
}
if (isr & (DP_ISR_RxP|DP_ISR_RxE)) {
- dp83902a_RxEvent();
+ dp83902a_RxEvent(pdata);
}
}
- DP_IN(base, DP_ISR, isr);
+ isr = io->in(base, DP_ISR);
}
}
@@ -655,13 +690,13 @@ static u8 *pbuf = NULL;
static int pkey = -1;
static int initialized = 0;
-void uboot_push_packet_len(int len) {
+void uboot_push_packet_len(struct ne2k_private_data *pdata, int len) {
PRINTK("pushed len = %d\n", len);
if (len >= 2000) {
printf("NE2000: packet too big\n");
return;
}
- dp83902a_recv(&pbuf[0], len);
+ dp83902a_recv(pdata, &pbuf[0], len);
/*Just pass it to the upper layer*/
NetReceive(&pbuf[0], len);
@@ -717,7 +752,7 @@ static int ne2k_setup_driver(struct eth_device *dev)
if (!eth_getenv_enetaddr("ethaddr", dev->enetaddr)) {
/* If the MAC address is not in the environment, get it: */
if (!get_prom(dev->enetaddr, nic.base)) /* get MAC from prom */
- dp83902a_init(dev->enetaddr); /* fallback: seeprom */
+ dp83902a_init(dev); /* fallback: seeprom */
/* And write it into the environment otherwise eth_write_hwaddr
* returns -1 due to eth_getenv_enetaddr_by_index() failing,
* and this causes "Warning: failed to set MAC address", and
@@ -729,7 +764,7 @@ static int ne2k_setup_driver(struct eth_device *dev)
static int ne2k_init(struct eth_device *dev, bd_t *bd)
{
- dp83902a_start(dev->enetaddr);
+ dp83902a_start(dev);
initialized = 1;
return 0;
}
@@ -738,28 +773,30 @@ static void ne2k_halt(struct eth_device *dev)
{
debug("### ne2k_halt\n");
if(initialized)
- dp83902a_stop();
+ dp83902a_stop(dev);
initialized = 0;
}
static int ne2k_recv(struct eth_device *dev)
{
- dp83902a_poll();
+ struct ne2k_private_data *pdata = dev->priv;
+ dp83902a_poll(pdata);
return 1;
}
static int ne2k_send(struct eth_device *dev, volatile void *packet, int length)
{
int tmo;
+ struct ne2k_private_data *pdata = dev->priv;
debug("### ne2k_send\n");
pkey = -1;
- dp83902a_send((u8 *) packet, length, 666);
+ dp83902a_send(pdata, (u8 *) packet, length, 666);
tmo = get_timer (0) + TOUT * CONFIG_SYS_HZ;
while(1) {
- dp83902a_poll();
+ dp83902a_poll(pdata);
if (pkey != -1) {
PRINTK("Packet sucesfully sent\n");
return 0;
@@ -775,25 +812,48 @@ static int ne2k_send(struct eth_device *dev, volatile void *packet, int length)
/**
* Setup the driver for use and register it with the eth layer
- * @return 0 on success, -1 on error (causing caller to print error msg)
+ * @return 0 on success, < 0 on error (causing caller to print error msg)
*/
-int ne2k_register(void)
+int ne2k_register_io(uint32_t (*in)(uint8_t *addr, uint32_t offset),
+ void (*out)(uint8_t *addr, uint32_t offset, uint32_t value))
{
struct eth_device *dev;
+ struct ne2k_private_data *pdata;
dev = calloc(sizeof(*dev), 1);
if (dev == NULL)
- return -1;
+ return -ENOMEM;
+
+ pdata = calloc(sizeof(struct ne2k_private_data), 1);
+ if (pdata == NULL) {
+ free(dev);
+ return -ENOMEM;
+ }
if (ne2k_setup_driver(dev))
- return -1;
+ return -EINVAL;
+
+ if (in == NULL)
+ in = ne2k_default_in;
+
+ if (out == NULL)
+ out = ne2k_default_out;
+
+ pdata->io.in = in;
+ pdata->io.out = out;
dev->init = ne2k_init;
dev->halt = ne2k_halt;
dev->send = ne2k_send;
dev->recv = ne2k_recv;
+ dev->priv = pdata;
sprintf(dev->name, "NE2000");
return eth_register(dev);
}
+
+int ne2k_register(void)
+{
+ return ne2k_register_io(NULL, NULL);
+}
diff --git a/include/netdev.h b/include/netdev.h
index 150fa8e..7ea4642 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -81,6 +81,8 @@ int mpc82xx_scc_enet_initialize(bd_t *bis);
int mvgbe_initialize(bd_t *bis);
int natsemi_initialize(bd_t *bis);
int ne2k_register(void);
+int ne2k_register_io(uint32_t (*in)(uint8_t *addr, uint32_t offset),
+ void (*out)(uint8_t *addr, uint32_t offset, uint32_t value));
int npe_initialize(bd_t *bis);
int ns8382x_initialize(bd_t *bis);
int pcnet_initialize(bd_t *bis);
--
1.7.7.1
3
11
Hi Troy,
is here any specific reason for the "disable_giga" switch in the ksz9021 phy driver? We're just having some issues here, most of the times we don't get the link up with a gigabit connection. Anything else that caused trouble on your side, apart from the PHY ID mess?
:) Kolja
Kolja Schneider, Software Design
MEN Mikro Elektronik GmbH
Neuwieder Straße 3-7
90411 Nürnberg, Germany
Phone +49-911-99 33 5-251
Fax +49-911-99 33 5-910
Kolja.Schneider(a)men.de<mailto:Kolja.Schneider@men.de>
www.men.de<http://www.men.de/>
MEN Mikro Elektronik GmbH - Manfred Schmitz (CTO), Udo Fuchs (CFO) - Handelsregister/Trade Register AG Nürnberg HRB 5540
Please consider the environment before printing this e-mail
2
1

Re: [U-Boot] Where to put a large bootloader-supplied device tree on ARM ?
by Rob Herring 13 Jul '12
by Rob Herring 13 Jul '12
13 Jul '12
[adding u-boot list]
On 07/12/2012 01:52 AM, Mitch Bradley wrote:
> On 7/8/2012 6:30 PM, Nicolas Pitre wrote:
>> On Fri, 6 Jul 2012, Mitch Bradley wrote:
>>
>>> On 7/6/2012 3:23 PM, David VomLehn (dvomlehn) wrote:
>>>> The kernel *must* go where it is linked, but the FDT contains only relative
>>>> references and is thus free to go anywhere. The same is true of ramdisks,
>>>> which
>>>> are usually placed after the kernel.
>>
>> The kernel must go where it is linked *only* if you are using the
>> 'Image' output. When using 'zImage' you can put the kernel anywhere in
>> memory, or in the first 128MB of RAM if CONFIG_AUTO_ZRELADDR is used.
>>
>>> Right, but the kernel image is compressed, so after decompression it expands
>>> into the area just after it. Also, the .bss segment is in that vicinity.
>>
>> To be exact, the compressed kernel moves itself out of the region where
>> the decompressed kernel will end up before doing the decompression, but
>> only if necessary. So it is a good idea to load zImage away from the
>> decompressed kernel area to avoid this extra move and save some fraction
>> of a second on boot time.
>>
>>> There's some code in arch/arm/boot/compressed/head.S to relocate
>>> device tree blobs, but it requires CONFIG_ARM_APPENDED_DTB which
>>> is not recommended - arch/arm/Kconfig recommends using the
>>> documented boot protocol istead .
>>
>> This is in case a DTB is appended to zImage. When the DTB is detected,
>> the moving of zImage out of the decompressed area must take care of
>> moving the DTB as well.
>>
>>> Documentation/arm/Booting says
>>> to put the dtb "in a region of memory where the kernel decompressor
>>> will not overwrite it", further recommending the first 16KiB.
>>>
>>> As noted, the first 16KiB loses if the dtb is too large. And
>>> "where the kernel decompressor will not overwrite it" says what
>>> won't work, not what will. It appears that the decompressor works
>>> out its addresses dynamically, so there's no hard prescription even
>>> for what to avoid.
>>
>> A good rule of thumb is to take the size of the decompressed kernel and
>> multiply this by 3. Rounding up is also fine. So for example if your
>> arch/arm/boot/Image is 5MB, then putting anciliary data such as a
>> ramdisk or a large DTB from 16MB into RAM or above should be fine.
>>
>>> For now, I'm putting the initrd at the end of memory and the dtb
>>> below that. That seems to work, but I'm unsure whether or not
>>> I'm just "getting lucky".
>>
>> That's also perfectly fine.
>
>
> Alas, that worked for machines with 512 MiB of main memory, but failed
> on 1 GiB machines. My guess is that, when the initrd and dtb are near
> the top of a 1 GiB memory, the virtual address gets too near the top of
> the kernel's 1 GiB of virtual space (which starts at 0xc0000000),
> perhaps colliding with the VMALLOC space.
>
> Putting them just below the 128 MiB boundary seems to work.
Interesting. I think this is also a problem on u-boot just waiting to
happen. u-boot locates itself at the end of RAM and likes to copy the
fdt and initrd to just below that. Any machine with 1G+ is going to hit
this. I avoided it because I limited u-boot to 512MB on highbank.
Rob
>
>>
>>
>> Nicolas
>>
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss(a)lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>
3
4