• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <device/device.h>
4 #include <device/mmio.h>
5 #include <soc/iomap.h>
6 
7 #define BIOS_CONTROL_REG	0xFC
8 #define   BIOS_CONTROL_WPD	(1 << 0)
9 
mainboard_enable(struct device * dev)10 static void mainboard_enable(struct device *dev)
11 {
12 	volatile void *addr = (void *)(SPI_BASE_ADDRESS + BIOS_CONTROL_REG);
13 
14 	/* Set Bios Write Protect Disable bit to allow saving MRC cache */
15 	write8(addr, read8(addr) | BIOS_CONTROL_WPD);
16 }
17 
18 struct chip_operations mainboard_ops = {
19 	.enable_dev = mainboard_enable,
20 };
21