* [U-Boot] Problem in relocate_code on Xilinx FPGA
@ 2009-04-18 8:09 Seyyed Mohammad Sajjadi
2009-04-18 12:08 ` Jerry Van Baren
0 siblings, 1 reply; 4+ messages in thread
From: Seyyed Mohammad Sajjadi @ 2009-04-18 8:09 UTC (permalink / raw)
To: u-boot
Hi
I am trying to use u-boot on a Xilinx V4FX12 FPGA, in which a ppc405 system is running. The board includes an ST SPI Flash, which I have to use as the only non-volatile memory available (in case important, its Atmark Techno suzaku_v sz410).
I have been able to add the board configuration in u-boot and build an image. But, as ppc405 in xilinx fpga can't but from spi flash, I have to use a first stage bootloader to load u-boot. This seems to be normal in xilinx FPGAs as u-boot in petalinux is loaded to. I thaught, if that's the case, I should be able to load u-boot directly to DDR and test it. But when I do so, u-boot hangs after it reaches relocate_code. I should be missing sth, but don't find it. Could anybody help me?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Problem in relocate_code on Xilinx FPGA
2009-04-18 8:09 [U-Boot] Problem in relocate_code on Xilinx FPGA Seyyed Mohammad Sajjadi
@ 2009-04-18 12:08 ` Jerry Van Baren
2009-04-18 15:17 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Jerry Van Baren @ 2009-04-18 12:08 UTC (permalink / raw)
To: u-boot
Seyyed Mohammad Sajjadi wrote:
> Hi
>
> I am trying to use u-boot on a Xilinx V4FX12 FPGA, in which a ppc405
> system is running. The board includes an ST SPI Flash, which I have
> to use as the only non-volatile memory available (in case important,
> its Atmark Techno suzaku_v sz410).
>
> I have been able to add the board configuration in u-boot and build
> an image. But, as ppc405 in xilinx fpga can't but from spi flash, I
> have to use a first stage bootloader to load u-boot. This seems to be
> normal in xilinx FPGAs as u-boot in petalinux is loaded to. I
> thaught, if that's the case, I should be able to load u-boot directly
> to DDR and test it. But when I do so, u-boot hangs after it reaches
> relocate_code. I should be missing sth, but don't find it. Could
> anybody help me?
Hi Seyyed,
I'm not familiar with your hardware (including using the ppc405), but if
I understand you correctly, you are trying to manually (e.g. via a
debugger) load a test u-boot into DDR and then run it from there.
The typical problem with this approach is that your code does the DDR
initialization *while running out of DDR*. While DDR is being
initialized, it doesn't work as RAM, which causes your program to crash.
You need to find all of your DDR and processor initialization that
causes u-boot initialization to crash, and disable it. There are board
configurations that do this with #if constructs, but I don't remember
which ones.
For the discouraging discussion, see:
<http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM>
Best regards,
gvb
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Problem in relocate_code on Xilinx FPGA
2009-04-18 12:08 ` Jerry Van Baren
@ 2009-04-18 15:17 ` Grant Likely
2009-04-18 17:19 ` [U-Boot] Any Xilinx SPI Driver on U-boot? Seyyed Mohammad Sajjadi
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2009-04-18 15:17 UTC (permalink / raw)
To: u-boot
On Sat, Apr 18, 2009 at 6:08 AM, Jerry Van Baren <gvb.uboot@gmail.com> wrote:
> Seyyed Mohammad Sajjadi wrote:
>> Hi
>>
>> I am trying to use u-boot on a Xilinx V4FX12 FPGA, in which a ppc405
>> system is running. The board includes an ST SPI Flash, which I have
>> to use as the only non-volatile memory available (in case important,
>> its Atmark Techno suzaku_v sz410).
>>
>> I have been able to add the board configuration in u-boot and build
>> an image. But, as ppc405 in xilinx fpga can't but from spi flash, I
>> have to use a first stage bootloader to load u-boot. This seems to be
>> normal in xilinx FPGAs as u-boot in petalinux is loaded to. I
>> thaught, if that's the case, I should be able to load u-boot directly
>> to DDR and test it. But when I do so, u-boot hangs after it reaches
>> relocate_code. I should be missing sth, but don't find it. Could
>> anybody help me?
>
> Hi Seyyed,
>
> I'm not familiar with your hardware (including using the ppc405), but if
> I understand you correctly, you are trying to manually (e.g. via a
> debugger) load a test u-boot into DDR and then run it from there.
>
> The typical problem with this approach is that your code does the DDR
> initialization *while running out of DDR*. ?While DDR is being
> initialized, it doesn't work as RAM, which causes your program to crash.
Probably not the case here. The Virtex is an interesting platform
because DDR is already configured when the processor comes out of
reset. The software doesn't even have the ability to modify the DDR
configuration.
> You need to find all of your DDR and processor initialization that
> causes u-boot initialization to crash, and disable it. ?There are board
> configurations that do this with #if constructs, but I don't remember
> which ones.
This should already be the case for Virtex.
Seyyed, what you are trying to do is also already done for
ml507_config. Try looking at that code for hints.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Any Xilinx SPI Driver on U-boot?
2009-04-18 15:17 ` Grant Likely
@ 2009-04-18 17:19 ` Seyyed Mohammad Sajjadi
0 siblings, 0 replies; 4+ messages in thread
From: Seyyed Mohammad Sajjadi @ 2009-04-18 17:19 UTC (permalink / raw)
To: u-boot
I could pass the relocate_code portion in my design (Suaku_V/Xilinx Virtex 4-PPC405). I had some minor issues setting RAM variables, which I could solve using ppc405-generic platform.
Now I am stuck at xilinx spi driver. I tried to develop a polled mode driver using xilinx standalone and linux drivers for spi. But the driver seems not to work, as it returns 0 all the time. hasn't anybody developed a driver for that in u-boot?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-18 17:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-18 8:09 [U-Boot] Problem in relocate_code on Xilinx FPGA Seyyed Mohammad Sajjadi
2009-04-18 12:08 ` Jerry Van Baren
2009-04-18 15:17 ` Grant Likely
2009-04-18 17:19 ` [U-Boot] Any Xilinx SPI Driver on U-boot? Seyyed Mohammad Sajjadi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.