18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Definitions for using the procedures in btext.c.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Benjamin Herrenschmidt <benh@kernel.crashing.org>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci#ifndef __PPC_BTEXT_H
88c2ecf20Sopenharmony_ci#define __PPC_BTEXT_H
98c2ecf20Sopenharmony_ci#ifdef __KERNEL__
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciextern int btext_find_display(int allow_nonstdout);
128c2ecf20Sopenharmony_ciextern void btext_update_display(unsigned long phys, int width, int height,
138c2ecf20Sopenharmony_ci				 int depth, int pitch);
148c2ecf20Sopenharmony_ciextern void btext_setup_display(int width, int height, int depth, int pitch,
158c2ecf20Sopenharmony_ci				unsigned long address);
168c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC32
178c2ecf20Sopenharmony_ciextern void btext_prepare_BAT(void);
188c2ecf20Sopenharmony_ci#else
198c2ecf20Sopenharmony_cistatic inline void btext_prepare_BAT(void) { }
208c2ecf20Sopenharmony_ci#endif
218c2ecf20Sopenharmony_ciextern void btext_map(void);
228c2ecf20Sopenharmony_ciextern void btext_unmap(void);
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciextern void btext_drawchar(char c);
258c2ecf20Sopenharmony_ciextern void btext_drawstring(const char *str);
268c2ecf20Sopenharmony_ciextern void btext_drawhex(unsigned long v);
278c2ecf20Sopenharmony_ciextern void btext_drawtext(const char *c, unsigned int len);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciextern void btext_clearscreen(void);
308c2ecf20Sopenharmony_ciextern void btext_flushscreen(void);
318c2ecf20Sopenharmony_ciextern void btext_flushline(void);
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */
348c2ecf20Sopenharmony_ci#endif /* __PPC_BTEXT_H */
35