davinci.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * This file contains the processor specific definitions
  3. * of the TI DM644x, DM355, DM365, and DM646x.
  4. *
  5. * Copyright (C) 2011 Texas Instruments Incorporated
  6. * Copyright (c) 2007 Deep Root Systems, LLC
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation version 2.
  11. *
  12. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  13. * kind, whether express or implied; without even the implied warranty
  14. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #ifndef __DAVINCI_H
  18. #define __DAVINCI_H
  19. #include <linux/clk.h>
  20. #include <linux/videodev2.h>
  21. #include <linux/davinci_emac.h>
  22. #include <linux/platform_device.h>
  23. #include <linux/spi/spi.h>
  24. #include <mach/asp.h>
  25. #include <mach/keyscan.h>
  26. #include <mach/hardware.h>
  27. #include <media/davinci/vpfe_capture.h>
  28. #include <media/davinci/vpif_types.h>
  29. #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000
  30. #define SYSMOD_VIDCLKCTL 0x38
  31. #define SYSMOD_VDD3P3VPWDN 0x48
  32. #define SYSMOD_VSCLKDIS 0x6c
  33. #define SYSMOD_PUPDCTL1 0x7c
  34. extern void __iomem *davinci_sysmod_base;
  35. #define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
  36. void davinci_map_sysmod(void);
  37. /* DM355 base addresses */
  38. #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000
  39. #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
  40. #define ASP1_TX_EVT_EN 1
  41. #define ASP1_RX_EVT_EN 2
  42. /* DM365 base addresses */
  43. #define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
  44. #define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
  45. #define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
  46. /* DM644x base addresses */
  47. #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01e00000
  48. #define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
  49. #define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
  50. #define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
  51. #define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
  52. /* DM646x base addresses */
  53. #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000
  54. #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
  55. /* DM355 function declarations */
  56. void __init dm355_init(void);
  57. void dm355_init_spi0(unsigned chipselect_mask,
  58. struct spi_board_info *info, unsigned len);
  59. void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
  60. void dm355_set_vpfe_config(struct vpfe_config *cfg);
  61. /* DM365 function declarations */
  62. void __init dm365_init(void);
  63. void __init dm365_init_asp(struct snd_platform_data *pdata);
  64. void __init dm365_init_vc(struct snd_platform_data *pdata);
  65. void __init dm365_init_ks(struct davinci_ks_platform_data *pdata);
  66. void __init dm365_init_rtc(void);
  67. void dm365_init_spi0(unsigned chipselect_mask,
  68. struct spi_board_info *info, unsigned len);
  69. void dm365_set_vpfe_config(struct vpfe_config *cfg);
  70. /* DM644x function declarations */
  71. void __init dm644x_init(void);
  72. void __init dm644x_init_asp(struct snd_platform_data *pdata);
  73. int __init dm644x_init_video(struct vpfe_config *);
  74. /* DM646x function declarations */
  75. void __init dm646x_init(void);
  76. void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
  77. void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
  78. int __init dm646x_init_edma(struct edma_rsv_info *rsv);
  79. void dm646x_video_init(void);
  80. void dm646x_setup_vpif(struct vpif_display_config *,
  81. struct vpif_capture_config *);
  82. #endif /*__DAVINCI_H */