i81342.c (256281) | i81342.c (278613) |
---|---|
1/*- 2 * Copyright (c) 2006 Olivier Houchard 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 * POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 Olivier Houchard 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 * POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: stable/10/sys/arm/xscale/i8134x/i81342.c 238545 2012-07-17 03:18:12Z gonzo $"); | 28__FBSDID("$FreeBSD: stable/10/sys/arm/xscale/i8134x/i81342.c 278613 2015-02-12 03:50:33Z ian $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35 36#define _ARM32_BUS_DMA_PRIVATE | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35 36#define _ARM32_BUS_DMA_PRIVATE |
37#include <machine/armreg.h> |
|
37#include <machine/bus.h> 38#include <machine/intr.h> 39 40#include <arm/xscale/i8134x/i81342reg.h> 41#include <arm/xscale/i8134x/i81342var.h> 42 43#define WDTCR_ENABLE1 0x1e1e1e1e 44#define WDTCR_ENABLE2 0xe1e1e1e1 --- 198 unchanged lines hidden (view full) --- 243 __asm __volatile("mcr p6, 0, %0, c3, c5, 0" 244 : : "r" (val)); 245} 246 247void 248cpu_reset(void) 249{ 250 | 38#include <machine/bus.h> 39#include <machine/intr.h> 40 41#include <arm/xscale/i8134x/i81342reg.h> 42#include <arm/xscale/i8134x/i81342var.h> 43 44#define WDTCR_ENABLE1 0x1e1e1e1e 45#define WDTCR_ENABLE2 0xe1e1e1e1 --- 198 unchanged lines hidden (view full) --- 244 __asm __volatile("mcr p6, 0, %0, c3, c5, 0" 245 : : "r" (val)); 246} 247 248void 249cpu_reset(void) 250{ 251 |
251 disable_interrupts(I32_bit); | 252 disable_interrupts(PSR_I); |
252 /* XXX: Use the watchdog to reset for now */ 253 __asm __volatile("mcr p6, 0, %0, c8, c9, 0\n" 254 "mcr p6, 0, %1, c7, c9, 0\n" 255 "mcr p6, 0, %2, c7, c9, 0\n" 256 : : "r" (1), "r" (WDTCR_ENABLE1), "r" (WDTCR_ENABLE2)); 257 while (1); 258} 259 --- 206 unchanged lines hidden --- | 253 /* XXX: Use the watchdog to reset for now */ 254 __asm __volatile("mcr p6, 0, %0, c8, c9, 0\n" 255 "mcr p6, 0, %1, c7, c9, 0\n" 256 "mcr p6, 0, %2, c7, c9, 0\n" 257 : : "r" (1), "r" (WDTCR_ENABLE1), "r" (WDTCR_ENABLE2)); 258 while (1); 259} 260 --- 206 unchanged lines hidden --- |