sh_mobile_meram.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __VIDEO_SH_MOBILE_MERAM_H__
  2. #define __VIDEO_SH_MOBILE_MERAM_H__
  3. /* For sh_mobile_meram_info.addr_mode */
  4. enum {
  5. SH_MOBILE_MERAM_MODE0 = 0,
  6. SH_MOBILE_MERAM_MODE1
  7. };
  8. enum {
  9. SH_MOBILE_MERAM_PF_NV = 0,
  10. SH_MOBILE_MERAM_PF_RGB,
  11. SH_MOBILE_MERAM_PF_NV24
  12. };
  13. struct sh_mobile_meram_priv;
  14. struct sh_mobile_meram_ops;
  15. /*
  16. * struct sh_mobile_meram_info - MERAM platform data
  17. * @reserved_icbs: Bitmask of reserved ICBs (for instance used through UIO)
  18. */
  19. struct sh_mobile_meram_info {
  20. int addr_mode;
  21. u32 reserved_icbs;
  22. struct sh_mobile_meram_ops *ops;
  23. struct sh_mobile_meram_priv *priv;
  24. struct platform_device *pdev;
  25. };
  26. /* icb config */
  27. struct sh_mobile_meram_icb_cfg {
  28. unsigned int meram_size; /* MERAM Buffer Size to use */
  29. };
  30. struct sh_mobile_meram_cfg {
  31. struct sh_mobile_meram_icb_cfg icb[2];
  32. };
  33. struct module;
  34. struct sh_mobile_meram_ops {
  35. struct module *module;
  36. /* register usage of meram */
  37. void *(*meram_register)(struct sh_mobile_meram_info *meram_dev,
  38. const struct sh_mobile_meram_cfg *cfg,
  39. unsigned int xres, unsigned int yres,
  40. unsigned int pixelformat,
  41. unsigned int *pitch);
  42. /* unregister usage of meram */
  43. void (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
  44. void *data);
  45. /* update meram settings */
  46. void (*meram_update)(struct sh_mobile_meram_info *meram_dev, void *data,
  47. unsigned long base_addr_y,
  48. unsigned long base_addr_c,
  49. unsigned long *icb_addr_y,
  50. unsigned long *icb_addr_c);
  51. };
  52. #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */