Index: arch/arm/config.in
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/arch/arm/config.in,v
retrieving revision 1.3
diff -u -r1.3 config.in
--- arch/arm/config.in	9 Feb 2006 22:58:57 -0000	1.3
+++ arch/arm/config.in	4 May 2007 23:50:42 -0000
@@ -234,6 +234,9 @@
    # These options are specific to the EP9301 SOC.
    bool ' EP9301 Internal DMA Support' CONFIG_EP93XX_DMA Y
    endmenu
+   define_bool CONFIG_EP93XX_CRUNCH y
+else
+   define_bool CONFIG_EP93XX_CRUNCH n
 fi
 
 ####################################################################
Index: arch/arm/kernel/entry-armv.S
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/arch/arm/kernel/entry-armv.S,v
retrieving revision 1.2
diff -u -r1.2 entry-armv.S
--- arch/arm/kernel/entry-armv.S	4 Aug 2004 01:25:38 -0000	1.2
+++ arch/arm/kernel/entry-armv.S	4 May 2007 23:50:42 -0000
@@ -767,6 +767,14 @@
 		add	r5, sp, #S_FRAME_SIZE
 		add	r4, sp, #S_SP
 		stmia	r4, {r5 - r9}			@ save sp_SVC, lr_SVC, pc, cpsr, old_ro
+#ifdef CONFIG_EP93XX_CRUNCH
+@bl      crunch_in @EWD
+		mov     r0, sp
+		bl      crunch_opcode
+@bl      crunch_out @EWD
+		cmp     r0, #1
+		beq     1f
+#endif
 
 		adrsvc	al, r9, 1f			@ r9  = normal FP return
 		bl	call_fpe			@ lr  = undefined instr return
@@ -848,6 +856,13 @@
 		ldmia	r4, {r5 - r7}			@ get saved PC, SPSR
 		stmia	r8, {r5 - r7}			@ save pc, psr, old_r0
 		stmdb	r8, {sp, lr}^
+
+#ifdef CONFIG_EP93XX_CRUNCH
+		mov     r0, sp
+		bl      crunch_opcode
+		cmp     r0, #1
+		beq     ret_from_exception
+#endif
 		alignment_trap r4, r7, __temp_irq
 		zero_fp
 1:		get_irqnr_and_base r0, r6, r5, lr
@@ -871,6 +886,15 @@
 		ldmia	r4, {r5 - r7}
 		stmia	r8, {r5 - r7}			@ Save USR pc, cpsr, old_r0
 		stmdb	r8, {sp, lr}^			@ Save user sp, lr
+
+#ifdef CONFIG_EP93XX_CRUNCH
+                mov     r0, sp
+                bl      crunch_opcode
+                cmp     r0, #1
+                beq     ret_from_exception
+#endif
 		alignment_trap r4, r7, __temp_und
 		zero_fp
 		tst	r6, #T_BIT			@ Thumb mode
@@ -913,6 +937,7 @@
  * This is the return code to user mode for abort handlers
  */
 ENTRY(ret_from_exception)
+@bl      crunch_out2 @EWD
 		disable_irq r1
 		mov	why, #0
 		get_current_task tsk
Index: arch/arm/kernel/setup.c
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/arch/arm/kernel/setup.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 setup.c
--- arch/arm/kernel/setup.c	22 Jul 2004 19:48:58 -0000	1.1.1.1
+++ arch/arm/kernel/setup.c	4 May 2007 23:50:42 -0000
@@ -140,6 +140,11 @@
 	sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS);
 	sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
 	elf_hwcap = list->elf_hwcap;
+#ifdef CONFIG_EP93XX_CRUNCH
+	elf_hwcap |= HWCAP_CRUNCH;
+printk("EWD:Maverick Crunch support is enabled...\n");
+#endif
+
 
 	cpu_proc_init();
 }
@@ -565,6 +570,8 @@
 	"fpa",
 	"vfp",
 	"edsp",
+	"java",
+	"crunch",
 	NULL
 };
 
Index: arch/arm/mach-ep93xx/Makefile
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/arch/arm/mach-ep93xx/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- arch/arm/mach-ep93xx/Makefile	22 Jul 2004 19:48:59 -0000	1.1.1.1
+++ arch/arm/mach-ep93xx/Makefile	4 May 2007 23:50:42 -0000
@@ -19,6 +19,7 @@
 export-objs		:= pcipool.o
 
 obj-$(CONFIG_EP93XX_DMA)+= dma_ep93xx.o
