Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 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> |
Kevin Hilman | ac7b75b | 2009-05-07 06:19:40 -0700 | [diff] [blame] | 15 | #include <mach/emac.h> |
Chaithrika U S | 25acf55 | 2009-06-05 06:28:08 -0400 | [diff] [blame] | 16 | #include <mach/asp.h> |
Muralidharan Karicheri | 85609c1 | 2009-09-16 13:15:30 -0400 | [diff] [blame] | 17 | #include <linux/i2c.h> |
| 18 | #include <linux/videodev2.h> |
Kevin Hilman | ac7b75b | 2009-05-07 06:19:40 -0700 | [diff] [blame] | 19 | |
| 20 | #define DM646X_EMAC_BASE (0x01C80000) |
| 21 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) |
| 22 | #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) |
| 23 | #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) |
| 24 | #define DM646X_EMAC_MDIO_OFFSET (0x4000) |
| 25 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 26 | |
Hemant Pedanekar | 1c92a55 | 2009-07-09 19:43:20 +0530 | [diff] [blame] | 27 | #define DM646X_ATA_REG_BASE (0x01C66000) |
| 28 | |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 29 | void __init dm646x_init(void); |
Hemant Pedanekar | 1c92a55 | 2009-07-09 19:43:20 +0530 | [diff] [blame] | 30 | void __init dm646x_init_ide(void); |
Chaithrika U S | 25acf55 | 2009-06-05 06:28:08 -0400 | [diff] [blame] | 31 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); |
| 32 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 33 | |
Muralidharan Karicheri | 85609c1 | 2009-09-16 13:15:30 -0400 | [diff] [blame] | 34 | void dm646x_video_init(void); |
| 35 | |
| 36 | enum vpif_if_type { |
| 37 | VPIF_IF_BT656, |
| 38 | VPIF_IF_BT1120, |
| 39 | VPIF_IF_RAW_BAYER |
| 40 | }; |
| 41 | |
| 42 | struct vpif_interface { |
| 43 | enum vpif_if_type if_type; |
| 44 | unsigned hd_pol:1; |
| 45 | unsigned vd_pol:1; |
| 46 | unsigned fid_pol:1; |
| 47 | }; |
| 48 | |
| 49 | struct vpif_subdev_info { |
| 50 | const char *name; |
| 51 | struct i2c_board_info board_info; |
| 52 | u32 input; |
| 53 | u32 output; |
| 54 | unsigned can_route:1; |
| 55 | struct vpif_interface vpif_if; |
| 56 | }; |
| 57 | |
| 58 | struct vpif_display_config { |
| 59 | int (*set_clock)(int, int); |
| 60 | struct vpif_subdev_info *subdevinfo; |
| 61 | int subdev_count; |
| 62 | const char **output; |
| 63 | int output_count; |
| 64 | const char *card_name; |
| 65 | }; |
| 66 | |
| 67 | struct vpif_input { |
| 68 | struct v4l2_input input; |
| 69 | const char *subdev_name; |
| 70 | }; |
| 71 | |
| 72 | #define VPIF_CAPTURE_MAX_CHANNELS 2 |
| 73 | |
| 74 | struct vpif_capture_chan_config { |
| 75 | const struct vpif_input *inputs; |
| 76 | int input_count; |
| 77 | }; |
| 78 | |
| 79 | struct vpif_capture_config { |
| 80 | int (*setup_input_channel_mode)(int); |
| 81 | int (*setup_input_path)(int, const char *); |
| 82 | struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; |
| 83 | struct vpif_subdev_info *subdev_info; |
| 84 | int subdev_count; |
| 85 | const char *card_name; |
| 86 | }; |
| 87 | |
| 88 | void dm646x_setup_vpif(struct vpif_display_config *, |
| 89 | struct vpif_capture_config *); |
| 90 | |
Kevin Hilman | e38d92f | 2009-04-29 17:44:58 -0700 | [diff] [blame] | 91 | #endif /* __ASM_ARCH_DM646X_H */ |