From: Vasili Galka <vvv444@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] Fix bug in T4240QDS code. Don't access nonexistent registers
Date: Mon, 16 Jun 2014 17:41:18 +0300 [thread overview]
Message-ID: <1402929678-7496-1-git-send-email-vvv444@gmail.com> (raw)
The code in misc_init_r() verifies actual SERDES clocks versus
expected. It supposes that the number of clocks is MAX_SERDES.
However, the number of pllcr0 registers is only SRDS_MAX_BANK. This
clearly results in access to wrong memory. I don't have the datasheet
to design a correct solution, but at least let's change it to access
only the existing registers.
Signed-off-by: Vasili Galka <vvv444@gmail.com>
Cc: York Sun <yorksun@freescale.com>
---
board/freescale/t4qds/t4240qds.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c
index fe1bc7f..6646042 100644
--- a/board/freescale/t4qds/t4240qds.c
+++ b/board/freescale/t4qds/t4240qds.c
@@ -662,7 +662,7 @@ int misc_init_r(void)
}
}
- for (i = 0; i < MAX_SERDES; i++) {
+ for (i = 0; i < SRDS_MAX_BANK; i++) {
u32 pllcr0 = srds_regs->bank[i].pllcr0;
u32 expected = pllcr0 & SRDS_PLLCR0_RFCK_SEL_MASK;
if (expected != actual[i]) {
--
1.7.9
next reply other threads:[~2014-06-16 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 14:41 Vasili Galka [this message]
2014-06-17 15:55 ` [U-Boot] [RFC PATCH] Fix bug in T4240QDS code. Don't access nonexistent registers York Sun
2014-07-22 21:16 ` York Sun
2014-07-22 21:31 ` York Sun
2014-07-23 1:59 ` Shaohui Xie
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=1402929678-7496-1-git-send-email-vvv444@gmail.com \
--to=vvv444@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