at91x40.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * arch/arm/mach-at91/at91x40.c
  3. *
  4. * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
  5. * Copyright (C) 2005 SAN People
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/irq.h>
  15. #include <asm/mach/arch.h>
  16. #include <asm/arch/at91x40.h>
  17. #include <asm/arch/at91_st.h>
  18. #include "generic.h"
  19. /*
  20. * This is used in the gpio code, stub locally.
  21. */
  22. int clk_enable(struct clk *clk)
  23. {
  24. return 0;
  25. }
  26. void __init at91x40_initialize(unsigned long main_clock)
  27. {
  28. at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
  29. | (1 << AT91X40_ID_IRQ2);
  30. }
  31. /*
  32. * The default interrupt priority levels (0 = lowest, 7 = highest).
  33. */
  34. static unsigned int at91x40_default_irq_priority[NR_AIC_IRQS] __initdata = {
  35. 7, /* Advanced Interrupt Controller (FIQ) */
  36. 0, /* System Peripherals */
  37. 0, /* USART 0 */
  38. 0, /* USART 1 */
  39. 2, /* Timer Counter 0 */
  40. 2, /* Timer Counter 1 */
  41. 2, /* Timer Counter 2 */
  42. 0, /* Watchdog timer */
  43. 0, /* Parallel IO Controller A */
  44. 0, /* Reserved */
  45. 0, /* Reserved */
  46. 0, /* Reserved */
  47. 0, /* Reserved */
  48. 0, /* Reserved */
  49. 0, /* Reserved */
  50. 0, /* Reserved */
  51. 0, /* External IRQ0 */
  52. 0, /* External IRQ1 */
  53. 0, /* External IRQ2 */
  54. };
  55. void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS])
  56. {
  57. if (!priority)
  58. priority = at91x40_default_irq_priority;
  59. at91_aic_init(priority);
  60. }