From: E Robertson Date: Thu, 27 Sep 2007 13:01:06 -0500 Subject: [U-Boot-Users] FPGA loading question In-Reply-To: <46FBEA2A.3070806@qstreams.com> References: <3972542e0709261348j2895ea66vb906f1fee761b559@mail.gmail.com> <200709271521.55586.matthias.fuchs@esd-electronics.com> <200709271747.28229.sr@denx.de> <3972542e0709270910m2ab84a80td1017771b81af2bb@mail.gmail.com> <46FBEA2A.3070806@qstreams.com> Message-ID: <3972542e0709271101n4929c08bp381e7d75c3ce72e8@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 9/27/07, Ben Warren wrote: > E Robertson wrote: > > On 9/27/07, Stefan Roese wrote: > > > >> Hi Matthias, > >> > >> On Thursday 27 September 2007, Matthias Fuchs wrote: > >> > >>> What kind of CPU are you using? Please note that 4xx U-Boot ports have > >>> the cache disabled. Without cache booting a Spartan 3E in SS-mode > >>> may take very very :-( > >>> > >> Only 44x have cache disabled. 40x has icache enabled. > >> > >> BTW: I'm still waiting for the patch to enable the cache on 44x systems... ;) > >> > >> Viele Gr??e, > >> Stefan > >> > > > > I'm using an NXP ARM9 'A404 and can disable cache on my platform. Due > > to my hardware fool-up, I'll have to use a bit banging method. > > I'm also concern about loading error and recovery and I'm considering > > instead to do the programming in the kernel. If there is a problem for > > some reason and the FPGA needs to be reloaded, I'll have to do it in > > the kernel anyway. > > I'm not sure about embedding a bin file in the kernel driver either > > but It's worth pursuing. > > > If your design can wait until Linux is booted before programming the > FPGA, you have a world of possibilities available. In my designs, I > have a simple char driver with a 'write' method that bit-bangs the image > in. This way you can keep your image as a file in the file system and > can add whatever encryption, wrapper or whatever your heart desires. It > makes trying different FPGA images a breeze. I'm actually in the middle of doing that with a simple char device driver. I have'n't got to the bit banging write part yet but I'll appreciate a code snip that actually parses the file for the bits. I'm assuming it'll be some sort of shift right for a char read increment or some sort of XOR operation. I haven't thought through that part yet but is that how is normally done?