Merge tag 'u-boot-imx-20200623' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[oweals/u-boot.git] / drivers / sysreset / sysreset_socfpga.c
index d6c26a5b235c4c835506978b93dea6b2a49a231b..178bcb227ff878862c1f8abe8c1e0b0b94a2d56a 100644 (file)
 #include <sysreset.h>
 #include <asm/io.h>
 #include <asm/arch/reset_manager.h>
+#include <linux/bitops.h>
 
 struct socfpga_sysreset_data {
-       struct socfpga_reset_manager *rstmgr_base;
+       void __iomem *rstmgr_base;
 };
 
 static int socfpga_sysreset_request(struct udevice *dev,
@@ -23,11 +24,11 @@ static int socfpga_sysreset_request(struct udevice *dev,
        switch (type) {
        case SYSRESET_WARM:
                writel(BIT(RSTMGR_CTRL_SWWARMRSTREQ_LSB),
-                      &data->rstmgr_base->ctrl);
+                      data->rstmgr_base + RSTMGR_CTRL);
                break;
        case SYSRESET_COLD:
                writel(BIT(RSTMGR_CTRL_SWCOLDRSTREQ_LSB),
-                      &data->rstmgr_base->ctrl);
+                      data->rstmgr_base + RSTMGR_CTRL);
                break;
        default:
                return -EPROTONOSUPPORT;