diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-07-08 18:11:44 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-07-24 09:12:26 +0200 |
commit | 026ff3e436799b54daec8805dc574146793f4903 (patch) | |
tree | 9ae0ce9dcfb6dcbb848da6ae8fa5ab3f60cb3870 /src/include/usbdebug.h | |
parent | dcea700762bc97bd7fcabf2e960d47805129aeb1 (diff) |
usbdebug: Split endpoint buffers
Refactor the structure to better support receive and another
set of endpoints over usbdebug.
Change-Id: Ib0f76afdf4e638363ff30c67010920142c58f250
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/3726
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.h | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/src/include/usbdebug.h b/src/include/usbdebug.h index 16077b0448..2728be0e4f 100644 --- a/src/include/usbdebug.h +++ b/src/include/usbdebug.h @@ -40,31 +40,18 @@ void pci_ehci_read_resources(struct device *dev); #endif #endif -struct ehci_debug_info { - void *ehci_caps; - void *ehci_regs; - void *ehci_debug; - u32 devnum; - u32 endpoint_out; - 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) +struct dbgp_pipe; 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_debug_port(unsigned port); int usbdebug_init(void); -struct ehci_debug_info *dbgp_console_output(void); -struct ehci_debug_info *dbgp_console_input(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); + +struct dbgp_pipe *dbgp_console_output(void); +struct dbgp_pipe *dbgp_console_input(void); +int dbgp_ep_is_active(struct dbgp_pipe *pipe); +int dbgp_bulk_write_x(struct dbgp_pipe *pipe, const char *bytes, int size); +int dbgp_bulk_read_x(struct dbgp_pipe *pipe, void *data, int size); +void usbdebug_tx_byte(struct dbgp_pipe *pipe, unsigned char data); +void usbdebug_tx_flush(struct dbgp_pipe *pipe); #endif |