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
92 ath79_reset = devm_kzalloc(&pdev->dev, in ath79_reset_probe()
93 sizeof(*ath79_reset), GFP_KERNEL); in ath79_reset_probe()
94 if (!ath79_reset) in ath79_reset_probe()
97 platform_set_drvdata(pdev, ath79_reset); in ath79_reset_probe()
100 ath79_reset->base = devm_ioremap_resource(&pdev->dev, res); in ath79_reset_probe()
101 if (IS_ERR(ath79_reset->base)) in ath79_reset_probe()
102 return PTR_ERR(ath79_reset->base); in ath79_reset_probe()
104 spin_lock_init(&ath79_reset->lock); in ath79_reset_probe()
105 ath79_reset->rcdev.ops = &ath79_reset_ops; in ath79_reset_probe()
106 ath79_reset->rcdev.owner = THIS_MODULE; in ath79_reset_probe()
107 ath79_reset->rcdev.of_node = pdev->dev.of_node; in ath79_reset_probe()
108 ath79_reset->rcdev.of_reset_n_cells = 1; in ath79_reset_probe()
109 ath79_reset->rcdev.nr_resets = 32; in ath79_reset_probe()
111 err = devm_reset_controller_register(&pdev->dev, &ath79_reset->rcdev); in ath79_reset_probe()
115 ath79_reset->restart_nb.notifier_call = ath79_reset_restart_handler; in ath79_reset_probe()
116 ath79_reset->restart_nb.priority = 128; in ath79_reset_probe()
118 err = register_restart_handler(&ath79_reset->restart_nb); in ath79_reset_probe()