arch/riscv: Fix compiler argument for clang
[coreboot.git] / src / southbridge / intel / common / me.c
blobd49508748a3841b6010f35ec0cd9e337c83529a1
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #define __SIMPLE_DEVICE__
5 #include <device/pci_ops.h>
6 #include <types.h>
8 #include "me.h"
10 #define PCH_LPC_DEV PCI_DEV(0, 0x1f, 0)
12 #define ETR3 0xac
13 #define ETR3_CWORWRE (1 << 18)
14 #define ETR3_CF9GR (1 << 20)
15 #define ETR3_CF9LOCK (1 << 31)
17 void set_global_reset(const bool enable)
19 u32 etr3 = pci_read_config32(PCH_LPC_DEV, ETR3);
21 /* Clear CF9 Without Resume Well Reset Enable */
22 etr3 &= ~ETR3_CWORWRE;
24 /* CF9GR indicates a Global Reset */
25 if (enable)
26 etr3 |= ETR3_CF9GR;
27 else
28 etr3 &= ~ETR3_CF9GR;
30 pci_write_config32(PCH_LPC_DEV, ETR3, etr3);