[meta-xilinx] u-boot SPL boot fail with CONFIG_HW_WATCHDOG
Mike Looijmans
mike.looijmans at topic.nl
Wed Mar 26 03:44:24 PDT 2014
On 03/26/2014 11:10 AM, Mike Looijmans wrote:
> On 03/26/2014 10:26 AM, Mike Looijmans wrote:
>> For a custom board with an external GPIO controlled watchdog, I tried adding
>> watchdog support to u-boot. (using master-next from u-boot-xlnx)
>>
>> The watchdog support works (I'm using a LED for now until the real hardware
>> arrives), I just defined CONFIG_HW_WATCHDOG and added a reset routine that
>> bitbangs the GPIO registers which should feed the watchdog. I can see the LED
>> blink, so the GPIO routines appear to work well.
>>
>> However, this causes the board to fail to boot the kernel.
>>
>> If I define CONFIG_HW_WATCHDOG and leave the hw_watchdog_*() methods empty, so
>> that there SHOULD be no effect, the kernel will not boot and the system hangs
>> immediately after "Starting kernel...". Removing the define from the board
>> config makes that problem go away. If I call the GPIO routines from the board
>> code in u-boot, the kernel still boots fine too.
>>
>> The zynq has no support for any WATCHDOG yet, so I have no idea what could
>> cause this behaviour.
>>
>> I'm looking for a possible cause. Any ideas?
>
> I've found a workaround: Setting CHUNKSZ to 16MB fixes the issue. Apparently
> there's a problem in a chunked memcpy routine?
Indeed. That routine assumes that the memory areas do not overlap.
In my attempt to get XIP and prevent a 4MB memory copy, I set the load address
to 0x79C0, so that the kernel would load at 0x8000 directly. On closer
inspection, this does not work, because "something" rounds that address down
(probably to DMA boundary?) to 0x7A00 before continuing. Thus the kernel loads
at 0x7A00 and must be moved, so my XIP never worked.
So I might as well get rid of that too, to solve both problems at once...
Met vriendelijke groet / kind regards,
Mike Looijmans
TOPIC Embedded Systems
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: (+31) (0) 499 33 69 79
Telefax: (+31) (0) 499 33 69 70
E-mail: mike.looijmans at topic.nl
Website: www.topic.nl
Please consider the environment before printing this e-mail
More information about the meta-xilinx
mailing list