Lines Matching refs:rcdev
34 static int mpfs_assert(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_assert() argument
41 reg = mpfs_reset_read(rcdev->dev); in mpfs_assert()
43 mpfs_reset_write(rcdev->dev, reg); in mpfs_assert()
50 static int mpfs_deassert(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_deassert() argument
57 reg = mpfs_reset_read(rcdev->dev); in mpfs_deassert()
59 mpfs_reset_write(rcdev->dev, reg); in mpfs_deassert()
66 static int mpfs_status(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_status() argument
68 u32 reg = mpfs_reset_read(rcdev->dev); in mpfs_status()
77 static int mpfs_reset(struct reset_controller_dev *rcdev, unsigned long id) in mpfs_reset() argument
79 mpfs_assert(rcdev, id); in mpfs_reset()
83 mpfs_deassert(rcdev, id); in mpfs_reset()
95 static int mpfs_reset_xlate(struct reset_controller_dev *rcdev, in mpfs_reset_xlate() argument
106 dev_err(rcdev->dev, "Resetting the fabric is not supported\n"); in mpfs_reset_xlate()
110 if (index < MPFS_PERIPH_OFFSET || index >= (MPFS_PERIPH_OFFSET + rcdev->nr_resets)) { in mpfs_reset_xlate()
111 dev_err(rcdev->dev, "Invalid reset index %u\n", index); in mpfs_reset_xlate()
122 struct reset_controller_dev *rcdev; in mpfs_reset_probe() local
124 rcdev = devm_kzalloc(dev, sizeof(*rcdev), GFP_KERNEL); in mpfs_reset_probe()
125 if (!rcdev) in mpfs_reset_probe()
128 rcdev->dev = dev; in mpfs_reset_probe()
129 rcdev->dev->parent = dev->parent; in mpfs_reset_probe()
130 rcdev->ops = &mpfs_reset_ops; in mpfs_reset_probe()
131 rcdev->of_node = dev->parent->of_node; in mpfs_reset_probe()
132 rcdev->of_reset_n_cells = 1; in mpfs_reset_probe()
133 rcdev->of_xlate = mpfs_reset_xlate; in mpfs_reset_probe()
134 rcdev->nr_resets = MPFS_NUM_RESETS; in mpfs_reset_probe()
136 return devm_reset_controller_register(dev, rcdev); in mpfs_reset_probe()