From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx: Remove duplicated code for Sequoia NAND booting version
Date: Thu, 16 Apr 2009 06:51:28 +0200 [thread overview]
Message-ID: <200904160651.28962.sr@denx.de> (raw)
In-Reply-To: <20090415215350.6343683420E8@gemini.denx.de>
Hi Wolfgang,
On Wednesday 15 April 2009, Wolfgang Denk wrote:
> > +++ b/board/amcc/sequoia/sdram.c
> > @@ -44,7 +44,7 @@ extern void denali_core_search_data_eye(void);
> > * for the 4k NAND boot image so define bus_frequency to 133MHz here
> > * which is save for the refresh counter setup.
> > */
> > -#define get_bus_freq(val) 133000000
> > +#define get_bus_freq(val) 133333333
> > #endif
>
> To me that does not look exactly like duplicated code removal...
Here a closer look at the patch:
-#define get_bus_freq(val) 133000000
+#define get_bus_freq(val) 133333333
#endif
/*************************************************************************
@@ -55,11 +55,7 @@ extern void denali_core_search_data_eye(void);
phys_size_t initdram (int board_type)
{
#if !defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
-#if !defined(CONFIG_NAND_SPL)
ulong speed = get_bus_freq(0);
-#else
- ulong speed = 133333333; /* 133MHz is on the safe side */
-#endif
As you can see, the top patch part changes the define of get_bus_frequency()
to 133333333. This define was only enabled (via ifdef) for the
CONFIG_NAND_SPL part:
#if defined(CONFIG_NAND_SPL)
/* Using cpu/ppc4xx/speed.c to calculate the bus frequency is too big
* for the 4k NAND boot image so define bus_frequency to 133MHz here
* which is save for the refresh counter setup.
*/
#define get_bus_freq(val) 133333333
#endif
And now the 2nd patch part makes sure that this define is really used.
So what the patch does is to remove an unused code part. Is this what you are
complaining about? If really needed I could resend this patch with a modified
patch subject.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2009-04-16 4:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 9:33 [U-Boot] [PATCH] ppc4xx: Remove duplicated code for Sequoia NAND booting version Stefan Roese
2009-04-15 21:53 ` Wolfgang Denk
2009-04-16 4:51 ` Stefan Roese [this message]
2009-04-16 5:13 ` Wolfgang Denk
2009-04-16 5:30 ` Stefan Roese
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=200904160651.28962.sr@denx.de \
--to=sr@denx.de \
--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