8 #include <linux/module.h>
9 #include <linux/slab.h>
24 #define to_rng_priv(rng) ((struct bcm63xx_rng_priv *)rng->priv)
26 static int bcm63xx_rng_init(
struct hwrng *rng)
38 static void bcm63xx_rng_cleanup(
struct hwrng *rng)
48 static int bcm63xx_rng_data_present(
struct hwrng *rng,
int wait)
55 static int bcm63xx_rng_data_read(
struct hwrng *rng,
u32 *
data)
81 dev_err(&pdev->
dev,
"no memory for private structure\n");
88 dev_err(&pdev->
dev,
"no memory for rng structure\n");
93 platform_set_drvdata(pdev, rng);
96 rng->
init = bcm63xx_rng_init;
97 rng->
cleanup = bcm63xx_rng_cleanup;
111 resource_size(r), pdev->
name)) {
129 dev_err(&pdev->
dev,
"failed to register rng device\n");
130 goto out_clk_disable;
140 platform_set_drvdata(pdev,
NULL);
150 struct hwrng *rng = platform_get_drvdata(pdev);
157 platform_set_drvdata(pdev,
NULL);
163 .probe = bcm63xx_rng_probe,
166 .name =
"bcm63xx-rng",