* [U-Boot] fls definition issue
@ 2009-09-17 11:47 Hu Mingkai-B21284
2009-09-17 12:00 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Hu Mingkai-B21284 @ 2009-09-17 11:47 UTC (permalink / raw)
To: u-boot
Hi all,
I run across an issue when startup the MPC8536DS board by using
the latest git tree. The system hanged when initialized the DDR.
U-Boot 2009.08-00197-g15fba32 (Sep 17 2009 - 18:15:50)
CPU: 8536E, Version: 1.1, (0x803f0091)
Core: E500, Version: 3.0, (0x80210030)
Clock Configuration:
CPU0:1499.985 MHz,
CCB:499.995 MHz,
DDR:333.330 MHz (666.660 MT/s data rate) (Asynchronous),
LBC:31.250 MHz
L1: D-cache 32 kB enabled
I-cache 32 kB enabled
Board: MPC8536DS Sys ID: 0x15, Sys Ver: 0x10, FPGA Ver: 0x13, vBank: 0
I2C: ready
DRAM: Initializing....ERROR
2 GB left unmapped
DDR:
I traced the code and found the variable law_sz_enc got an
error value when call __ilog2_u64 in the function set_ddr_laws.
The inline function __ilog2_u64 will call fls inline function
finally, but the fls is defined as a variable by the commit
52d61227b66d4099b39c8309ab37cb67ee09a405 in the platform specific
bitops.h file.
include/asm-ppc/bitops.h:
static __inline__ int fls(unsigned int x)
{
return __ilog2(x) + 1;
}
#define fls
So when called fls, which one will be used?
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot] fls definition issue
2009-09-17 11:47 [U-Boot] fls definition issue Hu Mingkai-B21284
@ 2009-09-17 12:00 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-09-17 12:00 UTC (permalink / raw)
To: u-boot
On Thursday 17 September 2009 13:47:58 Hu Mingkai-B21284 wrote:
> I traced the code and found the variable law_sz_enc got an
> error value when call __ilog2_u64 in the function set_ddr_laws.
>
> The inline function __ilog2_u64 will call fls inline function
> finally, but the fls is defined as a variable by the commit
> 52d61227b66d4099b39c8309ab37cb67ee09a405 in the platform specific
> bitops.h file.
>
> include/asm-ppc/bitops.h:
> static __inline__ int fls(unsigned int x)
> {
> return __ilog2(x) + 1;
> }
> #define fls
>
> So when called fls, which one will be used?
> From the experiments, I got the latter called, but I don't find
> the root reason, any clues?
This problem is already known, and Simon (on Cc) is currently working on a
patch to fix it. Should be ready this afternoon...
Cheers,
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] 2+ messages in thread
end of thread, other threads:[~2009-09-17 12:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 11:47 [U-Boot] fls definition issue Hu Mingkai-B21284
2009-09-17 12:00 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox