summaryrefslogtreecommitdiff
path: root/src/include/usbdebug.h
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-07-05 21:38:54 +0300
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-07-10 23:22:36 +0200
commit4d409b5fc27e44f7c902f8402f661db56d62ac74 (patch)
treea8bdcd3bfa898c6fcdf32bc5ff6b4d22627dc1a9 /src/include/usbdebug.h
parentd686acd1a358518e8f37452c0e826a3ac381cbe2 (diff)
downloadcoreboot-4d409b5fc27e44f7c902f8402f661db56d62ac74.tar.xz
usbdebug: Refactor disable logic
Output to usbdebug console needs to be disabled until hardware is initialized and while EHCI BAR is relocated. Add separate field ehci_info to point to back to EHCI context when hardware is ready to transfer data. Change-Id: If7d441b561819ab8ae23ed9f3f320f7742ed231e Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3624 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/include/usbdebug.h')
-rw-r--r--src/include/usbdebug.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/include/usbdebug.h b/src/include/usbdebug.h
index 990312aa34..fe4ef32a44 100644
--- a/src/include/usbdebug.h
+++ b/src/include/usbdebug.h
@@ -49,16 +49,20 @@ struct ehci_debug_info {
u32 endpoint_in;
char buf[8];
u8 bufidx;
+ u8 status;
};
+#define DBGP_EP_VALID (1<<0)
+#define DBGP_EP_ENABLED (1<<1)
+#define DBGP_EP_STATMASK (DBGP_EP_VALID | DBGP_EP_ENABLED)
+
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_ehci_debug(unsigned ehci_debug);
-unsigned get_ehci_debug(void);
void set_debug_port(unsigned port);
int early_usbdebug_init(void);
+
+int dbgp_ep_is_active(struct ehci_debug_info *dbg_info);
void usbdebug_tx_byte(struct ehci_debug_info *info, unsigned char data);
void usbdebug_tx_flush(struct ehci_debug_info *info);
int usbdebug_init(unsigned ehci_bar, unsigned offset, struct ehci_debug_info *info);