arm/pxa: remove unused u-boot.lds from board/vpac270
PATCH 1/11 arm/pxa: remove unused u-boot.lds from board/vpac270
This file is not used, automatically generated u-boot.lds is used instead
--- board/vpac270/u-boot.lds | 55 ---------------------------------------------- 1 files changed, 0 insertions(+), 55 deletions(-) delete mode 100644 board/vpac270/u-boot.lds
board/vpac270/u-boot.lds deleted +0 -55
@@ -1,55 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, wd at denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - . = 0x00000000; - - . = ALIGN(4); - .text : - { - cpu/pxa/start.o (.text) - *(.text) - } - - . = ALIGN(4); - .rodata : { *(.rodata) } - - . = ALIGN(4); - .data : { *(.data) } - - . = ALIGN(4); - .got : { *(.got) } - - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; - - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) } - _end = .; -}
Signature · 1 line
1.7.1
PATCH 2/11 arm/pxa: fix board/vpac270/vpac270.c compilation if usb support is disabled
--- board/vpac270/vpac270.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
board/vpac270/vpac270.c +2 -0
@@ -73,6 +73,7 @@ int dram_init (void)return 0 ; } +#ifdef CONFIG_CMD_USB int usb_board_init (void ) { UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
@@ -119,6 +120,7 @@ void usb_board_stop(void) return; } +#endif #ifdef CONFIG_DRIVER_DM9000 int board_eth_init (bd_t *bis)
Signature · 1 line
1.7.1
PATCH 3/11 arm/pxa: enable stuart/btuart for vpac270
In reply to Mikhail Kshevetskiy--- include/configs/vpac270.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
include/configs/vpac270.h +3 -0
@@ -62,7 +62,10 @@* Serial Console Configuration */ #define CONFIG_PXA_SERIAL +#define CONFIG_SERIAL_MULTI #define CONFIG_FFUART 1 +#define CONFIG_STUART 1 +#define CONFIG_BTUART 1#define CONFIG_BAUDRATE 115200#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
Signature · 1 line
1.7.1
PATCH 4/11 arm/pxa: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000
In reply to Mikhail Kshevetskiy* CONFIG_SYS_CLKS_IN_HZ is not used anywhere, so removing it
* CONFIG_SYS_HZ is set to 1000 on most architectures, so it seems to be the safe default
--- include/configs/vpac270.h | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
include/configs/vpac270.h +1 -2
@@ -151,8 +151,7 @@/* * Clock Configuration */ -#undef CONFIG_SYS_CLKS_IN_HZ -#define CONFIG_SYS_HZ 3250000/* Timer @ 3250000 Hz */ +#define CONFIG_SYS_HZ 1000/* Timer @ 3250000 Hz */ #define CONFIG_SYS_CPUSPEED 0x190/* standard setting for 312MHz; L=16, N=1.5, A=0, SDCLK!=SystemBus */ /*
Signature · 1 line
1.7.1
PATCH 5/11 arm/pxa: fix environment location/length for vpac270 and related bugs.
In reply to Mikhail KshevetskiyDefine MONITOR_BASE on the base of used flash type. Define ENV_ADDR as MONITOR_BASE + MONITOR_LEN. Fix environment sector size (NOR: 32Kb for first four sectors and 128Kb for other; OneNAND: 128Kb).
Last but not least: we have MONITOR_LEN = 0x40000, one sector for environment and one sector for its redundancy copy (2 * 0x20000 = 256Kb). So the kernel may start from 0x00080000 only.
--- include/configs/vpac270.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
include/configs/vpac270.h +6 -4
@@ -49,7 +49,7 @@"if usb reset && fatload usb 0 0xa4000000 uImage; then " \"bootm 0xa4000000; " \"fi; " \ - "bootm 0x40000;" + "bootm 0x00080000;"#define CONFIG_BOOTARGS "console=tty0 console=ttyS0,115200"#define CONFIG_TIMESTAMP #define CONFIG_BOOTDELAY 2/* Autoboot delay */
@@ -188,6 +188,7 @@#if defined(CONFIG_CMD_FLASH )/* NOR */ #define PHYS_FLASH_1 0x00000000/* Flash Bank #1 */ #define PHYS_FLASH_2 0x02000000/* Flash Bank #2 */ +#define CONFIG_SYS_MONITOR_BASE PHYS_FLASH_1#define CONFIG_SYS_FLASH_CFI #define CONFIG_FLASH_CFI_DRIVER 1
@@ -207,18 +208,19 @@#elif defined(CONFIG_CMD_ONENAND )/* OneNAND */ #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_ONENAND_BASE 0x00000000 +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_ONENAND_BASE#define CONFIG_ENV_IS_IN_ONENAND 1#else /* No flash */ #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_ENV_IS_NOWHERE +#define CONFIG_SYS_MONITOR_BASE 0x000000#endif -#define CONFIG_SYS_MONITOR_BASE 0x000000#define CONFIG_SYS_MONITOR_LEN 0x40000 -#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_LEN) -#define CONFIG_ENV_SECT_SIZE 0x40000 +#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) +#define CONFIG_ENV_SECT_SIZE 0x20000#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
Signature · 1 line
1.7.1
PATCH 5/11 arm/pxa: fix environment location/length for vpac270 and related bugs.
Dne ?t 26. srpna 2010 12:48:00 Mikhail Kshevetskiy napsal(a):
Quoted 18 lines
Define
MONITOR_BASEon the base of used flash type. DefineENV_ADDRasMONITOR_BASE+MONITOR_LEN. Fix environment sector size (NOR: 32Kb for first four sectors and 128Kb for other; OneNAND: 128Kb).Last but not least: we have
MONITOR_LEN=0x40000, one sector for environment and one sector for its redundancy copy (2 *0x20000= 256Kb). So the kernel may start from0x00080000only.Signed-off-by Mikhail Kshevetskiy <[email protected]>--- include/configs/vpac270.h | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)include/configs/vpac270.h +0
-0
include/configs/vpac270.h line 52
Quoted 5 lines
include/configs/vpac270.h +1
-1@@ -49,7 +49,7 @@"if usb reset && fatload usb 0 0xa4000000 uImage; then " \"bootm 0xa4000000; " \"fi; " \ -"bootm 0x40000;" +"bootm 0x00080000;"
Good catch, but let's make it 0x60000 as spare env isn't used.
include/configs/vpac270.h line 53
Quoted 1 line
include/configs/vpac270.h +0
-0#define CONFIG_BOOTARGS "console=tty0
console=ttyS0,115200"
include/configs/vpac270.h line 189
Quoted 5 lines
include/configs/vpac270.h +0
-0#define CONFIG_TIMESTAMP #define CONFIG_BOOTDELAY 2/* Autoboot delay */ @@ -188,6 +188,7 @@#if defined(CONFIG_CMD_FLASH )/* NOR */ #define PHYS_FLASH_1 0x00000000/* Flash Bank #1
*/
include/configs/vpac270.h line 190
Quoted 1 line
include/configs/vpac270.h +0
-0#define PHYS_FLASH_2 0x02000000/* Flash Bank #2
*/
include/configs/vpac270.h line 191
Quoted 1 line
include/configs/vpac270.h +1
-0+#define CONFIG_SYS_MONITOR_BASE PHYS_FLASH_1
This is always 0 ... that's why it's defined in common place.
Quoted 22 lines
include/configs/vpac270.h +3
-3#define CONFIG_SYS_FLASH_CFI #define CONFIG_FLASH_CFI_DRIVER 1@@ -207,18 +208,19 @@#elif defined(CONFIG_CMD_ONENAND )/* OneNAND */ #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_ONENAND_BASE 0x00000000 +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_ONENAND_BASE#define CONFIG_ENV_IS_IN_ONENAND 1#else /* No flash */ #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_ENV_IS_NOWHERE +#define CONFIG_SYS_MONITOR_BASE 0x000000#endif -#define CONFIG_SYS_MONITOR_BASE 0x000000#define CONFIG_SYS_MONITOR_LEN 0x40000 -#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_LEN) -#define CONFIG_ENV_SECT_SIZE 0x40000 +#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE +
Quoted 3 lines
CONFIG_SYS_MONITOR_LEN) +#defineCONFIG_ENV_SECT_SIZE0x20000
#defineCONFIG_ENV_ADDR_REDUND(CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE)
#defineCONFIG_ENV_SIZE_REDUND(CONFIG_ENV_SIZE)
Please rebase the patch on top of for-wd-master.
PATCH 6/11 arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config
In reply to Mikhail Kshevetskiyit is not required and not recommended.
--- include/configs/vpac270.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
include/configs/vpac270.h +0 -2
@@ -40,8 +40,6 @@#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)#define CONFIG_SYS_GBL_DATA_SIZE 128 -#define CONFIG_ENV_OVERWRITE /* override default environment */ -#define CONFIG_BOOTCOMMAND \ "if mmc init && fatload mmc 0 0xa4000000 uImage; then " \ "bootm 0xa4000000; " \
Signature · 1 line
1.7.1
PATCH 6/11 arm/pxa: remove CONFIG_ENV_OVERWRITE from vpac270 config
Dne ?t 26. srpna 2010 12:48:01 Mikhail Kshevetskiy napsal(a):
Quoted 1 line
it is not required and not recommended.
If CONFIG_ENV_OVERWRITE is #defined in your config file, the write protection for vendor parameters is completely disabled. Anybody can change or delete these parameters.
I think that's ok. Anyone can remove it before deploying the real product.
Quoted 10 lines
Signed-off-by Mikhail Kshevetskiy <[email protected]>--- include/configs/vpac270.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)include/configs/vpac270.h +0
-0
include/configs/vpac270.h line 43
Quoted 4 lines
include/configs/vpac270.h +0
-1@@ -40,8 +40,6 @@#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)#define CONFIG_SYS_GBL_DATA_SIZE 128 -#define CONFIG_ENV_OVERWRITE /* override default environment
*/
include/configs/vpac270.h line 43
Quoted 2 lines
include/configs/vpac270.h +0
-1-#define CONFIG_BOOTCOMMAND
\
Quoted 2 lines
include/configs/vpac270.h +0
-0"if mmc init && fatload mmc 0 0xa4000000 uImage; then " \"bootm 0xa4000000; " \
PATCH 7/11 arm/pxa: decrease environment size and stack size for vpac270
In reply to Mikhail Kshevetskiyit looks like 4Kb for environment and 64Kb for stack is sufficient
--- include/configs/vpac270.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/configs/vpac270.h +2 -2
@@ -36,7 +36,7 @@/* * Environment settings */ -#define CONFIG_ENV_SIZE 0x4000 +#define CONFIG_ENV_SIZE (4 * 1024)#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)#define CONFIG_SYS_GBL_DATA_SIZE 128
@@ -157,7 +157,7 @@* * The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE (128*1024)/* regular stack */ +#define CONFIG_STACKSIZE (64*1024)/* regular stack */ #ifdef CONFIG_USE_IRQ #define CONFIG_STACKSIZE_IRQ (4*1024)/* IRQ stack */ #define CONFIG_STACKSIZE_FIQ (4*1024)/* FIQ stack */
Signature · 1 line
1.7.1
PATCH 7/11 arm/pxa: decrease environment size and stack size for vpac270
Dne ?t 26. srpna 2010 12:48:02 Mikhail Kshevetskiy napsal(a):
Quoted 1 line
it looks like 4Kb for environment and 64Kb for stack is sufficient
Wolfgang, what's your opinion?
Thanks
Quoted 20 lines
Signed-off-by Mikhail Kshevetskiy <[email protected]>--- include/configs/vpac270.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)include/configs/vpac270.h +1
-1@@ -36,7 +36,7 @@/* * Environment settings */ -#define CONFIG_ENV_SIZE 0x4000 +#define CONFIG_ENV_SIZE (4 * 1024)#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)#define CONFIG_SYS_GBL_DATA_SIZE 128
include/configs/vpac270.h line 160
Quoted 4 lines
include/configs/vpac270.h +0
-1@@ -157,7 +157,7 @@* * The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE (128*1024)/* regular stack
*/
include/configs/vpac270.h line 160
Quoted 1 line
include/configs/vpac270.h +1
-0+#define CONFIG_STACKSIZE (64*1024)/* regular stack
*/
Quoted 3 lines
include/configs/vpac270.h +0
-0#ifdef CONFIG_USE_IRQ #define CONFIG_STACKSIZE_IRQ (4*1024)/* IRQ stack */ #define CONFIG_STACKSIZE_FIQ (4*1024)/* FIQ stack */
PATCH 7/11 arm/pxa: decrease environment size and stack size for vpac270
Dear Marek Vasut,
Quoted 4 lines · In message <[email protected]> you wrote:
Dne Ct 26. srpna 2010 12:48:02 Mikhail Kshevetskiy napsal(a):
Quoted 1 line
it looks like 4Kb for environment and 64Kb for stack is sufficient
Wolfgang, what's your opinion?
I don't think this makes sense on a real-life system, but then, I don't know neither the hardware nor it's use cases. If the board maintainer claims that this is OK for all known use cases...
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Perfection is reached, not when there is no longer anything to add,
but when there is no longer anything to take away.
- Antoine de Saint-ExuperyPATCH 8/11 arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment)
In reply to Mikhail Kshevetskiyit looks like u-boot allocates a buffer of CONFIG_ENV_SECT_SIZE size when making "saveenv" command. In our case CONFIG_ENV_SECT_SIZE is 128Kb, so having CONFIG_SYS_MALLOC_LEN = (128Kb + space for environment) is not sufficient.
Increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment) to resolve a problem.
--- include/configs/vpac270.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/vpac270.h +1 -1
@@ -37,7 +37,7 @@* Environment settings */ #define CONFIG_ENV_SIZE (4 * 1024) -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 196*1024)#define CONFIG_SYS_GBL_DATA_SIZE 128#define CONFIG_BOOTCOMMAND \
Signature · 1 line
1.7.1
PATCH 8/11 arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment)
Dne ?t 26. srpna 2010 12:48:03 Mikhail Kshevetskiy napsal(a):
Quoted 7 lines
it looks like u-boot allocates a buffer of
CONFIG_ENV_SECT_SIZEsize when making "saveenv" command. In our caseCONFIG_ENV_SECT_SIZEis 128Kb, so havingCONFIG_SYS_MALLOC_LEN= (128Kb + space for environment) is not sufficient.Increase
CONFIG_SYS_MALLOC_LENto (196Kb + space for environment) to resolve a problem.
You probably hit this because you changed the ENV size. Wolfgang, can you please comment on this one too?
Thanks
Quoted 11 lines
Signed-off-by Mikhail Kshevetskiy <[email protected]>--- include/configs/vpac270.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)include/configs/vpac270.h +0
-0
include/configs/vpac270.h line 43
Quoted 8 lines
include/configs/vpac270.h +1
-1@@ -37,7 +37,7 @@* Environment settings */ #define CONFIG_ENV_SIZE (4 * 1024) -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 196*1024)#define CONFIG_SYS_GBL_DATA_SIZE 128#define CONFIG_BOOTCOMMAND
\
PATCH 8/11 arm/pxa: increase CONFIG_SYS_MALLOC_LEN to (196Kb + space for environment)
Dear Marek Vasut,
Quoted 11 lines · In message <[email protected]> you wrote:
Dne Ct 26. srpna 2010 12:48:03 Mikhail Kshevetskiy napsal(a):
Quoted 7 lines
it looks like u-boot allocates a buffer of
CONFIG_ENV_SECT_SIZEsize when making "saveenv" command. In our caseCONFIG_ENV_SECT_SIZEis 128Kb, so havingCONFIG_SYS_MALLOC_LEN= (128Kb + space for environment) is not sufficient.Increase
CONFIG_SYS_MALLOC_LENto (196Kb + space for environment) to resolve a problem.You probably hit this because you changed the ENV size. Wolfgang, can you p> lease comment on this one too?
The space needed for malloc() depends on many things. Most systems have sufficient RAM these days, so it makes little sense to be stingy here.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Old programmers never die, they just branch to a new address.