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 MG |
26 | struct davinci_timer_instance { |
27 | void __iomem *base; | |
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 | ||
79c3c0b7 MG |
40 | /* SoC specific init support */ |
41 | struct davinci_soc_info { | |
42 | struct map_desc *io_desc; | |
43 | unsigned long io_desc_num; | |
b9ab1279 MG |
44 | u32 cpu_id; |
45 | u32 jtag_id; | |
46 | void __iomem *jtag_id_base; | |
47 | struct davinci_id *ids; | |
48 | unsigned long ids_num; | |
08aca087 | 49 | struct clk_lookup *cpu_clks; |
d81d188c MG |
50 | void __iomem **psc_bases; |
51 | unsigned long psc_bases_num; | |
0e585952 MG |
52 | void __iomem *pinmux_base; |
53 | const struct mux_config *pinmux_pins; | |
54 | unsigned long pinmux_pins_num; | |
673dd36f MG |
55 | void __iomem *intc_base; |
56 | int intc_type; | |
57 | u8 *intc_irq_prios; | |
58 | unsigned long intc_irq_num; | |
f64691b3 | 59 | struct davinci_timer_info *timer_info; |
a994955c MG |
60 | void __iomem *gpio_base; |
61 | unsigned gpio_num; | |
62 | unsigned gpio_irq; | |
7a36071e | 63 | unsigned gpio_unbanked; |
65e866a9 | 64 | struct platform_device *serial_dev; |
972412b6 | 65 | struct emac_platform_data *emac_pdata; |
0d04eb47 DB |
66 | dma_addr_t sram_dma; |
67 | unsigned sram_len; | |
79c3c0b7 MG |
68 | }; |
69 | ||
70 | extern struct davinci_soc_info davinci_soc_info; | |
71 | ||
72 | extern void davinci_common_init(struct davinci_soc_info *soc_info); | |
79c3c0b7 | 73 | |
0d04eb47 DB |
74 | /* standard place to map on-chip SRAMs; they *may* support DMA */ |
75 | #define SRAM_VIRT 0xfffe0000 | |
76 | #define SRAM_SIZE SZ_128K | |
77 | ||
7c6337e2 | 78 | #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */ |