浏览代码

msm: camera: cpas: Change to enable bus scaling for AHB

This change scales BW voting with src clock voltage corner.
Adds a debugfs to disable this scaling.

CRs-Fixed: 2531856
Change-Id: I266e34ca81f635954e60648366bcc4792f90fdb6
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram 5 年之前
父节点
当前提交
6761d7b872
共有 2 个文件被更改,包括 7 次插入6 次删除
  1. 5 4
      drivers/cam_cpas/cam_cpas_hw.c
  2. 2 2
      drivers/cam_cpas/cam_cpas_hw.h

+ 5 - 4
drivers/cam_cpas/cam_cpas_hw.c

@@ -932,7 +932,7 @@ static int cam_cpas_util_apply_client_ahb_vote(struct cam_hw_info *cpas_hw,
 
 	CAM_DBG(CAM_CPAS, "Required highest_level[%d]", highest_level);
 
-	if (cpas_core->ahb_bus_scaling_enable) {
+	if (!cpas_core->ahb_bus_scaling_disable) {
 		rc = cam_cpas_util_vote_bus_client_level(ahb_bus_client,
 			highest_level);
 		if (rc) {
@@ -1678,12 +1678,12 @@ static int cam_cpas_util_create_debugfs(
 	if (!cpas_core->dentry)
 		return -ENOMEM;
 
-	if (!debugfs_create_bool("ahb_bus_scaling_enable",
+	if (!debugfs_create_bool("ahb_bus_scaling_disable",
 		0644,
 		cpas_core->dentry,
-		&cpas_core->ahb_bus_scaling_enable)) {
+		&cpas_core->ahb_bus_scaling_disable)) {
 		CAM_ERR(CAM_CPAS,
-			"failed to create ahb_bus_scaling_enable entry");
+			"failed to create ahb_bus_scaling_disable entry");
 		rc = -ENOMEM;
 		goto err;
 	}
@@ -1735,6 +1735,7 @@ int cam_cpas_hw_probe(struct platform_device *pdev,
 	cpas_hw->soc_info.dev = &pdev->dev;
 	cpas_hw->soc_info.dev_name = pdev->name;
 	cpas_hw->open_count = 0;
+	cpas_core->ahb_bus_scaling_disable = false;
 	mutex_init(&cpas_hw->hw_mutex);
 	spin_lock_init(&cpas_hw->hw_lock);
 	init_completion(&cpas_hw->hw_complete);

+ 2 - 2
drivers/cam_cpas/cam_cpas_hw.h

@@ -184,7 +184,7 @@ struct cam_cpas_axi_port {
  * @irq_count: atomic irq count
  * @irq_count_wq: wait variable to ensure all irq's are handled
  * @dentry: debugfs file entry
- * @ahb_bus_scaling_enable: ahb scaling based on src clk corner for bus
+ * @ahb_bus_scaling_disable: ahb scaling based on src clk corner for bus
  */
 struct cam_cpas {
 	struct cam_cpas_hw_caps hw_caps;
@@ -203,7 +203,7 @@ struct cam_cpas {
 	atomic_t irq_count;
 	wait_queue_head_t irq_count_wq;
 	struct dentry *dentry;
-	bool ahb_bus_scaling_enable;
+	bool ahb_bus_scaling_disable;
 };
 
 int cam_camsstop_get_internal_ops(struct cam_cpas_internal_ops *internal_ops);