+obj-$(CONFIG_EP93XX_CRUNCH) += crunch.o
 
 
 include $(TOPDIR)/Rules.make
Index: Documentation/Configure.help
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/Documentation/Configure.help,v
retrieving revision 1.2
diff -u -r1.2 Configure.help
--- Documentation/Configure.help	4 Aug 2004 01:33:00 -0000	1.2
+++ Documentation/Configure.help	4 May 2007 23:50:47 -0000
@@ -25847,6 +25847,12 @@
   Say Y if you want support for the ARM920T processor.
   Otherwise, say N.
 
+Support EP93xx MaverickCrunch
+CONFIG_EP93XX_CRUNCH
+  This option allows you to run MaverickCrunch(tm) powered Linux applications
+  on EP93xx based platforms.  Saying 'Y' here is harmless and will not slow
+  down performance.
+
 Support ARM922T processor
 CONFIG_CPU_ARM922T
   The ARM922T is a version of the ARM920T, but with smaller
Index: include/asm-arm/processor.h
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/include/asm-arm/processor.h,v
retrieving revision 1.2
diff -u -r1.2 processor.h
--- include/asm-arm/processor.h	4 Aug 2004 01:17:06 -0000	1.2
+++ include/asm-arm/processor.h	4 May 2007 23:50:51 -0000
@@ -23,12 +23,26 @@
 	unsigned int save[FP_SIZE];		/* as yet undefined */
 };
 
+#ifdef CONFIG_EP93XX_CRUNCH
+struct fp_crunch_struct {
+	long long regs[16];
+	int acc0[3];
+	int acc1[3];
+	int acc2[3];
+	int acc3[3];
+	unsigned long dspsc;
+};
+#endif
+
 struct fp_soft_struct {
 	unsigned int save[FP_SIZE];		/* undefined information */
 };
 
 union fp_state {
 	struct fp_hard_struct	hard;
+#ifdef CONFIG_EP93XX_CRUNCH
+       struct fp_crunch_struct crunch;
+#endif
 	struct fp_soft_struct	soft;
 };
 
Index: include/asm-arm/procinfo.h
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/include/asm-arm/procinfo.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 procinfo.h
--- include/asm-arm/procinfo.h	22 Jul 2004 19:50:53 -0000	1.1.1.1
+++ include/asm-arm/procinfo.h	4 May 2007 23:50:51 -0000
@@ -57,5 +57,6 @@
 #define HWCAP_VFP	64
 #define HWCAP_EDSP	128
 #define HWCAP_JAVA	256
+#define HWCAP_CRUNCH    512
 
 #endif
Index: include/asm-arm/system.h
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/include/asm-arm/system.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 system.h
--- include/asm-arm/system.h	22 Jul 2004 19:50:53 -0000	1.1.1.1
+++ include/asm-arm/system.h	4 May 2007 23:50:51 -0000
@@ -56,6 +56,21 @@
 
 #define prepare_to_switch()    do { } while(0)
 
+#ifdef CONFIG_EP93XX_CRUNCH
+#include <asm/arch/crunch.h>
+#define crunch_switch(prev, next)			\
+	do {						\
+		if (prev->flags & PF_USEDFPU) {		\
+			save_crunch(prev);		\
+			crunch_disable();		\
+		}					\
+		prev->flags &= ~PF_USEDFPU;		\
+		mb();					\
+	} while (0)
+#else
+#define crunch_switch(prev, next)      do { } while (0);
+#endif
+
 /*
  * switch_to(prev, next) should switch from task `prev' to `next'
  * `prev' will never be the same as `next'.
@@ -65,6 +80,7 @@
 
 #define switch_to(prev,next,last)		\
 	do {			 		\
+		crunch_switch(prev, next);	\
 		last = __switch_to(prev,next);	\
 		mb();				\
 	} while (0)
Index: include/linux/sched.h
===================================================================
RCS file: /cvsroot/ts-7200/dist/linux24/include/linux/sched.h,v
retrieving revision 1.2
diff -u -r1.2 sched.h
--- include/linux/sched.h	4 Aug 2004 01:17:32 -0000	1.2
+++ include/linux/sched.h	4 May 2007 23:50:53 -0000
@@ -436,6 +436,11 @@
 
 #define PF_USEDFPU	0x00100000	/* task used FPU this quantum (SMP) */
 
+#ifdef CONFIG_EP93XX_CRUNCH
+#define PF_USEDCRUNCH  0x00200000
+#endif
+
+
 /*
  * Ptrace flags
  */
