summaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2020-12-01 00:34:11 +0100
committerFelix Held <felix-coreboot@felixheld.de>2020-12-02 21:27:21 +0000
commit875e5aa96c8d9e767d24b99015abb66bf7e0ef75 (patch)
tree4499acee68d6d7c43d5603650dd34ea4b4e12b15 /src/soc/amd/picasso
parent6443ad4a53ab65a2a9c1d29f422644e450c04cd7 (diff)
downloadcoreboot-875e5aa96c8d9e767d24b99015abb66bf7e0ef75.tar.xz
soc/amd: factor out SMBUS controller registers into common header
The patch also rewrites the bit definition using shifts to make them easier to read. The older non-SoC chips can probably also use the new header file, but for this patch the scope is limited to soc/amd, since the older non-SoC chips don't use the SMBUS controller code in soc/amd/common. TEST=Timeless build for amd/mandolin and amd/gardenia doesn't change. Change-Id: Ifd5e7e64a41f1cb20cdc4d6ad1e675d7f2de352b Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48188 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/picasso')
-rw-r--r--src/soc/amd/picasso/include/soc/southbridge.h44
-rw-r--r--src/soc/amd/picasso/southbridge.c1
2 files changed, 1 insertions, 44 deletions
diff --git a/src/soc/amd/picasso/include/soc/southbridge.h b/src/soc/amd/picasso/include/soc/southbridge.h
index 809eb97486..6fdc5abce8 100644
--- a/src/soc/amd/picasso/include/soc/southbridge.h
+++ b/src/soc/amd/picasso/include/soc/southbridge.h
@@ -93,50 +93,6 @@
#define PM_USB_ENABLE 0xef
#define PM_USB_ALL_CONTROLLERS 0x7f
-/* SMBUS MMIO offsets 0xfed80a00 */
-#define SMBHSTSTAT 0x0
-#define SMBHST_STAT_FAILED BIT(4)
-#define SMBHST_STAT_COLLISION BIT(3)
-#define SMBHST_STAT_ERROR BIT(2)
-#define SMBHST_STAT_INTERRUPT BIT(1)
-#define SMBHST_STAT_BUSY BIT(0)
-#define SMBHST_STAT_CLEAR 0xff
-#define SMBHST_STAT_NOERROR BIT(1)
-#define SMBHST_STAT_VAL_BITS 0x1f
-#define SMBHST_STAT_ERROR_BITS 0x1c
-
-#define SMBSLVSTAT 0x1
-#define SMBSLV_STAT_ALERT 0x20
-#define SMBSLV_STAT_SHADOW2 0x10
-#define SMBSLV_STAT_SHADOW1 0x08
-#define SMBSLV_STAT_SLV_STS 0x04
-#define SMBSLV_STAT_SLV_INIT 0x02
-#define SMBSLV_STAT_SLV_BUSY 0x01
-#define SMBSLV_STAT_CLEAR 0x1f
-
-#define SMBHSTCTRL 0x2
-#define SMBHST_CTRL_RST 0x80
-#define SMBHST_CTRL_STRT 0x40
-#define SMBHST_CTRL_QCK_RW 0x00
-#define SMBHST_CTRL_BTE_RW 0x04
-#define SMBHST_CTRL_BDT_RW 0x08
-#define SMBHST_CTRL_WDT_RW 0x0c
-#define SMBHST_CTRL_BLK_RW 0x14
-#define SMBHST_CTRL_MODE_BITS 0x1c
-#define SMBHST_CTRL_KILL 0x02
-#define SMBHST_CTRL_IEN 0x01
-
-#define SMBHSTCMD 0x3
-#define SMBHSTADDR 0x4
-#define SMBHSTDAT0 0x5
-#define SMBHSTDAT1 0x6
-#define SMBHSTBLKDAT 0x7
-#define SMBSLVCTRL 0x8
-#define SMBSLVCMD_SHADOW 0x9
-#define SMBSLVEVT 0xa
-#define SMBSLVDAT 0xc
-#define SMBTIMING 0xe
-
/* FCH MISC Registers 0xfed80e00 */
#define GPP_CLK_CNTRL 0x00
#define GPP_CLK0_REQ_SHIFT 0
diff --git a/src/soc/amd/picasso/southbridge.c b/src/soc/amd/picasso/southbridge.c
index 9772e9bc31..edbcb60b5f 100644
--- a/src/soc/amd/picasso/southbridge.c
+++ b/src/soc/amd/picasso/southbridge.c
@@ -17,6 +17,7 @@
#include <amdblocks/espi.h>
#include <amdblocks/lpc.h>
#include <amdblocks/acpi.h>
+#include <amdblocks/smbus.h>
#include <amdblocks/spi.h>
#include <soc/acpi.h>
#include <soc/cpu.h>