PM / devfreq: memlat: Add a core to memory frequency mapping table

Add a core to memory frequency mapping table, which establishes
a relationship between the core frequency and its corresponding
bandwidth vote.

The governor expects a "qcom,core-dev-table" table as part of a given
memlat hardware monitor's device tree node.

This table is read upon registration of the memlat governor. The table
is then used to determine the memory bandwidth vote corresponding to the
maximum of the core frequencies.

CRs-Fixed: 1054146
Change-Id: I9df118da1433125b02c937bf1799a0944b110fac
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Suggested-by: Saravana Kannan <skannan@codeaurora.org>
diff --git a/drivers/devfreq/governor_memlat.h b/drivers/devfreq/governor_memlat.h
index 19a3500..a0e52a0 100644
--- a/drivers/devfreq/governor_memlat.h
+++ b/drivers/devfreq/governor_memlat.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -31,6 +31,11 @@
 	unsigned long freq;
 };
 
+struct core_dev_map {
+	unsigned int core_mhz;
+	unsigned int target_freq;
+};
+
 /**
  * struct memlat_hwmon - Memory Latency HW monitor info
  * @start_hwmon:		Start the HW monitoring
@@ -63,6 +68,7 @@
 	struct dev_stats *core_stats;
 
 	struct devfreq *df;
+	struct core_dev_map *freq_map;
 };
 
 #ifdef CONFIG_DEVFREQ_GOV_MEMLAT