/drivers/reset/ |
D | reset-hsdk.c | 52 static void hsdk_reset_config(struct hsdk_rst *rst, unsigned long id) in hsdk_reset_config() argument 54 writel(rst_map[id], rst->regs_ctl + CGU_SYS_RST_CTRL); in hsdk_reset_config() 57 static int hsdk_reset_do(struct hsdk_rst *rst) in hsdk_reset_do() argument 61 reg = readl(rst->regs_rst + CGU_IP_SW_RESET); in hsdk_reset_do() 65 writel(reg, rst->regs_rst + CGU_IP_SW_RESET); in hsdk_reset_do() 68 return readl_poll_timeout_atomic(rst->regs_rst + CGU_IP_SW_RESET, reg, in hsdk_reset_do() 75 struct hsdk_rst *rst = to_hsdk_rst(rcdev); in hsdk_reset_reset() local 79 spin_lock_irqsave(&rst->lock, flags); in hsdk_reset_reset() 80 hsdk_reset_config(rst, id); in hsdk_reset_reset() 81 ret = hsdk_reset_do(rst); in hsdk_reset_reset() [all …]
|
D | reset-axs10x.c | 30 struct axs10x_rst *rst = to_axs10x_rst(rcdev); in axs10x_reset_reset() local 33 spin_lock_irqsave(&rst->lock, flags); in axs10x_reset_reset() 34 writel(BIT(id), rst->regs_rst); in axs10x_reset_reset() 35 spin_unlock_irqrestore(&rst->lock, flags); in axs10x_reset_reset() 46 struct axs10x_rst *rst; in axs10x_reset_probe() local 49 rst = devm_kzalloc(&pdev->dev, sizeof(*rst), GFP_KERNEL); in axs10x_reset_probe() 50 if (!rst) in axs10x_reset_probe() 54 rst->regs_rst = devm_ioremap_resource(&pdev->dev, mem); in axs10x_reset_probe() 55 if (IS_ERR(rst->regs_rst)) in axs10x_reset_probe() 56 return PTR_ERR(rst->regs_rst); in axs10x_reset_probe() [all …]
|
/drivers/clk/baikal-t1/ |
D | ccu-rst.c | 106 struct ccu_rst *rst = to_ccu_rst(rcdev); in ccu_rst_reset() local 107 const struct ccu_rst_info *info = &rst->rsts_info[idx]; in ccu_rst_reset() 112 regmap_update_bits(rst->sys_regs, info->base, info->mask, info->mask); in ccu_rst_reset() 123 struct ccu_rst *rst = to_ccu_rst(rcdev); in ccu_rst_set() local 124 const struct ccu_rst_info *info = &rst->rsts_info[idx]; in ccu_rst_set() 129 return regmap_update_bits(rst->sys_regs, info->base, in ccu_rst_set() 148 struct ccu_rst *rst = to_ccu_rst(rcdev); in ccu_rst_status() local 149 const struct ccu_rst_info *info = &rst->rsts_info[idx]; in ccu_rst_status() 155 regmap_read(rst->sys_regs, info->base, &val); in ccu_rst_status() 169 struct ccu_rst *rst; in ccu_rst_hw_register() local [all …]
|
/drivers/clk/qcom/ |
D | reset.c | 16 struct qcom_reset_controller *rst = to_qcom_reset_controller(rcdev); in qcom_reset() local 19 fsleep(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */ in qcom_reset() 28 struct qcom_reset_controller *rst; in qcom_reset_assert() local 32 rst = to_qcom_reset_controller(rcdev); in qcom_reset_assert() 33 map = &rst->reset_map[id]; in qcom_reset_assert() 36 return regmap_update_bits(rst->regmap, map->reg, mask, mask); in qcom_reset_assert() 42 struct qcom_reset_controller *rst; in qcom_reset_deassert() local 46 rst = to_qcom_reset_controller(rcdev); in qcom_reset_deassert() 47 map = &rst->reset_map[id]; in qcom_reset_deassert() 50 return regmap_update_bits(rst->regmap, map->reg, mask, 0); in qcom_reset_deassert()
|
/drivers/reset/sti/ |
D | reset-syscfg.c | 41 struct reset_controller_dev rst; member 47 container_of(_rst, struct syscfg_reset_controller, rst) 52 struct syscfg_reset_controller *rst = to_syscfg_reset_controller(rcdev); in syscfg_reset_program_hw() local 54 u32 ctrl_val = rst->active_low ? !assert : !!assert; in syscfg_reset_program_hw() 60 ch = &rst->channels[idx]; in syscfg_reset_program_hw() 115 struct syscfg_reset_controller *rst = to_syscfg_reset_controller(rcdev); in syscfg_reset_status() local 123 ch = &rst->channels[idx]; in syscfg_reset_status() 131 return rst->active_low ? !ret_val : !!ret_val; in syscfg_reset_status() 156 rc->rst.ops = &syscfg_reset_ops; in syscfg_reset_controller_register() 157 rc->rst.of_node = dev->of_node; in syscfg_reset_controller_register() [all …]
|
/drivers/memory/tegra/ |
D | mc.c | 111 const struct tegra_mc_reset *rst) in tegra_mc_block_dma_common() argument 118 value = mc_readl(mc, rst->control) | BIT(rst->bit); in tegra_mc_block_dma_common() 119 mc_writel(mc, value, rst->control); in tegra_mc_block_dma_common() 127 const struct tegra_mc_reset *rst) in tegra_mc_dma_idling_common() argument 129 return (mc_readl(mc, rst->status) & BIT(rst->bit)) != 0; in tegra_mc_dma_idling_common() 133 const struct tegra_mc_reset *rst) in tegra_mc_unblock_dma_common() argument 140 value = mc_readl(mc, rst->control) & ~BIT(rst->bit); in tegra_mc_unblock_dma_common() 141 mc_writel(mc, value, rst->control); in tegra_mc_unblock_dma_common() 149 const struct tegra_mc_reset *rst) in tegra_mc_reset_status_common() argument 151 return (mc_readl(mc, rst->control) & BIT(rst->bit)) != 0; in tegra_mc_reset_status_common() [all …]
|
D | tegra20.c | 279 const struct tegra_mc_reset *rst) in tegra20_mc_hotreset_assert() argument 286 value = mc_readl(mc, rst->reset); in tegra20_mc_hotreset_assert() 287 mc_writel(mc, value & ~BIT(rst->bit), rst->reset); in tegra20_mc_hotreset_assert() 295 const struct tegra_mc_reset *rst) in tegra20_mc_hotreset_deassert() argument 302 value = mc_readl(mc, rst->reset); in tegra20_mc_hotreset_deassert() 303 mc_writel(mc, value | BIT(rst->bit), rst->reset); in tegra20_mc_hotreset_deassert() 311 const struct tegra_mc_reset *rst) in tegra20_mc_block_dma() argument 318 value = mc_readl(mc, rst->control) & ~BIT(rst->bit); in tegra20_mc_block_dma() 319 mc_writel(mc, value, rst->control); in tegra20_mc_block_dma() 327 const struct tegra_mc_reset *rst) in tegra20_mc_dma_idling() argument [all …]
|
/drivers/pwm/ |
D | pwm-intel-lgm.c | 152 struct reset_control *rst = data; in lgm_reset_control_release() local 154 reset_control_assert(rst); in lgm_reset_control_release() 157 static int lgm_reset_control_deassert(struct device *dev, struct reset_control *rst) in lgm_reset_control_deassert() argument 161 ret = reset_control_deassert(rst); in lgm_reset_control_deassert() 165 return devm_add_action_or_reset(dev, lgm_reset_control_release, rst); in lgm_reset_control_deassert() 171 struct reset_control *rst; in lgm_pwm_probe() local 198 rst = devm_reset_control_get_exclusive(dev, NULL); in lgm_pwm_probe() 199 if (IS_ERR(rst)) in lgm_pwm_probe() 200 return dev_err_probe(dev, PTR_ERR(rst), in lgm_pwm_probe() 203 ret = lgm_reset_control_deassert(dev, rst); in lgm_pwm_probe()
|
/drivers/reset/hisilicon/ |
D | reset-hi3660.c | 15 struct reset_controller_dev rst; member 20 container_of(_rst, struct hi3660_reset_controller, rst) 97 rc->rst.ops = &hi3660_reset_ops, in hi3660_reset_probe() 98 rc->rst.of_node = np; in hi3660_reset_probe() 99 rc->rst.of_reset_n_cells = 2; in hi3660_reset_probe() 100 rc->rst.of_xlate = hi3660_reset_xlate; in hi3660_reset_probe() 102 return reset_controller_register(&rc->rst); in hi3660_reset_probe()
|
/drivers/soc/ti/ |
D | omap_prm.c | 50 s8 rst; member 139 { .rst = 0, .st = 0 }, 140 { .rst = -1 }, 144 { .rst = 0, .st = 0 }, 145 { .rst = 1, .st = 1 }, 146 { .rst = -1 }, 150 { .rst = 0, .st = 0 }, 151 { .rst = 1, .st = 1 }, 152 { .rst = 2, .st = 2 }, 153 { .rst = -1 }, [all …]
|
/drivers/clk/visconti/ |
D | reset.c | 27 u32 rst = BIT(data->rs_idx); in visconti_reset_assert() local 32 ret = regmap_update_bits(reset->regmap, data->rson_offset, rst, rst); in visconti_reset_assert() 42 u32 rst = BIT(data->rs_idx); in visconti_reset_deassert() local 47 ret = regmap_update_bits(reset->regmap, data->rsoff_offset, rst, rst); in visconti_reset_deassert()
|
/drivers/tty/serial/8250/ |
D | 8250_tegra.c | 21 struct reset_control *rst; member 90 uart->rst = devm_reset_control_get_optional_shared(&pdev->dev, NULL); in tegra_uart_probe() 91 if (IS_ERR(uart->rst)) in tegra_uart_probe() 92 return PTR_ERR(uart->rst); in tegra_uart_probe() 109 ret = reset_control_deassert(uart->rst); in tegra_uart_probe() 123 reset_control_assert(uart->rst); in tegra_uart_probe() 135 reset_control_assert(uart->rst); in tegra_uart_remove()
|
/drivers/phy/samsung/ |
D | phy-s5pv210-usb2.c | 114 u32 rst; in s5pv210_phy_pwr() local 136 rst = readl(drv->reg_phy + S5PV210_UPHYRST); in s5pv210_phy_pwr() 137 rst |= rstbits; in s5pv210_phy_pwr() 138 writel(rst, drv->reg_phy + S5PV210_UPHYRST); in s5pv210_phy_pwr() 140 rst &= ~rstbits; in s5pv210_phy_pwr() 141 writel(rst, drv->reg_phy + S5PV210_UPHYRST); in s5pv210_phy_pwr()
|
D | phy-exynos4210-usb2.c | 151 u32 rst; in exynos4210_phy_pwr() local 191 rst = readl(drv->reg_phy + EXYNOS_4210_UPHYRST); in exynos4210_phy_pwr() 192 rst |= rstbits; in exynos4210_phy_pwr() 193 writel(rst, drv->reg_phy + EXYNOS_4210_UPHYRST); in exynos4210_phy_pwr() 195 rst &= ~rstbits; in exynos4210_phy_pwr() 196 writel(rst, drv->reg_phy + EXYNOS_4210_UPHYRST); in exynos4210_phy_pwr()
|
/drivers/phy/socionext/ |
D | phy-uniphier-pcie.c | 63 struct reset_control *rst, *rst_gio; member 155 ret = reset_control_deassert(priv->rst); in uniphier_pciephy_init() 191 reset_control_assert(priv->rst); in uniphier_pciephy_init() 207 reset_control_assert(priv->rst); in uniphier_pciephy_exit() 256 priv->rst = devm_reset_control_get_shared(dev, "link"); in uniphier_pciephy_probe() 257 if (IS_ERR(priv->rst)) in uniphier_pciephy_probe() 258 return PTR_ERR(priv->rst); in uniphier_pciephy_probe() 264 priv->rst = devm_reset_control_get_shared(dev, NULL); in uniphier_pciephy_probe() 265 if (IS_ERR(priv->rst)) in uniphier_pciephy_probe() 266 return PTR_ERR(priv->rst); in uniphier_pciephy_probe()
|
/drivers/regulator/ |
D | uniphier-regulator.c | 31 struct reset_control *rst[MAX_RSTS]; member 72 priv->rst[i] = devm_reset_control_get_shared(dev, name); in uniphier_regulator_probe() 73 if (IS_ERR(priv->rst[i])) in uniphier_regulator_probe() 74 return PTR_ERR(priv->rst[i]); in uniphier_regulator_probe() 82 ret = reset_control_deassert(priv->rst[nr]); in uniphier_regulator_probe() 111 reset_control_assert(priv->rst[nr]); in uniphier_regulator_probe() 124 reset_control_assert(priv->rst[i]); in uniphier_regulator_remove()
|
/drivers/iio/dac/ |
D | stm32-dac-core.c | 94 struct reset_control *rst; in stm32_dac_probe() local 142 rst = devm_reset_control_get_optional_exclusive(dev, NULL); in stm32_dac_probe() 143 if (rst) { in stm32_dac_probe() 144 if (IS_ERR(rst)) { in stm32_dac_probe() 145 ret = dev_err_probe(dev, PTR_ERR(rst), "reset get failed\n"); in stm32_dac_probe() 149 reset_control_assert(rst); in stm32_dac_probe() 151 reset_control_deassert(rst); in stm32_dac_probe()
|
/drivers/mtd/nand/raw/ |
D | denali_dt.c | 27 struct reset_control *rst; /* core reset */ member 161 dt->rst = devm_reset_control_get_optional_shared(dev, "nand"); in denali_dt_probe() 162 if (IS_ERR(dt->rst)) in denali_dt_probe() 163 return PTR_ERR(dt->rst); in denali_dt_probe() 193 ret = reset_control_deassert(dt->rst); in denali_dt_probe() 223 reset_control_assert(dt->rst); in denali_dt_probe() 241 reset_control_assert(dt->rst); in denali_dt_remove()
|
/drivers/remoteproc/ |
D | rcar_rproc.c | 18 struct reset_control *rst; member 121 err = reset_control_deassert(priv->rst); in rcar_rproc_start() 133 err = reset_control_assert(priv->rst); in rcar_rproc_stop() 167 priv->rst = devm_reset_control_get_exclusive(dev, NULL); in rcar_rproc_probe() 168 if (IS_ERR(priv->rst)) { in rcar_rproc_probe() 169 ret = PTR_ERR(priv->rst); in rcar_rproc_probe()
|
/drivers/usb/chipidea/ |
D | ci_hdrc_tegra.c | 101 struct reset_control *rst, *rst_utmi; in tegra_usb_reset_controller() local 105 rst = devm_reset_control_get_shared(dev, "usb"); in tegra_usb_reset_controller() 106 if (IS_ERR(rst)) { in tegra_usb_reset_controller() 107 dev_err(dev, "can't get ehci reset: %pe\n", rst); in tegra_usb_reset_controller() 108 return PTR_ERR(rst); in tegra_usb_reset_controller() 135 err = reset_control_deassert(rst); in tegra_usb_reset_controller() 139 err = reset_control_assert(rst); in tegra_usb_reset_controller() 145 err = reset_control_deassert(rst); in tegra_usb_reset_controller()
|
/drivers/usb/host/ |
D | ehci-st.c | 35 struct reset_control *rst; member 73 ret = reset_control_deassert(priv->rst); in st_ehci_platform_power_on() 107 reset_control_assert(priv->rst); in st_ehci_platform_power_on() 122 reset_control_assert(priv->rst); in st_ehci_platform_power_off() 210 priv->rst = in st_ehci_platform_probe() 212 if (IS_ERR(priv->rst)) { in st_ehci_platform_probe() 213 err = PTR_ERR(priv->rst); in st_ehci_platform_probe() 216 priv->rst = NULL; in st_ehci_platform_probe()
|
D | ohci-st.c | 33 struct reset_control *rst; member 53 ret = reset_control_deassert(priv->rst); in st_ohci_platform_power_on() 87 reset_control_assert(priv->rst); in st_ohci_platform_power_on() 103 reset_control_assert(priv->rst); in st_ohci_platform_power_off() 189 priv->rst = in st_ohci_platform_probe() 191 if (IS_ERR(priv->rst)) { in st_ohci_platform_probe() 192 err = PTR_ERR(priv->rst); in st_ohci_platform_probe()
|
/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/ |
D | mac.c | 155 bool rst = true; in rtl92c_init_llt_table() local 159 rst = rtl92c_llt_write(hw, i , i + 1); in rtl92c_init_llt_table() 160 if (!rst) { in rtl92c_init_llt_table() 162 return rst; in rtl92c_init_llt_table() 166 rst = rtl92c_llt_write(hw, (boundary - 1), 0xFF); in rtl92c_init_llt_table() 167 if (!rst) { in rtl92c_init_llt_table() 169 return rst; in rtl92c_init_llt_table() 177 rst = rtl92c_llt_write(hw, i, (i + 1)); in rtl92c_init_llt_table() 178 if (!rst) { in rtl92c_init_llt_table() 180 return rst; in rtl92c_init_llt_table() [all …]
|
/drivers/bus/ |
D | tegra-gmi.c | 46 struct reset_control *rst; member 64 reset_control_assert(gmi->rst); in tegra_gmi_enable() 66 reset_control_deassert(gmi->rst); in tegra_gmi_enable() 86 reset_control_assert(gmi->rst); in tegra_gmi_disable() 233 gmi->rst = devm_reset_control_get(dev, "gmi"); in tegra_gmi_probe() 234 if (IS_ERR(gmi->rst)) { in tegra_gmi_probe() 236 return PTR_ERR(gmi->rst); in tegra_gmi_probe()
|
/drivers/nvmem/ |
D | lpc18xx_eeprom.c | 166 struct reset_control *rst; in lpc18xx_eeprom_probe() local 197 rst = devm_reset_control_get_exclusive(dev, NULL); in lpc18xx_eeprom_probe() 198 if (IS_ERR(rst)) { in lpc18xx_eeprom_probe() 199 dev_err(dev, "failed to get reset: %ld\n", PTR_ERR(rst)); in lpc18xx_eeprom_probe() 200 ret = PTR_ERR(rst); in lpc18xx_eeprom_probe() 204 ret = reset_control_assert(rst); in lpc18xx_eeprom_probe()
|