162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/* Useful PROM locations */
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#ifndef SUN3X_PROM_H
562306a36Sopenharmony_ci#define SUN3X_PROM_H
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciextern void (*sun3x_putchar)(int);
862306a36Sopenharmony_ciextern int (*sun3x_getchar)(void);
962306a36Sopenharmony_ciextern int (*sun3x_mayget)(void);
1062306a36Sopenharmony_ciextern int (*sun3x_mayput)(int);
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_civoid sun3x_reboot(void);
1362306a36Sopenharmony_civoid sun3x_abort(void);
1462306a36Sopenharmony_civoid sun3x_prom_init(void);
1562306a36Sopenharmony_ciunsigned long sun3x_prom_ptov(unsigned long pa, unsigned long size);
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci/* interesting hardware locations */
1862306a36Sopenharmony_ci#define SUN3X_IOMMU       0x60000000
1962306a36Sopenharmony_ci#define SUN3X_ENAREG      0x61000000
2062306a36Sopenharmony_ci#define SUN3X_INTREG      0x61001400
2162306a36Sopenharmony_ci#define SUN3X_DIAGREG     0x61001800
2262306a36Sopenharmony_ci#define SUN3X_ZS1         0x62000000
2362306a36Sopenharmony_ci#define SUN3X_ZS2         0x62002000
2462306a36Sopenharmony_ci#define SUN3X_LANCE       0x65002000
2562306a36Sopenharmony_ci#define SUN3X_EEPROM      0x64000000
2662306a36Sopenharmony_ci#define SUN3X_IDPROM      0x640007d8
2762306a36Sopenharmony_ci#define SUN3X_VIDEO_BASE  0x50400000
2862306a36Sopenharmony_ci#define SUN3X_VIDEO_REGS  0x50300000
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci/* vector table */
3162306a36Sopenharmony_ci#define SUN3X_PROM_BASE   0xfefe0000
3262306a36Sopenharmony_ci#define SUN3X_P_GETCHAR   (SUN3X_PROM_BASE + 20)
3362306a36Sopenharmony_ci#define SUN3X_P_PUTCHAR   (SUN3X_PROM_BASE + 24)
3462306a36Sopenharmony_ci#define SUN3X_P_MAYGET    (SUN3X_PROM_BASE + 28)
3562306a36Sopenharmony_ci#define SUN3X_P_MAYPUT    (SUN3X_PROM_BASE + 32)
3662306a36Sopenharmony_ci#define SUN3X_P_REBOOT    (SUN3X_PROM_BASE + 96)
3762306a36Sopenharmony_ci#define SUN3X_P_SETLEDS   (SUN3X_PROM_BASE + 144)
3862306a36Sopenharmony_ci#define SUN3X_P_ABORT     (SUN3X_PROM_BASE + 152)
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci/* mapped area */
4162306a36Sopenharmony_ci#define SUN3X_MAP_START   0xfee00000
4262306a36Sopenharmony_ci#define SUN3X_MAP_END     0xff000000
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci#endif
45