blob: be524cabaa6f2bce8fee0fba9db9a8c23c5c3b17 [file] [log] [blame]
Stefan Reinauera8e11682009-03-11 14:54:18 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2009 coresystems GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20// An arbitrary address for the BAR
21#define EHCI_BAR 0xFEF00000
22// These could be read from DEBUG_BASE (0:1d.7 R 0x5A 16bit)
23#define EHCI_BAR_INDEX 0x10
24#define EHCI_DEBUG_OFFSET 0xA0
25
26static void set_debug_port(unsigned port)
27{
28 // Nothing for now?
29}
30
31static void i82801gx_enable_usbdebug_direct(unsigned port)
32{
33 pci_write_config32(PCI_DEV(0, 0x1d, 7), EHCI_BAR_INDEX, EHCI_BAR);
34 pci_write_config8(PCI_DEV(0, 0x1d, 7), 0x04, 0x2); // Memory Space Enable
35}
36