Lines Matching refs:rst
30 struct axs10x_rst *rst = to_axs10x_rst(rcdev); in axs10x_reset_reset() local
33 spin_lock_irqsave(&rst->lock, flags); in axs10x_reset_reset()
34 writel(BIT(id), rst->regs_rst); in axs10x_reset_reset()
35 spin_unlock_irqrestore(&rst->lock, flags); in axs10x_reset_reset()
46 struct axs10x_rst *rst; in axs10x_reset_probe() local
49 rst = devm_kzalloc(&pdev->dev, sizeof(*rst), GFP_KERNEL); in axs10x_reset_probe()
50 if (!rst) in axs10x_reset_probe()
54 rst->regs_rst = devm_ioremap_resource(&pdev->dev, mem); in axs10x_reset_probe()
55 if (IS_ERR(rst->regs_rst)) in axs10x_reset_probe()
56 return PTR_ERR(rst->regs_rst); in axs10x_reset_probe()
58 spin_lock_init(&rst->lock); in axs10x_reset_probe()
60 rst->rcdev.owner = THIS_MODULE; in axs10x_reset_probe()
61 rst->rcdev.ops = &axs10x_reset_ops; in axs10x_reset_probe()
62 rst->rcdev.of_node = pdev->dev.of_node; in axs10x_reset_probe()
63 rst->rcdev.nr_resets = AXS10X_MAX_RESETS; in axs10x_reset_probe()
65 return devm_reset_controller_register(&pdev->dev, &rst->rcdev); in axs10x_reset_probe()