soc/intel/ptl: Update ME specification version to 21
[coreboot.git] / src / ec / google / common / mec.h
blob96df1cc0cbba0345a7637ddd39ec7b8153f79e41
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef EC_GOOGLE_COMMON_MEC_H
4 #define EC_GOOGLE_COMMON_MEC_H
6 #include <stddef.h>
7 #include <stdint.h>
9 /* Indicate read or write from MEC IO region */
10 enum mec_io_type {
11 MEC_IO_READ,
12 MEC_IO_WRITE
16 * mec_io_bytes - Read / write bytes to MEC EMI port
18 * @type: Indicate read or write operation
19 * @base: Base address for MEC EMI region
20 * @offset: Base read / write address
21 * @buffer: Destination / source buffer
22 * @size: Number of bytes to read / write
24 * @returns 8-bit checksum of all bytes read or written
27 uint8_t mec_io_bytes(enum mec_io_type type, uint16_t base,
28 uint16_t offset, void *buffer, size_t size);
30 #endif /* EC_GOOGLE_COMMON_MEC_H */