xref: /openbmc/linux/arch/mips/include/asm/dec/ioasic.h (revision 384740dc)
1384740dcSRalf Baechle /*
2384740dcSRalf Baechle  *	include/asm-mips/dec/ioasic.h
3384740dcSRalf Baechle  *
4384740dcSRalf Baechle  *	DEC I/O ASIC access operations.
5384740dcSRalf Baechle  *
6384740dcSRalf Baechle  *	Copyright (C) 2000, 2002, 2003  Maciej W. Rozycki
7384740dcSRalf Baechle  *
8384740dcSRalf Baechle  *	This program is free software; you can redistribute it and/or
9384740dcSRalf Baechle  *	modify it under the terms of the GNU General Public License
10384740dcSRalf Baechle  *	as published by the Free Software Foundation; either version
11384740dcSRalf Baechle  *	2 of the License, or (at your option) any later version.
12384740dcSRalf Baechle  */
13384740dcSRalf Baechle 
14384740dcSRalf Baechle #ifndef __ASM_DEC_IOASIC_H
15384740dcSRalf Baechle #define __ASM_DEC_IOASIC_H
16384740dcSRalf Baechle 
17384740dcSRalf Baechle #include <linux/spinlock.h>
18384740dcSRalf Baechle #include <linux/types.h>
19384740dcSRalf Baechle 
20384740dcSRalf Baechle extern spinlock_t ioasic_ssr_lock;
21384740dcSRalf Baechle 
22384740dcSRalf Baechle extern volatile u32 *ioasic_base;
23384740dcSRalf Baechle 
24384740dcSRalf Baechle static inline void ioasic_write(unsigned int reg, u32 v)
25384740dcSRalf Baechle {
26384740dcSRalf Baechle 	ioasic_base[reg / 4] = v;
27384740dcSRalf Baechle }
28384740dcSRalf Baechle 
29384740dcSRalf Baechle static inline u32 ioasic_read(unsigned int reg)
30384740dcSRalf Baechle {
31384740dcSRalf Baechle 	return ioasic_base[reg / 4];
32384740dcSRalf Baechle }
33384740dcSRalf Baechle 
34384740dcSRalf Baechle extern void init_ioasic_irqs(int base);
35384740dcSRalf Baechle 
36384740dcSRalf Baechle extern void dec_ioasic_clocksource_init(void);
37384740dcSRalf Baechle 
38384740dcSRalf Baechle #endif /* __ASM_DEC_IOASIC_H */
39