From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] mpc86xx: set the DDR BATs after calculating true DDR size
Date: Tue, 30 Mar 2010 13:42:45 -0500 [thread overview]
Message-ID: <4BB24625.3090004@freescale.com> (raw)
In-Reply-To: <582D759A-EECE-4F12-9DC2-DE114BF717A9@kernel.crashing.org>
Becky Bruce wrote:
> At the very least, fix this comment to mention the problem with not
> being able to map all the RAM as well, if you're going to leave it
> that way.
Isn't that what the comment already says? "region mapped by DBAT0" == "map all the RAM"?
> Can you test a board with a strange amount of RAM (1.5GB,
> or something), and see what happens with this patch? I really don't
> like leaving things this way.
I'm pretty sure that U-Boot will machine check during relocation. That's what the comment says. I haven't tried it though. I could probably set up bullwinkle later this week with 1.5GB and try it.
>> +#define TO_BATU_BL(x) \
>> + (u32)((((1ull << __ilog2_u64((u64)x)) / (128 * 1024)) - 1) * 4)
>
> It's a nit, but can we change the *4 to << 2 ? I know most modern
> compilers should optimize this, but I think it makes the code easier
> to read and is logically more sensical, and if you've got to change
> the patch, anyway, we might as well clean this up.
I used a spreadsheet to help me figure out the algorithm, so I wouldn't say that << 2 is more sensical, but I don't really care either way. I don't see how it improves the readability, though.
--
Timur Tabi
Linux kernel developer@Freescale
next prev parent reply other threads:[~2010-03-30 18:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 14:25 [U-Boot] [PATCH v2] mpc86xx: set the DDR BATs after calculating true DDR size Kumar Gala
2010-03-30 14:37 ` Timur Tabi
2010-03-30 15:14 ` Kumar Gala
2010-03-30 15:21 ` Timur Tabi
2010-03-30 15:29 ` Kumar Gala
2010-03-30 15:32 ` Timur Tabi
2010-03-30 15:33 ` Kumar Gala
2010-03-30 15:35 ` Timur Tabi
2010-03-30 17:12 ` Becky Bruce
2010-03-30 17:02 ` Becky Bruce
2010-03-30 17:05 ` Becky Bruce
2010-03-30 18:42 ` Timur Tabi [this message]
2010-03-30 21:19 ` Timur Tabi
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=4BB24625.3090004@freescale.com \
--to=timur@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.