Home
last modified time | relevance | path

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

123

/external/u-boot/include/
Dreset.h58 struct reset_ctl { struct
82 struct reset_ctl *resets; argument
104 struct reset_ctl *reset_ctl);
119 struct reset_ctl *reset_ctl);
154 struct reset_ctl *reset_ctl);
163 int reset_request(struct reset_ctl *reset_ctl);
172 int reset_free(struct reset_ctl *reset_ctl);
186 int reset_assert(struct reset_ctl *reset_ctl);
214 int reset_deassert(struct reset_ctl *reset_ctl);
237 int reset_status(struct reset_ctl *reset_ctl);
[all …]
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);
/external/u-boot/drivers/reset/
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()
35 struct reset_ctl *reset_ctl) in reset_get_by_index_tail() argument
40 assert(reset_ctl); in reset_get_by_index_tail()
41 reset_ctl->dev = NULL; in reset_get_by_index_tail()
55 reset_ctl->dev = dev_reset; in reset_get_by_index_tail()
57 ret = ops->of_xlate(reset_ctl, args); in reset_get_by_index_tail()
59 ret = reset_of_xlate_default(reset_ctl, args); in reset_get_by_index_tail()
65 ret = ops->request(reset_ctl); in reset_get_by_index_tail()
[all …]
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 …]
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 …]
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 …]
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 …]
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 …]
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 …]
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 …]
Dreset-socfpga.c62 static int socfpga_reset_assert(struct reset_ctl *reset_ctl) in socfpga_reset_assert() argument
64 struct socfpga_reset_data *data = dev_get_priv(reset_ctl->dev); in socfpga_reset_assert()
65 int id = reset_ctl->id; in socfpga_reset_assert()
74 static int socfpga_reset_deassert(struct reset_ctl *reset_ctl) in socfpga_reset_deassert() argument
76 struct socfpga_reset_data *data = dev_get_priv(reset_ctl->dev); in socfpga_reset_deassert()
77 int id = reset_ctl->id; in socfpga_reset_deassert()
86 static int socfpga_reset_request(struct reset_ctl *reset_ctl) in socfpga_reset_request() argument
89 reset_ctl, reset_ctl->dev, reset_ctl->id); in socfpga_reset_request()
94 static int socfpga_reset_free(struct reset_ctl *reset_ctl) in socfpga_reset_free() argument
96 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in socfpga_reset_free()
[all …]
Dreset-mtmips.c18 static int mtmips_reset_request(struct reset_ctl *reset_ctl) in mtmips_reset_request() argument
23 static int mtmips_reset_free(struct reset_ctl *reset_ctl) in mtmips_reset_free() argument
28 static int mtmips_reset_assert(struct reset_ctl *reset_ctl) in mtmips_reset_assert() argument
30 struct mtmips_reset_priv *priv = dev_get_priv(reset_ctl->dev); in mtmips_reset_assert()
32 setbits_32(priv->base, BIT(reset_ctl->id)); in mtmips_reset_assert()
37 static int mtmips_reset_deassert(struct reset_ctl *reset_ctl) in mtmips_reset_deassert() argument
39 struct mtmips_reset_priv *priv = dev_get_priv(reset_ctl->dev); in mtmips_reset_deassert()
41 clrbits_32(priv->base, BIT(reset_ctl->id)); in mtmips_reset_deassert()
Dast2500-reset.c37 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()
48 reset_mode = ast_reset_mode_from_flags(reset_ctl->id); in ast2500_reset_assert()
49 reset_mask = ast_reset_mask_from_flags(reset_ctl->id); in ast2500_reset_assert()
57 ret = wdt_expire_now(priv->wdt, reset_ctl->id); in ast2500_reset_assert()
62 ret = wdt_expire_now(priv->wdt, reset_ctl->id); in ast2500_reset_assert()
68 static int ast2500_reset_request(struct reset_ctl *reset_ctl) in ast2500_reset_request() argument
70 debug("%s(reset_ctl=%p) (dev=%p, id=%lu)\n", __func__, reset_ctl, in ast2500_reset_request()
71 reset_ctl->dev, reset_ctl->id); in ast2500_reset_request()
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 …]
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()
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()
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()
Dreset-hisilicon.c16 static int hisi_reset_deassert(struct reset_ctl *rst) in hisi_reset_deassert()
31 static int hisi_reset_assert(struct reset_ctl *rst) in hisi_reset_assert()
46 static int hisi_reset_free(struct reset_ctl *rst) in hisi_reset_free()
51 static int hisi_reset_request(struct reset_ctl *rst) in hisi_reset_request()
56 static int hisi_reset_of_xlate(struct reset_ctl *rst, in hisi_reset_of_xlate()
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()
Dreset-imx7.c63 static int imx7_reset_deassert_imx7(struct reset_ctl *rst) in imx7_reset_deassert_imx7()
94 static int imx7_reset_assert_imx7(struct reset_ctl *rst) in imx7_reset_assert_imx7()
184 static int imx7_reset_deassert_imx8mq(struct reset_ctl *rst) in imx7_reset_deassert_imx8mq()
222 static int imx7_reset_assert_imx8mq(struct reset_ctl *rst) in imx7_reset_assert_imx8mq()
251 static int imx7_reset_assert(struct reset_ctl *rst) in imx7_reset_assert()
257 static int imx7_reset_deassert(struct reset_ctl *rst) in imx7_reset_deassert()
263 static int imx7_reset_free(struct reset_ctl *rst) in imx7_reset_free()
268 static int imx7_reset_request(struct reset_ctl *rst) in imx7_reset_request()
/external/u-boot/drivers/remoteproc/
Dstm32_copro.c28 struct reset_ctl reset_ctl; member
66 ret = reset_get_by_index(dev, 0, &priv->reset_ctl); in stm32_copro_probe()
152 ret = reset_assert(&priv->reset_ctl); in stm32_copro_load()
203 ret = reset_assert(&priv->reset_ctl); in stm32_copro_reset()
/external/u-boot/drivers/i2c/
Dtegra_i2c.c31 struct reset_ctl reset_ctl; member
64 reset_assert(&i2c_bus->reset_ctl); in i2c_reset_controller()
66 reset_deassert(&i2c_bus->reset_ctl); in i2c_reset_controller()
77 ret = reset_assert(&i2c_bus->reset_ctl); in i2c_init_clock()
86 ret = reset_deassert(&i2c_bus->reset_ctl); in i2c_init_clock()
370 ret = reset_get_by_name(dev, "i2c", &i2c_bus->reset_ctl); in tegra_i2c_probe()
/external/u-boot/board/freescale/t208xrdb/
Dcpld.c33 CPLD_WRITE(reset_ctl, CPLD_LBMAP_RESET); in cpld_set_altbank()
43 CPLD_WRITE(reset_ctl, CPLD_LBMAP_RESET); in cpld_set_defbank()
Dt208xrdb.c108 reg = CPLD_READ(reset_ctl); in misc_init_r()
110 CPLD_WRITE(reset_ctl, reg); in misc_init_r()
/external/u-boot/test/dm/
Dreset.c23 struct reset_ctl reset_method1; in dm_test_reset_base()
24 struct reset_ctl reset_method2; in dm_test_reset_base()

123