mips-gic.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2000, 07 MIPS Technologies, Inc.
  7. */
  8. #ifndef __LINUX_IRQCHIP_MIPS_GIC_H
  9. #define __LINUX_IRQCHIP_MIPS_GIC_H
  10. #include <linux/clocksource.h>
  11. #include <linux/ioport.h>
  12. /* GIC Address Space */
  13. #define USM_VISIBLE_SECTION_OFS 0x10000
  14. #define USM_VISIBLE_SECTION_SIZE 0x10000
  15. /* User Mode Visible Section Register Map */
  16. #define GIC_UMV_SH_COUNTER_31_00_OFS 0x0000
  17. #define GIC_UMV_SH_COUNTER_63_32_OFS 0x0004
  18. #ifdef CONFIG_MIPS_GIC
  19. extern unsigned int gic_present;
  20. extern void gic_init(unsigned long gic_base_addr,
  21. unsigned long gic_addrspace_size, unsigned int cpu_vec,
  22. unsigned int irqbase);
  23. extern int gic_get_c0_compare_int(void);
  24. extern int gic_get_c0_perfcount_int(void);
  25. extern int gic_get_c0_fdc_int(void);
  26. extern int gic_get_usm_range(struct resource *gic_usm_res);
  27. #else /* CONFIG_MIPS_GIC */
  28. #define gic_present 0
  29. static inline int gic_get_usm_range(struct resource *gic_usm_res)
  30. {
  31. /* Shouldn't be called. */
  32. return -1;
  33. }
  34. #endif /* CONFIG_MIPS_GIC */
  35. #endif /* __LINUX_IRQCHIP_MIPS_GIC_H */