Lines Matching +full:fail +full:- +full:safe

1 // SPDX-License-Identifier: GPL-2.0+
11 * etc.) which would make common driver an ifdef nightmare :-(
19 #include <asm/arch/imx-regs.h>
36 while (--timeout) { in mxs_ocotp_wait_busy_clear()
37 reg = readl(&ocotp_regs->hw_ocotp_ctrl); in mxs_ocotp_wait_busy_clear()
44 return -EINVAL; in mxs_ocotp_wait_busy_clear()
54 writel(OCOTP_CTRL_ERROR, &ocotp_regs->hw_ocotp_ctrl_clr); in mxs_ocotp_clear_error()
63 &ocotp_regs->hw_ocotp_ctrl_set); in mxs_ocotp_read_bank_open()
74 &ocotp_regs->hw_ocotp_ctrl_clr); in mxs_ocotp_read_bank_open()
91 scale_val = readl(&power_regs->hw_power_vddioctrl); in mxs_ocotp_scale_vddio()
100 * most designs due to load etc., so we play safe. Undervolt in mxs_ocotp_scale_vddio()
105 clrsetbits_le32(&power_regs->hw_power_vddioctrl, in mxs_ocotp_scale_vddio()
106 POWER_VDDIOCTRL_TRG_MASK, --scale_val); in mxs_ocotp_scale_vddio()
112 clrsetbits_le32(&power_regs->hw_power_vddioctrl, in mxs_ocotp_scale_vddio()
125 while (--timeout) { in mxs_ocotp_wait_hclk_ready()
126 reg = readl(&clkctrl_regs->hw_clkctrl_hbus); in mxs_ocotp_wait_hclk_ready()
132 return -EINVAL; in mxs_ocotp_wait_hclk_ready()
148 &clkctrl_regs->hw_clkctrl_clkseq_set); in mxs_ocotp_scale_hclk()
152 *val = readl(&clkctrl_regs->hw_clkctrl_hbus); in mxs_ocotp_scale_hclk()
166 &clkctrl_regs->hw_clkctrl_hbus_set); in mxs_ocotp_scale_hclk()
168 &clkctrl_regs->hw_clkctrl_hbus_clr); in mxs_ocotp_scale_hclk()
178 &clkctrl_regs->hw_clkctrl_clkseq_clr); in mxs_ocotp_scale_hclk()
209 goto fail; in mxs_ocotp_write_fuse()
213 writel(addr | OCOTP_CTRL_WR_UNLOCK_KEY, &ocotp_regs->hw_ocotp_ctrl); in mxs_ocotp_write_fuse()
216 writel(mask, &ocotp_regs->hw_ocotp_data); in mxs_ocotp_write_fuse()
223 goto fail; in mxs_ocotp_write_fuse()
227 if (readl(&ocotp_regs->hw_ocotp_ctrl) & OCOTP_CTRL_ERROR) { in mxs_ocotp_write_fuse()
229 ret = -EPERM; in mxs_ocotp_write_fuse()
230 goto fail; in mxs_ocotp_write_fuse()
233 fail: in mxs_ocotp_write_fuse()
246 reg = ((uint32_t)&ocotp_regs->hw_ocotp_cust0) + (reg << 4); in mxs_ocotp_read_fuse()
276 return -EINVAL; in mxs_ocotp_valid()
278 return -EINVAL; in mxs_ocotp_valid()
309 /* We do not support sensing :-( */ in fuse_sense()
310 return -EINVAL; in fuse_sense()
315 /* We do not support overriding :-( */ in fuse_override()
316 return -EINVAL; in fuse_override()