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>
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
{
29 unsigned long cmp_off
;
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
48 struct davinci_soc_info
{
49 struct map_desc
*io_desc
;
50 unsigned long io_desc_num
;
54 struct davinci_id
*ids
;
55 unsigned long ids_num
;
56 struct clk_lookup
*cpu_clks
;
58 unsigned long psc_bases_num
;
60 const struct mux_config
*pinmux_pins
;
61 unsigned long pinmux_pins_num
;
65 unsigned long intc_irq_num
;
67 struct davinci_timer_info
*timer_info
;
72 unsigned gpio_unbanked
;
73 struct davinci_gpio_controller
*gpio_ctlrs
;
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(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);
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 void __init
pdata_quirks_init(void);
107 #define SRAM_SIZE SZ_128K
109 #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */