Commit | Line | Data |
---|---|---|
7c6337e2 KH |
1 | /* |
2 | * Header for code common to all DaVinci machines. | |
3 | * | |
4 | * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> | |
5 | * | |
6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | |
7 | * the terms of the GNU General Public License version 2. This program | |
8 | * is licensed "as is" without any warranty of any kind, whether express | |
9 | * or implied. | |
10 | */ | |
11 | ||
12 | #ifndef __ARCH_ARM_MACH_DAVINCI_COMMON_H | |
13 | #define __ARCH_ARM_MACH_DAVINCI_COMMON_H | |
14 | ||
280faffb TK |
15 | #include <linux/compiler.h> |
16 | #include <linux/types.h> | |
17 | ||
7c6337e2 KH |
18 | struct sys_timer; |
19 | ||
20 | extern struct sys_timer davinci_timer; | |
21 | ||
d0e47fba | 22 | extern void davinci_irq_init(void); |
673dd36f | 23 | extern void __iomem *davinci_intc_base; |
0b0c4c2a | 24 | extern int davinci_intc_type; |
d0e47fba | 25 | |
f64691b3 | 26 | struct davinci_timer_instance { |
1bcd38ad | 27 | u32 base; |
f64691b3 MG |
28 | u32 bottom_irq; |
29 | u32 top_irq; | |
3abd5acf MG |
30 | unsigned long cmp_off; |
31 | unsigned int cmp_irq; | |
f64691b3 MG |
32 | }; |
33 | ||
34 | struct davinci_timer_info { | |
35 | struct davinci_timer_instance *timers; | |
36 | unsigned int clockevent_id; | |
37 | unsigned int clocksource_id; | |
38 | }; | |
39 | ||
c12f415a CC |
40 | struct davinci_gpio_controller; |
41 | ||
79c3c0b7 MG |
42 | /* SoC specific init support */ |
43 | struct davinci_soc_info { | |
44 | struct map_desc *io_desc; | |
45 | unsigned long io_desc_num; | |
b9ab1279 MG |
46 | u32 cpu_id; |
47 | u32 jtag_id; | |
3347db83 | 48 | u32 jtag_id_reg; |
b9ab1279 MG |
49 | struct davinci_id *ids; |
50 | unsigned long ids_num; | |
08aca087 | 51 | struct clk_lookup *cpu_clks; |
e4c822c7 | 52 | u32 *psc_bases; |
d81d188c | 53 | unsigned long psc_bases_num; |
779b0d53 | 54 | u32 pinmux_base; |
0e585952 MG |
55 | const struct mux_config *pinmux_pins; |
56 | unsigned long pinmux_pins_num; | |
bd808947 | 57 | u32 intc_base; |
673dd36f MG |
58 | int intc_type; |
59 | u8 *intc_irq_prios; | |
60 | unsigned long intc_irq_num; | |
bd808947 | 61 | u32 *intc_host_map; |
f64691b3 | 62 | struct davinci_timer_info *timer_info; |
686b634a | 63 | int gpio_type; |
b8d44293 | 64 | u32 gpio_base; |
a994955c MG |
65 | unsigned gpio_num; |
66 | unsigned gpio_irq; | |
7a36071e | 67 | unsigned gpio_unbanked; |
c12f415a CC |
68 | struct davinci_gpio_controller *gpio_ctlrs; |
69 | int gpio_ctlrs_num; | |
65e866a9 | 70 | struct platform_device *serial_dev; |
972412b6 | 71 | struct emac_platform_data *emac_pdata; |
0d04eb47 DB |
72 | dma_addr_t sram_dma; |
73 | unsigned sram_len; | |
c78a5bc2 CC |
74 | struct platform_device *reset_device; |
75 | void (*reset)(struct platform_device *); | |
79c3c0b7 MG |
76 | }; |
77 | ||
78 | extern struct davinci_soc_info davinci_soc_info; | |
79 | ||
80 | extern void davinci_common_init(struct davinci_soc_info *soc_info); | |
7a9978a1 | 81 | extern void davinci_init_ide(void); |
79c3c0b7 | 82 | |
0d04eb47 DB |
83 | /* standard place to map on-chip SRAMs; they *may* support DMA */ |
84 | #define SRAM_VIRT 0xfffe0000 | |
85 | #define SRAM_SIZE SZ_128K | |
86 | ||
7c6337e2 | 87 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ |