1 /* 2 * OMAP Voltage Management Routines 3 * 4 * Copyright (C) 2011, Texas Instruments, Inc. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 11 #ifndef __ARCH_ARM_OMAP_VOLTAGE_H 12 #define __ARCH_ARM_OMAP_VOLTAGE_H 13 14 /** 15 * struct omap_volt_data - Omap voltage specific data. 16 * @voltage_nominal: The possible voltage value in uV 17 * @sr_efuse_offs: The offset of the efuse register(from system 18 * control module base address) from where to read 19 * the n-target value for the smartreflex module. 20 * @sr_errminlimit: Error min limit value for smartreflex. This value 21 * differs at differnet opp and thus is linked 22 * with voltage. 23 * @vp_errorgain: Error gain value for the voltage processor. This 24 * field also differs according to the voltage/opp. 25 */ 26 struct omap_volt_data { 27 u32 volt_nominal; 28 u32 sr_efuse_offs; 29 u8 sr_errminlimit; 30 u8 vp_errgain; 31 }; 32 struct voltagedomain; 33 34 struct voltagedomain *voltdm_lookup(const char *name); 35 int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt); 36 unsigned long voltdm_get_voltage(struct voltagedomain *voltdm); 37 struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, 38 unsigned long volt); 39 #endif 40