This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange DELAY macro in hal_platrom_setup.h


On Sun, 2006-02-26 at 16:49 +0200, Shmuel Vagner wrote:
> HI,
> In the platform initialization code for the IXP425 the SDRAM
> initialization uses a DELAY macro.
> The strange thing is that the delay macro is empty and does not do any
> delay (Note the #if 0 in the code below):
> 
> .macro DELAY cycles, reg0
> #if 0
>     ldr     \reg0, =\cycles
>     subs    \reg0, \reg0, #1
>     subne   pc,  pc, #0xc
> #endif
> .endm
> 
> I checked with the IXP425 and the SDRAM documentation and they state
> that delays are required. Moreover the initialization works fine and I
> did not notice any memory problems.
> 
> Can someone please explain this?

Your analysis is correct. This macro should have the delay enabled. I
probably turned off the delay for some debugging purpose and forgot to
turn it back on. The delay is necessary according to the docs but it
seems that it almost always works without the delay. It may take many
reboots before it fails to initialize SDRAM correctly, but I believe
that it will fail eventually.

--Mark



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]