Lines Matching +full:2 +full:- +full:dimensional
1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/reset-controller.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
41 case 2: in prcc_num_to_index()
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()
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()
147 if (prcc_num != 1 && prcc_num != 2 && prcc_num != 3 && in u8500_prcc_reset_xlate()
150 return -EINVAL; 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()
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()