Lines Matching defs:ice

20 #include <soc/qcom/ice.h>
51 static bool qcom_ice_check_supported(struct qcom_ice *ice)
53 u32 regval = qcom_ice_readl(ice, QCOM_ICE_REG_VERSION);
54 struct device *dev = ice->dev;
70 regval = qcom_ice_readl(ice, QCOM_ICE_REG_FUSE_SETTING);
81 static void qcom_ice_low_power_mode_enable(struct qcom_ice *ice)
85 regval = qcom_ice_readl(ice, QCOM_ICE_REG_ADVANCED_CONTROL);
89 qcom_ice_writel(ice, regval, QCOM_ICE_REG_ADVANCED_CONTROL);
92 static void qcom_ice_optimization_enable(struct qcom_ice *ice)
97 regval = qcom_ice_readl(ice, QCOM_ICE_REG_ADVANCED_CONTROL);
101 qcom_ice_writel(ice, regval, QCOM_ICE_REG_ADVANCED_CONTROL);
117 static int qcom_ice_wait_bist_status(struct qcom_ice *ice)
122 err = readl_poll_timeout(ice->base + QCOM_ICE_REG_BIST_STATUS,
126 dev_err(ice->dev, "Timed out waiting for ICE self-test to complete\n");
131 int qcom_ice_enable(struct qcom_ice *ice)
133 qcom_ice_low_power_mode_enable(ice);
134 qcom_ice_optimization_enable(ice);
136 return qcom_ice_wait_bist_status(ice);
140 int qcom_ice_resume(struct qcom_ice *ice)
142 struct device *dev = ice->dev;
145 err = clk_prepare_enable(ice->core_clk);
152 return qcom_ice_wait_bist_status(ice);
156 int qcom_ice_suspend(struct qcom_ice *ice)
158 clk_disable_unprepare(ice->core_clk);
164 int qcom_ice_program_key(struct qcom_ice *ice,
169 struct device *dev = ice->dev;
202 int qcom_ice_evict_key(struct qcom_ice *ice, int slot)
237 engine->core_clk = devm_clk_get_optional_enabled(dev, "ice");
256 * consumer device if its DT node provides the 'ice' reg range and the 'ice'
258 * phandle via 'qcom,ice' property to an ICE DT, the ICE instance will already
267 struct qcom_ice *ice;
278 * range called 'ice' it provides.
280 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ice");
291 * If the consumer node does not provider an 'ice' reg range
295 node = of_parse_phandle(dev->of_node, "qcom,ice", 0);
302 ice = ERR_PTR(-EPROBE_DEFER);
306 ice = platform_get_drvdata(pdev);
307 if (!ice) {
308 dev_err(dev, "Cannot get ice instance from %s\n",
311 ice = ERR_PTR(-EPROBE_DEFER);
315 ice->link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER);
316 if (!ice->link) {
321 ice = ERR_PTR(-EINVAL);
327 return ice;
360 .name = "qcom-ice",