Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
davinci.h
Go to the documentation of this file.
1 /*
2  * This file contains the processor specific definitions
3  * of the TI DM644x, DM355, DM365, and DM646x.
4  *
5  * Copyright (C) 2011 Texas Instruments Incorporated
6  * Copyright (c) 2007 Deep Root Systems, LLC
7  *
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.
11  *
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.
16  */
17 #ifndef __DAVINCI_H
18 #define __DAVINCI_H
19 
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>
27 #include <mach/hardware.h>
28 #include <mach/edma.h>
29 
32 #include <media/davinci/vpss.h>
35 #include <media/davinci/vpbe.h>
36 #include <media/davinci/vpbe_osd.h>
37 
38 #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000
39 #define SYSMOD_VIDCLKCTL 0x38
40 #define SYSMOD_VPSS_CLKCTL 0x44
41 #define SYSMOD_VDD3P3VPWDN 0x48
42 #define SYSMOD_VSCLKDIS 0x6c
43 #define SYSMOD_PUPDCTL1 0x7c
44 
45 extern void __iomem *davinci_sysmod_base;
46 #define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
47 void davinci_map_sysmod(void);
48 
49 /* DM355 base addresses */
50 #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000
51 #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
52 
53 #define ASP1_TX_EVT_EN 1
54 #define ASP1_RX_EVT_EN 2
55 
56 /* DM365 base addresses */
57 #define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
58 #define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
59 #define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
60 
61 /* DM644x base addresses */
62 #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01e00000
63 #define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
64 #define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
65 #define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
66 #define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
67 
68 /* DM646x base addresses */
69 #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000
70 #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
71 
72 /* DM355 function declarations */
73 void __init dm355_init(void);
74 void dm355_init_spi0(unsigned chipselect_mask,
75  const struct spi_board_info *info, unsigned len);
76 void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
77 void dm355_set_vpfe_config(struct vpfe_config *cfg);
78 
79 /* DM365 function declarations */
80 void __init dm365_init(void);
84 void __init dm365_init_rtc(void);
85 void dm365_init_spi0(unsigned chipselect_mask,
86  const struct spi_board_info *info, unsigned len);
87 void dm365_set_vpfe_config(struct vpfe_config *cfg);
88 
89 /* DM644x function declarations */
90 void __init dm644x_init(void);
92 int __init dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
93 
94 /* DM646x function declarations */
95 void __init dm646x_init(void);
99 void dm646x_video_init(void);
101  struct vpif_capture_config *);
102 #endif /*__DAVINCI_H */