diff options
Diffstat (limited to 'drivers/reset')
-rw-r--r-- | drivers/reset/reset-ast2500.c | 4 | ||||
-rw-r--r-- | drivers/reset/reset-bcm6345.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-hisilicon.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-hsdk.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-imx7.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-ipq4019.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-mediatek.c | 5 | ||||
-rw-r--r-- | drivers/reset/reset-meson.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-mtmips.c | 6 | ||||
-rw-r--r-- | drivers/reset/reset-rockchip.c | 5 | ||||
-rw-r--r-- | drivers/reset/reset-sifive.c | 5 | ||||
-rw-r--r-- | drivers/reset/reset-socfpga.c | 4 | ||||
-rw-r--r-- | drivers/reset/reset-sunxi.c | 5 | ||||
-rw-r--r-- | drivers/reset/reset-syscon.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-ti-sci.c | 2 | ||||
-rw-r--r-- | drivers/reset/reset-uniphier.c | 2 | ||||
-rw-r--r-- | drivers/reset/sandbox-reset-test.c | 2 | ||||
-rw-r--r-- | drivers/reset/sandbox-reset.c | 2 | ||||
-rw-r--r-- | drivers/reset/sti-reset.c | 2 | ||||
-rw-r--r-- | drivers/reset/stm32-reset.c | 2 |
20 files changed, 32 insertions, 28 deletions
diff --git a/drivers/reset/reset-ast2500.c b/drivers/reset/reset-ast2500.c index e7b5c7deca..c3d650fc6b 100644 --- a/drivers/reset/reset-ast2500.c +++ b/drivers/reset/reset-ast2500.c @@ -72,7 +72,7 @@ static int ast2500_reset_probe(struct udevice *dev) /* get SCU base from clock device */ rc = uclass_get_device_by_driver(UCLASS_CLK, - DM_GET_DRIVER(aspeed_ast2500_scu), &scu_dev); + DM_DRIVER_GET(aspeed_ast2500_scu), &scu_dev); if (rc) { debug("%s: clock device not found, rc=%d\n", __func__, rc); return rc; @@ -105,5 +105,5 @@ U_BOOT_DRIVER(ast2500_reset) = { .of_match = ast2500_reset_ids, .probe = ast2500_reset_probe, .ops = &ast2500_reset_ops, - .priv_auto_alloc_size = sizeof(struct ast2500_reset_priv), + .priv_auto = sizeof(struct ast2500_reset_priv), }; diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c index 156703e084..f69189822b 100644 --- a/drivers/reset/reset-bcm6345.c +++ b/drivers/reset/reset-bcm6345.c @@ -84,5 +84,5 @@ U_BOOT_DRIVER(bcm6345_reset) = { .of_match = bcm6345_reset_ids, .ops = &bcm6345_reset_reset_ops, .probe = bcm6345_reset_probe, - .priv_auto_alloc_size = sizeof(struct bcm6345_reset_priv), + .priv_auto = sizeof(struct bcm6345_reset_priv), }; diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c index 139bc5d73e..3f9da8cc8d 100644 --- a/drivers/reset/reset-hisilicon.c +++ b/drivers/reset/reset-hisilicon.c @@ -102,5 +102,5 @@ U_BOOT_DRIVER(hisi_reset) = { .of_match = hisi_reset_ids, .ops = &hisi_reset_reset_ops, .probe = hisi_reset_probe, - .priv_auto_alloc_size = sizeof(struct hisi_reset_priv), + .priv_auto = sizeof(struct hisi_reset_priv), }; diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c index 0c8f276293..8318d0a20b 100644 --- a/drivers/reset/reset-hsdk.c +++ b/drivers/reset/reset-hsdk.c @@ -114,5 +114,5 @@ U_BOOT_DRIVER(hsdk_reset) = { .of_match = hsdk_reset_dt_match, .ops = &hsdk_reset_ops, .probe = hsdk_reset_probe, - .priv_auto_alloc_size = sizeof(struct hsdk_rst), + .priv_auto = sizeof(struct hsdk_rst), }; diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index 96916b644a..e5085ae17c 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -312,5 +312,5 @@ U_BOOT_DRIVER(imx7_reset) = { .of_match = imx7_reset_ids, .ops = &imx7_reset_reset_ops, .probe = imx7_reset_probe, - .priv_auto_alloc_size = sizeof(struct imx7_reset_priv), + .priv_auto = sizeof(struct imx7_reset_priv), }; diff --git a/drivers/reset/reset-ipq4019.c b/drivers/reset/reset-ipq4019.c index f216db4ce5..15858f3cb1 100644 --- a/drivers/reset/reset-ipq4019.c +++ b/drivers/reset/reset-ipq4019.c @@ -169,5 +169,5 @@ U_BOOT_DRIVER(ipq4019_reset) = { .of_match = ipq4019_reset_ids, .ops = &ipq4019_reset_ops, .probe = ipq4019_reset_probe, - .priv_auto_alloc_size = sizeof(struct ipq4019_reset_priv), + .priv_auto = sizeof(struct ipq4019_reset_priv), }; diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c index 97d3d57592..7427013ab6 100644 --- a/drivers/reset/reset-mediatek.c +++ b/drivers/reset/reset-mediatek.c @@ -14,6 +14,7 @@ #include <regmap.h> #include <reset-uclass.h> #include <syscon.h> +#include <dm/device-internal.h> #include <linux/bitops.h> #include <linux/err.h> @@ -92,7 +93,7 @@ int mediatek_reset_bind(struct udevice *pdev, u32 regofs, u32 num_regs) priv = malloc(sizeof(struct mediatek_reset_priv)); priv->regofs = regofs; priv->nr_resets = num_regs * 32; - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } @@ -102,5 +103,5 @@ U_BOOT_DRIVER(mediatek_reset) = { .id = UCLASS_RESET, .probe = mediatek_reset_probe, .ops = &mediatek_reset_ops, - .priv_auto_alloc_size = sizeof(struct mediatek_reset_priv), + .priv_auto = sizeof(struct mediatek_reset_priv), }; diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c index 4e3327898e..d4e0745d0e 100644 --- a/drivers/reset/reset-meson.c +++ b/drivers/reset/reset-meson.c @@ -89,5 +89,5 @@ U_BOOT_DRIVER(meson_reset) = { .of_match = meson_reset_ids, .probe = meson_reset_probe, .ops = &meson_reset_ops, - .priv_auto_alloc_size = sizeof(struct meson_reset_priv), + .priv_auto = sizeof(struct meson_reset_priv), }; diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c index bc20e3335c..848425afbc 100644 --- a/drivers/reset/reset-mtmips.c +++ b/drivers/reset/reset-mtmips.c @@ -58,7 +58,7 @@ static int mtmips_reset_probe(struct udevice *dev) return 0; } -static int mtmips_reset_ofdata_to_platdata(struct udevice *dev) +static int mtmips_reset_of_to_plat(struct udevice *dev) { struct mtmips_reset_priv *priv = dev_get_priv(dev); @@ -78,8 +78,8 @@ U_BOOT_DRIVER(mtmips_reset) = { .name = "mtmips-reset", .id = UCLASS_RESET, .of_match = mtmips_reset_ids, - .ofdata_to_platdata = mtmips_reset_ofdata_to_platdata, + .of_to_plat = mtmips_reset_of_to_plat, .probe = mtmips_reset_probe, - .priv_auto_alloc_size = sizeof(struct mtmips_reset_priv), + .priv_auto = sizeof(struct mtmips_reset_priv), .ops = &mtmips_reset_ops, }; diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c index 8092555650..eeb3d2eea7 100644 --- a/drivers/reset/reset-rockchip.c +++ b/drivers/reset/reset-rockchip.c @@ -11,6 +11,7 @@ #include <linux/bitops.h> #include <linux/io.h> #include <asm/arch-rockchip/hardware.h> +#include <dm/device-internal.h> #include <dm/lists.h> /* * Each reg has 16 bits reset signal for devices @@ -121,7 +122,7 @@ int rockchip_reset_bind(struct udevice *pdev, u32 reg_offset, u32 reg_number) priv = malloc(sizeof(struct rockchip_reset_priv)); priv->reset_reg_offset = reg_offset; priv->reset_reg_num = reg_number; - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } @@ -131,5 +132,5 @@ U_BOOT_DRIVER(rockchip_reset) = { .id = UCLASS_RESET, .probe = rockchip_reset_probe, .ops = &rockchip_reset_ops, - .priv_auto_alloc_size = sizeof(struct rockchip_reset_priv), + .priv_auto = sizeof(struct rockchip_reset_priv), }; diff --git a/drivers/reset/reset-sifive.c b/drivers/reset/reset-sifive.c index 527757f853..eec840d677 100644 --- a/drivers/reset/reset-sifive.c +++ b/drivers/reset/reset-sifive.c @@ -9,6 +9,7 @@ #include <reset-uclass.h> #include <asm/io.h> #include <dm/device_compat.h> +#include <dm/device-internal.h> #include <dm/lists.h> #include <linux/bitops.h> @@ -97,7 +98,7 @@ int sifive_reset_bind(struct udevice *dev, ulong count) } priv = malloc(sizeof(struct sifive_reset_priv)); priv->nr_reset = count; - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } @@ -114,5 +115,5 @@ U_BOOT_DRIVER(sifive_reset) = { .id = UCLASS_RESET, .ops = &sifive_reset_ops, .probe = sifive_reset_probe, - .priv_auto_alloc_size = sizeof(struct sifive_reset_priv), + .priv_auto = sizeof(struct sifive_reset_priv), }; diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 1849db4da9..98450db94b 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -148,7 +148,7 @@ static int socfpga_reset_bind(struct udevice *dev) * Bind it to the node, too, so that it can get its base address. */ ret = device_bind_driver_to_node(dev, "socfpga_sysreset", "sysreset", - dev->node, &sys_child); + dev_ofnode(dev), &sys_child); if (ret) debug("Warning: No sysreset driver: ret=%d\n", ret); @@ -166,7 +166,7 @@ U_BOOT_DRIVER(socfpga_reset) = { .of_match = socfpga_reset_match, .bind = socfpga_reset_bind, .probe = socfpga_reset_probe, - .priv_auto_alloc_size = sizeof(struct socfpga_reset_data), + .priv_auto = sizeof(struct socfpga_reset_data), .ops = &socfpga_reset_ops, .remove = socfpga_reset_remove, .flags = DM_FLAG_OS_PREPARE, diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c index 05f7f599ce..264337ed80 100644 --- a/drivers/reset/reset-sunxi.c +++ b/drivers/reset/reset-sunxi.c @@ -11,6 +11,7 @@ #include <malloc.h> #include <reset-uclass.h> #include <asm/io.h> +#include <dm/device-internal.h> #include <dm/lists.h> #include <linux/bitops.h> #include <linux/log2.h> @@ -113,7 +114,7 @@ int sunxi_reset_bind(struct udevice *dev, ulong count) priv = malloc(sizeof(struct sunxi_reset_priv)); priv->count = count; priv->desc = (const struct ccu_desc *)dev_get_driver_data(dev); - rst_dev->priv = priv; + dev_set_priv(rst_dev, priv); return 0; } @@ -123,5 +124,5 @@ U_BOOT_DRIVER(sunxi_reset) = { .id = UCLASS_RESET, .ops = &sunxi_reset_ops, .probe = sunxi_reset_probe, - .priv_auto_alloc_size = sizeof(struct sunxi_reset_priv), + .priv_auto = sizeof(struct sunxi_reset_priv), }; diff --git a/drivers/reset/reset-syscon.c b/drivers/reset/reset-syscon.c index 8520227d55..ff387ab6b2 100644 --- a/drivers/reset/reset-syscon.c +++ b/drivers/reset/reset-syscon.c @@ -76,6 +76,6 @@ U_BOOT_DRIVER(syscon_reset) = { .id = UCLASS_RESET, .of_match = syscon_reset_ids, .probe = syscon_reset_probe, - .priv_auto_alloc_size = sizeof(struct syscon_reset_priv), + .priv_auto = sizeof(struct syscon_reset_priv), .ops = &syscon_reset_ops, }; diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c index 95cd388587..d8510a4abb 100644 --- a/drivers/reset/reset-ti-sci.c +++ b/drivers/reset/reset-ti-sci.c @@ -205,6 +205,6 @@ U_BOOT_DRIVER(ti_sci_reset) = { .id = UCLASS_RESET, .of_match = ti_sci_reset_of_match, .probe = ti_sci_reset_probe, - .priv_auto_alloc_size = sizeof(struct ti_sci_reset_data), + .priv_auto = sizeof(struct ti_sci_reset_data), .ops = &ti_sci_reset_ops, }; diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c index fe1bd5541b..2694d130b6 100644 --- a/drivers/reset/reset-uniphier.c +++ b/drivers/reset/reset-uniphier.c @@ -372,6 +372,6 @@ U_BOOT_DRIVER(uniphier_reset) = { .id = UCLASS_RESET, .of_match = uniphier_reset_match, .probe = uniphier_reset_probe, - .priv_auto_alloc_size = sizeof(struct uniphier_reset_priv), + .priv_auto = sizeof(struct uniphier_reset_priv), .ops = &uniphier_reset_ops, }; diff --git a/drivers/reset/sandbox-reset-test.c b/drivers/reset/sandbox-reset-test.c index 10e02f1036..51b79810c8 100644 --- a/drivers/reset/sandbox-reset-test.c +++ b/drivers/reset/sandbox-reset-test.c @@ -120,5 +120,5 @@ U_BOOT_DRIVER(sandbox_reset_test) = { .name = "sandbox_reset_test", .id = UCLASS_MISC, .of_match = sandbox_reset_test_ids, - .priv_auto_alloc_size = sizeof(struct sandbox_reset_test), + .priv_auto = sizeof(struct sandbox_reset_test), }; diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c index 08008d875a..97b1b92e4a 100644 --- a/drivers/reset/sandbox-reset.c +++ b/drivers/reset/sandbox-reset.c @@ -99,7 +99,7 @@ U_BOOT_DRIVER(sandbox_reset) = { .of_match = sandbox_reset_ids, .bind = sandbox_reset_bind, .probe = sandbox_reset_probe, - .priv_auto_alloc_size = sizeof(struct sandbox_reset), + .priv_auto = sizeof(struct sandbox_reset), .ops = &sandbox_reset_reset_ops, }; diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c index 2cca67dc52..8041490630 100644 --- a/drivers/reset/sti-reset.c +++ b/drivers/reset/sti-reset.c @@ -336,6 +336,6 @@ U_BOOT_DRIVER(sti_reset) = { .id = UCLASS_RESET, .of_match = sti_reset_ids, .probe = sti_reset_probe, - .priv_auto_alloc_size = sizeof(struct sti_reset), + .priv_auto = sizeof(struct sti_reset), .ops = &sti_reset_ops, }; diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c index d8902e9d9c..b84c9daec7 100644 --- a/drivers/reset/stm32-reset.c +++ b/drivers/reset/stm32-reset.c @@ -100,6 +100,6 @@ U_BOOT_DRIVER(stm32_rcc_reset) = { .name = "stm32_rcc_reset", .id = UCLASS_RESET, .probe = stm32_reset_probe, - .priv_auto_alloc_size = sizeof(struct stm32_reset_priv), + .priv_auto = sizeof(struct stm32_reset_priv), .ops = &stm32_reset_ops, }; |