blob: 77d4c0a378421b8044dcb1aa6e3847d2b6304951 [file] [log] [blame]
SAN People73a59c12006-01-09 17:05:41 +00001/*
Andrew Victor9d041262007-02-05 11:42:07 +01002 * linux/arch/arm/mach-at91/generic.h
SAN People73a59c12006-01-09 17:05:41 +00003 *
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
Andrew Victor2eeaaa22006-09-27 10:50:59 +010011 /* Processors */
Andrew Victorf2173832006-09-27 13:23:00 +010012extern void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks);
Andrew Victor62c16602006-11-30 12:27:38 +010013extern void __init at91sam9260_initialize(unsigned long main_clock);
14extern void __init at91sam9261_initialize(unsigned long main_clock);
Andrew Victorb2c65612007-02-08 09:42:40 +010015extern void __init at91sam9263_initialize(unsigned long main_clock);
Andrew Victor877d7722007-05-11 20:49:56 +010016extern void __init at91sam9rl_initialize(unsigned long main_clock);
Greg Ungerer9a7e2462007-07-30 02:39:02 +010017extern void __init at91x40_initialize(unsigned long main_clock);
Andrew Victor2eeaaa22006-09-27 10:50:59 +010018
Andrew Victorba854e12006-07-05 17:22:52 +010019 /* Interrupts */
Andrew Victorf2173832006-09-27 13:23:00 +010020extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
Andrew Victor62c16602006-11-30 12:27:38 +010021extern void __init at91sam9260_init_interrupts(unsigned int priority[]);
22extern void __init at91sam9261_init_interrupts(unsigned int priority[]);
Andrew Victorb2c65612007-02-08 09:42:40 +010023extern void __init at91sam9263_init_interrupts(unsigned int priority[]);
Andrew Victor877d7722007-05-11 20:49:56 +010024extern void __init at91sam9rl_init_interrupts(unsigned int priority[]);
Greg Ungerer9a7e2462007-07-30 02:39:02 +010025extern void __init at91x40_init_interrupts(unsigned int priority[]);
Andrew Victorba854e12006-07-05 17:22:52 +010026extern void __init at91_aic_init(unsigned int priority[]);
SAN People73a59c12006-01-09 17:05:41 +000027
Andrew Victorba854e12006-07-05 17:22:52 +010028 /* Timer */
SAN People73a59c12006-01-09 17:05:41 +000029struct sys_timer;
30extern struct sys_timer at91rm9200_timer;
Andrew Victor62c16602006-11-30 12:27:38 +010031extern struct sys_timer at91sam926x_timer;
Greg Ungerer9a7e2462007-07-30 02:39:02 +010032extern struct sys_timer at91x40_timer;
SAN People73a59c12006-01-09 17:05:41 +000033
Andrew Victorba854e12006-07-05 17:22:52 +010034 /* Clocks */
SAN People73a59c12006-01-09 17:05:41 +000035extern int __init at91_clock_init(unsigned long main_clock);
Andrew Victor907d6de2006-06-20 19:30:19 +010036struct device;
37extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func);
38
39 /* Power Management */
40extern void at91_irq_suspend(void);
41extern void at91_irq_resume(void);
42
Andrew Victorf2173832006-09-27 13:23:00 +010043 /* GPIO */
44#define AT91RM9200_PQFP 3 /* AT91RM9200 PQFP package has 3 banks */
45#define AT91RM9200_BGA 4 /* AT91RM9200 BGA package has 4 banks */
46
47struct 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};
52extern void __init at91_gpio_init(struct at91_gpio_bank *, int nr_banks);
53extern void __init at91_gpio_irq_setup(void);
Andrew Victor1f4fd0a2006-11-30 10:01:47 +010054
55extern void (*at91_arch_reset)(void);
56extern int at91_extern_irq;