• Home
  • Raw
  • Download

Lines Matching full:rstc

58 	struct hisi_reset_controller *rstc = to_hisi_reset_controller(rcdev);  in hisi_reset_assert()  local
66 spin_lock_irqsave(&rstc->lock, flags); in hisi_reset_assert()
68 reg = readl(rstc->membase + offset); in hisi_reset_assert()
69 writel(reg | BIT(bit), rstc->membase + offset); in hisi_reset_assert()
71 spin_unlock_irqrestore(&rstc->lock, flags); in hisi_reset_assert()
79 struct hisi_reset_controller *rstc = to_hisi_reset_controller(rcdev); in hisi_reset_deassert() local
87 spin_lock_irqsave(&rstc->lock, flags); in hisi_reset_deassert()
89 reg = readl(rstc->membase + offset); in hisi_reset_deassert()
90 writel(reg & ~BIT(bit), rstc->membase + offset); in hisi_reset_deassert()
92 spin_unlock_irqrestore(&rstc->lock, flags); in hisi_reset_deassert()
104 struct hisi_reset_controller *rstc; in hisi_reset_init() local
107 rstc = devm_kmalloc(&pdev->dev, sizeof(*rstc), GFP_KERNEL); in hisi_reset_init()
108 if (!rstc) in hisi_reset_init()
112 rstc->membase = devm_ioremap_resource(&pdev->dev, res); in hisi_reset_init()
113 if (IS_ERR(rstc->membase)) in hisi_reset_init()
116 spin_lock_init(&rstc->lock); in hisi_reset_init()
117 rstc->rcdev.owner = THIS_MODULE; in hisi_reset_init()
118 rstc->rcdev.ops = &hisi_reset_ops; in hisi_reset_init()
119 rstc->rcdev.of_node = pdev->dev.of_node; in hisi_reset_init()
120 rstc->rcdev.of_reset_n_cells = 2; in hisi_reset_init()
121 rstc->rcdev.of_xlate = hisi_reset_of_xlate; in hisi_reset_init()
122 reset_controller_register(&rstc->rcdev); in hisi_reset_init()
124 return rstc; in hisi_reset_init()
128 void hisi_reset_exit(struct hisi_reset_controller *rstc) in hisi_reset_exit() argument
130 reset_controller_unregister(&rstc->rcdev); in hisi_reset_exit()