coreboot-kgpe-d16/src/soc/amd/mendocino/espi_util.c
Jon Murphy 4f73242052 treewide: Rename Sabrina to Mendocino
'Mendocino' was an embargoed name and could previously not be used
in references to Skyrim.  coreboot has references to sabrina both
in directory structure and in files. This will make life difficult
for people looking for Mendocino support in the long term. The code
name should be replaced with "mendocino".

BUG=b:239072117
TEST=Builds

Cq-Depend: chromium:3764023
Cq-Depend: chromium:3763392
Cq-Depend: chrome-internal:4876777

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I2d0f76fde07a209a79f7e1596cc8064e53f06ada
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65861
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-08-11 19:15:30 +00:00

20 lines
435 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#include <amdblocks/spi.h>
#include <soc/espi.h>
#include <types.h>
#define ESPI_CNTRL_REGISTER 0x10
#define LOCK_SPIX10_BIT2 BIT(3)
#define ESPI_MUX_SPI1 BIT(2)
#define ROM_ADDR_WR_PROT BIT(1)
#define DIS_ESPI_MASCTL_REG_WR BIT(0)
void espi_switch_to_spi1_pads(void)
{
uint8_t reg = spi_read8(ESPI_CNTRL_REGISTER);
reg |= ESPI_MUX_SPI1;
spi_write8(ESPI_CNTRL_REGISTER, reg);
}