Lines Matching +full:ast2500 +full:- +full:scu
1 // SPDX-License-Identifier: GPL-2.0
10 #include <reset-uclass.h>
18 struct ast2500_scu *scu; member
23 struct ast2500_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2500_reset_deassert()
24 struct ast2500_scu *scu = priv->scu; in ast2500_reset_deassert() local
27 debug("ast2500_reset_deassert reset_ctl->id %ld \n", reset_ctl->id); in ast2500_reset_deassert()
29 if(reset_ctl->id >= 32) in ast2500_reset_deassert()
30 clrbits_le32(&scu->sysreset_ctrl2 , BIT(reset_ctl->id - 32)); in ast2500_reset_deassert()
32 clrbits_le32(&scu->sysreset_ctrl1 , BIT(reset_ctl->id)); in ast2500_reset_deassert()
39 struct ast2500_reset_priv *priv = dev_get_priv(reset_ctl->dev); in ast2500_reset_assert()
40 struct ast2500_scu *scu = priv->scu; in ast2500_reset_assert() local
45 debug("ast2500_reset_assert reset_ctl->id %ld \n", reset_ctl->id); in ast2500_reset_assert()
51 reset_mode = ast_reset_mode_from_flags(reset_ctl->id); in ast2500_reset_assert()
52 reset_mask = ast_reset_mask_from_flags(reset_ctl->id); in ast2500_reset_assert()
57 ast_scu_unlock(priv->scu); in ast2500_reset_assert()
58 setbits_le32(&priv->scu->sysreset_ctrl1, in ast2500_reset_assert()
60 ret = wdt_expire_now(priv->wdt, reset_ctl->id); in ast2500_reset_assert()
61 clrbits_le32(&priv->scu->sysreset_ctrl1, in ast2500_reset_assert()
63 ast_scu_lock(priv->scu); in ast2500_reset_assert()
65 ret = wdt_expire_now(priv->wdt, reset_ctl->id); in ast2500_reset_assert()
68 if(reset_ctl->id >= 32) in ast2500_reset_assert()
69 setbits_le32(&scu->sysreset_ctrl2 , BIT(reset_ctl->id - 32)); in ast2500_reset_assert()
71 setbits_le32(&scu->sysreset_ctrl1 , BIT(reset_ctl->id)); in ast2500_reset_assert()
80 reset_ctl->dev, reset_ctl->id); in ast2500_reset_request()
91 /* find SCU base address from clock device */ in ast2500_reset_probe()
99 priv->scu = devfdt_get_addr_ptr(clk_dev); in ast2500_reset_probe()
100 if (IS_ERR(priv->scu)) { in ast2500_reset_probe()
101 debug("%s(): can't get SCU\n", __func__); in ast2500_reset_probe()
102 return PTR_ERR(priv->scu); in ast2500_reset_probe()
114 &priv->wdt); in ast2500_ofdata_to_platdata()
124 { .compatible = "aspeed,ast2500-reset" },