Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / include / linux / platform_data / voltage-omap.h
diff --git a/kernel/include/linux/platform_data/voltage-omap.h b/kernel/include/linux/platform_data/voltage-omap.h
new file mode 100644 (file)
index 0000000..5be4d5d
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * OMAP Voltage Management Routines
+ *
+ * Copyright (C) 2011, Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ARCH_ARM_OMAP_VOLTAGE_H
+#define __ARCH_ARM_OMAP_VOLTAGE_H
+
+/**
+ * struct omap_volt_data - Omap voltage specific data.
+ * @voltage_nominal:   The possible voltage value in uV
+ * @sr_efuse_offs:     The offset of the efuse register(from system
+ *                     control module base address) from where to read
+ *                     the n-target value for the smartreflex module.
+ * @sr_errminlimit:    Error min limit value for smartreflex. This value
+ *                     differs at differnet opp and thus is linked
+ *                     with voltage.
+ * @vp_errorgain:      Error gain value for the voltage processor. This
+ *                     field also differs according to the voltage/opp.
+ */
+struct omap_volt_data {
+       u32     volt_nominal;
+       u32     sr_efuse_offs;
+       u8      sr_errminlimit;
+       u8      vp_errgain;
+};
+struct voltagedomain;
+
+struct voltagedomain *voltdm_lookup(const char *name);
+int voltdm_scale(struct voltagedomain *voltdm, unsigned long target_volt);
+unsigned long voltdm_get_voltage(struct voltagedomain *voltdm);
+struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,
+               unsigned long volt);
+#endif