[U-Boot] [PATCH 5/7] dm: x86: Add a driver for Intel PCH7
Simon Glass
sjg at chromium.org
Tue Dec 1 05:11:24 CET 2015
At some point we may need to distinguish between different types of PCHs,
but for existing supported platforms we only need to worry about version 7
and version 9 bridges. Add a driver for the PCH7.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
drivers/pch/Makefile | 1 +
drivers/pch/pch7.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 drivers/pch/pch7.c
diff --git a/drivers/pch/Makefile b/drivers/pch/Makefile
index d69a99c..33aa727 100644
--- a/drivers/pch/Makefile
+++ b/drivers/pch/Makefile
@@ -3,3 +3,4 @@
#
obj-y += pch-uclass.o
+obj-y += pch7.o
diff --git a/drivers/pch/pch7.c b/drivers/pch/pch7.c
new file mode 100644
index 0000000..f1c780c
--- /dev/null
+++ b/drivers/pch/pch7.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <pch.h>
+
+static int queensbay_pch_get_version(struct udevice *dev)
+{
+ return 7;
+}
+
+static const struct pch_ops queensbay_pch9_ops = {
+ .get_version = queensbay_pch_get_version,
+};
+
+static const struct udevice_id queensbay_pch_ids[] = {
+ { .compatible = "intel,pch7" },
+ { }
+};
+
+U_BOOT_DRIVER(queensbay_drv) = {
+ .name = "intel-pch",
+ .id = UCLASS_PCH,
+ .of_match = queensbay_pch_ids,
+ .ops = &queensbay_pch9_ops,
+};
--
2.6.0.rc2.230.g3dd15c0
More information about the U-Boot
mailing list