2 * This file is part of the coreboot project.
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.
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.
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
18 #include "../lib/usbdebug.c"
20 static void early_usbdebug_direct_init(void)
22 struct ehci_debug_info *dbg_info = (struct ehci_debug_info *)
23 (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE - sizeof(struct ehci_debug_info));
25 usbdebug_direct_init(EHCI_BAR, EHCI_DEBUG_OFFSET, dbg_info);
28 void usbdebug_direct_tx_byte(unsigned char data)
30 struct ehci_debug_info *dbg_info;
32 /* "Find" dbg_info structure in Cache */
33 dbg_info = (struct ehci_debug_info *)
34 (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE - sizeof(struct ehci_debug_info));
36 if (dbg_info->ehci_debug) {
37 dbgp_bulk_write_x(dbg_info, &data, 1);
41 void usbdebug_direct_ram_tx_byte(unsigned char data)
43 struct ehci_debug_info *dbg_info;
45 /* "Find" dbg_info structure in RAM */
46 dbg_info = (struct ehci_debug_info *)
47 ((CONFIG_RAMTOP) - sizeof(struct ehci_debug_info));
49 if (dbg_info->ehci_debug) {
50 dbgp_bulk_write_x(dbg_info, &data, 1);