x86/xen: resume timer irqs early
[linux/fpc-iii.git] / arch / arm / mach-davinci / davinci.h
blob2ab5d577186f4177fd06c414b31d25c21d295f8f
1 /*
2 * This file contains the processor specific definitions
3 * of the TI DM644x, DM355, DM365, and DM646x.
5 * Copyright (C) 2011 Texas Instruments Incorporated
6 * Copyright (c) 2007 Deep Root Systems, LLC
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation version 2.
12 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
13 * kind, whether express or implied; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 #ifndef __DAVINCI_H
18 #define __DAVINCI_H
20 #include <linux/clk.h>
21 #include <linux/videodev2.h>
22 #include <linux/davinci_emac.h>
23 #include <linux/platform_device.h>
24 #include <linux/spi/spi.h>
25 #include <linux/platform_data/davinci_asp.h>
26 #include <linux/platform_data/edma.h>
27 #include <linux/platform_data/keyscan-davinci.h>
28 #include <mach/hardware.h>
30 #include <media/davinci/vpfe_capture.h>
31 #include <media/davinci/vpif_types.h>
32 #include <media/davinci/vpss.h>
33 #include <media/davinci/vpbe_types.h>
34 #include <media/davinci/vpbe_venc.h>
35 #include <media/davinci/vpbe.h>
36 #include <media/davinci/vpbe_osd.h>
38 #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000
39 #define SYSMOD_VDAC_CONFIG 0x2c
40 #define SYSMOD_VIDCLKCTL 0x38
41 #define SYSMOD_VPSS_CLKCTL 0x44
42 #define SYSMOD_VDD3P3VPWDN 0x48
43 #define SYSMOD_VSCLKDIS 0x6c
44 #define SYSMOD_PUPDCTL1 0x7c
46 /* VPSS CLKCTL bit definitions */
47 #define VPSS_MUXSEL_EXTCLK_ENABLE BIT(1)
48 #define VPSS_VENCCLKEN_ENABLE BIT(3)
49 #define VPSS_DACCLKEN_ENABLE BIT(4)
50 #define VPSS_PLLC2SYSCLK5_ENABLE BIT(5)
52 extern void __iomem *davinci_sysmod_base;
53 #define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
54 void davinci_map_sysmod(void);
56 /* DM355 base addresses */
57 #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000
58 #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
60 #define ASP1_TX_EVT_EN 1
61 #define ASP1_RX_EVT_EN 2
63 /* DM365 base addresses */
64 #define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
65 #define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
66 #define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
68 /* DM644x base addresses */
69 #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01e00000
70 #define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
71 #define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
72 #define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
73 #define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
75 /* DM646x base addresses */
76 #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000
77 #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
79 /* DM355 function declarations */
80 void dm355_init(void);
81 void dm355_init_spi0(unsigned chipselect_mask,
82 const struct spi_board_info *info, unsigned len);
83 void dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
84 int dm355_init_video(struct vpfe_config *, struct vpbe_config *);
86 /* DM365 function declarations */
87 void dm365_init(void);
88 void dm365_init_asp(struct snd_platform_data *pdata);
89 void dm365_init_vc(struct snd_platform_data *pdata);
90 void dm365_init_ks(struct davinci_ks_platform_data *pdata);
91 void dm365_init_rtc(void);
92 void dm365_init_spi0(unsigned chipselect_mask,
93 const struct spi_board_info *info, unsigned len);
94 int dm365_init_video(struct vpfe_config *, struct vpbe_config *);
96 /* DM644x function declarations */
97 void dm644x_init(void);
98 void dm644x_init_asp(struct snd_platform_data *pdata);
99 int dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
101 /* DM646x function declarations */
102 void dm646x_init(void);
103 void dm646x_init_mcasp0(struct snd_platform_data *pdata);
104 void dm646x_init_mcasp1(struct snd_platform_data *pdata);
105 int dm646x_init_edma(struct edma_rsv_info *rsv);
106 void dm646x_video_init(void);
107 void dm646x_setup_vpif(struct vpif_display_config *,
108 struct vpif_capture_config *);
110 extern struct platform_device dm365_serial_device[];
111 extern struct platform_device dm355_serial_device[];
112 extern struct platform_device dm644x_serial_device[];
113 extern struct platform_device dm646x_serial_device[];
114 #endif /*__DAVINCI_H */