Loading...
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * include/asm-mips/dec/ioasic.h
4 *
5 * DEC I/O ASIC access operations.
6 *
7 * Copyright (C) 2000, 2002, 2003 Maciej W. Rozycki
8 */
9
10#ifndef __ASM_DEC_IOASIC_H
11#define __ASM_DEC_IOASIC_H
12
13#include <linux/spinlock.h>
14#include <linux/types.h>
15
16extern spinlock_t ioasic_ssr_lock;
17
18extern volatile u32 *ioasic_base;
19
20static inline void ioasic_write(unsigned int reg, u32 v)
21{
22 ioasic_base[reg / 4] = v;
23}
24
25static inline u32 ioasic_read(unsigned int reg)
26{
27 return ioasic_base[reg / 4];
28}
29
30extern void init_ioasic_irqs(int base);
31
32extern int dec_ioasic_clocksource_init(void);
33
34#endif /* __ASM_DEC_IOASIC_H */
1/*
2 * include/asm-mips/dec/ioasic.h
3 *
4 * DEC I/O ASIC access operations.
5 *
6 * Copyright (C) 2000, 2002, 2003 Maciej W. Rozycki
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13
14#ifndef __ASM_DEC_IOASIC_H
15#define __ASM_DEC_IOASIC_H
16
17#include <linux/spinlock.h>
18#include <linux/types.h>
19
20extern spinlock_t ioasic_ssr_lock;
21
22extern volatile u32 *ioasic_base;
23
24static inline void ioasic_write(unsigned int reg, u32 v)
25{
26 ioasic_base[reg / 4] = v;
27}
28
29static inline u32 ioasic_read(unsigned int reg)
30{
31 return ioasic_base[reg / 4];
32}
33
34extern void init_ioasic_irqs(int base);
35
36extern void dec_ioasic_clocksource_init(void);
37
38#endif /* __ASM_DEC_IOASIC_H */