interrupts.c 831 B

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. *
  4. * (C) Copyright 2000-2004
  5. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  6. *
  7. * Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
  8. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  9. */
  10. /* CPU specific interrupt routine */
  11. #include <common.h>
  12. #include <asm/immap.h>
  13. #include <asm/io.h>
  14. int interrupt_init(void)
  15. {
  16. int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
  17. /* Make sure all interrupts are disabled */
  18. setbits_be32(&intp->imrh0, 0xffffffff);
  19. setbits_be32(&intp->imrl0, 0xffffffff);
  20. enable_interrupts();
  21. return 0;
  22. }
  23. #if defined(CONFIG_MCFTMR)
  24. void dtimer_intr_setup(void)
  25. {
  26. int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
  27. out_8(&intp->icr0[CONFIG_SYS_TMRINTR_NO], CONFIG_SYS_TMRINTR_PRI);
  28. clrbits_be32(&intp->imrh0, CONFIG_SYS_TMRINTR_MASK);
  29. }
  30. #endif