msm: eva: Rename hfi related devices
To avoid confusion in code reading and prepare for future compatibility changes. Change-Id: I43d61e18d2e2d75d1fd46ceb2e763511329ee32d Signed-off-by: George Shen <quic_sqiao@quicinc.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Gerrit - the friendly Code Review server

vecāks
936925471d
revīzija
b293b5b713
@@ -69,13 +69,13 @@ static ssize_t core_info_read(struct file *file, char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct msm_cvp_core *core = file->private_data;
|
||||
struct cvp_hfi_device *hdev;
|
||||
struct cvp_hfi_ops *ops_tbl;
|
||||
struct cvp_hal_fw_info fw_info = { {0} };
|
||||
char *dbuf, *cur, *end;
|
||||
int i = 0, rc = 0;
|
||||
ssize_t len = 0;
|
||||
|
||||
if (!core || !core->device) {
|
||||
if (!core || !core->dev_ops) {
|
||||
dprintk(CVP_ERR, "Invalid params, core: %pK\n", core);
|
||||
return 0;
|
||||
}
|
||||
@@ -87,13 +87,13 @@ static ssize_t core_info_read(struct file *file, char __user *buf,
|
||||
}
|
||||
cur = dbuf;
|
||||
end = cur + MAX_DBG_BUF_SIZE;
|
||||
hdev = core->device;
|
||||
ops_tbl = core->dev_ops;
|
||||
|
||||
cur += write_str(cur, end - cur, "===============================\n");
|
||||
cur += write_str(cur, end - cur, "CORE %d: %pK\n", 0, core);
|
||||
cur += write_str(cur, end - cur, "===============================\n");
|
||||
cur += write_str(cur, end - cur, "Core state: %d\n", core->state);
|
||||
rc = call_hfi_op(hdev, get_fw_info, hdev->hfi_device_data, &fw_info);
|
||||
rc = call_hfi_op(ops_tbl, get_fw_info, ops_tbl->hfi_device_data, &fw_info);
|
||||
if (rc) {
|
||||
dprintk(CVP_WARN, "Failed to read FW info\n");
|
||||
goto err_fw_info;
|
||||
@@ -177,18 +177,18 @@ static const struct file_operations ssr_fops = {
|
||||
|
||||
static int cvp_power_get(void *data, u64 *val)
|
||||
{
|
||||
struct cvp_hfi_device *hfi_ops;
|
||||
struct cvp_hfi_ops *ops_tbl;
|
||||
struct msm_cvp_core *core;
|
||||
struct iris_hfi_device *hfi_device;
|
||||
|
||||
core = cvp_driver->cvp_core;
|
||||
if (!core)
|
||||
return 0;
|
||||
hfi_ops = core->device;
|
||||
if (!hfi_ops)
|
||||
ops_tbl = core->dev_ops;
|
||||
if (!ops_tbl)
|
||||
return 0;
|
||||
|
||||
hfi_device = hfi_ops->hfi_device_data;
|
||||
hfi_device = ops_tbl->hfi_device_data;
|
||||
if (!hfi_device)
|
||||
return 0;
|
||||
|
||||
@@ -201,7 +201,7 @@ static int cvp_power_get(void *data, u64 *val)
|
||||
|
||||
static int cvp_power_set(void *data, u64 val)
|
||||
{
|
||||
struct cvp_hfi_device *hfi_ops;
|
||||
struct cvp_hfi_ops *ops_tbl;
|
||||
struct msm_cvp_core *core;
|
||||
struct iris_hfi_device *hfi_device;
|
||||
int rc = 0;
|
||||
@@ -210,11 +210,11 @@ static int cvp_power_set(void *data, u64 val)
|
||||
if (!core)
|
||||
return -EINVAL;
|
||||
|
||||
hfi_ops = core->device;
|
||||
if (!hfi_ops)
|
||||
ops_tbl = core->dev_ops;
|
||||
if (!ops_tbl)
|
||||
return -EINVAL;
|
||||
|
||||
hfi_device = hfi_ops->hfi_device_data;
|
||||
hfi_device = ops_tbl->hfi_device_data;
|
||||
if (!hfi_device)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -230,7 +230,7 @@ static int cvp_power_set(void *data, u64 val)
|
||||
return -EINVAL;
|
||||
|
||||
if (val > 0) {
|
||||
rc = call_hfi_op(hfi_ops, resume, hfi_ops->hfi_device_data);
|
||||
rc = call_hfi_op(ops_tbl, resume, ops_tbl->hfi_device_data);
|
||||
if (rc)
|
||||
dprintk(CVP_ERR, "debugfs fail to power on cvp\n");
|
||||
}
|
||||
@@ -284,20 +284,20 @@ failed_create_dir:
|
||||
static int _clk_rate_set(void *data, u64 val)
|
||||
{
|
||||
struct msm_cvp_core *core;
|
||||
struct cvp_hfi_device *dev;
|
||||
struct cvp_hfi_ops *ops_tbl;
|
||||
struct allowed_clock_rates_table *tbl = NULL;
|
||||
unsigned int tbl_size, i;
|
||||
|
||||
core = cvp_driver->cvp_core;
|
||||
dev = core->device;
|
||||
ops_tbl = core->dev_ops;
|
||||
tbl = core->resources.allowed_clks_tbl;
|
||||
tbl_size = core->resources.allowed_clks_tbl_size;
|
||||
|
||||
if (val == 0) {
|
||||
struct iris_hfi_device *hdev = dev->hfi_device_data;
|
||||
struct iris_hfi_device *hdev = ops_tbl->hfi_device_data;
|
||||
|
||||
msm_cvp_clock_voting = 0;
|
||||
call_hfi_op(dev, scale_clocks, hdev, hdev->clk_freq);
|
||||
call_hfi_op(ops_tbl, scale_clocks, hdev, hdev->clk_freq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ static int _clk_rate_set(void *data, u64 val)
|
||||
dprintk(CVP_WARN, "Override cvp_clk_rate with %d\n",
|
||||
msm_cvp_clock_voting);
|
||||
|
||||
call_hfi_op(dev, scale_clocks, dev->hfi_device_data,
|
||||
call_hfi_op(ops_tbl, scale_clocks, ops_tbl->hfi_device_data,
|
||||
msm_cvp_clock_voting);
|
||||
|
||||
return 0;
|
||||
@@ -325,7 +325,7 @@ static int _clk_rate_get(void *data, u64 *val)
|
||||
struct iris_hfi_device *hdev;
|
||||
|
||||
core = cvp_driver->cvp_core;
|
||||
hdev = core->device->hfi_device_data;
|
||||
hdev = core->dev_ops->hfi_device_data;
|
||||
if (msm_cvp_clock_voting)
|
||||
*val = msm_cvp_clock_voting;
|
||||
else
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user