Lines Matching defs:rstc
46 struct hisi_reset_controller *rstc = to_hisi_reset_controller(rcdev);
54 spin_lock_irqsave(&rstc->lock, flags);
56 reg = readl(rstc->membase + offset);
57 writel(reg | BIT(bit), rstc->membase + offset);
59 spin_unlock_irqrestore(&rstc->lock, flags);
67 struct hisi_reset_controller *rstc = to_hisi_reset_controller(rcdev);
75 spin_lock_irqsave(&rstc->lock, flags);
77 reg = readl(rstc->membase + offset);
78 writel(reg & ~BIT(bit), rstc->membase + offset);
80 spin_unlock_irqrestore(&rstc->lock, flags);
92 struct hisi_reset_controller *rstc;
94 rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL);
95 if (!rstc)
98 rstc->membase = devm_platform_ioremap_resource(pdev, 0);
99 if (IS_ERR(rstc->membase))
102 spin_lock_init(&rstc->lock);
103 rstc->rcdev.owner = THIS_MODULE;
104 rstc->rcdev.ops = &hisi_reset_ops;
105 rstc->rcdev.of_node = pdev->dev.of_node;
106 rstc->rcdev.of_reset_n_cells = 2;
107 rstc->rcdev.of_xlate = hisi_reset_of_xlate;
108 reset_controller_register(&rstc->rcdev);
110 return rstc;
114 void hisi_reset_exit(struct hisi_reset_controller *rstc)
116 reset_controller_unregister(&rstc->rcdev);