dm646x.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. #include <mach/hardware.h>
  14. #include <mach/emac.h>
  15. #include <mach/asp.h>
  16. #include <linux/i2c.h>
  17. #include <linux/videodev2.h>
  18. #define DM646X_EMAC_BASE (0x01C80000)
  19. #define DM646X_EMAC_CNTRL_OFFSET (0x0000)
  20. #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000)
  21. #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000)
  22. #define DM646X_EMAC_MDIO_OFFSET (0x4000)
  23. #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000)
  24. #define DM646X_ATA_REG_BASE (0x01C66000)
  25. void __init dm646x_init(void);
  26. void __init dm646x_init_ide(void);
  27. void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
  28. void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
  29. void dm646x_video_init(void);
  30. enum vpif_if_type {
  31. VPIF_IF_BT656,
  32. VPIF_IF_BT1120,
  33. VPIF_IF_RAW_BAYER
  34. };
  35. struct vpif_interface {
  36. enum vpif_if_type if_type;
  37. unsigned hd_pol:1;
  38. unsigned vd_pol:1;
  39. unsigned fid_pol:1;
  40. };
  41. struct vpif_subdev_info {
  42. const char *name;
  43. struct i2c_board_info board_info;
  44. u32 input;
  45. u32 output;
  46. unsigned can_route:1;
  47. struct vpif_interface vpif_if;
  48. };
  49. struct vpif_display_config {
  50. int (*set_clock)(int, int);
  51. struct vpif_subdev_info *subdevinfo;
  52. int subdev_count;
  53. const char **output;
  54. int output_count;
  55. const char *card_name;
  56. };
  57. struct vpif_input {
  58. struct v4l2_input input;
  59. const char *subdev_name;
  60. };
  61. #define VPIF_CAPTURE_MAX_CHANNELS 2
  62. struct vpif_capture_chan_config {
  63. const struct vpif_input *inputs;
  64. int input_count;
  65. };
  66. struct vpif_capture_config {
  67. int (*setup_input_channel_mode)(int);
  68. int (*setup_input_path)(int, const char *);
  69. struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
  70. struct vpif_subdev_info *subdev_info;
  71. int subdev_count;
  72. const char *card_name;
  73. };
  74. void dm646x_setup_vpif(struct vpif_display_config *,
  75. struct vpif_capture_config *);
  76. #endif /* __ASM_ARCH_DM646X_H */