diff options
author | Maciej Pijanka <maciej.pijanka@gmail.com> | 2009-10-27 14:29:29 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2009-10-27 14:29:29 +0000 |
commit | ea92185755a578d9a1b5df5cbf7b05ee2cea2390 (patch) | |
tree | d7ffa935cad6e5ae7b50fa5c9ec158e0493df0c5 /src | |
parent | 18d7c2e31e868c9f9f78b907f607b8a1b98b46aa (diff) |
Add few missing prototypes, and remove few unused (thus lonelly) variables.
TODO
- x86emu need (imo) some common header with prototypes at least
- clog2, ulzma, hardwaremain prototypes added by this patch probably should
be moved to some header too.
- in src/devices/device_util.c prototype is before function because seems,
it is used only within same file, if not it should be moved to debug
section of prototypes in include/device/device.h
Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4871 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/i386/boot/gdt.c | 1 | ||||
-rw-r--r-- | src/arch/i386/boot/tables.c | 2 | ||||
-rw-r--r-- | src/arch/i386/include/div64.h | 3 | ||||
-rw-r--r-- | src/arch/i386/lib/exception.c | 2 | ||||
-rw-r--r-- | src/arch/i386/lib/printk_init.c | 3 | ||||
-rw-r--r-- | src/boot/hardwaremain.c | 2 | ||||
-rw-r--r-- | src/devices/device_util.c | 2 | ||||
-rw-r--r-- | src/include/cbmem.h | 2 | ||||
-rw-r--r-- | src/include/cpu/x86/mtrr.h | 4 | ||||
-rw-r--r-- | src/include/cpu/x86/tsc.h | 2 | ||||
-rw-r--r-- | src/include/device/device.h | 2 | ||||
-rw-r--r-- | src/lib/cbmem.c | 4 | ||||
-rw-r--r-- | src/lib/clog2.c | 2 | ||||
-rw-r--r-- | src/lib/lzma.c | 1 | ||||
-rw-r--r-- | src/pc80/mc146818rtc.c | 2 | ||||
-rw-r--r-- | src/pc80/udelay_io.c | 1 | ||||
-rw-r--r-- | src/southbridge/intel/i82371eb/i82371eb.h | 1 | ||||
-rw-r--r-- | src/southbridge/intel/i82371eb/i82371eb_isa.c | 1 |
18 files changed, 31 insertions, 6 deletions
diff --git a/src/arch/i386/boot/gdt.c b/src/arch/i386/boot/gdt.c index 232502753f..c4ed37486d 100644 --- a/src/arch/i386/boot/gdt.c +++ b/src/arch/i386/boot/gdt.c @@ -33,6 +33,7 @@ struct gdtarg { } __attribute__((packed)); // Copy GDT to new location and reload it +void move_gdt(void); void move_gdt(void) { void *newgdt; diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c index a6c44eb49f..b47826dd06 100644 --- a/src/arch/i386/boot/tables.c +++ b/src/arch/i386/boot/tables.c @@ -34,8 +34,6 @@ uint64_t high_tables_base = 0; uint64_t high_tables_size; -void cbmem_list(void); - void move_gdt(void); void cbmem_arch_init(void) { diff --git a/src/arch/i386/include/div64.h b/src/arch/i386/include/div64.h index 28ed8b296a..3634f6dd14 100644 --- a/src/arch/i386/include/div64.h +++ b/src/arch/i386/include/div64.h @@ -36,6 +36,9 @@ #define div_long_long_rem(a,b,c) div_ll_X_l_rem(a,b,c) extern inline long +div_ll_X_l_rem(long long divs, long div, long *rem); + +extern inline long div_ll_X_l_rem(long long divs, long div, long *rem) { long dum2; diff --git a/src/arch/i386/lib/exception.c b/src/arch/i386/lib/exception.c index cc923a8f35..f720ba8567 100644 --- a/src/arch/i386/lib/exception.c +++ b/src/arch/i386/lib/exception.c @@ -361,6 +361,8 @@ static void put_packet(char *buffer) #include <arch/registers.h> +void x86_exception(struct eregs *info); + void x86_exception(struct eregs *info) { #if CONFIG_GDB_STUB == 1 diff --git a/src/arch/i386/lib/printk_init.c b/src/arch/i386/lib/printk_init.c index 7e5dfa03dc..f0ad2551bb 100644 --- a/src/arch/i386/lib/printk_init.c +++ b/src/arch/i386/lib/printk_init.c @@ -32,6 +32,9 @@ int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL; #define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL #endif +void console_tx_byte(unsigned char byte); +int do_printk(int msg_level, const char *fmt, ...); + void console_tx_byte(unsigned char byte) { if (byte == '\n') diff --git a/src/boot/hardwaremain.c b/src/boot/hardwaremain.c index 5f5b0efb02..f56069effd 100644 --- a/src/boot/hardwaremain.c +++ b/src/boot/hardwaremain.c @@ -52,6 +52,8 @@ it with the version available from LANL. * In the dev_enumerate() phase, */ +void hardwaremain(int boot_complete); + void hardwaremain(int boot_complete) { struct lb_memory *lb_mem; diff --git a/src/devices/device_util.c b/src/devices/device_util.c index eef4c6fd16..71cd436f0c 100644 --- a/src/devices/device_util.c +++ b/src/devices/device_util.c @@ -556,7 +556,7 @@ void disable_children(struct bus *bus) } } -void resource_tree(struct device *root, int debug_level, int depth) +static void resource_tree(struct device *root, int debug_level, int depth) { int i = 0, link = 0; struct device *child; diff --git a/src/include/cbmem.h b/src/include/cbmem.h index 5048a5d1ff..d814a7285a 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -45,5 +45,7 @@ void cbmem_init(u64 baseaddr, u64 size); int cbmem_reinit(u64 baseaddr); void *cbmem_add(u32 id, u64 size); void *cbmem_find(u32 id); +void cbmem_list(void); +void cbmem_arch_init(void); #endif diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index 51c0b511c7..704a9d4bb1 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -34,10 +34,14 @@ #if !defined(__ROMCC__) && !defined (ASSEMBLY) +#include <device/device.h> +void enable_fixed_mtrr(void); void x86_setup_var_mtrrs(unsigned address_bits); void x86_setup_mtrrs(unsigned address_bits); int x86_mtrr_check(void); +void set_var_mtrr_resource(void *gp, struct device *dev, struct resource *res); +void x86_setup_fixed_mtrrs(void); #endif /* __ROMCC__ */ diff --git a/src/include/cpu/x86/tsc.h b/src/include/cpu/x86/tsc.h index 96afaa6e7d..455cd239fe 100644 --- a/src/include/cpu/x86/tsc.h +++ b/src/include/cpu/x86/tsc.h @@ -24,6 +24,8 @@ static inline unsigned long long rdtscll(void) asm volatile ("rdtsc" : "=A" (val)); return val; } + +void init_timer(void); #endif diff --git a/src/include/device/device.h b/src/include/device/device.h index 5e0e19a2e5..eba6eb50c6 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -132,6 +132,7 @@ void print_resource_tree(struct device * root, int debug_level, void show_devs_tree(struct device *dev, int debug_level, int depth, int linknum); void show_devs_subtree(struct device *root, int debug_level, const char *msg); void show_all_devs(int debug_level, const char *msg); +void show_all_devs_tree(int debug_level, const char *msg); void show_one_resource(int debug_level, struct device *dev, struct resource *resource, const char *comment); void show_all_devs_resources(int debug_level, const char* msg); @@ -152,4 +153,5 @@ void enable_childrens_resources(device_t dev); void root_dev_enable_resources(device_t dev); unsigned int root_dev_scan_bus(device_t root, unsigned int max); void root_dev_init(device_t dev); +void root_dev_reset(struct bus *bus); #endif /* DEVICE_H */ diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c index 0ed4bc43ea..450ab5f585 100644 --- a/src/lib/cbmem.c +++ b/src/lib/cbmem.c @@ -90,7 +90,7 @@ int cbmem_reinit(u64 baseaddr) struct cbmem_entry *cbmem_toc; cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr; - debug("Re-Initializing CBMEM area to 0x%lx\n", baseaddr); + debug("Re-Initializing CBMEM area to 0x%lx\n", (unsigned long)baseaddr); #ifndef __ROMCC__ bss_cbmem_toc = cbmem_toc; #endif @@ -212,7 +212,7 @@ void cbmem_list(void) #endif if (cbmem_toc == NULL) - return NULL; + return; for (i = 0; i < MAX_CBMEM_ENTRIES; i++) { diff --git a/src/lib/clog2.c b/src/lib/clog2.c index b9b173177c..f7c6e59284 100644 --- a/src/lib/clog2.c +++ b/src/lib/clog2.c @@ -7,6 +7,8 @@ /* Assume 8 bits per byte */ #define CHAR_BIT 8 +unsigned long log2(unsigned long x); + unsigned long log2(unsigned long x) { // assume 8 bits per byte. diff --git a/src/lib/lzma.c b/src/lib/lzma.c index 25597fba49..03ca16399a 100644 --- a/src/lib/lzma.c +++ b/src/lib/lzma.c @@ -14,6 +14,7 @@ SDK 4.42, which is written and distributed to public domain by Igor Pavlov. #include <console/console.h> #include <string.h> +unsigned long ulzma(unsigned char * src, unsigned char * dst); unsigned long ulzma(unsigned char * src, unsigned char * dst) { diff --git a/src/pc80/mc146818rtc.c b/src/pc80/mc146818rtc.c index e851bdceb8..fe3c13cd1d 100644 --- a/src/pc80/mc146818rtc.c +++ b/src/pc80/mc146818rtc.c @@ -133,8 +133,10 @@ static void rtc_set_checksum(int range_start, int range_end, int cks_loc) void rtc_init(int invalid) { +#if CONFIG_HAVE_OPTION_TABLE unsigned char x; int cmos_invalid, checksum_invalid; +#endif printk_debug("RTC Init\n"); diff --git a/src/pc80/udelay_io.c b/src/pc80/udelay_io.c index 7a5320e370..37f3f73186 100644 --- a/src/pc80/udelay_io.c +++ b/src/pc80/udelay_io.c @@ -1,4 +1,5 @@ #include <arch/io.h> +#include <delay.h> void udelay(unsigned usecs) { diff --git a/src/southbridge/intel/i82371eb/i82371eb.h b/src/southbridge/intel/i82371eb/i82371eb.h index 5797fce498..00c19e04e3 100644 --- a/src/southbridge/intel/i82371eb/i82371eb.h +++ b/src/southbridge/intel/i82371eb/i82371eb.h @@ -24,6 +24,7 @@ #ifndef __ROMCC__ #include "chip.h" void i82371eb_enable(device_t dev); +void i82371eb_hard_reset(void); #endif /* If 'cond' is true this macro sets the bit(s) specified by 'bits' in the diff --git a/src/southbridge/intel/i82371eb/i82371eb_isa.c b/src/southbridge/intel/i82371eb/i82371eb_isa.c index 6a8de8d80e..bc6465b280 100644 --- a/src/southbridge/intel/i82371eb/i82371eb_isa.c +++ b/src/southbridge/intel/i82371eb/i82371eb_isa.c @@ -29,7 +29,6 @@ static void isa_init(struct device *dev) { - u16 reg16; u32 reg32; /* Initialize the real time clock (RTC). */ |