Home
last modified time | relevance | path

Searched refs:reset_ctl (Results 1 – 25 of 70) sorted by relevance

123

/openbmc/u-boot/include/
H A Dreset.h55 struct reset_ctl { struct
78 struct reset_ctl *resets; argument
100 struct reset_ctl *reset_ctl);
135 struct reset_ctl *reset_ctl);
144 int reset_request(struct reset_ctl *reset_ctl);
153 int reset_free(struct reset_ctl *reset_ctl);
167 int reset_assert(struct reset_ctl *reset_ctl);
195 int reset_deassert(struct reset_ctl *reset_ctl);
218 int reset_status(struct reset_ctl *reset_ctl);
231 int reset_release_all(struct reset_ctl *reset_ctl, int count);
[all …]
H A Dreset-uclass.h39 int (*of_xlate)(struct reset_ctl *reset_ctl,
52 int (*request)(struct reset_ctl *reset_ctl);
61 int (*free)(struct reset_ctl *reset_ctl);
71 int (*rst_assert)(struct reset_ctl *reset_ctl);
78 int (*rst_deassert)(struct reset_ctl *reset_ctl);
86 int (*rst_status)(struct reset_ctl *reset_ctl);
/openbmc/u-boot/drivers/reset/
H A Dreset-uclass.c17 static int reset_of_xlate_default(struct reset_ctl *reset_ctl, in reset_of_xlate_default() argument
20 debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); in reset_of_xlate_default()
27 reset_ctl->id = args->args[0]; in reset_of_xlate_default()
33 struct reset_ctl *reset_ctl) in reset_get_by_index() argument
41 reset_ctl); in reset_get_by_index()
42 reset_ctl->dev = NULL; in reset_get_by_index()
62 reset_ctl->dev = dev_reset; in reset_get_by_index()
64 ret = ops->of_xlate(reset_ctl, &args); in reset_get_by_index()
66 ret = reset_of_xlate_default(reset_ctl, &args); in reset_get_by_index()
72 ret = ops->request(reset_ctl); in reset_get_by_index()
[all …]
H A Dtegra186-reset.c12 static int tegra186_reset_request(struct reset_ctl *reset_ctl) in tegra186_reset_request() argument
14 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in tegra186_reset_request()
15 reset_ctl->dev, reset_ctl->id); in tegra186_reset_request()
20 static int tegra186_reset_free(struct reset_ctl *reset_ctl) in tegra186_reset_free() argument
22 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in tegra186_reset_free()
23 reset_ctl->dev, reset_ctl->id); in tegra186_reset_free()
28 static int tegra186_reset_common(struct reset_ctl *reset_ctl, in tegra186_reset_common() argument
35 req.reset_id = reset_ctl->id; in tegra186_reset_common()
37 ret = misc_call(reset_ctl->dev->parent, MRQ_RESET, &req, sizeof(req), in tegra186_reset_common()
45 static int tegra186_reset_assert(struct reset_ctl *reset_ctl) in tegra186_reset_assert() argument
[all …]
H A Dtegra-car-reset.c12 static int tegra_car_reset_request(struct reset_ctl *reset_ctl) in tegra_car_reset_request() argument
14 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in tegra_car_reset_request()
15 reset_ctl->dev, reset_ctl->id); in tegra_car_reset_request()
18 if (reset_ctl->id >= PERIPH_ID_COUNT) in tegra_car_reset_request()
24 static int tegra_car_reset_free(struct reset_ctl *reset_ctl) in tegra_car_reset_free() argument
26 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in tegra_car_reset_free()
27 reset_ctl->dev, reset_ctl->id); in tegra_car_reset_free()
32 static int tegra_car_reset_assert(struct reset_ctl *reset_ctl) in tegra_car_reset_assert() argument
34 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in tegra_car_reset_assert()
35 reset_ctl->dev, reset_ctl->id); in tegra_car_reset_assert()
[all …]
H A Dreset-rockchip.c26 static int rockchip_reset_request(struct reset_ctl *reset_ctl) in rockchip_reset_request() argument
28 struct rockchip_reset_priv *priv = dev_get_priv(reset_ctl->dev); in rockchip_reset_request()
31 reset_ctl, reset_ctl->dev, reset_ctl->id, priv->reset_reg_num); in rockchip_reset_request()
33 if (reset_ctl->id / ROCKCHIP_RESET_NUM_IN_REG >= priv->reset_reg_num) in rockchip_reset_request()
39 static int rockchip_reset_free(struct reset_ctl *reset_ctl) in rockchip_reset_free() argument
41 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in rockchip_reset_free()
42 reset_ctl->dev, reset_ctl->id); in rockchip_reset_free()
47 static int rockchip_reset_assert(struct reset_ctl *reset_ctl) in rockchip_reset_assert() argument
49 struct rockchip_reset_priv *priv = dev_get_priv(reset_ctl->dev); in rockchip_reset_assert()
50 int bank = reset_ctl->id / ROCKCHIP_RESET_NUM_IN_REG; in rockchip_reset_assert()
[all …]
H A Dreset-sunxi.c28 static int sunxi_reset_request(struct reset_ctl *reset_ctl) in sunxi_reset_request() argument
30 struct sunxi_reset_priv *priv = dev_get_priv(reset_ctl->dev); in sunxi_reset_request()
32 debug("%s: (RST#%ld)\n", __func__, reset_ctl->id); in sunxi_reset_request()
34 if (reset_ctl->id >= priv->count) in sunxi_reset_request()
40 static int sunxi_reset_free(struct reset_ctl *reset_ctl) in sunxi_reset_free() argument
42 debug("%s: (RST#%ld)\n", __func__, reset_ctl->id); in sunxi_reset_free()
47 static int sunxi_set_reset(struct reset_ctl *reset_ctl, bool on) in sunxi_set_reset() argument
49 struct sunxi_reset_priv *priv = dev_get_priv(reset_ctl->dev); in sunxi_set_reset()
50 const struct ccu_reset *reset = priv_to_reset(priv, reset_ctl->id); in sunxi_set_reset()
54 printf("%s: (RST#%ld) unhandled\n", __func__, reset_ctl->id); in sunxi_set_reset()
[all …]
H A Dstm32-reset.c21 static int stm32_reset_request(struct reset_ctl *reset_ctl) in stm32_reset_request() argument
26 static int stm32_reset_free(struct reset_ctl *reset_ctl) in stm32_reset_free() argument
31 static int stm32_reset_assert(struct reset_ctl *reset_ctl) in stm32_reset_assert() argument
33 struct stm32_reset_priv *priv = dev_get_priv(reset_ctl->dev); in stm32_reset_assert()
34 int bank = (reset_ctl->id / BITS_PER_LONG) * 4; in stm32_reset_assert()
35 int offset = reset_ctl->id % BITS_PER_LONG; in stm32_reset_assert()
37 reset_ctl->id, bank, offset); in stm32_reset_assert()
39 if (dev_get_driver_data(reset_ctl->dev) == STM32MP1) in stm32_reset_assert()
48 static int stm32_reset_deassert(struct reset_ctl *reset_ctl) in stm32_reset_deassert() argument
50 struct stm32_reset_priv *priv = dev_get_priv(reset_ctl->dev); in stm32_reset_deassert()
[all …]
H A Dreset-socfpga.c30 static int socfpga_reset_assert(struct reset_ctl *reset_ctl) in socfpga_reset_assert() argument
32 struct socfpga_reset_data *data = dev_get_priv(reset_ctl->dev); in socfpga_reset_assert()
33 int id = reset_ctl->id; in socfpga_reset_assert()
42 static int socfpga_reset_deassert(struct reset_ctl *reset_ctl) in socfpga_reset_deassert() argument
44 struct socfpga_reset_data *data = dev_get_priv(reset_ctl->dev); in socfpga_reset_deassert()
45 int id = reset_ctl->id; in socfpga_reset_deassert()
54 static int socfpga_reset_request(struct reset_ctl *reset_ctl) in socfpga_reset_request() argument
57 reset_ctl, reset_ctl->dev, reset_ctl->id); in socfpga_reset_request()
62 static int socfpga_reset_free(struct reset_ctl *reset_ctl) in socfpga_reset_free() argument
64 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in socfpga_reset_free()
[all …]
H A Dsandbox-reset.c22 static int sandbox_reset_request(struct reset_ctl *reset_ctl) in sandbox_reset_request() argument
24 debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); in sandbox_reset_request()
26 if (reset_ctl->id >= SANDBOX_RESET_SIGNALS) in sandbox_reset_request()
32 static int sandbox_reset_free(struct reset_ctl *reset_ctl) in sandbox_reset_free() argument
34 debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); in sandbox_reset_free()
39 static int sandbox_reset_assert(struct reset_ctl *reset_ctl) in sandbox_reset_assert() argument
41 struct sandbox_reset *sbr = dev_get_priv(reset_ctl->dev); in sandbox_reset_assert()
43 debug("%s(reset_ctl=%p)\n", __func__, reset_ctl); in sandbox_reset_assert()
45 sbr->signals[reset_ctl->id].asserted = true; in sandbox_reset_assert()
50 static int sandbox_reset_deassert(struct reset_ctl *reset_ctl) in sandbox_reset_deassert() argument
[all …]
H A Dreset-meson.c22 static int meson_reset_request(struct reset_ctl *reset_ctl) in meson_reset_request() argument
24 if (reset_ctl->id > (REG_COUNT * BITS_PER_REG)) in meson_reset_request()
30 static int meson_reset_free(struct reset_ctl *reset_ctl) in meson_reset_free() argument
35 static int meson_reset_level(struct reset_ctl *reset_ctl, bool assert) in meson_reset_level() argument
37 struct meson_reset_priv *priv = dev_get_priv(reset_ctl->dev); in meson_reset_level()
38 uint bank = reset_ctl->id / BITS_PER_REG; in meson_reset_level()
39 uint offset = reset_ctl->id % BITS_PER_REG; in meson_reset_level()
53 static int meson_reset_assert(struct reset_ctl *reset_ctl) in meson_reset_assert() argument
55 return meson_reset_level(reset_ctl, true); in meson_reset_assert()
58 static int meson_reset_deassert(struct reset_ctl *reset_ctl) in meson_reset_deassert() argument
[all …]
H A Dsti-reset.c223 static int sti_reset_program_hw(struct reset_ctl *reset_ctl, int assert) in sti_reset_program_hw() argument
225 struct udevice *dev = reset_ctl->dev; in sti_reset_program_hw()
234 if (reset_ctl->id >= reset_desc->nr_channels) in sti_reset_program_hw()
238 base = sti_reset_get_regmap(reset_desc->channels[reset_ctl->id].compatible); in sti_reset_program_hw()
240 ch = &reset_desc->channels[reset_ctl->id]; in sti_reset_program_hw()
254 reset_ctl, reset_ctl->dev, reset_ctl->id); in sti_reset_program_hw()
271 reset_ctl, reset_ctl->dev, reset_ctl->id); in sti_reset_program_hw()
279 static int sti_reset_request(struct reset_ctl *reset_ctl) in sti_reset_request() argument
284 static int sti_reset_free(struct reset_ctl *reset_ctl) in sti_reset_free() argument
289 static int sti_reset_assert(struct reset_ctl *reset_ctl) in sti_reset_assert() argument
[all …]
H A Dreset-mediatek.c22 static int mediatek_reset_request(struct reset_ctl *reset_ctl) in mediatek_reset_request() argument
27 static int mediatek_reset_free(struct reset_ctl *reset_ctl) in mediatek_reset_free() argument
32 static int mediatek_reset_assert(struct reset_ctl *reset_ctl) in mediatek_reset_assert() argument
34 struct mediatek_reset_priv *priv = dev_get_priv(reset_ctl->dev); in mediatek_reset_assert()
35 int id = reset_ctl->id; in mediatek_reset_assert()
44 static int mediatek_reset_deassert(struct reset_ctl *reset_ctl) in mediatek_reset_deassert() argument
46 struct mediatek_reset_priv *priv = dev_get_priv(reset_ctl->dev); in mediatek_reset_deassert()
47 int id = reset_ctl->id; in mediatek_reset_deassert()
H A Dreset-uniphier.c181 static int uniphier_reset_request(struct reset_ctl *reset_ctl) in uniphier_reset_request() argument
186 static int uniphier_reset_free(struct reset_ctl *reset_ctl) in uniphier_reset_free() argument
191 static int uniphier_reset_update(struct reset_ctl *reset_ctl, int assert) in uniphier_reset_update() argument
193 struct uniphier_reset_priv *priv = dev_get_priv(reset_ctl->dev); in uniphier_reset_update()
194 unsigned long id = reset_ctl->id; in uniphier_reset_update()
220 dev_err(reset_ctl->dev, "reset_id=%lu was not handled\n", id); in uniphier_reset_update()
225 static int uniphier_reset_assert(struct reset_ctl *reset_ctl) in uniphier_reset_assert() argument
227 return uniphier_reset_update(reset_ctl, 1); in uniphier_reset_assert()
230 static int uniphier_reset_deassert(struct reset_ctl *reset_ctl) in uniphier_reset_deassert() argument
232 return uniphier_reset_update(reset_ctl, 0); in uniphier_reset_deassert()
H A Dreset-ti-sci.c42 static int ti_sci_reset_of_xlate(struct reset_ctl *rst, in ti_sci_reset_of_xlate()
62 static int ti_sci_reset_request(struct reset_ctl *rst) in ti_sci_reset_request()
68 static int ti_sci_reset_free(struct reset_ctl *rst) in ti_sci_reset_free()
89 static int ti_sci_reset_set(struct reset_ctl *rst, bool assert) in ti_sci_reset_set()
130 static int ti_sci_reset_assert(struct reset_ctl *rst) in ti_sci_reset_assert()
147 static int ti_sci_reset_deassert(struct reset_ctl *rst) in ti_sci_reset_deassert()
165 static int ti_sci_reset_status(struct reset_ctl *rst) in ti_sci_reset_status()
H A Dreset-bcm6345.c21 static int bcm6345_reset_assert(struct reset_ctl *rst) in bcm6345_reset_assert()
31 static int bcm6345_reset_deassert(struct reset_ctl *rst) in bcm6345_reset_deassert()
41 static int bcm6345_reset_free(struct reset_ctl *rst) in bcm6345_reset_free()
46 static int bcm6345_reset_request(struct reset_ctl *rst) in bcm6345_reset_request()
/openbmc/u-boot/drivers/reset/aspeed/
H A Dreset-ast2500.c21 static int ast2500_reset_deassert(struct reset_ctl *reset_ctl) in ast2500_reset_deassert() argument
23 struct ast2500_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2500_reset_deassert()
27 debug("ast2500_reset_deassert reset_ctl->id %ld \n", reset_ctl->id); in ast2500_reset_deassert()
29 if(reset_ctl->id >= 32) in ast2500_reset_deassert()
30 clrbits_le32(&scu->sysreset_ctrl2 , BIT(reset_ctl->id - 32)); in ast2500_reset_deassert()
32 clrbits_le32(&scu->sysreset_ctrl1 , BIT(reset_ctl->id)); in ast2500_reset_deassert()
37 static int ast2500_reset_assert(struct reset_ctl *reset_ctl) in ast2500_reset_assert() argument
39 struct ast2500_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2500_reset_assert()
45 debug("ast2500_reset_assert reset_ctl->id %ld \n", reset_ctl->id); in ast2500_reset_assert()
51 reset_mode = ast_reset_mode_from_flags(reset_ctl->id); in ast2500_reset_assert()
[all …]
H A Dreset-ast2600.c21 static int ast2600_reset_deassert(struct reset_ctl *reset_ctl) in ast2600_reset_deassert() argument
23 struct ast2600_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2600_reset_deassert()
26 debug("ast2600_reset_assert reset_ctl->id %ld \n", reset_ctl->id); in ast2600_reset_deassert()
28 if(reset_ctl->id >= 32) in ast2600_reset_deassert()
29 writel(BIT(reset_ctl->id - 32), &scu->sysreset_clr_ctrl2); in ast2600_reset_deassert()
31 writel(BIT(reset_ctl->id), &scu->sysreset_clr_ctrl1); in ast2600_reset_deassert()
36 static int ast2600_reset_assert(struct reset_ctl *reset_ctl) in ast2600_reset_assert() argument
38 struct ast2600_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2600_reset_assert()
41 debug("ast2600_reset_assert reset_ctl->id %ld \n", reset_ctl->id); in ast2600_reset_assert()
43 if(reset_ctl->id >= 32) in ast2600_reset_assert()
[all …]
H A Dreset-ast2400.c18 static int ast2400_reset_deassert(struct reset_ctl *reset_ctl) in ast2400_reset_deassert() argument
20 struct ast2400_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2400_reset_deassert()
24 debug("ast2400_reset_deassert reset_ctl->id %ld \n", reset_ctl->id); in ast2400_reset_deassert()
25 clrbits_le32(&scu->sysreset_ctrl1 , BIT(reset_ctl->id)); in ast2400_reset_deassert()
30 static int ast2400_reset_assert(struct reset_ctl *reset_ctl) in ast2400_reset_assert() argument
32 struct ast2400_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2400_reset_assert()
38 debug("ast2400_reset_assert reset_ctl->id %ld \n", reset_ctl->id); in ast2400_reset_assert()
39 setbits_le32(&scu->sysreset_ctrl1 , BIT(reset_ctl->id)); in ast2400_reset_assert()
45 static int ast2400_reset_request(struct reset_ctl *reset_ctl) in ast2400_reset_request() argument
47 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in ast2400_reset_request()
[all …]
/openbmc/linux/drivers/gpu/drm/amd/amdgpu/
H A Dsmu_v13_0_10.c32 static bool smu_v13_0_10_is_mode2_default(struct amdgpu_reset_control *reset_ctl) in smu_v13_0_10_is_mode2_default() argument
34 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in smu_v13_0_10_is_mode2_default()
42 smu_v13_0_10_get_reset_handler(struct amdgpu_reset_control *reset_ctl, in smu_v13_0_10_get_reset_handler() argument
46 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in smu_v13_0_10_get_reset_handler()
49 list_for_each_entry(handler, &reset_ctl->reset_handlers, in smu_v13_0_10_get_reset_handler()
56 if (smu_v13_0_10_is_mode2_default(reset_ctl) && in smu_v13_0_10_get_reset_handler()
58 list_for_each_entry (handler, &reset_ctl->reset_handlers, in smu_v13_0_10_get_reset_handler()
99 smu_v13_0_10_mode2_prepare_hwcontext(struct amdgpu_reset_control *reset_ctl, in smu_v13_0_10_mode2_prepare_hwcontext() argument
103 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in smu_v13_0_10_mode2_prepare_hwcontext()
119 struct amdgpu_reset_control *reset_ctl = in smu_v13_0_10_async_reset() local
[all …]
H A Dsienna_cichlid.c34 static bool sienna_cichlid_is_mode2_default(struct amdgpu_reset_control *reset_ctl) in sienna_cichlid_is_mode2_default() argument
37 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in sienna_cichlid_is_mode2_default()
47 sienna_cichlid_get_reset_handler(struct amdgpu_reset_control *reset_ctl, in sienna_cichlid_get_reset_handler() argument
53 list_for_each_entry(handler, &reset_ctl->reset_handlers, in sienna_cichlid_get_reset_handler()
60 if (sienna_cichlid_is_mode2_default(reset_ctl)) { in sienna_cichlid_get_reset_handler()
61 list_for_each_entry (handler, &reset_ctl->reset_handlers, in sienna_cichlid_get_reset_handler()
100 sienna_cichlid_mode2_prepare_hwcontext(struct amdgpu_reset_control *reset_ctl, in sienna_cichlid_mode2_prepare_hwcontext() argument
104 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in sienna_cichlid_mode2_prepare_hwcontext()
120 struct amdgpu_reset_control *reset_ctl = in sienna_cichlid_async_reset() local
122 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in sienna_cichlid_async_reset()
[all …]
H A Daldebaran.c34 static bool aldebaran_is_mode2_default(struct amdgpu_reset_control *reset_ctl) in aldebaran_is_mode2_default() argument
36 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in aldebaran_is_mode2_default()
46 aldebaran_get_reset_handler(struct amdgpu_reset_control *reset_ctl, in aldebaran_get_reset_handler() argument
50 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in aldebaran_get_reset_handler()
55 list_for_each_entry(handler, &reset_ctl->reset_handlers, in aldebaran_get_reset_handler()
62 if (aldebaran_is_mode2_default(reset_ctl)) { in aldebaran_get_reset_handler()
63 list_for_each_entry(handler, &reset_ctl->reset_handlers, in aldebaran_get_reset_handler()
107 aldebaran_mode2_prepare_hwcontext(struct amdgpu_reset_control *reset_ctl, in aldebaran_mode2_prepare_hwcontext() argument
111 struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle; in aldebaran_mode2_prepare_hwcontext()
124 struct amdgpu_reset_control *reset_ctl = in aldebaran_async_reset() local
[all …]
H A Damdgpu_reset.h48 int (*prepare_env)(struct amdgpu_reset_control *reset_ctl,
50 int (*prepare_hwcontext)(struct amdgpu_reset_control *reset_ctl,
52 int (*perform_reset)(struct amdgpu_reset_control *reset_ctl,
54 int (*restore_hwcontext)(struct amdgpu_reset_control *reset_ctl,
56 int (*restore_env)(struct amdgpu_reset_control *reset_ctl,
70 struct amdgpu_reset_control *reset_ctl,
100 int amdgpu_reset_add_handler(struct amdgpu_reset_control *reset_ctl,
/openbmc/u-boot/drivers/pci/
H A Daspeed_pcie_phy.c60 struct reset_ctl reset_ctl; in aspeed_pcie_phy_probe() local
66 ret = reset_get_by_index(dev, 0, &reset_ctl); in aspeed_pcie_phy_probe()
74 reset_assert(&reset_ctl); in aspeed_pcie_phy_probe()
/openbmc/u-boot/drivers/net/
H A Daspeed_mdio.c181 struct reset_ctl reset_ctl; in aspeed_mdio_probe() local
186 ret = reset_get_by_index(dev, 0, &reset_ctl); in aspeed_mdio_probe()
193 reset_assert(&reset_ctl); in aspeed_mdio_probe()
194 reset_deassert(&reset_ctl); in aspeed_mdio_probe()

123