18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Definitions for the "Baboon" custom IC on the PowerBook 190.
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#define BABOON_BASE (0x50F1A000)	/* same as IDE controller base */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_cistruct baboon {
118c2ecf20Sopenharmony_ci	char	pad1[208];	/* generic IDE registers, not used here */
128c2ecf20Sopenharmony_ci	short	mb_control;	/* Control register:
138c2ecf20Sopenharmony_ci				 * bit 5 : slot 2 power control
148c2ecf20Sopenharmony_ci				 * bit 6 : slot 1 power control
158c2ecf20Sopenharmony_ci				 */
168c2ecf20Sopenharmony_ci	char	pad2[2];
178c2ecf20Sopenharmony_ci	short	mb_status;	/* (0xD4) media bay status register:
188c2ecf20Sopenharmony_ci				 *
198c2ecf20Sopenharmony_ci				 * bit 0: ????
208c2ecf20Sopenharmony_ci				 * bit 1: IDE interrupt active?
218c2ecf20Sopenharmony_ci				 * bit 2: bay status, 0 = full, 1 = empty
228c2ecf20Sopenharmony_ci				 * bit 3: ????
238c2ecf20Sopenharmony_ci				 */
248c2ecf20Sopenharmony_ci	char	pad3[2];	/* (0xD6) not used */
258c2ecf20Sopenharmony_ci	short	mb_ifr;		/* (0xD8) media bay interrupt flags register:
268c2ecf20Sopenharmony_ci				 *
278c2ecf20Sopenharmony_ci				 * bit 0: ????
288c2ecf20Sopenharmony_ci				 * bit 1: IDE controller interrupt
298c2ecf20Sopenharmony_ci				 * bit 2: media bay status change interrupt
308c2ecf20Sopenharmony_ci				 */
318c2ecf20Sopenharmony_ci};
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciextern int baboon_present;
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciextern void baboon_register_interrupts(void);
368c2ecf20Sopenharmony_ciextern void baboon_irq_enable(int);
378c2ecf20Sopenharmony_ciextern void baboon_irq_disable(int);
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci#endif /* __ASSEMBLY **/
40