dm646x.h 2.2 KB

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