Patrick Georgi | 55189c9 | 2020-05-10 20:09:31 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 2 | |
Uwe Hermann | 6e56594 | 2008-03-01 19:06:32 +0000 | [diff] [blame] | 3 | #ifndef CMOS_OPS_H |
| 4 | #define CMOS_OPS_H |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 5 | |
| 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 Reinauer | 90b96b6 | 2010-01-13 21:00:23 +0000 | [diff] [blame] | 16 | int prepare_cmos_read(const cmos_entry_t * e); |
| 17 | int prepare_cmos_write(const cmos_entry_t * e, const char value_str[], |
| 18 | unsigned long long *value); |
| 19 | uint16_t cmos_checksum_read(void); |
| 20 | void cmos_checksum_write(uint16_t checksum); |
| 21 | uint16_t cmos_checksum_compute(void); |
| 22 | void cmos_checksum_verify(void); |
Stefan Reinauer | 6540ae5 | 2007-07-12 16:35:42 +0000 | [diff] [blame] | 23 | |
Stefan Reinauer | 90b96b6 | 2010-01-13 21:00:23 +0000 | [diff] [blame] | 24 | #endif /* CMOS_OPS_H */ |