sb/intel/i82801jx/sata.c: Drop always-false is_mobile check

Also remove the meaningless `sata_traffic_monitor` devicetree option.
Function parameters will be removed in a reproducible follow-up.

Change-Id: I70cf1e06cc8ace504a22be9f9c4441e3070f9e29
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44336
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Angel Pons 2020-08-10 14:01:08 +02:00
parent 851fe8334e
commit d1ccecf6ea
3 changed files with 2 additions and 17 deletions

View File

@ -22,7 +22,6 @@ chip northbridge/intel/x4x # Northbridge
# Set AHCI mode. # Set AHCI mode.
register "sata_port_map" = "0x1f" register "sata_port_map" = "0x1f"
register "sata_clock_request" = "0" register "sata_clock_request" = "0"
register "sata_traffic_monitor" = "0"
# Enable PCIe ports 0,2,3 as slots. # Enable PCIe ports 0,2,3 as slots.
register "pcie_slot_implemented" = "0xb" register "pcie_slot_implemented" = "0xb"

View File

@ -43,7 +43,6 @@ struct southbridge_intel_i82801jx_config {
/* IDE configuration */ /* IDE configuration */
uint8_t sata_port_map : 6; uint8_t sata_port_map : 6;
int sata_clock_request : 1; int sata_clock_request : 1;
int sata_traffic_monitor : 1;
int c4onc3_enable:1; int c4onc3_enable:1;
int c5_enable : 1; int c5_enable : 1;

View File

@ -138,9 +138,6 @@ static void sata_init(struct device *const dev)
/* Get the chip configuration */ /* Get the chip configuration */
const config_t *const config = dev->chip_info; const config_t *const config = dev->chip_info;
const u16 devid = pci_read_config16(dev, PCI_DEVICE_ID);
const int is_mobile = (devid == 0x2928) || (devid == 0x2929);
u8 sata_mode; u8 sata_mode;
printk(BIOS_DEBUG, "i82801jx_sata: initializing...\n"); printk(BIOS_DEBUG, "i82801jx_sata: initializing...\n");
@ -202,20 +199,10 @@ static void sata_init(struct device *const dev)
sclkcg |= 0x193; sclkcg |= 0x193;
pci_write_config32(dev, 0x94, sclkcg); pci_write_config32(dev, 0x94, sclkcg);
if (is_mobile && config->sata_traffic_monitor) {
struct device *const lpc_dev = pcidev_on_root(0x1f, 0);
if (((pci_read_config8(lpc_dev, D31F0_CxSTATE_CNF) >> 3) & 3) == 3) {
u8 reg8 = pci_read_config8(dev, 0x9c);
reg8 &= ~(0x1f << 2);
reg8 |= 3 << 2;
pci_write_config8(dev, 0x9c, reg8);
}
}
if (sata_mode == 0) if (sata_mode == 0)
sata_enable_ahci_mmap(dev, config->sata_port_map, is_mobile); sata_enable_ahci_mmap(dev, config->sata_port_map, 0);
sata_program_indexed(dev, is_mobile); sata_program_indexed(dev, 0);
} }
static void sata_enable(struct device *dev) static void sata_enable(struct device *dev)