| /linux/drivers/reset/ |
| H A D | core.c | 74 * @rstc: array of reset controls 79 struct reset_control *rstc[] __counted_by(num_rstcs); 164 struct reset_control *rstc) in reset_controller_remove() argument 168 list_del(&rstc->list); in reset_controller_remove() 179 struct reset_control *rstc, *pos; in reset_controller_unregister() local 189 list_for_each_entry_safe(rstc, pos, &rcdev->reset_control_head, list) { in reset_controller_unregister() 190 rcu_assign_pointer(rstc->rcdev, NULL); in reset_controller_unregister() 191 synchronize_srcu(&rstc->srcu); in reset_controller_unregister() 192 reset_controller_remove(rcdev, rstc); in reset_controller_unregister() 239 rstc_to_array(struct reset_control *rstc) { in rstc_to_array() argument [all …]
|
| H A D | reset-k230.c | 159 static void k230_rst_clear_done(struct k230_rst *rstc, unsigned long id, in k230_rst_clear_done() argument 165 guard(spinlock_irqsave)(&rstc->lock); in k230_rst_clear_done() 167 reg = readl(rstc->base + rmap->offset); in k230_rst_clear_done() 171 writel(reg, rstc->base + rmap->offset); in k230_rst_clear_done() 174 static int k230_rst_wait_and_clear_done(struct k230_rst *rstc, unsigned long id, in k230_rst_wait_and_clear_done() argument 181 ret = readl_poll_timeout(rstc->base + rmap->offset, reg, in k230_rst_wait_and_clear_done() 184 dev_err(rstc->rcdev.dev, "Wait for reset done timeout\n"); in k230_rst_wait_and_clear_done() 188 k230_rst_clear_done(rstc, id, write_en); in k230_rst_wait_and_clear_done() 193 static void k230_rst_update(struct k230_rst *rstc, unsigned long id, in k230_rst_update() argument 199 guard(spinlock_irqsave)(&rstc->lock); in k230_rst_update() [all …]
|
| /linux/drivers/clk/hisilicon/ |
| H A D | reset.c | 46 struct hisi_reset_controller *rstc = to_hisi_reset_controller(rcdev); in hisi_reset_assert() local 54 spin_lock_irqsave(&rstc->lock, flags); in hisi_reset_assert() 56 reg = readl(rstc->membase + offset); in hisi_reset_assert() 57 writel(reg | BIT(bit), rstc->membase + offset); in hisi_reset_assert() 59 spin_unlock_irqrestore(&rstc->lock, flags); in hisi_reset_assert() 67 struct hisi_reset_controller *rstc = to_hisi_reset_controller(rcdev); in hisi_reset_deassert() local 75 spin_lock_irqsave(&rstc->lock, flags); in hisi_reset_deassert() 77 reg = readl(rstc->membase + offset); in hisi_reset_deassert() 78 writel(reg & ~BIT(bit), rstc->membase + offset); in hisi_reset_deassert() 80 spin_unlock_irqrestore(&rstc->lock, flags); in hisi_reset_deassert() [all …]
|
| H A D | clk-hi3519.c | 31 struct hisi_reset_controller *rstc; member 151 crg->rstc = hisi_reset_init(pdev); in hi3519_clk_probe() 152 if (!crg->rstc) in hi3519_clk_probe() 157 hisi_reset_exit(crg->rstc); in hi3519_clk_probe() 169 hisi_reset_exit(crg->rstc); in hi3519_clk_remove()
|
| /linux/drivers/reset/tegra/ |
| H A D | reset-bpmp.c | 11 static struct tegra_bpmp *to_tegra_bpmp(struct reset_controller_dev *rstc) in to_tegra_bpmp() argument 13 return container_of(rstc, struct tegra_bpmp, rstc); in to_tegra_bpmp() 16 static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc, in tegra_bpmp_reset_common() argument 20 struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc); in tegra_bpmp_reset_common() 43 static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc, in tegra_bpmp_reset_module() argument 46 return tegra_bpmp_reset_common(rstc, CMD_RESET_MODULE, id); in tegra_bpmp_reset_module() 49 static int tegra_bpmp_reset_assert(struct reset_controller_dev *rstc, in tegra_bpmp_reset_assert() argument 52 return tegra_bpmp_reset_common(rstc, CMD_RESET_ASSERT, id); in tegra_bpmp_reset_assert() 55 static int tegra_bpmp_reset_deassert(struct reset_controller_dev *rstc, in tegra_bpmp_reset_deassert() argument 58 return tegra_bpmp_reset_common(rstc, CMD_RESET_DEASSERT, id); in tegra_bpmp_reset_deassert() [all …]
|
| /linux/Documentation/devicetree/bindings/reset/ |
| H A D | atmel,at91sam9260-reset.yaml | 21 - atmel,at91sam9260-rstc 22 - atmel,at91sam9g45-rstc 23 - atmel,sama5d3-rstc 24 - microchip,sam9x60-rstc 25 - microchip,sama7g5-rstc 27 - const: microchip,sama7d65-rstc 28 - const: microchip,sama7g5-rstc 30 - const: atmel,sama5d3-rstc 31 - const: atmel,at91sam9g45-rstc 34 - microchip,sam9x7-rstc [all …]
|
| /linux/drivers/clk/meson/ |
| H A D | meson-aoclk.c | 26 struct meson_aoclk_reset_controller *rstc = in meson_aoclk_do_reset() local 29 return regmap_write(rstc->regmap, rstc->data->reset_reg, in meson_aoclk_do_reset() 30 BIT(rstc->data->reset[id])); in meson_aoclk_do_reset() 39 struct meson_aoclk_reset_controller *rstc; in meson_aoclkc_probe() local 58 rstc = devm_kzalloc(dev, sizeof(*rstc), GFP_KERNEL); in meson_aoclkc_probe() 59 if (!rstc) in meson_aoclkc_probe() 71 rstc->data = data; in meson_aoclkc_probe() 72 rstc->regmap = regmap; in meson_aoclkc_probe() 73 rstc->reset.ops = &meson_aoclk_reset_ops; in meson_aoclkc_probe() 74 rstc->reset.nr_resets = data->num_reset; in meson_aoclkc_probe() [all …]
|
| /linux/arch/arm/boot/dts/sunplus/ |
| H A D | sunplus-sp7021.dtsi | 57 resets = <&rstc RST_OTPRX>; 85 resets = <&rstc RST_GPIO>; 172 rstc: reset@54 { label 183 resets = <&rstc RST_RTC>; 196 resets = <&rstc RST_SPI_COMBO_0>; 213 resets = <&rstc RST_SPI_COMBO_1>; 226 resets = <&rstc RST_SPI_COMBO_2>; 239 resets = <&rstc RST_SPI_COMBO_3>; 248 resets = <&rstc RST_UA0>; 258 resets = <&rstc RST_UA1>; [all …]
|
| /linux/arch/arm/mach-meson/ |
| H A D | platsmp.c | 158 struct reset_control *rstc; in meson8_smp_boot_secondary() local 161 rstc = meson_smp_get_core_reset(cpu); in meson8_smp_boot_secondary() 162 if (IS_ERR(rstc)) { in meson8_smp_boot_secondary() 164 return PTR_ERR(rstc); in meson8_smp_boot_secondary() 170 ret = reset_control_assert(rstc); in meson8_smp_boot_secondary() 195 ret = reset_control_deassert(rstc); in meson8_smp_boot_secondary() 206 reset_control_put(rstc); in meson8_smp_boot_secondary() 214 struct reset_control *rstc; in meson8b_smp_boot_secondary() local 218 rstc = meson_smp_get_core_reset(cpu); in meson8b_smp_boot_secondary() 219 if (IS_ERR(rstc)) { in meson8b_smp_boot_secondary() [all …]
|
| /linux/drivers/reset/amlogic/ |
| H A D | reset-meson-audio-arb.c | 16 struct reset_controller_dev rstc; member 65 container_of(rcdev, struct meson_audio_arb_data, rstc); in meson_audio_arb_update() 86 container_of(rcdev, struct meson_audio_arb_data, rstc); in meson_audio_arb_status() 159 arb->rstc.nr_resets = data->reset_num; in meson_audio_arb_probe() 160 arb->rstc.ops = &meson_audio_arb_rstc_ops; in meson_audio_arb_probe() 161 arb->rstc.of_node = dev->of_node; in meson_audio_arb_probe() 162 arb->rstc.owner = THIS_MODULE; in meson_audio_arb_probe() 172 ret = devm_reset_controller_register(dev, &arb->rstc); in meson_audio_arb_probe()
|
| /linux/drivers/clk/renesas/ |
| H A D | clk-vbattb.c | 66 struct reset_control *rstc = dev_get_drvdata(dev); in vbattb_clk_action() local 69 ret = reset_control_assert(rstc); in vbattb_clk_action() 87 struct reset_control *rstc; in vbattb_clk_probe() local 120 rstc = devm_reset_control_get_shared(dev, NULL); in vbattb_clk_probe() 121 if (IS_ERR(rstc)) in vbattb_clk_probe() 122 return PTR_ERR(rstc); in vbattb_clk_probe() 128 ret = reset_control_deassert(rstc); in vbattb_clk_probe() 134 dev_set_drvdata(dev, rstc); in vbattb_clk_probe()
|
| /linux/drivers/clocksource/ |
| H A D | renesas-ostm.c | 164 struct reset_control *rstc; in ostm_init() local 172 rstc = of_reset_control_get_optional_exclusive(np, NULL); in ostm_init() 173 if (IS_ERR(rstc)) { in ostm_init() 174 ret = PTR_ERR(rstc); in ostm_init() 178 reset_control_deassert(rstc); in ostm_init() 219 reset_control_assert(rstc); in ostm_init() 220 reset_control_put(rstc); in ostm_init()
|
| H A D | dw_apb_timer_of.c | 22 struct reset_control *rstc; in timer_get_base_and_rate() local 34 rstc = of_reset_control_get(np, NULL); in timer_get_base_and_rate() 35 if (!IS_ERR(rstc)) { in timer_get_base_and_rate() 36 reset_control_assert(rstc); in timer_get_base_and_rate() 37 reset_control_deassert(rstc); in timer_get_base_and_rate()
|
| /linux/drivers/watchdog/ |
| H A D | sunplus_wdt.c | 47 struct reset_control *rstc; member 158 priv->rstc = devm_reset_control_get_shared(dev, NULL); in sp_wdt_probe() 159 if (IS_ERR(priv->rstc)) in sp_wdt_probe() 160 return dev_err_probe(dev, PTR_ERR(priv->rstc), "Failed to get reset\n"); in sp_wdt_probe() 162 reset_control_deassert(priv->rstc); in sp_wdt_probe() 164 ret = devm_add_action_or_reset(dev, sp_reset_control_assert, priv->rstc); in sp_wdt_probe()
|
| H A D | rzv2h_wdt.c | 73 struct reset_control *rstc; member 130 ret = reset_control_deassert(priv->rstc); in rzv2h_wdt_start() 170 ret = reset_control_assert(priv->rstc); in rzv2h_wdt_stop() 204 ret = reset_control_deassert(priv->rstc); in rzv2h_wdt_restart() 217 ret = reset_control_reset(priv->rstc); in rzv2h_wdt_restart() 302 priv->rstc = devm_reset_control_get_optional_exclusive(dev, NULL); in rzv2h_wdt_probe() 303 if (IS_ERR(priv->rstc)) in rzv2h_wdt_probe() 304 return dev_err_probe(dev, PTR_ERR(priv->rstc), in rzv2h_wdt_probe()
|
| /linux/drivers/phy/sunplus/ |
| H A D | phy-sunplus-usb2.c | 71 struct reset_control *rstc; member 121 ret = reset_control_deassert(usbphy->rstc); in sp_uphy_init() 162 reset_control_assert(usbphy->rstc); in sp_uphy_init() 219 reset_control_assert(usbphy->rstc); in sp_uphy_exit() 269 usbphy->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); in sp_usb_phy_probe() 270 if (IS_ERR(usbphy->rstc)) in sp_usb_phy_probe() 271 return PTR_ERR(usbphy->rstc); in sp_usb_phy_probe()
|
| /linux/drivers/phy/st/ |
| H A D | phy-stih407-usb.c | 36 struct reset_control *rstc; member 44 reset_control_deassert(phy_dev->rstc); in stih407_usb2_pico_ctrl() 104 phy_dev->rstc = devm_reset_control_get_shared(dev, "global"); in stih407_usb2_picophy_probe() 105 if (IS_ERR(phy_dev->rstc)) { in stih407_usb2_picophy_probe() 107 return PTR_ERR(phy_dev->rstc); in stih407_usb2_picophy_probe()
|
| /linux/drivers/net/ethernet/qualcomm/ppe/ |
| H A D | ppe.c | 115 struct reset_control *rstc; in ppe_clock_init_and_reset() local 159 rstc = devm_reset_control_get_exclusive(dev, NULL); in ppe_clock_init_and_reset() 160 if (IS_ERR(rstc)) in ppe_clock_init_and_reset() 161 return PTR_ERR(rstc); in ppe_clock_init_and_reset() 163 ret = reset_control_assert(rstc); in ppe_clock_init_and_reset() 170 return reset_control_deassert(rstc); in ppe_clock_init_and_reset()
|
| /linux/drivers/thermal/renesas/ |
| H A D | rzg2l_thermal.c | 60 struct reset_control *rstc; member 149 reset_control_assert(priv->rstc); in rzg2l_thermal_reset_assert_pm_disable_put() 176 priv->rstc = devm_reset_control_get_exclusive(dev, NULL); in rzg2l_thermal_probe() 177 if (IS_ERR(priv->rstc)) in rzg2l_thermal_probe() 178 return dev_err_probe(dev, PTR_ERR(priv->rstc), in rzg2l_thermal_probe() 181 ret = reset_control_deassert(priv->rstc); in rzg2l_thermal_probe()
|
| /linux/drivers/phy/starfive/ |
| H A D | phy-jh7110-dphy-rx.c | 67 struct reset_control *rstc; member 125 reset_control_deassert(dphy->rstc); in stf_dphy_power_on() 134 reset_control_assert(dphy->rstc); in stf_dphy_power_off() 180 dphy->rstc = devm_reset_control_array_get_exclusive(&pdev->dev); in stf_dphy_probe() 181 if (IS_ERR(dphy->rstc)) in stf_dphy_probe() 182 return PTR_ERR(dphy->rstc); in stf_dphy_probe()
|
| /linux/drivers/i2c/busses/ |
| H A D | i2c-sun6i-p2wi.c | 90 struct reset_control *rstc; member 246 p2wi->rstc = devm_reset_control_get_exclusive(dev, NULL); in p2wi_probe() 247 if (IS_ERR(p2wi->rstc)) in p2wi_probe() 248 return dev_err_probe(dev, PTR_ERR(p2wi->rstc), in p2wi_probe() 251 ret = reset_control_deassert(p2wi->rstc); in p2wi_probe() 290 reset_control_assert(p2wi->rstc); in p2wi_probe() 299 reset_control_assert(p2wi->rstc); in p2wi_remove()
|
| /linux/drivers/iio/adc/ |
| H A D | ti-ads131m02.c | 634 * @rstc: Reset control for the /RESET line. 642 struct reset_control *rstc) in ads131m_hw_reset() argument 652 ret = reset_control_assert(rstc); in ads131m_hw_reset() 659 ret = reset_control_deassert(rstc); in ads131m_hw_reset() 715 * @rstc: Optional reset control, or NULL for software reset. 717 * This function performs a hardware reset if supported (rstc provided), 726 static int ads131m_reset(struct ads131m_priv *priv, struct reset_control *rstc) in ads131m_reset() argument 728 if (rstc) in ads131m_reset() 729 return ads131m_hw_reset(priv, rstc); in ads131m_reset() 778 * @rstc: Optional reset control, or NULL for software reset. [all …]
|
| /linux/drivers/spi/ |
| H A D | spi-dw-mmio.c | 33 struct reset_control *rstc; member 406 dwsmmio->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, "spi"); in dw_spi_mmio_probe() 407 if (IS_ERR(dwsmmio->rstc)) in dw_spi_mmio_probe() 408 return PTR_ERR(dwsmmio->rstc); in dw_spi_mmio_probe() 410 ret = reset_control_deassert(dwsmmio->rstc); in dw_spi_mmio_probe() 444 reset_control_assert(dwsmmio->rstc); in dw_spi_mmio_probe() 461 reset_control_assert(dwsmmio->rstc); in dw_spi_mmio_suspend() 477 reset_control_deassert(dwsmmio->rstc); in dw_spi_mmio_resume() 482 reset_control_assert(dwsmmio->rstc); in dw_spi_mmio_resume() 502 reset_control_assert(dwsmmio->rstc); in dw_spi_mmio_remove()
|
| /linux/drivers/rtc/ |
| H A D | rtc-sunplus.c | 60 struct reset_control *rstc; member 259 sp_rtc->rstc = devm_reset_control_get_exclusive(&plat_dev->dev, NULL); in sp_rtc_probe() 260 if (IS_ERR(sp_rtc->rstc)) in sp_rtc_probe() 261 return dev_err_probe(&plat_dev->dev, PTR_ERR(sp_rtc->rstc), in sp_rtc_probe() 268 ret = reset_control_deassert(sp_rtc->rstc); in sp_rtc_probe() 299 reset_control_assert(sp_rtc->rstc); in sp_rtc_probe() 311 reset_control_assert(sp_rtc->rstc); in sp_rtc_remove()
|
| /linux/drivers/power/reset/ |
| H A D | at91-reset.c | 229 .compatible = "atmel,at91sam9260-rstc", 233 .compatible = "atmel,at91sam9g45-rstc", 237 .compatible = "atmel,sama5d3-rstc", 241 .compatible = "atmel,samx7-rstc", 245 .compatible = "microchip,sam9x60-rstc", 249 .compatible = "microchip,sama7g5-rstc", 356 if (!of_device_is_compatible(pdev->dev.of_node, "atmel,sama5d3-rstc")) { in at91_reset_probe() 393 if (of_device_is_compatible(pdev->dev.of_node, "microchip,sam9x60-rstc")) { in at91_reset_probe()
|