Date: Mon, 6 Nov 2006 00:43:33 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 109320 for review Message-ID: <200611060043.kA60hXPs025960@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109320 Change 109320 by cognet@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(;;); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611060043.kA60hXPs025960>