summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801dx/usb2.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2022-11-08 04:43:41 +0000
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-11-09 18:10:54 +0000
commit7b73e85283bea7f456ab2f86ed1d1099eb88bc2f (patch)
treea5aba9ebe735e4f904b5edad8f6b6ddf6122d607 /src/southbridge/intel/i82801dx/usb2.c
parentc8a20b9d3b8939e4b7d259c5857631c9690657de (diff)
Revert "mb/aopen/dxplplusu: Remove board"
This reverts commit eb76a455cd39ec59b7f2ba28baeec9538befd59e and applies minor fixes to make it build again. PARALLEL_MP was working prior to board removal and no relevant SMI handlers were implemented. So NO_SMM choice is now selected. Change-Id: Ia1cd02278240d1b5d006fb2a7730d3d86390f85b Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69339 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/southbridge/intel/i82801dx/usb2.c')
-rw-r--r--src/southbridge/intel/i82801dx/usb2.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/southbridge/intel/i82801dx/usb2.c b/src/southbridge/intel/i82801dx/usb2.c
new file mode 100644
index 0000000000..0fe7c9399b
--- /dev/null
+++ b/src/southbridge/intel/i82801dx/usb2.c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <device/pci_ops.h>
+#include <device/pci_ehci.h>
+#include "i82801dx.h"
+
+static void usb2_init(struct device *dev)
+{
+ printk(BIOS_DEBUG, "USB: Setting up controller.. ");
+ pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
+ PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE);
+ printk(BIOS_DEBUG, "done.\n");
+}
+
+static struct device_operations usb2_ops = {
+ .read_resources = pci_ehci_read_resources,
+ .set_resources = pci_dev_set_resources,
+ .enable_resources = pci_dev_enable_resources,
+ .init = usb2_init,
+ .enable = i82801dx_enable,
+};
+
+/* 82801DB/DBM USB 2.0 */
+static const struct pci_driver usb2_driver __pci_driver = {
+ .ops = &usb2_ops,
+ .vendor = PCI_VID_INTEL,
+ .device = PCI_DID_INTEL_82801DB_EHCI,
+};