• Home
  • Raw
  • Download

Lines Matching refs:efuse

58 	struct rockchip_efuse_chip *efuse = context;  in rockchip_rk3288_efuse_read()  local
62 ret = clk_prepare_enable(efuse->clk); in rockchip_rk3288_efuse_read()
64 dev_err(efuse->dev, "failed to prepare/enable efuse clk\n"); in rockchip_rk3288_efuse_read()
68 writel(RK3288_LOAD | RK3288_PGENB, efuse->base + REG_EFUSE_CTRL); in rockchip_rk3288_efuse_read()
71 writel(readl(efuse->base + REG_EFUSE_CTRL) & in rockchip_rk3288_efuse_read()
73 efuse->base + REG_EFUSE_CTRL); in rockchip_rk3288_efuse_read()
74 writel(readl(efuse->base + REG_EFUSE_CTRL) | in rockchip_rk3288_efuse_read()
76 efuse->base + REG_EFUSE_CTRL); in rockchip_rk3288_efuse_read()
78 writel(readl(efuse->base + REG_EFUSE_CTRL) | in rockchip_rk3288_efuse_read()
79 RK3288_STROBE, efuse->base + REG_EFUSE_CTRL); in rockchip_rk3288_efuse_read()
81 *buf++ = readb(efuse->base + REG_EFUSE_DOUT); in rockchip_rk3288_efuse_read()
82 writel(readl(efuse->base + REG_EFUSE_CTRL) & in rockchip_rk3288_efuse_read()
83 (~RK3288_STROBE), efuse->base + REG_EFUSE_CTRL); in rockchip_rk3288_efuse_read()
88 writel(RK3288_PGENB | RK3288_CSB, efuse->base + REG_EFUSE_CTRL); in rockchip_rk3288_efuse_read()
90 clk_disable_unprepare(efuse->clk); in rockchip_rk3288_efuse_read()
98 struct rockchip_efuse_chip *efuse = context; in rockchip_rk3328_efuse_read() local
104 ret = clk_prepare_enable(efuse->clk); in rockchip_rk3328_efuse_read()
106 dev_err(efuse->dev, "failed to prepare/enable efuse clk\n"); in rockchip_rk3328_efuse_read()
127 efuse->base + RK3328_AUTO_CTRL); in rockchip_rk3328_efuse_read()
129 status = readl(efuse->base + RK3328_INT_STATUS); in rockchip_rk3328_efuse_read()
134 out_value = readl(efuse->base + RK3328_DOUT); in rockchip_rk3328_efuse_read()
135 writel(RK3328_INT_FINISH, efuse->base + RK3328_INT_STATUS); in rockchip_rk3328_efuse_read()
145 clk_disable_unprepare(efuse->clk); in rockchip_rk3328_efuse_read()
153 struct rockchip_efuse_chip *efuse = context; in rockchip_rk3399_efuse_read() local
159 ret = clk_prepare_enable(efuse->clk); in rockchip_rk3399_efuse_read()
161 dev_err(efuse->dev, "failed to prepare/enable efuse clk\n"); in rockchip_rk3399_efuse_read()
173 clk_disable_unprepare(efuse->clk); in rockchip_rk3399_efuse_read()
178 efuse->base + REG_EFUSE_CTRL); in rockchip_rk3399_efuse_read()
181 writel(readl(efuse->base + REG_EFUSE_CTRL) | RK3399_STROBE | in rockchip_rk3399_efuse_read()
183 efuse->base + REG_EFUSE_CTRL); in rockchip_rk3399_efuse_read()
185 out_value = readl(efuse->base + REG_EFUSE_DOUT); in rockchip_rk3399_efuse_read()
186 writel(readl(efuse->base + REG_EFUSE_CTRL) & (~RK3399_STROBE), in rockchip_rk3399_efuse_read()
187 efuse->base + REG_EFUSE_CTRL); in rockchip_rk3399_efuse_read()
195 writel(RK3399_PD | RK3399_CSB, efuse->base + REG_EFUSE_CTRL); in rockchip_rk3399_efuse_read()
201 clk_disable_unprepare(efuse->clk); in rockchip_rk3399_efuse_read()
255 struct rockchip_efuse_chip *efuse; in rockchip_efuse_probe() local
265 efuse = devm_kzalloc(dev, sizeof(struct rockchip_efuse_chip), in rockchip_efuse_probe()
267 if (!efuse) in rockchip_efuse_probe()
271 efuse->base = devm_ioremap_resource(dev, res); in rockchip_efuse_probe()
272 if (IS_ERR(efuse->base)) in rockchip_efuse_probe()
273 return PTR_ERR(efuse->base); in rockchip_efuse_probe()
275 efuse->clk = devm_clk_get(dev, "pclk_efuse"); in rockchip_efuse_probe()
276 if (IS_ERR(efuse->clk)) in rockchip_efuse_probe()
277 return PTR_ERR(efuse->clk); in rockchip_efuse_probe()
279 efuse->dev = dev; in rockchip_efuse_probe()
284 econfig.priv = efuse; in rockchip_efuse_probe()
285 econfig.dev = efuse->dev; in rockchip_efuse_probe()