[U-Boot] [PATCH] Add _end for the end of u-boot image for SMDK6400
From: seedshope bocui...@gmail.com Since we rename _end to __bss_end__, But we need add _end symbol for the end of u-boot image. Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/nand_spl/board/samsung/smdk6400/u-boot.lds b/nand_spl/board/samsung/smdk6400/u-boot.lds index 0153e0e..23c9913 100644 --- a/nand_spl/board/samsung/smdk6400/u-boot.lds +++ b/nand_spl/board/samsung/smdk6400/u-boot.lds @@ -67,6 +67,8 @@ SECTIONS *(.dynsym) } + _end = .; + .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; *(.bss) -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Add _end symbol in SMDK6410 link script
Since we rename _end to __bss_end (commit: 44c6e6591cb) So we have add the the end symbol of u-boot image. The patch fix SMDK6400 build error. the error information as foolowing: pat.o -L /usr/local/arm/4.3.1-eabi-armv6/usr/bin-ccache/../lib/gcc/arm-samsung-linux-gnueabi/4.3.1 -lgcc -Map u-boot.map -o u-boot arch/arm/cpu/arm1176/start.o: In function `_end_ofs': /home/seedshope/work/bootloader/u-boot/arch/arm/cpu/arm1176/start.S:61: undefined reference to `_end' make: *** [/home/seedshope/work/bootloader/u-boot_obj/smdk6400/u-boot] Error 1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Add _end for the end of u-boot image for SMDK6400
From: seedshope bocui...@gmail.com Since we rename _end to __bss_end__, But we need add _end symbol for the end of u-boot image. Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/nand_spl/board/samsung/smdk6400/u-boot.lds b/nand_spl/board/samsung/smdk6400/u-boot.lds index 0153e0e..23c9913 100644 --- a/nand_spl/board/samsung/smdk6400/u-boot.lds +++ b/nand_spl/board/samsung/smdk6400/u-boot.lds @@ -67,6 +67,8 @@ SECTIONS *(.dynsym) } + _end = .; + .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; *(.bss) -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
On 01/22/2011 03:31 PM, Albert ARIBAUD wrote: Hi seedshope, Le 22/01/2011 02:56, seedshope a écrit : My patch is ok, I just two tabs in my e-mail, But I sent the mail, It is change. Do you send the patch through git format-patch and git send-email? Yes, I use the git format-patch and git send-email Many e-mail softwares have weird issues when posting git patches, which is why git has its own tools for sending patches via e-mail. ok Since you're using git format-patch and git send-email, then your original change is not correctly aligned. I suggest you check your code editor's settings on indentation and use of tabulations, notably the tab size: tabs should align on 8-space multiples; also check that your editor uses a fixed font -- you never know. Hi Amicalement I check my patch 6 on the http://news.gmane.org/gmane.comp.boot-loaders.u-boot, It look fine. I have a bit despondent. Why do you think it has a format problem. Thanks seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
On 01/22/2011 01:52 AM, Sergei Shtylyov wrote: Hello. seedshope wrote: Since SDRAM init function have already change, So the SDRAM initial function must be change. This description sounds somewhat tautological... Signed-off-by: seedshope bocui...@gmail.com Your real name is required in the signoff. --- board/samsung/smdk6400/smdk6400.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..1d03b7a 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { + DECLARE_GLOBAL_DATA_PTR; + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); You can look at the web site(http://news.gmane.org/gmane.comp.boot-loaders.u-boot) for the patch, It is inconsistent with your description. Thanks seedshope Could you move this last line more to the right? WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] RR v5 PATCH: SMDK6400 Fix some build bug
Change from V1: patch 1: patch 2: Delete some compile information from commit. patch 3: Add LED modify information and Delete some compile information from commit. patch 4: Add new patch for SDRAM init. Change from v2: patch2: Modify Makefile for arch/arm/cpu/arm1176/s3c64xx/cpu_init.s in build error. It will generat redefine information for mem_ctrl_asm_init before the Modify. patch4: Modify the Sergei Shtylyov comments and change the SDRAM size variable for PHYS_SDRAM_SIZE_1. Change from v3: Add new patch 3: I discuss with Amicalement, I find the mutiple-link issue: The first, the cpu_init.o have already been link for cmd_link_o_target atfer compile. But, The link script re-link the point file. So the link machine will generate multiple definition error information. The second, Since the first 4kB of nand boot featue code move to nand_spl, So It is not necessary to force the cpu_init.o in non-nand boot. Delete the cpu_init.o from u-boot-nand.lds is safe. patch 4: patch 4 and patch 5 is split from v2 patch4. patch 6: Modify according Minkyu Kang comment Change from v4 1. Modify Signed-off-by for all the patch 2. Modify patch6 for the Sergei, Minkyu and Thomas comments. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v5 patch 1/6] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
Fix CONFIG_SYS_INIT_SP_ADDR undefined issue. Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h index 671f2c7..c9acf58 100644 --- a/include/configs/smdk6400.h +++ b/include/configs/smdk6400.h @@ -44,6 +44,11 @@ #define CONFIG_PERIPORT_BASE 0x7000 #define CONFIG_PERIPORT_SIZE 0x13 +#define CONFIG_SYS_IRAM_BASE0x0c00 /* Internal SRAM base address */ +#define CONFIG_SYS_IRAM_SIZE0x2000 /* 8 KB of internal SRAM memory */ +#define CONFIG_SYS_IRAM_END (CONFIG_SYS_IRAM_BASE + CONFIG_SYS_IRAM_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_IRAM_END - GENERATED_GBL_DATA_SIZE) + #define CONFIG_SYS_SDRAM_BASE 0x5000 /* input clock of PLL: SMDK6400 has 12MHz input clock */ -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v5 patch 2/6] SMDK6400: Fix some label undefined in build error
Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/board/samsung/smdk6400/u-boot-nand.lds b/board/samsung/smdk6400/u-boot-nand.lds index 29a4f61..6771981 100644 --- a/board/samsung/smdk6400/u-boot-nand.lds +++ b/board/samsung/smdk6400/u-boot-nand.lds @@ -56,7 +56,28 @@ SECTIONS .mmudata : { *(.mmudata) } . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } - _end = .; + + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { + __bss_start = .; + *(.bss) + . = ALIGN(4); + _end = .; + } + + /DISCARD/ : { *(.dynstr*) } + /DISCARD/ : { *(.dynamic*) } + /DISCARD/ : { *(.plt*) } + /DISCARD/ : { *(.interp*) } + /DISCARD/ : { *(.gnu*) } } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v5 patch 3/6] SMDK6400: Fix the mutiple link error
The first, the cpu_init.o have already been link for cmd_link_o_target atfer compile, But, The link script re-link the point file. So the link machine will generate multiple definition error information. The second, Since the first 4kB of nand boot featue code move to nand_spl, So It is not necessary to force the cpu_init.o in non-nand boot. Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/board/samsung/smdk6400/u-boot-nand.lds b/board/samsung/smdk6400/u-boot-nand.lds index 6771981..6bf4971 100644 --- a/board/samsung/smdk6400/u-boot-nand.lds +++ b/board/samsung/smdk6400/u-boot-nand.lds @@ -35,7 +35,6 @@ SECTIONS .text : { arch/arm/cpu/arm1176/start.o (.text) - arch/arm/cpu/arm1176/s3c64xx/cpu_init.o (.text) *(.text) } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v5 patch 4/6] SMDK6400: Add some labels to u-boot.lds to support nand_spl
In the nand_spl feature of SMDK6400. Add some relocation symbols to nand_spl/board/samsung/smdk6400/u-boot.lds to fix the compile error. Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/nand_spl/board/samsung/smdk6400/u-boot.lds b/nand_spl/board/samsung/smdk6400/u-boot.lds index 3ac6aa1..30b1573 100644 --- a/nand_spl/board/samsung/smdk6400/u-boot.lds +++ b/nand_spl/board/samsung/smdk6400/u-boot.lds @@ -55,7 +55,22 @@ SECTIONS __u_boot_cmd_end = .; . = ALIGN(4); + + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } + *(.bss) + . = ALIGN(4); _end = .; + } } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v5 patch 5/6] SMDK6400: Disable LED function in start.s on the nand booting
Since nand boot have some limit for the first 4KB, We only disable the LED function to reduce the code space. At the same time, Fix the compile error for LED function undefined in the compile time of nand_spl. Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..ae3706a 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -354,9 +354,11 @@ clbss_l:strr2, [r0]/* clear loop...*/ cmp r0, r1 bne clbss_l +#ifndef CONFIG_NAND_SPL bl coloured_LED_init bl red_LED_on #endif +#endif /* * We are done. Do not return, instead branch to second part of board -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v5 patch 6/6] SMDK6400: Fixup dram_init for relocation support
Signed-off-by: Zhong Hongbo bocui...@gmail.com diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..13c7ed5 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,16 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); return 0; } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
On 01/23/2011 04:28 AM, Albert ARIBAUD wrote: Hi seedshope, Le 22/01/2011 20:23, seedshope a écrit : Hi Amicalement That's Albert, actually. :) I check my patch 6 on the http://news.gmane.org/gmane.comp.boot-loaders.u-boot, It look fine. I have a bit despondent. Why do you think it has a format problem. V5 of your patch has one more tab on as V4 had on the line we're discussion. It is a bit better ; Sergei will tell if that's enough for him. yes, I just found the error in web site. I miss something in my thunderbird. such as tab convert space, So the format is change. Here, I beg you to forgot my miss. BR seedshope Thanks seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] v4 patch:SMDK6400: Fix some build bug
Change from V1: patch 1: patch 2: Delete some compile information from commit. patch 3: Add LED modify information and Delete some compile information from commit. patch 4: Add new patch for SDRAM init. Change from v2: patch2: Modify Makefile for arch/arm/cpu/arm1176/s3c64xx/cpu_init.s in build error. It will generat redefine information for mem_ctrl_asm_init before the Modify. patch4: Modify the Sergei Shtylyov comments and change the SDRAM size variable for PHYS_SDRAM_SIZE_1. Change from v3: Add new patch 3: I discuss with Amicalement, I find the mutiple-link issue: The first, the cpu_init.o have already been link for cmd_link_o_target atfer compile. But, The link script re-link the point file. So the link machine will generate multiple definition error information. The second, Since the first 4kB of nand boot featue code move to nand_spl, So It is not necessary to force the cpu_init.o in non-nand boot. Delete the cpu_init.o from u-boot-nand.lds is safe. patch 4: patch 4 and patch 5 is split from v2 patch4. patch 6: Modify according Minkyu Kang comment ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v4 patch 2/6] SMDK6400: Fix some label undefined in build error
Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshope bocui...@gmail.com --- board/samsung/smdk6400/u-boot-nand.lds | 27 --- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/board/samsung/smdk6400/u-boot-nand.lds b/board/samsung/smdk6400/u-boot-nand.lds index 29a4f61..6771981 100644 --- a/board/samsung/smdk6400/u-boot-nand.lds +++ b/board/samsung/smdk6400/u-boot-nand.lds @@ -56,7 +56,28 @@ SECTIONS .mmudata : { *(.mmudata) } . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } - _end = .; + + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { + __bss_start = .; + *(.bss) + . = ALIGN(4); + _end = .; + } + + /DISCARD/ : { *(.dynstr*) } + /DISCARD/ : { *(.dynamic*) } + /DISCARD/ : { *(.plt*) } + /DISCARD/ : { *(.interp*) } + /DISCARD/ : { *(.gnu*) } } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v4 patch 1/6] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
Fix CONFIG_SYS_INIT_SP_ADDR undefined issue. Signed-off-by: seedshope bocui...@gmail.com --- include/configs/smdk6400.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h index 671f2c7..c9acf58 100644 --- a/include/configs/smdk6400.h +++ b/include/configs/smdk6400.h @@ -44,6 +44,11 @@ #define CONFIG_PERIPORT_BASE 0x7000 #define CONFIG_PERIPORT_SIZE 0x13 +#define CONFIG_SYS_IRAM_BASE0x0c00 /* Internal SRAM base address */ +#define CONFIG_SYS_IRAM_SIZE0x2000 /* 8 KB of internal SRAM memory */ +#define CONFIG_SYS_IRAM_END (CONFIG_SYS_IRAM_BASE + CONFIG_SYS_IRAM_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_IRAM_END - GENERATED_GBL_DATA_SIZE) + #define CONFIG_SYS_SDRAM_BASE 0x5000 /* input clock of PLL: SMDK6400 has 12MHz input clock */ -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
Since SDRAM init function have already change, So the SDRAM initial function must be change. Signed-off-by: seedshope bocui...@gmail.com --- board/samsung/smdk6400/smdk6400.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..1d03b7a 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { + DECLARE_GLOBAL_DATA_PTR; + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); return 0; } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v4 patch 5/6] SMDK6400: Disable LED function in start.s on the nand booting
Since nand boot have some limit for the first 4KB, We only disable the LED function to reduce the code space. At the same time, Fix the compile error for LED function undefined in the compile time of nand_spl. Signed-off-by: seedshope bocui...@gmail.com --- arch/arm/cpu/arm1176/start.S |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..ae3706a 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -354,9 +354,11 @@ clbss_l:strr2, [r0]/* clear loop...*/ cmp r0, r1 bne clbss_l +#ifndef CONFIG_NAND_SPL bl coloured_LED_init bl red_LED_on #endif +#endif /* * We are done. Do not return, instead branch to second part of board -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 1/4] arm: Tegra2: Add basic NVIDIA Tegra2 SoC support
On 01/22/2011 12:08 AM, Tom Warren wrote: Minkyu, On Fri, Jan 21, 2011 at 1:16 AM, Minkyu Kangproms...@gmail.com wrote: Dear Tom Warren, On 21 January 2011 09:42, Tom Warrentwarren.nvi...@gmail.com wrote: diff --git a/arch/arm/cpu/armv7/tegra2/uart.c b/arch/arm/cpu/armv7/tegra2/uart.c new file mode 100644 index 000..5e60bd8 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/uart.c How about move it to drivers/serial/ ? Approve, you can use name in the drivers/serial. such as: serial_tegra2.c Thanks seedshope There's Tegra-specific code in there (clocks, PLLs and pinmuxes). And why don't you use serial multi interface? CONFIG_SERIAL_MULTI is enabled in the config files. Thanks Minkyu Kang Thank you, Tom -- from. prom. www.promsoft.net ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 1/4] arm: Tegra2: Add basic NVIDIA Tegra2 SoC support
defined(CONFIG_SERIAL2) .. #else .. #endif + reg = readl(pmt-pmt_ctl_c); + reg= 0xFFF0; /* IRRX_/IRTX_SEL [19:16] = 00 UARTA */ + writel(reg,pmt-pmt_ctl_c); + + reg = readl(pmt-pmt_tri_a); + reg= ~Z_IRRX; /* Z_IRRX = normal (0) */ + reg= ~Z_IRTX; /* Z_IRTX = normal (0) */ + writel(reg,pmt-pmt_tri_a); + } +#endif /* CONFIG_TEGRA2_ENABLE_UARTA */ +#if CONFIG_TEGRA2_ENABLE_UARTD + if (uart_num == UART_D) { + reg = readl(pmt-pmt_ctl_b); + reg= 0xFFF3; /* GMC_SEL [3:2] = 00, UARTD */ + writel(reg,pmt-pmt_ctl_b); + + reg = readl(pmt-pmt_tri_a); + reg= ~Z_GMC; /* Z_GMC = normal (0) */ + writel(reg,pmt-pmt_tri_a); + } +#endif /* CONFIG_TEGRA2_ENABLE_UARTD */ +} + +static void setup_uart(uart_ctlr *u) +{ + u32 reg; + + /* Prepare the divisor value */ + reg = NVRM_PLLP_FIXED_FREQ_KHZ * 1000 / NV_DEFAULT_DEBUG_BAUD / 16; + + /* Set up UART parameters */ + writel(UART_LCR_DLAB,u-uart_lcr); + writel(reg,u-uart_thr_dlab_0); + writel(0,u-uart_ier_dlab_0); + writel(0,u-uart_lcr); /* clear DLAB */ + writel((UART_FCR_TRIGGER_3 | UART_FCR_FIFO_EN | \ + UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR),u-uart_iir_fcr); + writel(0,u-uart_ier_dlab_0); + writel(UART_LCR_WLS_8,u-uart_lcr);/* 8N1 */ + writel(UART_MCR_RTS,u-uart_mcr); + writel(0,u-uart_msr); + writel(0,u-uart_spr); + writel(0,u-uart_irda_csr); + writel(0,u-uart_asr); + writel((UART_FCR_TRIGGER_3 | UART_FCR_FIFO_EN),u-uart_iir_fcr); + + /* Flush any old characters out of the RX FIFO */ + reg = readl(u-uart_lsr); + + while (reg UART_LSR_DR) { + reg = readl(u-uart_thr_dlab_0); + reg = readl(u-uart_lsr); + } +} + +/* + * Routine: init_uart + * Description: init the UART clocks, muxes, and baudrate/parity/etc. + */ +static void init_uart(int uart_num) +{ +#if CONFIG_TEGRA2_ENABLE_UARTA + if (uart_num == UART_A) { above. Thanks seedshope + uart_ctlr *const uart = (uart_ctlr *)NV_PA_APB_UARTA_BASE; + + uart_clock_init(UART_A); + + /* Enable UARTA - uses config 0 */ + pin_mux_uart(UART_A); + + setup_uart(uart); + } +#endif /* CONFIG_TEGRA2_ENABLE_UARTD */ +#if CONFIG_TEGRA2_ENABLE_UARTD + if (uart_num == UART_D) { + uart_ctlr *const uart = (uart_ctlr *)NV_PA_APB_UARTD_BASE; + + uart_clock_init(UART_D); + + /* Enable UARTD - uses config 0 */ + pin_mux_uart(UART_D); + + setup_uart(uart); + } +#endif /* CONFIG_TEGRA2_ENABLE_UARTD */ +} + +void uart_init(void) +{ +#if (CONFIG_TEGRA2_ENABLE_UARTA) + init_uart(UART_A); +#endif +#if (CONFIG_TEGRA2_ENABLE_UARTD) + init_uart(UART_D); +#endif +} ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 1/4] arm: Tegra2: Add basic NVIDIA Tegra2 SoC support
On 01/22/2011 12:35 AM, seedshope wrote: On 01/21/2011 08:42 AM, Tom Warren wrote: + +enum { +UART_A = 1, +UART_B, +UART_C, +UART_D, +UART_E +}; + +#endif /* _BOARD_H_ */ diff --git a/arch/arm/cpu/armv7/tegra2/uart.c b/arch/arm/cpu/armv7/tegra2/uart.c new file mode 100644 index 000..5e60bd8 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/uart.c @@ -0,0 +1,216 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporationwww.nvidia.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#includecommon.h +#includens16550.h +#includeasm/io.h +#includeasm/arch/tegra2.h +#include board.h + +/* + * Routine: uart_clock_init + * Description: init the PLL and clock for the UART in uart_num + */ +static void uart_clock_init(int uart_num) +{ +clk_rst_ctlr *const clkrst = (clk_rst_ctlr *)NV_PA_CLK_RST_BASE; +static int pllp_init_done; +u32 reg; + +if (!pllp_init_done) { +/* Override pllp setup for 216MHz operation. */ +reg = (PLL_BYPASS | PLL_BASE_OVRRIDE | PLL_DIVP); +reg |= (((NVRM_PLLP_FIXED_FREQ_KHZ/500) 8) | PLL_DIVM); +writel(reg,clkrst-crc_pllp_base); + +reg |= PLL_ENABLE; +writel(reg,clkrst-crc_pllp_base); + +reg= ~PLL_BYPASS; +writel(reg,clkrst-crc_pllp_base); + +pllp_init_done++; +} + +/* Now do the UART reset/clock enable based on uart_num */ +#if CONFIG_TEGRA2_ENABLE_UARTA +if (uart_num == UART_A) { +/* Assert Reset to UART */ +reg = readl(clkrst-crc_rst_dev_l); +reg |= SWR_UARTA_RST;/* SWR_UARTA_RST = 1 */ +writel(reg,clkrst-crc_rst_dev_l); + +/* Enable clk to UART */ +reg = readl(clkrst-crc_clk_out_enb_l); +reg |= CLK_ENB_UARTA;/* CLK_ENB_UARTA = 1 */ +writel(reg,clkrst-crc_clk_out_enb_l); + +/* Enable pllp_out0 to UART */ +reg = readl(clkrst-crc_clk_src_uarta); +reg= 0x3FFF;/* UARTA_CLK_SRC = 00, PLLP_OUT0 */ +writel(reg,clkrst-crc_clk_src_uarta); + +/* wait for 2us */ +udelay(2); + +/* De-assert reset to UART */ +reg = readl(clkrst-crc_rst_dev_l); +reg= ~SWR_UARTA_RST;/* SWR_UARTA_RST = 0 */ +writel(reg,clkrst-crc_rst_dev_l); +} +#endif/* CONFIG_TEGRA2_ENABLE_UARTA */ +#if CONFIG_TEGRA2_ENABLE_UARTD +if (uart_num == UART_D) { +/* Assert Reset to UART */ +reg = readl(clkrst-crc_rst_dev_u); +reg |= SWR_UARTD_RST;/* SWR_UARTD_RST = 1 */ +writel(reg,clkrst-crc_rst_dev_u); + +/* Enable clk to UART */ +reg = readl(clkrst-crc_clk_out_enb_u); +reg |= CLK_ENB_UARTD;/* CLK_ENB_UARTD = 1 */ +writel(reg,clkrst-crc_clk_out_enb_u); + +/* Enable pllp_out0 to UART */ +reg = readl(clkrst-crc_clk_src_uartd); +reg= 0x3FFF;/* UARTD_CLK_SRC = 00, PLLP_OUT0 */ +writel(reg,clkrst-crc_clk_src_uartd); + +/* wait for 2us */ +udelay(2); + +/* De-assert reset to UART */ +reg = readl(clkrst-crc_rst_dev_u); +reg= ~SWR_UARTD_RST;/* SWR_UARTD_RST = 0 */ +writel(reg,clkrst-crc_rst_dev_u); +} +#endif/* CONFIG_TEGRA2_ENABLE_UARTD */ +} + +/* + * Routine: pin_mux_uart + * Description: setup the pin muxes/tristate values for UART based on uart_num + */ +static void pin_mux_uart(int uart_num) +{ +pinmux_tri_ctlr *const pmt = (pinmux_tri_ctlr *)NV_PA_APB_MISC_BASE; +u32 reg; + +#if CONFIG_TEGRA2_ENABLE_UARTA +if (uart_num == UART_A) { Why you need get the parameters uart_num, I think if you want to use CONFIG_TEGRA2_ENABLE_UARTA, You only defined CONFIG_TEGRA2_ENABLE_UARTA in include/configs/seaboard.h or include/configs/tegra2-common.h. Here, The code formats may be as following: #ifdef CONFIG_SERIAL1 .. #elif defined(CONFIG_SERIAL2) .. #else .. #endif I am sorry, just see the tegra2-common.h file, UARTA is for keypad, UARTB for debug. But I feel the line of if (uart_num == UART_A) is not necessary. Because
Re: [U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
On 01/22/2011 01:52 AM, Sergei Shtylyov wrote: Hello. seedshope wrote: Since SDRAM init function have already change, So the SDRAM initial function must be change. This description sounds somewhat tautological... If I describe as following: Since SDRAM init function have already change, Modify SDRAM inital function to adapt to it. How about it? Signed-off-by: seedshope bocui...@gmail.com Your real name is required in the signoff. I use the name for my pen name. It is not problem. --- board/samsung/smdk6400/smdk6400.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..1d03b7a 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { +DECLARE_GLOBAL_DATA_PTR; + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ +gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, +PHYS_SDRAM_1_SIZE); Could you move this last line more to the right? Ya, the orig is ok, But I re-do the patch, It is miss. sorry. Thanks seedshope WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
On 01/22/2011 02:05 AM, seedshope wrote: On 01/22/2011 01:52 AM, Sergei Shtylyov wrote: Hello. seedshope wrote: Since SDRAM init function have already change, So the SDRAM initial function must be change. This description sounds somewhat tautological... If I describe as following: Since SDRAM init function have already change, Modify SDRAM inital function to adapt to it. How about it? Signed-off-by: seedshope bocui...@gmail.com Your real name is required in the signoff. I use the name for my pen name. It is not problem. --- board/samsung/smdk6400/smdk6400.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..1d03b7a 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { +DECLARE_GLOBAL_DATA_PTR; + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ +gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, +PHYS_SDRAM_1_SIZE); Could you move this last line more to the right? Ya, the orig is ok, But I re-do the patch, It is miss. sorry. Hi Sergei, I feel this may be you e-mail issue. I open my patch, It is display as following: + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, +PHYS_SDRAM_1_SIZE); Thanks, seedshope Thanks seedshope WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
On 01/22/2011 02:29 AM, Albert ARIBAUD wrote: Le 21/01/2011 19:15, seedshope a écrit : On 01/22/2011 02:05 AM, seedshope wrote: On 01/22/2011 01:52 AM, Sergei Shtylyov wrote: Hello. seedshope wrote: Since SDRAM init function have already change, So the SDRAM initial function must be change. This description sounds somewhat tautological... If I describe as following: Since SDRAM init function have already change, Modify SDRAM inital function to adapt to it. How about it? Still unclear, due to the fact you're using the same three terms (init/initial, RAM, function) for two apparently different things. Ya, Maybe, But I don't know to describe it. The patch is only to modify the dram_init() and dram_init_banksize(), Could you help me to describe? Thank you very much! seedshope Signed-off-by: seedshopebocui...@gmail.com Your real name is required in the signoff. I use the name for my pen name. It is not problem. I think Sergei means pen names should not be used. I won't personally pass judgment, but so far I've always seen contributors using their actual names. ok I feel this may be you e-mail issue. I open my patch, It is display as following: + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, +PHYS_SDRAM_1_SIZE); Your patch, pulled from patchwork and viewed in vi, has three tabs on that second line, which does not align properly. You should check your code editor settings re: tabs. My patch is ok, I just two tabs in my e-mail, But I sent the mail, It is change. Thanks hongbo Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v4 patch 1/6] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
On 01/22/2011 04:42 AM, Wolfgang Denk wrote: Dear seedshope, In message1295624053-8060-2-git-send-email-bocui...@gmail.com you wrote: Fix CONFIG_SYS_INIT_SP_ADDR undefined issue. Signed-off-by: seedshopebocui...@gmail.com I'm sorry, but please consider all your patches rejected unless you provide a Signed-off-by: using your real name (sorry, no pseudonyms or anonymous contributions.) ok, This is the first to join the free software for me. So I use my pseudonyms(My English name), I will use the spelling of my name. Thanks, seedshope Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v4 patch 6/6] SMDK6400: Fix SMDK6400 SDRAM init
On 01/22/2011 03:11 AM, Albert ARIBAUD wrote: Le 21/01/2011 19:43, seedshope a écrit : On 01/22/2011 02:29 AM, Albert ARIBAUD wrote: Le 21/01/2011 19:15, seedshope a écrit : On 01/22/2011 02:05 AM, seedshope wrote: On 01/22/2011 01:52 AM, Sergei Shtylyov wrote: Hello. seedshope wrote: Since SDRAM init function have already change, So the SDRAM initial function must be change. This description sounds somewhat tautological... If I describe as following: Since SDRAM init function have already change, Modify SDRAM inital function to adapt to it. How about it? Still unclear, due to the fact you're using the same three terms (init/initial, RAM, function) for two apparently different things. Ya, Maybe, But I don't know to describe it. The patch is only to modify the dram_init() and dram_init_banksize(), Could you help me to describe? Thank you very much! seedshope The reason for the change to dram_init is not actually about DRAM. If you look up similar patches, you'll find out it is about not being able to access gd-bd because bd does not exist, and this is so since the ELF relocation was introduced. So some good descriptions could be do not use gd-bd any more or fix dram_init for relocation support, for instance. ok, Signed-off-by: seedshopebocui...@gmail.com Your real name is required in the signoff. I use the name for my pen name. It is not problem. I think Sergei means pen names should not be used. I won't personally pass judgment, but so far I've always seen contributors using their actual names. ok I feel this may be you e-mail issue. I open my patch, It is display as following: + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, +PHYS_SDRAM_1_SIZE); Your patch, pulled from patchwork and viewed in vi, has three tabs on that second line, which does not align properly. You should check your code editor settings re: tabs. My patch is ok, I just two tabs in my e-mail, But I sent the mail, It is change. Do you send the patch through git format-patch and git send-email? Yes, I use the git format-patch and git send-email Many e-mail softwares have weird issues when posting git patches, which is why git has its own tools for sending patches via e-mail. ok Thanks seedshope Thanks hongbo Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] armv7: add support for s5pc210 universal board
initcall_debug; run bootcmd\0 \ + mmcoops=mmc read 0 0x4000 0x40 8; md 0x4000 0x400\0 \ + verify=n\0 \ + rootfstype=ext4\0 \ + console= CONFIG_DEFAULT_CONSOLE \ + mtdparts= MTDPARTS_DEFAULT \ + mbrparts= MBRPARTS_DEFAULT \ + meminfo=crashkernel=32M@0x5000\0 \ + nfsroot=/nfsroot/arm\0 \ + bootblock= CONFIG_BOOTBLOCK \0 \ + ubiblock= CONFIG_UBIBLOCK \0 \ + ubi=enabled\0 \ + loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage\0 \ + mmcdev=0\0 \ + mmcbootpart=2\0 \ + mmcrootpart=3\0 \ + opts=always_resume=1 + +/* Miscellaneous configurable options */ +#define CONFIG_SYS_LONGHELP /* undef to save memory */ +#define CONFIG_SYS_HUSH_PARSER /* use hush command parser */ +#define CONFIG_SYS_PROMPT_HUSH_PS2 +#define CONFIG_SYS_PROMPTUniversal # +#define CONFIG_SYS_CBSIZE256 /* Console I/O Buffer Size */ +#define CONFIG_SYS_PBSIZE384 /* Print Buffer Size */ +#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ +/* Boot Argument Buffer Size */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +/* memtest works on */ +#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 0x500) +#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x480) + +#define CONFIG_SYS_HZ1000 + +/* valid baudrates */ +#define CONFIG_SYS_BAUDRATE_TABLE{ 9600, 19200, 38400, 57600, 115200 } + +/* 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 */ +#define PHYS_SDRAM_1_SIZE(256 20) /* 256 MB in CS 0 */ +#define PHYS_SDRAM_2 0x5000 /* LPDDR2 DMC 1 */ +#define PHYS_SDRAM_2_SIZE(256 20) /* 256 MB in CS 0 */ + +#define CONFIG_SYS_MEM_TOP_HIDE (1 20) /* 1MB for ram console */ + +#define CONFIG_SYS_MONITOR_BASE 0x +#define CONFIG_SYS_MONITOR_LEN (256 10) /* Reserve 2 sectors */ + +#define CONFIG_USE_ONENAND_BOARD_INIT +#define CONFIG_SYS_ONENAND_BASE 0x0C00 + +#define CONFIG_ENV_IS_IN_MMC 1 +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_OFFSET((32 - 4) 10)/* 32KiB - 4KiB */ + +#define CONFIG_DOS_PARTITION 1 + +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x100) Why sub 0x100, I remember The reserve space is manly for GBL data, I feel It is only to sub GENERATED_GBL_DATA_SIZE. Thanks, seedshope + +#endif /* __CONFIG_H */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [V2 patch 3/4] SMDK6400: Fix build error for nand_spl support
On 01/19/2011 05:56 AM, Wolfgang Denk wrote: Dear seedshope, In message1294757545-4771-4-git-send-email-bocui...@gmail.com you wrote: Add some relocation symbols to u-boot.lds and disable LED functions in start.s to support nand_spl. Signed-off-by: seedshopebocui...@gmail.com Please re-split yourpatches. The changes to board/samsung/smdk6400/u-boot.lds and board/samsung/smdk6400/u-boot-nand.lds should probably go into a single commit. Also please chose a more descriptive Subject / commit message. oK, Now, I wait to resolve a issue for RR4. In RR3 patch2, I fine the cmd_link_o_target command will link for cpu_init.o. So Delay some time. Thanks, hongbo Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
On 01/15/2011 02:15 AM, Albert ARIBAUD wrote: Le 14/01/2011 17:56, seedshope a écrit : On 01/15/2011 12:39 AM, Albert ARIBAUD wrote: Hi seedshope, Le 14/01/2011 16:45, seedshope a écrit : On 01/14/2011 02:07 AM, Albert ARIBAUD wrote: Le 13/01/2011 14:36, seedshope a écrit : Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshopebocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile index 0785b19..f4b9574 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o SOBJS = reset.o -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o +COBJS-$(CONFIG_S3C6400) += speed.o COBJS-y += timer.o +CPUINIT = cpu_init.o + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +CPUINIT := $(addprefix $(obj),$(CPUINIT)) -all: $(obj).depend $(START) $(LIB) +all: $(obj).depend $(START) $(LIB) $(CPUINIT) $(LIB): $(OBJS) $(call cmd_link_o_target, $(OBJS)) Not sure I get what's the problem and how exactly this changes solves it. Can you detail this particular issue? The issue is mem_ctrl_asm_init redefine in arch/arm/cpu/arm1176/s3c64xx/cpu_init.s. From what follows it seems the problem is rather cpu_init.o being linked in twice. Correct? maybe At first, the link script file include cpu_init.s in board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with cpu_init.o. So the link script will double link the cpu_init file. Then you should fix the double linking by i) determining why the double linking happens and ii) properly linking once only. Hi Alvert ARIBAUD, I see the code for smdk6400. I found this code is very old. Before It can not add cmd_link_o_target in Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to compile. So the link script is ok. But, Now, It is not. As far as I know, The linker script can do to link the first specified file for user. Since I do not full understand the cmd_link_o_target mechanism. So I only guess the command do some link work. Maybe I am correct. I don't want to accept this change on the off chance that it might be correct; before your next patch submission, please try building your code without this specific patch and positively find why the build fails. Hi Amicalement I trace the issue, I find cmd_link_o_target will link the cpu_init.o file. If I add the file to u-boot-nand.lds file, The file will be link twice. Now, It is good method to delete the file in u-boot-nand.s. Why? Before I think Nand Booting for the 4kb, If you don't link the file to the first 4kB, the system will be generate error. Because the mem initialization function will can't find. But , Now , The nand booting will be generate in nand_spl, the generate u-boot img is limit for 4KB, So this is ok. Do you think about? Thanks, seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
On 01/14/2011 02:07 AM, Albert ARIBAUD wrote: Le 13/01/2011 14:36, seedshope a écrit : Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshopebocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile index 0785b19..f4b9574 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile @@ -30,12 +30,15 @@ LIB= $(obj)lib$(SOC).o SOBJS= reset.o -COBJS-$(CONFIG_S3C6400)+= cpu_init.o speed.o +COBJS-$(CONFIG_S3C6400)+= speed.o COBJS-y+= timer.o +CPUINIT= cpu_init.o + OBJS:= $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +CPUINIT := $(addprefix $(obj),$(CPUINIT)) -all:$(obj).depend $(START) $(LIB) +all:$(obj).depend $(START) $(LIB) $(CPUINIT) $(LIB):$(OBJS) $(call cmd_link_o_target, $(OBJS)) Not sure I get what's the problem and how exactly this changes solves it. Can you detail this particular issue? The issue is mem_ctrl_asm_init redefine in arch/arm/cpu/arm1176/s3c64xx/cpu_init.s. At first, the link script file include cpu_init.s in board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with cpu_init.o. So the link script will double link the cpu_init file. I have two method to solve it. first: see the patch second: Modify the link script But I feel, the first method is safe. I asked a question. I will RR on next, The patch1 and patch3 have already ok, Do I only send patch2 and patch4? Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init
On 01/14/2011 08:53 AM, Minkyu Kang wrote: Dear seedshope, On 13 January 2011 22:36, seedshopebocui...@gmail.com wrote: Since SDRAM init function have already change, So the SDRAM initial function must be change. Signed-off-by: seedshopebocui...@gmail.com diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..043d553 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { + DECLARE_GLOBAL_DATA_PTR; Please move it to out of function. I am sorry, DECLARE_GLOBAL_DATA_PTR have already defind in the head of the file, I will drop this declare. + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, \ Please remove \. ok Thanks, seedshope + PHYS_SDRAM_1_SIZE); return 0; } -- 1.7.1 Thanks Minkyu Kang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
On 01/14/2011 11:45 PM, seedshope wrote: On 01/14/2011 02:07 AM, Albert ARIBAUD wrote: Le 13/01/2011 14:36, seedshope a écrit : Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshopebocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile index 0785b19..f4b9574 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile @@ -30,12 +30,15 @@ LIB= $(obj)lib$(SOC).o SOBJS= reset.o -COBJS-$(CONFIG_S3C6400)+= cpu_init.o speed.o +COBJS-$(CONFIG_S3C6400)+= speed.o COBJS-y+= timer.o +CPUINIT= cpu_init.o + OBJS:= $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +CPUINIT := $(addprefix $(obj),$(CPUINIT)) -all:$(obj).depend $(START) $(LIB) +all:$(obj).depend $(START) $(LIB) $(CPUINIT) $(LIB):$(OBJS) $(call cmd_link_o_target, $(OBJS)) Not sure I get what's the problem and how exactly this changes solves it. Can you detail this particular issue? The part of u-boot-nand.lds as following: . = ALIGN(4); .text : { arch/arm/cpu/arm1176/start.o (.text) arch/arm/cpu/arm1176/s3c64xx/cpu_init.o (.text) *(.text) } I reference start.s to get the patch.;-) Thanks, seedshope The issue is mem_ctrl_asm_init redefine in arch/arm/cpu/arm1176/s3c64xx/cpu_init.s. At first, the link script file include cpu_init.s in board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with cpu_init.o. So the link script will double link the cpu_init file. I have two method to solve it. first: see the patch second: Modify the link script But I feel, the first method is safe. I asked a question. I will RR on next, The patch1 and patch3 have already ok, Do I only send patch2 and patch4? Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
On 01/15/2011 12:39 AM, Albert ARIBAUD wrote: Hi seedshope, Le 14/01/2011 16:45, seedshope a écrit : On 01/14/2011 02:07 AM, Albert ARIBAUD wrote: Le 13/01/2011 14:36, seedshope a écrit : Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshopebocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile index 0785b19..f4b9574 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o SOBJS = reset.o -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o +COBJS-$(CONFIG_S3C6400) += speed.o COBJS-y += timer.o +CPUINIT = cpu_init.o + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +CPUINIT := $(addprefix $(obj),$(CPUINIT)) -all: $(obj).depend $(START) $(LIB) +all: $(obj).depend $(START) $(LIB) $(CPUINIT) $(LIB): $(OBJS) $(call cmd_link_o_target, $(OBJS)) Not sure I get what's the problem and how exactly this changes solves it. Can you detail this particular issue? The issue is mem_ctrl_asm_init redefine in arch/arm/cpu/arm1176/s3c64xx/cpu_init.s. From what follows it seems the problem is rather cpu_init.o being linked in twice. Correct? maybe At first, the link script file include cpu_init.s in board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with cpu_init.o. So the link script will double link the cpu_init file. Then you should fix the double linking by i) determining why the double linking happens and ii) properly linking once only. Hi Alvert ARIBAUD, I see the code for smdk6400. I found this code is very old. Before It can not add cmd_link_o_target in Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to compile. So the link script is ok. But, Now, It is not. As far as I know, The linker script can do to link the first specified file for user. Since I do not full understand the cmd_link_o_target mechanism. So I only guess the command do some link work. Maybe I am correct. I have two method to solve it. first: see the patch second: Modify the link script But I feel, the first method is safe. It may be safe, but IIUC it does not properly address the issue and its root cause. yes I asked a question. I will RR on next, The patch1 and patch3 have already ok, Do I only send patch2 and patch4? My personal practice is to re-send the whole patchset for each new version, because i) people can easily see the whole of the changes without having to go pick parts of previous versions and ii) it makes clear when a patch is removed or added to the set. ok Thanks, seedshope Amicalement, Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
On 01/15/2011 02:15 AM, Albert ARIBAUD wrote: Le 14/01/2011 17:56, seedshope a écrit : On 01/15/2011 12:39 AM, Albert ARIBAUD wrote: Hi seedshope, Le 14/01/2011 16:45, seedshope a écrit : On 01/14/2011 02:07 AM, Albert ARIBAUD wrote: Le 13/01/2011 14:36, seedshope a écrit : Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshopebocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile index 0785b19..f4b9574 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o SOBJS = reset.o -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o +COBJS-$(CONFIG_S3C6400) += speed.o COBJS-y += timer.o +CPUINIT = cpu_init.o + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +CPUINIT := $(addprefix $(obj),$(CPUINIT)) -all: $(obj).depend $(START) $(LIB) +all: $(obj).depend $(START) $(LIB) $(CPUINIT) $(LIB): $(OBJS) $(call cmd_link_o_target, $(OBJS)) Not sure I get what's the problem and how exactly this changes solves it. Can you detail this particular issue? The issue is mem_ctrl_asm_init redefine in arch/arm/cpu/arm1176/s3c64xx/cpu_init.s. From what follows it seems the problem is rather cpu_init.o being linked in twice. Correct? maybe At first, the link script file include cpu_init.s in board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with cpu_init.o. So the link script will double link the cpu_init file. Then you should fix the double linking by i) determining why the double linking happens and ii) properly linking once only. Hi Alvert ARIBAUD, I see the code for smdk6400. I found this code is very old. Before It can not add cmd_link_o_target in Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to compile. So the link script is ok. But, Now, It is not. As far as I know, The linker script can do to link the first specified file for user. Since I do not full understand the cmd_link_o_target mechanism. So I only guess the command do some link work. Maybe I am correct. I don't want to accept this change on the off chance that it might be correct; before your next patch submission, please try building your code without this specific patch and positively find why the build fails. ok, Thanks seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] RR v3 PATCH: SMDK6400 Fix some build bug
Change from V1: patch 1: patch 2: Delete some compile information from commit. patch 3: Add LED modify information and Delete some compile information from commit. patch 4: Add new patch for SDRAM init. Change frome v2: patch2: Modify Makefile for arch/arm/cpu/arm1176/s3c64xx/cpu_init.s in build error. It will generat redefine information for mem_ctrl_asm_init before the Modify. patch4: Modify the Sergei Shtylyov comments and change the SDRAM size variable for PHYS_SDRAM_SIZE_1. I apply this patch and build ok. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v3 patch 1/4] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
Fix CONFIG_SYS_INIT_SP_ADDR undefined issue. Signed-off-by: seedshope bocui...@gmail.com diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h index 671f2c7..c9acf58 100644 --- a/include/configs/smdk6400.h +++ b/include/configs/smdk6400.h @@ -44,6 +44,11 @@ #define CONFIG_PERIPORT_BASE 0x7000 #define CONFIG_PERIPORT_SIZE 0x13 +#define CONFIG_SYS_IRAM_BASE0x0c00 /* Internal SRAM base address */ +#define CONFIG_SYS_IRAM_SIZE0x2000 /* 8 KB of internal SRAM memory */ +#define CONFIG_SYS_IRAM_END (CONFIG_SYS_IRAM_BASE + CONFIG_SYS_IRAM_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_IRAM_END - GENERATED_GBL_DATA_SIZE) + #define CONFIG_SYS_SDRAM_BASE 0x5000 /* input clock of PLL: SMDK6400 has 12MHz input clock */ -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshope bocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile index 0785b19..f4b9574 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o SOBJS = reset.o -COBJS-$(CONFIG_S3C6400)+= cpu_init.o speed.o +COBJS-$(CONFIG_S3C6400)+= speed.o COBJS-y+= timer.o +CPUINIT= cpu_init.o + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +CPUINIT := $(addprefix $(obj),$(CPUINIT)) -all: $(obj).depend $(START) $(LIB) +all: $(obj).depend $(START) $(LIB) $(CPUINIT) $(LIB):$(OBJS) $(call cmd_link_o_target, $(OBJS)) diff --git a/board/samsung/smdk6400/u-boot-nand.lds b/board/samsung/smdk6400/u-boot-nand.lds index 29a4f61..2b87fc6 100644 --- a/board/samsung/smdk6400/u-boot-nand.lds +++ b/board/samsung/smdk6400/u-boot-nand.lds @@ -55,8 +55,29 @@ SECTIONS . = ALIGN(4); .mmudata : { *(.mmudata) } - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } - _end = .; +. = ALIGN(4); + + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { + __bss_start = .; + *(.bss) + . = ALIGN(4); + _end = .; + } + + /DISCARD/ : { *(.dynstr*) } + /DISCARD/ : { *(.dynamic*) } + /DISCARD/ : { *(.plt*) } + /DISCARD/ : { *(.interp*) } + /DISCARD/ : { *(.gnu*) } } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v3 patch 3/4] SMDK6400: Fix build error for nand_spl support
Add some relocation symbols to u-boot.lds and disable LED functions in start.s to support nand_spl. Signed-off-by: seedshope bocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..ae3706a 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -354,9 +354,11 @@ clbss_l:strr2, [r0]/* clear loop...*/ cmp r0, r1 bne clbss_l +#ifndef CONFIG_NAND_SPL bl coloured_LED_init bl red_LED_on #endif +#endif /* * We are done. Do not return, instead branch to second part of board diff --git a/nand_spl/board/samsung/smdk6400/u-boot.lds b/nand_spl/board/samsung/smdk6400/u-boot.lds index 3ac6aa1..30b1573 100644 --- a/nand_spl/board/samsung/smdk6400/u-boot.lds +++ b/nand_spl/board/samsung/smdk6400/u-boot.lds @@ -55,7 +55,22 @@ SECTIONS __u_boot_cmd_end = .; . = ALIGN(4); + + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } + *(.bss) + . = ALIGN(4); _end = .; + } } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init
Since SDRAM init function have already change, So the SDRAM initial function must be change. Signed-off-by: seedshope bocui...@gmail.com diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..043d553 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { + DECLARE_GLOBAL_DATA_PTR; + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, \ + PHYS_SDRAM_1_SIZE); return 0; } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [V2 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init
On 01/12/2011 07:08 PM, Sergei Shtylyov wrote: Hello. On 11-01-2011 17:52, seedshope wrote: Since SDRAM init function have already change, So the SDRAM initial function must be change. Signed-off-by: seedshopebocui...@gmail.com diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..52b44a8 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { + DECLARE_GLOBAL_DATA_PTR; + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE, + CONFIG_MAX_RAM_BANK_SIZE); Please indent that line more to the right, preferrebly start it under '(volatile long *)'. ok, But I don't know how number tab indent is appropriate. May be the effect as following? gd-ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE, CONFIG_MAX_RAM_BANK_SIZE); Thanks, seedshope WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] RR v2 PATCH: SMDK6400 Fix some build bug
Subject: RR v2 PATCH: SMDK6400 Fix some build bug Change from V1: patch 1: patch 2: Delete some compile information from commit. patch 3: Add LED modify information and Delete some compile information from commit. patch 4: Add new patch for SDRAM init. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [V2 patch 1/4] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
Fix CONFIG_SYS_INIT_SP_ADDR undefined issue. Signed-off-by: seedshope bocui...@gmail.com diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h index 671f2c7..c9acf58 100644 --- a/include/configs/smdk6400.h +++ b/include/configs/smdk6400.h @@ -44,6 +44,11 @@ #define CONFIG_PERIPORT_BASE 0x7000 #define CONFIG_PERIPORT_SIZE 0x13 +#define CONFIG_SYS_IRAM_BASE0x0c00 /* Internal SRAM base address */ +#define CONFIG_SYS_IRAM_SIZE0x2000 /* 8 KB of internal SRAM memory */ +#define CONFIG_SYS_IRAM_END (CONFIG_SYS_IRAM_BASE + CONFIG_SYS_IRAM_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_IRAM_END - GENERATED_GBL_DATA_SIZE) + #define CONFIG_SYS_SDRAM_BASE 0x5000 /* input clock of PLL: SMDK6400 has 12MHz input clock */ -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [V2 patch 2/4] SMDK6400: Fix some label undefined in build error
Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshope bocui...@gmail.com diff --git a/board/samsung/smdk6400/u-boot-nand.lds b/board/samsung/smdk6400/u-boot-nand.lds index 29a4f61..2b87fc6 100644 --- a/board/samsung/smdk6400/u-boot-nand.lds +++ b/board/samsung/smdk6400/u-boot-nand.lds @@ -55,8 +55,29 @@ SECTIONS . = ALIGN(4); .mmudata : { *(.mmudata) } - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } - _end = .; +. = ALIGN(4); + + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { + __bss_start = .; + *(.bss) + . = ALIGN(4); + _end = .; + } + + /DISCARD/ : { *(.dynstr*) } + /DISCARD/ : { *(.dynamic*) } + /DISCARD/ : { *(.plt*) } + /DISCARD/ : { *(.interp*) } + /DISCARD/ : { *(.gnu*) } } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [V2 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init
Since SDRAM init function have already change, So the SDRAM initial function must be change. Signed-off-by: seedshope bocui...@gmail.com diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c index 35aa40b..52b44a8 100644 --- a/board/samsung/smdk6400/smdk6400.c +++ b/board/samsung/smdk6400/smdk6400.c @@ -78,10 +78,18 @@ int board_init(void) return 0; } -int dram_init(void) +void dram_init_banksize(void) { + DECLARE_GLOBAL_DATA_PTR; + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE, + CONFIG_MAX_RAM_BANK_SIZE); return 0; } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [V2 patch 3/4] SMDK6400: Fix build error for nand_spl support
Add some relocation symbols to u-boot.lds and disable LED functions in start.s to support nand_spl. Signed-off-by: seedshope bocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..ae3706a 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -354,9 +354,11 @@ clbss_l:strr2, [r0]/* clear loop...*/ cmp r0, r1 bne clbss_l +#ifndef CONFIG_NAND_SPL bl coloured_LED_init bl red_LED_on #endif +#endif /* * We are done. Do not return, instead branch to second part of board diff --git a/nand_spl/board/samsung/smdk6400/u-boot.lds b/nand_spl/board/samsung/smdk6400/u-boot.lds index 3ac6aa1..30b1573 100644 --- a/nand_spl/board/samsung/smdk6400/u-boot.lds +++ b/nand_spl/board/samsung/smdk6400/u-boot.lds @@ -55,7 +55,22 @@ SECTIONS __u_boot_cmd_end = .; . = ALIGN(4); + + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } + + .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } + *(.bss) + . = ALIGN(4); _end = .; + } } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] SMDK6400: Fix build error for smdk6400 nand_spl support
On 01/09/2011 03:33 PM, Minkyu Kang wrote: Hi On 9 January 2011 10:14, seedshopebocui...@gmail.com wrote: On 01/08/2011 11:15 PM, Minkyu Kang wrote: Dear seedshope, On 8 January 2011 00:53, seedshopebocui...@gmail.comwrote: From: seedshopebocui...@gmail.com Modify u-boot.lds from nand_spl/board/samsung/smdk6400. start.o: In function `clbss_l': nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' start.o: In function `_rel_dyn_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start' start.o: In function `_rel_dyn_end_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end' start.o: In function `_dynsym_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start' Signed-off-by: seedshopebocui...@googlemail.com diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..bde0357 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -353,10 +353,11 @@ clbss_l:str r2, [r0]/* clear loop...*/ add r0, r0, #4 cmp r0, r1 bne clbss_l - +#ifndef CONFIG_NAND_SPL CONFIG_PRELOADER is better No, The nand_spl support can't find the define of coloured_LED_init and red_LED_on. It is base on the build error: make smdk6400_config make the error information as following: nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' Please add follow define at Makefile. AFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL CFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL ok, It may be a good method. But I worried other people will be difficult to see the process of the code running. So, if add #ifdef CONFIG_NAND_SPL, It is very clear. What do you think about it? Thanks, seedshope Thanks Minkyu Kang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] SMDK6400: Fix build error for smdk6400 nand_spl support
On 01/09/2011 10:12 PM, Minkyu Kang wrote: Hello, On 9 January 2011 21:27, seedshopebocui...@gmail.com wrote: On 01/09/2011 03:33 PM, Minkyu Kang wrote: Hi On 9 January 2011 10:14, seedshopebocui...@gmail.comwrote: On 01/08/2011 11:15 PM, Minkyu Kang wrote: Dear seedshope, On 8 January 2011 00:53, seedshopebocui...@gmail.com wrote: From: seedshopebocui...@gmail.com Modify u-boot.lds from nand_spl/board/samsung/smdk6400. start.o: In function `clbss_l': nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' start.o: In function `_rel_dyn_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start' start.o: In function `_rel_dyn_end_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end' start.o: In function `_dynsym_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start' Signed-off-by: seedshopebocui...@googlemail.com diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..bde0357 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -353,10 +353,11 @@ clbss_l:str r2, [r0]/* clear loop...*/ add r0, r0, #4 cmp r0, r1 bne clbss_l - +#ifndef CONFIG_NAND_SPL CONFIG_PRELOADER is better No, The nand_spl support can't find the define of coloured_LED_init and red_LED_on. It is base on the build error: make smdk6400_config make the error information as following: nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' Please add follow define at Makefile. AFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL CFLAGS += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL ok, It may be a good method. But I worried other people will be difficult to see the process of the code running. So, if add #ifdef CONFIG_NAND_SPL, It is very clear. What do you think about it? Ah, already used CONFIG_NAND_SPL at start.S. OK, we can do this work (change from CONFIG_NAND_SPL to CONFIG_PRELOADER) at another patch. Ok, I will send RR2 for SMDK6400 relate patch. Thanks, seedshope Thanks Minkyu Kang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] SMDK6400:use common arm1176 u-boot.lds of cpu layer
On 01/08/2011 02:04 PM, Albert ARIBAUD wrote: Le 07/01/2011 16:53, seedshope a écrit : From: seedshopebocui...@gmail.com Remove u-boot-nand.lds from board/samsung/smdk6400 and use the common u-boot.lds of arm1176 cpu layer. This patch also fix the building errors: arch/arm/cpu/arm1176/s3c64xx/libs3c64xx.o: In function `mem_ctrl_asm_init': arch/arm/cpu/arm1176/s3c64xx/cpu_init.S:32: multiple definition of `mem_ctrl_asm_init' arch/arm/cpu/arm1176/s3c64xx/cpu_init.S:32: first defined here arch/arm/cpu/arm1176/start.o: In function `_rel_dyn_start_ofs': arch/arm/cpu/arm1176/start.S:379: undefined reference to `__rel_dyn_start' arch/arm/cpu/arm1176/start.o: In function `_rel_dyn_end_ofs': arch/arm/cpu/arm1176/start.S:379: undefined reference to `__rel_dyn_end' arch/arm/cpu/arm1176/start.o: In function `_dynsym_start_ofs': arch/arm/cpu/arm1176/start.S:379: undefined reference to `__dynsym_start' Signed-off-by: seedshopebocui...@googlemail.com In the current u-boot-arm tree, board/samsung/smdk6400/u-boot-nand.lds and arch/arm/cpu/arm1176/u-boot.lds are identical; I am thus ok with the change in itself since the board lds file was useless, but I am not sure the description is valid. Can you double-check this change wrt to the link issue? I am sure the link issue. But I need to adjust the patch. I should be modify base on board/samsung/smdk6400/u-boot-nand.lds, Don't delete it. Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] SMDK6400: Fix build error for smdk6400 nand_spl support
On 01/08/2011 02:14 PM, Albert ARIBAUD wrote: Hi seedshope, Le 07/01/2011 16:53, seedshope a écrit : From: seedshopebocui...@gmail.com Modify u-boot.lds from nand_spl/board/samsung/smdk6400. You're also modifying start.S. If you mention files in the patch summary, then please mention them all. ok start.o: In function `clbss_l': nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' start.o: In function `_rel_dyn_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start' start.o: In function `_rel_dyn_end_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end' start.o: In function `_dynsym_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start' Signed-off-by: seedshopebocui...@googlemail.com Please limit the commit message to a simple explanation of the issue fixed, without pasting detailed build messages int it. Here for instance you need only indicate that you're removing references to relocation symbols and calls to LED functions. ok Thanks, seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undeclared
On 01/08/2011 01:55 PM, Albert ARIBAUD wrote: Le 07/01/2011 16:53, seedshope a écrit : From: seedshopebocui...@gmail.com CONFIG_SYS_INIT_SP_ADDR point the last PHY of IRAM and substract the global size. Signed-off-by: seedshopebocui...@googlemail.com Please fix the From: line in all patches in this set; it should not appear in the long commit message. ok, I will send RR2. Thanks, seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] SMDK6400: Fix build error for smdk6400 nand_spl support
On 01/08/2011 11:15 PM, Minkyu Kang wrote: Dear seedshope, On 8 January 2011 00:53, seedshopebocui...@gmail.com wrote: From: seedshopebocui...@gmail.com Modify u-boot.lds from nand_spl/board/samsung/smdk6400. start.o: In function `clbss_l': nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' start.o: In function `_rel_dyn_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start' start.o: In function `_rel_dyn_end_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end' start.o: In function `_dynsym_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start' Signed-off-by: seedshopebocui...@googlemail.com diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..bde0357 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -353,10 +353,11 @@ clbss_l:str r2, [r0]/* clear loop...*/ add r0, r0, #4 cmp r0, r1 bne clbss_l - +#ifndef CONFIG_NAND_SPL CONFIG_PRELOADER is better No, The nand_spl support can't find the define of coloured_LED_init and red_LED_on. It is base on the build error: make smdk6400_config make the error information as following: nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' Thanks, seedshope bl coloured_LED_init bl red_LED_on #endif +#endif /* Thanks Minkyu Kang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undeclared
On 01/08/2011 11:17 PM, Albert ARIBAUD wrote: Le 08/01/2011 16:10, seedshope a écrit : On 01/08/2011 01:55 PM, Albert ARIBAUD wrote: Le 07/01/2011 16:53, seedshope a écrit : From: seedshopebocui...@gmail.com CONFIG_SYS_INIT_SP_ADDR point the last PHY of IRAM and substract the global size. Signed-off-by: seedshopebocui...@googlemail.com Please fix the From: line in all patches in this set; it should not appear in the long commit message. ok, I will send RR2. Thanks, You're welcome. Don't forget to add some history in V2, so that people can tell what you changed from V1 to V2 of the patch. ok, Thanks, seedshope seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undeclared
From: seedshope bocui...@gmail.com CONFIG_SYS_INIT_SP_ADDR point the last PHY of IRAM and substract the global size. Signed-off-by: seedshope bocui...@googlemail.com diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h index 671f2c7..037db4f 100644 --- a/include/configs/smdk6400.h +++ b/include/configs/smdk6400.h @@ -174,6 +174,11 @@ #define PHYS_SDRAM_1 CONFIG_SYS_SDRAM_BASE /* SDRAM Bank #1 */ #define PHYS_SDRAM_1_SIZE 0x0800 /* 128 MB in Bank #1*/ +#define CONFIG_SYS_IRAM_BASE0x0c00 /* Internal SRAM base address */ +#define CONFIG_SYS_IRAM_SIZE0x2000 /* 8 KB of internal SRAM memory */ +#define CONFIG_SYS_IRAM_END (CONFIG_SYS_IRAM_BASE + CONFIG_SYS_IRAM_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_IRAM_END - GENERATED_GBL_DATA_SIZE) + #define CONFIG_SYS_FLASH_BASE 0x1000 #define CONFIG_SYS_MONITOR_BASE0x -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] SMDK6400:use common arm1176 u-boot.lds of cpu layer
From: seedshope bocui...@gmail.com Remove u-boot-nand.lds from board/samsung/smdk6400 and use the common u-boot.lds of arm1176 cpu layer. This patch also fix the building errors: arch/arm/cpu/arm1176/s3c64xx/libs3c64xx.o: In function `mem_ctrl_asm_init': arch/arm/cpu/arm1176/s3c64xx/cpu_init.S:32: multiple definition of `mem_ctrl_asm_init' arch/arm/cpu/arm1176/s3c64xx/cpu_init.S:32: first defined here arch/arm/cpu/arm1176/start.o: In function `_rel_dyn_start_ofs': arch/arm/cpu/arm1176/start.S:379: undefined reference to `__rel_dyn_start' arch/arm/cpu/arm1176/start.o: In function `_rel_dyn_end_ofs': arch/arm/cpu/arm1176/start.S:379: undefined reference to `__rel_dyn_end' arch/arm/cpu/arm1176/start.o: In function `_dynsym_start_ofs': arch/arm/cpu/arm1176/start.S:379: undefined reference to `__dynsym_start' Signed-off-by: seedshope bocui...@googlemail.com diff --git a/board/samsung/smdk6400/config.mk b/board/samsung/smdk6400/config.mk index 90cbcf2..0443f60 100644 --- a/board/samsung/smdk6400/config.mk +++ b/board/samsung/smdk6400/config.mk @@ -29,4 +29,3 @@ else CONFIG_SYS_TEXT_BASE = 0 endif -LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot-nand.lds diff --git a/board/samsung/smdk6400/u-boot-nand.lds b/board/samsung/smdk6400/u-boot-nand.lds deleted file mode 100644 index 29a4f61..000 --- a/board/samsung/smdk6400/u-boot-nand.lds +++ /dev/null @@ -1,62 +0,0 @@ -/* - * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, ga...@denx.de - * - * (C) Copyright 2008 - * Guennadi Liakhovetki, DENX Software Engineering, l...@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 -{ - . = 0x; - - . = ALIGN(4); - .text : - { - arch/arm/cpu/arm1176/start.o (.text) - arch/arm/cpu/arm1176/s3c64xx/cpu_init.o (.text) - *(.text) - } - - . = ALIGN(4); - .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.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); - .mmudata : { *(.mmudata) } - - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } - _end = .; -} -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] SMDK6400: Fix build error for smdk6400 nand_spl support
From: seedshope bocui...@gmail.com Modify u-boot.lds from nand_spl/board/samsung/smdk6400. start.o: In function `clbss_l': nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init' nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on' start.o: In function `_rel_dyn_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start' start.o: In function `_rel_dyn_end_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end' start.o: In function `_dynsym_start_ofs': nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start' Signed-off-by: seedshope bocui...@googlemail.com diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index 237dcfe..bde0357 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -353,10 +353,11 @@ clbss_l:str r2, [r0]/* clear loop...*/ add r0, r0, #4 cmp r0, r1 bne clbss_l - +#ifndef CONFIG_NAND_SPL bl coloured_LED_init bl red_LED_on #endif +#endif /* * We are done. Do not return, instead branch to second part of board diff --git a/nand_spl/board/samsung/smdk6400/u-boot.lds b/nand_spl/board/samsung/smdk6400/u-boot.lds index 3ac6aa1..c179db3 100644 --- a/nand_spl/board/samsung/smdk6400/u-boot.lds +++ b/nand_spl/board/samsung/smdk6400/u-boot.lds @@ -54,8 +54,23 @@ SECTIONS .u_boot_cmd : { *(.u_boot_cmd) } __u_boot_cmd_end = .; - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } - _end = .; +. = ALIGN(4); + +.rel.dyn : { +__rel_dyn_start = .; +*(.rel*) +__rel_dyn_end = .; +} + +.dynsym : { +__dynsym_start = .; +*(.dynsym) +} + +.bss __rel_dyn_start (OVERLAY) : { +__bss_start = .; +*(.bss) +. = ALIGN(4); +_end = .; +} } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] S3C64XX: timer: replace bss variable by gd
On 01/05/2011 03:04 PM, Minkyu Kang wrote: Dear seedshope, On 4 January 2011 23:56, seedshopebocui...@gmail.com wrote: On 01/04/2011 10:46 PM, seedshope wrote: On 01/04/2011 04:14 PM, Minkyu Kang wrote: Use the global data instead of bss variable, replace as follow. timer_load_val - timer_rate_hz timestamp - timer_reset_value lastdec - lastinc I have already test the patch on s3c6410 . It is work perfect. Before I am not use the patch, When I use the command nand read, The some information will generate. as following: raise: Signal # 8 caught I also trace the timer.c, But I can't resolve it. As if after the first initial timer, I guess the bss will be clear. Now It is ok after patch this patch. Thanks, seedshope Thanks for testing. Did you test with latest version? Yes, Currently, SMDK6400 can't build because didn't rework for relocation. If you are OK, could you please fix it? Ok, recently, I do the patch for SMD6400 and SMDK6410, I will send request review in the weekend。 Thank, seedshope I appreciate your help. Minkyu Kang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] S3C64XX: timer: replace bss variable by gd
On 01/04/2011 04:14 PM, Minkyu Kang wrote: Use the global data instead of bss variable, replace as follow. timer_load_val - timer_rate_hz timestamp - timer_reset_value lastdec - lastinc I have already test the patch on s3c6410 . It is work perfect. Thanks, seedshope Signed-off-by: Minkyu Kangmk7.k...@samsung.com Signed-off-by: Darius Augulisaugulis.dar...@gmail.com cc: Heiko Schocherh...@denx.de --- arch/arm/cpu/arm1176/s3c64xx/timer.c | 40 + 1 files changed, 16 insertions(+), 24 deletions(-) diff --git a/arch/arm/cpu/arm1176/s3c64xx/timer.c b/arch/arm/cpu/arm1176/s3c64xx/timer.c index 9768319..c1280f2 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/timer.c +++ b/arch/arm/cpu/arm1176/s3c64xx/timer.c @@ -43,7 +43,7 @@ #includeasm/arch/s3c6400.h #includediv64.h -static ulong timer_load_val; +DECLARE_GLOBAL_DATA_PTR; #define PRESCALER 167 @@ -60,12 +60,6 @@ static inline ulong read_timer(void) return timers-TCNTO4; } -/* Internal tick units */ -/* Last decremneter snapshot */ -static unsigned long lastdec; -/* Monotonic incrementing timer */ -static unsigned long long timestamp; - int timer_init(void) { s3c64xx_timers *const timers = s3c64xx_get_base_timers(); @@ -83,20 +77,18 @@ int timer_init(void) * the prescaler automatically for other PCLK frequencies. */ timers-TCFG0 = PRESCALER 8; - if (timer_load_val == 0) { - timer_load_val = get_PCLK() / PRESCALER * (100 / 4); /* 100s */ - timers-TCFG1 = (timers-TCFG1 ~0xf) | 0x2; - } + gd-timer_rate_hz = get_PCLK() / PRESCALER * (100 / 4); /* 100s */ + timers-TCFG1 = (timers-TCFG1 ~0xf) | 0x2; /* load value for 10 ms timeout */ - lastdec = timers-TCNTB4 = timer_load_val; + gd-lastinc = timers-TCNTB4 = gd-timer_rate_hz; /* auto load, manual update of Timer 4 */ timers-TCON = (timers-TCON ~0x0070) | TCON_4_AUTO | TCON_4_UPDATE; /* auto load, start Timer 4 */ timers-TCON = (timers-TCON ~0x0070) | TCON_4_AUTO | COUNT_4_ON; - timestamp = 0; + gd-timer_reset_value = 0; return 0; } @@ -113,16 +105,16 @@ unsigned long long get_ticks(void) { ulong now = read_timer(); - if (lastdec= now) { + if (gd-lastinc= now) { /* normal mode */ - timestamp += lastdec - now; + gd-timer_reset_value += gd-lastinc - now; } else { /* we have an overflow ... */ - timestamp += lastdec + timer_load_val - now; + gd-timer_reset_value += gd-lastinc + gd-timer_rate_hz - now; } - lastdec = now; + gd-lastinc = now; - return timestamp; + return gd-timer_reset_value; } /* @@ -132,14 +124,14 @@ unsigned long long get_ticks(void) ulong get_tbclk(void) { /* We overrun in 100s */ - return (ulong)(timer_load_val / 100); + return (ulong)(gd-timer_rate_hz / 100); } void reset_timer_masked(void) { /* reset time */ - lastdec = read_timer(); - timestamp = 0; + gd-lastinc = read_timer(); + gd-timer_reset_value = 0; } void reset_timer(void) @@ -150,7 +142,7 @@ void reset_timer(void) ulong get_timer_masked(void) { unsigned long long res = get_ticks(); - do_div (res, (timer_load_val / (100 * CONFIG_SYS_HZ))); + do_div(res, (gd-timer_rate_hz / (100 * CONFIG_SYS_HZ))); return res; } @@ -161,7 +153,7 @@ ulong get_timer(ulong base) void set_timer(ulong t) { - timestamp = t * (timer_load_val / (100 * CONFIG_SYS_HZ)); + gd-timer_reset_value = t * (gd-timer_rate_hz / (100 * CONFIG_SYS_HZ)); } void __udelay(unsigned long usec) @@ -170,7 +162,7 @@ void __udelay(unsigned long usec) ulong tmo; tmo = (usec + 9) / 10; - tmp = get_ticks() + tmo;/* get current timestamp */ + tmp = get_ticks() + tmo;/* get current timer_reset_value */ while (get_ticks() tmp)/* loop till event */ /*NOP*/; ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] S3C64XX: timer: replace bss variable by gd
On 01/04/2011 10:46 PM, seedshope wrote: On 01/04/2011 04:14 PM, Minkyu Kang wrote: Use the global data instead of bss variable, replace as follow. timer_load_val - timer_rate_hz timestamp - timer_reset_value lastdec - lastinc I have already test the patch on s3c6410 . It is work perfect. Before I am not use the patch, When I use the command nand read, The some information will generate. as following: raise: Signal # 8 caught I also trace the timer.c, But I can't resolve it. As if after the first initial timer, I guess the bss will be clear. Now It is ok after patch this patch. Thanks, seedshope Thanks, seedshope Signed-off-by: Minkyu Kangmk7.k...@samsung.com Signed-off-by: Darius Augulisaugulis.dar...@gmail.com cc: Heiko Schocherh...@denx.de --- arch/arm/cpu/arm1176/s3c64xx/timer.c | 40 + 1 files changed, 16 insertions(+), 24 deletions(-) diff --git a/arch/arm/cpu/arm1176/s3c64xx/timer.c b/arch/arm/cpu/arm1176/s3c64xx/timer.c index 9768319..c1280f2 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/timer.c +++ b/arch/arm/cpu/arm1176/s3c64xx/timer.c @@ -43,7 +43,7 @@ #includeasm/arch/s3c6400.h #includediv64.h -static ulong timer_load_val; +DECLARE_GLOBAL_DATA_PTR; #define PRESCALER167 @@ -60,12 +60,6 @@ static inline ulong read_timer(void) return timers-TCNTO4; } -/* Internal tick units */ -/* Last decremneter snapshot */ -static unsigned long lastdec; -/* Monotonic incrementing timer */ -static unsigned long long timestamp; - int timer_init(void) { s3c64xx_timers *const timers = s3c64xx_get_base_timers(); @@ -83,20 +77,18 @@ int timer_init(void) * the prescaler automatically for other PCLK frequencies. */ timers-TCFG0 = PRESCALER 8; -if (timer_load_val == 0) { -timer_load_val = get_PCLK() / PRESCALER * (100 / 4); /* 100s */ -timers-TCFG1 = (timers-TCFG1 ~0xf) | 0x2; -} +gd-timer_rate_hz = get_PCLK() / PRESCALER * (100 / 4); /* 100s */ +timers-TCFG1 = (timers-TCFG1 ~0xf) | 0x2; /* load value for 10 ms timeout */ -lastdec = timers-TCNTB4 = timer_load_val; +gd-lastinc = timers-TCNTB4 = gd-timer_rate_hz; /* auto load, manual update of Timer 4 */ timers-TCON = (timers-TCON ~0x0070) | TCON_4_AUTO | TCON_4_UPDATE; /* auto load, start Timer 4 */ timers-TCON = (timers-TCON ~0x0070) | TCON_4_AUTO | COUNT_4_ON; -timestamp = 0; +gd-timer_reset_value = 0; return 0; } @@ -113,16 +105,16 @@ unsigned long long get_ticks(void) { ulong now = read_timer(); -if (lastdec= now) { +if (gd-lastinc= now) { /* normal mode */ -timestamp += lastdec - now; +gd-timer_reset_value += gd-lastinc - now; } else { /* we have an overflow ... */ -timestamp += lastdec + timer_load_val - now; +gd-timer_reset_value += gd-lastinc + gd-timer_rate_hz - now; } -lastdec = now; +gd-lastinc = now; -return timestamp; +return gd-timer_reset_value; } /* @@ -132,14 +124,14 @@ unsigned long long get_ticks(void) ulong get_tbclk(void) { /* We overrun in 100s */ -return (ulong)(timer_load_val / 100); +return (ulong)(gd-timer_rate_hz / 100); } void reset_timer_masked(void) { /* reset time */ -lastdec = read_timer(); -timestamp = 0; +gd-lastinc = read_timer(); +gd-timer_reset_value = 0; } void reset_timer(void) @@ -150,7 +142,7 @@ void reset_timer(void) ulong get_timer_masked(void) { unsigned long long res = get_ticks(); -do_div (res, (timer_load_val / (100 * CONFIG_SYS_HZ))); +do_div(res, (gd-timer_rate_hz / (100 * CONFIG_SYS_HZ))); return res; } @@ -161,7 +153,7 @@ ulong get_timer(ulong base) void set_timer(ulong t) { -timestamp = t * (timer_load_val / (100 * CONFIG_SYS_HZ)); +gd-timer_reset_value = t * (gd-timer_rate_hz / (100 * CONFIG_SYS_HZ)); } void __udelay(unsigned long usec) @@ -170,7 +162,7 @@ void __udelay(unsigned long usec) ulong tmo; tmo = (usec + 9) / 10; -tmp = get_ticks() + tmo;/* get current timestamp */ +tmp = get_ticks() + tmo;/* get current timer_reset_value */ while (get_ticks() tmp)/* loop till event */ /*NOP*/; ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot