vp44xx_data.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 "prm44xx.h"
  22. #include "prm-regbits-44xx.h"
  23. #include "voltage.h"
  24. #include "vp.h"
  25. static const struct omap_vp_ops omap4_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 44xx chips
  31. * XXX This stuff presumably belongs in the vp44xx.c or vp.c file.
  32. */
  33. static const struct omap_vp_common omap4_vp_common = {
  34. .vpconfig_erroroffset_mask = OMAP4430_ERROROFFSET_MASK,
  35. .vpconfig_errorgain_mask = OMAP4430_ERRORGAIN_MASK,
  36. .vpconfig_initvoltage_mask = OMAP4430_INITVOLTAGE_MASK,
  37. .vpconfig_timeouten = OMAP4430_TIMEOUTEN_MASK,
  38. .vpconfig_initvdd = OMAP4430_INITVDD_MASK,
  39. .vpconfig_forceupdate = OMAP4430_FORCEUPDATE_MASK,
  40. .vpconfig_vpenable = OMAP4430_VPENABLE_MASK,
  41. .vstepmin_smpswaittimemin_shift = OMAP4430_SMPSWAITTIMEMIN_SHIFT,
  42. .vstepmax_smpswaittimemax_shift = OMAP4430_SMPSWAITTIMEMAX_SHIFT,
  43. .vstepmin_stepmin_shift = OMAP4430_VSTEPMIN_SHIFT,
  44. .vstepmax_stepmax_shift = OMAP4430_VSTEPMAX_SHIFT,
  45. .vlimitto_vddmin_shift = OMAP4430_VDDMIN_SHIFT,
  46. .vlimitto_vddmax_shift = OMAP4430_VDDMAX_SHIFT,
  47. .vlimitto_timeout_shift = OMAP4430_TIMEOUT_SHIFT,
  48. .vpvoltage_mask = OMAP4430_VPVOLTAGE_MASK,
  49. .ops = &omap4_vp_ops,
  50. };
  51. struct omap_vp_instance omap4_vp_mpu = {
  52. .id = OMAP4_VP_VDD_MPU_ID,
  53. .common = &omap4_vp_common,
  54. .vpconfig = OMAP4_PRM_VP_MPU_CONFIG_OFFSET,
  55. .vstepmin = OMAP4_PRM_VP_MPU_VSTEPMIN_OFFSET,
  56. .vstepmax = OMAP4_PRM_VP_MPU_VSTEPMAX_OFFSET,
  57. .vlimitto = OMAP4_PRM_VP_MPU_VLIMITTO_OFFSET,
  58. .vstatus = OMAP4_PRM_VP_MPU_STATUS_OFFSET,
  59. .voltage = OMAP4_PRM_VP_MPU_VOLTAGE_OFFSET,
  60. };
  61. struct omap_vp_instance omap4_vp_iva = {
  62. .id = OMAP4_VP_VDD_IVA_ID,
  63. .common = &omap4_vp_common,
  64. .vpconfig = OMAP4_PRM_VP_IVA_CONFIG_OFFSET,
  65. .vstepmin = OMAP4_PRM_VP_IVA_VSTEPMIN_OFFSET,
  66. .vstepmax = OMAP4_PRM_VP_IVA_VSTEPMAX_OFFSET,
  67. .vlimitto = OMAP4_PRM_VP_IVA_VLIMITTO_OFFSET,
  68. .vstatus = OMAP4_PRM_VP_IVA_STATUS_OFFSET,
  69. .voltage = OMAP4_PRM_VP_IVA_VOLTAGE_OFFSET,
  70. };
  71. struct omap_vp_instance omap4_vp_core = {
  72. .id = OMAP4_VP_VDD_CORE_ID,
  73. .common = &omap4_vp_common,
  74. .vpconfig = OMAP4_PRM_VP_CORE_CONFIG_OFFSET,
  75. .vstepmin = OMAP4_PRM_VP_CORE_VSTEPMIN_OFFSET,
  76. .vstepmax = OMAP4_PRM_VP_CORE_VSTEPMAX_OFFSET,
  77. .vlimitto = OMAP4_PRM_VP_CORE_VLIMITTO_OFFSET,
  78. .vstatus = OMAP4_PRM_VP_CORE_STATUS_OFFSET,
  79. .voltage = OMAP4_PRM_VP_CORE_VOLTAGE_OFFSET,
  80. };
  81. struct omap_vp_param omap4_mpu_vp_data = {
  82. .vddmin = OMAP4_VP_MPU_VLIMITTO_VDDMIN,
  83. .vddmax = OMAP4_VP_MPU_VLIMITTO_VDDMAX,
  84. };
  85. struct omap_vp_param omap4_iva_vp_data = {
  86. .vddmin = OMAP4_VP_IVA_VLIMITTO_VDDMIN,
  87. .vddmax = OMAP4_VP_IVA_VLIMITTO_VDDMAX,
  88. };
  89. struct omap_vp_param omap4_core_vp_data = {
  90. .vddmin = OMAP4_VP_CORE_VLIMITTO_VDDMIN,
  91. .vddmax = OMAP4_VP_CORE_VLIMITTO_VDDMAX,
  92. };