return 0;
}
+static int ast2500_reset_status(struct reset_ctl *reset_ctl)
+{
+ struct ast2500_reset_priv *priv = dev_get_priv(reset_ctl->dev);
+ struct ast2500_scu *scu = priv->scu;
+ int status;
+
+ debug("%s: reset_ctl->id: %lu\n", __func__, reset_ctl->id);
+
+ if (reset_ctl->id < 32)
+ status = BIT(reset_ctl->id) & readl(&scu->sysreset_ctrl1);
+ else
+ status = BIT(reset_ctl->id - 32) & readl(&scu->sysreset_ctrl2);
+
+ return !!status;
+}
+
+
+
static int ast2500_reset_probe(struct udevice *dev)
{
int rc;
struct reset_ops ast2500_reset_ops = {
.rst_assert = ast2500_reset_assert,
.rst_deassert = ast2500_reset_deassert,
+ .rst_status = ast2500_reset_status,
};
U_BOOT_DRIVER(ast2500_reset) = {
return 0;
}
+static int ast2600_reset_status(struct reset_ctl *reset_ctl)
+{
+ struct ast2600_reset_priv *priv = dev_get_priv(reset_ctl->dev);
+ struct ast2600_scu *scu = priv->scu;
+ int status;
+
+ debug("%s: reset_ctl->id: %lu\n", __func__, reset_ctl->id);
+
+ if (reset_ctl->id < 32)
+ status = BIT(reset_ctl->id) & readl(&scu->modrst_ctrl1);
+ else
+ status = BIT(reset_ctl->id - 32) & readl(&scu->modrst_ctrl2);
+
+ return !!status;
+}
+
static int ast2600_reset_probe(struct udevice *dev)
{
int rc;
struct reset_ops ast2600_reset_ops = {
.rst_assert = ast2600_reset_assert,
.rst_deassert = ast2600_reset_deassert,
+ .rst_status = ast2600_reset_status,
};
U_BOOT_DRIVER(ast2600_reset) = {