Lines Matching refs:ice

51 static bool qcom_ice_check_supported(struct qcom_ice *ice)  in qcom_ice_check_supported()  argument
53 u32 regval = qcom_ice_readl(ice, QCOM_ICE_REG_VERSION); in qcom_ice_check_supported()
54 struct device *dev = ice->dev; in qcom_ice_check_supported()
70 regval = qcom_ice_readl(ice, QCOM_ICE_REG_FUSE_SETTING); in qcom_ice_check_supported()
81 static void qcom_ice_low_power_mode_enable(struct qcom_ice *ice) in qcom_ice_low_power_mode_enable() argument
85 regval = qcom_ice_readl(ice, QCOM_ICE_REG_ADVANCED_CONTROL); in qcom_ice_low_power_mode_enable()
89 qcom_ice_writel(ice, regval, QCOM_ICE_REG_ADVANCED_CONTROL); in qcom_ice_low_power_mode_enable()
92 static void qcom_ice_optimization_enable(struct qcom_ice *ice) in qcom_ice_optimization_enable() argument
97 regval = qcom_ice_readl(ice, QCOM_ICE_REG_ADVANCED_CONTROL); in qcom_ice_optimization_enable()
101 qcom_ice_writel(ice, regval, QCOM_ICE_REG_ADVANCED_CONTROL); in qcom_ice_optimization_enable()
117 static int qcom_ice_wait_bist_status(struct qcom_ice *ice) in qcom_ice_wait_bist_status() argument
122 err = readl_poll_timeout(ice->base + QCOM_ICE_REG_BIST_STATUS, in qcom_ice_wait_bist_status()
126 dev_err(ice->dev, "Timed out waiting for ICE self-test to complete\n"); in qcom_ice_wait_bist_status()
131 int qcom_ice_enable(struct qcom_ice *ice) in qcom_ice_enable() argument
133 qcom_ice_low_power_mode_enable(ice); in qcom_ice_enable()
134 qcom_ice_optimization_enable(ice); in qcom_ice_enable()
136 return qcom_ice_wait_bist_status(ice); in qcom_ice_enable()
140 int qcom_ice_resume(struct qcom_ice *ice) in qcom_ice_resume() argument
142 struct device *dev = ice->dev; in qcom_ice_resume()
145 err = clk_prepare_enable(ice->core_clk); in qcom_ice_resume()
152 return qcom_ice_wait_bist_status(ice); in qcom_ice_resume()
156 int qcom_ice_suspend(struct qcom_ice *ice) in qcom_ice_suspend() argument
158 clk_disable_unprepare(ice->core_clk); in qcom_ice_suspend()
164 int qcom_ice_program_key(struct qcom_ice *ice, in qcom_ice_program_key() argument
169 struct device *dev = ice->dev; in qcom_ice_program_key()
202 int qcom_ice_evict_key(struct qcom_ice *ice, int slot) in qcom_ice_evict_key() argument
267 struct qcom_ice *ice; in of_qcom_ice_get() local
302 ice = ERR_PTR(-EPROBE_DEFER); in of_qcom_ice_get()
306 ice = platform_get_drvdata(pdev); in of_qcom_ice_get()
307 if (!ice) { in of_qcom_ice_get()
311 ice = ERR_PTR(-EPROBE_DEFER); in of_qcom_ice_get()
315 ice->link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER); in of_qcom_ice_get()
316 if (!ice->link) { in of_qcom_ice_get()
321 ice = ERR_PTR(-EINVAL); in of_qcom_ice_get()
327 return ice; in of_qcom_ice_get()