soc/amd/stoneyridge: use SMBus speed in compilation unit
The fixed bus speed of 400 kHz doesn't need to reside in a header file. Just move the assumption into the code itself. Change-Id: I426fe078909a9b725c1747380d69af31292b6d1e Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38611 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
dafd514d30
commit
5c0ef70244
|
@ -19,8 +19,6 @@
|
|||
#include <stdint.h>
|
||||
#include <soc/iomap.h>
|
||||
|
||||
#define SMB_SPEED_400KHZ (66000000 / (400000 * 4))
|
||||
|
||||
/*
|
||||
* Between 1-10 seconds, We should never timeout normally
|
||||
* Longer than this is just painful when a timeout condition occurs.
|
||||
|
|
|
@ -378,8 +378,11 @@ static void setup_misc(int *reboot)
|
|||
|
||||
static void fch_smbus_init(void)
|
||||
{
|
||||
/* 400 kHz smbus speed. */
|
||||
const uint8_t smbus_speed = (66000000 / (400000 * 4));
|
||||
|
||||
pm_write8(SMB_ASF_IO_BASE, SMB_BASE_ADDR >> 8);
|
||||
smbus_write8(SMBTIMING, SMB_SPEED_400KHZ);
|
||||
smbus_write8(SMBTIMING, smbus_speed);
|
||||
/* Clear all SMBUS status bits */
|
||||
smbus_write8(SMBHSTSTAT, SMBHST_STAT_CLEAR);
|
||||
smbus_write8(SMBSLVSTAT, SMBSLV_STAT_CLEAR);
|
||||
|
|
Loading…
Reference in New Issue