Lines Matching refs:pdata
80 struct rk_rng_plat *pdata = dev_get_priv(dev); in rk_v1_rng_read() local
89 pdata->base + CRYPTO_V1_TRNG_CTRL); in rk_v1_rng_read()
91 rk_clrsetreg(pdata->base + CRYPTO_V1_CTRL, CRYPTO_V1_RNG_START, in rk_v1_rng_read()
94 retval = readl_poll_timeout(pdata->base + CRYPTO_V1_CTRL, reg, in rk_v1_rng_read()
100 rk_rng_read_regs(pdata->base + CRYPTO_V1_TRNG_DOUT_0, data, len); in rk_v1_rng_read()
104 rk_clrreg(pdata->base + CRYPTO_V1_CTRL, CRYPTO_V1_RNG_START); in rk_v1_rng_read()
111 struct rk_rng_plat *pdata = dev_get_priv(dev); in rk_v2_rng_read() local
119 writel(100, pdata->base + CRYPTO_V2_RNG_SAMPLE_CNT); in rk_v2_rng_read()
126 rk_clrsetreg(pdata->base + CRYPTO_V2_RNG_CTL, 0xffff, reg); in rk_v2_rng_read()
128 retval = readl_poll_timeout(pdata->base + CRYPTO_V2_RNG_CTL, reg, in rk_v2_rng_read()
134 rk_rng_read_regs(pdata->base + CRYPTO_V2_RNG_DOUT_0, data, len); in rk_v2_rng_read()
138 rk_clrreg(pdata->base + CRYPTO_V2_RNG_CTL, 0xffff); in rk_v2_rng_read()
149 struct rk_rng_plat *pdata = dev_get_priv(dev); in rockchip_rng_read() local
154 if (!pdata->soc_data || !pdata->soc_data->rk_rng_read) in rockchip_rng_read()
158 ret = pdata->soc_data->rk_rng_read(dev, buf, RK_HW_RNG_MAX); in rockchip_rng_read()
164 ret = pdata->soc_data->rk_rng_read(dev, buf, in rockchip_rng_read()
173 struct rk_rng_plat *pdata = dev_get_priv(dev); in rockchip_rng_of_to_plat() local
175 memset(pdata, 0x00, sizeof(*pdata)); in rockchip_rng_of_to_plat()
177 pdata->base = (fdt_addr_t)dev_read_addr_ptr(dev); in rockchip_rng_of_to_plat()
178 if (!pdata->base) in rockchip_rng_of_to_plat()
186 struct rk_rng_plat *pdata = dev_get_priv(dev); in rockchip_rng_probe() local
188 pdata->soc_data = (struct rk_rng_soc_data *)dev_get_driver_data(dev); in rockchip_rng_probe()