msm: camera: cpas: Update cpas dt parsing
cpas dt parser updates to reduce maximum acceptable node ids. CRs-Fixed: 2835738 Change-Id: I8e88a0cba0a1bc9367cbfd1ae81f4ac1e9f916a8 Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
@@ -2014,6 +2014,11 @@ static void cam_cpas_update_monitor_array(struct cam_hw_info *cpas_hw,
|
||||
entry->be_ddr = cam_io_r_mb(rpmh_base + be_ddr_offset);
|
||||
entry->be_mnoc = cam_io_r_mb(rpmh_base + be_mnoc_offset);
|
||||
entry->be_shub = cam_io_r_mb(rpmh_base + be_shub_offset);
|
||||
|
||||
CAM_DBG(CAM_CPAS,
|
||||
"fe_ddr=0x%x, fe_mnoc=0x%x, be_ddr=0x%x, be_mnoc=0x%x",
|
||||
entry->fe_ddr, entry->fe_mnoc, entry->be_ddr,
|
||||
entry->be_mnoc);
|
||||
}
|
||||
|
||||
entry->camnoc_fill_level[0] = cam_io_r_mb(
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _CAM_CPAS_HW_H_
|
||||
@@ -13,11 +13,11 @@
|
||||
#include "cam_soc_bus.h"
|
||||
|
||||
#define CAM_CPAS_INFLIGHT_WORKS 5
|
||||
#define CAM_CPAS_MAX_CLIENTS 40
|
||||
#define CAM_CPAS_MAX_CLIENTS 41
|
||||
#define CAM_CPAS_MAX_AXI_PORTS 6
|
||||
#define CAM_CPAS_MAX_TREE_LEVELS 4
|
||||
#define CAM_CPAS_MAX_GRAN_PATHS_PER_CLIENT 32
|
||||
#define CAM_CPAS_PATH_DATA_MAX 38
|
||||
#define CAM_CPAS_PATH_DATA_MAX 40
|
||||
#define CAM_CPAS_TRANSACTION_MAX 2
|
||||
|
||||
#define CAM_CPAS_AXI_MIN_MNOC_AB_BW (2048 * 1024)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
@@ -119,14 +119,16 @@ int cam_cpas_node_tree_cleanup(struct cam_cpas *cpas_core,
|
||||
|
||||
static int cam_cpas_util_path_type_to_idx(uint32_t *path_data_type)
|
||||
{
|
||||
if (*path_data_type >= CAM_CPAS_PATH_DATA_CONSO_OFFSET)
|
||||
if (*path_data_type >= CAM_CPAS_PATH_DATA_CONSO_OFFSET) {
|
||||
*path_data_type = CAM_CPAS_MAX_GRAN_PATHS_PER_CLIENT +
|
||||
(*path_data_type % CAM_CPAS_MAX_GRAN_PATHS_PER_CLIENT);
|
||||
else
|
||||
}
|
||||
else {
|
||||
*path_data_type %= CAM_CPAS_MAX_GRAN_PATHS_PER_CLIENT;
|
||||
}
|
||||
|
||||
if (*path_data_type >= CAM_CPAS_PATH_DATA_MAX) {
|
||||
CAM_ERR(CAM_CPAS, "index Invalid: %d", path_data_type);
|
||||
CAM_ERR(CAM_CPAS, "index Invalid: %u", *path_data_type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -233,7 +235,7 @@ static int cam_cpas_parse_node_tree(struct cam_cpas *cpas_core,
|
||||
if (curr_node_ptr->cell_idx >=
|
||||
CAM_CPAS_MAX_TREE_NODES) {
|
||||
CAM_ERR(CAM_CPAS, "Invalid cell idx: %d",
|
||||
cell_idx);
|
||||
curr_node_ptr->cell_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -378,8 +380,11 @@ static int cam_cpas_parse_node_tree(struct cam_cpas *cpas_core,
|
||||
|
||||
rc = cam_cpas_util_path_type_to_idx(
|
||||
&curr_node_ptr->path_data_type);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_CPAS, "Incorrect path type for client: %s",
|
||||
client_name);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = of_property_read_u32(curr_node,
|
||||
"traffic-transaction-type",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _CAM_CPAS_SOC_H_
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "cam_cpas_hw.h"
|
||||
|
||||
#define CAM_REGULATOR_LEVEL_MAX 16
|
||||
#define CAM_CPAS_MAX_TREE_NODES 50
|
||||
#define CAM_CPAS_MAX_TREE_NODES 56
|
||||
#define CAM_CPAS_MAX_FUSE_FEATURE 10
|
||||
|
||||
/**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
@@ -269,14 +269,14 @@ static int cam_cpastop_get_hw_info(struct cam_hw_info *cpas_hw,
|
||||
reg_value = cam_io_r_mb(soc_info->reg_map[reg_indx].mem_base + 0x8);
|
||||
hw_caps->camera_capability = reg_value;
|
||||
|
||||
CAM_DBG(CAM_FD, "Family %d, version %d.%d.%d, cpas %d.%d.%d, cap 0x%x",
|
||||
CAM_DBG(CAM_CPAS, "Family %d, version %d.%d.%d, cpas %d.%d.%d, cap 0x%x",
|
||||
hw_caps->camera_family, hw_caps->camera_version.major,
|
||||
hw_caps->camera_version.minor, hw_caps->camera_version.incr,
|
||||
hw_caps->cpas_version.major, hw_caps->cpas_version.minor,
|
||||
hw_caps->cpas_version.incr, hw_caps->camera_capability);
|
||||
|
||||
soc_info->hw_version = CAM_CPAS_TITAN_NONE;
|
||||
rc = cam_cpas_translate_camera_cpas_version_id(cam_version,
|
||||
rc = cam_cpas_translate_camera_cpas_version_id(cam_version,
|
||||
cpas_version, &cam_version_id, &cpas_version_id);
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_CPAS, "Invalid Version, Camera: 0x%x CPAS: 0x%x",
|
||||
|
Reference in New Issue
Block a user