regulator: cprh-kbss-regulator: add support for SDM845 CPR controllers

SDM845 chips contain two CPRh controllers.  The first of these
controllers contains two CPR threads which correspond to the
power CPU cluster and the L3 cache.  The second controller
contains a single CPR thread which corresponds to the performance
CPU cluster.

The CPRh controllers found on SDM845 have hardware version 4.5.
This hardware version utilizes a new register map in order to
handle multiple CPR threads.

Update the cprh-kbss-regulator and cpr3-regulator drivers in
order to support SDM845 CPRh controllers and CPRh controller
version 4.5.

Change-Id: I94b0d5ee0eaf548d3d1a94c7ae181169d28c0e31
Signed-off-by: David Collins <collinsd@codeaurora.org>
diff --git a/drivers/regulator/cpr3-regulator.h b/drivers/regulator/cpr3-regulator.h
index e2f1233..31d737ca 100644
--- a/drivers/regulator/cpr3-regulator.h
+++ b/drivers/regulator/cpr3-regulator.h
@@ -550,6 +550,9 @@
  *			that this CPR3 controller manages.
  * @cpr_ctrl_base:	Virtual address of the CPR3 controller base register
  * @fuse_base:		Virtual address of fuse row 0
+ * @saw_base:		Virtual address of the SAW module base register.  This
+ *			is used for CPR controllers that support HW closed-loop
+ *			on platforms which lack an SPM.
  * @aging_possible_reg:	Virtual address of an optional platform-specific
  *			register that must be ready to determine if it is
  *			possible to perform an aging measurement.
@@ -565,6 +568,7 @@
  * @soc_revision:	Revision number of the SoC.  This may be unused by
  *			platforms that do not have different behavior for
  *			different SoC revisions.
+ * @cpr_hw_version:	CPR controller version register value
  * @lock:		Mutex lock used to ensure mutual exclusion between
  *			all of the threads associated with the controller
  * @vdd_regulator:	Pointer to the VDD supply regulator which this CPR3
@@ -757,6 +761,7 @@
 	int			ctrl_id;
 	void __iomem		*cpr_ctrl_base;
 	void __iomem		*fuse_base;
+	void __iomem		*saw_base;
 	void __iomem		*aging_possible_reg;
 	struct list_head	list;
 	struct cpr3_thread	*thread;
@@ -764,6 +769,7 @@
 	u8			*sensor_owner;
 	int			sensor_count;
 	int			soc_revision;
+	u32			cpr_hw_version;
 	struct mutex		lock;
 	struct regulator	*vdd_regulator;
 	struct regulator	*system_regulator;