aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/amd/sb600/sb600_enable_usbdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/amd/sb600/sb600_enable_usbdebug.c')
-rw-r--r--src/southbridge/amd/sb600/sb600_enable_usbdebug.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/southbridge/amd/sb600/sb600_enable_usbdebug.c b/src/southbridge/amd/sb600/sb600_enable_usbdebug.c
index 6a150aded0..b4d97b0da2 100644
--- a/src/southbridge/amd/sb600/sb600_enable_usbdebug.c
+++ b/src/southbridge/amd/sb600/sb600_enable_usbdebug.c
@@ -18,12 +18,11 @@
*/
#include <stdint.h>
+#include <arch/io.h>
+#include <arch/romcc_io.h>
#include <usbdebug.h>
#include <device/pci_def.h>
-
-#define EHCI_BAR 0xFEF00000 /* EHCI BAR address */
-#define EHCI_BAR_INDEX 0x10 /* TODO: DBUG_PRT[31:29] */
-#define EHCI_DEBUG_OFFSET 0xE0 /* Hardcoded to 0xE0 */
+#include "sb600.h"
/* Required for successful build, but currently empty. */
void set_debug_port(unsigned int port)
@@ -31,7 +30,7 @@ void set_debug_port(unsigned int port)
/* TODO: Allow changing the physical USB port used as Debug Port. */
}
-static void sb600_enable_usbdebug(unsigned int port)
+void sb600_enable_usbdebug(unsigned int port)
{
device_t dev = PCI_DEV(0, 0x13, 5); /* USB EHCI, D19:F5 */
@@ -39,7 +38,7 @@ static void sb600_enable_usbdebug(unsigned int port)
set_debug_port(port);
/* Set the EHCI BAR address. */
- pci_write_config32(dev, EHCI_BAR_INDEX, EHCI_BAR);
+ pci_write_config32(dev, EHCI_BAR_INDEX, CONFIG_EHCI_BAR);
/* Enable access to the EHCI memory space registers. */
pci_write_config8(dev, PCI_COMMAND, PCI_COMMAND_MEMORY);