Lines Matching refs:rcdev
35 static int mpfs_assert(struct reset_controller_dev *rcdev, unsigned long id)
42 reg = mpfs_reset_read(rcdev->dev);
44 mpfs_reset_write(rcdev->dev, reg);
51 static int mpfs_deassert(struct reset_controller_dev *rcdev, unsigned long id)
58 reg = mpfs_reset_read(rcdev->dev);
60 mpfs_reset_write(rcdev->dev, reg);
67 static int mpfs_status(struct reset_controller_dev *rcdev, unsigned long id)
69 u32 reg = mpfs_reset_read(rcdev->dev);
78 static int mpfs_reset(struct reset_controller_dev *rcdev, unsigned long id)
80 mpfs_assert(rcdev, id);
84 mpfs_deassert(rcdev, id);
96 static int mpfs_reset_xlate(struct reset_controller_dev *rcdev,
107 dev_err(rcdev->dev, "Resetting the fabric is not supported\n");
111 if (index < MPFS_PERIPH_OFFSET || index >= (MPFS_PERIPH_OFFSET + rcdev->nr_resets)) {
112 dev_err(rcdev->dev, "Invalid reset index %u\n", index);
123 struct reset_controller_dev *rcdev;
125 rcdev = devm_kzalloc(dev, sizeof(*rcdev), GFP_KERNEL);
126 if (!rcdev)
129 rcdev->dev = dev;
130 rcdev->dev->parent = dev->parent;
131 rcdev->ops = &mpfs_reset_ops;
132 rcdev->of_node = dev->parent->of_node;
133 rcdev->of_reset_n_cells = 1;
134 rcdev->of_xlate = mpfs_reset_xlate;
135 rcdev->nr_resets = MPFS_NUM_RESETS;
137 return devm_reset_controller_register(dev, rcdev);