Lines Matching refs:mem
32 void __iomem *mem; member
43 if (readl(trng->mem + STATUS_REG) == TRNG_NEW_RAND_AVAILABLE) { in xiphera_trng_read()
44 *(u32 *)buf = readl(trng->mem + RAND_REG); in xiphera_trng_read()
49 writel(HOST_TO_TRNG_READ, trng->mem + CONTROL_REG); in xiphera_trng_read()
50 writel(HOST_TO_TRNG_ENABLE, trng->mem + CONTROL_REG); in xiphera_trng_read()
71 trng->mem = devm_platform_ioremap_resource(pdev, 0); in xiphera_trng_probe()
72 if (IS_ERR(trng->mem)) in xiphera_trng_probe()
73 return PTR_ERR(trng->mem); in xiphera_trng_probe()
79 writel(HOST_TO_TRNG_RESET, trng->mem + CONTROL_REG); in xiphera_trng_probe()
82 if (readl(trng->mem + STATUS_REG) != TRNG_ACK_RESET) { in xiphera_trng_probe()
88 if (readl(trng->mem + STATUS_REG) != TRNG_ACK_RESET) { in xiphera_trng_probe()
98 writel(HOST_TO_TRNG_RELEASE_RESET, trng->mem + CONTROL_REG); in xiphera_trng_probe()
99 writel(HOST_TO_TRNG_ENABLE, trng->mem + CONTROL_REG); in xiphera_trng_probe()
100 writel(HOST_TO_TRNG_ZEROIZE, trng->mem + CONTROL_REG); in xiphera_trng_probe()
103 if (readl(trng->mem + STATUS_REG) != TRNG_SUCCESSFUL_STARTUP) { in xiphera_trng_probe()
105 if (readl(trng->mem + STATUS_REG) == TRNG_FAILED_STARTUP) { in xiphera_trng_probe()
113 writel(HOST_TO_TRNG_ACK_ZEROIZE, trng->mem + CONTROL_REG); in xiphera_trng_probe()