public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MX51: mx51evk: Use struct to access SRSR register instead of offset
Date: Wed, 13 Apr 2011 00:02:05 -0300	[thread overview]
Message-ID: <1302663725-32748-1-git-send-email-festevam@gmail.com> (raw)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx51evk/mx51evk.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 02a765d..3f2217c 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -431,6 +431,10 @@ int board_late_init(void)
 
 int checkboard(void)
 {
+	u32 reset;
+	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
+	reset = src_regs->srsr;
+
 	puts("Board: MX51EVK ");
 
 	switch (system_rev & 0xff) {
@@ -452,7 +456,7 @@ int checkboard(void)
 		break;
 	}
 
-	switch (__raw_readl(SRC_BASE_ADDR + 0x8)) {
+	switch (reset) {
 	case 0x0001:
 		puts("POR");
 		break;
-- 
1.6.0.4

             reply	other threads:[~2011-04-13  3:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  3:02 Fabio Estevam [this message]
2011-04-13  3:08 ` [U-Boot] [PATCH] MX51: mx51evk: Use struct to access SRSR register instead of offset Jason Liu
2011-04-13 10:22 ` Sergei Shtylyov

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=1302663725-32748-1-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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