Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 2 | |
| 3 | #ifndef _MAINBOARD_LENOVO_S230U_EC_H |
| 4 | #define _MAINBOARD_LENOVO_S230U_EC_H |
| 5 | |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 6 | void lenovo_s230u_ec_init(void); |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 7 | |
| 8 | #define ECMM(x) (*((volatile u8 *)(CONFIG_EC_BASE_ADDRESS + x))) |
| 9 | #define ec_mm_read(addr) (ECMM(0x100 + addr)) |
| 10 | #define ec_mm_write(addr, data) (ECMM(0x100 + addr) = data) |
| 11 | #define ec_mm_set_bit(addr, bit) (ECMM(0x100 + addr) |= 1 << bit) |
| 12 | #define ec_mm_clr_bit(addr, bit) (ECMM(0x100 + addr) &= ~(1 << bit)) |
| 13 | |
Peter Lemenkov | 6b7d40a | 2020-01-22 11:40:16 +0100 | [diff] [blame] | 14 | #endif /* _MAINBOARD_LENOVO_S230U_EC_H */ |