Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
common.h
Go to the documentation of this file.
1 /*
2  * Header for code common to all DaVinci machines.
3  *
4  * Author: Kevin Hilman, MontaVista Software, Inc. <[email protected]>
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 
15 #include <linux/compiler.h>
16 #include <linux/types.h>
17 
18 struct sys_timer;
19 
20 extern struct sys_timer davinci_timer;
21 
22 extern void davinci_irq_init(void);
23 extern void __iomem *davinci_intc_base;
24 extern int davinci_intc_type;
25 
30  unsigned long cmp_off;
31  unsigned int cmp_irq;
32 };
33 
36  unsigned int clockevent_id;
37  unsigned int clocksource_id;
38 };
39 
41 
42 /*
43  * SoC info passed into common davinci modules.
44  *
45  * Base addresses in this structure should be physical and not virtual.
46  * Modules that take such base addresses, should internally ioremap() them to
47  * use.
48  */
50  struct map_desc *io_desc;
51  unsigned long io_desc_num;
55  struct davinci_id *ids;
56  unsigned long ids_num;
59  unsigned long psc_bases_num;
61  const struct mux_config *pinmux_pins;
62  unsigned long pinmux_pins_num;
64  int intc_type;
66  unsigned long intc_irq_num;
69  int gpio_type;
71  unsigned gpio_num;
72  unsigned gpio_irq;
73  unsigned gpio_unbanked;
79  unsigned sram_len;
80 };
81 
83 
84 extern void davinci_common_init(struct davinci_soc_info *soc_info);
85 extern void davinci_init_ide(void);
86 void davinci_restart(char mode, const char *cmd);
87 void davinci_init_late(void);
88 
89 #ifdef CONFIG_DAVINCI_RESET_CLOCKS
90 int davinci_clk_disable_unused(void);
91 #else
92 static inline int davinci_clk_disable_unused(void) { return 0; }
93 #endif
94 
95 #ifdef CONFIG_CPU_FREQ
96 int davinci_cpufreq_init(void);
97 #else
98 static inline int davinci_cpufreq_init(void) { return 0; }
99 #endif
100 
101 #ifdef CONFIG_SUSPEND
102 int davinci_pm_init(void);
103 #else
104 static inline int davinci_pm_init(void) { return 0; }
105 #endif
106 
107 /* standard place to map on-chip SRAMs; they *may* support DMA */
108 #define SRAM_VIRT 0xfffe0000
109 #define SRAM_SIZE SZ_128K
110 
111 #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */