Lines Matching refs:ath79_reset

16 struct ath79_reset {  struct
28 struct ath79_reset *ath79_reset = in ath79_reset_update() argument
29 container_of(rcdev, struct ath79_reset, rcdev); in ath79_reset_update()
33 spin_lock_irqsave(&ath79_reset->lock, flags); in ath79_reset_update()
34 val = readl(ath79_reset->base); in ath79_reset_update()
39 writel(val, ath79_reset->base); in ath79_reset_update()
40 spin_unlock_irqrestore(&ath79_reset->lock, flags); in ath79_reset_update()
60 struct ath79_reset *ath79_reset = in ath79_reset_status() local
61 container_of(rcdev, struct ath79_reset, rcdev); in ath79_reset_status()
64 val = readl(ath79_reset->base); in ath79_reset_status()
78 struct ath79_reset *ath79_reset = in ath79_reset_restart_handler() local
79 container_of(nb, struct ath79_reset, restart_nb); in ath79_reset_restart_handler()
81 ath79_reset_assert(&ath79_reset->rcdev, FULL_CHIP_RESET); in ath79_reset_restart_handler()
88 struct ath79_reset *ath79_reset; in ath79_reset_probe() local
91 ath79_reset = devm_kzalloc(&pdev->dev, in ath79_reset_probe()
92 sizeof(*ath79_reset), GFP_KERNEL); in ath79_reset_probe()
93 if (!ath79_reset) in ath79_reset_probe()
96 ath79_reset->base = devm_platform_ioremap_resource(pdev, 0); in ath79_reset_probe()
97 if (IS_ERR(ath79_reset->base)) in ath79_reset_probe()
98 return PTR_ERR(ath79_reset->base); in ath79_reset_probe()
100 spin_lock_init(&ath79_reset->lock); in ath79_reset_probe()
101 ath79_reset->rcdev.ops = &ath79_reset_ops; in ath79_reset_probe()
102 ath79_reset->rcdev.owner = THIS_MODULE; in ath79_reset_probe()
103 ath79_reset->rcdev.of_node = pdev->dev.of_node; in ath79_reset_probe()
104 ath79_reset->rcdev.of_reset_n_cells = 1; in ath79_reset_probe()
105 ath79_reset->rcdev.nr_resets = 32; in ath79_reset_probe()
107 err = devm_reset_controller_register(&pdev->dev, &ath79_reset->rcdev); in ath79_reset_probe()
111 ath79_reset->restart_nb.notifier_call = ath79_reset_restart_handler; in ath79_reset_probe()
112 ath79_reset->restart_nb.priority = 128; in ath79_reset_probe()
114 err = register_restart_handler(&ath79_reset->restart_nb); in ath79_reset_probe()