162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Definitions for using the procedures in btext.c.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Benjamin Herrenschmidt <benh@kernel.crashing.org>
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci#ifndef __PPC_BTEXT_H
862306a36Sopenharmony_ci#define __PPC_BTEXT_H
962306a36Sopenharmony_ci#ifdef __KERNEL__
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciextern int btext_find_display(int allow_nonstdout);
1262306a36Sopenharmony_ciextern void btext_update_display(unsigned long phys, int width, int height,
1362306a36Sopenharmony_ci				 int depth, int pitch);
1462306a36Sopenharmony_ciextern void btext_setup_display(int width, int height, int depth, int pitch,
1562306a36Sopenharmony_ci				unsigned long address);
1662306a36Sopenharmony_ci#ifdef CONFIG_PPC32
1762306a36Sopenharmony_ciextern void btext_prepare_BAT(void);
1862306a36Sopenharmony_ci#else
1962306a36Sopenharmony_cistatic inline void btext_prepare_BAT(void) { }
2062306a36Sopenharmony_ci#endif
2162306a36Sopenharmony_ciextern void btext_map(void);
2262306a36Sopenharmony_ciextern void btext_unmap(void);
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ciextern void btext_drawchar(char c);
2562306a36Sopenharmony_ciextern void btext_drawstring(const char *str);
2662306a36Sopenharmony_civoid __init btext_drawhex(unsigned long v);
2762306a36Sopenharmony_civoid __init btext_drawtext(const char *c, unsigned int len);
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_civoid __init btext_clearscreen(void);
3062306a36Sopenharmony_civoid __init btext_flushscreen(void);
3162306a36Sopenharmony_civoid __init btext_flushline(void);
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci#endif /* __KERNEL__ */
3462306a36Sopenharmony_ci#endif /* __PPC_BTEXT_H */
35