Ed this question is kind of for you but maybe anyone else can answer. I have had a few requests to get "reboot" or "shutdown -r now" working on the RCA RM4100. Linux goes to reboot it just fine but after the reset the memory starts to initialize and then it just hangs. I wondering if this code works on the 3100 for reboots?
if (memory_initialized()) { asm volatile ("jmp __cpu_reset"); }
If so I am a little confused by it. It is saying if memory_initialized() is true (anything but 0); do the next part. But if you look at the function memory_initialized():
static inline int memory_initialized(void) { u32 drc; drc = pci_read_config32(NB_DEV, DRC); return (drc & (1<<29)); }
With the bit shift it is always going to be true (anything but 0). So, why the if statement? Am I making any sense?
On 05.05.2008 00:00, Joe wrote:
Ed this question is kind of for you but maybe anyone else can answer. I have had a few requests to get "reboot" or "shutdown -r now" working on the RCA RM4100. Linux goes to reboot it just fine but after the reset the memory starts to initialize and then it just hangs. I wondering if this code works on the 3100 for reboots?
if (memory_initialized()) { asm volatile ("jmp __cpu_reset"); }
If so I am a little confused by it. It is saying if memory_initialized() is true (anything but 0); do the next part. But if you look at the function memory_initialized():
static inline int memory_initialized(void) { u32 drc; drc = pci_read_config32(NB_DEV, DRC); return (drc & (1<<29)); }
With the bit shift it is always going to be true (anything but 0). So, why the if statement?
It's only true if bit 29 of DRC is set.
Regards, Carl-Daniel
On Mon, 05 May 2008 00:03:33 +0200, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
On 05.05.2008 00:00, Joe wrote:
Ed this question is kind of for you but maybe anyone else can answer. I have had a few requests to get "reboot" or "shutdown -r now" working on
the
RCA RM4100. Linux goes to reboot it just fine but after the reset the memory starts to initialize and then it just hangs. I wondering if this code works on the 3100 for reboots?
if (memory_initialized()) { asm volatile ("jmp __cpu_reset"); }
If so I am a little confused by it. It is saying if memory_initialized()
is
true (anything but 0); do the next part. But if you look at the function memory_initialized():
static inline int memory_initialized(void) { u32 drc; drc = pci_read_config32(NB_DEV, DRC); return (drc & (1<<29)); }
With the bit shift it is always going to be true (anything but 0). So,
why
the if statement?
It's only true if bit 29 of DRC is set.
My bad. Those & and | operators always get me... But does it allow the system to reboot?
On Sun, May 4, 2008 at 3:06 PM, Joe joe@settoplinux.org wrote:
My bad. Those & and | operators always get me... But does it allow the system to reboot?
Yes, rebooting works on the Intel 3100 development board. Can you increase the log level to 9 and see exactly where your board is hanging?
--Ed
On Mon, 5 May 2008 07:54:32 -0700, "Ed Swierk" eswierk@arastra.com wrote:
On Sun, May 4, 2008 at 3:06 PM, Joe joe@settoplinux.org wrote:
My bad. Those & and | operators always get me... But does it allow the system to reboot?
Yes, rebooting works on the Intel 3100 development board. Can you increase the log level to 9 and see exactly where your board is hanging?
I don't have a bootlog off hand, but when rebooting it just starts to loop after the northbridge dump in raminit.c. I think because it is just a soft reset the cpu needs a reset? That's why I was wondering if your code works. It should work fine for the RM4100, the DRC bit 29 is the same. I will give it a try and report back. I think, to keep things simplified I am just going to put the memory_initialized() function in raminit.c, and call it from auto.c.
On Tue, 06 May 2008 07:05:58 -0400, Joe joe@settoplinux.org wrote:
On Mon, 5 May 2008 07:54:32 -0700, "Ed Swierk" eswierk@arastra.com wrote:
On Sun, May 4, 2008 at 3:06 PM, Joe joe@settoplinux.org wrote:
My bad. Those & and | operators always get me... But does it allow the system to reboot?
Yes, rebooting works on the Intel 3100 development board. Can you increase the log level to 9 and see exactly where your board is hanging?
I don't have a bootlog off hand, but when rebooting it just starts to
loop
after the northbridge dump in raminit.c. I think because it is just a
soft
reset the cpu needs a reset? That's why I was wondering if your code works. It should work fine for the RM4100, the DRC bit 29 is the same. I will give it a try and report back. I think, to keep things simplified I am just going to put the memory_initialized() function in raminit.c, and call it from auto.c.
Well, it now seems to get further than before with the cpu reset. Attached is a full debug bootlog. Now it says "rebooting...", seems to skip memory initialization, and hangs on trying to re-initialize the devices. Help :-(
-- Thanks, Joseph Smith Set-Top-Linux www.settoplinux.org
On Mon, 5 May 2008 07:54:32 -0700, "Ed Swierk" eswierk@arastra.com wrote:
On Sun, May 4, 2008 at 3:06 PM, Joe joe@settoplinux.org wrote:
My bad. Those & and | operators always get me... But does it allow the system to reboot?
Yes, rebooting works on the Intel 3100 development board. Can you increase the log level to 9 and see exactly where your board is hanging?
I don't have a bootlog off hand, but when rebooting it just starts to
loop
after the northbridge dump in raminit.c. I think because it is just a
soft
reset the cpu needs a reset? That's why I was wondering if your code works. It should work fine for the RM4100, the DRC bit 29 is the same. I will give it a try and report back. I think, to keep things simplified I am just going to put the memory_initialized() function in raminit.c, and call it from auto.c.
Well, it now seems to get further than before with the cpu reset.
Attached
is a full debug bootlog. Now it says "rebooting...", seems to skip memory initialization, and hangs on trying to re-initialize the devices. Help :-(
Here is a thought. Couldn't I just tell it to do a hard reset if memory_initialized() is true?