blob: 8c819df5842c81c450f60de4cc421bb8440da15b [file] [log] [blame]
Patrick Georgi55189c92020-05-10 20:09:31 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Stefan Reinauer6540ae52007-07-12 16:35:42 +00002
Uwe Hermann6e565942008-03-01 19:06:32 +00003#ifndef CMOS_OPS_H
4#define CMOS_OPS_H
Stefan Reinauer6540ae52007-07-12 16:35:42 +00005
6#include "common.h"
7#include "layout.h"
8
9#define CMOS_OP_BAD_ENUM_VALUE (CMOS_OP_RESULT_START + 0)
10#define CMOS_OP_NEGATIVE_INT (CMOS_OP_RESULT_START + 1)
11#define CMOS_OP_INVALID_INT (CMOS_OP_RESULT_START + 2)
12#define CMOS_OP_RESERVED (CMOS_OP_RESULT_START + 3)
13#define CMOS_OP_VALUE_TOO_WIDE (CMOS_OP_RESULT_START + 4)
14#define CMOS_OP_NO_MATCHING_ENUM (CMOS_OP_RESULT_START + 5)
15
Stefan Reinauer90b96b62010-01-13 21:00:23 +000016int prepare_cmos_read(const cmos_entry_t * e);
17int prepare_cmos_write(const cmos_entry_t * e, const char value_str[],
18 unsigned long long *value);
19uint16_t cmos_checksum_read(void);
20void cmos_checksum_write(uint16_t checksum);
21uint16_t cmos_checksum_compute(void);
22void cmos_checksum_verify(void);
Stefan Reinauer6540ae52007-07-12 16:35:42 +000023
Stefan Reinauer90b96b62010-01-13 21:00:23 +000024#endif /* CMOS_OPS_H */