aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdk8/reset_test.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2017-04-19 12:52:43 +0200
committerMartin Roth <martinroth@google.com>2017-04-28 17:17:40 +0200
commit3eff00ec76f91f5dc9ddf39e2e6073f6053c94a1 (patch)
tree02d2f86e299d53c68cf1c774e6f176d8831ee195 /src/northbridge/amd/amdk8/reset_test.c
parent00f360e3f1411925e56676bc4b2ec1b961dcde25 (diff)
nb/amd/amdk8: Link reset_test.c
This needs some extra headers in amdk8/raminit.c that were otherwise provided by that file. Change-Id: I80450e5eb32eb502b3d777c56790db90491fc995 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19360 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/northbridge/amd/amdk8/reset_test.c')
-rw-r--r--src/northbridge/amd/amdk8/reset_test.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/northbridge/amd/amdk8/reset_test.c b/src/northbridge/amd/amdk8/reset_test.c
index f998c48b56..0d30016b34 100644
--- a/src/northbridge/amd/amdk8/reset_test.c
+++ b/src/northbridge/amd/amdk8/reset_test.c
@@ -1,10 +1,8 @@
+#include <arch/io.h>
+#include <console/console.h>
#include <stdint.h>
#include <cpu/x86/lapic.h>
-#include "raminit.h"
-
-#define HTIC_ColdR_Detect (1<<4)
-#define HTIC_BIOSR_Detect (1<<5)
-#define HTIC_INIT_Detect (1<<6)
+#include "amdk8.h"
static inline int cpu_init_detected(unsigned nodeid)
{
@@ -33,7 +31,7 @@ static inline int cold_reset_detected(void)
return !(htic & HTIC_ColdR_Detect);
}
-static inline void distinguish_cpu_resets(unsigned nodeid)
+void distinguish_cpu_resets(unsigned int nodeid)
{
u32 htic;
pci_devfn_t device;
@@ -43,7 +41,6 @@ static inline void distinguish_cpu_resets(unsigned nodeid)
pci_io_write_config32(device, HT_INIT_CONTROL, htic);
}
-void set_bios_reset(void);
void set_bios_reset(void)
{
u32 htic;
@@ -71,7 +68,7 @@ static unsigned node_link_to_bus(unsigned node, unsigned link)
return 0;
}
-static inline unsigned get_sblk(void)
+unsigned int get_sblk(void)
{
u32 reg;
/* read PCI_DEV(0,0x18,0) 0x64 bit [8:9] to find out SbLink m */
@@ -79,7 +76,7 @@ static inline unsigned get_sblk(void)
return ((reg>>8) & 3);
}
-static inline unsigned get_sbbusn(unsigned sblk)
+unsigned int get_sbbusn(unsigned sblk)
{
return node_link_to_bus(0, sblk);
}