Browse Source

msm: ipa: update IPA clock plan for 5.1

Make changes to vote for right IPA clock frequency for
targets with IPAv5.1 and above.

Change-Id: I156b0ff0886133f8d46b692c99543bc9912d05b0
Signed-off-by: Chaitanya Pratapa <[email protected]>
Chaitanya Pratapa 4 years ago
parent
commit
457beda682
1 changed files with 11 additions and 1 deletions
  1. 11 1
      drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

+ 11 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

@@ -39,6 +39,11 @@
 #define IPA_V4_0_CLK_RATE_NOMINAL (220 * 1000 * 1000UL)
 #define IPA_V4_0_CLK_RATE_TURBO (250 * 1000 * 1000UL)
 
+#define IPA_V5_0_CLK_RATE_SVS2 (120 * 1000 * 1000UL)
+#define IPA_V5_0_CLK_RATE_SVS (240 * 1000 * 1000UL)
+#define IPA_V5_0_CLK_RATE_NOMINAL (500 * 1000 * 1000UL)
+#define IPA_V5_0_CLK_RATE_TURBO (600 * 1000 * 1000UL)
+
 #define IPA_MAX_HOLB_TMR_VAL (4294967296 - 1)
 
 #define IPA_V3_0_BW_THRESHOLD_TURBO_MBPS (1000)
@@ -8877,7 +8882,12 @@ int ipa3_init_mem_partition(enum ipa_hw_type type)
 int ipa3_controller_static_bind(struct ipa3_controller *ctrl,
 		enum ipa_hw_type hw_type, u32 ipa_cfg_offset)
 {
-	if (hw_type >= IPA_HW_v4_0) {
+	if (hw_type >= IPA_HW_v5_1) {
+		ctrl->ipa_clk_rate_turbo = IPA_V5_0_CLK_RATE_TURBO;
+		ctrl->ipa_clk_rate_nominal = IPA_V5_0_CLK_RATE_NOMINAL;
+		ctrl->ipa_clk_rate_svs = IPA_V5_0_CLK_RATE_SVS;
+		ctrl->ipa_clk_rate_svs2 = IPA_V5_0_CLK_RATE_SVS2;
+	} else if (hw_type >= IPA_HW_v4_0) {
 		ctrl->ipa_clk_rate_turbo = IPA_V4_0_CLK_RATE_TURBO;
 		ctrl->ipa_clk_rate_nominal = IPA_V4_0_CLK_RATE_NOMINAL;
 		ctrl->ipa_clk_rate_svs = IPA_V4_0_CLK_RATE_SVS;