sh_mobile_meram.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. struct sh_mobile_meram_info {
  16. int addr_mode;
  17. struct sh_mobile_meram_ops *ops;
  18. struct sh_mobile_meram_priv *priv;
  19. struct platform_device *pdev;
  20. };
  21. /* icb config */
  22. struct sh_mobile_meram_icb {
  23. int marker_icb; /* ICB # for Marker ICB */
  24. int cache_icb; /* ICB # for Cache ICB */
  25. int meram_offset; /* MERAM Buffer Offset to use */
  26. int meram_size; /* MERAM Buffer Size to use */
  27. int cache_unit; /* bytes to cache per ICB */
  28. };
  29. struct sh_mobile_meram_cfg {
  30. struct sh_mobile_meram_icb icb[2];
  31. int pixelformat;
  32. int current_reg;
  33. };
  34. struct module;
  35. struct sh_mobile_meram_ops {
  36. struct module *module;
  37. /* register usage of meram */
  38. int (*meram_register)(struct sh_mobile_meram_info *meram_dev,
  39. struct sh_mobile_meram_cfg *cfg,
  40. int xres, int yres, int pixelformat,
  41. unsigned long base_addr_y,
  42. unsigned long base_addr_c,
  43. unsigned long *icb_addr_y,
  44. unsigned long *icb_addr_c, int *pitch);
  45. /* unregister usage of meram */
  46. int (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
  47. struct sh_mobile_meram_cfg *cfg);
  48. /* update meram settings */
  49. int (*meram_update)(struct sh_mobile_meram_info *meram_dev,
  50. struct sh_mobile_meram_cfg *cfg,
  51. unsigned long base_addr_y,
  52. unsigned long base_addr_c,
  53. unsigned long *icb_addr_y,
  54. unsigned long *icb_addr_c);
  55. };
  56. #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */