Lines Matching +full:rst +full:- +full:mgr

1 // SPDX-License-Identifier: GPL-2.0-or-later
11 * Maxime Ripard <maxime.ripard@free-electrons.com>
20 #include <linux/reset-controller.h>
21 #include <linux/reset/reset-simple.h>
40 spin_lock_irqsave(&data->lock, flags); in reset_simple_update()
42 reg = readl(data->membase + (bank * reg_width)); in reset_simple_update()
43 if (assert ^ data->active_low) in reset_simple_update()
47 writel(reg, data->membase + (bank * reg_width)); in reset_simple_update()
49 spin_unlock_irqrestore(&data->lock, flags); in reset_simple_update()
72 if (!data->reset_us) in reset_simple_reset()
73 return -ENOTSUPP; in reset_simple_reset()
79 usleep_range(data->reset_us, data->reset_us * 2); in reset_simple_reset()
93 reg = readl(data->membase + (bank * reg_width)); in reset_simple_status()
95 return !(reg & BIT(offset)) ^ !data->status_active_low; in reset_simple_status()
107 * struct reset_simple_devdata - simple reset controller properties
137 { .compatible = "altr,stratix10-rst-mgr",
139 { .compatible = "st,stm32-rcc", },
140 { .compatible = "allwinner,sun6i-a31-clock-reset",
142 { .compatible = "zte,zx296718-reset",
144 { .compatible = "aspeed,ast2400-lpc-reset" },
145 { .compatible = "aspeed,ast2500-lpc-reset" },
146 { .compatible = "aspeed,ast2600-lpc-reset" },
147 { .compatible = "bitmain,bm1880-reset",
149 { .compatible = "brcm,bcm4908-misc-pcie-reset",
151 { .compatible = "snps,dw-high-reset" },
152 { .compatible = "snps,dw-low-reset",
154 { .compatible = "sophgo,sg2042-reset",
161 struct device *dev = &pdev->dev; in reset_simple_probe()
172 return -ENOMEM; in reset_simple_probe()
178 spin_lock_init(&data->lock); in reset_simple_probe()
179 data->membase = membase; in reset_simple_probe()
180 data->rcdev.owner = THIS_MODULE; in reset_simple_probe()
181 data->rcdev.nr_resets = resource_size(res) * BITS_PER_BYTE; in reset_simple_probe()
182 data->rcdev.ops = &reset_simple_ops; in reset_simple_probe()
183 data->rcdev.of_node = dev->of_node; in reset_simple_probe()
186 reg_offset = devdata->reg_offset; in reset_simple_probe()
187 if (devdata->nr_resets) in reset_simple_probe()
188 data->rcdev.nr_resets = devdata->nr_resets; in reset_simple_probe()
189 data->active_low = devdata->active_low; in reset_simple_probe()
190 data->status_active_low = devdata->status_active_low; in reset_simple_probe()
193 data->membase += reg_offset; in reset_simple_probe()
195 return devm_reset_controller_register(dev, &data->rcdev); in reset_simple_probe()
201 .name = "simple-reset",