[coreboot-gerrit] Change in coreboot[master]: drivers/asmedia: Add ASPM blacklist

Nico Huber (Code Review) gerrit at coreboot.org
Wed Apr 11 14:05:42 CEST 2018


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/25619


Change subject: drivers/asmedia: Add ASPM blacklist
......................................................................

drivers/asmedia: Add ASPM blacklist

To be selected by mainboard Kconfig.

Change-Id: I05f9789bc14db56d2ac085f4f14047d80c3aefb5
Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
A src/drivers/asmedia/Kconfig
A src/drivers/asmedia/Makefile.inc
A src/drivers/asmedia/aspm_blacklist.c
3 files changed, 61 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/25619/1

diff --git a/src/drivers/asmedia/Kconfig b/src/drivers/asmedia/Kconfig
new file mode 100644
index 0000000..e0a0ca3
--- /dev/null
+++ b/src/drivers/asmedia/Kconfig
@@ -0,0 +1,2 @@
+config DRIVERS_ASMEDIA_ASPM_BLACKLIST
+	bool
diff --git a/src/drivers/asmedia/Makefile.inc b/src/drivers/asmedia/Makefile.inc
new file mode 100644
index 0000000..daa4e89
--- /dev/null
+++ b/src/drivers/asmedia/Makefile.inc
@@ -0,0 +1,16 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2018 secunet Security Networks AG
+##
+## 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.
+##
+
+ramstage-$(CONFIG_DRIVERS_ASMEDIA_ASPM_BLACKLIST) += aspm_blacklist.c
diff --git a/src/drivers/asmedia/aspm_blacklist.c b/src/drivers/asmedia/aspm_blacklist.c
new file mode 100644
index 0000000..eb3a60a
--- /dev/null
+++ b/src/drivers/asmedia/aspm_blacklist.c
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 secunet Security Networks AG
+ *
+ * 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 <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+
+static void disable_aspm(struct device *const dev)
+{
+	printk(BIOS_DEBUG, "Disabling ASPM for %s [%04x/%04x]\n",
+	       dev_path(dev), dev->vendor, dev->device);
+	dev->disable_pcie_aspm = 1;
+}
+
+static struct device_operations asmedia_noaspm_ops = {
+	.read_resources		= pci_dev_read_resources,
+	.set_resources		= pci_dev_set_resources,
+	.enable_resources	= pci_dev_enable_resources,
+	.enable			= disable_aspm,
+};
+
+static const unsigned short pci_device_ids[] = {
+	0x0611,
+	0
+};
+
+static const struct pci_driver asmedia_noaspm __pci_driver = {
+	.ops	 = &asmedia_noaspm_ops,
+	.vendor	 = 0x1b21,
+	.devices = pci_device_ids,
+};

-- 
To view, visit https://review.coreboot.org/25619
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I05f9789bc14db56d2ac085f4f14047d80c3aefb5
Gerrit-Change-Number: 25619
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180411/fba55acd/attachment.html>


More information about the coreboot-gerrit mailing list