BF537 fails to reboot(2008-11-13)

2008-11-13 12:41:28     BF537 fails to reboot

root strap (UNITED KINGDOM)

Message: 65247   

I am working on a BF537-0.3 and the reboot command fails to restart the system. The system hung and never resets. I am using  uClinux-dist-2008R1.5-RC3

It always gives the following output when I type "reboot"

-------------------------------------------------------------------

root:/> reboot

Restarting system.�

------------------------------------------------------------------

I have also changed the call to  in bfin_reset() found in "arch/blackfin/kernel/reboot.c"  asm ("raise 1;);  to

asm volatile("raise 1;");  But it doesn't make any difference. It is worth to mention that not all the boards have this problems, just some of them.

Any advice at this point will be very appriciated

Regards,

Andreas

QuoteReplyEditDelete

2008-11-13 12:45:44     Re: BF537 fails to reboot

Mike Frysinger (UNITED STATES)

Message: 65248   

please fully describe your hardware.  how are you booting the part ?

QuoteReplyEditDelete

2008-11-13 13:09:22     Re: BF537 fails to reboot

root strap (UNITED KINGDOM)

Message: 65249   

I am using a custom board based on BF537-STAMP with the same part selection.

Regards,

Andreas

QuoteReplyEditDelete

2008-11-13 15:45:14     Re: BF537 fails to reboot

Mike Frysinger (UNITED STATES)

Message: 65251   

that doesnt tell me how you're booting the part, nor exactly what kind of devices you have hooked up nor exactly what kind of logic you have between the processor and the devices.

"based on" is just too vague

QuoteReplyEditDelete

2008-11-13 19:21:05     Re: BF537 fails to reboot

Michael McTernan (UNITED KINGDOM)

Message: 65260   

Andreas sits over from me and works on the same plaform - the board's got a 4MB NOR flash which I think is in async bank 0 and contains the kernel image and u-boot; BMODE0/1/2 are all pulled down via 10Ks.  There isn't really any logic between the BF537-0.3 and the NOR, just a tiny 74LVC1G19 to operate the chip select on the NOR part.

Generally we can run the thing as though it is a BF537-STAMP since the part selections are the same, so the failure to reboot is a bit unexpected.

What should we look at first to try and get a handle on this one?

QuoteReplyEditDelete

2008-11-14 05:41:26     Re: BF537 fails to reboot

Mike Frysinger (UNITED STATES)

Message: 65290   

so async bank is for parallel flash and nothing else.  are you using the flash in any way when you reboot ?

when the board hangs, can you break in with JTAG and find out where the PC is sitting ?

QuoteReplyEditDelete

2008-11-14 07:39:46     Re: BF537 fails to reboot

Martin Strubel (SWITZERLAND)

Message: 65298   

Are you using a JFFS2 root file system or partition? I've had this before, but I don't really remember how I fixed it. When not using JFFS2 or unmounting it previously, the reboot may work, but I'm not sure, it's been a while ago.

Best regards,

- Martin

QuoteReplyEditDelete

2008-11-23 17:25:35     Re: BF537 fails to reboot

root strap (UNITED KINGDOM)

Message: 65730   

Thank you all for your replies.

Finally the problem solved. I put some code that I found in u-boot into machine_restart()

...I also tried to make sure  that u-boot and kernel have the same wait-states for external access.

2008 Linux kernel comes with machine_restart as follows:

__attribute__((weak))

void native_machine_restart(char *cmd)

{

}

void machine_restart(char *cmd)

{

        native_machine_restart(cmd);

        local_irq_disable();

        bfin_reset();

}

Whereas U-boot has the code machine_restart as:

void machine_restart(char *cmd)

{

        while (1)

           asm("jump (%0);" : : "a" (bfin_reset));

}

Regards

Andreas

PS: The function bfin_reset() for the kernel and  u-boot is exactly the same!

QuoteReplyEditDelete

2008-11-24 03:01:45     Re: BF537 fails to reboot

Mike Frysinger (UNITED STATES)

Message: 65741   

u-boot and the kernel should of course have exactly the same software reset code

you say you solved things but you didnt really describe how or what the actual problem is

QuoteReplyEditDelete

2008-11-24 04:11:20     Re: BF537 fails to reboot

Wolfgang Muees (GERMANY)

Message: 65742   

I have a custom BF 52x board and have exactly the same problem.

I boot from NAND or from serial flash.

So, please post how you solved this!

regards

Wolfgang

TranslateQuoteReplyEditDelete

2008-12-15 10:29:49     Re: BF537 fails to reboot

root strap (UNITED KINGDOM)

Message: 66716   

I didn't manage to get down to exact cause of the problem,  but that work-around fix  works

for BF537.

I had to get some code from the uboot and put it into the kernel reboot.

The code, that I put in reboot.c code of /linux/arch/blackfin/kernel/reboot.c

void machine_restart(char *cmd)

{

/* Work around fix for failures when rebooting the kernel      */

/* the original code can be seen in the pre-prosseror #else    */

/* statement below. This work around fix was taken from u-boot */

/* reboot code.                                                */

#ifdef CONFIG_BF537

        while (1)

           asm("jump (%0);" : : "a" (bfin_reset));

#else

        native_machine_restart(cmd);

        local_irq_disable();

        bfin_reset();

#endif

}

I also had to change u-boot to make sure that the access (wait-states) settings

are matching with the kernel's.

CONFIG_BANK_0=0x7BB0

CONFIG_BANK_1=0x7BB0

CONFIG_BANK_2=0x7BB0

CONFIG_BANK_3=0x99B3

I believe that this fix works only for BF537.

Best regards,

A

  • Created
  • Updated
Was this helpful?

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.