Lines Matching full:reset
3 * Toshiba Visconti ARM SoC reset controller
16 #include "reset.h"
25 struct visconti_reset *reset = to_visconti_reset(rcdev); in visconti_reset_assert() local
26 const struct visconti_reset_data *data = &reset->resets[id]; in visconti_reset_assert()
31 spin_lock_irqsave(reset->lock, flags); in visconti_reset_assert()
32 ret = regmap_update_bits(reset->regmap, data->rson_offset, rst, rst); in visconti_reset_assert()
33 spin_unlock_irqrestore(reset->lock, flags); in visconti_reset_assert()
40 struct visconti_reset *reset = to_visconti_reset(rcdev); in visconti_reset_deassert() local
41 const struct visconti_reset_data *data = &reset->resets[id]; in visconti_reset_deassert()
46 spin_lock_irqsave(reset->lock, flags); in visconti_reset_deassert()
47 ret = regmap_update_bits(reset->regmap, data->rsoff_offset, rst, rst); in visconti_reset_deassert()
48 spin_unlock_irqrestore(reset->lock, flags); in visconti_reset_deassert()
64 struct visconti_reset *reset = to_visconti_reset(rcdev); in visconti_reset_status() local
65 const struct visconti_reset_data *data = &reset->resets[id]; in visconti_reset_status()
70 spin_lock_irqsave(reset->lock, flags); in visconti_reset_status()
71 ret = regmap_read(reset->regmap, data->rson_offset, ®); in visconti_reset_status()
72 spin_unlock_irqrestore(reset->lock, flags); in visconti_reset_status()
82 .reset = visconti_reset_reset,
93 struct visconti_reset *reset; in visconti_register_reset_controller() local
95 reset = devm_kzalloc(dev, sizeof(*reset), GFP_KERNEL); in visconti_register_reset_controller()
96 if (!reset) in visconti_register_reset_controller()
99 reset->regmap = regmap; in visconti_register_reset_controller()
100 reset->resets = resets; in visconti_register_reset_controller()
101 reset->rcdev.ops = reset_ops; in visconti_register_reset_controller()
102 reset->rcdev.nr_resets = num_resets; in visconti_register_reset_controller()
103 reset->rcdev.of_node = dev->of_node; in visconti_register_reset_controller()
104 reset->lock = lock; in visconti_register_reset_controller()
106 return devm_reset_controller_register(dev, &reset->rcdev); in visconti_register_reset_controller()