Lines Matching refs:rcdev
35 struct reset_controller_dev rcdev; member
38 static inline struct mpfs_reset *to_mpfs_reset(struct reset_controller_dev *rcdev) in to_mpfs_reset() argument
40 return container_of(rcdev, struct mpfs_reset, rcdev); in to_mpfs_reset()
46 static int mpfs_assert(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_assert() argument
48 struct mpfs_reset *rst = to_mpfs_reset(rcdev); in mpfs_assert()
63 static int mpfs_deassert(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_deassert() argument
65 struct mpfs_reset *rst = to_mpfs_reset(rcdev); in mpfs_deassert()
80 static int mpfs_status(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_status() argument
82 struct mpfs_reset *rst = to_mpfs_reset(rcdev); in mpfs_status()
92 static int mpfs_reset(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_reset() argument
94 mpfs_assert(rcdev, id); in mpfs_reset()
98 mpfs_deassert(rcdev, id); in mpfs_reset()
110 static int mpfs_reset_xlate(struct reset_controller_dev *rcdev, in mpfs_reset_xlate() argument
121 dev_err(rcdev->dev, "Resetting the fabric is not supported\n"); in mpfs_reset_xlate()
125 if (index < MPFS_PERIPH_OFFSET || index >= (MPFS_PERIPH_OFFSET + rcdev->nr_resets)) { in mpfs_reset_xlate()
126 dev_err(rcdev->dev, "Invalid reset index %u\n", index); in mpfs_reset_xlate()
137 struct reset_controller_dev *rcdev; in mpfs_reset_probe() local
146 rcdev = &rst->rcdev; in mpfs_reset_probe()
147 rcdev->dev = dev; in mpfs_reset_probe()
148 rcdev->dev->parent = dev->parent; in mpfs_reset_probe()
149 rcdev->ops = &mpfs_reset_ops; in mpfs_reset_probe()
150 rcdev->of_node = dev->parent->of_node; in mpfs_reset_probe()
151 rcdev->of_reset_n_cells = 1; in mpfs_reset_probe()
152 rcdev->of_xlate = mpfs_reset_xlate; in mpfs_reset_probe()
153 rcdev->nr_resets = MPFS_NUM_RESETS; in mpfs_reset_probe()
155 return devm_reset_controller_register(dev, rcdev); in mpfs_reset_probe()