Execute Reset via CheckStop approach
I would like to execute an Internal Hard Reset on an MPC860T bd. using the Checkstop Reset approach.
Does anyone have some code that I could utilize to implement this?
Thanks,
ShutEye Thinkin
Valcom, Inc.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 3 lines · In message <[email protected]> you wrote:
I would like to execute an Internal Hard Reset on an MPC860T bd. using the Checkstop Reset approach.
THis is what we do on all 8xx and 8260 systems.
Quoted 2 lines
Does anyone have some code that I could utilize to implement this?
Sure. Check out our 2.4.4 kernel tree; see
http://www.denx.de/solutions-en.html#CVS-Linux
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Nothing ever becomes real till it is experienced -- even a proverb is
no proverb to you till your life has illustrated it. - John Keats
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Here is something we found working:
-Govindan
#include <asm/8xx_immap.h>
#include <asm/mpc8xx.h>
#define IMAP_ADDR ((uint)0xff000000) /* Internal memory map
address for our board. */
#define PLPRCR_CSR 0x00000080 /* CheskStop Reset value */
int csreset (void)
{
unsigned int msr,addr;
((volatile immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr |= PLPRCR_CSR;
/* Interrupts and MMU off */
asm("mtspr 81,0");
asm("mfmsr %0": "=r"(msr));
msr &= ~0x1030;
asm ("mtmsr %0" : /* no output */ : "r" (msr));
addr = 0x10000000; // This should be a non-accessible memory
location.
((void (*)(void ))addr)();
return 0;
}-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Steven Vacca
Sent: Tuesday, July 23, 2002 7:16 PM
To: LinuxEmbeddedMailList (E-mail); [email protected]
Subject: Execute Reset via CheckStop approach
I would like to execute an Internal Hard Reset on an MPC860T bd. using the Checkstop Reset approach.
Does anyone have some code that I could utilize to implement this?
Thanks,
ShutEye Thinkin
Valcom, Inc.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 2 lines · In message <[email protected]> you…
Here is something we found working:
...
Quoted 2 lines
addr = 0x10000000; // This should be a non-accessible memorylocation.
The big disadvantage of this approach is that it works on one board, and fails on another - or even on the same board after you added some more RAM, etc.
We solved this problem in our version (see the CVS) by explicitely invalidating the mapping in the memory controller:
/* Get base address mapped by BR0/OR0
*/
bad_addr = ((immap_t *)IMAP_ADDR)->im_memctl.memc_br0 & 0xFFFF8000;
cli();
/* Enable CheckStop Reset
*/
((immap_t *)IMAP_ADDR)->im_clkrst.car_rmr |= 0x00000001;
/* Invalidate BR0 mapping
*/
((immap_t *)IMAP_ADDR)->im_memctl.memc_br0 = 0;
/* Set MSR and cause reset
*/
__asm__("mfmsr %0" : "=r" (msr) );
msr &= ~0x1000;
__asm__("mtmsr %0" : "=r" (msr) );
dummy = * (unsigned char *) bad_addr;
printk("Restart failed\n");
while(1);Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Microsoft Compatibility:
your old Windows 3.11 application crash exactly as the new ones.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/