18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __AXP_CONSOLE_H
38c2ecf20Sopenharmony_ci#define __AXP_CONSOLE_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <uapi/asm/console.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__
88c2ecf20Sopenharmony_ciextern long callback_puts(long unit, const char *s, long length);
98c2ecf20Sopenharmony_ciextern long callback_getc(long unit);
108c2ecf20Sopenharmony_ciextern long callback_open_console(void);
118c2ecf20Sopenharmony_ciextern long callback_close_console(void);
128c2ecf20Sopenharmony_ciextern long callback_open(const char *device, long length);
138c2ecf20Sopenharmony_ciextern long callback_close(long unit);
148c2ecf20Sopenharmony_ciextern long callback_read(long channel, long count, const char *buf, long lbn);
158c2ecf20Sopenharmony_ciextern long callback_getenv(long id, const char *buf, unsigned long buf_size);
168c2ecf20Sopenharmony_ciextern long callback_setenv(long id, const char *buf, unsigned long buf_size);
178c2ecf20Sopenharmony_ciextern long callback_save_env(void);
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciextern int srm_fixup(unsigned long new_callback_addr,
208c2ecf20Sopenharmony_ci		     unsigned long new_hwrpb_addr);
218c2ecf20Sopenharmony_ciextern long srm_puts(const char *, long);
228c2ecf20Sopenharmony_ciextern long srm_printk(const char *, ...)
238c2ecf20Sopenharmony_ci	__attribute__ ((format (printf, 1, 2)));
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_cistruct crb_struct;
268c2ecf20Sopenharmony_cistruct hwrpb_struct;
278c2ecf20Sopenharmony_ciextern int callback_init_done;
288c2ecf20Sopenharmony_ciextern void * callback_init(void *);
298c2ecf20Sopenharmony_ci#endif /* __ASSEMBLY__ */
308c2ecf20Sopenharmony_ci#endif /* __AXP_CONSOLE_H */
31