Skip to content

Commit fa60be6

Browse files
KeerthyjKevin Hilman
authored andcommitted
ARM: OMAP2+: Voltage: Move the omap_volt_data structure to plat
Move the omap_volt_data structure from mach-omap2/ directory to arch/arm/plat-omap/include/plat/ so that it is accessible from both mach-omap2 and drivers directories. Signed-off-by: J Keerthy <j-keerthy@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
1 parent 50e4a7d commit fa60be6

2 files changed

Lines changed: 22 additions & 20 deletions

File tree

‎arch/arm/mach-omap2/voltage.h‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#include <linux/err.h>
1818

19+
#include <plat/voltage.h>
20+
1921
#include "vc.h"
2022
#include "vp.h"
2123

@@ -90,25 +92,6 @@ struct voltagedomain {
9092
struct omap_volt_data *volt_data;
9193
};
9294

93-
/**
94-
* struct omap_volt_data - Omap voltage specific data.
95-
* @voltage_nominal: The possible voltage value in uV
96-
* @sr_efuse_offs: The offset of the efuse register(from system
97-
* control module base address) from where to read
98-
* the n-target value for the smartreflex module.
99-
* @sr_errminlimit: Error min limit value for smartreflex. This value
100-
* differs at differnet opp and thus is linked
101-
* with voltage.
102-
* @vp_errorgain: Error gain value for the voltage processor. This
103-
* field also differs according to the voltage/opp.
104-
*/
105-
struct omap_volt_data {
106-
u32 volt_nominal;
107-
u32 sr_efuse_offs;
108-
u8 sr_errminlimit;
109-
u8 vp_errgain;
110-
};
111-
11295
/**
11396
* struct omap_voltdm_pmic - PMIC specific data required by voltage driver.
11497
* @slew_rate: PMIC slew rate (in uv/us)

‎arch/arm/plat-omap/include/plat/voltage.h‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,29 @@
1111
#ifndef __ARCH_ARM_OMAP_VOLTAGE_H
1212
#define __ARCH_ARM_OMAP_VOLTAGE_H
1313

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+
};
1432
struct voltagedomain;
1533

1634
struct voltagedomain *voltdm_lookup(const char *name);
1735
int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
1836
unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
19-
37+
struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
38+
unsigned long volt);
2039
#endif

0 commit comments

Comments
 (0)