mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 4/6] ARM: i.MX: Introduce IMX_SRC_SRSR
Date: Thu, 26 Apr 2018 22:49:44 -0700	[thread overview]
Message-ID: <20180427054946.11687-5-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20180427054946.11687-1-andrew.smirnov@gmail.com>

Offset for SRSR register in SRC IP block for i.MX51, i.MX53, i.MX6 and
VFxxx is exactly the same so define a single constant for that and
replace all of the SoC specific definitions.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/mach-imx/imx6.c                      | 2 +-
 arch/arm/mach-imx/include/mach/reset-reason.h | 4 +---
 arch/arm/mach-imx/vf610.c                     | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index dc09088ab..dfa861d38 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -223,7 +223,7 @@ int imx6_init(void)
 	}
 
 	imx_set_silicon_revision(cputypestr, mx6_silicon_revision);
-	imx_set_reset_reason(src + IMX6_SRC_SRSR, imx_reset_reasons);
+	imx_set_reset_reason(src + IMX_SRC_SRSR, imx_reset_reasons);
 	imx6_setup_ipu_qos();
 	imx6ul_enet_clk_init();
 
diff --git a/arch/arm/mach-imx/include/mach/reset-reason.h b/arch/arm/mach-imx/include/mach/reset-reason.h
index 0894b95ab..0f644a8c1 100644
--- a/arch/arm/mach-imx/include/mach/reset-reason.h
+++ b/arch/arm/mach-imx/include/mach/reset-reason.h
@@ -14,10 +14,8 @@
 #define IMX_SRC_SRSR_TEMPSENSE_RESET	BIT(9)
 #define IMX_SRC_SRSR_WARM_BOOT		BIT(16)
 
-#define IMX6_SRC_SRSR	0x008
+#define IMX_SRC_SRSR	0x008
 #define IMX7_SRC_SRSR	0x05c
-#define VF610_SRC_SRSR	0x008
-
 
 #define VF610_SRC_SRSR_SW_RST		BIT(18)
 #define VF610_SRC_SRSR_RESETB		BIT(7)
diff --git a/arch/arm/mach-imx/vf610.c b/arch/arm/mach-imx/vf610.c
index 3ac7c356f..b548cbcb5 100644
--- a/arch/arm/mach-imx/vf610.c
+++ b/arch/arm/mach-imx/vf610.c
@@ -56,6 +56,6 @@ int vf610_init(void)
 	}
 
 	imx_set_silicon_revision(cputypestr, vf610_cpu_revision());
-	imx_set_reset_reason(src + VF610_SRC_SRSR, vf610_reset_reasons);
+	imx_set_reset_reason(src + IMX_SRC_SRSR, vf610_reset_reasons);
 	return 0;
 }
-- 
2.14.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-04-27  5:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27  5:49 [PATCH 0/6] i.MX51, 53 reset reason detection support Andrey Smirnov
2018-04-27  5:49 ` [PATCH 1/6] ARM: i.MX51: Replace expicit casts with IOMEM Andrey Smirnov
2018-04-27  5:49 ` [PATCH 2/6] ARM: i.MX: Fix incorrect IMX_SRC_SRSR_CSU_RESET Andrey Smirnov
2018-04-27  5:49 ` [PATCH 3/6] ARM: i.MX: Make imx6_reset_reasons global Andrey Smirnov
2018-04-27  5:49 ` Andrey Smirnov [this message]
2018-04-27  5:49 ` [PATCH 5/6] ARM: i.MX53: Record reset reason as a part of startup Andrey Smirnov
2018-04-27  5:49 ` [PATCH 6/6] ARM: i.MX51: " Andrey Smirnov
2018-05-02 10:32 ` [PATCH 0/6] i.MX51, 53 reset reason detection support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180427054946.11687-5-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox