From 44443696afed62f074dab1468c270ab207f5bb69 Mon Sep 17 00:00:00 2001 From: Asami Doi Date: Fri, 12 Jul 2019 12:46:02 +0900 Subject: lib: Remove the BOOTBLOCK_CUSTOM compile guard This CL allows that everyone can use main() in lib/bootblock.c even if you select CONFIG_BOOTBLOCK_CUSTOM. I also rename main functions used in some soc/ to avoid the collision with the main function defined at lib/bootblock.c. Change-Id: I0575c9d1ce9dea9facfcc86760dff4deee9c1e29 Signed-off-by: Asami Doi Reviewed-on: https://review.coreboot.org/c/coreboot/+/34250 Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) --- src/soc/nvidia/tegra124/bootblock.c | 5 ++++- src/soc/nvidia/tegra124/bootblock_asm.S | 2 +- src/soc/nvidia/tegra210/bootblock.c | 5 ++++- src/soc/nvidia/tegra210/bootblock_asm.S | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/soc') diff --git a/src/soc/nvidia/tegra124/bootblock.c b/src/soc/nvidia/tegra124/bootblock.c index c7503041b4..1793aaf3de 100644 --- a/src/soc/nvidia/tegra124/bootblock.c +++ b/src/soc/nvidia/tegra124/bootblock.c @@ -26,6 +26,9 @@ #include #include +/* called from assembly in bootblock_asm.S */ +void tegra124_main(void); + static void run_next_stage(void *entry) { ASSERT(entry); @@ -41,7 +44,7 @@ static void run_next_stage(void *entry) clock_halt_avp(); } -void main(void) +void tegra124_main(void) { // enable pinmux clamp inputs clamp_tristate_inputs(); diff --git a/src/soc/nvidia/tegra124/bootblock_asm.S b/src/soc/nvidia/tegra124/bootblock_asm.S index 0391ebf1ac..dca5314dc9 100644 --- a/src/soc/nvidia/tegra124/bootblock_asm.S +++ b/src/soc/nvidia/tegra124/bootblock_asm.S @@ -66,5 +66,5 @@ call_bootblock: * Thumb. However, "b" will not and GCC may attempt to create a * wrapper which is currently broken. */ - bl main + bl tegra124_main ENDPROC(_start) diff --git a/src/soc/nvidia/tegra210/bootblock.c b/src/soc/nvidia/tegra210/bootblock.c index 96fb9b22d5..383e578eeb 100644 --- a/src/soc/nvidia/tegra210/bootblock.c +++ b/src/soc/nvidia/tegra210/bootblock.c @@ -31,6 +31,9 @@ #define ODMDATA_OFFSET_IN_BCT 0x508 #define TEGRA_SRAM_MAX (TEGRA_SRAM_BASE + TEGRA_SRAM_SIZE) +/* called from assembly in bootblock_asm.S */ +void tegra210_main(void); + static void save_odmdata(void) { struct tegra_pmc_regs *pmc = (struct tegra_pmc_regs*)TEGRA_PMC_BASE; @@ -155,7 +158,7 @@ static void mbist_workaround(void) } } -void main(void) +void tegra210_main(void) { // enable JTAG at the earliest stage enable_jtag(); diff --git a/src/soc/nvidia/tegra210/bootblock_asm.S b/src/soc/nvidia/tegra210/bootblock_asm.S index 62554422db..6ea154abab 100644 --- a/src/soc/nvidia/tegra210/bootblock_asm.S +++ b/src/soc/nvidia/tegra210/bootblock_asm.S @@ -37,5 +37,5 @@ ENTRY(_start) */ msr cpsr_cxf, #0xdf - stack_init stack_top=_estack stack_bottom=_stack seed=1 func=main + stack_init stack_top=_estack stack_bottom=_stack seed=1 func=tegra210_main ENDPROC(_start) -- cgit v1.2.3