Lines Matching refs:sid
43 struct sunxi_sid *sid = context; in sunxi_sid_read() local
45 memcpy_fromio(val, sid->base + sid->value_offset + offset, bytes); in sunxi_sid_read()
50 static int sun8i_sid_register_readout(const struct sunxi_sid *sid, in sun8i_sid_register_readout() argument
61 writel(reg_val, sid->base + SUN8I_SID_PRCTL); in sun8i_sid_register_readout()
63 ret = readl_poll_timeout(sid->base + SUN8I_SID_PRCTL, reg_val, in sun8i_sid_register_readout()
69 *out = readl(sid->base + SUN8I_SID_RDKEY); in sun8i_sid_register_readout()
71 writel(0, sid->base + SUN8I_SID_PRCTL); in sun8i_sid_register_readout()
84 struct sunxi_sid *sid = context; in sun8i_sid_read_by_reg() local
90 ret = sun8i_sid_register_readout(sid, offset, val); in sun8i_sid_read_by_reg()
103 ret = sun8i_sid_register_readout(sid, offset, &word); in sun8i_sid_read_by_reg()
118 struct sunxi_sid *sid; in sunxi_sid_probe() local
123 sid = devm_kzalloc(dev, sizeof(*sid), GFP_KERNEL); in sunxi_sid_probe()
124 if (!sid) in sunxi_sid_probe()
130 sid->value_offset = cfg->value_offset; in sunxi_sid_probe()
133 sid->base = devm_ioremap_resource(dev, res); in sunxi_sid_probe()
134 if (IS_ERR(sid->base)) in sunxi_sid_probe()
135 return PTR_ERR(sid->base); in sunxi_sid_probe()
150 nvmem_cfg->priv = sid; in sunxi_sid_probe()
164 nvmem_cfg->reg_read(sid, 0, randomness, size); in sunxi_sid_probe()