Index: svn/src/superio/smsc/lpc47b397/superio.c
===================================================================
--- svn.orig/src/superio/smsc/lpc47b397/superio.c
+++ svn/src/superio/smsc/lpc47b397/superio.c
@@ -74,7 +74,7 @@ static void lpc47b397_init(device_t dev)
 
 }
 
-void lpc47b397_pnp_set_resources(device_t dev)
+static void lpc47b397_pnp_set_resources(device_t dev)
 {
 
 	pnp_enter_conf_state(dev);
@@ -89,7 +89,7 @@ void lpc47b397_pnp_set_resources(device_
 
 }
 
-void lpc47b397_pnp_enable_resources(device_t dev)
+static void lpc47b397_pnp_enable_resources(device_t dev)
 {
 
 	pnp_enter_conf_state(dev);
@@ -112,7 +112,7 @@ void lpc47b397_pnp_enable_resources(devi
 
 }
 
-void lpc47b397_pnp_enable(device_t dev)
+static void lpc47b397_pnp_enable(device_t dev)
 {
 
 	pnp_enter_conf_state(dev);
Index: svn/src/northbridge/amd/amdk8/raminit.c
===================================================================
--- svn.orig/src/northbridge/amd/amdk8/raminit.c
+++ svn/src/northbridge/amd/amdk8/raminit.c
@@ -1080,7 +1080,7 @@ static unsigned long order_chip_selects(
 	return (tom & ~0xff000000) << 15;
 }
 
-unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
+static unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
 {
 	unsigned node_id;
 	unsigned end_k;
Index: svn/src/northbridge/amd/amdk8/raminit_f.c
===================================================================
--- svn.orig/src/northbridge/amd/amdk8/raminit_f.c
+++ svn/src/northbridge/amd/amdk8/raminit_f.c
@@ -1253,7 +1253,7 @@ static unsigned long order_chip_selects(
 	return (tom & ~0xff000000) << (27-10);
 }
 
-unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
+static unsigned long memory_end_k(const struct mem_controller *ctrl, int max_node_id)
 {
 	unsigned node_id;
 	unsigned end_k;
Index: svn/src/include/cpu/cpu.h
===================================================================
--- svn.orig/src/include/cpu/cpu.h
+++ svn/src/include/cpu/cpu.h
@@ -7,6 +7,17 @@ struct bus;
 
 void cpu_initialize(void);
 void initialize_cpus(struct bus *cpu_bus);
+void secondary_cpu_init(void);
+
+#if CONFIG_WAIT_BEFORE_CPUS_INIT==0
+	#define cpus_ready_for_init() do {} while(0)
+#else
+	void cpus_ready_for_init(void);
+#endif
+
+#if CONFIG_HAVE_SMI_HANDLER
+void smm_init(void);
+#endif
 
 #define __cpu_driver __attribute__ ((used,__section__(".rodata.cpu_driver")))
 /** start of compile time generated pci driver array */
Index: svn/src/northbridge/amd/amdfam10/amdfam10_acpi.c
===================================================================
--- svn.orig/src/northbridge/amd/amdfam10/amdfam10_acpi.c
+++ svn/src/northbridge/amd/amdfam10/amdfam10_acpi.c
@@ -82,7 +82,7 @@ struct acpi_srat_mem_state {
 	unsigned long current;
 };
 
-void set_srat_mem(void *gp, struct device *dev, struct resource *res)
+static void set_srat_mem(void *gp, struct device *dev, struct resource *res)
 {
 	struct acpi_srat_mem_state *state = gp;
 	unsigned long basek, sizek;
Index: svn/src/northbridge/amd/amdk8/amdk8_acpi.c
===================================================================
--- svn.orig/src/northbridge/amd/amdk8/amdk8_acpi.c
+++ svn/src/northbridge/amd/amdk8/amdk8_acpi.c
@@ -45,6 +45,7 @@ acknowledgement of AMD's proprietary rig
 #include <cpu/x86/msr.h>
 #include <cpu/amd/mtrr.h>
 #include <cpu/amd/amdk8_sysconf.h>
+#include "amdk8_acpi.h"
 
 //it seems some functions can be moved arch/i386/boot/acpi.c
 
@@ -102,7 +103,7 @@ struct acpi_srat_mem_state {
 	unsigned long current;
 };
 
-void set_srat_mem(void *gp, struct device *dev, struct resource *res)
+static void set_srat_mem(void *gp, struct device *dev, struct resource *res)
 {
 	struct acpi_srat_mem_state *state = gp;
 	unsigned long basek, sizek;
Index: svn/src/cpu/amd/model_fxx/model_fxx_init.c
===================================================================
--- svn.orig/src/cpu/amd/model_fxx/model_fxx_init.c
+++ svn/src/cpu/amd/model_fxx/model_fxx_init.c
@@ -30,6 +30,7 @@
 
 #include <cpu/amd/model_fxx_msr.h>
 
+#if CONFIG_WAIT_BEFORE_CPUS_INIT
 void cpus_ready_for_init(void)
 {
 #if CONFIG_MEM_TRAIN_SEQ == 1
@@ -38,7 +39,7 @@ void cpus_ready_for_init(void)
         wait_all_core0_mem_trained(sysinfox);
 #endif
 }
-
+#endif
 
 #if CONFIG_K8_REV_F_SUPPORT == 0
 int is_e0_later_in_bsp(int nodeid)
@@ -463,13 +464,12 @@ static inline void k8_errata(void)
 }
 
 extern void model_fxx_update_microcode(unsigned cpu_deviceid);
-int init_processor_name(void);
 
 #if CONFIG_USBDEBUG_DIRECT
 static unsigned ehci_debug_addr;
 #endif
 
-void model_fxx_init(device_t dev)
+static void model_fxx_init(device_t dev)
 {
 	unsigned long i;
 	msr_t msr;
Index: svn/src/devices/hypertransport.c
===================================================================
--- svn.orig/src/devices/hypertransport.c
+++ svn/src/devices/hypertransport.c
@@ -613,7 +613,7 @@ unsigned int hypertransport_scan_chain(s
  *
  * @return The maximum bus number found, after scanning all subordinate busses
  */
-unsigned int hypertransport_scan_chain_x(struct bus *bus,
+static unsigned int hypertransport_scan_chain_x(struct bus *bus,
         unsigned min_devfn, unsigned max_devfn, unsigned int max)
 {
 	unsigned ht_unitid_base[4];
Index: svn/src/include/cpu/amd/model_10xxx_rev.h
===================================================================
--- svn.orig/src/include/cpu/amd/model_10xxx_rev.h
+++ svn/src/include/cpu/amd/model_10xxx_rev.h
@@ -19,4 +19,6 @@
 
 #include <arch/cpu.h>
 
+int init_processor_name(void);
+
 /* place holder for Family 10 revision code */
Index: svn/src/include/cpu/amd/model_fxx_rev.h
===================================================================
--- svn.orig/src/include/cpu/amd/model_fxx_rev.h
+++ svn/src/include/cpu/amd/model_fxx_rev.h
@@ -1,5 +1,7 @@
 #include <arch/cpu.h>
 
+int init_processor_name(void);
+
 #if CONFIG_K8_REV_F_SUPPORT == 0
 static inline int is_cpu_rev_a0(void)
 {
Index: svn/src/cpu/x86/lapic/lapic_cpu_init.c
===================================================================
--- svn.orig/src/cpu/x86/lapic/lapic_cpu_init.c
+++ svn/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -448,16 +448,6 @@ static void wait_other_cpus_stop(struct 
 #define initialize_other_cpus(root) do {} while(0)
 #endif /* CONFIG_SMP */
 
-#if CONFIG_WAIT_BEFORE_CPUS_INIT==0
-	#define cpus_ready_for_init() do {} while(0)
-#else
-	void cpus_ready_for_init(void);
-#endif
-
-#if CONFIG_HAVE_SMI_HANDLER
-void smm_init(void);
-#endif
-
 void initialize_cpus(struct bus *cpu_bus)
 {
 	struct device_path cpu_path;
Index: svn/src/cpu/amd/model_10xxx/processor_name.c
===================================================================
--- svn.orig/src/cpu/amd/model_10xxx/processor_name.c
+++ svn/src/cpu/amd/model_10xxx/processor_name.c
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <cpu/x86/msr.h>
 #include <cpu/cpu.h>
+#include <cpu/amd/model_10xxx_rev.h>
 
 extern void wrmsr_amd(u32 index, msr_t msr);
 
Index: svn/src/cpu/amd/model_fxx/processor_name.c
===================================================================
--- svn.orig/src/cpu/amd/model_fxx/processor_name.c
+++ svn/src/cpu/amd/model_fxx/processor_name.c
@@ -35,6 +35,7 @@
 #include <console/console.h>
 #include <string.h>
 #include <cpu/x86/msr.h>
+#include <cpu/amd/model_fxx_rev.h>
 
 /* The maximum length of CPU names is 48 bytes, including the final NULL byte.
  * If you change these names your BIOS will _NOT_ pass the AMD validation and
@@ -110,39 +111,6 @@ static inline void wrmsr_amd(unsigned in
                 );
 }
 
-static inline unsigned int cpuid_eax(unsigned int op)
-{
-        unsigned int eax;
-
-        __asm__("cpuid"
-                : "=a" (eax)
-                : "0" (op)
-                : "ebx", "ecx", "edx");
-        return eax;
-}
-
-static inline unsigned int cpuid_ebx(unsigned int op)
-{
-        unsigned int eax, ebx;
-
-        __asm__("cpuid"
-                : "=a" (eax), "=b" (ebx)
-                : "0" (op)
-                : "ecx", "edx" );
-        return ebx;
-}
-
-static inline unsigned int cpuid_ecx(unsigned int op)
-{
-        unsigned int eax, ecx;
-
-        __asm__("cpuid"
-                : "=a" (eax), "=c" (ecx)
-                : "0" (op)
-                : "ebx", "edx" );
-        return ecx;
-}
-
 static inline void strcpy(char *dst, const char *src)
 {
 	while (*src) *dst++ = *src++;
Index: svn/src/include/delay.h
===================================================================
--- svn.orig/src/include/delay.h
+++ svn/src/include/delay.h
@@ -1,6 +1,6 @@
 #ifndef DELAY_H
 #define DELAY_H
-#if !defined( __ROMCC__) && defined (__GNUC__)
+#if !defined( __ROMCC__)
 
 void udelay(unsigned usecs);
 void mdelay(unsigned msecs);
Index: svn/src/southbridge/nvidia/ck804/ck804_reset.c
===================================================================
--- svn.orig/src/southbridge/nvidia/ck804/ck804_reset.c
+++ svn/src/southbridge/nvidia/ck804/ck804_reset.c
@@ -4,6 +4,7 @@
  */
 
 #include <arch/io.h>
+#include <part/hard_reset.h>
 
 #define PCI_DEV(BUS, DEV, FN) ( \
 	(((BUS) & 0xFFF) << 20) | \
