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
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>
18 extern void davinci_timer_init(void);
20 extern void davinci_irq_init(void);
21 extern void __iomem
*davinci_intc_base
;
22 extern int davinci_intc_type
;
24 struct davinci_timer_instance
{
28 unsigned long cmp_off
;
32 struct davinci_timer_info
{
33 struct davinci_timer_instance
*timers
;
34 unsigned int clockevent_id
;
35 unsigned int clocksource_id
;
38 struct davinci_gpio_controller
;
41 * SoC info passed into common davinci modules.
43 * Base addresses in this structure should be physical and not virtual.
44 * Modules that take such base addresses, should internally ioremap() them to
47 struct davinci_soc_info
{
48 struct map_desc
*io_desc
;
49 unsigned long io_desc_num
;
53 struct davinci_id
*ids
;
54 unsigned long ids_num
;
55 struct clk_lookup
*cpu_clks
;
57 unsigned long psc_bases_num
;
59 const struct mux_config
*pinmux_pins
;
60 unsigned long pinmux_pins_num
;
64 unsigned long intc_irq_num
;
66 struct davinci_timer_info
*timer_info
;
71 unsigned gpio_unbanked
;
72 struct davinci_gpio_controller
*gpio_ctlrs
;
74 struct platform_device
*serial_dev
;
75 struct emac_platform_data
*emac_pdata
;
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(char mode
, const char *cmd
);
85 void davinci_init_late(void);
87 #ifdef CONFIG_DAVINCI_RESET_CLOCKS
88 int davinci_clk_disable_unused(void);
90 static inline int davinci_clk_disable_unused(void) { return 0; }
93 #ifdef CONFIG_CPU_FREQ
94 int davinci_cpufreq_init(void);
96 static inline int davinci_cpufreq_init(void) { return 0; }
100 int davinci_pm_init(void);
102 static inline int davinci_pm_init(void) { return 0; }
105 #define SRAM_SIZE SZ_128K
107 #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */