fix most usbdebug warnings and fix function names.
[coreboot.git] / src / southbridge / amd / sb700 / sb700_enable_usbdebug.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2010 Advanced Micro Devices, Inc.
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 #ifndef SB700_DEVN_BASE
21
22 #define SB700_DEVN_BASE 0
23
24 #endif
25
26 #define EHCI_BAR_INDEX 0x10
27 #define EHCI_BAR 0xFEF00000
28 #define EHCI_DEBUG_OFFSET 0xE0
29
30 static void sb700_enable_usbdebug(u32 port)
31 {
32         set_debug_port(port);
33         pci_write_config32(PCI_DEV(0, SB700_DEVN_BASE + 0x13, 5),
34                            EHCI_BAR_INDEX, EHCI_BAR);
35         pci_write_config8(PCI_DEV(0, SB700_DEVN_BASE + 0x13, 5), 0x04, 0x2);    /* mem space enabe */
36 }