PERFORCE change 109320 for review
Olivier Houchard
cognet at FreeBSD.org
Mon Nov 6 00:43:34 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=109320
Change 109320 by cognet at cognet on 2006/11/06 00:43:18
Ok, change the way we do the reset to use the watchdog instead, by
starting it up with a timeout of 0.
The previous way of jumping into the address 0 of the rom didn't
work everytime, I don't know why.
Affected files ...
.. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#15 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#15 (text+ko) ====
@@ -169,34 +169,14 @@
void
cpu_reset(void)
{
- u_int32_t reg;
- (void) disable_interrupts(I32_bit|F32_bit);
- IXPREG(IXP425_INT_ENABLE) = 0;
- /*
- * Map the boot Flash device down at physical address 0.
- */
- reg = bus_space_read_4(&ixp425_bs_tag, IXP425_EXP_VBASE,
- EXP_CNFG0_OFFSET);
- reg |= EXP_CNFG0_MEM_MAP;
- bus_space_write_4(&ixp425_bs_tag, IXP425_EXP_VBASE,
- EXP_CNFG0_OFFSET, reg);
- cpu_idcache_wbinv_all();
- cpu_control(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE
- | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE
- , 0xffffffff);
-
- /* Jump into the bootcode's reset vector. */
- __asm __volatile(
- "mrc p15, 0, %0, c1, c0, 0\n"
- "bic %0, %0, #1\n" /* Disable MMU */
- "mcr p15, 0, %0, c1, c0, 0\n"
- "nop\n"
- "nop\n"
- "nop\n"
- "mov pc, #0\n"
- : "=r" (reg));
-
+ bus_space_write_4(&ixp425_bs_tag, IXP425_TIMER_VBASE,
+ IXP425_OST_WDOG_KEY, OST_WDOG_KEY_MAJICK);
+ bus_space_write_4(&ixp425_bs_tag, IXP425_TIMER_VBASE,
+ IXP425_OST_WDOG, 0);
+ bus_space_write_4(&ixp425_bs_tag, IXP425_TIMER_VBASE,
+ IXP425_OST_WDOG_ENAB, OST_WDOG_ENAB_RST_ENA |
+ OST_WDOG_ENAB_CNT_ENA);
printf("Reset failed!\n");
for(;;);
}
More information about the p4-projects
mailing list