Commit | Line | Data |
---|---|---|
e38d92fd KH |
1 | /* |
2 | * Chip specific defines for DM646x SoC | |
3 | * | |
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | |
5 | * | |
6 | * 2007 (c) Deep Root Systems, LLC. 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 | #ifndef __ASM_ARCH_DM646X_H | |
12 | #define __ASM_ARCH_DM646X_H | |
13 | ||
14 | #include <mach/hardware.h> | |
25acf553 | 15 | #include <mach/asp.h> |
85609c1c MK |
16 | #include <linux/i2c.h> |
17 | #include <linux/videodev2.h> | |
c1978e1d | 18 | #include <linux/clk.h> |
8ee2bf9a | 19 | #include <linux/davinci_emac.h> |
ac7b75b5 KH |
20 | |
21 | #define DM646X_EMAC_BASE (0x01C80000) | |
22 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) | |
23 | #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) | |
24 | #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) | |
25 | #define DM646X_EMAC_MDIO_OFFSET (0x4000) | |
26 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) | |
e38d92fd | 27 | |
70342174 SS |
28 | #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000 |
29 | #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000 | |
30 | ||
e38d92fd | 31 | void __init dm646x_init(void); |
25acf553 C |
32 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); |
33 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); | |
c1978e1d | 34 | void __init dm646x_board_setup_refclk(struct clk *clk); |
e38d92fd | 35 | |
85609c1c MK |
36 | void dm646x_video_init(void); |
37 | ||
38 | enum vpif_if_type { | |
39 | VPIF_IF_BT656, | |
40 | VPIF_IF_BT1120, | |
41 | VPIF_IF_RAW_BAYER | |
42 | }; | |
43 | ||
44 | struct vpif_interface { | |
45 | enum vpif_if_type if_type; | |
46 | unsigned hd_pol:1; | |
47 | unsigned vd_pol:1; | |
48 | unsigned fid_pol:1; | |
49 | }; | |
50 | ||
51 | struct vpif_subdev_info { | |
52 | const char *name; | |
53 | struct i2c_board_info board_info; | |
54 | u32 input; | |
55 | u32 output; | |
56 | unsigned can_route:1; | |
57 | struct vpif_interface vpif_if; | |
58 | }; | |
59 | ||
60 | struct vpif_display_config { | |
61 | int (*set_clock)(int, int); | |
62 | struct vpif_subdev_info *subdevinfo; | |
63 | int subdev_count; | |
64 | const char **output; | |
65 | int output_count; | |
66 | const char *card_name; | |
67 | }; | |
68 | ||
69 | struct vpif_input { | |
70 | struct v4l2_input input; | |
71 | const char *subdev_name; | |
72 | }; | |
73 | ||
74 | #define VPIF_CAPTURE_MAX_CHANNELS 2 | |
75 | ||
76 | struct vpif_capture_chan_config { | |
77 | const struct vpif_input *inputs; | |
78 | int input_count; | |
79 | }; | |
80 | ||
81 | struct vpif_capture_config { | |
82 | int (*setup_input_channel_mode)(int); | |
83 | int (*setup_input_path)(int, const char *); | |
84 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; | |
85 | struct vpif_subdev_info *subdev_info; | |
86 | int subdev_count; | |
87 | const char *card_name; | |
88 | }; | |
89 | ||
90 | void dm646x_setup_vpif(struct vpif_display_config *, | |
91 | struct vpif_capture_config *); | |
92 | ||
e38d92fd | 93 | #endif /* __ASM_ARCH_DM646X_H */ |