summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@silverbackltd.com>2017-10-11 16:48:03 -0700
committerMartin Roth <martinroth@google.com>2017-10-12 16:33:20 +0000
commit63300f72920d8ffb2c33669f53b454c794452f92 (patch)
tree514dbd59f26078877296cefdf389b0aa453d0646 /src/soc/amd
parentc0d1e31617f7aa3a93e394dbd5fe5997a914cb25 (diff)
soc/amd/stoneyridge: Clean up sata.c
Clean up ahci_ptr declaration. Remove incorrect PCI device IDs. BUG=b:62200375 Change-Id: I9058d9102fc8ea0bd03ea089ba98da4590dd3533 Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Reviewed-on: https://review.coreboot.org/21973 Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/stoneyridge/sata.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/soc/amd/stoneyridge/sata.c b/src/soc/amd/stoneyridge/sata.c
index c1e54937bf..20582bd226 100644
--- a/src/soc/amd/stoneyridge/sata.c
+++ b/src/soc/amd/stoneyridge/sata.c
@@ -35,8 +35,8 @@ static void sata_init(struct device *dev)
#define SATA_CAPABILITIES_REG 0xfc
#define CFG_CAP_SPM (1<<12)
- volatile u32 *ahci_ptr = (u32 *)(pci_read_config32(dev,
- AHCI_BASE_ADDRESS_REG) & 0xffffff00);
+ u32 *ahci_ptr = (void *)(uintptr_t)ALIGN_DOWN(
+ pci_read_config32(dev, AHCI_BASE_ADDRESS_REG), 256);
u32 temp;
/* unlock the write-protect */
@@ -68,8 +68,6 @@ static struct device_operations sata_ops = {
};
static const unsigned short pci_device_ids[] = {
- PCI_DEVICE_ID_AMD_SB900_SATA,
- PCI_DEVICE_ID_AMD_SB900_SATA_AHCI,
PCI_DEVICE_ID_AMD_CZ_SATA,
PCI_DEVICE_ID_AMD_CZ_SATA_AHCI,
0