ioasic.h 655 B

12345678910111213141516171819202122232425262728293031323334
  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. #ifndef __ASM_DEC_IOASIC_H
  10. #define __ASM_DEC_IOASIC_H
  11. #include <linux/spinlock.h>
  12. #include <linux/types.h>
  13. extern spinlock_t ioasic_ssr_lock;
  14. extern volatile u32 *ioasic_base;
  15. static inline void ioasic_write(unsigned int reg, u32 v)
  16. {
  17. ioasic_base[reg / 4] = v;
  18. }
  19. static inline u32 ioasic_read(unsigned int reg)
  20. {
  21. return ioasic_base[reg / 4];
  22. }
  23. extern void init_ioasic_irqs(int base);
  24. extern int dec_ioasic_clocksource_init(void);
  25. #endif /* __ASM_DEC_IOASIC_H */