diff options
Diffstat (limited to 'drivers/rng')
-rw-r--r-- | drivers/rng/meson-rng.c | 12 | ||||
-rw-r--r-- | drivers/rng/rockchip_rng.c | 14 | ||||
-rw-r--r-- | drivers/rng/stm32mp1_rng.c | 16 |
3 files changed, 21 insertions, 21 deletions
diff --git a/drivers/rng/meson-rng.c b/drivers/rng/meson-rng.c index bebfce40a63..5a4f45ad5af 100644 --- a/drivers/rng/meson-rng.c +++ b/drivers/rng/meson-rng.c @@ -11,7 +11,7 @@ #include <rng.h> #include <asm/io.h> -struct meson_rng_platdata { +struct meson_rng_plat { fdt_addr_t base; struct clk clk; }; @@ -26,7 +26,7 @@ struct meson_rng_platdata { */ static int meson_rng_read(struct udevice *dev, void *data, size_t len) { - struct meson_rng_platdata *pdata = dev_get_plat(dev); + struct meson_rng_plat *pdata = dev_get_plat(dev); char *buffer = (char *)data; while (len) { @@ -52,7 +52,7 @@ static int meson_rng_read(struct udevice *dev, void *data, size_t len) */ static int meson_rng_probe(struct udevice *dev) { - struct meson_rng_platdata *pdata = dev_get_plat(dev); + struct meson_rng_plat *pdata = dev_get_plat(dev); int err; err = clk_enable(&pdata->clk); @@ -70,7 +70,7 @@ static int meson_rng_probe(struct udevice *dev) */ static int meson_rng_remove(struct udevice *dev) { - struct meson_rng_platdata *pdata = dev_get_plat(dev); + struct meson_rng_plat *pdata = dev_get_plat(dev); return clk_disable(&pdata->clk); } @@ -83,7 +83,7 @@ static int meson_rng_remove(struct udevice *dev) */ static int meson_rng_of_to_plat(struct udevice *dev) { - struct meson_rng_platdata *pdata = dev_get_plat(dev); + struct meson_rng_plat *pdata = dev_get_plat(dev); int err; pdata->base = dev_read_addr(dev); @@ -116,6 +116,6 @@ U_BOOT_DRIVER(meson_rng) = { .ops = &meson_rng_ops, .probe = meson_rng_probe, .remove = meson_rng_remove, - .plat_auto = sizeof(struct meson_rng_platdata), + .plat_auto = sizeof(struct meson_rng_plat), .of_to_plat = meson_rng_of_to_plat, }; diff --git a/drivers/rng/rockchip_rng.c b/drivers/rng/rockchip_rng.c index ec233d13211..800150f1147 100644 --- a/drivers/rng/rockchip_rng.c +++ b/drivers/rng/rockchip_rng.c @@ -49,7 +49,7 @@ struct rk_rng_soc_data { int (*rk_rng_read)(struct udevice *dev, void *data, size_t len); }; -struct rk_rng_platdata { +struct rk_rng_plat { fdt_addr_t base; struct rk_rng_soc_data *soc_data; }; @@ -77,7 +77,7 @@ static int rk_rng_read_regs(fdt_addr_t addr, void *buf, size_t size) static int rk_v1_rng_read(struct udevice *dev, void *data, size_t len) { - struct rk_rng_platdata *pdata = dev_get_priv(dev); + struct rk_rng_plat *pdata = dev_get_priv(dev); u32 reg = 0; int retval; @@ -108,7 +108,7 @@ exit: static int rk_v2_rng_read(struct udevice *dev, void *data, size_t len) { - struct rk_rng_platdata *pdata = dev_get_priv(dev); + struct rk_rng_plat *pdata = dev_get_priv(dev); u32 reg = 0; int retval; @@ -146,7 +146,7 @@ static int rockchip_rng_read(struct udevice *dev, void *data, size_t len) unsigned int i; int ret = -EIO; - struct rk_rng_platdata *pdata = dev_get_priv(dev); + struct rk_rng_plat *pdata = dev_get_priv(dev); if (!len) return 0; @@ -170,7 +170,7 @@ exit: static int rockchip_rng_of_to_plat(struct udevice *dev) { - struct rk_rng_platdata *pdata = dev_get_priv(dev); + struct rk_rng_plat *pdata = dev_get_priv(dev); memset(pdata, 0x00, sizeof(*pdata)); @@ -183,7 +183,7 @@ static int rockchip_rng_of_to_plat(struct udevice *dev) static int rockchip_rng_probe(struct udevice *dev) { - struct rk_rng_platdata *pdata = dev_get_priv(dev); + struct rk_rng_plat *pdata = dev_get_priv(dev); pdata->soc_data = (struct rk_rng_soc_data *)dev_get_driver_data(dev); @@ -221,5 +221,5 @@ U_BOOT_DRIVER(rockchip_rng) = { .ops = &rockchip_rng_ops, .probe = rockchip_rng_probe, .of_to_plat = rockchip_rng_of_to_plat, - .priv_auto = sizeof(struct rk_rng_platdata), + .priv_auto = sizeof(struct rk_rng_plat), }; diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c index 30505ee7fc6..8ea00e3e890 100644 --- a/drivers/rng/stm32mp1_rng.c +++ b/drivers/rng/stm32mp1_rng.c @@ -30,7 +30,7 @@ #define RNG_DR 0x08 -struct stm32_rng_platdata { +struct stm32_rng_plat { fdt_addr_t base; struct clk clk; struct reset_ctl rst; @@ -41,7 +41,7 @@ static int stm32_rng_read(struct udevice *dev, void *data, size_t len) int retval, i; u32 sr, count, reg; size_t increment; - struct stm32_rng_platdata *pdata = dev_get_plat(dev); + struct stm32_rng_plat *pdata = dev_get_plat(dev); while (len > 0) { retval = readl_poll_timeout(pdata->base + RNG_SR, sr, @@ -80,7 +80,7 @@ static int stm32_rng_read(struct udevice *dev, void *data, size_t len) return 0; } -static int stm32_rng_init(struct stm32_rng_platdata *pdata) +static int stm32_rng_init(struct stm32_rng_plat *pdata) { int err; @@ -97,7 +97,7 @@ static int stm32_rng_init(struct stm32_rng_platdata *pdata) return 0; } -static int stm32_rng_cleanup(struct stm32_rng_platdata *pdata) +static int stm32_rng_cleanup(struct stm32_rng_plat *pdata) { writel(0, pdata->base + RNG_CR); @@ -106,7 +106,7 @@ static int stm32_rng_cleanup(struct stm32_rng_platdata *pdata) static int stm32_rng_probe(struct udevice *dev) { - struct stm32_rng_platdata *pdata = dev_get_plat(dev); + struct stm32_rng_plat *pdata = dev_get_plat(dev); reset_assert(&pdata->rst); udelay(20); @@ -117,14 +117,14 @@ static int stm32_rng_probe(struct udevice *dev) static int stm32_rng_remove(struct udevice *dev) { - struct stm32_rng_platdata *pdata = dev_get_plat(dev); + struct stm32_rng_plat *pdata = dev_get_plat(dev); return stm32_rng_cleanup(pdata); } static int stm32_rng_of_to_plat(struct udevice *dev) { - struct stm32_rng_platdata *pdata = dev_get_plat(dev); + struct stm32_rng_plat *pdata = dev_get_plat(dev); int err; pdata->base = dev_read_addr(dev); @@ -160,6 +160,6 @@ U_BOOT_DRIVER(stm32_rng) = { .ops = &stm32_rng_ops, .probe = stm32_rng_probe, .remove = stm32_rng_remove, - .plat_auto = sizeof(struct stm32_rng_platdata), + .plat_auto = sizeof(struct stm32_rng_plat), .of_to_plat = stm32_rng_of_to_plat, }; |