From 830e0de40187183c34a1f558d83b65068b649e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 19 Aug 2019 13:29:46 +0300 Subject: AGESA,binaryPI: Fix use of chip.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I123db3a51a8f354359e8ed5040d23111ea4eb8a4 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34996 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- src/southbridge/amd/agesa/hudson/hudson.h | 1 - src/southbridge/amd/agesa/hudson/sd.c | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/southbridge/amd/agesa') diff --git a/src/southbridge/amd/agesa/hudson/hudson.h b/src/southbridge/amd/agesa/hudson/hudson.h index bd49e8f05c..5d9d8494c6 100644 --- a/src/southbridge/amd/agesa/hudson/hudson.h +++ b/src/southbridge/amd/agesa/hudson/hudson.h @@ -18,7 +18,6 @@ #define HUDSON_H #include -#include "chip.h" /* Power management index/data registers */ #define BIOSRAM_INDEX 0xcd4 diff --git a/src/southbridge/amd/agesa/hudson/sd.c b/src/southbridge/amd/agesa/hudson/sd.c index cc9470e04b..25acf0cc1f 100644 --- a/src/southbridge/amd/agesa/hudson/sd.c +++ b/src/southbridge/amd/agesa/hudson/sd.c @@ -18,18 +18,19 @@ #include #include +#include "chip.h" #include "hudson.h" static void sd_init(struct device *dev) { - u32 stepping; + struct southbridge_amd_agesa_hudson_config *sd_chip = dev->chip_info; + u32 stepping = pci_read_config32(pcidev_on_root(0x18, 3), 0xFC); + u8 sd_mode = 0; - stepping = pci_read_config32(pcidev_on_root(0x18, 3), 0xFC); + if (sd_chip) + sd_mode = sd_chip->sd_mode; - struct southbridge_amd_agesa_hudson_config *sd_chip = - (struct southbridge_amd_agesa_hudson_config *)(dev->chip_info); - - if (sd_chip->sd_mode == 3) { /* SD 3.0 mode */ + if (sd_mode == 3) { /* SD 3.0 mode */ pci_write_config32(dev, 0xA4, 0x31FEC8B2); pci_write_config32(dev, 0xA8, 0x00002503); pci_write_config32(dev, 0xB0, 0x02180C19); -- cgit v1.2.3