power_gate.c 865 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include <linux/module.h>
  2. #include <mach/am_regs.h>
  3. #include <mach/power_gate.h>
  4. unsigned char GCLK_ref[GCLK_IDX_MAX];
  5. EXPORT_SYMBOL(GCLK_ref);
  6. int video_dac_enable(unsigned char enable_mask)
  7. {
  8. CLEAR_CBUS_REG_MASK(VENC_VDAC_SETTING, enable_mask & 0x1f);
  9. return 0;
  10. }
  11. EXPORT_SYMBOL(video_dac_enable);
  12. int video_dac_disable()
  13. {
  14. SET_CBUS_REG_MASK(VENC_VDAC_SETTING, 0x1f);
  15. return 0;
  16. }
  17. EXPORT_SYMBOL(video_dac_disable);
  18. static void turn_off_audio_DAC(void)
  19. {
  20. int wr_val;
  21. wr_val = 0;
  22. WRITE_APB_REG(ADAC_RESET, wr_val);
  23. WRITE_APB_REG(ADAC_POWER_CTRL_REG1, wr_val);
  24. WRITE_APB_REG(ADAC_POWER_CTRL_REG2, wr_val);
  25. wr_val = 1;
  26. WRITE_APB_REG(ADAC_LATCH, wr_val);
  27. wr_val = 0;
  28. WRITE_APB_REG(ADAC_LATCH, wr_val);
  29. } /* turn_off_audio_DAC */
  30. int audio_internal_dac_disable()
  31. {
  32. turn_off_audio_DAC();
  33. return 0;
  34. }
  35. EXPORT_SYMBOL(audio_internal_dac_disable);