patch-2.1.80 linux/include/asm-arm/arch-arc/system.h

Next file: linux/include/asm-arm/arch-arc/time.h
Previous file: linux/include/asm-arm/arch-arc/shmparam.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.79/linux/include/asm-arm/arch-arc/system.h linux/include/asm-arm/arch-arc/system.h
@@ -0,0 +1,41 @@
+/*
+ * linux/include/asm-arm/arch-arc/system.h
+ *
+ * Copyright (c) 1996 Russell King and Dave Gilbert
+ */
+#ifndef __ASM_ARCH_SYSTEM_H
+#define __ASM_ARCH_SYSTEM_H
+
+#define cliIF()				\
+	do {				\
+	  unsigned long temp;		\
+	  __asm__ __volatile__(		\
+"	mov	%0, pc\n"		\
+"	orr %0, %0, #0x0c000000\n"	\
+"	teqp	%0, #0\n"		\
+	  : "=r" (temp)	\
+    : );	\
+  } while(0)
+
+extern __inline__ void arch_hard_reset (void)
+{
+	extern void ecard_reset (int card);
+
+	/*
+	 * Reset all expansion cards.
+	 */
+	ecard_reset (-1);
+
+	/*
+	 * copy branch instruction to reset location and call it
+	 */
+	*(unsigned long *)0 = *(unsigned long *)0x03800000;
+	((void(*)(void))0)();
+
+	/*
+	 * If that didn't work, loop endlessly
+	 */
+	while (1);
+}
+
+#endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov