fsp platfoms: add prototype & consolidate main entry-point

- In '-ffreestanding' main() is just as any other function and so
it needs a type-signature. Fixes a clang warning.

- Bay Trail and Rangeley have the updated romstage.c with the code
moved into the chipset, put the prototype in romstage.c.

- The sandybridge code has not been updated, so the prototype
for it goes into chipset_fsp_util.h, next to the prototype for
romstage_main_continue.

- Correct the return value of baytrail main() from void * to void
and remove the unnecessary asmlinkage tag. I'm surprised that this
didn't generate a warning...

Change-Id: I85ac0797d1e55d2b7ffdca039a52820d7827e704
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/7724
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
This commit is contained in:
Martin Roth 2014-12-08 10:53:19 -07:00 committed by Martin Roth
parent c43bce57f7
commit a0a71b046a
5 changed files with 8 additions and 6 deletions

View File

@ -172,7 +172,6 @@ static void rcba_config(void)
RCBA32(FD) = reg32;
}
void main(FSP_INFO_HEADER *fsp_info_header); // XXX find a better place dorothy
void main(FSP_INFO_HEADER *fsp_info_header)
{
#if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)

View File

@ -60,6 +60,9 @@
#define FSP_IMAGE_ID_DWORD1 0x00505346
#endif
#ifdef __PRE_RAM__
void main(FSP_INFO_HEADER *fsp_info_header);
void romstage_main_continue(EFI_STATUS status, VOID *HobListPtr);
#endif
#endif /* CHIPSET_FSP_UTIL_H */

View File

@ -29,9 +29,9 @@ void report_platform_info(void);
#include <stdint.h>
#include <arch/cpu.h>
#include <drivers/intel/fsp/fsp_util.h>
#include <fsptypes.h>
void main(FSP_INFO_HEADER *fsp_info_header);
void romstage_main_continue(EFI_STATUS status, void *hob_list_ptr);
uint32_t chipset_prev_sleep_state(uint32_t clear);

View File

@ -152,7 +152,7 @@ static void baytrail_rtc_init(void)
}
/* Entry from cache-as-ram.inc. */
void * asmlinkage main(FSP_INFO_HEADER *fsp_info_header)
void main(FSP_INFO_HEADER *fsp_info_header)
{
const unsigned long func_dis = PMC_BASE_ADDRESS + FUNC_DIS;
const unsigned long func_dis2 = PMC_BASE_ADDRESS + FUNC_DIS2;

View File

@ -27,9 +27,9 @@
#include <stdint.h>
#include <arch/cpu.h>
#include <drivers/intel/fsp/fsp_util.h>
#include <fsptypes.h>
void main(FSP_INFO_HEADER *fsp_info_header);
void early_mainboard_romstage_entry(void);
void late_mainboard_romstage_entry(void);
void get_func_disables(uint32_t *mask);