This patch unify probing code using airoha SCU regmap helper, thus a
common function can be used instead of an7581/an7583 specific ones.
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
#include <linux/io.h>
#include <reset-uclass.h>
#include <regmap.h>
+#include <asm/arch/scu-regmap.h>
#include <dt-bindings/reset/airoha,en7581-reset.h>
static int airoha_reset_probe(struct udevice *dev)
{
struct airoha_reset_priv *priv = dev_get_priv(dev);
- int ret;
- ret = regmap_init_mem(dev_ofnode(dev), &priv->map);
- if (ret)
- return ret;
+ priv->map = airoha_get_scu_regmap();
+ if (IS_ERR(priv->map))
+ return PTR_ERR(priv->map);
priv->bank_ofs = en7581_rst_ofs;
priv->idx_map = en7581_rst_map;