generic.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * linux/arch/arm/mach-at91rm9200/generic.h
  3. *
  4. * Copyright (C) 2005 David Brownell
  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 version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. /* Processors */
  11. extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks);
  12. extern void __init at91sam9260_initialize(unsigned long main_clock);
  13. extern void __init at91sam9261_initialize(unsigned long main_clock);
  14. /* Interrupts */
  15. extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
  16. extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
  17. extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
  18. extern void __init at91_aic_init(unsigned int priority[]);
  19. /* Timer */
  20. struct sys_timer;
  21. extern struct sys_timer at91rm9200_timer;
  22. extern struct sys_timer at91sam926x_timer;
  23. /* Clocks */
  24. extern int __init at91_clock_init(unsigned long main_clock);
  25. struct device;
  26. extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func);
  27. /* Power Management */
  28. extern void at91_irq_suspend(void);
  29. extern void at91_irq_resume(void);
  30. /* GPIO */
  31. #define AT91RM9200_PQFP 3 /* AT91RM9200 PQFP package has 3 banks */
  32. #define AT91RM9200_BGA 4 /* AT91RM9200 BGA package has 4 banks */
  33. struct at91_gpio_bank {
  34. unsigned short id; /* peripheral ID */
  35. unsigned long offset; /* offset from system peripheral base */
  36. struct clk *clock; /* associated clock */
  37. };
  38. extern void __init at91_gpio_init(struct at91_gpio_bank *, int nr_banks);
  39. extern void __init at91_gpio_irq_setup(void);
  40. extern void (*at91_arch_reset)(void);
  41. extern int at91_extern_irq;