* [U-Boot] [PATCH v2] ppc4xx: Remove unused code for Sequoia NAND booting version
@ 2009-04-16 7:13 Stefan Roese
2009-04-16 8:59 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2009-04-16 7:13 UTC (permalink / raw)
To: u-boot
The current define of get_bus_freq() in the CONFIG_NAND_SPL #ifdef is not
used at all. This patch changes it's define to the currently used value of
133333333 and removes the unnecessary code.
Signed-off-by: Stefan Roese <sr@denx.de>
---
board/amcc/sequoia/sdram.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/board/amcc/sequoia/sdram.c b/board/amcc/sequoia/sdram.c
index c26e6ee..6df4c6d 100644
--- a/board/amcc/sequoia/sdram.c
+++ 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
/*************************************************************************
@@ -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
mtsdram(DDR0_02, 0x00000000);
--
1.6.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] ppc4xx: Remove unused code for Sequoia NAND booting version
2009-04-16 7:13 [U-Boot] [PATCH v2] ppc4xx: Remove unused code for Sequoia NAND booting version Stefan Roese
@ 2009-04-16 8:59 ` Wolfgang Denk
2009-04-16 9:16 ` Stefan Roese
2009-04-16 9:19 ` Stefan Roese
0 siblings, 2 replies; 4+ messages in thread
From: Wolfgang Denk @ 2009-04-16 8:59 UTC (permalink / raw)
To: u-boot
Dear Stefan Roese,
In message <1239866038-32703-1-git-send-email-sr@denx.de> you wrote:
> The current define of get_bus_freq() in the CONFIG_NAND_SPL #ifdef is not
> used at all. This patch changes it's define to the currently used value of
> 133333333 and removes the unnecessary code.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
> board/amcc/sequoia/sdram.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/board/amcc/sequoia/sdram.c b/board/amcc/sequoia/sdram.c
> index c26e6ee..6df4c6d 100644
> --- a/board/amcc/sequoia/sdram.c
> +++ 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
>
> /*************************************************************************
> @@ -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
>
> mtsdram(DDR0_02, 0x00000000);
Overwriting the function definition in "cpu/ppc4xx/speed.c" with a
#define like here is pretty ugly.
Looking closer at this, I think the whole implementation of
get_bus_freq() needs to be cleaned up. Why does get_bus_freq() need
an agument? I don't see it used anywhere - not on 4xx nor on any
other architecture.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I knew then (in 1970) that a 4-kbyte minicomputer would cost as much
as a house. So I reasoned that after college, I'd have to live
cheaply in an apartment and put all my money into owning a computer."
- Apple co-founder Steve Wozniak, EE Times, June 6, 1988, pg 45
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] ppc4xx: Remove unused code for Sequoia NAND booting version
2009-04-16 8:59 ` Wolfgang Denk
@ 2009-04-16 9:16 ` Stefan Roese
2009-04-16 9:19 ` Stefan Roese
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2009-04-16 9:16 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On Thursday 16 April 2009, Wolfgang Denk wrote:
> Overwriting the function definition in "cpu/ppc4xx/speed.c" with a
> #define like here is pretty ugly.
>
> Looking closer at this, I think the whole implementation of
> get_bus_freq() needs to be cleaned up. Why does get_bus_freq() need
> an agument? I don't see it used anywhere - not on 4xx nor on any
> other architecture.
Agreed. But this is a bigger task. Perhaps their is some volunteer somewhere
doing such a cleanup.
But back to my little patch. What exactly do you want me to do now? With my
patch the situation changes definitely to the better (from my point of view).
But I can easily drop this patch from my patch series if you really don't
want this change.
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
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] ppc4xx: Remove unused code for Sequoia NAND booting version
2009-04-16 8:59 ` Wolfgang Denk
2009-04-16 9:16 ` Stefan Roese
@ 2009-04-16 9:19 ` Stefan Roese
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2009-04-16 9:19 UTC (permalink / raw)
To: u-boot
On Thursday 16 April 2009, Wolfgang Denk wrote:
> Overwriting the function definition in "cpu/ppc4xx/speed.c" with a
> #define like here is pretty ugly.
BTW: speed.c is not compiled in this NAND-booting version because of size
reasons (4k limit). Forgot to mention this in my previous mail.
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
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-16 9:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 7:13 [U-Boot] [PATCH v2] ppc4xx: Remove unused code for Sequoia NAND booting version Stefan Roese
2009-04-16 8:59 ` Wolfgang Denk
2009-04-16 9:16 ` Stefan Roese
2009-04-16 9:19 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox