xref: /openbmc/linux/arch/arm/mach-at91/generic.h (revision 96de0e252cedffad61b3cb5e05662c591898e69a)
1 /*
2  * linux/arch/arm/mach-at91/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 
11  /* Processors */
12 extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks);
13 extern void __init at91sam9260_initialize(unsigned long main_clock);
14 extern void __init at91sam9261_initialize(unsigned long main_clock);
15 extern void __init at91sam9263_initialize(unsigned long main_clock);
16 extern void __init at91sam9rl_initialize(unsigned long main_clock);
17 extern void __init at91x40_initialize(unsigned long main_clock);
18 
19  /* Interrupts */
20 extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
21 extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
22 extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
23 extern void __init at91sam9263_init_interrupts(unsigned int priority[]);
24 extern void __init at91sam9rl_init_interrupts(unsigned int priority[]);
25 extern void __init at91x40_init_interrupts(unsigned int priority[]);
26 extern void __init at91_aic_init(unsigned int priority[]);
27 
28  /* Timer */
29 struct sys_timer;
30 extern struct sys_timer at91rm9200_timer;
31 extern struct sys_timer at91sam926x_timer;
32 extern struct sys_timer at91x40_timer;
33 
34  /* Clocks */
35 extern int __init at91_clock_init(unsigned long main_clock);
36 struct device;
37 extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func);
38 
39  /* Power Management */
40 extern void at91_irq_suspend(void);
41 extern void at91_irq_resume(void);
42 
43  /* GPIO */
44 #define AT91RM9200_PQFP		3	/* AT91RM9200 PQFP package has 3 banks */
45 #define AT91RM9200_BGA		4	/* AT91RM9200 BGA package has 4 banks */
46 
47 struct at91_gpio_bank {
48 	unsigned short id;		/* peripheral ID */
49 	unsigned long offset;		/* offset from system peripheral base */
50 	struct clk *clock;		/* associated clock */
51 };
52 extern void __init at91_gpio_init(struct at91_gpio_bank *, int nr_banks);
53 extern void __init at91_gpio_irq_setup(void);
54 
55 extern void (*at91_arch_reset)(void);
56 extern int at91_extern_irq;
57