mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race
[linux/fpc-iii.git] / arch / arm / mach-davinci / include / mach / common.h
blob037aa66bcac1687d3cc0ffe17494a9df01a66125
1 /*
2 * Header for code common to all DaVinci machines.
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
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.
12 #ifndef __ARCH_ARM_MACH_DAVINCI_COMMON_H
13 #define __ARCH_ARM_MACH_DAVINCI_COMMON_H
15 #include <linux/compiler.h>
16 #include <linux/types.h>
17 #include <linux/reboot.h>
19 extern void davinci_timer_init(void);
21 extern void davinci_irq_init(void);
22 extern void __iomem *davinci_intc_base;
23 extern int davinci_intc_type;
25 struct davinci_timer_instance {
26 u32 base;
27 u32 bottom_irq;
28 u32 top_irq;
29 unsigned long cmp_off;
30 unsigned int cmp_irq;
33 struct davinci_timer_info {
34 struct davinci_timer_instance *timers;
35 unsigned int clockevent_id;
36 unsigned int clocksource_id;
39 struct davinci_gpio_controller;
42 * SoC info passed into common davinci modules.
44 * Base addresses in this structure should be physical and not virtual.
45 * Modules that take such base addresses, should internally ioremap() them to
46 * use.
48 struct davinci_soc_info {
49 struct map_desc *io_desc;
50 unsigned long io_desc_num;
51 u32 cpu_id;
52 u32 jtag_id;
53 u32 jtag_id_reg;
54 struct davinci_id *ids;
55 unsigned long ids_num;
56 struct clk_lookup *cpu_clks;
57 u32 *psc_bases;
58 unsigned long psc_bases_num;
59 u32 pinmux_base;
60 const struct mux_config *pinmux_pins;
61 unsigned long pinmux_pins_num;
62 u32 intc_base;
63 int intc_type;
64 u8 *intc_irq_prios;
65 unsigned long intc_irq_num;
66 u32 *intc_host_map;
67 struct davinci_timer_info *timer_info;
68 int gpio_type;
69 u32 gpio_base;
70 unsigned gpio_num;
71 unsigned gpio_irq;
72 unsigned gpio_unbanked;
73 struct davinci_gpio_controller *gpio_ctlrs;
74 int gpio_ctlrs_num;
75 struct emac_platform_data *emac_pdata;
76 dma_addr_t sram_dma;
77 unsigned sram_len;
80 extern struct davinci_soc_info davinci_soc_info;
82 extern void davinci_common_init(struct davinci_soc_info *soc_info);
83 extern void davinci_init_ide(void);
84 void davinci_restart(enum reboot_mode mode, const char *cmd);
85 void davinci_init_late(void);
87 #ifdef CONFIG_DAVINCI_RESET_CLOCKS
88 int davinci_clk_disable_unused(void);
89 #else
90 static inline int davinci_clk_disable_unused(void) { return 0; }
91 #endif
93 #ifdef CONFIG_CPU_FREQ
94 int davinci_cpufreq_init(void);
95 #else
96 static inline int davinci_cpufreq_init(void) { return 0; }
97 #endif
99 #ifdef CONFIG_SUSPEND
100 int davinci_pm_init(void);
101 #else
102 static inline int davinci_pm_init(void) { return 0; }
103 #endif
105 void __init pdata_quirks_init(void);
107 #define SRAM_SIZE SZ_128K
109 #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */