Lines Matching +full:reset +full:- +full:mask
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Pistachio SoC Reset Controller driver
14 #include <linux/reset-controller.h>
18 #include <dt-bindings/reset/pistachio-resets.h>
59 return -EINVAL; in pistachio_reset_shift()
67 u32 mask; in pistachio_reset_assert() local
74 mask = BIT(shift); in pistachio_reset_assert()
76 return regmap_update_bits(rd->periph_regs, PISTACHIO_SOFT_RESET, in pistachio_reset_assert()
77 mask, mask); in pistachio_reset_assert()
84 u32 mask; in pistachio_reset_deassert() local
91 mask = BIT(shift); in pistachio_reset_deassert()
93 return regmap_update_bits(rd->periph_regs, PISTACHIO_SOFT_RESET, in pistachio_reset_deassert()
94 mask, 0); in pistachio_reset_deassert()
105 struct device *dev = &pdev->dev; in pistachio_reset_probe()
106 struct device_node *np = pdev->dev.of_node; in pistachio_reset_probe()
110 return -ENOMEM; in pistachio_reset_probe()
112 rd->periph_regs = syscon_node_to_regmap(np->parent); in pistachio_reset_probe()
113 if (IS_ERR(rd->periph_regs)) in pistachio_reset_probe()
114 return PTR_ERR(rd->periph_regs); in pistachio_reset_probe()
116 rd->rcdev.owner = THIS_MODULE; in pistachio_reset_probe()
117 rd->rcdev.nr_resets = PISTACHIO_RESET_MAX + 1; in pistachio_reset_probe()
118 rd->rcdev.ops = &pistachio_reset_ops; in pistachio_reset_probe()
119 rd->rcdev.of_node = np; in pistachio_reset_probe()
121 return devm_reset_controller_register(dev, &rd->rcdev); in pistachio_reset_probe()
125 { .compatible = "img,pistachio-reset", },
132 .name = "pistachio-reset",