nb/amd/amdk8/exit_from_self.c: Use linker instead of include

Don't #include *. but use linker.

Change-Id: I716b37e71ab3a4409709357f50f79e3149ede2b6
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19027
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Arthur Heymans 2017-03-28 11:06:29 +02:00 committed by Martin Roth
parent 4c40229b4c
commit 1f8a28cbae
7 changed files with 17 additions and 9 deletions

View File

@ -4,6 +4,9 @@ ramstage-y += northbridge.c
ramstage-y += misc_control.c
ramstage-y += get_sblk_pci1234.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ifeq ($(CONFIG_K8_REV_F_SUPPORT),y)
romstage-$(CONFIG_HAVE_ACPI_RESUME) += exit_from_self.c
endif
# Enable this if you want to check the values of the PCI routing registers.
# Call show_all_routes() anywhere amdk8.h is included.

View File

@ -13,7 +13,13 @@
* GNU General Public License for more details.
*/
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/lapic.h>
#include <delay.h>
#include <cpu/amd/mtrr.h>
#include "raminit.h"
#include "f.h"
void exit_from_self(int controllers, const struct mem_controller *ctrl,
struct sys_info *sysinfo)

View File

@ -584,4 +584,6 @@ static inline void wait_all_core0_mem_trained(struct sys_info *sysinfo)
}
#endif
void dqs_restore_MC_NVRAM(unsigned int dev);
#endif /* AMDK8_F_H */

View File

@ -2266,7 +2266,7 @@ static uint32_t hoist_memory(int controllers, const struct mem_controller *ctrl,
return carry_over;
}
static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl)
void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl)
{
uint32_t hole_startk;
@ -2325,7 +2325,6 @@ static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl)
#endif
#define TIMEOUT_LOOPS 300000
#if CONFIG_RAMINIT_SYSINFO
static void sdram_enable(int controllers, const struct mem_controller *ctrl, struct sys_info *sysinfo)
#else

View File

@ -14,6 +14,9 @@ struct mem_controller {
struct sys_info;
void exit_from_self(int controllers, const struct mem_controller *ctrl, struct sys_info *sysinfo);
void setup_resource_map(const unsigned int *register_values, int max);
void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl);
#define TIMEOUT_LOOPS 300000
#if defined(__PRE_RAM__) && CONFIG_RAMINIT_SYSINFO
void sdram_initialize(int controllers, const struct mem_controller *ctrl, void *sysinfo);

View File

@ -2860,8 +2860,6 @@ static void sdram_set_spd_registers(const struct mem_controller *ctrl,
return;
}
#define TIMEOUT_LOOPS 300000
#include "raminit_f_dqs.c"
#if CONFIG_HW_MEM_HOLE_SIZEK != 0
@ -2919,7 +2917,7 @@ static uint32_t hoist_memory(int controllers, const struct mem_controller *ctrl,
return carry_over;
}
static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl)
void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl)
{
uint32_t hole_startk;
@ -2972,9 +2970,6 @@ static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl)
}
#endif
#if CONFIG_HAVE_ACPI_RESUME
#include "exit_from_self.c"
#endif
static void sdram_enable(int controllers, const struct mem_controller *ctrl,
struct sys_info *sysinfo)

View File

@ -1848,7 +1848,7 @@ static void dqs_save_MC_NVRAM(unsigned int dev)
}
#endif
static void dqs_restore_MC_NVRAM(unsigned int dev)
void dqs_restore_MC_NVRAM(unsigned int dev)
{
int pos = 0;
u32 reg;