dm646x.h 2.3 KB

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