18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* Useful PROM locations */
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef SUN3X_PROM_H
58c2ecf20Sopenharmony_ci#define SUN3X_PROM_H
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciextern void (*sun3x_putchar)(int);
88c2ecf20Sopenharmony_ciextern int (*sun3x_getchar)(void);
98c2ecf20Sopenharmony_ciextern int (*sun3x_mayget)(void);
108c2ecf20Sopenharmony_ciextern int (*sun3x_mayput)(int);
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_civoid sun3x_reboot(void);
138c2ecf20Sopenharmony_civoid sun3x_abort(void);
148c2ecf20Sopenharmony_civoid sun3x_prom_init(void);
158c2ecf20Sopenharmony_ciunsigned long sun3x_prom_ptov(unsigned long pa, unsigned long size);
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci/* interesting hardware locations */
188c2ecf20Sopenharmony_ci#define SUN3X_IOMMU       0x60000000
198c2ecf20Sopenharmony_ci#define SUN3X_ENAREG      0x61000000
208c2ecf20Sopenharmony_ci#define SUN3X_INTREG      0x61001400
218c2ecf20Sopenharmony_ci#define SUN3X_DIAGREG     0x61001800
228c2ecf20Sopenharmony_ci#define SUN3X_ZS1         0x62000000
238c2ecf20Sopenharmony_ci#define SUN3X_ZS2         0x62002000
248c2ecf20Sopenharmony_ci#define SUN3X_LANCE       0x65002000
258c2ecf20Sopenharmony_ci#define SUN3X_EEPROM      0x64000000
268c2ecf20Sopenharmony_ci#define SUN3X_IDPROM      0x640007d8
278c2ecf20Sopenharmony_ci#define SUN3X_VIDEO_BASE  0x50400000
288c2ecf20Sopenharmony_ci#define SUN3X_VIDEO_REGS  0x50300000
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci/* vector table */
318c2ecf20Sopenharmony_ci#define SUN3X_PROM_BASE   0xfefe0000
328c2ecf20Sopenharmony_ci#define SUN3X_P_GETCHAR   (SUN3X_PROM_BASE + 20)
338c2ecf20Sopenharmony_ci#define SUN3X_P_PUTCHAR   (SUN3X_PROM_BASE + 24)
348c2ecf20Sopenharmony_ci#define SUN3X_P_MAYGET    (SUN3X_PROM_BASE + 28)
358c2ecf20Sopenharmony_ci#define SUN3X_P_MAYPUT    (SUN3X_PROM_BASE + 32)
368c2ecf20Sopenharmony_ci#define SUN3X_P_REBOOT    (SUN3X_PROM_BASE + 96)
378c2ecf20Sopenharmony_ci#define SUN3X_P_SETLEDS   (SUN3X_PROM_BASE + 144)
388c2ecf20Sopenharmony_ci#define SUN3X_P_ABORT     (SUN3X_PROM_BASE + 152)
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci/* mapped area */
418c2ecf20Sopenharmony_ci#define SUN3X_MAP_START   0xfee00000
428c2ecf20Sopenharmony_ci#define SUN3X_MAP_END     0xff000000
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci#endif
45