gic.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * COPYRIGHT (C) 2013-2014, Shanghai Real-Thread Technology Co., Ltd
  3. *
  4. * All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. */
  20. #ifndef __GIC_H__
  21. #define __GIC_H__
  22. int arm_gic_dist_init(rt_uint32_t index, rt_uint32_t dist_base, int irq_start);
  23. int arm_gic_cpu_init(rt_uint32_t index, rt_uint32_t cpu_base);
  24. void arm_gic_mask(rt_uint32_t index, int irq);
  25. void arm_gic_umask(rt_uint32_t index, int irq);
  26. void arm_gic_set_cpu(rt_uint32_t index, int irq, unsigned int cpumask);
  27. void arm_gic_set_group(rt_uint32_t index, int vector, int group);
  28. int arm_gic_get_active_irq(rt_uint32_t index);
  29. void arm_gic_ack(rt_uint32_t index, int irq);
  30. void arm_gic_trigger(rt_uint32_t index, int target_cpu, int irq);
  31. void arm_gic_clear_sgi(rt_uint32_t index, int target_cpu, int irq);
  32. void arm_gic_dump_type(rt_uint32_t index);
  33. #endif