coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ehci_debug.h File Reference
#include <types.h>
Include dependency graph for ehci_debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dbgp_pipe
 

Macros

#define DBGP_EP_VALID   (1<<0)
 
#define DBGP_EP_ENABLED   (1<<1)
 
#define DBGP_EP_BUSY   (1<<2)
 
#define DBGP_EP_NOT_PRESENT   (1<<3)
 
#define DBGP_EP_STATMASK   (DBGP_EP_VALID | DBGP_EP_ENABLED)
 
#define DBGP_MAX_ENDPOINTS   4
 
#define DBGP_SETUP_EP0   0 /* Compulsory endpoint 0. */
 
#define DBGP_CONSOLE_EPOUT   1
 
#define DBGP_CONSOLE_EPIN   2
 

Functions

void usbdebug_re_enable (uintptr_t ehci_base)
 
void usbdebug_disable (void)
 
int ehci_debug_hw_enable (unsigned int *base, unsigned int *dbg_offset)
 
void ehci_debug_select_port (unsigned int port)
 
void dbgp_put (struct dbgp_pipe *pipe)
 
int dbgp_try_get (struct dbgp_pipe *pipe)
 
struct dbgp_pipedbgp_console_output (void)
 
struct dbgp_pipedbgp_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)
 
int dbgp_control_msg (struct ehci_dbg_port *ehci_debug, unsigned int devnum, int requesttype, int request, int value, int index, void *data, int size)
 
void dbgp_mdelay (int ms)
 
int dbgp_probe_gadget (struct ehci_dbg_port *ehci_debug, struct dbgp_pipe *pipe)
 

Variables

struct dbgp_pipe __packed
 

Macro Definition Documentation

◆ DBGP_CONSOLE_EPIN

#define DBGP_CONSOLE_EPIN   2

Definition at line 26 of file ehci_debug.h.

◆ DBGP_CONSOLE_EPOUT

#define DBGP_CONSOLE_EPOUT   1

Definition at line 25 of file ehci_debug.h.

◆ DBGP_EP_BUSY

#define DBGP_EP_BUSY   (1<<2)

Definition at line 19 of file ehci_debug.h.

◆ DBGP_EP_ENABLED

#define DBGP_EP_ENABLED   (1<<1)

Definition at line 18 of file ehci_debug.h.

◆ DBGP_EP_NOT_PRESENT

#define DBGP_EP_NOT_PRESENT   (1<<3)

Definition at line 20 of file ehci_debug.h.

◆ DBGP_EP_STATMASK

#define DBGP_EP_STATMASK   (DBGP_EP_VALID | DBGP_EP_ENABLED)

Definition at line 21 of file ehci_debug.h.

◆ DBGP_EP_VALID

#define DBGP_EP_VALID   (1<<0)

Definition at line 17 of file ehci_debug.h.

◆ DBGP_MAX_ENDPOINTS

#define DBGP_MAX_ENDPOINTS   4

Definition at line 23 of file ehci_debug.h.

◆ DBGP_SETUP_EP0

#define DBGP_SETUP_EP0   0 /* Compulsory endpoint 0. */

Definition at line 24 of file ehci_debug.h.

Function Documentation

◆ dbgp_bulk_read_x()

int dbgp_bulk_read_x ( struct dbgp_pipe pipe,
void data,
int  size 
)

Definition at line 285 of file ehci_debug.c.

References dbgp_bulk_read(), dbgp_ehci_info(), and ehci_debug_info::ehci_debug.

Referenced by usbdebug_rx_byte().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbgp_bulk_write_x()

int dbgp_bulk_write_x ( struct dbgp_pipe pipe,
const char *  bytes,
int  size 
)

Definition at line 249 of file ehci_debug.c.

References dbgp_bulk_write(), dbgp_ehci_info(), and ehci_debug_info::ehci_debug.

Referenced by probe_for_debug_descriptor(), probe_for_ftdi(), usbdebug_tx_byte(), and usbdebug_tx_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbgp_console_input()

struct dbgp_pipe* dbgp_console_input ( void  )

Definition at line 724 of file ehci_debug.c.

References DBGP_CONSOLE_EPIN, dbgp_ehci_info(), and ehci_debug_info::ep_pipe.

Referenced by usb_can_rx_byte(), and usb_rx_byte().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbgp_console_output()

struct dbgp_pipe* dbgp_console_output ( void  )

Definition at line 719 of file ehci_debug.c.

References DBGP_CONSOLE_EPOUT, dbgp_ehci_info(), and ehci_debug_info::ep_pipe.

Referenced by usb_tx_byte(), and usb_tx_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbgp_control_msg()

◆ dbgp_ep_is_active()

int dbgp_ep_is_active ( struct dbgp_pipe pipe)

Definition at line 714 of file ehci_debug.c.

References DBGP_EP_ENABLED, DBGP_EP_STATMASK, and DBGP_EP_VALID.

Referenced by dbgp_try_get(), and usb_can_rx_byte().

Here is the caller graph for this function:

◆ dbgp_mdelay()

void dbgp_mdelay ( int  ms)

Definition at line 293 of file ehci_debug.c.

References inb().

Referenced by dbgp_hub_enable(), ehci_reset_port(), ehci_wait_for_port(), and usbdebug_init_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbgp_probe_gadget()

int dbgp_probe_gadget ( struct ehci_dbg_port ehci_debug,
struct dbgp_pipe pipe 
)

Definition at line 319 of file gadget.c.

References activate_endpoints(), BIOS_INFO, CONFIG, dbgp_hub_enable(), dprintk, printk, probe_for_debug_descriptor(), probe_for_ftdi(), and USB_DEBUG_DEVNUM.

Referenced by usbdebug_init_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbgp_put()

void dbgp_put ( struct dbgp_pipe pipe)

Definition at line 625 of file ehci_debug.c.

References dbgp_ehci_info(), DBGP_EP_BUSY, DBGP_SETUP_EP0, ehci_debug_info::ep_pipe, and dbgp_pipe::status.

Referenced by usbdebug_rx_byte(), usbdebug_tx_byte(), and usbdebug_tx_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbgp_try_get()

int dbgp_try_get ( struct dbgp_pipe pipe)

Definition at line 615 of file ehci_debug.c.

References dbgp_ehci_info(), DBGP_EP_BUSY, dbgp_ep_is_active(), DBGP_SETUP_EP0, ehci_debug_info::ep_pipe, and dbgp_pipe::status.

Referenced by usbdebug_rx_byte(), usbdebug_tx_byte(), and usbdebug_tx_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ehci_debug_hw_enable()

◆ ehci_debug_select_port()

void ehci_debug_select_port ( unsigned int  port)

Definition at line 62 of file pci_ehci.c.

References pci_ehci_dbg_dev(), and pci_ehci_dbg_set_port().

Referenced by usbdebug_init_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usbdebug_disable()

void usbdebug_disable ( void  )

◆ usbdebug_re_enable()

void usbdebug_re_enable ( uintptr_t  ehci_base)

Variable Documentation

◆ __packed