update SMDK2410 port
PATCH 1/1 update SMDK2410 port
Hello
This patch brings the SMDK2410 port in sync with the latest U-Boot version by doing the following:
- do the necessary adjustments to support the ARM relocation feature
- use the CFI flash driver (and removing the old one)
Dave
board/samsung/smdk2410/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := smdk2410.o flash.o +COBJS := smdk2410.o SOBJS := lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/samsung/smdk2410/config.mk +3 -11
@@ -8,18 +8,10 @@ # see http://www.samsung.com/ for more information on SAMSUNG # -# -# SMDK2410 has 1 bank of 64 MB DRAM -# -# 3000'0000 to 3400'0000 -# # Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -# optionally with a ramdisk at 3080'0000 +# optionally with a ramdisk at 3040'0000 # -# we load ourself to 33F8'0000 +# NOR flash is mapped at address 0 # -# download area is 3300'0000 -# - -CONFIG_SYS_TEXT_BASE = 0x33F80000 +CONFIG_SYS_TEXT_BASE = 0x0
board/samsung/smdk2410/flash.c deleted +0 -433
433 lines not on this page · raw message
board/samsung/smdk2410/smdk2410.c +46 -27
124 lines not on this page · raw message
include/configs/smdk2410.h +115 -60
248 lines not on this page · raw message
PATCH v2 1/1 update SMDK2410 port
This patch brings the SMDK2410 port in sync with the latest U-Boot version by doing the following:
- do the necessary adjustments to support the ARM relocation feature
- use the CFI flash driver (and removing the old one)
- remove the unneeded config.mk file
board/samsung/smdk2410/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := smdk2410.o flash.o +COBJS := smdk2410.o SOBJS := lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/samsung/smdk2410/config.mk deleted +0 -25
@@ -1,25 +0,0 @@ -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# David Mueller, ELSOFT AG, <[email protected]> -# -# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -# -# see http://www.samsung.com/ for more information on SAMSUNG -# - -# -# SMDK2410 has 1 bank of 64 MB DRAM -# -# 3000'0000 to 3400'0000 -# -# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -# optionally with a ramdisk at 3080'0000 -# -# we load ourself to 33F8'0000 -# -# download area is 3300'0000 -# - - -CONFIG_SYS_TEXT_BASE = 0x33F80000
board/samsung/smdk2410/flash.c deleted +0 -433
433 lines not on this page · raw message
board/samsung/smdk2410/smdk2410.c +46 -27
124 lines not on this page · raw message
include/configs/smdk2410.h +117 -60
250 lines not on this page · raw message
PATCH v2 1/1 update SMDK2410 port
Dear =?UTF-8?q?David=20M=C3=BCller?=,
board/samsung/smdk2410/Makefile
Quoted 15 lines · In message <[email protected]> you wrote:
--===============0819632582==
This patch brings the SMDK2410 port in sync with the latest U-Boot version by doing the following:
- do the necessary adjustments to support the ARM relocation feature
- use the CFI flash driver (and removing the old one)
- remove the unneeded config.mk fileSigned-off-by David M??ller <[email protected]>board/samsung/smdk2410/Makefile +0
-0
NAK. I'm not going to review that. Please stick to the rules. When submitting a new version of the patch you are supposed to descibe what has been changed. For details please see
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
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 F u cn rd ths u cnt spl wrth a dm!
PATCH v3 1/1 update SMDK2410 port
In reply to David MüllerThis patch brings the SMDK2410 port in sync with the latest U-Boot version by doing the following:
- do the necessary adjustments to support the ARM relocation feature
- use the CFI flash driver (and removing the old one)
- remove the unneeded config.mk file
---
Changes for V2:
- deleted config.mk
Changes for V3:
- adjusted patch meta info
board/samsung/smdk2410/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := smdk2410.o flash.o +COBJS := smdk2410.o SOBJS := lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/samsung/smdk2410/config.mk deleted +0 -25
@@ -1,25 +0,0 @@ -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# David Mueller, ELSOFT AG, <[email protected]> -# -# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -# -# see http://www.samsung.com/ for more information on SAMSUNG -# - -# -# SMDK2410 has 1 bank of 64 MB DRAM -# -# 3000'0000 to 3400'0000 -# -# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -# optionally with a ramdisk at 3080'0000 -# -# we load ourself to 33F8'0000 -# -# download area is 3300'0000 -# - - -CONFIG_SYS_TEXT_BASE = 0x33F80000
board/samsung/smdk2410/flash.c deleted +0 -433
433 lines not on this page · raw message
board/samsung/smdk2410/smdk2410.c +46 -27
124 lines not on this page · raw message
include/configs/smdk2410.h +117 -60
250 lines not on this page · raw message
v4 cover update SMDK2410 port
In reply to David MüllerThis patch serie brings the SMDK2410 port in sync with the latest U-Boot version by doing the following:
- do the necessary adjustments to support the ARM relocation feature
- use the CFI flash driver (and removing the old one)
- remove the unneeded config.mk file
---
board/samsung/smdk2410/Makefile | 2 +- board/samsung/smdk2410/config.mk | 25 --- board/samsung/smdk2410/flash.c | 433 ------------------------------------- board/samsung/smdk2410/smdk2410.c | 73 ++++--- include/configs/smdk2410.h | 178 ++++++++++----- 5 files changed, 165 insertions(+), 546 deletions(-)
Changes for V2:
- deleted config.mk
Changes for V3:
- adjusted patch meta info
Changes for V4:
- split patch into smaller pieces
PATCH v4 1/4 activate ARM relocation feature
In reply to David Müller--- include/configs/smdk2410.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
include/configs/smdk2410.h +7 -0
@@ -179,4 +179,11 @@#define CONFIG_ENV_IS_IN_FLASH 1#define CONFIG_ENV_SIZE 0x10000/* Total Size of Environment Sector */ +/* additions for new relocation code, must be added to all boards */ +#undef CONFIG_SYS_ARM_WITHOUT_RELOC +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \ + GENERATED_GBL_DATA_SIZE) + +#endif /* __CONFIG_H */
Signature · 1 line
1.7.1
PATCH v4 2/4 remove unneeded config.mk
In reply to David Müller--- board/samsung/smdk2410/config.mk | 25 ------------------------- include/configs/smdk2410.h | 2 ++ 2 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 board/samsung/smdk2410/config.mk
board/samsung/smdk2410/config.mk deleted +0 -25
@@ -1,25 +0,0 @@ -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# David Mueller, ELSOFT AG, <[email protected]> -# -# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -# -# see http://www.samsung.com/ for more information on SAMSUNG -# - -# -# SMDK2410 has 1 bank of 64 MB DRAM -# -# 3000'0000 to 3400'0000 -# -# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -# optionally with a ramdisk at 3080'0000 -# -# we load ourself to 33F8'0000 -# -# download area is 3300'0000 -# - - -CONFIG_SYS_TEXT_BASE = 0x33F80000
include/configs/smdk2410.h +2 -0
@@ -38,6 +38,8 @@#define CONFIG_S3C2410 1/* specifically a SAMSUNG S3C2410 SoC */ #define CONFIG_SMDK2410 1/* on a SAMSUNG SMDK2410 Board */ +#define CONFIG_SYS_TEXT_BASE 0x0 +/* input clock of PLL */ #define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */
Signature · 1 line
1.7.1
PATCH v4 3/4 use the CFI driver (and remove the old one)
In reply to David Müller--- board/samsung/smdk2410/Makefile | 2 +- board/samsung/smdk2410/flash.c | 433 ------------------------------------- board/samsung/smdk2410/smdk2410.c | 12 + include/configs/smdk2410.h | 32 +-- 4 files changed, 25 insertions(+), 454 deletions(-) delete mode 100644 board/samsung/smdk2410/flash.c
board/samsung/smdk2410/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := smdk2410.o flash.o +COBJS := smdk2410.o SOBJS := lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/samsung/smdk2410/flash.c deleted +0 -433
433 lines not on this page · raw message
board/samsung/smdk2410/smdk2410.c +12 -0
@@ -134,3 +134,15 @@ int board_eth_init(bd_t *bis) return rc; }#endif + +/* +* Hardcoded flash setup: +* Flash 0 is a non-CFI AMD AM29LV800BB flash. +*/ +ulong board_flash_get_legacy (ulong base,int banknum,flash_info_t *info) +{ + info->portwidth =FLASH_CFI_16BIT ; + info->chipwidth =FLASH_CFI_BY16 ; + info->interface =FLASH_CFI_X16 ; +return 1 ; +}
include/configs/smdk2410.h +12 -20
@@ -151,36 +151,28 @@#define PHYS_FLASH_1 0x00000000/* Flash Bank #1 */ -#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 +#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1/*----------------------------------------------------------------------- * FLASH and environment organization */ -#define CONFIG_AMD_LV400 1/* uncomment this if you have a LV400 flash */ -#if 0 -#define CONFIG_AMD_LV800 1/* uncomment this if you have a LV800 flash */ -#endif +#define CONFIG_SYS_FLASH_CFI +#define CONFIG_FLASH_CFI_DRIVER +#define CONFIG_FLASH_CFI_LEGACY +#define CONFIG_SYS_FLASH_LEGACY_512Kx16 +#define CONFIG_FLASH_SHOW_PROGRESS 45 -#define CONFIG_SYS_MAX_FLASH_BANKS 1/* max number of memory banks */ -#ifdef CONFIG_AMD_LV800 -#define PHYS_FLASH_SIZE 0x00100000/* 1MB */ -#define CONFIG_SYS_MAX_FLASH_SECT (19)/* max number of sectors on one chip */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x0F0000)/* addr of environment */ -#endif -#ifdef CONFIG_AMD_LV400 -#define PHYS_FLASH_SIZE 0x00080000/* 512KB */ -#define CONFIG_SYS_MAX_FLASH_SECT (11)/* max number of sectors on one chip */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x070000)/* addr of environment */ -#endif - -/* timeout values are in ticks */ -#define CONFIG_SYS_FLASH_ERASE_TOUT (5*CONFIG_SYS_HZ)/* Timeout for Flash Erase */ -#define CONFIG_SYS_FLASH_WRITE_TOUT (5*CONFIG_SYS_HZ)/* Timeout for Flash Write */ +#define CONFIG_SYS_MAX_FLASH_BANKS 1 +#define CONFIG_SYS_MAX_FLASH_SECT (19) +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x070000)#define CONFIG_ENV_IS_IN_FLASH 1#define CONFIG_ENV_SIZE 0x10000/* Total Size of Environment Sector */ +#define CONFIG_SYS_MONITOR_LEN (448 * 1024) +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE +/* additions for new relocation code, must be added to all boards */ #undef CONFIG_SYS_ARM_WITHOUT_RELOC#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
Signature · 1 line
1.7.1
PATCH v4 4/4 various cleanups/code style fixes
In reply to David Müller--- board/samsung/smdk2410/smdk2410.c | 61 +++++++++------- include/configs/smdk2410.h | 141 ++++++++++++++++++++++++++----------- 2 files changed, 133 insertions(+), 69 deletions(-)
board/samsung/smdk2410/smdk2410.c +34 -27
@@ -3,7 +3,7 @@* Sysgo Real-Time Solutions, GmbH <www.elinos.com> * Marius Groeger <[email protected]> * -* (C) Copyright 2002 +* (C) Copyright 2002, 2010 * David Mueller, ELSOFT AG, <[email protected]> * * See file CREDITS for list of people who contributed to this
@@ -27,6 +27,7 @@#include <common.h> #include <netdev.h> +#include <asm/io.h> #include <asm/arch/s3c24x0_cpu.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -55,7 +56,7 @@ DECLARE_GLOBAL_DATA_PTR;#define U_M_SDIV 0x2#endif -static inline void delay (unsigned long loops) +static inline void pll_delay (unsigned long loops) { __asm__volatile ("1:\n" "subs %0, %1, #1\n"
@@ -66,44 +67,51 @@ static inline void delay (unsigned long loops)* Miscellaneous platform dependent initialisations */ -int board_init (void ) +int board_early_init_f (void ) {struct s3c24x0_clock_power *const clk_power =s3c24x0_get_base_clock_power ();struct s3c24x0_gpio *const gpio =s3c24x0_get_base_gpio ();/* to reduce PLL lock time, adjust the LOCKTIME register */ - clk_power->locktime =0xFFFFFF ; +writel (0xFFFFFF , &clk_power->locktime);/* configure MPLL */ - clk_power->mpllcon = ((M_MDIV <<12 ) + (M_PDIV <<4 ) +M_SDIV ); +writel ((M_MDIV <<12 ) + (M_PDIV <<4 ) +M_SDIV , + &clk_power->mpllcon);/* some delay between MPLL and UPLL */ -delay (4000 ); +pll_delay (4000 );/* configure UPLL */ - clk_power->upllcon = ((U_M_MDIV <<12 ) + (U_M_PDIV <<4 ) +U_M_SDIV ); +writel ((U_M_MDIV <<12 ) + (U_M_PDIV <<4 ) +U_M_SDIV , + &clk_power->upllcon);/* some delay between MPLL and UPLL */ -delay (8000 ); +pll_delay (8000 );/* set up the I/O ports */ - gpio->gpacon =0x007FFFFF ; - gpio->gpbcon =0x00044555 ; - gpio->gpbup =0x000007FF ; - gpio->gpccon =0xAAAAAAAA ; - gpio->gpcup =0x0000FFFF ; - gpio->gpdcon =0xAAAAAAAA ; - gpio->gpdup =0x0000FFFF ; - gpio->gpecon =0xAAAAAAAA ; - gpio->gpeup =0x0000FFFF ; - gpio->gpfcon =0x000055AA ; - gpio->gpfup =0x000000FF ; - gpio->gpgcon =0xFF95FFBA ; - gpio->gpgup =0x0000FFFF ; - gpio->gphcon =0x002AFAAA ; - gpio->gphup =0x000007FF ; +writel (0x007FFFFF , &gpio->gpacon); +writel (0x00044555 , &gpio->gpbcon); +writel (0x000007FF , &gpio->gpbup); +writel (0xAAAAAAAA , &gpio->gpccon); +writel (0x0000FFFF , &gpio->gpcup); +writel (0xAAAAAAAA , &gpio->gpdcon); +writel (0x0000FFFF , &gpio->gpdup); +writel (0xAAAAAAAA , &gpio->gpecon); +writel (0x0000FFFF , &gpio->gpeup); +writel (0x000055AA , &gpio->gpfcon); +writel (0x000000FF , &gpio->gpfup); +writel (0xFF95FFBA , &gpio->gpgcon); +writel (0x0000FFFF , &gpio->gpgup); +writel (0x002AFAAA , &gpio->gphcon); +writel (0x000007FF , &gpio->gphup); + +return 0 ; +} +int board_init (void ) +{/* arch number of SMDK2410-Board */ gd->bd->bi_arch_number =MACH_TYPE_SMDK2410 ;
@@ -116,11 +124,10 @@ int board_init (void)return 0 ; } -int dram_init (void ) +int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; - +/* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size =PHYS_SDRAM_1_SIZE ;return 0 ; }
include/configs/smdk2410.h +99 -42
225 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v4 4/4 various cleanups/code style fixes
Hi David,
It'd be good to include "smdk2410" in this patch titles, eg "smdk2410:
Various cleanups/code style fixes". or "arm: smdk2410: Various..."
Without the prefix, its unclear what code these patches affect, and somewhat implies you are changing common code.
<snip>
include/configs/smdk2410.h line 79
Quoted 2 lines
include/configs/smdk2410.h +1
-1-#define CONFIG_RTC_S3C24X0 1 +#define CONFIG_RTC_S3C24X0
Looks like there are a number of tabs in odd locations, it'd be nice to clean those up while you're modifying this file.
Best,
Peter
v5 cover update SMDK2410 port
In reply to David MüllerThis patch serie brings the SMDK2410 port in sync with the latest U-Boot version by doing the following:
- do the necessary adjustments to support the ARM relocation feature
- use the CFI flash driver (and removing the old one)
- remove the unneeded config.mk file
---
board/samsung/smdk2410/Makefile | 2 +- board/samsung/smdk2410/config.mk | 25 --- board/samsung/smdk2410/flash.c | 433 ------------------------------------- board/samsung/smdk2410/smdk2410.c | 73 ++++--- include/configs/smdk2410.h | 182 ++++++++++------ 5 files changed, 167 insertions(+), 548 deletions(-)
Changes for V2:
- deleted config.mk
Changes for V3:
- adjusted patch meta info
Changes for V4:
- split patch into smaller pieces
Changes for V5:
- prefix patches with SMDK2410
- additional tabulator clenup in smdk2410.h
PATCH v5 1/4 SMDK2410: activate ARM relocation feature
In reply to David Müller--- include/configs/smdk2410.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
include/configs/smdk2410.h +7 -0
@@ -179,4 +179,11 @@#define CONFIG_ENV_IS_IN_FLASH 1#define CONFIG_ENV_SIZE 0x10000/* Total Size of Environment Sector */ +/* additions for new relocation code, must be added to all boards */ +#undef CONFIG_SYS_ARM_WITHOUT_RELOC +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \ + GENERATED_GBL_DATA_SIZE) + +#endif /* __CONFIG_H */
Signature · 1 line
1.7.1
PATCH v5 1/4 SMDK2410: activate ARM relocation feature
Dear David M?ller,
Quoted 14 lines · David M?ller
Signed-off-by David M?ller <[email protected]>---
?include/configs/smdk2410.h | ? ?7 +++++++
?1 files changed, 7 insertions(+), 0 deletions(-)include/configs/smdk2410.h +0
-0@@ -179,4 +179,11 @@?#define ? ? ? ?CONFIG_ENV_IS_IN_FLASH ?1
?#defineCONFIG_ENV_SIZE? ? ? ? ? ? ? ?0x10000 /* Total Size of Environment Sector */
include/configs/smdk2410.h line 183
Quoted 2 lines
include/configs/smdk2410.h +2
-0+/* additions for new relocation code, must be added to all boards */ +#undef CONFIG_SYS_ARM_WITHOUT_RELOC
Please remove this define.
Quoted 6 lines
include/configs/smdk2410.h +5
-0+#define CONFIG_SYS_SDRAM_BASE ?PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR ? ? ? ?(CONFIG_SYS_SDRAM_BASE + 0x1000 - \ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? GENERATED_GBL_DATA_SIZE) + +?#endif /*
__CONFIG_H*/
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 1/4 SMDK2410: activate ARM relocation feature
Quoted 8 lines · Minkyu Kang
include/configs/smdk2410.h line 183
Quoted 2 lines
include/configs/smdk2410.h +2
-0+/* additions for new relocation code, must be added to all boards */ +#undef CONFIG_SYS_ARM_WITHOUT_RELOCPlease remove this define.
include/configs/smdk2410.h line 186
Quoted 3 lines
include/configs/smdk2410.h +3
-0+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \ + GENERATED_GBL_DATA_SIZE)
You are talking about the "#undef", right?
Dave
PATCH v5 1/4 SMDK2410: activate ARM relocation feature
Dear David M?ller,
Quoted 11 lines · David M?ller (ELSOFT AG)
Quoted 8 lines · Minkyu Kang
include/configs/smdk2410.h line 183
Quoted 2 lines
include/configs/smdk2410.h +2
-0+/* additions for new relocation code, must be added to all boards */ +#undef CONFIG_SYS_ARM_WITHOUT_RELOCPlease remove this define.
Review
Quoted 3 lines
(quoted diff) +3
-0+#define CONFIG_SYS_SDRAM_BASE ?PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR ? ? ? ?(CONFIG_SYS_SDRAM_BASE + 0x1000 - \ + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? GENERATED_GBL_DATA_SIZE)You are talking about the "#undef", right?
Right. :)
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 1/4 SMDK2410: activate ARM relocation feature
Quoted 3 lines · Minkyu Kang
Quoted 1 line
You are talking about the "#undef", right?
Right. :)
Ok, will be done.
Dave
PATCH v5 2/4 SMDK2410: remove unneeded config.mk
In reply to David Müller--- board/samsung/smdk2410/config.mk | 25 ------------------------- include/configs/smdk2410.h | 2 ++ 2 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 board/samsung/smdk2410/config.mk
board/samsung/smdk2410/config.mk deleted +0 -25
@@ -1,25 +0,0 @@ -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# David Mueller, ELSOFT AG, <[email protected]> -# -# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -# -# see http://www.samsung.com/ for more information on SAMSUNG -# - -# -# SMDK2410 has 1 bank of 64 MB DRAM -# -# 3000'0000 to 3400'0000 -# -# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -# optionally with a ramdisk at 3080'0000 -# -# we load ourself to 33F8'0000 -# -# download area is 3300'0000 -# - - -CONFIG_SYS_TEXT_BASE = 0x33F80000
include/configs/smdk2410.h +2 -0
@@ -38,6 +38,8 @@#define CONFIG_S3C2410 1/* specifically a SAMSUNG S3C2410 SoC */ #define CONFIG_SMDK2410 1/* on a SAMSUNG SMDK2410 Board */ +#define CONFIG_SYS_TEXT_BASE 0x0 +/* input clock of PLL */ #define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */
Signature · 1 line
1.7.1
PATCH v5 2/4 SMDK2410: remove unneeded config.mk
Dear David M?ller,
Quoted 10 lines · David M?ller
board/samsung/smdk2410/config.mk deleted +0
-1-CONFIG_SYS_TEXT_BASE = 0x33F80000include/configs/smdk2410.h +0
-0@@ -38,6 +38,8 @@?#define
CONFIG_S3C24101 ? ? ? /* specifically a SAMSUNG S3C2410 SoC ? */ ?#defineCONFIG_SMDK2410? ? ? ?1 ? ? ? /* on a SAMSUNG SMDK2410 Board ?*/+#define
CONFIG_SYS_TEXT_BASE?0x0
Zero is right? Maybe 0x33F80000?
Quoted 4 lines
+
?/* input clock of PLL */
?#defineCONFIG_SYS_CLK_FREQ? ?12000000/* the SMDK2410 has 12MHz input clock */
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 2/4 SMDK2410: remove unneeded config.mk
Quoted 3 lines · Minkyu Kang
Quoted 1 line
+#define
CONFIG_SYS_TEXT_BASE0x0Zero is right? Maybe
0x33F80000?
IMHO "Zero" should be correct with activated ARM reloc.
Dave
PATCH v5 2/4 SMDK2410: remove unneeded config.mk
Dear David M?ller,
Quoted 7 lines · David M?ller (ELSOFT AG)
Quoted 3 lines · Minkyu Kang
Quoted 1 line
+#define
CONFIG_SYS_TEXT_BASE?0x0Zero is right? Maybe
0x33F80000?IMHO "Zero" should be correct with activated ARM reloc.
Sorry but I can't understand.
Why?
Please let me know.
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 2/4 SMDK2410: remove unneeded config.mk
Quoted 5 lines · Minkyu Kang
Quoted 1 line
IMHO "Zero" should be correct with activated ARM reloc.
Sorry but I can't understand.
Why?
Please let me know.
Excerpt from doc/README.arm-relocation:
maybe adapt CONFIG_SYS_TEXT_BASE (this must be checked from board maintainers)
This *must* be done for boards, which boot from NOR flash
The SMDK2410 is booting from NOR flash (at least it is currently configured that way) and flash is mapped at address 0.
Dave
PATCH v5 2/4 SMDK2410: remove unneeded config.mk
Dear David M?ller,
Quoted 9 lines · David M?ller (ELSOFT AG)
Quoted 5 lines · Minkyu Kang
Quoted 1 line
IMHO "Zero" should be correct with activated ARM reloc.
Sorry but I can't understand.
Why?
Please let me know.Excerpt from doc/README.arm-relocation:
Quoted 8 lines
maybe adapt
CONFIG_SYS_TEXT_BASE(this must be checked from board maintainers)
This *must* be done for boards, which boot from NOR flashThe SMDK2410 is booting from NOR flash (at least it is currently configured that way) and flash is mapped at address 0.
OK,
Please post next patch.
Minkyu Kang.
Thanks.
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 3/4 SMDK2410: use the CFI driver (and remove the old one)
In reply to David Müller--- board/samsung/smdk2410/Makefile | 2 +- board/samsung/smdk2410/flash.c | 433 ------------------------------------- board/samsung/smdk2410/smdk2410.c | 12 + include/configs/smdk2410.h | 32 +-- 4 files changed, 25 insertions(+), 454 deletions(-) delete mode 100644 board/samsung/smdk2410/flash.c
board/samsung/smdk2410/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := smdk2410.o flash.o +COBJS := smdk2410.o SOBJS := lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/samsung/smdk2410/flash.c deleted +0 -433
433 lines not on this page · raw message
board/samsung/smdk2410/smdk2410.c +12 -0
@@ -134,3 +134,15 @@ int board_eth_init(bd_t *bis) return rc; }#endif + +/* +* Hardcoded flash setup: +* Flash 0 is a non-CFI AMD AM29LV800BB flash. +*/ +ulong board_flash_get_legacy (ulong base,int banknum,flash_info_t *info) +{ + info->portwidth =FLASH_CFI_16BIT ; + info->chipwidth =FLASH_CFI_BY16 ; + info->interface =FLASH_CFI_X16 ; +return 1 ; +}
include/configs/smdk2410.h +12 -20
@@ -151,36 +151,28 @@#define PHYS_FLASH_1 0x00000000/* Flash Bank #1 */ -#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 +#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1/*----------------------------------------------------------------------- * FLASH and environment organization */ -#define CONFIG_AMD_LV400 1/* uncomment this if you have a LV400 flash */ -#if 0 -#define CONFIG_AMD_LV800 1/* uncomment this if you have a LV800 flash */ -#endif +#define CONFIG_SYS_FLASH_CFI +#define CONFIG_FLASH_CFI_DRIVER +#define CONFIG_FLASH_CFI_LEGACY +#define CONFIG_SYS_FLASH_LEGACY_512Kx16 +#define CONFIG_FLASH_SHOW_PROGRESS 45 -#define CONFIG_SYS_MAX_FLASH_BANKS 1/* max number of memory banks */ -#ifdef CONFIG_AMD_LV800 -#define PHYS_FLASH_SIZE 0x00100000/* 1MB */ -#define CONFIG_SYS_MAX_FLASH_SECT (19)/* max number of sectors on one chip */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x0F0000)/* addr of environment */ -#endif -#ifdef CONFIG_AMD_LV400 -#define PHYS_FLASH_SIZE 0x00080000/* 512KB */ -#define CONFIG_SYS_MAX_FLASH_SECT (11)/* max number of sectors on one chip */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x070000)/* addr of environment */ -#endif - -/* timeout values are in ticks */ -#define CONFIG_SYS_FLASH_ERASE_TOUT (5*CONFIG_SYS_HZ)/* Timeout for Flash Erase */ -#define CONFIG_SYS_FLASH_WRITE_TOUT (5*CONFIG_SYS_HZ)/* Timeout for Flash Write */ +#define CONFIG_SYS_MAX_FLASH_BANKS 1 +#define CONFIG_SYS_MAX_FLASH_SECT (19) +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x070000)#define CONFIG_ENV_IS_IN_FLASH 1#define CONFIG_ENV_SIZE 0x10000/* Total Size of Environment Sector */ +#define CONFIG_SYS_MONITOR_LEN (448 * 1024) +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE +/* additions for new relocation code, must be added to all boards */ #undef CONFIG_SYS_ARM_WITHOUT_RELOC#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
Signature · 1 line
1.7.1
PATCH v5 4/4 SMDK2410: various cleanups/code style fixes
In reply to David Müller--- board/samsung/smdk2410/smdk2410.c | 61 +++++++++------- include/configs/smdk2410.h | 145 ++++++++++++++++++++++++++----------- 2 files changed, 135 insertions(+), 71 deletions(-)
board/samsung/smdk2410/smdk2410.c +34 -27
@@ -3,7 +3,7 @@* Sysgo Real-Time Solutions, GmbH <www.elinos.com> * Marius Groeger <[email protected]> * -* (C) Copyright 2002 +* (C) Copyright 2002, 2010 * David Mueller, ELSOFT AG, <[email protected]> * * See file CREDITS for list of people who contributed to this
@@ -27,6 +27,7 @@#include <common.h> #include <netdev.h> +#include <asm/io.h> #include <asm/arch/s3c24x0_cpu.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -55,7 +56,7 @@ DECLARE_GLOBAL_DATA_PTR;#define U_M_SDIV 0x2#endif -static inline void delay (unsigned long loops) +static inline void pll_delay (unsigned long loops) { __asm__volatile ("1:\n" "subs %0, %1, #1\n"
@@ -66,44 +67,51 @@ static inline void delay (unsigned long loops)* Miscellaneous platform dependent initialisations */ -int board_init (void ) +int board_early_init_f (void ) {struct s3c24x0_clock_power *const clk_power =s3c24x0_get_base_clock_power ();struct s3c24x0_gpio *const gpio =s3c24x0_get_base_gpio ();/* to reduce PLL lock time, adjust the LOCKTIME register */ - clk_power->locktime =0xFFFFFF ; +writel (0xFFFFFF , &clk_power->locktime);/* configure MPLL */ - clk_power->mpllcon = ((M_MDIV <<12 ) + (M_PDIV <<4 ) +M_SDIV ); +writel ((M_MDIV <<12 ) + (M_PDIV <<4 ) +M_SDIV , + &clk_power->mpllcon);/* some delay between MPLL and UPLL */ -delay (4000 ); +pll_delay (4000 );/* configure UPLL */ - clk_power->upllcon = ((U_M_MDIV <<12 ) + (U_M_PDIV <<4 ) +U_M_SDIV ); +writel ((U_M_MDIV <<12 ) + (U_M_PDIV <<4 ) +U_M_SDIV , + &clk_power->upllcon);/* some delay between MPLL and UPLL */ -delay (8000 ); +pll_delay (8000 );/* set up the I/O ports */ - gpio->gpacon =0x007FFFFF ; - gpio->gpbcon =0x00044555 ; - gpio->gpbup =0x000007FF ; - gpio->gpccon =0xAAAAAAAA ; - gpio->gpcup =0x0000FFFF ; - gpio->gpdcon =0xAAAAAAAA ; - gpio->gpdup =0x0000FFFF ; - gpio->gpecon =0xAAAAAAAA ; - gpio->gpeup =0x0000FFFF ; - gpio->gpfcon =0x000055AA ; - gpio->gpfup =0x000000FF ; - gpio->gpgcon =0xFF95FFBA ; - gpio->gpgup =0x0000FFFF ; - gpio->gphcon =0x002AFAAA ; - gpio->gphup =0x000007FF ; +writel (0x007FFFFF , &gpio->gpacon); +writel (0x00044555 , &gpio->gpbcon); +writel (0x000007FF , &gpio->gpbup); +writel (0xAAAAAAAA , &gpio->gpccon); +writel (0x0000FFFF , &gpio->gpcup); +writel (0xAAAAAAAA , &gpio->gpdcon); +writel (0x0000FFFF , &gpio->gpdup); +writel (0xAAAAAAAA , &gpio->gpecon); +writel (0x0000FFFF , &gpio->gpeup); +writel (0x000055AA , &gpio->gpfcon); +writel (0x000000FF , &gpio->gpfup); +writel (0xFF95FFBA , &gpio->gpgcon); +writel (0x0000FFFF , &gpio->gpgup); +writel (0x002AFAAA , &gpio->gphcon); +writel (0x000007FF , &gpio->gphup); + +return 0 ; +} +int board_init (void ) +{/* arch number of SMDK2410-Board */ gd->bd->bi_arch_number =MACH_TYPE_SMDK2410 ;
@@ -116,11 +124,10 @@ int board_init (void)return 0 ; } -int dram_init (void ) +int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; - +/* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size =PHYS_SDRAM_1_SIZE ;return 0 ; }
include/configs/smdk2410.h +101 -44
227 lines not on this page · raw message
Signature · 1 line
1.7.1
v6 cover update SMDK2410 port
In reply to David MüllerThis patch serie brings the SMDK2410 port in sync with the latest U-Boot version by doing the following:
- do the necessary adjustments to support the ARM relocation feature
- use the CFI flash driver (and removing the old one)
- remove the unneeded config.mk file
- various cleanups/code style fixes
---
board/samsung/smdk2410/Makefile | 2 +- board/samsung/smdk2410/config.mk | 25 --- board/samsung/smdk2410/flash.c | 433 ------------------------------------- board/samsung/smdk2410/smdk2410.c | 73 ++++--- include/configs/smdk2410.h | 181 ++++++++++------ 5 files changed, 166 insertions(+), 548 deletions(-)
Changes for V2:
- deleted config.mk
Changes for V3:
- adjusted patch meta info
Changes for V4:
- split patch into smaller pieces
Changes for V5:
- prefix patches with SMDK2410
- additional tabulator cleanup in smdk2410.h
Changes for V6:
- remove unneeded #undef CONFIG_SYS_ARM_WITHOUT_RELOC in smdk2410.h
PATCH v6 1/4 SMDK2410: activate ARM relocation feature
In reply to David Müller--- include/configs/smdk2410.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
include/configs/smdk2410.h +6 -0
@@ -179,4 +179,10 @@#define CONFIG_ENV_IS_IN_FLASH 1#define CONFIG_ENV_SIZE 0x10000/* Total Size of Environment Sector */ +/* additions for new relocation code, must be added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \ + GENERATED_GBL_DATA_SIZE) + +#endif /* __CONFIG_H */
Signature · 1 line
1.7.1
PATCH v6 1/4 SMDK2410: activate ARM relocation feature
Quoted 6 lines · David M?ller
Signed-off-by David M?ller <[email protected]>---
?include/configs/smdk2410.h | ? ?6 ++++++
?1 files changed, 6 insertions(+), 0 deletions(-)
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v6 2/4 SMDK2410: remove unneeded config.mk
In reply to David Müller--- board/samsung/smdk2410/config.mk | 25 ------------------------- include/configs/smdk2410.h | 2 ++ 2 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 board/samsung/smdk2410/config.mk
board/samsung/smdk2410/config.mk deleted +0 -25
@@ -1,25 +0,0 @@ -# -# (C) Copyright 2002 -# Gary Jennejohn, DENX Software Engineering, <[email protected]> -# David Mueller, ELSOFT AG, <[email protected]> -# -# SAMSUNG SMDK2410 board with S3C2410X (ARM920T) cpu -# -# see http://www.samsung.com/ for more information on SAMSUNG -# - -# -# SMDK2410 has 1 bank of 64 MB DRAM -# -# 3000'0000 to 3400'0000 -# -# Linux-Kernel is expected to be at 3000'8000, entry 3000'8000 -# optionally with a ramdisk at 3080'0000 -# -# we load ourself to 33F8'0000 -# -# download area is 3300'0000 -# - - -CONFIG_SYS_TEXT_BASE = 0x33F80000
include/configs/smdk2410.h +2 -0
@@ -38,6 +38,8 @@#define CONFIG_S3C2410 1/* specifically a SAMSUNG S3C2410 SoC */ #define CONFIG_SMDK2410 1/* on a SAMSUNG SMDK2410 Board */ +#define CONFIG_SYS_TEXT_BASE 0x0 +/* input clock of PLL */ #define CONFIG_SYS_CLK_FREQ 12000000/* the SMDK2410 has 12MHz input clock */
Signature · 1 line
1.7.1
PATCH v6 2/4 SMDK2410: remove unneeded config.mk
Quoted 8 lines · David M?ller
Signed-off-by David M?ller <[email protected]>---
?board/samsung/smdk2410/config.mk | ? 25 ------------------------- ?include/configs/smdk2410.h ? ? ? | ? ?2 ++
?2 files changed, 2 insertions(+), 25 deletions(-) ?delete mode 100644board/samsung/smdk2410/config.mk
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v6 3/4 SMDK2410: use the CFI driver (and remove the old one)
In reply to David Müller--- board/samsung/smdk2410/Makefile | 2 +- board/samsung/smdk2410/flash.c | 433 ------------------------------------- board/samsung/smdk2410/smdk2410.c | 12 + include/configs/smdk2410.h | 32 +-- 4 files changed, 25 insertions(+), 454 deletions(-) delete mode 100644 board/samsung/smdk2410/flash.c
board/samsung/smdk2410/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := smdk2410.o flash.o +COBJS := smdk2410.o SOBJS := lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/samsung/smdk2410/flash.c deleted +0 -433
433 lines not on this page · raw message
board/samsung/smdk2410/smdk2410.c +12 -0
@@ -134,3 +134,15 @@ int board_eth_init(bd_t *bis) return rc; }#endif + +/* +* Hardcoded flash setup: +* Flash 0 is a non-CFI AMD AM29LV800BB flash. +*/ +ulong board_flash_get_legacy (ulong base,int banknum,flash_info_t *info) +{ + info->portwidth =FLASH_CFI_16BIT ; + info->chipwidth =FLASH_CFI_BY16 ; + info->interface =FLASH_CFI_X16 ; +return 1 ; +}
include/configs/smdk2410.h +12 -20
@@ -151,36 +151,28 @@#define PHYS_FLASH_1 0x00000000/* Flash Bank #1 */ -#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1 +#define CONFIG_SYS_FLASH_BASE PHYS_FLASH_1/*----------------------------------------------------------------------- * FLASH and environment organization */ -#define CONFIG_AMD_LV400 1/* uncomment this if you have a LV400 flash */ -#if 0 -#define CONFIG_AMD_LV800 1/* uncomment this if you have a LV800 flash */ -#endif +#define CONFIG_SYS_FLASH_CFI +#define CONFIG_FLASH_CFI_DRIVER +#define CONFIG_FLASH_CFI_LEGACY +#define CONFIG_SYS_FLASH_LEGACY_512Kx16 +#define CONFIG_FLASH_SHOW_PROGRESS 45 -#define CONFIG_SYS_MAX_FLASH_BANKS 1/* max number of memory banks */ -#ifdef CONFIG_AMD_LV800 -#define PHYS_FLASH_SIZE 0x00100000/* 1MB */ -#define CONFIG_SYS_MAX_FLASH_SECT (19)/* max number of sectors on one chip */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x0F0000)/* addr of environment */ -#endif -#ifdef CONFIG_AMD_LV400 -#define PHYS_FLASH_SIZE 0x00080000/* 512KB */ -#define CONFIG_SYS_MAX_FLASH_SECT (11)/* max number of sectors on one chip */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x070000)/* addr of environment */ -#endif - -/* timeout values are in ticks */ -#define CONFIG_SYS_FLASH_ERASE_TOUT (5*CONFIG_SYS_HZ)/* Timeout for Flash Erase */ -#define CONFIG_SYS_FLASH_WRITE_TOUT (5*CONFIG_SYS_HZ)/* Timeout for Flash Write */ +#define CONFIG_SYS_MAX_FLASH_BANKS 1 +#define CONFIG_SYS_MAX_FLASH_SECT (19) +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x070000)#define CONFIG_ENV_IS_IN_FLASH 1#define CONFIG_ENV_SIZE 0x10000/* Total Size of Environment Sector */ +#define CONFIG_SYS_MONITOR_LEN (448 * 1024) +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE +/* additions for new relocation code, must be added to all boards */ #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - \
Signature · 1 line
1.7.1
PATCH v6 3/4 SMDK2410: use the CFI driver (and remove the old one)
Quoted 10 lines · David M?ller
Signed-off-by David M?ller <[email protected]>---
?board/samsung/smdk2410/Makefile ? | ? ?2 +- ?board/samsung/smdk2410/flash.c ? ?| ?433 ------------------------------------- ?board/samsung/smdk2410/smdk2410.c | ? 12 + ?include/configs/smdk2410.h ? ? ? ?| ? 32 +--?4 files changed, 25 insertions(+), 454 deletions(-) ?delete mode 100644
board/samsung/smdk2410/flash.c
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v6 4/4 SMDK2410: various cleanup/code style fixes
In reply to David Müller--- board/samsung/smdk2410/smdk2410.c | 61 +++++++++------- include/configs/smdk2410.h | 145 ++++++++++++++++++++++++++----------- 2 files changed, 135 insertions(+), 71 deletions(-)
board/samsung/smdk2410/smdk2410.c +34 -27
@@ -3,7 +3,7 @@* Sysgo Real-Time Solutions, GmbH <www.elinos.com> * Marius Groeger <[email protected]> * -* (C) Copyright 2002 +* (C) Copyright 2002, 2010 * David Mueller, ELSOFT AG, <[email protected]> * * See file CREDITS for list of people who contributed to this
@@ -27,6 +27,7 @@#include <common.h> #include <netdev.h> +#include <asm/io.h> #include <asm/arch/s3c24x0_cpu.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -55,7 +56,7 @@ DECLARE_GLOBAL_DATA_PTR;#define U_M_SDIV 0x2#endif -static inline void delay (unsigned long loops) +static inline void pll_delay (unsigned long loops) { __asm__volatile ("1:\n" "subs %0, %1, #1\n"
@@ -66,44 +67,51 @@ static inline void delay (unsigned long loops)* Miscellaneous platform dependent initialisations */ -int board_init (void ) +int board_early_init_f (void ) {struct s3c24x0_clock_power *const clk_power =s3c24x0_get_base_clock_power ();struct s3c24x0_gpio *const gpio =s3c24x0_get_base_gpio ();/* to reduce PLL lock time, adjust the LOCKTIME register */ - clk_power->locktime =0xFFFFFF ; +writel (0xFFFFFF , &clk_power->locktime);/* configure MPLL */ - clk_power->mpllcon = ((M_MDIV <<12 ) + (M_PDIV <<4 ) +M_SDIV ); +writel ((M_MDIV <<12 ) + (M_PDIV <<4 ) +M_SDIV , + &clk_power->mpllcon);/* some delay between MPLL and UPLL */ -delay (4000 ); +pll_delay (4000 );/* configure UPLL */ - clk_power->upllcon = ((U_M_MDIV <<12 ) + (U_M_PDIV <<4 ) +U_M_SDIV ); +writel ((U_M_MDIV <<12 ) + (U_M_PDIV <<4 ) +U_M_SDIV , + &clk_power->upllcon);/* some delay between MPLL and UPLL */ -delay (8000 ); +pll_delay (8000 );/* set up the I/O ports */ - gpio->gpacon =0x007FFFFF ; - gpio->gpbcon =0x00044555 ; - gpio->gpbup =0x000007FF ; - gpio->gpccon =0xAAAAAAAA ; - gpio->gpcup =0x0000FFFF ; - gpio->gpdcon =0xAAAAAAAA ; - gpio->gpdup =0x0000FFFF ; - gpio->gpecon =0xAAAAAAAA ; - gpio->gpeup =0x0000FFFF ; - gpio->gpfcon =0x000055AA ; - gpio->gpfup =0x000000FF ; - gpio->gpgcon =0xFF95FFBA ; - gpio->gpgup =0x0000FFFF ; - gpio->gphcon =0x002AFAAA ; - gpio->gphup =0x000007FF ; +writel (0x007FFFFF , &gpio->gpacon); +writel (0x00044555 , &gpio->gpbcon); +writel (0x000007FF , &gpio->gpbup); +writel (0xAAAAAAAA , &gpio->gpccon); +writel (0x0000FFFF , &gpio->gpcup); +writel (0xAAAAAAAA , &gpio->gpdcon); +writel (0x0000FFFF , &gpio->gpdup); +writel (0xAAAAAAAA , &gpio->gpecon); +writel (0x0000FFFF , &gpio->gpeup); +writel (0x000055AA , &gpio->gpfcon); +writel (0x000000FF , &gpio->gpfup); +writel (0xFF95FFBA , &gpio->gpgcon); +writel (0x0000FFFF , &gpio->gpgup); +writel (0x002AFAAA , &gpio->gphcon); +writel (0x000007FF , &gpio->gphup); + +return 0 ; +} +int board_init (void ) +{/* arch number of SMDK2410-Board */ gd->bd->bi_arch_number =MACH_TYPE_SMDK2410 ;
@@ -116,11 +124,10 @@ int board_init (void)return 0 ; } -int dram_init (void ) +int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; - +/* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size =PHYS_SDRAM_1_SIZE ;return 0 ; }
include/configs/smdk2410.h +101 -44
226 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v6 4/4 SMDK2410: various cleanup/code style fixes
Quoted 7 lines · David M?ller
Signed-off-by David M?ller <[email protected]>---
?board/samsung/smdk2410/smdk2410.c | ? 61 +++++++++------- ?include/configs/smdk2410.h ? ? ? ?| ?145 ++++++++++++++++++++++++++----------- ?2 files changed, 135 insertions(+), 71 deletions(-)
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net