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>
This commit is contained in:
committed by
Stefan Reinauer
parent
d686acd1a3
commit
4d409b5fc2
@@ -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);
|
||||
|
Reference in New Issue
Block a user