Lines Matching +full:reset +full:- +full:delay +full:- +full:us
1 // SPDX-License-Identifier: GPL-2.0
3 * Broadcom STB generic reset controller for SW_INIT style reset controller
8 #include <linux/delay.h>
14 #include <linux/reset-controller.h>
46 writel_relaxed(SW_INIT_BIT(id), priv->base + off + SW_INIT_SET); in brcmstb_reset_assert()
57 writel_relaxed(SW_INIT_BIT(id), priv->base + off + SW_INIT_CLEAR); in brcmstb_reset_deassert()
58 /* Maximum reset delay after de-asserting a line and seeing block in brcmstb_reset_deassert()
59 * operation is typically 14us for the worst case, build some slack in brcmstb_reset_deassert()
73 return readl_relaxed(priv->base + off + SW_INIT_STATUS) & in brcmstb_reset_status()
85 struct device *kdev = &pdev->dev; in brcmstb_reset_probe()
91 return -ENOMEM; in brcmstb_reset_probe()
94 priv->base = devm_ioremap_resource(kdev, res); in brcmstb_reset_probe()
95 if (IS_ERR(priv->base)) in brcmstb_reset_probe()
96 return PTR_ERR(priv->base); in brcmstb_reset_probe()
100 priv->rcdev.owner = THIS_MODULE; in brcmstb_reset_probe()
101 priv->rcdev.nr_resets = DIV_ROUND_DOWN_ULL(resource_size(res), in brcmstb_reset_probe()
103 priv->rcdev.ops = &brcmstb_reset_ops; in brcmstb_reset_probe()
104 priv->rcdev.of_node = kdev->of_node; in brcmstb_reset_probe()
107 return devm_reset_controller_register(kdev, &priv->rcdev); in brcmstb_reset_probe()
111 { .compatible = "brcm,brcmstb-reset" },
118 .name = "brcmstb-reset",
125 MODULE_DESCRIPTION("Broadcom STB reset controller");