diff options
author | Manjunath Hadli <manjunath.hadli@ti.com> | 2011-11-12 10:06:02 -0500 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2011-12-02 14:03:50 -0500 |
commit | e13c692b1f97a6a4f753695b4f28b7f10e5d79ae (patch) | |
tree | 5a2a15b136772521203dbe515c84e04a97e7eea5 /arch/arm/mach-davinci/include/mach | |
parent | caca6a03d365883564885f2c1da3e88dcf65d139 (diff) |
ARM: davinci: vpif: move code to driver core header from platform
Move vpif related definitions for capture and display drivers
from dm646x platform header file to vpif_types.h inside
the driver as these definitions are related to driver code
rather than the platform or board.
This enables reusing this IP across platforms.
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/include/mach')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm646x.h | 53 |
1 files changed, 1 insertions, 52 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 | ||