1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/mmio.h>
7 #define BIOS_CONTROL_REG 0xFC
8 #define BIOS_CONTROL_WPD (1 << 0)
10 static void mainboard_enable(struct device
*dev
)
12 volatile void *addr
= (void *)(SPI_BASE_ADDRESS
+ BIOS_CONTROL_REG
);
14 /* Set Bios Write Protect Disable bit to allow saving MRC cache */
15 write8(addr
, read8(addr
) | BIOS_CONTROL_WPD
);
18 struct chip_operations mainboard_ops
= {
19 .enable_dev
= mainboard_enable
,