DaVinci: move AEMIF #define's to the proper headers
[pandora-kernel.git] / arch / arm / mach-davinci / include / mach / dm646x.h
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>
15 #include <mach/asp.h>
16 #include <linux/i2c.h>
17 #include <linux/videodev2.h>
18 #include <linux/clk.h>
19 #include <linux/davinci_emac.h>
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)
27
28 #define DM646X_ATA_REG_BASE             (0x01C66000)
29
30 #define DM646X_ASYNC_EMIF_CONTROL_BASE  0x20008000
31 #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
32
33 void __init dm646x_init(void);
34 void __init dm646x_init_ide(void);
35 void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
36 void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
37 void __init dm646x_board_setup_refclk(struct clk *clk);
38
39 void dm646x_video_init(void);
40
41 enum vpif_if_type {
42         VPIF_IF_BT656,
43         VPIF_IF_BT1120,
44         VPIF_IF_RAW_BAYER
45 };
46
47 struct vpif_interface {
48         enum vpif_if_type if_type;
49         unsigned hd_pol:1;
50         unsigned vd_pol:1;
51         unsigned fid_pol:1;
52 };
53
54 struct vpif_subdev_info {
55         const char *name;
56         struct i2c_board_info board_info;
57         u32 input;
58         u32 output;
59         unsigned can_route:1;
60         struct vpif_interface vpif_if;
61 };
62
63 struct vpif_display_config {
64         int (*set_clock)(int, int);
65         struct vpif_subdev_info *subdevinfo;
66         int subdev_count;
67         const char **output;
68         int output_count;
69         const char *card_name;
70 };
71
72 struct vpif_input {
73         struct v4l2_input input;
74         const char *subdev_name;
75 };
76
77 #define VPIF_CAPTURE_MAX_CHANNELS       2
78
79 struct vpif_capture_chan_config {
80         const struct vpif_input *inputs;
81         int input_count;
82 };
83
84 struct vpif_capture_config {
85         int (*setup_input_channel_mode)(int);
86         int (*setup_input_path)(int, const char *);
87         struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
88         struct vpif_subdev_info *subdev_info;
89         int subdev_count;
90         const char *card_name;
91 };
92
93 void dm646x_setup_vpif(struct vpif_display_config *,
94                        struct vpif_capture_config *);
95
96 #endif /* __ASM_ARCH_DM646X_H */