
Dear fenghua@phytium.com.cn,
In message 1378734616-37558-4-git-send-email-fenghua@phytium.com.cn you wrote:
From: David Feng fenghua@phytium.com.cn
- function board_init_f in board_f.c should firstly zero gd_t structure before it call initcall_run_list, otherwise the debug print will go run if DEBUG is defined. Because the printf function will use global data to determine whether serial port is initialized and could be written.
- function board_init_r in board_r.c should firstly relocate init_sequence_r table before it call initcall_run_list. Command table also should be relocated.
Please restrict the line length of your commit messages to some 70 characters or so.
--- a/common/board_f.c +++ b/common/board_f.c @@ -458,7 +458,11 @@ static int reserve_round_4k(void) static int reserve_mmu(void) { /* reserve TLB table */ +#ifndef CONFIG_ARMV8 gd->arch.tlb_size = 4096 * 4; +#else
- gd->arch.tlb_size = 0x10000;
+#endif gd->relocaddr -= gd->arch.tlb_size;
Please avoid such #ifdef's in the code. Replace the hard coded default (here 0x10000) by a variable, and define these as needed.
-#if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC512X) && \
!defined(CONFIG_MPC83xx) && !defined(CONFIG_MPC85xx) && \
!defined(CONFIG_MPC86xx) && !defined(CONFIG_X86)
- zero_global_data,
-#endif #ifdef CONFIG_SANDBOX setup_ram_buf, #endif @@ -1005,6 +1004,14 @@ void board_init_f(ulong boot_flags) gd = &data; #endif
- /*
* Zero gd_t first, otherwise the debug print in initcall_run_list
* function before zero_global_data is called will go wrong.
*/
+#ifndef CONFIG_X86
- zero_global_data();
+#endif
This change does not look right to me. The condition was much different before.
Best regards,
Wolfgang Denk