From c8b4d217d0679166486d1c830db244b05a8354fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 4 Mar 2019 07:22:02 +0200 Subject: sb/amd: Use simple PCI IO config access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Call the simple PCI config accessors directly. Change-Id: I4aa0669179d6b01ab0713fd2a8b3cf4baf6e572f Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/31748 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Nico Huber --- src/southbridge/amd/sr5650/pcie.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/southbridge/amd/sr5650/pcie.c') diff --git a/src/southbridge/amd/sr5650/pcie.c b/src/southbridge/amd/sr5650/pcie.c index 763dd014af..f87fadbb08 100644 --- a/src/southbridge/amd/sr5650/pcie.c +++ b/src/southbridge/amd/sr5650/pcie.c @@ -893,7 +893,10 @@ void pcie_config_misc_clk(struct device *nb_dev) reg |= 1 << 0; pci_write_config32(nb_dev, 0x4c, reg); -#if 0 /* TODO: Check the mics clock later. */ +#if 0 + /* TODO: Check the mics clock later. */ + pci_devfn_t d0f1 = PCI_DEV(0, 0, 1); + if (AtiPcieCfg.Config & PCIE_GFX_CLK_GATING) { /* TXCLK Clock Gating */ set_nbmisc_enable_bits(nb_dev, 0x07, 3 << 0, 3 << 0); @@ -901,9 +904,9 @@ void pcie_config_misc_clk(struct device *nb_dev) set_pcie_enable_bits(nb_dev, 0x11 | PCIE_CORE_INDEX_GFX, (3 << 6) | (~0xf), 3 << 6); /* LCLK Clock Gating */ - reg = pci_cf8_conf1.read32(0, 1, 0x94); + reg = pci_io_read_config32(d0f1, 0x94); reg &= ~(1 << 16); - pci_cf8_conf1.write32(0, 1, 0x94, reg); + pci_io_write_config32(d0f1, 0x94, reg); } if (AtiPcieCfg.Config & PCIE_GPP_CLK_GATING) { @@ -913,9 +916,9 @@ void pcie_config_misc_clk(struct device *nb_dev) set_pcie_enable_bits(nb_dev, 0x11 | PCIE_CORE_INDEX_SB, (3 << 6) | (~0xf), 3 << 6); /* LCLK Clock Gating */ - reg = pci_cf8_conf1.read32(0, 1, 0x94); + reg = pci_io_read_config32(d0f1, 0x94); reg &= ~(1 << 24); - pci_cf8_conf1.write32(0, 1, 0x94, reg); + pci_io_write_config32(d0f1, 0x94, reg); } #endif -- cgit v1.2.3