diff options
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm646x.h | 53 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpif.h | 1 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpif_capture.h | 2 | ||||
-rw-r--r-- | drivers/media/video/davinci/vpif_display.h | 1 | ||||
-rw-r--r-- | include/media/davinci/vpif_types.h | 71 |
5 files changed, 75 insertions, 53 deletions
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h index 2a00fe5ac253..a8ee6c9f0bb0 100644 --- a/arch/arm/mach-davinci/include/mach/dm646x.h +++ b/arch/arm/mach-davinci/include/mach/dm646x.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
18 | #include <linux/davinci_emac.h> | 18 | #include <linux/davinci_emac.h> |
19 | #include <media/davinci/vpif_types.h> | ||
19 | 20 | ||
20 | #define DM646X_EMAC_BASE (0x01C80000) | 21 | #define DM646X_EMAC_BASE (0x01C80000) |
21 | #define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) | 22 | #define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) |
@@ -34,58 +35,6 @@ int __init dm646x_init_edma(struct edma_rsv_info *rsv); | |||
34 | 35 | ||
35 | void dm646x_video_init(void); | 36 | void dm646x_video_init(void); |
36 | 37 | ||
37 | enum vpif_if_type { | ||
38 | VPIF_IF_BT656, | ||
39 | VPIF_IF_BT1120, | ||
40 | VPIF_IF_RAW_BAYER | ||
41 | }; | ||
42 | |||
43 | struct vpif_interface { | ||
44 | enum vpif_if_type if_type; | ||
45 | unsigned hd_pol:1; | ||
46 | unsigned vd_pol:1; | ||
47 | unsigned fid_pol:1; | ||
48 | }; | ||
49 | |||
50 | struct vpif_subdev_info { | ||
51 | const char *name; | ||
52 | struct i2c_board_info board_info; | ||
53 | u32 input; | ||
54 | u32 output; | ||
55 | unsigned can_route:1; | ||
56 | struct vpif_interface vpif_if; | ||
57 | }; | ||
58 | |||
59 | struct vpif_display_config { | ||
60 | int (*set_clock)(int, int); | ||
61 | struct vpif_subdev_info *subdevinfo; | ||
62 | int subdev_count; | ||
63 | const char **output; | ||
64 | int output_count; | ||
65 | const char *card_name; | ||
66 | }; | ||
67 | |||
68 | struct vpif_input { | ||
69 | struct v4l2_input input; | ||
70 | const char *subdev_name; | ||
71 | }; | ||
72 | |||
73 | #define VPIF_CAPTURE_MAX_CHANNELS 2 | ||
74 | |||
75 | struct vpif_capture_chan_config { | ||
76 | const struct vpif_input *inputs; | ||
77 | int input_count; | ||
78 | }; | ||
79 | |||
80 | struct vpif_capture_config { | ||
81 | int (*setup_input_channel_mode)(int); | ||
82 | int (*setup_input_path)(int, const char *); | ||
83 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; | ||
84 | struct vpif_subdev_info *subdev_info; | ||
85 | int subdev_count; | ||
86 | const char *card_name; | ||
87 | }; | ||
88 | |||
89 | void dm646x_setup_vpif(struct vpif_display_config *, | 38 | void dm646x_setup_vpif(struct vpif_display_config *, |
90 | struct vpif_capture_config *); | 39 | struct vpif_capture_config *); |
91 | 40 | ||
diff --git a/drivers/media/video/davinci/vpif.h b/drivers/media/video/davinci/vpif.h index 10550bd93b06..25036cb11bea 100644 --- a/drivers/media/video/davinci/vpif.h +++ b/drivers/media/video/davinci/vpif.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/videodev2.h> | 20 | #include <linux/videodev2.h> |
21 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
22 | #include <mach/dm646x.h> | 22 | #include <mach/dm646x.h> |
23 | #include <media/davinci/vpif_types.h> | ||
23 | 24 | ||
24 | /* Maximum channel allowed */ | 25 | /* Maximum channel allowed */ |
25 | #define VPIF_NUM_CHANNELS (4) | 26 | #define VPIF_NUM_CHANNELS (4) |
diff --git a/drivers/media/video/davinci/vpif_capture.h b/drivers/media/video/davinci/vpif_capture.h index 064550f5ce4a..a693d4ebda55 100644 --- a/drivers/media/video/davinci/vpif_capture.h +++ b/drivers/media/video/davinci/vpif_capture.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <media/v4l2-device.h> | 27 | #include <media/v4l2-device.h> |
28 | #include <media/videobuf-core.h> | 28 | #include <media/videobuf-core.h> |
29 | #include <media/videobuf-dma-contig.h> | 29 | #include <media/videobuf-dma-contig.h> |
30 | #include <mach/dm646x.h> | 30 | #include <media/davinci/vpif_types.h> |
31 | 31 | ||
32 | #include "vpif.h" | 32 | #include "vpif.h" |
33 | 33 | ||
diff --git a/drivers/media/video/davinci/vpif_display.h b/drivers/media/video/davinci/vpif_display.h index 5d1936dafed2..56879d1a0684 100644 --- a/drivers/media/video/davinci/vpif_display.h +++ b/drivers/media/video/davinci/vpif_display.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <media/v4l2-device.h> | 22 | #include <media/v4l2-device.h> |
23 | #include <media/videobuf-core.h> | 23 | #include <media/videobuf-core.h> |
24 | #include <media/videobuf-dma-contig.h> | 24 | #include <media/videobuf-dma-contig.h> |
25 | #include <media/davinci/vpif_types.h> | ||
25 | 26 | ||
26 | #include "vpif.h" | 27 | #include "vpif.h" |
27 | 28 | ||
diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h new file mode 100644 index 000000000000..9929b05cff3a --- /dev/null +++ b/include/media/davinci/vpif_types.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Texas Instruments Inc | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
16 | */ | ||
17 | #ifndef _VPIF_TYPES_H | ||
18 | #define _VPIF_TYPES_H | ||
19 | |||
20 | #define VPIF_CAPTURE_MAX_CHANNELS 2 | ||
21 | |||
22 | enum vpif_if_type { | ||
23 | VPIF_IF_BT656, | ||
24 | VPIF_IF_BT1120, | ||
25 | VPIF_IF_RAW_BAYER | ||
26 | }; | ||
27 | |||
28 | struct vpif_interface { | ||
29 | enum vpif_if_type if_type; | ||
30 | unsigned hd_pol:1; | ||
31 | unsigned vd_pol:1; | ||
32 | unsigned fid_pol:1; | ||
33 | }; | ||
34 | |||
35 | struct vpif_subdev_info { | ||
36 | const char *name; | ||
37 | struct i2c_board_info board_info; | ||
38 | u32 input; | ||
39 | u32 output; | ||
40 | unsigned can_route:1; | ||
41 | struct vpif_interface vpif_if; | ||
42 | }; | ||
43 | |||
44 | struct vpif_display_config { | ||
45 | int (*set_clock)(int, int); | ||
46 | struct vpif_subdev_info *subdevinfo; | ||
47 | int subdev_count; | ||
48 | const char **output; | ||
49 | int output_count; | ||
50 | const char *card_name; | ||
51 | }; | ||
52 | |||
53 | struct vpif_input { | ||
54 | struct v4l2_input input; | ||
55 | const char *subdev_name; | ||
56 | }; | ||
57 | |||
58 | struct vpif_capture_chan_config { | ||
59 | const struct vpif_input *inputs; | ||
60 | int input_count; | ||
61 | }; | ||
62 | |||
63 | struct vpif_capture_config { | ||
64 | int (*setup_input_channel_mode)(int); | ||
65 | int (*setup_input_path)(int, const char *); | ||
66 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; | ||
67 | struct vpif_subdev_info *subdev_info; | ||
68 | int subdev_count; | ||
69 | const char *card_name; | ||
70 | }; | ||
71 | #endif /* _VPIF_TYPES_H */ | ||