Lines Matching +full:prcc +full:- +full:reset +full:- +full:controller
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Reset controller portions for the U8500 PRCC
12 #include <linux/reset-controller.h>
16 #include "prcc.h"
17 #include "reset-prcc.h"
21 /* This macro flattens the 2-dimensional PRCC numberspace */
26 * Reset registers in each PRCC - the reset lines are active low
28 * want to put into reset into the CLEAR register, this will assert
29 * the reset by pulling the line low. SET take the device out of
30 * reset. The status reflects the actual state of the line.
50 return -EINVAL; in prcc_num_to_index()
61 if (index >= ARRAY_SIZE(ur->base)) in u8500_prcc_reset_base()
64 return ur->base[index]; in u8500_prcc_reset_base()
74 pr_debug("PRCC cycle reset id %lu, bit %u\n", id, bit); in u8500_prcc_reset()
77 * Assert reset and then release it. The one microsecond in u8500_prcc_reset()
95 pr_debug("PRCC assert reset id %lu, bit %u\n", id, bit); in u8500_prcc_reset_assert()
108 pr_debug("PRCC deassert reset id %lu, bit %u\n", id, bit); in u8500_prcc_reset_deassert()
122 pr_debug("PRCC check status on reset line id %lu, bit %u\n", id, bit); in u8500_prcc_reset_status()
130 .reset = u8500_prcc_reset,
141 if (reset_spec->args_count != 2) in u8500_prcc_reset_xlate()
142 return -EINVAL; in u8500_prcc_reset_xlate()
144 prcc_num = reset_spec->args[0]; in u8500_prcc_reset_xlate()
145 bit = reset_spec->args[1]; in u8500_prcc_reset_xlate()
149 pr_err("%s: invalid PRCC %d\n", __func__, prcc_num); in u8500_prcc_reset_xlate()
150 return -EINVAL; in u8500_prcc_reset_xlate()
153 pr_debug("located reset line %d at PRCC %d bit %d\n", in u8500_prcc_reset_xlate()
161 struct reset_controller_dev *rcdev = &ur->rcdev; in u8500_prcc_reset_init()
166 ur->base[i] = ioremap(ur->phy_base[i], SZ_4K); in u8500_prcc_reset_init()
167 if (!ur->base[i]) in u8500_prcc_reset_init()
168 pr_err("PRCC failed to remap for reset base %d (%08x)\n", in u8500_prcc_reset_init()
169 i, ur->phy_base[i]); in u8500_prcc_reset_init()
172 rcdev->owner = THIS_MODULE; in u8500_prcc_reset_init()
173 rcdev->ops = &u8500_prcc_reset_ops; in u8500_prcc_reset_init()
174 rcdev->of_node = np; in u8500_prcc_reset_init()
175 rcdev->of_reset_n_cells = 2; in u8500_prcc_reset_init()
176 rcdev->of_xlate = u8500_prcc_reset_xlate; in u8500_prcc_reset_init()
180 pr_err("PRCC failed to register reset controller\n"); in u8500_prcc_reset_init()