#include <console/ne2k.h>
#endif
+#if CONFIG_USBDEBUG
+#include <usbdebug.h>
+#endif
+
#ifndef __PRE_RAM__
#include <string.h>
#include <pc80/mc146818rtc.h>
static void dbgp_init(void)
{
- struct ehci_debug_info *dbg_infox;
-
- /* At this point, all we have to do is copy the fixed address
- * debug_info data structure to our version defined above. */
-
- dbg_infox = (struct ehci_debug_info *)
- ((CONFIG_RAMTOP) - sizeof(struct ehci_debug_info));
-
- memcpy(&dbg_info, dbg_infox, sizeof(struct ehci_debug_info));
+ usbdebug_init(CONFIG_EHCI_BAR, CONFIG_EHCI_DEBUG_OFFSET, &dbg_info);
}
static void dbgp_tx_byte(unsigned char data)
#define EHCI_BAR_INDEX 0x10
+#ifndef __ROMCC__
/* EHCI register interface, corresponds to EHCI Revision 0.95 specification */
/* Section 2.2 Host Controller Capability Registers */
u32 address;
#define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep))
} __attribute__ ((packed));
-
+#endif
#endif
u32 endpoint_in;
};
+#ifndef __ROMCC__
+void enable_usbdebug(unsigned int port);
int dbgp_bulk_write_x(struct ehci_debug_info *dbg_info, const char *bytes, int size);
int dbgp_bulk_read_x(struct ehci_debug_info *dbg_info, void *data, int size);
void set_ehci_base(unsigned ehci_base);
void set_debug_port(unsigned port);
int early_usbdebug_init(void);
void usbdebug_tx_byte(unsigned char data);
-
+int usbdebug_init(unsigned ehci_bar, unsigned offset, struct ehci_debug_info *info);
+#endif
#endif
smm-y += memcpy.c cbfs.c memset.c memcmp.c
smm-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
smm-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
+smm-$(CONFIG_USBDEBUG) += usbdebug.c
$(obj)/lib/version.ramstage.o : $(obj)/build.h
dbg_info->endpoint_in, data, size);
}
-#ifdef __PRE_RAM__
static void dbgp_mdelay(int ms)
{
int i;
}
-static int usbdebug_init(unsigned ehci_bar, unsigned offset, struct ehci_debug_info *info)
+int usbdebug_init(unsigned ehci_bar, unsigned offset, struct ehci_debug_info *info)
{
struct ehci_caps *ehci_caps;
struct ehci_regs *ehci_regs;
return -10;
}
-// **** This part is probably x86 specific and used by romstage.c **** //
-
int early_usbdebug_init(void)
{
struct ehci_debug_info *dbg_info = (struct ehci_debug_info *)
dbgp_bulk_write_x(dbg_info, (char*)&data, 1);
}
}
-#endif
driver-y += ac97.c
driver-y += pci.c
ramstage-y += reset.c
-romstage-y += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+smm-$(CONFIG_USBDEBUG) += enable_usbdebug.c
void sb600_lpc_port80(void);
void sb600_pci_port80(void);
-void enable_usbdebug(unsigned int port);
#endif /* SB600_H */
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
romstage-y += reset.c
ramstage-y += reset.c
-romstage-y += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+smm-$(CONFIG_USBDEBUG) += enable_usbdebug.c
romstage-y += early_setup.c
romstage-y += smbus.c
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 */
driver-y += pcie.c
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
ramstage-y += reset.c
-romstage-y += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+smm-$(CONFIG_USBDEBUG) += enable_usbdebug.c
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);
romstage-y += early_smbus.c
romstage-$(CONFIG_USBDEBUG) += usb_debug.c
+ramstage-$(CONFIG_USBDEBUG) += usb_debug.c
+smm-$(CONFIG_USBDEBUG) += usb_debug.c
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
ramstage-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.c
-romstage-y += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+smm-$(CONFIG_USBDEBUG) += enable_usbdebug.c
romstage-y += early_smbus.c
chipset_bootblock_inc += $(src)/southbridge/nvidia/ck804/romstrap.inc
#include "chip.h"
void ck804_enable(device_t dev);
-void enable_usbdebug(unsigned int port);
extern struct pci_operations ck804_pci_ops;
ramstage-y += reset.c
-romstage-y += enable_usbdebug.c
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+smm-$(CONFIG_USBDEBUG) += enable_usbdebug.c
chipset_bootblock_inc += $(src)/southbridge/nvidia/mcp55/romstrap.inc
chipset_bootblock_lds += $(src)/southbridge/nvidia/mcp55/romstrap.lds
#else
#if !defined(__ROMCC__)
void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn);
-void enable_usbdebug(unsigned int port);
#endif
#endif
driver-y += pcie.c
driver-y += aza.c
ramstage-y += reset.c
-romstage-y += enable_usbdebug.c
+
+romstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+ramstage-$(CONFIG_USBDEBUG) += enable_usbdebug.c
+smm-$(CONFIG_USBDEBUG) += enable_usbdebug.c
chipset_bootblock_inc += $(src)/southbridge/sis/sis966/romstrap.inc
chipset_bootblock_lds += $(src)/southbridge/sis/sis966/romstrap.lds
void sis966_enable(device_t dev);
#endif
-#if defined(__PRE_RAM__) && !defined(__ROMCC__)
-void enable_usbdebug(unsigned int port);
-#endif
-
#endif /* SIS966_H */