1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef CONSOLE_SYSTEM76_EC_H
4 #define CONSOLE_SYSTEM76_EC_H 1
8 void system76_ec_init(void);
9 void system76_ec_flush(void);
10 void system76_ec_print(uint8_t byte
);
12 #define __CONSOLE_SYSTEM76_EC_ENABLE__ (CONFIG(CONSOLE_SYSTEM76_EC) && \
13 (ENV_BOOTBLOCK || ENV_SEPARATE_ROMSTAGE || ENV_RAMSTAGE \
14 || ENV_SEPARATE_VERSTAGE || ENV_POSTCAR \
15 || (ENV_SMM && CONFIG(DEBUG_SMI))))
17 #if __CONSOLE_SYSTEM76_EC_ENABLE__
18 static inline void __system76_ec_init(void)
22 static inline void __system76_ec_tx_flush(void)
26 static inline void __system76_ec_tx_byte(unsigned char byte
)
28 system76_ec_print(byte
);
31 static inline void __system76_ec_init(void) {}
32 static inline void __system76_ec_tx_flush(void) {}
33 static inline void __system76_ec_tx_byte(unsigned char byte
) {}