View Single Post
Old 09-26-2012, 05:50 AM   #237
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by ixtab View Post
Could you give me a hint as to which file I should start looking at?
Not now, but later today (or tomorrow). Right now, I can just point to relevant part of Yifan Lu's code (which is in fact copied straight from Amazon's U-Boot)

Quote:
Originally Posted by ixtab View Post
At the moment, I'm completely overwhelmed by hundreds of new acronyms and completely confused by the structure of the u-boot source. The only thing I found so far is the include/configs/imx50_yoshi.h file (heck, I'm not even sure if that is the right one!), which seems to include the "scripts" (actually environment definitions) that are run on startup, and a bunch of #defines. But there isn't any actual code in there... so where is it?
Yeah, not very easy task... AFAIR, DDR initialization is defined as sequence of DCD commands... So look for keywords DCD, LPDDR, init in source and DCD section in Reference Manual. I have no access to U-Boot source right now, sorry.

Quote:
Originally Posted by ixtab View Post
Edit: I just realized that it's probably largely irrelevant, because there's none of our code being run - after all, the device is in USB Downloader mode, so that's *before* u-boot is even launched. And if the DRAM isn't accessible, then there's nothing we can do about it.

Which means that the magic will have to be done from u-boot, so we're probably back to the tftp idea. But any hints about u-boot (or in particular, where to look for in the code if I want to enable that tftp stuff) are still welcome!
Most ARM registers, including DRAM registers, are memory-mapped and USB downloader protocol has command to write data in memory. So long sequence of these commands with right values will initialize DRAM. In fact, this method (of using of write memory commands) is implemented in imx_usb_loader for executing DCD block of given Program Image.

TFTP is OK, but you should fit whole U-Boot in that 72k. And what size is it now?

I was planning to create Program Image including DCD for DRAM initialization and made of prepended small code for relocating initramfs and booting Linux kernel (no need for U-Boot, requirements for booting kernel on ARM are not easy but also not hard, they are doable in pretty small chunk of code), the Linux kernel itself and initramfs.
eureka is offline   Reply With Quote