~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-omap2/vp.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * OMAP3/4 Voltage Processor (VP) structure and macro definitions
  4  *
  5  * Copyright (C) 2007, 2010 Texas Instruments, Inc.
  6  * Rajendra Nayak <rnayak@ti.com>
  7  * Lesly A M <x0080970@ti.com>
  8  * Thara Gopinath <thara@ti.com>
  9  *
 10  * Copyright (C) 2008, 2011 Nokia Corporation
 11  * Kalle Jokiniemi
 12  * Paul Walmsley
 13  */
 14 #ifndef __ARCH_ARM_MACH_OMAP2_VP_H
 15 #define __ARCH_ARM_MACH_OMAP2_VP_H
 16 
 17 #include <linux/kernel.h>
 18 
 19 struct voltagedomain;
 20 
 21 /* XXX document */
 22 #define VP_IDLE_TIMEOUT         200
 23 #define VP_TRANXDONE_TIMEOUT    300
 24 
 25 /**
 26  * struct omap_vp_ops - per-VP operations
 27  * @check_txdone: check for VP transaction done
 28  * @clear_txdone: clear VP transaction done status
 29  */
 30 struct omap_vp_ops {
 31         u32 (*check_txdone)(u8 vp_id);
 32         void (*clear_txdone)(u8 vp_id);
 33 };
 34 
 35 /**
 36  * struct omap_vp_common - register data common to all VDDs
 37  * @vpconfig_erroroffset_mask: ERROROFFSET bitmask in the PRM_VP*_CONFIG reg
 38  * @vpconfig_errorgain_mask: ERRORGAIN bitmask in the PRM_VP*_CONFIG reg
 39  * @vpconfig_initvoltage_mask: INITVOLTAGE bitmask in the PRM_VP*_CONFIG reg
 40  * @vpconfig_timeouten: TIMEOUT bitmask in the PRM_VP*_CONFIG reg
 41  * @vpconfig_initvdd: INITVDD bitmask in the PRM_VP*_CONFIG reg
 42  * @vpconfig_forceupdate: FORCEUPDATE bitmask in the PRM_VP*_CONFIG reg
 43  * @vpconfig_vpenable: VPENABLE bitmask in the PRM_VP*_CONFIG reg
 44  * @vpconfig_erroroffset_shift: ERROROFFSET field shift in PRM_VP*_CONFIG reg
 45  * @vpconfig_errorgain_shift: ERRORGAIN field shift in PRM_VP*_CONFIG reg
 46  * @vpconfig_initvoltage_shift: INITVOLTAGE field shift in PRM_VP*_CONFIG reg
 47  * @vstepmin_stepmin_shift: VSTEPMIN field shift in the PRM_VP*_VSTEPMIN reg
 48  * @vstepmin_smpswaittimemin_shift: SMPSWAITTIMEMIN field shift in PRM_VP*_VSTEPMIN reg
 49  * @vstepmax_stepmax_shift: VSTEPMAX field shift in the PRM_VP*_VSTEPMAX reg
 50  * @vstepmax_smpswaittimemax_shift: SMPSWAITTIMEMAX field shift in PRM_VP*_VSTEPMAX reg
 51  * @vlimitto_vddmin_shift: VDDMIN field shift in PRM_VP*_VLIMITTO reg
 52  * @vlimitto_vddmax_shift: VDDMAX field shift in PRM_VP*_VLIMITTO reg
 53  * @vlimitto_timeout_shift: TIMEOUT field shift in PRM_VP*_VLIMITTO reg
 54  * @vpvoltage_mask: VPVOLTAGE field mask in PRM_VP*_VOLTAGE reg
 55  */
 56 struct omap_vp_common {
 57         u32 vpconfig_erroroffset_mask;
 58         u32 vpconfig_errorgain_mask;
 59         u32 vpconfig_initvoltage_mask;
 60         u8 vpconfig_timeouten;
 61         u8 vpconfig_initvdd;
 62         u8 vpconfig_forceupdate;
 63         u8 vpconfig_vpenable;
 64         u8 vstepmin_stepmin_shift;
 65         u8 vstepmin_smpswaittimemin_shift;
 66         u8 vstepmax_stepmax_shift;
 67         u8 vstepmax_smpswaittimemax_shift;
 68         u8 vlimitto_vddmin_shift;
 69         u8 vlimitto_vddmax_shift;
 70         u8 vlimitto_timeout_shift;
 71         u8 vpvoltage_mask;
 72 
 73         const struct omap_vp_ops *ops;
 74 };
 75 
 76 /**
 77  * struct omap_vp_instance - VP register offsets (per-VDD)
 78  * @common: pointer to struct omap_vp_common * for this SoC
 79  * @vpconfig: PRM_VP*_CONFIG reg offset from PRM start
 80  * @vstepmin: PRM_VP*_VSTEPMIN reg offset from PRM start
 81  * @vlimitto: PRM_VP*_VLIMITTO reg offset from PRM start
 82  * @vstatus: PRM_VP*_VSTATUS reg offset from PRM start
 83  * @voltage: PRM_VP*_VOLTAGE reg offset from PRM start
 84  * @id: Unique identifier for VP instance.
 85  * @enabled: flag to keep track of whether vp is enabled or not
 86  *
 87  * XXX vp_common is probably not needed since it is per-SoC
 88  */
 89 struct omap_vp_instance {
 90         const struct omap_vp_common *common;
 91         u8 vpconfig;
 92         u8 vstepmin;
 93         u8 vstepmax;
 94         u8 vlimitto;
 95         u8 vstatus;
 96         u8 voltage;
 97         u8 id;
 98         bool enabled;
 99 };
100 
101 extern struct omap_vp_instance omap3_vp_mpu;
102 extern struct omap_vp_instance omap3_vp_core;
103 
104 extern struct omap_vp_instance omap4_vp_mpu;
105 extern struct omap_vp_instance omap4_vp_iva;
106 extern struct omap_vp_instance omap4_vp_core;
107 
108 extern struct omap_vp_param omap3_mpu_vp_data;
109 extern struct omap_vp_param omap3_core_vp_data;
110 
111 extern struct omap_vp_param omap4_mpu_vp_data;
112 extern struct omap_vp_param omap4_iva_vp_data;
113 extern struct omap_vp_param omap4_core_vp_data;
114 
115 void omap_vp_init(struct voltagedomain *voltdm);
116 void omap_vp_enable(struct voltagedomain *voltdm);
117 void omap_vp_disable(struct voltagedomain *voltdm);
118 int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
119                               unsigned long target_volt);
120 int omap_vp_update_errorgain(struct voltagedomain *voltdm,
121                              unsigned long target_volt);
122 
123 #endif
124 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php