mxc_rng 64 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); mxc_rng 68 drivers/char/hw_random/mxc-rnga.c int level = (__raw_readl(mxc_rng->mem + RNGA_STATUS) & mxc_rng 81 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); mxc_rng 84 drivers/char/hw_random/mxc-rnga.c *data = __raw_readl(mxc_rng->mem + RNGA_OUTPUT_FIFO); mxc_rng 87 drivers/char/hw_random/mxc-rnga.c err = __raw_readl(mxc_rng->mem + RNGA_STATUS) & RNGA_STATUS_ERROR_INT; mxc_rng 91 drivers/char/hw_random/mxc-rnga.c dev_dbg(mxc_rng->dev, "Error while reading random number!\n"); mxc_rng 92 drivers/char/hw_random/mxc-rnga.c ctrl = __raw_readl(mxc_rng->mem + RNGA_CONTROL); mxc_rng 94 drivers/char/hw_random/mxc-rnga.c mxc_rng->mem + RNGA_CONTROL); mxc_rng 103 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); mxc_rng 106 drivers/char/hw_random/mxc-rnga.c ctrl = __raw_readl(mxc_rng->mem + RNGA_CONTROL); mxc_rng 107 drivers/char/hw_random/mxc-rnga.c __raw_writel(ctrl & ~RNGA_CONTROL_SLEEP, mxc_rng->mem + RNGA_CONTROL); mxc_rng 110 drivers/char/hw_random/mxc-rnga.c osc = __raw_readl(mxc_rng->mem + RNGA_STATUS); mxc_rng 112 drivers/char/hw_random/mxc-rnga.c dev_err(mxc_rng->dev, "RNGA Oscillator is dead!\n"); mxc_rng 117 drivers/char/hw_random/mxc-rnga.c ctrl = __raw_readl(mxc_rng->mem + RNGA_CONTROL); mxc_rng 118 drivers/char/hw_random/mxc-rnga.c __raw_writel(ctrl | RNGA_CONTROL_GO, mxc_rng->mem + RNGA_CONTROL); mxc_rng 126 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); mxc_rng 128 drivers/char/hw_random/mxc-rnga.c ctrl = __raw_readl(mxc_rng->mem + RNGA_CONTROL); mxc_rng 131 drivers/char/hw_random/mxc-rnga.c __raw_writel(ctrl & ~RNGA_CONTROL_GO, mxc_rng->mem + RNGA_CONTROL); mxc_rng 137 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng; mxc_rng 139 drivers/char/hw_random/mxc-rnga.c mxc_rng = devm_kzalloc(&pdev->dev, sizeof(*mxc_rng), GFP_KERNEL); mxc_rng 140 drivers/char/hw_random/mxc-rnga.c if (!mxc_rng) mxc_rng 143 drivers/char/hw_random/mxc-rnga.c mxc_rng->dev = &pdev->dev; mxc_rng 144 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.name = "mxc-rnga"; mxc_rng 145 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.init = mxc_rnga_init; mxc_rng 146 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.cleanup = mxc_rnga_cleanup, mxc_rng 147 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.data_present = mxc_rnga_data_present, mxc_rng 148 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.data_read = mxc_rnga_data_read, mxc_rng 150 drivers/char/hw_random/mxc-rnga.c mxc_rng->clk = devm_clk_get(&pdev->dev, NULL); mxc_rng 151 drivers/char/hw_random/mxc-rnga.c if (IS_ERR(mxc_rng->clk)) { mxc_rng 153 drivers/char/hw_random/mxc-rnga.c return PTR_ERR(mxc_rng->clk); mxc_rng 156 drivers/char/hw_random/mxc-rnga.c err = clk_prepare_enable(mxc_rng->clk); mxc_rng 160 drivers/char/hw_random/mxc-rnga.c mxc_rng->mem = devm_platform_ioremap_resource(pdev, 0); mxc_rng 161 drivers/char/hw_random/mxc-rnga.c if (IS_ERR(mxc_rng->mem)) { mxc_rng 162 drivers/char/hw_random/mxc-rnga.c err = PTR_ERR(mxc_rng->mem); mxc_rng 166 drivers/char/hw_random/mxc-rnga.c err = hwrng_register(&mxc_rng->rng); mxc_rng 175 drivers/char/hw_random/mxc-rnga.c clk_disable_unprepare(mxc_rng->clk); mxc_rng 181 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = platform_get_drvdata(pdev); mxc_rng 183 drivers/char/hw_random/mxc-rnga.c hwrng_unregister(&mxc_rng->rng); mxc_rng 185 drivers/char/hw_random/mxc-rnga.c clk_disable_unprepare(mxc_rng->clk);