summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/common/block/xhci/xhci.c
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2017-02-16 16:08:49 +0530
committerAaron Durbin <adurbin@chromium.org>2017-03-06 20:42:25 +0100
commita554b0c5b79b3ccf4d47cd36d381d8c27180ec2e (patch)
tree64452c8c63612f4b394cf89fe212b28d354fb2ac /src/soc/intel/common/block/xhci/xhci.c
parent9a0245a84dcdeb3f0cad6ddaa9cd1c56393d6ece (diff)
downloadcoreboot-a554b0c5b79b3ccf4d47cd36d381d8c27180ec2e.tar.gz
coreboot-a554b0c5b79b3ccf4d47cd36d381d8c27180ec2e.tar.bz2
coreboot-a554b0c5b79b3ccf4d47cd36d381d8c27180ec2e.zip
soc/intel/common/block: Add Intel XHCI driver support
Create sample model for common Intel XHCI driver. Change-Id: I81f57bc713900c96d998bae924fc4d38a9024fe3 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/18221 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/common/block/xhci/xhci.c')
-rw-r--r--src/soc/intel/common/block/xhci/xhci.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/xhci/xhci.c b/src/soc/intel/common/block/xhci/xhci.c
new file mode 100644
index 000000000000..32fad93d3aa3
--- /dev/null
+++ b/src/soc/intel/common/block/xhci/xhci.c
@@ -0,0 +1,44 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ * Copyright (C) 2015 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <arch/io.h>
+#include <intelblocks/xhci.h>
+
+__attribute__((weak)) void soc_xhci_init(struct device *dev) { /* no-op */ }
+
+static struct device_operations usb_xhci_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = soc_xhci_init,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x5aa8, /* ApolloLake */
+ 0x31a8, /* GLK */
+ 0x9d2f, /* SunRisePoint LP */
+ 0xa12f, /* KBL-H*/
+ 0
+};
+
+static const struct pci_driver pch_usb_xhci __pci_driver = {
+ .ops = &usb_xhci_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};