Sven Schnelle (svens@stackframe.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/349
-gerrit
commit 9c6f9594620284770f91cd7a7d31bd1c25988ff9 Author: Sven Schnelle svens@stackframe.org Date: Fri Oct 28 21:20:36 2011 +0200
Fix compilation with CONFIG_USBDEBUG enabled
Compilation fails with: src/console/console.c: In function ‘console_init’: src/console/console.c:104:2: error: implicit declaration of function ‘enable_usbdebug’ [-Werror=implicit-function-declaration] src/console/console.c:105:2: error: implicit declaration of function ‘early_usbdebug_init’ [-Werror=implicit-function-declaration]
and
build/cpu/x86/smm/smm.o: In function `console_tx_byte': /home/svens/coreboot/coreboot/src/cpu/x86/smm/smiutil.c:62: undefined reference to `usbdebug_tx_byte'
move the declarations from the southbridge code to usbdebug.h, as the prototypes are now unified. Also fix compilation for SMM code.
Change-Id: Ic444a4ba22710f05af758497935edc277c95c752 Signed-off-by: Sven Schnelle svens@stackframe.org --- src/console/console.c | 3 +++ src/include/usbdebug.h | 1 + src/lib/Makefile.inc | 1 + src/lib/usbdebug.c | 2 +- src/southbridge/amd/sb600/sb600.h | 1 - src/southbridge/amd/sb700/sb700.h | 2 -- src/southbridge/amd/sb800/sb800.h | 1 - src/southbridge/intel/i82801gx/i82801gx.h | 1 - src/southbridge/nvidia/ck804/ck804.h | 1 - src/southbridge/nvidia/mcp55/mcp55.h | 1 - src/southbridge/sis/sis966/sis966.h | 4 ---- 11 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/console/console.c b/src/console/console.c index a73616e..b76c146 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -29,6 +29,9 @@ #if CONFIG_CONSOLE_NE2K #include <console/ne2k.h> #endif +#ifdef CONFIG_USBDEBUG +#include <usbdebug.h> +#endif
#ifndef __PRE_RAM__ #include <string.h> diff --git a/src/include/usbdebug.h b/src/include/usbdebug.h index 281ccde..ab46c3b 100644 --- a/src/include/usbdebug.h +++ b/src/include/usbdebug.h @@ -40,5 +40,6 @@ unsigned get_ehci_debug(void); void set_debug_port(unsigned port); int early_usbdebug_init(void); void usbdebug_tx_byte(unsigned char data); +void enable_usbdebug(unsigned int port);
#endif diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index b207ffe..8f7ca43 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -32,6 +32,7 @@ ramstage-y += cbmem.c ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c ramstage-$(CONFIG_USBDEBUG) += usbdebug.c +smm-$(CONFIG_USBDEBUG) += usbdebug.c ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c ramstage-$(CONFIG_TRACE) += trace.c
diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c index d022d2f..8a1a74d 100644 --- a/src/lib/usbdebug.c +++ b/src/lib/usbdebug.c @@ -575,6 +575,7 @@ int early_usbdebug_init(void)
return usbdebug_init(CONFIG_EHCI_BAR, CONFIG_EHCI_DEBUG_OFFSET, dbg_info); } +#endif
void usbdebug_tx_byte(unsigned char data) { @@ -588,4 +589,3 @@ void usbdebug_tx_byte(unsigned char data) dbgp_bulk_write_x(dbg_info, (char*)&data, 1); } } -#endif diff --git a/src/southbridge/amd/sb600/sb600.h b/src/southbridge/amd/sb600/sb600.h index 97a7ad2..629f389 100644 --- a/src/southbridge/amd/sb600/sb600.h +++ b/src/southbridge/amd/sb600/sb600.h @@ -40,5 +40,4 @@ void sb600_enable(device_t dev); void sb600_lpc_port80(void); void sb600_pci_port80(void);
-void enable_usbdebug(unsigned int port); #endif /* SB600_H */ diff --git a/src/southbridge/amd/sb700/sb700.h b/src/southbridge/amd/sb700/sb700.h index 794dd96..165c72d 100755 --- a/src/southbridge/amd/sb700/sb700.h +++ b/src/southbridge/amd/sb700/sb700.h @@ -82,8 +82,6 @@ int acpi_is_wakeup_early(void); int s3_save_nvram_early(u32 dword, int size, int nvram_pos); int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);
-void enable_usbdebug(unsigned int port); - u32 __attribute__ ((weak)) get_sbdn(u32 bus); void __attribute__((weak)) enable_fid_change_on_sb(u32 sbbusn, u32 sbdn); #endif /* SB700_H */ diff --git a/src/southbridge/amd/sb800/sb800.h b/src/southbridge/amd/sb800/sb800.h index d7a4a38..ffe7aeb 100644 --- a/src/southbridge/amd/sb800/sb800.h +++ b/src/southbridge/amd/sb800/sb800.h @@ -58,7 +58,6 @@ void sb800_clk_output_48Mhz(void); int s3_save_nvram_early(u32 dword, int size, int nvram_pos); int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);
-void enable_usbdebug(unsigned int port); #else void sb800_enable(device_t dev); void __attribute__((weak)) sb800_setup_sata_phys(struct device *dev); diff --git a/src/southbridge/intel/i82801gx/i82801gx.h b/src/southbridge/intel/i82801gx/i82801gx.h index 2ceb215..8fb5b92 100644 --- a/src/southbridge/intel/i82801gx/i82801gx.h +++ b/src/southbridge/intel/i82801gx/i82801gx.h @@ -46,7 +46,6 @@ extern void i82801gx_enable(device_t dev); void enable_smbus(void); int smbus_read_byte(unsigned device, unsigned address); #endif -void enable_usbdebug(unsigned int port); #endif
#define MAINBOARD_POWER_OFF 0 diff --git a/src/southbridge/nvidia/ck804/ck804.h b/src/southbridge/nvidia/ck804/ck804.h index e7bf021..3e8b1f2 100644 --- a/src/southbridge/nvidia/ck804/ck804.h +++ b/src/southbridge/nvidia/ck804/ck804.h @@ -24,7 +24,6 @@ #include "chip.h"
void ck804_enable(device_t dev); -void enable_usbdebug(unsigned int port);
extern struct pci_operations ck804_pci_ops;
diff --git a/src/southbridge/nvidia/mcp55/mcp55.h b/src/southbridge/nvidia/mcp55/mcp55.h index 3173c50..aa52886 100644 --- a/src/southbridge/nvidia/mcp55/mcp55.h +++ b/src/southbridge/nvidia/mcp55/mcp55.h @@ -35,7 +35,6 @@ extern struct pci_operations mcp55_pci_ops; #else #if !defined(__ROMCC__) void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn); -void enable_usbdebug(unsigned int port); #endif #endif
diff --git a/src/southbridge/sis/sis966/sis966.h b/src/southbridge/sis/sis966/sis966.h index d6624b3..2c7c7b8 100644 --- a/src/southbridge/sis/sis966/sis966.h +++ b/src/southbridge/sis/sis966/sis966.h @@ -39,8 +39,4 @@ void sis966_enable(device_t dev); #endif
-#if defined(__PRE_RAM__) && !defined(__ROMCC__) -void enable_usbdebug(unsigned int port); -#endif - #endif /* SIS966_H */