1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
9 /* CMOS actually resides in the RTC SRAM */
10 #define CMOS_IO_PORT 0x70
13 * cmos_read8() - Get 8-bit data stored at the given address
15 * This reads from CMOS for the 8-bit data stored at the given address.
17 * @addr: RTC SRAM address
18 * @return: 8-bit data stored at the given address
20 u8 cmos_read8(u8 addr);
23 * cmos_read16() - Get 16-bit data stored at the given address
25 * This reads from CMOS for the 16-bit data stored at the given address.
27 * @addr: RTC SRAM address
28 * @return: 16-bit data stored at the given address
30 u16 cmos_read16(u8 addr);
33 * cmos_read32() - Get 32-bit data stored at the given address
35 * This reads from CMOS for the 32-bit data stored at the given address.
37 * @addr: RTC SRAM address
38 * @return: 32-bit data stored at the given address
40 u32 cmos_read32(u8 addr);
42 #endif /* __EARLY_CMOS_H */