vp3xxx_data.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * OMAP3 Voltage Processor (VP) data
  3. *
  4. * Copyright (C) 2007, 2010 Texas Instruments, Inc.
  5. * Rajendra Nayak <rnayak@ti.com>
  6. * Lesly A M <x0080970@ti.com>
  7. * Thara Gopinath <thara@ti.com>
  8. *
  9. * Copyright (C) 2008, 2011 Nokia Corporation
  10. * Kalle Jokiniemi
  11. * Paul Walmsley
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License version 2 as
  15. * published by the Free Software Foundation.
  16. */
  17. #include <linux/io.h>
  18. #include <linux/err.h>
  19. #include <linux/init.h>
  20. #include "common.h"
  21. #include "prm-regbits-34xx.h"
  22. #include "voltage.h"
  23. #include "vp.h"
  24. #include "prm2xxx_3xxx.h"
  25. static const struct omap_vp_ops omap3_vp_ops = {
  26. .check_txdone = omap_prm_vp_check_txdone,
  27. .clear_txdone = omap_prm_vp_clear_txdone,
  28. };
  29. /*
  30. * VP data common to 34xx/36xx chips
  31. * XXX This stuff presumably belongs in the vp3xxx.c or vp.c file.
  32. */
  33. static const struct omap_vp_common omap3_vp_common = {
  34. .vpconfig_erroroffset_mask = OMAP3430_ERROROFFSET_MASK,
  35. .vpconfig_errorgain_mask = OMAP3430_ERRORGAIN_MASK,
  36. .vpconfig_initvoltage_mask = OMAP3430_INITVOLTAGE_MASK,
  37. .vpconfig_timeouten = OMAP3430_TIMEOUTEN_MASK,
  38. .vpconfig_initvdd = OMAP3430_INITVDD_MASK,
  39. .vpconfig_forceupdate = OMAP3430_FORCEUPDATE_MASK,
  40. .vpconfig_vpenable = OMAP3430_VPENABLE_MASK,
  41. .vstepmin_smpswaittimemin_shift = OMAP3430_SMPSWAITTIMEMIN_SHIFT,
  42. .vstepmax_smpswaittimemax_shift = OMAP3430_SMPSWAITTIMEMAX_SHIFT,
  43. .vstepmin_stepmin_shift = OMAP3430_VSTEPMIN_SHIFT,
  44. .vstepmax_stepmax_shift = OMAP3430_VSTEPMAX_SHIFT,
  45. .vlimitto_vddmin_shift = OMAP3430_VDDMIN_SHIFT,
  46. .vlimitto_vddmax_shift = OMAP3430_VDDMAX_SHIFT,
  47. .vlimitto_timeout_shift = OMAP3430_TIMEOUT_SHIFT,
  48. .vpvoltage_mask = OMAP3430_VPVOLTAGE_MASK,
  49. .ops = &omap3_vp_ops,
  50. };
  51. struct omap_vp_instance omap3_vp_mpu = {
  52. .id = OMAP3_VP_VDD_MPU_ID,
  53. .common = &omap3_vp_common,
  54. .vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET,
  55. .vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET,
  56. .vstepmax = OMAP3_PRM_VP1_VSTEPMAX_OFFSET,
  57. .vlimitto = OMAP3_PRM_VP1_VLIMITTO_OFFSET,
  58. .vstatus = OMAP3_PRM_VP1_STATUS_OFFSET,
  59. .voltage = OMAP3_PRM_VP1_VOLTAGE_OFFSET,
  60. };
  61. struct omap_vp_instance omap3_vp_core = {
  62. .id = OMAP3_VP_VDD_CORE_ID,
  63. .common = &omap3_vp_common,
  64. .vpconfig = OMAP3_PRM_VP2_CONFIG_OFFSET,
  65. .vstepmin = OMAP3_PRM_VP2_VSTEPMIN_OFFSET,
  66. .vstepmax = OMAP3_PRM_VP2_VSTEPMAX_OFFSET,
  67. .vlimitto = OMAP3_PRM_VP2_VLIMITTO_OFFSET,
  68. .vstatus = OMAP3_PRM_VP2_STATUS_OFFSET,
  69. .voltage = OMAP3_PRM_VP2_VOLTAGE_OFFSET,
  70. };
  71. struct omap_vp_param omap3_mpu_vp_data = {
  72. .vddmin = OMAP3430_VP1_VLIMITTO_VDDMIN,
  73. .vddmax = OMAP3430_VP1_VLIMITTO_VDDMAX,
  74. };
  75. struct omap_vp_param omap3_core_vp_data = {
  76. .vddmin = OMAP3430_VP2_VLIMITTO_VDDMIN,
  77. .vddmax = OMAP3430_VP2_VLIMITTO_VDDMAX,
  78. };