blob: aa3515f684b3ea349da0ededba6ac77d5bfea346 [file] [log] [blame]
Stefan Reinauerbb01f602009-07-21 21:20:45 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
16 */
17
Stefan Reinauer56394482010-05-25 16:02:28 +000018#ifndef USBDEBUG_H
19#define USBDEBUG_H
Yinghai Lud57241f2007-02-28 11:17:02 +000020
Myles Watson127e9762010-08-04 19:29:11 +000021#include <ehci.h>
22
Yinghai Lud57241f2007-02-28 11:17:02 +000023struct ehci_debug_info {
24 void *ehci_caps;
25 void *ehci_regs;
26 void *ehci_debug;
27 unsigned devnum;
28 unsigned endpoint_out;
29 unsigned endpoint_in;
30};
Stefan Reinauerbb01f602009-07-21 21:20:45 +000031
Stefan Reinauer7e16bf32009-04-21 23:05:13 +000032int dbgp_bulk_write_x(struct ehci_debug_info *dbg_info, const char *bytes, int size);
33int dbgp_bulk_read_x(struct ehci_debug_info *dbg_info, void *data, int size);
Myles Watson127e9762010-08-04 19:29:11 +000034int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned devnum, int requesttype, int request,
35 int value, int index, void *data, int size);
36int ehci_wait_for_port(struct ehci_regs *ehci_regs, int port);
Stefan Reinauer7e16bf32009-04-21 23:05:13 +000037void set_ehci_base(unsigned ehci_base);
38void set_ehci_debug(unsigned ehci_deug);
39unsigned get_ehci_debug(void);
40void set_debug_port(unsigned port);
Myles Watson127e9762010-08-04 19:29:11 +000041void usbdebug_ram_tx_byte(unsigned char data);
42void usbdebug_tx_byte(unsigned char data);
Stefan Reinauerbb01f602009-07-21 21:20:45 +000043
Yinghai Lud57241f2007-02-28 11:17:02 +000044#endif