Attention is currently required from: Angel Pons, Jan Philipp Groß, Nicholas Chin, Riku Viitanen.
Hello Riku Viitanen, build bot (Jenkins), Jan Philipp Groß, Angel Pons, Nicholas Chin,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/86055?usp=email
to review the following change.
Change subject: Revert "drivers/asmedia: Add code to enable AHCI for ASM1061" ......................................................................
Revert "drivers/asmedia: Add code to enable AHCI for ASM1061"
This reverts commit fee8bcbcfb55bb97b404d4d570f6db6141265691.
Reason for revert: It broke the tree
Change-Id: Ifbf895ff08bbb309cbb5236c1e5ff1f65f6e299e --- M src/drivers/asmedia/Kconfig M src/drivers/asmedia/Makefile.mk D src/drivers/asmedia/asm1061.c A src/drivers/asmedia/aspm_blacklist.c M src/mainboard/asrock/b75pro3-m/Kconfig M src/mainboard/asrock/fatal1ty_z87_professional/Kconfig M src/mainboard/asrock/h77pro4-m/Kconfig M src/mainboard/asus/h61-series/Kconfig M src/mainboard/asus/p8x7x-series/Kconfig 9 files changed, 39 insertions(+), 57 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/86055/1
diff --git a/src/drivers/asmedia/Kconfig b/src/drivers/asmedia/Kconfig index f042f3d..055d9fb 100644 --- a/src/drivers/asmedia/Kconfig +++ b/src/drivers/asmedia/Kconfig @@ -1,4 +1,4 @@ ## SPDX-License-Identifier: GPL-2.0-only
-config DRIVERS_ASMEDIA_ASM1061 +config DRIVERS_ASMEDIA_ASPM_BLACKLIST bool diff --git a/src/drivers/asmedia/Makefile.mk b/src/drivers/asmedia/Makefile.mk index 25f1e55..1088eae 100644 --- a/src/drivers/asmedia/Makefile.mk +++ b/src/drivers/asmedia/Makefile.mk @@ -1,3 +1,3 @@ ## SPDX-License-Identifier: GPL-2.0-only
-ramstage-$(CONFIG_DRIVERS_ASMEDIA_ASM1061) += asm1061.c +ramstage-$(CONFIG_DRIVERS_ASMEDIA_ASPM_BLACKLIST) += aspm_blacklist.c diff --git a/src/drivers/asmedia/asm1061.c b/src/drivers/asmedia/asm1061.c deleted file mode 100644 index 6d2edaa..0000000 --- a/src/drivers/asmedia/asm1061.c +++ /dev/null @@ -1,48 +0,0 @@ -/* 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 <option.h> - -#define ASM1061_CTRL_REG 0xec -#define ASM1061_PCI_CFG_UNLOCK (1 << 2) - -static void asm1061_enable(struct device *const dev) -{ - printk(BIOS_INFO, "Disabling ASPM for %s [%04x/%04x]\n", - dev_path(dev), dev->vendor, dev->device); - dev->disable_pcie_aspm = 1; - - u8 sata_mode = get_uint_option("sata_mode", 0); - pci_or_config8(dev, ASM1061_CTRL_REG, ASM1061_PCI_CFG_UNLOCK); - if (sata_mode == 0) { - printk(BIOS_INFO, "Setting AHCI mode for %s [%04x/%04x]\n", - dev_path(dev), dev->vendor, dev->device); - pci_write_config16(dev, PCI_CLASS_DEVICE, PCI_CLASS_STORAGE_SATA); - } else { - printk(BIOS_INFO, "Setting IDE mode for %s [%04x/%04x]\n", - dev_path(dev), dev->vendor, dev->device); - pci_write_config16(dev, PCI_CLASS_DEVICE, PCI_CLASS_STORAGE_IDE); - } - pci_and_config8(dev, ASM1061_CTRL_REG, ~ASM1061_PCI_CFG_UNLOCK); -} - -static struct device_operations asm1061_ops = { - .read_resources = pci_dev_read_resources, - .set_resources = pci_dev_set_resources, - .enable_resources = pci_dev_enable_resources, - .enable = asm1061_enable, -}; - -static const unsigned short pci_device_ids[] = { - 0x0611, /* ASM1061 SATA IDE Controller */ - 0 -}; - -static const struct pci_driver asmedia_asm1061 __pci_driver = { - .ops = &asm1061_ops, - .vendor = 0x1b21, - .devices = pci_device_ids, -}; diff --git a/src/drivers/asmedia/aspm_blacklist.c b/src/drivers/asmedia/aspm_blacklist.c new file mode 100644 index 0000000..90d5217 --- /dev/null +++ b/src/drivers/asmedia/aspm_blacklist.c @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <device/device.h> +#include <device/pci.h> + +static void disable_aspm(struct device *const dev) +{ + printk(BIOS_INFO, "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, /* ASM1061 SATA IDE Controller */ + 0 +}; + +static const struct pci_driver asmedia_noaspm __pci_driver = { + .ops = &asmedia_noaspm_ops, + .vendor = 0x1b21, + .devices = pci_device_ids, +}; diff --git a/src/mainboard/asrock/b75pro3-m/Kconfig b/src/mainboard/asrock/b75pro3-m/Kconfig index 17d737f..d371bff 100644 --- a/src/mainboard/asrock/b75pro3-m/Kconfig +++ b/src/mainboard/asrock/b75pro3-m/Kconfig @@ -5,7 +5,7 @@ config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_8192 - select DRIVERS_ASMEDIA_ASM1061 + select DRIVERS_ASMEDIA_ASPM_BLACKLIST select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES select HAVE_CMOS_DEFAULT diff --git a/src/mainboard/asrock/fatal1ty_z87_professional/Kconfig b/src/mainboard/asrock/fatal1ty_z87_professional/Kconfig index 56bdad2..c83a900 100644 --- a/src/mainboard/asrock/fatal1ty_z87_professional/Kconfig +++ b/src/mainboard/asrock/fatal1ty_z87_professional/Kconfig @@ -4,7 +4,7 @@ config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_8192 - select DRIVERS_ASMEDIA_ASM1061 + select DRIVERS_ASMEDIA_ASPM_BLACKLIST select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES select INTEL_GMA_HAVE_VBT diff --git a/src/mainboard/asrock/h77pro4-m/Kconfig b/src/mainboard/asrock/h77pro4-m/Kconfig index a9918b5..50bf86c 100644 --- a/src/mainboard/asrock/h77pro4-m/Kconfig +++ b/src/mainboard/asrock/h77pro4-m/Kconfig @@ -5,7 +5,7 @@ config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_8192 - select DRIVERS_ASMEDIA_ASM1061 + select DRIVERS_ASMEDIA_ASPM_BLACKLIST select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES select HAVE_CMOS_DEFAULT diff --git a/src/mainboard/asus/h61-series/Kconfig b/src/mainboard/asus/h61-series/Kconfig index 08e7a22..2f34719 100644 --- a/src/mainboard/asus/h61-series/Kconfig +++ b/src/mainboard/asus/h61-series/Kconfig @@ -41,7 +41,7 @@ config BOARD_ASUS_P8H61_M_PRO select BOARD_ASUS_H61_SERIES select BOARD_ROMSIZE_KB_4096 - select DRIVERS_ASMEDIA_ASM1061 + select DRIVERS_ASMEDIA_ASPM_BLACKLIST select HAVE_CMOS_DEFAULT select HAVE_OPTION_TABLE select MEMORY_MAPPED_TPM @@ -52,7 +52,7 @@ config BOARD_ASUS_P8H61_M_PRO_CM6630 select BOARD_ASUS_H61_SERIES select BOARD_ROMSIZE_KB_4096 - select DRIVERS_ASMEDIA_ASM1061 + select DRIVERS_ASMEDIA_ASPM_BLACKLIST select HAVE_CMOS_DEFAULT select HAVE_OPTION_TABLE select MEMORY_MAPPED_TPM diff --git a/src/mainboard/asus/p8x7x-series/Kconfig b/src/mainboard/asus/p8x7x-series/Kconfig index 133bd94..e278b56 100644 --- a/src/mainboard/asus/p8x7x-series/Kconfig +++ b/src/mainboard/asus/p8x7x-series/Kconfig @@ -29,7 +29,7 @@ config BOARD_ASUS_P8Z77_M_PRO select BOARD_ASUS_P8X7X_SERIES select BOARD_ROMSIZE_KB_8192 - select DRIVERS_ASMEDIA_ASM1061 # for ASM1061 eSATA + select DRIVERS_ASMEDIA_ASPM_BLACKLIST # for ASM1061 eSATA select MEMORY_MAPPED_TPM select SUPERIO_NUVOTON_NCT6779D
@@ -43,7 +43,7 @@ config BOARD_ASUS_P8Z77_V select BOARD_ASUS_P8X7X_SERIES select BOARD_ROMSIZE_KB_8192 - select DRIVERS_ASMEDIA_ASM1061 # for ASM1061 eSATA + select DRIVERS_ASMEDIA_ASPM_BLACKLIST # for ASM1061 eSATA select MEMORY_MAPPED_TPM select MAINBOARD_USES_IFD_GBE_REGION select SUPERIO_NUVOTON_NCT6779D