diff -Nru linux-2.2.14-rmk-mercury/arch/arm/Makefile linux-2.2.14-rmk-mercury-gcc3/arch/arm/Makefile --- linux-2.2.14-rmk-mercury/arch/arm/Makefile 2000-03-22 12:27:27.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/Makefile 2007-07-10 13:56:44.000000000 +0100 @@ -20,7 +20,8 @@ LINKFLAGS := -p -X -T arch/arm/vmlinux.lds ARCHCC := $(word 1,$(CC)) -AFLAGS += -mno-fpu +#AFLAGS += -mno-fpu +AFLAGS += -msoft-float CFLAGS_PIPE := -pipe CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) @@ -81,7 +82,8 @@ TEXTADDR = 0xC0008000 ifeq ($(CONFIG_CPU_32),y) # was 32_v4 CFLAGS += $(CFLAGS_PROC_CPU_32v4) - AFLAGS += -mapcs-32 -marmv4 + #AFLAGS += -mapcs-32 -marmv4 + AFLAGS += -march=armv4 else CFLAGS += $(CFLAGS_PROC_CPU_32v3) AFLAGS += -mapcs-32 -marmv3m diff -Nru linux-2.2.14-rmk-mercury/arch/arm/kernel/fiq.c linux-2.2.14-rmk-mercury-gcc3/arch/arm/kernel/fiq.c --- linux-2.2.14-rmk-mercury/arch/arm/kernel/fiq.c 2000-03-14 18:03:17.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/kernel/fiq.c 2007-07-10 13:33:01.000000000 +0100 @@ -117,24 +117,24 @@ register unsigned long tmp, tmp2; __asm__ volatile ( #ifdef CONFIG_CPU_26 - "mov %0, pc - bic %1, %0, #0x3 - orr %1, %1, #0x0c000001 - teqp %1, #0 @ select FIQ mode - mov r0, r0 - ldmia %2, {r8 - r14} - teqp %0, #0 @ return to SVC mode - mov r0, r0" + "mov %0, pc\n" +" bic %1, %0, #0x3\n" +" orr %1, %1, #0x0c000001\n" +" teqp %1, #0 @ select FIQ mode\n" +" mov r0, r0\n" +" ldmia %2, {r8 - r14}\n" +" teqp %0, #0 @ return to SVC mode\n" +" mov r0, r0" #endif #ifdef CONFIG_CPU_32 - "mrs %0, cpsr - bic %1, %0, #0xf - orr %1, %1, #0xc1 - msr cpsr, %1 @ select FIQ mode - mov r0, r0 - ldmia %2, {r8 - r14} - msr cpsr, %0 @ return to SVC mode - mov r0, r0" + "mrs %0, cpsr\n" +" bic %1, %0, #0xf\n" +" orr %1, %1, #0xc1\n" +" msr cpsr, %1 @ select FIQ mode\n" +" mov r0, r0\n" +" ldmia %2, {r8 - r14}\n" +" msr cpsr, %0 @ return to SVC mode\n" +" mov r0, r0" #endif : "=&r" (tmp), "=&r" (tmp2) : "r" (®s->ARM_r8) @@ -150,24 +150,24 @@ register unsigned long tmp, tmp2; __asm__ volatile ( #ifdef CONFIG_CPU_26 - "mov %0, pc - bic %1, %0, #0x3 - orr %1, %1, #0x0c000001 - teqp %1, #0 @ select FIQ mode - mov r0, r0 - stmia %2, {r8 - r14} - teqp %0, #0 @ return to SVC mode - mov r0, r0" + "mov %0, pc\n" +" bic %1, %0, #0x3\n" +" orr %1, %1, #0x0c000001\n" +" teqp %1, #0 @ select FIQ mode\n" +" mov r0, r0\n" +" stmia %2, {r8 - r14}\n" +" teqp %0, #0 @ return to SVC mode\n" +" mov r0, r0" #endif #ifdef CONFIG_CPU_32 - "mrs %0, cpsr - bic %1, %0, #0xf - orr %1, %1, #0xc1 - msr cpsr, %1 @ select FIQ mode - mov r0, r0 - stmia %2, {r8 - r14} - msr cpsr, %0 @ return to SVC mode - mov r0, r0" + "mrs %0, cpsr\n" +" bic %1, %0, #0xf\n" +" orr %1, %1, #0xc1\n" +" msr cpsr, %1 @ select FIQ mode\n" +" mov r0, r0\n" +" stmia %2, {r8 - r14}\n" +" msr cpsr, %0 @ return to SVC mode\n" +" mov r0, r0" #endif : "=&r" (tmp), "=&r" (tmp2) : "r" (®s->ARM_r8) diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/backtrace.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/backtrace.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/backtrace.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/backtrace.S 2007-07-10 14:00:15.000000000 +0100 @@ -38,7 +38,7 @@ movne r0, #0 movs frame, r0 1: moveq r0, #-2 - LOADREGS(eqfd, sp!, {r4 - r8, pc}) + LOADREGS(eqfd, sp!) {r4 - r8, pc} 2: stmfd sp!, {pc} @ calculate offset of PC in STMIA instruction ldr r0, [sp], #4 @@ -76,7 +76,7 @@ movne frame, next teqne frame, #0 bne 3b - LOADREGS(fd, sp!, {r4 - r8, pc}) + LOADREGS(fd, sp!) {r4 - r8, pc} #define instr r4 @@ -106,7 +106,7 @@ adrne r0, .Lcr blne SYMBOL_NAME(printk) mov r0, stack - LOADREGS(fd, sp!, {instr, reg, stack, r7, pc}) + LOADREGS(fd, sp!) {instr, reg, stack, r7, pc} .Lfe: .asciz "Function entered at [<%p>] from [<%p>]\n" .Lfp: .asciz " r%d = %08X%c" diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/checksum.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/checksum.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/checksum.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/checksum.S 2007-07-10 14:02:40.000000000 +0100 @@ -522,7 +522,7 @@ adcs r3, r3, r4 5: ands r2, r2, #3 adceq r0, r3, #0 - LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc}) + LOADREGS(eqea,fp) {r4 - r8, fp, sp, pc} ldr r4, [r0], #4 tst r2, #2 beq Lexit_r4 @@ -534,7 +534,7 @@ b Lexit_r4 Ltoo_small: teq r2, #0 - LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc}) + LOADREGS(eqea,fp) {r4 - r8, fp, sp, pc} cmp r2, #2 blt Ltoo_small1 ldrb ip, [r0], #1 @@ -550,7 +550,7 @@ andne r4, r4, #255 adcnes r3, r3, r4 adcs r0, r3, #0 - LOADREGS(ea,fp,{r4 - r8, fp, sp, pc}) + LOADREGS(ea,fp) {r4 - r8, fp, sp, pc} Lsrc_not_aligned: cmp r2, #4 @@ -603,7 +603,7 @@ mov r4, r5, lsr #8 4: ands r2, r2, #3 adceq r0, r3, #0 - LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc}) + LOADREGS(eqea,fp) {r4 - r8, fp, sp, pc} tst r2, #2 beq Lexit_r4 adcs r3, r3, r4, lsl #16 @@ -655,7 +655,7 @@ mov r4, r5, lsr #16 4: ands r2, r2, #3 adceq r0, r3, #0 - LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc}) + LOADREGS(eqea,fp) {r4 - r8, fp, sp, pc} tst r2, #2 beq Lexit_r4 adcs r3, r3, r4, lsl #16 @@ -707,7 +707,7 @@ mov r4, r5, lsr #24 4: ands r2, r2, #3 adceq r0, r3, #0 - LOADREGS(eqea,fp,{r4 - r8, fp, sp, pc}) + LOADREGS(eqea,fp) {r4 - r8, fp, sp, pc} tst r2, #2 beq Lexit_r4 adcs r3, r3, r4, lsl #16 @@ -734,4 +734,4 @@ ldr r3, [sp, #4] adcs r0, r0, r3 adcs r0, r0, #0 - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/copy_page.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/copy_page.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/copy_page.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/copy_page.S 2007-07-10 14:03:49.000000000 +0100 @@ -30,6 +30,6 @@ ldmia r1!, {r3, r4, ip, lr} @ 4+1 stmia r0!, {r3, r4, ip, lr} @ 4 bne 1b @ 1 - LOADREGS(fd, sp!, {r4, pc}) @ 3 + LOADREGS(fd, sp!) {r4, pc} @ 3 diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/memchr.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memchr.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/memchr.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memchr.S 2007-07-10 14:04:21.000000000 +0100 @@ -27,7 +27,7 @@ teq r3, r1 bne 1b sub r0, r0, #1 - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} 2: mov r0, #0 @ Got to end and not found. - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/memcpy.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memcpy.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/memcpy.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memcpy.S 2007-07-10 14:04:53.000000000 +0100 @@ -18,10 +18,10 @@ sub fp,ip,#4 #define EXIT \ - LOADREGS(ea, fp, {r4 - r9, fp, sp, pc}) + LOADREGS(ea, fp) {r4 - r9, fp, sp, pc} #define EXITEQ \ - LOADREGS(eqea, fp, {r4 - r9, fp, sp, pc}) + LOADREGS(eqea, fp) {r4 - r9, fp, sp, pc} /* * Prototype: void memcpy(void *to,const void *from,unsigned long n); diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/memset.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memset.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/memset.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memset.S 2007-07-10 14:08:12.000000000 +0100 @@ -41,7 +41,7 @@ subs ip, ip, #1 bne 2b teq r2, #0 - LOADREGS(eqfd, sp!, {r4, r5, pc}) @ Now <64 bytes to go. + LOADREGS(eqfd, sp!) {r4, r5, pc} @ Now <64 bytes to go. tst r2, #32 stmneia r3!, {r1, r4, r5, lr} stmneia r3!, {r1, r4, r5, lr} @@ -57,7 +57,7 @@ strneb r1, [r3], #1 tst r2, #1 strneb r1, [r3], #1 - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} 4: movs ip, r2, lsr #3 beq 3b @@ -77,7 +77,7 @@ tst ip, #1 stmneia r3!, {r1, lr} teq r2, #0 - LOADREGS(eqfd, sp!, {pc}) + LOADREGS(eqfd, sp!) {pc} b 3b 6: subs r2, r2, #1 diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/memzero.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memzero.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/memzero.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/memzero.S 2007-07-10 14:08:52.000000000 +0100 @@ -48,7 +48,7 @@ stmgeia r0!, {r2, r3, ip, lr} @ 4 stmgeia r0!, {r2, r3, ip, lr} @ 4 bgt 3b @ 1 - LOADREGS(eqfd, sp!, {pc}) @ 1/2 + LOADREGS(eqfd, sp!) {pc} @ 1/2 @ -28 <= r1 <= -1 diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/semaphore.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/semaphore.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/semaphore.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/semaphore.S 2007-07-10 14:10:10.000000000 +0100 @@ -16,19 +16,19 @@ ENTRY(__down_failed) stmfd sp!, {r0 - r3, ip, lr} bl SYMBOL_NAME(__down) - LOADREGS(fd, sp!, {r0 - r3, ip, pc}) + LOADREGS(fd, sp!) {r0 - r3, ip, pc} ENTRY(__down_interruptible_failed) stmfd sp!, {r1 - r3, ip, lr} bl SYMBOL_NAME(__down_interruptible) - LOADREGS(fd, sp!, {r1 - r3, ip, pc}) + LOADREGS(fd, sp!) {r1 - r3, ip, pc} ENTRY(__down_trylock_failed) stmfd sp!, {r1 - r3, ip, lr} bl SYMBOL_NAME(__down_trylock) - LOADREGS(fd, sp!, {r1 - r3, ip, pc}) + LOADREGS(fd, sp!) {r1 - r3, ip, pc} ENTRY(__up_wakeup) stmfd sp!, {r0 - r3, ip, lr} bl SYMBOL_NAME(__up) - LOADREGS(fd, sp!, {r0 - r3, ip, pc}) + LOADREGS(fd, sp!) {r0 - r3, ip, pc} diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/strchr.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/strchr.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/strchr.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/strchr.S 2007-07-10 14:09:15.000000000 +0100 @@ -22,4 +22,4 @@ teq r2, r1 @ If they are the same we found char. movne r0, #0 subeq r0, r0, #1 @ Even if we were looking for 0 :-) - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/strrchr.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/strrchr.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/strrchr.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/strrchr.S 2007-07-10 14:09:34.000000000 +0100 @@ -25,5 +25,5 @@ teq r2, #0 ldrneb r2, [r3], #1 @ Assume that well be looping at least bne 1b @ twice, so put LDM outside loop. - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} diff -Nru linux-2.2.14-rmk-mercury/arch/arm/lib/uaccess.S linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/uaccess.S --- linux-2.2.14-rmk-mercury/arch/arm/lib/uaccess.S 2000-03-10 15:47:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/lib/uaccess.S 2007-07-10 14:12:50.000000000 +0100 @@ -13,8 +13,8 @@ .text #ifdef ENTRY -#define USER(x...) \ -9999: x; \ +#define USER(x1,x2,x3) \ +9999: x1,x2,x3; \ .section __ex_table,"a"; \ .align 3; \ .long 9999b,9001f; \ @@ -115,7 +115,7 @@ movs ip, r2 bne .c2u_nowords .c2u_finished: mov r0, #0 - LOADREGS(fd,sp!,{r2, r4 - r7, pc}) + LOADREGS(fd,sp!) {r2, r4 - r7, pc} .c2u_src_not_aligned: bic r1, r1, #3 @@ -288,7 +288,7 @@ #ifndef TESTING .section .fixup,"ax" .align 0 -9001: LOADREGS(fd,sp!, {r0, r4 - r7, pc}) +9001: LOADREGS(fd,sp!) {r0, r4 - r7, pc} .previous #endif @@ -376,7 +376,7 @@ bne .cfu_nowords .cfu_finished: mov r0, #0 add sp, sp, #8 - LOADREGS(fd,sp!,{r4 - r7, pc}) + LOADREGS(fd,sp!) {r4 - r7, pc} .cfu_src_not_aligned: bic r1, r1, #3 @@ -555,7 +555,7 @@ ldr r1, [sp] teq r1, #0 blne SYMBOL_NAME(__memzero) - LOADREGS(fd,sp!, {r0, r4 - r7, pc}) + LOADREGS(fd,sp!) {r0, r4 - r7, pc} .previous #endif @@ -590,12 +590,12 @@ tst r1, #1 @ x1 x0 x1 x0 x1 x0 x1 USER( strnebt r2, [r0], #1) mov r0, #0 - LOADREGS(fd,sp!, {r1, pc}) + LOADREGS(fd,sp!) {r1, pc} #ifndef TESTING .section .fixup,"ax" .align 0 -9001: LOADREGS(fd,sp!, {r0, pc}) +9001: LOADREGS(fd,sp!) {r0, pc} .previous /* Prototype: int __arch_strnlen_user(char *str, long n) @@ -614,12 +614,12 @@ bne 1b add r0, r0, #1 2: sub r0, r0, r2 - LOADREGS(fd,sp!, {pc}) + LOADREGS(fd,sp!) {pc} .section .fixup,"ax" .align 0 9001: mov r0, #0 - LOADREGS(fd,sp!,{pc}) + LOADREGS(fd,sp!) {pc} .previous /* Prototype: size_t __arch_strncpy_from_user(char *dst, char *src, size_t len) @@ -639,10 +639,10 @@ teq r3, #0 bne 1b sub r0, r1, ip - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} 2: sub ip, ip, #1 sub r0, r1, ip - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} .section .fixup,"ax" .align 0 @@ -651,7 +651,7 @@ subs r2, r2, #1 bpl 1b mov r0, #-EFAULT - LOADREGS(fd, sp!, {pc}) + LOADREGS(fd, sp!) {pc} .previous .align diff -Nru linux-2.2.14-rmk-mercury/arch/arm/special/console_macros.h linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/console_macros.h --- linux-2.2.14-rmk-mercury/arch/arm/special/console_macros.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/console_macros.h 2000-03-10 15:47:03.000000000 +0000 @@ -0,0 +1,70 @@ +#define cons_num (vc_cons[currcons].d->vc_num) +#define sw (vc_cons[currcons].d->vc_sw) +#define screenbuf (vc_cons[currcons].d->vc_screenbuf) +#define screenbuf_size (vc_cons[currcons].d->vc_screenbuf_size) +#define origin (vc_cons[currcons].d->vc_origin) +#define scr_top (vc_cons[currcons].d->vc_scr_top) +#define visible_origin (vc_cons[currcons].d->vc_visible_origin) +#define scr_end (vc_cons[currcons].d->vc_scr_end) +#define pos (vc_cons[currcons].d->vc_pos) +#define top (vc_cons[currcons].d->vc_top) +#define bottom (vc_cons[currcons].d->vc_bottom) +#define x (vc_cons[currcons].d->vc_x) +#define y (vc_cons[currcons].d->vc_y) +#define vc_state (vc_cons[currcons].d->vc_state) +#define npar (vc_cons[currcons].d->vc_npar) +#define par (vc_cons[currcons].d->vc_par) +#define ques (vc_cons[currcons].d->vc_ques) +#define attr (vc_cons[currcons].d->vc_attr) +#define saved_x (vc_cons[currcons].d->vc_saved_x) +#define saved_y (vc_cons[currcons].d->vc_saved_y) +#define translate (vc_cons[currcons].d->vc_translate) +#define G0_charset (vc_cons[currcons].d->vc_G0_charset) +#define G1_charset (vc_cons[currcons].d->vc_G1_charset) +#define saved_G0 (vc_cons[currcons].d->vc_saved_G0) +#define saved_G1 (vc_cons[currcons].d->vc_saved_G1) +#define utf (vc_cons[currcons].d->vc_utf) +#define utf_count (vc_cons[currcons].d->vc_utf_count) +#define utf_char (vc_cons[currcons].d->vc_utf_char) +#define video_erase_char (vc_cons[currcons].d->vc_video_erase_char) +#define disp_ctrl (vc_cons[currcons].d->vc_disp_ctrl) +#define toggle_meta (vc_cons[currcons].d->vc_toggle_meta) +#define decscnm (vc_cons[currcons].d->vc_decscnm) +#define decom (vc_cons[currcons].d->vc_decom) +#define decawm (vc_cons[currcons].d->vc_decawm) +#define deccm (vc_cons[currcons].d->vc_deccm) +#define decim (vc_cons[currcons].d->vc_decim) +#define deccolm (vc_cons[currcons].d->vc_deccolm) +#define need_wrap (vc_cons[currcons].d->vc_need_wrap) +#define kmalloced (vc_cons[currcons].d->vc_kmalloced) +#define report_mouse (vc_cons[currcons].d->vc_report_mouse) +#define color (vc_cons[currcons].d->vc_color) +#define s_color (vc_cons[currcons].d->vc_s_color) +#define def_color (vc_cons[currcons].d->vc_def_color) +#define foreground (color & 0x0f) +#define background (color & 0xf0) +#define charset (vc_cons[currcons].d->vc_charset) +#define s_charset (vc_cons[currcons].d->vc_s_charset) +#define intensity (vc_cons[currcons].d->vc_intensity) +#define underline (vc_cons[currcons].d->vc_underline) +#define blink (vc_cons[currcons].d->vc_blink) +#define reverse (vc_cons[currcons].d->vc_reverse) +#define s_intensity (vc_cons[currcons].d->vc_s_intensity) +#define s_underline (vc_cons[currcons].d->vc_s_underline) +#define s_blink (vc_cons[currcons].d->vc_s_blink) +#define s_reverse (vc_cons[currcons].d->vc_s_reverse) +#define ulcolor (vc_cons[currcons].d->vc_ulcolor) +#define halfcolor (vc_cons[currcons].d->vc_halfcolor) +#define tab_stop (vc_cons[currcons].d->vc_tab_stop) +#define palette (vc_cons[currcons].d->vc_palette) +#define bell_pitch (vc_cons[currcons].d->vc_bell_pitch) +#define bell_duration (vc_cons[currcons].d->vc_bell_duration) +#define cursor_type (vc_cons[currcons].d->vc_cursor_type) +#define display_fg (vc_cons[currcons].d->vc_display_fg) +#define complement_mask (vc_cons[currcons].d->vc_complement_mask) +#define s_complement_mask (vc_cons[currcons].d->vc_s_complement_mask) +#define hi_font_mask (vc_cons[currcons].d->vc_hi_font_mask) + +#define vcmode (vt_cons[currcons]->vc_mode) + +#define structsize (sizeof(struct vc_data) + sizeof(struct vt_struct)) diff -Nru linux-2.2.14-rmk-mercury/arch/arm/special/defkeymap.c linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/defkeymap.c --- linux-2.2.14-rmk-mercury/arch/arm/special/defkeymap.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/defkeymap.c 2000-03-10 15:47:02.000000000 +0000 @@ -0,0 +1,262 @@ +/* Do not edit this file! It was automatically generated by */ +/* loadkeys --mktable defkeymap.map > defkeymap.c */ + +#include +#include +#include + +u_short plain_map[NR_KEYS] = { + 0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, + 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009, + 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69, + 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73, + 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b, + 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, + 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c, + 0xf703, 0xf020, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, + 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a, + 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_map[NR_KEYS] = { + 0xf200, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e, + 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009, + 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49, + 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53, + 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a, + 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56, + 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c, + 0xf703, 0xf020, 0xf207, 0xf10a, 0xf10b, 0xf10c, 0xf10d, 0xf10e, + 0xf10f, 0xf110, 0xf111, 0xf112, 0xf113, 0xf213, 0xf203, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf10a, + 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short altgr_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200, + 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf200, 0xf200, 0xf200, + 0xfb71, 0xfb77, 0xf918, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69, + 0xfb6f, 0xfb70, 0xf200, 0xf07e, 0xf201, 0xf702, 0xf914, 0xfb73, + 0xf917, 0xf919, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf200, + 0xf200, 0xf200, 0xf700, 0xf200, 0xfb7a, 0xfb78, 0xf916, 0xfb76, + 0xf915, 0xfb6e, 0xfb6d, 0xf200, 0xf200, 0xf200, 0xf700, 0xf30c, + 0xf703, 0xf200, 0xf207, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510, + 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf202, 0xf911, + 0xf912, 0xf913, 0xf30b, 0xf90e, 0xf90f, 0xf910, 0xf30a, 0xf90b, + 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516, + 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e, + 0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf200, + 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009, + 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf201, 0xf702, 0xf001, 0xf013, + 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, + 0xf007, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016, + 0xf002, 0xf00e, 0xf00d, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c, + 0xf703, 0xf000, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, + 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf204, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf200, 0xf10a, + 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short shift_ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200, + 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009, + 0xf00f, 0xf010, 0xf200, 0xf200, 0xf201, 0xf702, 0xf001, 0xf013, + 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, + 0xf200, 0xf200, 0xf700, 0xf200, 0xf01a, 0xf018, 0xf003, 0xf016, + 0xf002, 0xf00e, 0xf00d, 0xf200, 0xf200, 0xf200, 0xf700, 0xf30c, + 0xf703, 0xf200, 0xf207, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf208, 0xf200, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short alt_map[NR_KEYS] = { + 0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836, + 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809, + 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869, + 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873, + 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b, + 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876, + 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c, + 0xf703, 0xf820, 0xf207, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504, + 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf907, + 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901, + 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a, + 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +u_short ctrl_alt_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809, + 0xf80f, 0xf810, 0xf200, 0xf200, 0xf201, 0xf702, 0xf801, 0xf813, + 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200, + 0xf200, 0xf200, 0xf700, 0xf200, 0xf81a, 0xf818, 0xf803, 0xf816, + 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf200, 0xf200, 0xf700, 0xf30c, + 0xf703, 0xf200, 0xf207, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504, + 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf200, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf200, 0xf50a, + 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +}; + +ushort *key_maps[MAX_NR_KEYMAPS] = { + plain_map, shift_map, altgr_map, 0, + ctrl_map, shift_ctrl_map, 0, 0, + alt_map, 0, 0, 0, + ctrl_alt_map, 0 +}; + +unsigned int keymap_count = 7; + +/* + * Philosophy: most people do not define more strings, but they who do + * often want quite a lot of string space. So, we statically allocate + * the default and allocate dynamically in chunks of 512 bytes. + */ + +char func_buf[] = { + '\033', '[', '[', 'A', 0, + '\033', '[', '[', 'B', 0, + '\033', '[', '[', 'C', 0, + '\033', '[', '[', 'D', 0, + '\033', '[', '[', 'E', 0, + '\033', '[', '1', '7', '~', 0, + '\033', '[', '1', '8', '~', 0, + '\033', '[', '1', '9', '~', 0, + '\033', '[', '2', '0', '~', 0, + '\033', '[', '2', '1', '~', 0, + '\033', '[', '2', '3', '~', 0, + '\033', '[', '2', '4', '~', 0, + '\033', '[', '2', '5', '~', 0, + '\033', '[', '2', '6', '~', 0, + '\033', '[', '2', '8', '~', 0, + '\033', '[', '2', '9', '~', 0, + '\033', '[', '3', '1', '~', 0, + '\033', '[', '3', '2', '~', 0, + '\033', '[', '3', '3', '~', 0, + '\033', '[', '3', '4', '~', 0, + '\033', '[', '1', '~', 0, + '\033', '[', '2', '~', 0, + '\033', '[', '3', '~', 0, + '\033', '[', '4', '~', 0, + '\033', '[', '5', '~', 0, + '\033', '[', '6', '~', 0, + '\033', '[', 'M', 0, + '\033', '[', 'P', 0, +}; + +char *funcbufptr = func_buf; +int funcbufsize = sizeof(func_buf); +int funcbufleft = 0; /* space left */ + +char *func_table[MAX_NR_FUNC] = { + func_buf + 0, + func_buf + 5, + func_buf + 10, + func_buf + 15, + func_buf + 20, + func_buf + 25, + func_buf + 31, + func_buf + 37, + func_buf + 43, + func_buf + 49, + func_buf + 55, + func_buf + 61, + func_buf + 67, + func_buf + 73, + func_buf + 79, + func_buf + 85, + func_buf + 91, + func_buf + 97, + func_buf + 103, + func_buf + 109, + func_buf + 115, + func_buf + 120, + func_buf + 125, + func_buf + 130, + func_buf + 135, + func_buf + 140, + func_buf + 145, + 0, + 0, + func_buf + 149, + 0, +}; + +struct kbdiacr accent_table[MAX_DIACR] = { + {'`', 'A', '\300'}, {'`', 'a', '\340'}, + {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, + {'^', 'A', '\302'}, {'^', 'a', '\342'}, + {'~', 'A', '\303'}, {'~', 'a', '\343'}, + {'"', 'A', '\304'}, {'"', 'a', '\344'}, + {'O', 'A', '\305'}, {'o', 'a', '\345'}, + {'0', 'A', '\305'}, {'0', 'a', '\345'}, + {'A', 'A', '\305'}, {'a', 'a', '\345'}, + {'A', 'E', '\306'}, {'a', 'e', '\346'}, + {',', 'C', '\307'}, {',', 'c', '\347'}, + {'`', 'E', '\310'}, {'`', 'e', '\350'}, + {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, + {'^', 'E', '\312'}, {'^', 'e', '\352'}, + {'"', 'E', '\313'}, {'"', 'e', '\353'}, + {'`', 'I', '\314'}, {'`', 'i', '\354'}, + {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, + {'^', 'I', '\316'}, {'^', 'i', '\356'}, + {'"', 'I', '\317'}, {'"', 'i', '\357'}, + {'-', 'D', '\320'}, {'-', 'd', '\360'}, + {'~', 'N', '\321'}, {'~', 'n', '\361'}, + {'`', 'O', '\322'}, {'`', 'o', '\362'}, + {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, + {'^', 'O', '\324'}, {'^', 'o', '\364'}, + {'~', 'O', '\325'}, {'~', 'o', '\365'}, + {'"', 'O', '\326'}, {'"', 'o', '\366'}, + {'/', 'O', '\330'}, {'/', 'o', '\370'}, + {'`', 'U', '\331'}, {'`', 'u', '\371'}, + {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, + {'^', 'U', '\333'}, {'^', 'u', '\373'}, + {'"', 'U', '\334'}, {'"', 'u', '\374'}, + {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, + {'T', 'H', '\336'}, {'t', 'h', '\376'}, + {'s', 's', '\337'}, {'"', 'y', '\377'}, + {'s', 'z', '\337'}, {'i', 'j', '\377'}, +}; + +unsigned int accent_table_size = 68; diff -Nru linux-2.2.14-rmk-mercury/arch/arm/special/mercury_display.c linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/mercury_display.c --- linux-2.2.14-rmk-mercury/arch/arm/special/mercury_display.c 2000-11-27 12:32:25.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/mercury_display.c 2007-07-10 12:12:14.000000000 +0100 @@ -678,6 +678,7 @@ bitmaps = diamond_bitmaps; break; } + bitmaps = empeg_bitmaps; /* Power is on at boot */ dev->power = 1; diff -Nru linux-2.2.14-rmk-mercury/arch/arm/special/mouse.h linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/mouse.h --- linux-2.2.14-rmk-mercury/arch/arm/special/mouse.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/mouse.h 2000-03-10 15:47:03.000000000 +0000 @@ -0,0 +1,28 @@ +/* + * linux/drivers/char/mouse.h + * + * Copyright (C) 1995 - 1998 Russell King + * + * Prototypes for generic busmouse interface + */ +#ifndef MOUSE_H +#define MOUSE_H + +struct busmouse { + int minor; + const char *name; + int (*open)(struct inode * inode, struct file * file); + int (*release)(struct inode * inode, struct file * file); + int init_button_state; +}; + +extern void busmouse_add_movementbuttons(int mousedev, int dx, int dy, int buttons); +extern void busmouse_add_movement(int mousedev, int dx, int dy); +extern void busmouse_add_buttons(int mousedev, int clear, int eor); + +extern int register_busmouse(struct busmouse *ops); +extern int unregister_busmouse(int mousedev); + +extern int misc_mouse_init (void); + +#endif diff -Nru linux-2.2.14-rmk-mercury/arch/arm/special/pc_keyb.c linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/pc_keyb.c --- linux-2.2.14-rmk-mercury/arch/arm/special/pc_keyb.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/arch/arm/special/pc_keyb.c 2000-03-10 15:47:02.000000000 +0000 @@ -0,0 +1,992 @@ +/* + * linux/drivers/char/pc_keyb.c + * + * Separation of the PC low-level part by Geert Uytterhoeven, May 1997 + * See keyboard.c for the whole history. + * + * Major cleanup by Martin Mares, May 1997 + * + * Combined the keyboard and PS/2 mouse handling into one file, + * because they share the same hardware. + * Johan Myreen 1998-10-08. + * + * Code fixes to handle mouse ACKs properly. + * C. Scott Ananian 1999-01-29. + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +/* Some configuration switches are present in the include file... */ + +#include + +/* Simple translation table for the SysRq keys */ + +#ifdef CONFIG_MAGIC_SYSRQ +unsigned char pckbd_sysrq_xlate[128] = + "\000\0331234567890-=\177\t" /* 0x00 - 0x0f */ + "qwertyuiop[]\r\000as" /* 0x10 - 0x1f */ + "dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */ + "bnm,./\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */ + "\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */ + "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */ + "\r\000/"; /* 0x60 - 0x6f */ +#endif + +static void kbd_write_command_w(int data); +static void kbd_write_output_w(int data); + +spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED; +static unsigned char handle_kbd_event(void); + +/* used only by send_data - set by keyboard_interrupt */ +static volatile unsigned char reply_expected = 0; +static volatile unsigned char acknowledge = 0; +static volatile unsigned char resend = 0; + + +#if defined CONFIG_PSMOUSE +/* + * PS/2 Auxiliary Device + */ + +static int __init psaux_init(void); + +static struct aux_queue *queue; /* Mouse data buffer. */ +static int aux_count = 0; +/* used when we send commands to the mouse that expect an ACK. */ +static unsigned char mouse_reply_expected = 0; + +#define AUX_INTS_OFF (KBD_MODE_KCC | KBD_MODE_DISABLE_MOUSE | KBD_MODE_SYS | KBD_MODE_KBD_INT) +#define AUX_INTS_ON (KBD_MODE_KCC | KBD_MODE_SYS | KBD_MODE_MOUSE_INT | KBD_MODE_KBD_INT) + +#define MAX_RETRIES 60 /* some aux operations take long time*/ +#endif /* CONFIG_PSMOUSE */ + +/* + * Wait for keyboard controller input buffer to drain. + * + * Don't use 'jiffies' so that we don't depend on + * interrupts.. + * + * Quote from PS/2 System Reference Manual: + * + * "Address hex 0060 and address hex 0064 should be written only when + * the input-buffer-full bit and output-buffer-full bit in the + * Controller Status register are set 0." + */ + +static void kb_wait(void) +{ + unsigned long timeout = KBC_TIMEOUT; + + do { + /* + * "handle_kbd_event()" will handle any incoming events + * while we wait - keypresses or mouse movement. + */ + unsigned char status = handle_kbd_event(); + + if (! (status & KBD_STAT_IBF)) + return; + mdelay(1); + timeout--; + } while (timeout); +#ifdef KBD_REPORT_TIMEOUTS + printk(KERN_WARNING "Keyboard timed out[1]\n"); +#endif +} + +/* + * Translation of escaped scancodes to keycodes. + * This is now user-settable. + * The keycodes 1-88,96-111,119 are fairly standard, and + * should probably not be changed - changing might confuse X. + * X also interprets scancode 0x5d (KEY_Begin). + * + * For 1-88 keycode equals scancode. + */ + +#define E0_KPENTER 96 +#define E0_RCTRL 97 +#define E0_KPSLASH 98 +#define E0_PRSCR 99 +#define E0_RALT 100 +#define E0_BREAK 101 /* (control-pause) */ +#define E0_HOME 102 +#define E0_UP 103 +#define E0_PGUP 104 +#define E0_LEFT 105 +#define E0_RIGHT 106 +#define E0_END 107 +#define E0_DOWN 108 +#define E0_PGDN 109 +#define E0_INS 110 +#define E0_DEL 111 + +#define E1_PAUSE 119 + +/* + * The keycodes below are randomly located in 89-95,112-118,120-127. + * They could be thrown away (and all occurrences below replaced by 0), + * but that would force many users to use the `setkeycodes' utility, where + * they needed not before. It does not matter that there are duplicates, as + * long as no duplication occurs for any single keyboard. + */ +#define SC_LIM 89 + +#define FOCUS_PF1 85 /* actual code! */ +#define FOCUS_PF2 89 +#define FOCUS_PF3 90 +#define FOCUS_PF4 91 +#define FOCUS_PF5 92 +#define FOCUS_PF6 93 +#define FOCUS_PF7 94 +#define FOCUS_PF8 95 +#define FOCUS_PF9 120 +#define FOCUS_PF10 121 +#define FOCUS_PF11 122 +#define FOCUS_PF12 123 + +#define JAP_86 124 +/* tfj@olivia.ping.dk: + * The four keys are located over the numeric keypad, and are + * labelled A1-A4. It's an rc930 keyboard, from + * Regnecentralen/RC International, Now ICL. + * Scancodes: 59, 5a, 5b, 5c. + */ +#define RGN1 124 +#define RGN2 125 +#define RGN3 126 +#define RGN4 127 + +static unsigned char high_keys[128 - SC_LIM] = { + RGN1, RGN2, RGN3, RGN4, 0, 0, 0, /* 0x59-0x5f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ + 0, 0, 0, 0, 0, FOCUS_PF11, 0, FOCUS_PF12, /* 0x68-0x6f */ + 0, 0, 0, FOCUS_PF2, FOCUS_PF9, 0, 0, FOCUS_PF3, /* 0x70-0x77 */ + FOCUS_PF4, FOCUS_PF5, FOCUS_PF6, FOCUS_PF7, /* 0x78-0x7b */ + FOCUS_PF8, JAP_86, FOCUS_PF10, 0 /* 0x7c-0x7f */ +}; + +/* BTC */ +#define E0_MACRO 112 +/* LK450 */ +#define E0_F13 113 +#define E0_F14 114 +#define E0_HELP 115 +#define E0_DO 116 +#define E0_F17 117 +#define E0_KPMINPLUS 118 +/* + * My OmniKey generates e0 4c for the "OMNI" key and the + * right alt key does nada. [kkoller@nyx10.cs.du.edu] + */ +#define E0_OK 124 +/* + * New microsoft keyboard is rumoured to have + * e0 5b (left window button), e0 5c (right window button), + * e0 5d (menu button). [or: LBANNER, RBANNER, RMENU] + * [or: Windows_L, Windows_R, TaskMan] + */ +#define E0_MSLW 125 +#define E0_MSRW 126 +#define E0_MSTM 127 + +static unsigned char e0_keys[128] = { + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00-0x07 */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08-0x0f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10-0x17 */ + 0, 0, 0, 0, E0_KPENTER, E0_RCTRL, 0, 0, /* 0x18-0x1f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20-0x27 */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28-0x2f */ + 0, 0, 0, 0, 0, E0_KPSLASH, 0, E0_PRSCR, /* 0x30-0x37 */ + E0_RALT, 0, 0, 0, 0, E0_F13, E0_F14, E0_HELP, /* 0x38-0x3f */ + E0_DO, E0_F17, 0, 0, 0, 0, E0_BREAK, E0_HOME, /* 0x40-0x47 */ + E0_UP, E0_PGUP, 0, E0_LEFT, E0_OK, E0_RIGHT, E0_KPMINPLUS, E0_END,/* 0x48-0x4f */ + E0_DOWN, E0_PGDN, E0_INS, E0_DEL, 0, 0, 0, 0, /* 0x50-0x57 */ + 0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, 0, 0, /* 0x58-0x5f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ + 0, 0, 0, 0, 0, 0, 0, E0_MACRO, /* 0x68-0x6f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */ + 0, 0, 0, 0, 0, 0, 0, 0 /* 0x78-0x7f */ +}; + +int pckbd_setkeycode(unsigned int scancode, unsigned int keycode) +{ + if (scancode < SC_LIM || scancode > 255 || keycode > 127) + return -EINVAL; + if (scancode < 128) + high_keys[scancode - SC_LIM] = keycode; + else + e0_keys[scancode - 128] = keycode; + return 0; +} + +int pckbd_getkeycode(unsigned int scancode) +{ + return + (scancode < SC_LIM || scancode > 255) ? -EINVAL : + (scancode < 128) ? high_keys[scancode - SC_LIM] : + e0_keys[scancode - 128]; +} + +static int do_acknowledge(unsigned char scancode) +{ + if (reply_expected) { + /* Unfortunately, we must recognise these codes only if we know they + * are known to be valid (i.e., after sending a command), because there + * are some brain-damaged keyboards (yes, FOCUS 9000 again) which have + * keys with such codes :( + */ + if (scancode == KBD_REPLY_ACK) { + acknowledge = 1; + reply_expected = 0; + return 0; + } else if (scancode == KBD_REPLY_RESEND) { + resend = 1; + reply_expected = 0; + return 0; + } + /* Should not happen... */ +#if 0 + printk(KERN_DEBUG "keyboard reply expected - got %02x\n", + scancode); +#endif + } + return 1; +} + +int pckbd_translate(unsigned char scancode, unsigned char *keycode, + char raw_mode) +{ + static int prev_scancode = 0; + + /* special prefix scancodes.. */ + if (scancode == 0xe0 || scancode == 0xe1) { + prev_scancode = scancode; + return 0; + } + + /* 0xFF is sent by a few keyboards, ignore it. 0x00 is error */ + if (scancode == 0x00 || scancode == 0xff) { + prev_scancode = 0; + return 0; + } + + scancode &= 0x7f; + + if (prev_scancode) { + /* + * usually it will be 0xe0, but a Pause key generates + * e1 1d 45 e1 9d c5 when pressed, and nothing when released + */ + if (prev_scancode != 0xe0) { + if (prev_scancode == 0xe1 && scancode == 0x1d) { + prev_scancode = 0x100; + return 0; + } else if (prev_scancode == 0x100 && scancode == 0x45) { + *keycode = E1_PAUSE; + prev_scancode = 0; + } else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown e1 escape sequence\n"); +#endif + prev_scancode = 0; + return 0; + } + } else { + prev_scancode = 0; + /* + * The keyboard maintains its own internal caps lock and + * num lock statuses. In caps lock mode E0 AA precedes make + * code and E0 2A follows break code. In num lock mode, + * E0 2A precedes make code and E0 AA follows break code. + * We do our own book-keeping, so we will just ignore these. + */ + /* + * For my keyboard there is no caps lock mode, but there are + * both Shift-L and Shift-R modes. The former mode generates + * E0 2A / E0 AA pairs, the latter E0 B6 / E0 36 pairs. + * So, we should also ignore the latter. - aeb@cwi.nl + */ + if (scancode == 0x2a || scancode == 0x36) + return 0; + + if (e0_keys[scancode]) + *keycode = e0_keys[scancode]; + else { +#ifdef KBD_REPORT_UNKN + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown scancode e0 %02x\n", + scancode); +#endif + return 0; + } + } + } else if (scancode >= SC_LIM) { + /* This happens with the FOCUS 9000 keyboard + Its keys PF1..PF12 are reported to generate + 55 73 77 78 79 7a 7b 7c 74 7e 6d 6f + Moreover, unless repeated, they do not generate + key-down events, so we have to zero up_flag below */ + /* Also, Japanese 86/106 keyboards are reported to + generate 0x73 and 0x7d for \ - and \ | respectively. */ + /* Also, some Brazilian keyboard is reported to produce + 0x73 and 0x7e for \ ? and KP-dot, respectively. */ + + *keycode = high_keys[scancode - SC_LIM]; + + if (!*keycode) { + if (!raw_mode) { +#ifdef KBD_REPORT_UNKN + printk(KERN_INFO "keyboard: unrecognized scancode (%02x)" + " - ignored\n", scancode); +#endif + } + return 0; + } + } else + *keycode = scancode; + return 1; +} + +char pckbd_unexpected_up(unsigned char keycode) +{ + /* unexpected, but this can happen: maybe this was a key release for a + FOCUS 9000 PF key; if we want to see it, we have to clear up_flag */ + if (keycode >= SC_LIM || keycode == 85) + return 0; + else + return 0200; +} + +static inline void handle_mouse_event(unsigned char scancode) +{ +#ifdef CONFIG_PSMOUSE + if (mouse_reply_expected) { + if (scancode == AUX_ACK) { + mouse_reply_expected--; + return; + } + mouse_reply_expected = 0; + } + + add_mouse_randomness(scancode); + if (aux_count) { + int head = queue->head; + + queue->buf[head] = scancode; + head = (head + 1) & (AUX_BUF_SIZE-1); + if (head != queue->tail) { + queue->head = head; + if (queue->fasync) + kill_fasync(queue->fasync, SIGIO); + wake_up_interruptible(&queue->proc_list); + } + } +#endif +} + +/* + * This reads the keyboard status port, and does the + * appropriate action. + * + * It requires that we hold the keyboard controller + * spinlock. + */ +static unsigned char handle_kbd_event(void) +{ + unsigned char status = kbd_read_status(); + unsigned int work = 10000; + + while (status & KBD_STAT_OBF) { + unsigned char scancode; + + scancode = kbd_read_input(); + if (status & KBD_STAT_MOUSE_OBF) { + handle_mouse_event(scancode); + } else { + if (do_acknowledge(scancode)) + handle_scancode(scancode, !(scancode & 0x80)); + mark_bh(KEYBOARD_BH); + } + + status = kbd_read_status(); + + if(!work--) + { + printk(KERN_ERR "pc_keyb: controller jammed (0x%02X).\n", + status); + break; + } + } + + return status; +} + + +static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned long flags; + + kbd_pt_regs = regs; + + spin_lock_irqsave(&kbd_controller_lock, flags); + handle_kbd_event(); + spin_unlock_irqrestore(&kbd_controller_lock, flags); +} + +/* + * send_data sends a character to the keyboard and waits + * for an acknowledge, possibly retrying if asked to. Returns + * the success status. + * + * Don't use 'jiffies', so that we don't depend on interrupts + */ +static int send_data(unsigned char data) +{ + int retries = 3; + + do { + unsigned long timeout = KBD_TIMEOUT; + + acknowledge = 0; /* Set by interrupt routine on receipt of ACK. */ + resend = 0; + reply_expected = 1; + kbd_write_output_w(data); + for (;;) { + if (acknowledge) + return 1; + if (resend) + break; + mdelay(1); + if (!--timeout) { +#ifdef KBD_REPORT_TIMEOUTS + printk(KERN_WARNING "Keyboard timeout[2]\n"); +#endif + return 0; + } + } + } while (retries-- > 0); +#ifdef KBD_REPORT_TIMEOUTS + printk(KERN_WARNING "keyboard: Too many NACKs -- noisy kbd cable?\n"); +#endif + return 0; +} + +void pckbd_leds(unsigned char leds) +{ + if (!send_data(KBD_CMD_SET_LEDS) || !send_data(leds)) + send_data(KBD_CMD_ENABLE); /* re-enable kbd if any errors */ +} + +/* + * In case we run on a non-x86 hardware we need to initialize both the + * keyboard controller and the keyboard. On a x86, the BIOS will + * already have initialized them. + * + * Some x86 BIOSes do not correctly initialize the keyboard, so the + * "kbd-reset" command line options can be given to force a reset. + * [Ranger] + */ +#ifdef __i386__ + int kbd_startup_reset __initdata = 0; +#else + int kbd_startup_reset __initdata = 1; +#endif + +/* for "kbd-reset" cmdline param */ +void __init kbd_reset_setup(char *str, int *ints) +{ + kbd_startup_reset = 1; +} + +#define KBD_NO_DATA (-1) /* No data */ +#define KBD_BAD_DATA (-2) /* Parity or other error */ + +static int __init kbd_read_data(void) +{ + int retval = KBD_NO_DATA; + unsigned char status; + + status = kbd_read_status(); + if (status & KBD_STAT_OBF) { + unsigned char data = kbd_read_input(); + + retval = data; + if (status & (KBD_STAT_GTO | KBD_STAT_PERR)) + retval = KBD_BAD_DATA; + } + return retval; +} + +static void __init kbd_clear_input(void) +{ + int maxread = 100; /* Random number */ + + do { + if (kbd_read_data() == KBD_NO_DATA) + break; + } while (--maxread); +} + +static int __init kbd_wait_for_input(void) +{ + long timeout = KBD_INIT_TIMEOUT; + + do { + int retval = kbd_read_data(); + if (retval >= 0) + return retval; + mdelay(1); + } while (--timeout); + return -1; +} + +static void kbd_write_command_w(int data) +{ + unsigned long flags; + + spin_lock_irqsave(&kbd_controller_lock, flags); + kb_wait(); + kbd_write_command(data); + spin_unlock_irqrestore(&kbd_controller_lock, flags); +} + +static void kbd_write_output_w(int data) +{ + unsigned long flags; + + spin_lock_irqsave(&kbd_controller_lock, flags); + kb_wait(); + kbd_write_output(data); + spin_unlock_irqrestore(&kbd_controller_lock, flags); +} + +#if defined CONFIG_PSMOUSE +static void kbd_write_cmd(int cmd) +{ + unsigned long flags; + + spin_lock_irqsave(&kbd_controller_lock, flags); + kb_wait(); + kbd_write_command(KBD_CCMD_WRITE_MODE); + kb_wait(); + kbd_write_output(cmd); + spin_unlock_irqrestore(&kbd_controller_lock, flags); +} +#endif /* CONFIG_PSMOUSE */ + +static char * __init initialize_kbd(void) +{ + int status; + + /* + * Test the keyboard interface. + * This seems to be the only way to get it going. + * If the test is successful a x55 is placed in the input buffer. + */ + kbd_write_command_w(KBD_CCMD_SELF_TEST); + if (kbd_wait_for_input() != 0x55) + return "Keyboard failed self test"; + + /* + * Perform a keyboard interface test. This causes the controller + * to test the keyboard clock and data lines. The results of the + * test are placed in the input buffer. + */ + kbd_write_command_w(KBD_CCMD_KBD_TEST); + if (kbd_wait_for_input() != 0x00) + return "Keyboard interface failed self test"; + + /* + * Enable the keyboard by allowing the keyboard clock to run. + */ + kbd_write_command_w(KBD_CCMD_KBD_ENABLE); + + /* + * Reset keyboard. If the read times out + * then the assumption is that no keyboard is + * plugged into the machine. + * This defaults the keyboard to scan-code set 2. + * + * Set up to try again if the keyboard asks for RESEND. + */ + do { + kbd_write_output_w(KBD_CMD_RESET); + status = kbd_wait_for_input(); + if (status == KBD_REPLY_ACK) + break; + if (status != KBD_REPLY_RESEND) + return "Keyboard reset failed, no ACK"; + } while (1); + + if (kbd_wait_for_input() != KBD_REPLY_POR) + return "Keyboard reset failed, no POR"; + + /* + * Set keyboard controller mode. During this, the keyboard should be + * in the disabled state. + * + * Set up to try again if the keyboard asks for RESEND. + */ + do { + kbd_write_output_w(KBD_CMD_DISABLE); + status = kbd_wait_for_input(); + if (status == KBD_REPLY_ACK) + break; + if (status != KBD_REPLY_RESEND) + return "Disable keyboard: no ACK"; + } while (1); + + kbd_write_command_w(KBD_CCMD_WRITE_MODE); + kbd_write_output_w(KBD_MODE_KBD_INT + | KBD_MODE_SYS + | KBD_MODE_DISABLE_MOUSE + | KBD_MODE_KCC); + + /* ibm powerpc portables need this to use scan-code set 1 -- Cort */ + kbd_write_command_w(KBD_CCMD_READ_MODE); + if (!(kbd_wait_for_input() & KBD_MODE_KCC)) { + /* + * If the controller does not support conversion, + * Set the keyboard to scan-code set 1. + */ + kbd_write_output_w(0xF0); + kbd_wait_for_input(); + kbd_write_output_w(0x01); + kbd_wait_for_input(); + } + + + kbd_write_output_w(KBD_CMD_ENABLE); + if (kbd_wait_for_input() != KBD_REPLY_ACK) + return "Enable keyboard: no ACK"; + + /* + * Finally, set the typematic rate to maximum. + */ + kbd_write_output_w(KBD_CMD_SET_RATE); + if (kbd_wait_for_input() != KBD_REPLY_ACK) + return "Set rate: no ACK"; + kbd_write_output_w(0x00); + if (kbd_wait_for_input() != KBD_REPLY_ACK) + return "Set rate: no ACK"; + + return NULL; +} + +void __init pckbd_init_hw(void) +{ + kbd_request_region(); + + /* Flush any pending input. */ + kbd_clear_input(); + + if (kbd_startup_reset) { + char *msg = initialize_kbd(); + if (msg) + printk(KERN_WARNING "initialize_kbd: %s\n", msg); + } + +#if defined CONFIG_PSMOUSE + psaux_init(); +#endif + + /* Ok, finally allocate the IRQ, and off we go.. */ + kbd_request_irq(keyboard_interrupt); +} + +#if defined CONFIG_PSMOUSE + +/* + * Check if this is a dual port controller. + */ +static int __init detect_auxiliary_port(void) +{ + unsigned long flags; + int loops = 10; + int retval = 0; + + spin_lock_irqsave(&kbd_controller_lock, flags); + + /* Put the value 0x5A in the output buffer using the "Write + * Auxiliary Device Output Buffer" command (0xD3). Poll the + * Status Register for a while to see if the value really + * turns up in the Data Register. If the KBD_STAT_MOUSE_OBF + * bit is also set to 1 in the Status Register, we assume this + * controller has an Auxiliary Port (a.k.a. Mouse Port). + */ + kb_wait(); + kbd_write_command(KBD_CCMD_WRITE_AUX_OBUF); + + kb_wait(); + kbd_write_output(0x5a); /* 0x5a is a random dummy value. */ + + do { + unsigned char status = kbd_read_status(); + + if (status & KBD_STAT_OBF) { + (void) kbd_read_input(); + if (status & KBD_STAT_MOUSE_OBF) { + printk(KERN_INFO "Detected PS/2 Mouse Port.\n"); + retval = 1; + } + break; + } + mdelay(1); + } while (--loops); + spin_unlock_irqrestore(&kbd_controller_lock, flags); + + return retval; +} + +/* + * Send a byte to the mouse. + */ +static void aux_write_dev(int val) +{ + unsigned long flags; + + spin_lock_irqsave(&kbd_controller_lock, flags); + kb_wait(); + kbd_write_command(KBD_CCMD_WRITE_MOUSE); + kb_wait(); + kbd_write_output(val); + spin_unlock_irqrestore(&kbd_controller_lock, flags); +} + +/* + * Send a byte to the mouse & handle returned ack + */ +static void aux_write_ack(int val) +{ + unsigned long flags; + + spin_lock_irqsave(&kbd_controller_lock, flags); + kb_wait(); + kbd_write_command(KBD_CCMD_WRITE_MOUSE); + kb_wait(); + kbd_write_output(val); + /* we expect an ACK in response. */ + mouse_reply_expected++; + kb_wait(); + spin_unlock_irqrestore(&kbd_controller_lock, flags); +} + +static unsigned char get_from_queue(void) +{ + unsigned char result; + unsigned long flags; + + spin_lock_irqsave(&kbd_controller_lock, flags); + result = queue->buf[queue->tail]; + queue->tail = (queue->tail + 1) & (AUX_BUF_SIZE-1); + spin_unlock_irqrestore(&kbd_controller_lock, flags); + return result; +} + + +static inline int queue_empty(void) +{ + return queue->head == queue->tail; +} + +static int fasync_aux(int fd, struct file *filp, int on) +{ + int retval; + + retval = fasync_helper(fd, filp, on, &queue->fasync); + if (retval < 0) + return retval; + return 0; +} + + +/* + * Random magic cookie for the aux device + */ +#define AUX_DEV ((void *)queue) + +static int release_aux(struct inode * inode, struct file * file) +{ + fasync_aux(-1, file, 0); + if (--aux_count) + return 0; + kbd_write_cmd(AUX_INTS_OFF); /* Disable controller ints */ + kbd_write_command_w(KBD_CCMD_MOUSE_DISABLE); + aux_free_irq(AUX_DEV); + return 0; +} + +/* + * Install interrupt handler. + * Enable auxiliary device. + */ + +static int open_aux(struct inode * inode, struct file * file) +{ + if (aux_count++) { + return 0; + } + queue->head = queue->tail = 0; /* Flush input queue */ + if (aux_request_irq(keyboard_interrupt, AUX_DEV)) { + aux_count--; + return -EBUSY; + } + kbd_write_command_w(KBD_CCMD_MOUSE_ENABLE); /* Enable the + auxiliary port on + controller. */ + aux_write_ack(AUX_ENABLE_DEV); /* Enable aux device */ + kbd_write_cmd(AUX_INTS_ON); /* Enable controller ints */ + + return 0; +} + +/* + * Put bytes from input queue to buffer. + */ + +static ssize_t read_aux(struct file * file, char * buffer, + size_t count, loff_t *ppos) +{ + struct wait_queue wait = { current, NULL }; + ssize_t i = count; + unsigned char c; + + if (queue_empty()) { + if (file->f_flags & O_NONBLOCK) + return -EAGAIN; + add_wait_queue(&queue->proc_list, &wait); +repeat: + current->state = TASK_INTERRUPTIBLE; + if (queue_empty() && !signal_pending(current)) { + schedule(); + goto repeat; + } + current->state = TASK_RUNNING; + remove_wait_queue(&queue->proc_list, &wait); + } + while (i > 0 && !queue_empty()) { + c = get_from_queue(); + put_user(c, buffer++); + i--; + } + if (count-i) { + file->f_dentry->d_inode->i_atime = CURRENT_TIME; + return count-i; + } + if (signal_pending(current)) + return -ERESTARTSYS; + return 0; +} + +/* + * Write to the aux device. + */ + +static ssize_t write_aux(struct file * file, const char * buffer, + size_t count, loff_t *ppos) +{ + ssize_t retval = 0; + + if (count) { + ssize_t written = 0; + + if (count > 32) + count = 32; /* Limit to 32 bytes. */ + do { + char c; + get_user(c, buffer++); + aux_write_dev(c); + written++; + } while (--count); + retval = -EIO; + if (written) { + retval = written; + file->f_dentry->d_inode->i_mtime = CURRENT_TIME; + } + } + + return retval; +} + +static unsigned int aux_poll(struct file *file, poll_table * wait) +{ + poll_wait(file, &queue->proc_list, wait); + if (!queue_empty()) + return POLLIN | POLLRDNORM; + return 0; +} + +struct file_operations psaux_fops = { + NULL, /* seek */ + read_aux, + write_aux, + NULL, /* readdir */ + aux_poll, + NULL, /* ioctl */ + NULL, /* mmap */ + open_aux, + NULL, /* flush */ + release_aux, + NULL, + fasync_aux, +}; + +/* + * Initialize driver. + */ +static struct miscdevice psaux_mouse = { + PSMOUSE_MINOR, "psaux", &psaux_fops +}; + +static int __init psaux_init(void) +{ + if (!detect_auxiliary_port()) + return -EIO; + + misc_register(&psaux_mouse); + queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL); + memset(queue, 0, sizeof(*queue)); + queue->head = queue->tail = 0; + queue->proc_list = NULL; + +#ifdef INITIALIZE_MOUSE + kbd_write_command_w(KBD_CCMD_MOUSE_ENABLE); /* Enable Aux. */ + aux_write_ack(AUX_SET_SAMPLE); + aux_write_ack(100); /* 100 samples/sec */ + aux_write_ack(AUX_SET_RES); + aux_write_ack(3); /* 8 counts per mm */ + aux_write_ack(AUX_SET_SCALE21); /* 2:1 scaling */ +#endif /* INITIALIZE_MOUSE */ + kbd_write_command(KBD_CCMD_MOUSE_DISABLE); /* Disable aux device. */ + kbd_write_cmd(AUX_INTS_OFF); /* Disable controller ints. */ + + return 0; +} + +#endif /* CONFIG_PSMOUSE */ diff -Nru linux-2.2.14-rmk-mercury/drivers/sound/.indent.pro linux-2.2.14-rmk-mercury-gcc3/drivers/sound/.indent.pro --- linux-2.2.14-rmk-mercury/drivers/sound/.indent.pro 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/drivers/sound/.indent.pro 2000-03-10 15:47:10.000000000 +0000 @@ -0,0 +1,8 @@ +-bad +-bap +-nfca +-bl +-psl +-di16 +-lp +-ip5 diff -Nru linux-2.2.14-rmk-mercury/fs/file.c linux-2.2.14-rmk-mercury-gcc3/fs/file.c --- linux-2.2.14-rmk-mercury/fs/file.c 2000-03-10 15:46:47.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/fs/file.c 2007-07-10 12:45:01.000000000 +0100 @@ -38,7 +38,7 @@ int size = num * sizeof(struct file *); if (!array) { - printk (KERN_ERR __FUNCTION__ "array = 0 (num = %d)\n", num); + printk (KERN_ERR "free_fd_array array = 0 (num = %d)\n", num); return; } @@ -143,7 +143,7 @@ int size = num / 8; if (!array) { - printk (KERN_ERR __FUNCTION__ "array = 0 (num = %d)\n", num); + printk (KERN_ERR "free_fdset array = 0 (num = %d)\n", num); return; } diff -Nru linux-2.2.14-rmk-mercury/include/asm/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/a.out.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,37 @@ +#ifndef __ARM_A_OUT_H__ +#define __ARM_A_OUT_H__ + +#include + +struct exec +{ + __u32 a_info; /* Use macros N_MAGIC, etc for access */ + __u32 a_text; /* length of text, in bytes */ + __u32 a_data; /* length of data, in bytes */ + __u32 a_bss; /* length of uninitialized data area for file, in bytes */ + __u32 a_syms; /* length of symbol table data in file, in bytes */ + __u32 a_entry; /* start address */ + __u32 a_trsize; /* length of relocation info for text, in bytes */ + __u32 a_drsize; /* length of relocation info for data, in bytes */ +}; + +/* + * This is always the same + */ +#define N_TXTADDR(a) (0x00008000) + +#define N_TRSIZE(a) ((a).a_trsize) +#define N_DRSIZE(a) ((a).a_drsize) +#define N_SYMSIZE(a) ((a).a_syms) + +#define M_ARM 103 + +#ifdef __KERNEL__ +#include +#endif + +#ifndef LIBRARY_START_TEXT +#define LIBRARY_START_TEXT (0x00c00000) +#endif + +#endif /* __A_OUT_GNU_H__ */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arcaudio.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arcaudio.h --- linux-2.2.14-rmk-mercury/include/asm/arcaudio.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arcaudio.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * arcaudio.h + * + */ + +#ifndef _LINUX_ARCAUDIO_H +#define _LINUX_ARCAUDIO_H + +#define ARCAUDIO_MAXCHANNELS 8 + +enum ch_type +{ + ARCAUDIO_NONE, /* No sound (muted) */ + ARCAUDIO_8BITSIGNED, /* signed 8 bits per samples */ + ARCAUDIO_8BITUNSIGNED, /* unsigned 8 bits per samples */ + ARCAUDIO_16BITSIGNED, /* signed 16 bits per samples (little endian) */ + ARCAUDIO_16BITUNSIGNED, /* unsigned 16 bits per samples (little endian) */ + ARCAUDIO_LOG /* Vidc Log */ +}; + +/* + * Global information + */ +struct arcaudio +{ + int sample_rate; /* sample rate (Hz) */ + int num_channels; /* number of channels */ + int volume; /* overall system volume */ +}; + +/* + * Per channel information + */ +struct arcaudio_channel +{ + int stereo_position; /* Channel position */ + int channel_volume; /* Channel volume */ + enum ch_type channel_type; /* Type of channel */ + int buffer_size; /* Size of channel buffer */ +}; + +/* IOCTLS */ +#define ARCAUDIO_GETINFO 0x6101 +#define ARCAUDIO_SETINFO 0x6102 +#define ARCAUDIO_GETCHANNELINFO 0x6111 +#define ARCAUDIO_SETCHANNELINFO 0x6112 +#define ARCAUDIO_GETOPTS 0x61f0 +#define ARCAUDIO_SETOPTS 0x61f1 +#define ARCAUDIO_OPTSPKR 1<<0 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/arch/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/a.out.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/clps7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/clps7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch/clps7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/clps7212.h 2000-03-28 13:53:14.000000000 +0100 @@ -0,0 +1,254 @@ +/* + * linux/include/asm-arm/arch-clps7212/clps7212.h + * + * CLPS7212 extensions added by Hugo Fiennes, + * CLPS7110 version written 1998,1999 by Werner Almesberger + * + * This file contains the hardware definitions of the CL-PS7212 chip + * + * The 7212 is basically a 7110 with extensions - a digital audio interface, + * some on-chip SRAM, faster clock, etc. + * + */ + +#ifndef _ASM_ARCH_CLPS7212_H +#define _ASM_ARCH_CLPS7212_H + +/* + * CL-PS7212 internal registers + * + * The names will almost certainly clash with something else ... so we'll + * probably have to prefix them with CLPS7212_ or something equally ugly later. + */ + +#define PADR 0x0000 /* Port A Data register ---------------------------- */ +#define PBDR 0x0001 /* Port B Data register ---------------------------- */ +#define PCDR 0x0002 /* Port C Data register ---------------------------- */ +#define PDDR 0x0003 /* Port D Data register ---------------------------- */ +#define PADDR 0x0040 /* Port A Data Direction register ------------------ */ +#define PBDDR 0x0041 /* Port B Data Direction register ------------------ */ +#define PCDDR 0x0042 /* Port C Data Direction register ------------------ */ +#define PDDDR 0x0043 /* Port D Data Direction register ------------------ */ +#define PEDR 0x0080 /* Port E Data register ---------------------------- */ +#define PEDDR 0x00c0 /* Port E Data Direction register ------------------ */ + +#define SYSCON 0x0100 /* System Control register ------------------------- */ +#define KBDSCAN 0x0000000f /* Keyboard scan */ +#define KBSC_HI 0x0 /* All driven high */ +#define KBSC_LO 0x1 /* All driven low */ +#define KBSC_X 0x2 /* All high impedance */ +#define KBSC_COL0 0x8 /* Column 0 high, others high impedance */ +#define KBSC_COL1 0x9 /* Column 1 high, others high impedance */ +#define KBSC_COL2 0xa /* Column 2 high, others high impedance */ +#define KBSC_COL3 0xb /* Column 3 high, others high impedance */ +#define KBSC_COL4 0xc /* Column 4 high, others high impedance */ +#define KBSC_COL5 0xd /* Column 5 high, others high impedance */ +#define KBSC_COL6 0xe /* Column 6 high, others high impedance */ +#define KBSC_COL7 0xf /* Column 7 high, others high impedance */ +#define TC1M 0x00000010 /* TC1 mode (0: free-running, 1: prescale) */ +#define TC1S 0x00000020 /* TC1 clock source (0: 2 kHz, 1: 512 kHz) */ +#define TC2M 0x00000040 /* TC2 mode (0: free-running, 1: prescale) */ +#define TC2S 0x00000080 /* TC2 clock source (0: 2 kHz, 1: 512 kHz) */ +#define UARTEN 0x00000100 /* Internal UART enable */ +#define BZTOG 0x00000200 /* Drive buzzer directly */ +#define BZMOD 0x00000400 /* Buzzer drive mode (0: BZTOG, 1: TC1 under-flow)*/ +#define DBGEN 0x00000800 /* Debug mode */ +#define LCDEN 0x00001000 /* LCD enable */ +#define CDENTX 0x00002000 /* Codec interface enable Tx */ +#define CDENRX 0x00004000 /* Codec interface enable Rx */ +#define SIREN 0x00008000 /* HP SIR protocol encoding enable */ +#define ADCKSEL 0x00030000 /* Microwire/SPI peripheral clock speed select */ +#define ADCKSEL_SHIFT 16 +#define ADCS_8 0x0 /* Sample 8 kHz, interface 4 kHz */ +#define ADCS_32 0x1 /* 32/16 kHz */ +#define ADCS_128 0x2 /* 128/64 kHz */ +#define ADCS_256 0x3 /* 256/128 kHz */ +#define EXCKEN 0x00040000 /* External expansion clock enable */ +#define WAKEDIS 0x00080000 /* Disable switch-on through wake-up */ +#define IRTXM 0x00100000 /* IrDA Tx mode (0: 3/16 of rate, 1: 1.63 us) */ + +#define SYSFLG 0x0140 /* System Status Flags register -------------------- */ +#define MCDR 0x00000001 /* Media changed direct read */ +#define DCDET 0x00000002 /* Main adapter is powering the system */ +#define WUDR 0x00000004 /* Wake-up direct read */ +#define WUON 0x00000008 /* Left standby on wake-up */ +#define DID 0x000000f0 /* Display ID nibble */ +#define DID_SHIFT 4 +#define CTS 0x00000100 /* UART CTS */ +#define DSR 0x00000200 /* UART DSR */ +#define DCD 0x00000400 /* UART DCD */ +#define UBUSY 0x00000800 /* UART transmitter busy */ +#define NBFLG 0x00001000 /* New battery flag */ +#define RSTFLG 0x00002000 /* Reset flag */ +#define PFFLG 0x00004000 /* Power fail flag */ +#define CLDFLG 0x00008000 /* Cold start flag */ +#define RTCDIV 0x003f0000 /* 64 Hz ticks since last RTC increment */ +#define RTCDIV_SHIFT 16 +#define URXFE 0x00400000 /* UART receiver FIFO empty */ +#define UTXFF 0x00800000 /* UART transmit FIFO full */ +#define CRXFE 0x01000000 /* Codec Rx FIFO empty */ +#define CTXFF 0x02000000 /* Codec Tx FIFO full */ +#define SSIBUSY 0x04000000 /* Synchronous serial interface busy */ +#define BOOT8BIT 0x80000000 /* Initial bus width (0: 32 bit, 1: 8 bit) */ +#define VERID 0xc0000000 /* Version ID */ +#define VERID_SHIFT 30 + +#define MEMCFG1 0x0180 /* Memory Configuration register 1 ----------------- */ +#define MEMCFG2 0x01c0 /* Memory Configuration register 2 ----------------- */ +#define CS_BW 0x03 /* Bus width */ +#define CS_BW_BUS32_E0 0 /* 32 bit if E=0 */ +#define CS_BW_BUS16_E0 1 /* 16 bit if E=0 */ +#define CS_BW_BUS8_E0 2 /* 8 bit if E=0 */ +#define CS_BW_PCMCIA_E0 3 /* PCMCIA if E=0 */ +#define CS_BW_BUS8_E1 0 /* 8 bit if E=1 */ +#define CS_BW_PCMCIA_E1 1 /* PCMCIA if E=1 */ +#define CS_BW_BUS32_E1 2 /* 32 bit if E=1 */ +#define CS_BW_BUS16_E1 3 /* 16 bit if E=1 */ +#define CS_RAWT 0x0c /* Random Access Wait State */ +#define CS_RAWT_SHIFT 2 /* WS = 4-N; speed = 50+50*WS ns */ +#define CS_SAWR 0x30 /* Sequential Access Wait State */ +#define CS_SAWR_SHIFT 4 /* WS = 3-N; speed[WS] = 40,80,120,150 ns */ +#define CS_SQAEN 0x40 /* Sequential Access Enable */ +#define CS_CLKEN 0x80 /* Expansion Clock Enable */ +#define DRFPR 0x0200 + +#define INTSR 0x0240 /* Interrupt Status register ----------------------- */ +#define EXTFIQ 0x00000001 /* External fast interrupt */ +#define BLINT 0x00000002 /* Battery low interrupt */ +#define WEINT 0x00000004 /* Watch dog expired interrupt */ +#define MCINT 0x00000008 /* Media changed interrupt */ +#define CSINT 0x00000010 /* Codec sound interrupt */ +#define EINT1 0x00000020 /* External interrupt 1 */ +#define EINT2 0x00000040 /* External interrupt 2 */ +#define EINT3 0x00000080 /* External interrupt 3 */ +#define TC1OI 0x00000100 /* TC1 under-flow interrupt */ +#define TC2OI 0x00000200 /* TC2 under-flow interrupt */ +#define RTCMI 0x00000400 /* RTC compare match interrupt */ +#define TINT 0x00000800 /* 64-Hz tick interrupt */ +#define UTXINT 0x00001000 /* Internal UART transmit FIFO half-empty intr. */ +#define URXINT 0x00002000 /* Internal UART receive FIFO half-full interrupt */ +#define UMSINT 0x00004000 /* Internal UART modem status changed interrupt */ +#define SSEOTI 0x00008000 /* Synchronous serial interface end-of-transfer */ + +#define INTMR 0x0280 /* Interrupt Mask register ------------------------- */ + +#define LCDCON 0x02c0 /* LCD Control register ---------------------------- */ +#define VBUFSIZ 0x00001fff /* Video buffer size (bits/128-1) */ +#define LINELEN 0x0007e000 /* Line length (pix/16-1) */ +#define LINELEN_SHIFT 13 +#define PIXPSC 0x01f80000 /* Pixel prescale (526628/pixels-1) */ +#define PIXPSC_SHIFT 19 +#define ACPSC 0x3e000000 /* AC prescale */ +#define ACPSC_SHIFT 25 +#define GSEN 0x40000000 /* Grayscale enable (0: monochrome) */ +#define GSMD 0x80000000 /* Grayscale mode (0: 2 bit, 1: 4 bit) */ + +#define TC1D 0x0300 /* Timer Counter 1 Data register ------------------- */ +#define TC_MASK 0x0000ffff +#define TC2D 0x0340 /* Timer Counter 2 Data register ------------------- */ + +#define RTCDR 0x0380 /* Realtime Clock Data register -------------------- */ + +#define RTCMR 0x03c0 /* Realtime Clock Match register ------------------- */ + +#define PMPCON 0x0400 + +#define CODR 0x0440 /* Codec Interface Data register ------------------- */ + +#define UARTDR 0x0480 /* UART FIFO Data register ------------------------- */ +#define RX_DATA 0x000000ff /* Rx data */ +#define FRMERR 0x00000100 /* UART framing error */ +#define PARERR 0x00000200 /* UART parity error */ +#define OVERR 0x00000400 /* UART overrun error */ + +#define UBRLCR 0x04c0 /* UART Bit Rate and Line Control register --------- */ +#define BRDIV 0x00000fff /* Bit rate divisor */ +#define BR_115200 1 +#define BR_57600 3 +#define BR_38400 5 +#define BR_19200 11 +#define BR_9600 23 +#define BR_2400 95 +#define BR_1200 191 +#define BREAK 0x00001000 /* Set Tx high */ +#define PRTEN 0x00002000 /* Parity enable */ +#define EVENPRT 0x00004000 /* Even parity */ +#define XSTOP 0x00008000 /* Extra stop bit */ +#define FIFOEN 0x00010000 /* Enable FIFO */ +#define WRDLEN 0x00030000 /* Word length */ +#define WRDLEN_SHIFT 17 +#define WL_5 0x0 /* 5 bits */ +#define WL_6 0x1 /* 6 bits */ +#define WL_7 0x2 /* 7 bits */ +#define WL_8 0x3 /* 8 bits */ + +#define SYNCIO 0x0500 +#define TXFRMEN 0x00004000 /* Initiate data transfer */ +#define SMCKEN 0x00002000 /* Enable sample clock on SMPLCK */ +#define FRLEN 0x00001f00 /* Frame length */ +#define FRLEN_SHIFT 8 +#define ADCCFB 0x000000ff /* ADC Configuration byte */ +#define ADCRSW 0x0000ffff /* ADC result word */ + +#define PALLSW 0x0540 /* Least-significant 32-bit word of LCD Palette reg. */ +#define PALMSW 0x0580 /* Most-significant 32-bit word of LCD Palette reg. */ + +#define STFCLR 0x05c0 /* Write to clear all start up reason flags -------- */ +#define BLEOI 0x0600 /* Write to clear Battery Low interrupt ------------ */ +#define MCEOI 0x0640 /* Write to clear Media Changed interrupt ---------- */ +#define TEOI 0x0680 /* Write to clear Tick and Watchdog interrupt ------ */ +#define TC1EOI 0x06c0 /* Write to clear TC1 interrupt -------------------- */ +#define TC2EOI 0x0700 /* Write to clear TC2 interrupt -------------------- */ +#define RTCEOI 0x0740 /* Write to clear RTC Match interrupt -------------- */ +#define UMSEOI 0x0780 /* Write to clear UART Modem Status Changed interrupt*/ +#define COEOI 0x07c0 /* Write to clear Codec Sound interrupt ------------ */ +#define HALT 0x0800 /* Write to enter idle state ----------------------- */ +#define STDBY 0x0840 /* Write to standby state -------------------------- */ + +#define FBADDR 0x1000 /* LCD framebuffer address ------------------------- */ +#define SYSCON2 0x1100 /* System configuration register 2 ----------------- */ +#define SYSFLG2 0x1140 /* System status register 2 ------------------------ */ +#define INTSR2 0x1240 /* Interrupt status register 2 --------------------- */ +#define INTMR2 0x1280 /* Interrupt mask register 2 ----------------------- */ +#define UARTDR2 0x1480 /* UART2 data register ----------------------------- */ +#define UBLCR2 0x14c0 /* UART2 bitrate & line control register ----------- */ +#define SS2DR 0x1500 /* SS2DR master/slave SSI2 data register ----------- */ +#define SRXEOF 0x1600 /* Write to clear RX FIFO overflow flag ------------ */ +#define SS2POP 0x16c0 /* Write to pop SSI2 residual byte into RX FIFO ---- */ +#define KBDEOI 0x1700 /* Write to clear keyboard interrupt --------------- */ + +#define DAICONTROL 0x2000 /* Digital Audio Interface control ---------- */ +#define DAICONTROL_DAIEN (1<<16) /* Digital Audio Enable */ +#define DAICONTROL_ECS (1<<17) /* External clock select */ +#define DAICONTROL_LTCM (1<<19) /* Left channel mask */ +#define DAICONTROL_RTCM (1<<21) /* Right channel mask */ +#define DAIDATA0 0x2040 /* Digital Audio data 0 --------------------- */ +#define DAIDATA1 0x2080 /* Digital Audio data 1 --------------------- */ +#define DAIDATA2 0x20c0 /* Digital Audio data 2 --------------------- */ +#define DAIDATA2_LEFTENABLE 0x0011c000 /* Magic to enable left channel */ +#define DAIDATA2_RIGHTENABLE 0x000dc000 /* Magic to enable right channel */ +#define DAISTATUS 0x2100 /* Digital Audio status --------------------- */ +#define DAISTATUS_FIFO (1<<12) /* FIFO */ +#define SYSCON3 0x2200 /* System configuration 3 ------------------- */ +#define SYSCON3_DAIPSEL (1<<3) +#define SYSCON3_DAIEN (1<<9) /* Enable DAI */ +#define INTSR3 0x2240 /* Interrupt status register 3 -------------- */ +#define INTMR3 0x2280 /* Interrupt mask register 3 ---------------- */ +#define INTMR3_DAI (1<<0) /* DAI FIQ enable */ +#define LEDFLSH 0x22c0 /* LED flash control register --------------- */ + +/* + * CL-PS7212 PCMCIA memory constants + * + * Need to #define PCMCIA_BASE before using these macros. + */ + +#define PCMCIA_ATTR8(a) (PCMCIA_BASE+0x00000000+(a)) +#define PCMCIA_MEM(a) (PCMCIA_BASE+0x04000000+(a)) +#define PCMCIA_IO8(a) (PCMCIA_BASE+0x08000000+(a)) +#if 0 +#define PCMCIA_IO16(a) (PCMCIA_BASE+0x0c000000+((a) & ~3)+(((a) & 2) << 24)) +#endif +#define PCMCIA_IO16(a) (PCMCIA_BASE+0x00000000+((a&0xf)<<1)+(a&~0xf)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/dma.h --- linux-2.2.14-rmk-mercury/include/asm/arch/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/dma.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/empeg7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/empeg7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch/empeg7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/empeg7212.h 2000-11-27 12:32:42.000000000 +0000 @@ -0,0 +1,224 @@ +/* + * empeg-net7212 hardware-specifics + * + * (C) 2000 empeg ltd, http://www.empeg.com + * + * Authors: + * Hugo Fiennes, + * Mike Crowe, + * + */ + +#ifndef __ASM_ARCH_EMPEG7212_H +#define __ASM_ARCH_EMPEG7212_H + +/* ... and IRQ defintions */ +#define EMPEG_IRQ_IR 4 +#define EMPEG_IRQ_USBIRQ 1 +#define EMPEG_IRQ_IDE1 6 +#define EMPEG_IRQ_IDE2 7 +#define EMPEG_IRQ_AUDIOOUT 0 + +#define EMPEG_IR_MAJOR (242) +#define EMPEG_USB_MAJOR (243) +#define EMPEG_DISPLAY_MAJOR (244) +#define EMPEG_AUDIO_MAJOR (245) +#define EMPEG_STATE_MAJOR (246) +#define EMPEG_RDS_MAJOR (248) +#define EMPEG_AUDIOIN_MAJOR (249) + +/* Empeg IR ioctl values */ +#define EMPEG_IR_MAGIC 'i' + +/* Set/get the remote control type */ +#define EMPEG_IR_WRITE_TYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define EMPEG_IR_READ_TYPE _IOR(EMPEG_IR_MAGIC, 2, int) + +/* Set/get the delay before repeats are honoured (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define EMPEG_IR_READ_RPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) + +/* Set/get the interval between repeats (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define EMPEG_IR_READ_RPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) + +/* Set/get the timeout for a repeat occuring. If a repeat code happens + * after this amount of time without one then it will be ignored. */ +#define EMPEG_IR_WRITE_RPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define EMPEG_IR_READ_RPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +/* Deprecated ioctl values */ +#define IR_IOCSTYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define IR_IOCGTYPE _IOR(EMPEG_IR_MAGIC, 2, int) +#define IR_IOCTTYPE IR_IOCGTYPE /*deprecated*/ +#define IR_IOCSRPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define IR_IOCGRPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) +#define IR_IOCSRPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define IR_IOCGRPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) +#define IR_IOCSRPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define IR_IOCGRPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +#define IR_TYPE_COUNT 1 + +#define IR_TYPE_CAPTURE 0 +#define IR_TYPE_KENWOOD 1 + +/* Empeg Display ioctl values */ +#define EMPEG_DISPLAY_MAGIC 'd' + +/* Deprecated ioctl codes */ +#define DIS_IOCREFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define DIS_IOCSPOWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define DIS_IOCSPALETTE _IOW(EMPEG_DISPLAY_MAGIC, 4, int) +#define DIS_IOCCLEAR _IO(EMPEG_DISPLAY_MAGIC, 5) +#define DIS_IOCENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define DIS_IOCPOPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define DIS_IOCFLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) + +/* Should use these ioctl codes instead */ +#define EMPEG_DISPLAY_REFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define EMPEG_DISPLAY_POWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define EMPEG_DISPLAY_WRITE_PALETTE _IOW(EMPEG_DISPLAY_MAGIC, 4, int) +#define EMPEG_DISPLAY_CLEAR _IO(EMPEG_DISPLAY_MAGIC, 5) +#define EMPEG_DISPLAY_ENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define EMPEG_DISPLAY_POPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define EMPEG_DISPLAY_FLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) +#define EMPEG_DISPLAY_QUERYQUEUEFREE _IOR(EMPEG_DISPLAY_MAGIC, 9, int) +#define EMPEG_DISPLAY_SETCONTRAST _IOW(EMPEG_DISPLAY_MAGIC, 10, int) +#define EMPEG_DISPLAY_GETCONTRAST _IOR(EMPEG_DISPLAY_MAGIC, 10, int) +#define EMPEG_DISPLAY_SETBACKLIGHT _IOW(EMPEG_DISPLAY_MAGIC, 11, int) +#define EMPEG_DISPLAY_GETBACKLIGHT _IOR(EMPEG_DISPLAY_MAGIC, 11, int) + +/* Sound IOCTLs */ +/* Make use of the bitmasks in soundcard.h, we only support. + * PCM, RADIO and LINE. */ + +#define EMPEG_MIXER_MAGIC 'm' +#define EMPEG_DSP_MAGIC 'a' + +#define EMPEG_MIXER_READ_SOURCE _IOR(EMPEG_MIXER_MAGIC, 0, int) +#define EMPEG_MIXER_WRITE_SOURCE _IOW(EMPEG_MIXER_MAGIC, 0, int) +#define EMPEG_MIXER_READ_FLAGS _IOR(EMPEG_MIXER_MAGIC, 1, int) +#define EMPEG_MIXER_WRITE_FLAGS _IOW(EMPEG_MIXER_MAGIC, 1, int) +#define EMPEG_MIXER_READ_DB _IOR(EMPEG_MIXER_MAGIC, 2, int) +#define EMPEG_MIXER_WRITE_LOUDNESS _IOW(EMPEG_MIXER_MAGIC, 4, int) +#define EMPEG_MIXER_READ_LOUDNESS _IOR(EMPEG_MIXER_MAGIC, 4, int) +#define EMPEG_MIXER_READ_LOUDNESS_DB _IOR(EMPEG_MIXER_MAGIC, 5, int) +#define EMPEG_MIXER_WRITE_BALANCE _IOW(EMPEG_MIXER_MAGIC, 6, int) +#define EMPEG_MIXER_READ_BALANCE _IOR(EMPEG_MIXER_MAGIC, 6, int) +#define EMPEG_MIXER_READ_BALANCE_DB _IOR(EMPEG_MIXER_MAGIC, 7, int) +#define EMPEG_MIXER_WRITE_FADE _IOW(EMPEG_MIXER_MAGIC, 8, int) +#define EMPEG_MIXER_READ_FADE _IOR(EMPEG_MIXER_MAGIC, 8, int) +#define EMPEG_MIXER_READ_FADE_DB _IOR(EMPEG_MIXER_MAGIC, 9, int) +#define EMPEG_MIXER_SET_EQ _IOW(EMPEG_MIXER_MAGIC, 10, int) +#define EMPEG_MIXER_GET_EQ _IOR(EMPEG_MIXER_MAGIC, 11, int) +#define EMPEG_MIXER_SET_EQ_FOUR_CHANNEL _IOW(EMPEG_MIXER_MAGIC, 12, int) +#define EMPEG_MIXER_GET_EQ_FOUR_CHANNEL _IOR(EMPEG_MIXER_MAGIC, 13, int) +#define EMPEG_MIXER_GET_COMPRESSION _IOR(EMPEG_MIXER_MAGIC, 14, int) +#define EMPEG_MIXER_SET_COMPRESSION _IOW(EMPEG_MIXER_MAGIC, 14, int) +#define EMPEG_MIXER_SET_SAM _IOW(EMPEG_MIXER_MAGIC, 15, int) +#define EMPEG_MIXER_SET_HAM _IOW(EMPEG_MIXER_MAGIC, 16, int) + +/* Retrieve volume level corresponding to 0dB */ +#define EMPEG_MIXER_READ_ZERO_LEVEL _IOR(EMPEG_MIXER_MAGIC, 3, int) + +#define EMPEG_MIXER_FLAG_MUTE (1<<0) +/*#define EMPEG_MIXER_FLAG_LOUDNESS (1<<1)*/ + +/* Radio IOCTLs */ +/* These are in addition to those provided by the Video4Linux API */ +#define EMPEG_RADIO_MAGIC 'r' +#define EMPEG_RADIO_READ_MONO _IOR(EMPEG_RADIO_MAGIC, 73, int) +#define EMPEG_RADIO_WRITE_MONO _IOW(EMPEG_RADIO_MAGIC, 73, int) +#define EMPEG_RADIO_READ_DX _IOR(EMPEG_RADIO_MAGIC, 74, int) +#define EMPEG_RADIO_WRITE_DX _IOW(EMPEG_RADIO_MAGIC, 74, int) +#define EMPEG_RADIO_READ_SENSITIVITY _IOR(EMPEG_RADIO_MAGIC, 75, int) +#define EMPEG_RADIO_WRITE_SENSITIVITY _IOW(EMPEG_RADIO_MAGIC, 75, int) +#define EMPEG_RADIO_SEARCH _IO(EMPEG_RADIO_MAGIC, 76) /* Pass in direction in *arg */ +#define EMPEG_RADIO_GET_MULTIPATH _IOR(EMPEG_RADIO_MAGIC, 77, int) +#define EMPEG_RADIO_SET_STEREO _IOW(EMPEG_RADIO_MAGIC, 78, int) + +#define EMPEG_DSP_BEEP _IOW(EMPEG_DSP_MAGIC, 0, int) +#define EMPEG_DSP_PURGE _IOR(EMPEG_DSP_MAGIC, 1, int) + +/* State storage ioctls */ +/* Shouldn't need either of these in normal use. */ +#define EMPEG_STATE_MAGIC 's' +#define EMPEG_STATE_FORCESTORE _IO(EMPEG_STATE_MAGIC, 74) +#define EMPEG_STATE_FAKEPOWERFAIL _IO(EMPEG_STATE_MAGIC, 75) + +/* Where flash is mapped when running */ +#define EMPEG_FLASHBASE (FLASH_BASE) + +#ifndef __ASSEMBLY__ +struct empeg_eq_section_t +{ + unsigned int word1; + unsigned int word2; +}; + +#ifdef __KERNEL__ + +/* Inlines to get ethernet/pna stuff */ + +/* Flash/PROM layout: + + 00000 - bootstrap + 02000 - 48 bit ethernet ID + 02008 - 32 bit hardware version + 0200c - 32 bit unit serial number + 02010 - 128 bit (16 byte) unique ID + 0e000 - linux loader + 10000 - linux kernel + +*/ + +static __inline__ void empeg_getetherid(unsigned char *addr) +{ + unsigned char *flashinfo=(unsigned char*)(EMPEG_FLASHBASE+0x2000); + int a; + + /* Fill in ID */ + for(a=0;a<6;a++) addr[a]=flashinfo[a]; +} + +/* Set/get network type - cleaner done in here, honest! */ +extern int mercury_networktype; +static __inline__ const char* empeg_getethertype(void) +{ + return(mercury_networktype?"pna":"ethernet"); +} + +/* Inline to get hardware revision */ +static __inline__ int empeg_gethwrevision(void) +{ + int *flashinfo=(int*)(EMPEG_FLASHBASE+0x2000); + return(flashinfo[2]); +} + +/* Inline to get serial number */ +static __inline__ int empeg_getserialnumber(void) +{ + int *flashinfo=(int*)(EMPEG_FLASHBASE+0x2000); + return(flashinfo[3]); +} + +/* Inline to get unique ID */ +static __inline__ void empeg_getuniqueid(unsigned long *buffer) +{ + unsigned long *flashinfo=(unsigned long*)(EMPEG_FLASHBASE+0x2000); + int a; + + for(a=0;a<4;a++) buffer[a]=flashinfo[4+a]; +} + +extern void audio_emitted_action(void); + +extern void display_off(void); + +#endif /* __KERNEL__ */ +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_ARCH_EMPEG7212_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/arch/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/hardware.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,193 @@ +/* + * linux/include/asm-arm/arch-clps7212/hardware.h + * + * Written 1998,1999 by Werner Almesberger + * + * This file contains Linux-specific hardware definitions for the CL-PS7212 + * architecture and #includes hardware definitions of the CL-PS7212 chip, + * plus architecture-specific hardware definitions. + */ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include + +#if defined(CONFIG_ARCH_EB7212) +#include +#elif defined(CONFIG_ARCH_MERCURY) +#include +#else +#error Unknown EP7212 hardware architecture! +#endif + +/* + * Our memory model (generalized): + * + * Physical Size Type Virtual + * (_START) (_SIZE) (_BASE) + * 00000000-7fffffff 2GB don't care n/a + * 40000000-4ffffff 256MB CompactFlash (Psion) f0000000 + * 70000000-7fffffff 256MB PCMCIA (Geofox) f0000000 + * 80000000-8000ffff 64kB internal registers d0000000 + * 80010000-bfffffff 960kB not used n/a + * c0000000-ffffffff 1024MB RAM, non-contiguous c0000000 (1) + * + */ + +/* + * Start conventions for the kernel: + * + * R0 = 0 head-armv.S sanity check + * R1 = 9 CL-PS7212 + */ + +/* + * Memory map when kernel is started: + * + * Physical location Offset in Size Description + * start end boot file + * -------- -------- ---------- ----- -------------------------------------- + * c0000000-c001ffff 128kB Video RAM (1) + * c0020000-c00207ff 2kB frag_p2v_lookup_table + * c0020800-c00209ff 0.5kB frag_v2p_lookup_table + * c0020a00-c0020fff 1.5kB currently unused (2) + * c0021000-c0022fff 8kB currently unused (3) + * c0023000-c00235ff 00000800 1.5kB parameters (asm/setup.h:param_struct) + * c0023600-c00237ff 00000e00 0.5kB list of available memory areas (4) + * c0023800-c0023fff 2kB currently unused + * c0024000-c0033fff 64kB page tables (5) + * c0034000-c0037fff 16kB swapper_pg_dir (5) + * c0038000-... 00002000 start of text segment, then initrd + * + * (1) 0-12bff for Psion (640x240), 0-18fff for Geofox (640x320). Unused pages + * can be given to VM. + * (2) Architectures without KMEM_IS_VIRTUAL can use page c002 for VM. + * (3) Can be used for VM. + * (4) Either contained in boot file or provided by relocator. + * (5) Initialized by head-armv.S + * + * Note: Boot file locations 0x0000-0x07ff contain the relocator, locations + * 0x1000-0x1fff contain a scratch page which is only used during + * relocation. The physical location of either depends on where EPOC32 + * loads them. + */ + +/* + * IO address mapping + */ + +#define IO_BASE 0xd0000000 /* virtual */ +#define IO_START 0x80000000 /* physical */ +#define IO_SIZE 0x00100000 /* actually it's only 0x1000, + but this way we can use a + section to map it and don't + waste an entire page table*/ + +/* + * PCMCIA address mapping + * + * PCMCIA_START depends on the machine architecture. + */ + +#define PCMCIA_BASE 0xf0000000 /* virtual */ +#define PCMCIA_SIZE 0x10000000 /* 4 areas of 64MB each */ + +/* + * RAM definitions + */ + +#define RAM_START 0xc0000000 /* physical */ + +/* + * KERNTOPHYS does *not* translate from kernel addresses to physical addresses. + * Instead, it translates from addresses of kernel objects (code, data, etc.) + * to addresses of memory, both in kernel address space. In our case, this is a + * no-op. + * + * This KERNTOPHYS is only used in arch/arm/mm/init.c + */ + +#define KERNTOPHYS(x) ((unsigned long) &(x)) + +#define KERNEL_BASE 0xc0028000 +/*#define PARAMS_BASE 0xc0000400*/ +/*#define Z_PARAMS_BASE @@@*/ +#define FLUSH_BASE_PHYS 0 /* ROM @@@ ?*/ +#define FLUSH_BASE 0xdf000000 /* ROM @@@ ?*/ + + +/* + * LCD display definitions. + * + * LCD_X_SIZE and LCD_Y_SIZE depend on the machine architecture. + */ + +#define LCD_BASE 0xc0000000 +#define LCD_MEM_SIZE (LCD_X_SIZE*LCD_Y_SIZE/2) + +/* + * Register definitions + */ + +#include + +/* + * Allow access to IO registers as if they were normal variables + */ + +#define __IOB(x) (*(volatile unsigned char *) (IO_BASE+(x))) +#define __IOL(x) (*(volatile unsigned long *) (IO_BASE+(x))) + +#define IO_PADR __IOB(PADR) +#define IO_PBDR __IOB(PBDR) +#define IO_PCDR __IOB(PCDR) +#define IO_PDDR __IOB(PDDR) +#define IO_PADDR __IOB(PADDR) +#define IO_PBDDR __IOB(PBDDR) +#define IO_PCDDR __IOB(PCDDR) +#define IO_PDDDR __IOB(PDDDR) +#define IO_PEDR __IOB(PEDR) +#define IO_PEDDR __IOB(PEDDR) +#define IO_SYSCON __IOL(SYSCON) +#define IO_SYSFLG __IOL(SYSFLG) +#define IO_MEMCFG1 __IOL(MEMCFG1) +#define IO_MEMCFG2 __IOL(MEMCFG2) +/* DRFPR */ +#define IO_INTSR __IOL(INTSR) +#define IO_INTMR __IOL(INTMR) +#define IO_INTMR2 __IOL(INTMR2) +#define IO_INTMR3 __IOL(INTMR3) +#define IO_LCDCON __IOL(LCDCON) +#define IO_TC1D __IOL(TC1D) +#define IO_TC2D __IOL(TC2D) +#define IO_RTCDR __IOL(RTCDR) +#define IO_RTCMR __IOL(RTCMR) +/* PMPCON */ +#define IO_CODR __IOB(CODR) +#define IO_UARTDR __IOL(UARTDR) +#define IO_UBRLCR __IOL(UBRLCR) +#define IO_SYNCIO __IOL(SYNCIO) +#define IO_PALLSW __IOL(PALLSW) +#define IO_PALMSW __IOL(PALMSW) +#define IO_STFCLR __IOL(STFCLR) +#define IO_BLEOI __IOL(BLEOI) +#define IO_MCEOI __IOL(MCEOI) +#define IO_TEOI __IOL(TEOI) +#define IO_TC1EOI __IOL(TC1EOI) +#define IO_TC2EOI __IOL(TC2EOI) +#define IO_RTCEOI __IOL(RTCEOI) +#define IO_UMSEOI __IOL(UMSEOI) +#define IO_COEOI __IOL(COEOI) +#define IO_HALT __IOL(HALT) +#define IO_STDBY __IOL(STDBY) + +#define IO_DAICONTROL __IOL(DAICONTROL) +#define IO_DAIDATA0 __IOL(DAIDATA0) +#define IO_DAIDATA1 __IOL(DAIDATA1) +#define IO_DAIDATA2 __IOL(DAIDATA2) +#define IO_DAISTATUS __IOL(DAISTATUS) +#define IO_SYSCON3 __IOL(SYSCON3) +#define IO_INTMASK3 __IOL(INTMASK3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/hw_eb7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/hw_eb7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch/hw_eb7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/hw_eb7212.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * linux/include/asm-arm/arch-clps7212/hw_eb7212.h + * + * (c)2000 empeg ltd + * Based on arch-ep7110/hw_psion.h by Werner Almesberger 1998,1999 + * + * Hardware definitions for the Cirrus EP7212 evaluation board + */ + +#ifndef __ASM_ARCH_HW_EB7212_H +#define __ASM_ARCH_HW_EB7212_H + +/* + * We pretend we have a "PCMCIA" area. In actual fact, this is where the memory + * mapped IO sits (ethernet, parallel, etc) + */ + +#define PCMCIA_START 0x50000000 + +/* + * LCD display size + */ + +#define LCD_X_SIZE 640 +#define LCD_Y_SIZE 240 + +/* + * Register/port usage + */ + +/* + * Port B + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * |VPCEN|OPEN |VLDD3|VLDD2|VLDD1|VLDD0|EECLK|EECS | + * | out |in/ou|in/ou|in/ou|in/ou|in/ou| out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_VLD_PORT IO_PBDR /* Contrast control */ +#define HW_VLD_DIR IO_PBDDR +#define HW_VLD_MASK 0x3c +#define HW_VLD_SHIFT 2 +#define HW_OPEN_PORT IO_PBDR /* Indicates that the case is open */ +#define HW_OPEN_DIR IO_PBDDR +#define HW_OPEN_BIT 0x40 +#define HW_VPCEN_PORT IO_PBDR /* Enables the power to the CF Card */ +#define HW_VPCEN_BIT 0x80 + +/* + * Port C + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * |ADICT|BBLD |IREN |ELEN |RSEN |PLED | DTR | RTS | + * | out | out | out | out | out | out | out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_RTS_PORT IO_PCDR /* RS-232 RTS */ +#define HW_RTS_BIT 0x01 +#define HW_DTR_PORT IO_PCDR /* RS-232 DTR */ +#define HW_DTR_BIT 0x02 +#define HW_PLED_PORT IO_PCDR /* Disable power LED */ +#define HW_PLED_BIT 0x04 +#define HW_RSEN_PORT IO_PCDR /* Enable RS-232 driver */ +#define HW_RSEN_BIT 0x08 +#define HW_ELEN_PORT IO_PCDR /* Enable backlight */ +#define HW_ELEN_BIT 0x10 +#define HW_IREN_PORT IO_PCDR /* Enable IR receiver */ +#define HW_IREN_BIT 0x20 +#define HW_BBLD_PORT IO_PCDR /* Apply load to backup battery */ +#define HW_BBLD_BIT 0x40 +#define HW_ADICT_PORT IO_PCDR /* Set audio circuit to "dictaphone" */ +#define HW_ADICT_BIT 0x80 + +/* + * Port D + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * | X2 | VLL |TRIX2|SLED |DORSW| DON |AMPEN|CDEN | + * |in/ou| out | n/a | out | out | out | out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_CDEN_PORT IO_PDDR /* CODEC enable */ +#define HW_CDEN_BIT 0x01 +#define HW_AMPEN_PORT IO_PDDR /* Audio Amplifier Enable */ +#define HW_AMPEN_BIT 0x02 +#define HW_DON_PORT IO_PDDR /* Display On */ +#define HW_DON_BIT 0x04 +#define HW_SLED_PORT IO_PDDR /* Turns Status LED ON */ +#define HW_SLED_BIT 0x10 +#define HW_VLL_PORT IO_PDDR /* LCD Logic Rail */ +#define HW_VLL_BIT 0x40 +#define HW_X2_PORT IO_PDDR /* Pen Down Detect Line */ +#define HW_X2_DIR IO_PDDDR +#define HW_X2_BIT 0x80 + +/* + * Port E + * + * +--3--+--2--+--1--+--0--+ + * |Y1EN |X1EN |Y2EN |X2EN | + * | out | out | out | out | + * +-----+-----+-----+-----+ + */ + +#define HW_X2EN_PORT IO_PEDR /* Digitiser X2 Drive */ +#define HW_X2EN_BIT 0x01 +#define HW_Y2EN_PORT IO_PEDR /* Digitiser Y2 Drive */ +#define HW_Y2EN_BIT 0x02 +#define HW_X1EN_PORT IO_PEDR /* Digitiser X1 Drive */ +#define HW_X1EN_BIT 0x04 +#define HW_Y1EN_PORT IO_PEDR /* Digitiser Y1 Drive */ +#define HW_Y1EN_BIT 0x08 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/hw_mercury.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/hw_mercury.h --- linux-2.2.14-rmk-mercury/include/asm/arch/hw_mercury.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/hw_mercury.h 2000-05-07 17:16:34.000000000 +0100 @@ -0,0 +1,136 @@ +/* + * linux/include/asm-arm/arch-clps7212/hw_mercury.h + * + * (c)2000 empeg ltd + * Based on arch-ep7110/hw_psion.h by Werner Almesberger 1998,1999 + * + * Hardware definitions for the Diamond Mercury + */ + +#ifndef __ASM_ARCH_HW_EB7212_H +#define __ASM_ARCH_HW_EB7212_H + +/* Mappings of hardware */ + +/* Crystal 8900A ethernet controller */ +#define ETH_START 0x20000000 +#define ETH_BASE 0xf0000000 +#define ETH_SIZE (1024*1024) + +/* Broadcom CBM4210 pna2.0 controller */ +#define PNA_START 0x30000000 +#define PNA_BASE 0xf0100000 +#define PNA_SIZE (1024*1024) + +/* Flash/PROM */ +#define FLASH_START 0x00000000 +#define FLASH_BASE 0xf0200000 +#define FLASH_SIZE (1024*1024) + +/* + * LCD display size + */ + +#define LCD_X_SIZE 640 +#define LCD_Y_SIZE 240 + +/* + * Register/port usage + */ + +/* + * Port A + * bits 0-3 - keyboard scanline inputs + * bits 4-5 - rotary control inputs (EOR of these taken to DSR line too) + * bit 6 - unused + * bit 7 - fault input from amp board + */ + +/* + * Port B + * bit 0 - PCM1716 latch + * bit 1 - PCM1716 clock + * bit 2 - PCM1716 data + * bit 3 - mute control + * bit 4 - LM1972 data + * bit 5 - LM1972 load + * bit 6 - LM1972 clock + * bit 7 - unused + */ + +#define PORTB_1716LATCH (1<<0) +#define PORTB_1716CLOCK (1<<1) +#define PORTB_1716DATA (1<<2) +#define PORTB_MUTE (1<<3) +#define PORTB_1972DATA (1<<4) +#define PORTB_1972LOAD (1<<5) +#define PORTB_1972CLOCK (1<<6) + +/* + * Port D + * bits 0-7 are LCD databus + */ + +/* + * Port E + * bit 0 - LCD data latch ('E' on LCD 6800 bus) + * bit 1 - LCD address (A0 on LCD 6800 bus) + * bit 2 - LCD backlight PSU enable + */ + +/* Mercury specific declarations */ + +/* + * Input + */ +#define MERCURY_INPUT_MAJOR (242) +#define MERCURY_IRQ_INPUT 14 /* Modem status interrupt */ +#define MERCURY_IRQ_ROTARYTIMER 8 /* Timer interrupt */ +#define EMPEG_IR_MAGIC 'i' + +/* Set/get the remote control type */ +#define EMPEG_IR_WRITE_TYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define EMPEG_IR_READ_TYPE _IOR(EMPEG_IR_MAGIC, 2, int) + +/* Set/get the delay before repeats are honoured (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define EMPEG_IR_READ_RPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) + +/* Set/get the interval between repeats (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define EMPEG_IR_READ_RPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) + +/* Set/get the timeout for a repeat occuring. If a repeat code happens + * after this amount of time without one then it will be ignored. */ +#define EMPEG_IR_WRITE_RPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define EMPEG_IR_READ_RPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +#define IR_TYPE_COUNT 1 + +#define IR_TYPE_CAPTURE 0 +#define IR_TYPE_KENWOOD 1 + +/* + * Display + */ +#define EMPEG_DISPLAY_MAJOR (244) + +/* Empeg Display ioctl values */ +#define EMPEG_DISPLAY_MAGIC 'd' + +#define EMPEG_DISPLAY_REFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define EMPEG_DISPLAY_POWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define EMPEG_DISPLAY_ENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define EMPEG_DISPLAY_POPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define EMPEG_DISPLAY_FLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) +#define EMPEG_DISPLAY_QUERYQUEUEFREE _IOR(EMPEG_DISPLAY_MAGIC, 9, int) + +#ifndef __ASSEMBLY__ +#ifdef __KERNEL__ +extern void audio_emitted_action(void); +#endif +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/ide.h --- linux-2.2.14-rmk-mercury/include/asm/arch/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/ide.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/io.h --- linux-2.2.14-rmk-mercury/include/asm/arch/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/io.h 2000-03-22 12:29:59.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * linux/include/asm-arm/arch-clps7110/io.h + * + * Written 1998,1999 by Werner Almesberger + * Strongly inspired by the other asm-atm/arch-*?/io.h files + */ + +#ifndef __ASM_ARCH_IO_H +#define __ASM_ARCH_IO_H + +/* No delayed IO required */ + +#undef ARCH_IO_DELAY + +/* + * Use outb/outl/inb/etc. for PC-style hardware. In our case, that's + * everything in the CF/PCMCIA slot. + */ + +#if 1 +#define __inb(p) (*(volatile uint8_t *) PCMCIA_IO8(p)) +#define __outb(v,p) (*(volatile uint8_t *) PCMCIA_IO8(p) = (v)) +#define __inw(p) (*(volatile uint16_t *) PCMCIA_IO16(p)) +#define __outw(v,p) (*(volatile uint16_t *) PCMCIA_IO16(p) = (v)) +#else +#define __inb(p) ({ uint8_t v; \ + v = *(volatile uint8_t *) PCMCIA_IO8(p); \ + printk("inb(0x%x) = 0x%02x\n",p,v); v;}) +#define __outb(v,p) ({ uint8_t _v = (v); \ + printk("outb(0x%x) := 0x%02x\n",p,_v); \ + *(volatile uint8_t *) PCMCIA_IO8(p) = _v;}) +#define __inw(p) ({ uint16_t v; \ + v = *(volatile uint32_t *) PCMCIA_IO16(p) & 0xffff; \ + if (p != 0x1f0) \ + /*printk("inw(0x%x) = 0x%04x\n",p,v)*/; v;}) +#define __outw(v,p) ({ uint16_t _v = (v); \ + printk("outw(0x%x) := 0x%04x\n",p,_v); \ + *(volatile uint32_t *) PCMCIA_IO16(p) = _v;}) +#endif +#define __inl(p) ({ panic("__inl"); }) +#define __outl(v,p) panic("__outl") + +#if 0 +#define DECLARE_DYN_OUT(fnsuffix,instr) \ + extern __inline__ void __out##fnsuffix(unsigned int value,unsigned int port) \ + { \ + __asm__ __volatile__( \ + "str" ##instr## " %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); \ + } + + +#define DECLARE_DYN_IN(sz,fnsuffix,instr) \ + extern __inline__ unsigned sz __in##fnsuffix(unsigned int port) \ + { \ + unsigned long value; \ + __asm__ __volatile__( \ + "ldr" ##instr## " %0,[%1,%2]" \ + : "=&r" (value) : "r" (IO_BASE), "Jr" (port)); \ + return (unsigned sz) value; \ + } + + +extern __inline__ unsigned int __ioaddr(unsigned int port) +{ + return (unsigned int) (IO_BASE + port); +} + + +#define DECLARE_IO(sz,fnsuffix,instr) \ + DECLARE_DYN_OUT(fnsuffix,instr) \ + DECLARE_DYN_IN(sz,fnsuffix,instr) + +DECLARE_IO(char,b,"b") +/* The ARM710 doesn't support strh/ldrh */ +DECLARE_IO(long,l,"") + +#undef DECLARE_IO +#undef DECLARE_DYN_OUT +#undef DECLARE_DYN_IN + +/* Constant-address functions */ + +#define __outbc(value,port) \ + ({ __asm__ __volatile__( \ + "strb %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); }) + +#define __inbc(port) \ + ({ unsigned char result; \ + __asm__ __volatile__( \ + "ldrb %0,[%1,%2]" \ + : "=r" (result) : "r" (IO_BASE), "Jr" (port)); \ + result; }) + +#define __outlc(value,port) \ + ({ __asm__ __volatile__( \ + "str %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); }) + +#define __inlc(port) \ + ({ unsigned long result; \ + __asm__ __volatile__( \ + "ldr %0,[%1,%2]" \ + : "=r" (result) : "r" (IO_BASE), "Jr" (port)); \ + result; }) + +#define __ioaddrc(port) ((unsigned long) (IO_BASE+port) + +/* Translated IO: address is already virtual address */ + +#define outb_t(v,p) (*(volatile unsigned char *) (p) = (v)) +#define inb_t(v,p) (*(volatile unsigned char *) (p)) +#define outl_t(v,p) (*(volatile unsigned long *) (p) = (v)) +#define inl_t(v,p) (*(volatile unsigned long *)) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/irq.h --- linux-2.2.14-rmk-mercury/include/asm/arch/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/irq.h 2007-07-10 12:31:24.000000000 +0100 @@ -0,0 +1,53 @@ +/* + * include/asm-arm/arch-clps7212/irq.h + * + * Written 1998,1999 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_IRQ_H +#define _ASM_ARCH_IRQ_H + +#include +#include +#include + + +#define fixup_irq(x) (x) + +static void clps7212_mask_irq(unsigned int irq) +{ +#ifdef DEBUG_IRQ + printk ("masking IRQ:%d\n",irq); +#endif + IO_INTMR &= ~(1 << irq); +} + + +static void clps7212_unmask_irq(unsigned int irq) +{ +#ifdef DEBUG_IRQ + printk("unmasking IRQ:%d\n" ,irq); +#endif + IO_INTMR |= 1 << irq; +} + +static __inline__ void irq_init_irq(void) +{ + int i; + +#ifdef DEBUG_IRQ + printk("Disabling all ints..\n"); +#endif + IO_INTMR = 0; /* disable all interrupts */ + IO_INTMR2 = 0; + IO_INTMR3 = 0; + for (i = 0; i < NR_IRQS; i++) { + irq_desc[i].valid = 1; + irq_desc[i].probe_ok = 1; + irq_desc[i].mask_ack = clps7212_mask_irq; + irq_desc[i].mask = clps7212_mask_irq; + irq_desc[i].unmask = clps7212_unmask_irq; + } +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/irqs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/irqs.h --- linux-2.2.14-rmk-mercury/include/asm/arch/irqs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/irqs.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * linux/include/asm-arm/arch-clps7212/irqs.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_IRQS_H +#define _ASM_ARCH_IRQS_H + +/* + * For descriptions, see hardware.h + */ + +#define NR_IRQS 16 + +#define IRQ_EXTFIQ 0 +#define IRQ_BLINT 1 +#define IRQ_WEINT 2 +#define IRQ_MCINT 3 +#define IRQ_CSINT 4 +#define IRQ_EINT1 5 +#define IRQ_EINT2 6 +#define IRQ_EINT3 7 +#define IRQ_TC1OI 8 +#define IRQ_TC2OI 9 +#define IRQ_RTCMI 10 +#define IRQ_TINT 11 +#define IRQ_UTXINT 12 +#define IRQ_URXINT 13 +#define IRQ_UMSINT 14 +#define IRQ_SSEOTI 15 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/memory.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/memory.h --- linux-2.2.14-rmk-mercury/include/asm/arch/memory.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/memory.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * linux/include/asm-arm/arch-clps7212/mmu.h + * + * Written 1998,1999 by Werner Almesberger + * + * General memory mapping definitions plus special functions to help managing + * physically fragmented memory. + */ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + + +/* + * Task size: 3GB + */ +#define TASK_SIZE (0xc0000000UL) + +/* + * Page offset: 3GB + */ +#define PAGE_OFFSET (0xc0000000UL) + + +#include + +#define FRAG_LIST_START 0xc0000400 /* @@@ fix this later */ +#define frag_list ((struct frag_list_entry *) FRAG_LIST_START) + + +#ifndef __ASSEMBLY__ + +struct frag_list_entry { + unsigned long start; /* physical start address */ + unsigned long size; /* size (in bytes) */ +}; + +#endif + +#ifndef __ASSEMBLY__ + +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) __phys_to_virt(x) + +#ifndef KMEM_IS_VIRTUAL + +#define __virt_to_phys__is_a_macro +#define __virt_to_phys(vpage) vpage +#define __phys_to_virt__is_a_macro +#define __phys_to_virt(ppage) ppage + +#else /* KMEM_IS_VIRTUAL */ + +extern unsigned long __virt_to_phys(unsigned long vpage); +extern unsigned long __phys_to_virt(unsigned long ppage); + +#endif /* KMEM_IS_VIRTUAL */ + +#endif /* __ASSEMBLY__ */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/mmu_clps7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/mmu_clps7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch/mmu_clps7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/mmu_clps7212.h 2000-03-14 18:16:59.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * linux/include/asm-arm/arch-clps7212/mmu_clps7212.h + * + * Written 1998,1999 by Werner Almesberger + */ + +/* Included by mmu.h */ + + +#ifndef __ASM_ARCH_MMU_CLPS7212_H +#define __ASM_ARCH_MMU_CLPS7212_H + +#define VCONT_TABLE_START 0x00010000 /* offset of page tables + (from RAM base) */ +#define VCONT_TABLES 64 /* map up to 64 MB */ + + +#ifndef __ASSEMBLY__ + +void setup_frag_p2v_lookup_table(void); +void setup_frag_v2p_lookup_table(void); + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/param.h --- linux-2.2.14-rmk-mercury/include/asm/arch/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/param.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,17 @@ +/* + * linux/include/asm-arm/arch-clps7110/param.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_PARAM_H +#define _ASM_ARCH_PARAM_H + +/* + * Considering asm-arm/arch-*?/param.h, we don't seem to have much of a + * choice ;-) + */ + +#define HZ 100 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/pm.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/pm.h --- linux-2.2.14-rmk-mercury/include/asm/arch/pm.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/pm.h 2000-07-05 18:43:34.000000000 +0100 @@ -0,0 +1,3 @@ +/* This file intentionally left blank. */ + +/* But not too blank otherwise make distclean deletes it. */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/processor.h --- linux-2.2.14-rmk-mercury/include/asm/arch/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/processor.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/arch/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/shmparam.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +/* ? */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/system.h --- linux-2.2.14-rmk-mercury/include/asm/arch/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/system.h 2000-06-14 20:23:37.000000000 +0100 @@ -0,0 +1,50 @@ +/* + * linux/include/asm-arm/arch-clps7212/system.h + * + */ + +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +extern __inline__ void arch_reset(char mode) +{ + __asm__("mrs r0,cpsr\n" + "orr r0,r0,#192\n" + "msr cpsr,r0\n" /* Disable IRQs & FIQs */ + "mov r0,#0\n" + "mcr p15,0,r0,c7,c7\n" /* Flush cache */ + "mov r0,#0x30\n" + "mcr p15,0,r0,c1,c0\n" + "mov r0,r0\n" /* nop */ + "mov pc,#0\n"); /* bang */ + /* + * If we're still alive, just loop. + */ + while (1); +} + +extern __inline__ void arch_power_off(void) +{ + /* Put the CPU into standby mode */ + IO_STDBY=1; +} + +#if 0 +#define ARCH_IDLE_OK + +#define arch_start_idle() /* power-saving ? @@@ */ +#define arch_end_idle() /* power-saving ? @@@ */ +#endif + +#undef proc_idle /* ours is better than proc/system.h's */ +extern __inline__ void proc_idle(void) +{ + /* Put the CPU into idle mode */ + IO_HALT=1; + + /* 2 nops afterwards to help CPU restart quickly */ + __asm__("mov r0,r0\n" + "mov r0,r0\n"); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/time.h --- linux-2.2.14-rmk-mercury/include/asm/arch/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/time.h 2007-07-10 12:31:29.000000000 +0100 @@ -0,0 +1,74 @@ +/* + * linux/include/asm-arm/arch-clps7212/time.h + * + * Written 1998,1999 by Werner Almesberger + * + */ + +#ifndef _ASM_ARCH_TIME_H +#define _ASM_ARCH_TIME_H + +#include + + +extern __inline__ unsigned long gettimeoffset(void) +{ + int offsetinticks; + + /* We are called with IRQs disabled: get current timer offset */ + offsetinticks=(LATCH-(IO_TC2D&0xffff)); + + /* Has a timer irq (counter rollover) happened since disabling IRQs? */ + if (IO_INTSR&TC2OI) offsetinticks+=LATCH; + + return (offsetinticks*tick)/LATCH; +} + + +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned long flags; + + /* We do this whole routine with IRQs disabled. If we're interrupted, + and the interrupt does a gettimeoffset, the clearing of the TC2 + interrupt and the incrementing of the lostticks count have to be + atomic! */ + save_flags_cli(flags); + do_timer(regs); + IO_TC2EOI = 0; /* reset timer interrupt */ + restore_flags(flags); +} + + +/* + * Writing back the time to RTC isn't supported yet. + */ + + +#define update_rtc() + + +/* + * Set up timer interrupt, and return the current time in seconds. + */ + +static struct irqaction timerirq = { + timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + + +extern __inline__ void setup_timer(void) +{ + /* Timer 2: 512 kHz, Pre-scale mode */ + IO_SYSCON |= TC2M | TC2S; + IO_TC2D = LATCH; + IO_TC2EOI = 0; + setup_arm_irq(IRQ_TC2OI, &timerirq); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/timex.h --- linux-2.2.14-rmk-mercury/include/asm/arch/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/timex.h 2000-03-23 12:03:42.000000000 +0000 @@ -0,0 +1,12 @@ +/* + * linux/include/asm-arm/arch-clps7212/timex.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_TIMEX_H +#define _ASM_ARCH_TIMEX_H + +#define CLOCK_TICK_RATE 512000 /* 512 KHz */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/arch/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch/uncompress.h 2000-03-28 19:23:33.000000000 +0100 @@ -0,0 +1,34 @@ +/* + * linux/include/asm-arm/arch-clps7110/uncompress.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef __ASM_ARCH_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +static volatile unsigned char *uart=(volatile unsigned char*)0xd0000480; +static volatile unsigned int *sysflg=(volatile unsigned int*)0xd0000140; + +static void puts(const char *s) +{ + + do { + /* Write char at time */ + while((*sysflg)&(1<<23)); + if ((*uart=*s)==10) { + while((*sysflg)&(1<<23)); + *uart=13; + } + } while(*++s); + while((*sysflg)&(1<<11)); +} + +/* + * No (de)compression yet + */ + +#define arch_decomp_setup() +#define arch_decomp_wdog() + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/a.out.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,14 @@ +/* + * linux/include/asm-arm/arch-arc/a.out.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_ARCH_A_OUT_H +#define __ASM_ARCH_A_OUT_H + +#include + +#define STACK_TOP TASK_SIZE + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/dma.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/dma.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * linux/include/asm-arm/arch-arc/dma.h + * + * Copyright (C) 1996-1998 Russell King + * + * Acorn Archimedes/A5000 architecture virtual DMA + * implementation + * + * Modifications: + * 04-04-1998 RMK Merged arc and a5k versions + */ +#ifndef __ASM_ARCH_DMA_H +#define __ASM_ARCH_DMA_H + +#include + +#define MAX_DMA_ADDRESS 0x03000000 + +#ifdef CONFIG_ARCH_ARC +#define MAX_DMA_CHANNELS 3 + +#define DMA_VIRTUAL_FLOPPY0 0 +#define DMA_VIRTUAL_FLOPPY1 1 +#define DMA_VIRTUAL_SOUND 2 +#endif + +#ifdef CONFIG_ARCH_A5K +#define MAX_DMA_CHANNELS 2 + +#define DMA_VIRTUAL_FLOPPY 0 +#define DMA_VIRTUAL_SOUND 1 +#define DMA_FLOPPY DMA_VIRTUAL_FLOPPY +#endif + +#endif /* _ASM_ARCH_DMA_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/hardware.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,105 @@ +/* + * linux/include/asm-arm/arch-arc/hardware.h + * + * Copyright (C) 1996-1999 Russell King. + * + * This file contains the hardware definitions of the + * Acorn Archimedes/A5000 machines. + * + * Modifications: + * 04-04-1998 PJB/RMK Merged arc and a5k versions + */ +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include + +#include + +/* + * What hardware must be present - these can be tested by the kernel + * source. + */ +#define HAS_IOC +#define HAS_MEMC +#include +#define HAS_VIDC + +/* + * Optional hardware + */ +#define HAS_EXPMASK + +/* Hardware addresses of major areas. + * *_START is the physical address + * *_SIZE is the size of the region + * *_BASE is the virtual address + */ +#define IO_START 0x03000000 +#define IO_SIZE 0x01000000 +#define IO_BASE 0x03000000 + +/* + * Screen mapping information + */ +#define SCREEN_START 0x02000000 +#define SCREEN2_END 0x02078000 +#define SCREEN2_BASE 0x02000000 +#define SCREEN1_END 0x02000000 +#define SCREEN1_BASE 0x01f88000 + + +#ifndef __ASSEMBLER__ + +/* + * for use with inb/outb + */ +#define IO_VIDC_BASE 0x80100000 +#ifdef CONFIG_ARCH_A5K +#define IOEB_VID_CTL 0x800d4012 +#define IOEB_PRESENT 0x800d4014 +#define IOEB_PSCLR 0x800d4016 +#define IOEB_MONTYPE 0x800d401c +#endif +#ifdef CONFIG_ARCH_ARC +#define LATCHAADDR 0x80094010 +#define LATCHBADDR 0x80094006 +#endif +#define IOC_BASE 0x80080000 + +#define IO_EC_IOC4_BASE 0x8009c000 +#define IO_EC_IOC_BASE 0x80090000 +#define IO_EC_MEMC_BASE 0x80000000 + +#ifdef CONFIG_ARCH_ARC +/* A680 hardware */ +#define WD1973_BASE 0x03290000 +#define WD1973_LATCH 0x03350000 +#define Z8530_BASE 0x032b0008 +#define SCSI_BASE 0x03100000 +#endif + +/* + * IO definitions + */ +#define EXPMASK_BASE ((volatile unsigned char *)0x03360000) +#define IOEB_BASE ((volatile unsigned char *)0x03350050) +#define PCIO_FLOPPYDMABASE ((volatile unsigned char *)0x0302a000) +#define PCIO_BASE 0x03010000 + +/* + * RAM definitions + */ +#define GET_MEMORY_END(p) (PAGE_OFFSET + (p->u1.s.page_size) * (p->u1.s.nr_pages)) +#define PARAMS_BASE (PAGE_OFFSET + 0x7c000) + +#else + +#define IOEB_BASE 0x03350050 +#define IOC_BASE 0x03200000 +#define PCIO_FLOPPYDMABASE 0x0302a000 +#define PCIO_BASE 0x03010000 + +#endif +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/ide.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/ide.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * linux/include/asm-arm/arch-arc/ide.h + * + * Copyright (c) 1997,1998 Russell King + * + * IDE definitions for the Acorn Archimedes/A5000 + * architecture + * + * Modifications: + * 04-04-1998 PJB Merged `arc' and `a5k' versions + * 01-07-1998 RMK Added new ide_ioregspec_t + * 29-07-1998 RMK Major re-work of IDE architecture specific code + */ + +#include +#include + +/* + * Set up a hw structure for a specified data port, control port and IRQ. + * This should follow whatever the default interface uses. + */ +static __inline__ void +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +{ + ide_ioreg_t reg = (ide_ioreg_t) data_port; + int i; + + memset(hw, 0, sizeof(*hw)); + + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { + hw->io_ports[i] = reg; + reg += 1; + } + hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; + hw->irq = irq; +} + +/* + * This registers the standard ports for this architecture with the IDE + * driver. + */ +static __inline__ void +ide_init_default_hwifs(void) +{ +#ifdef CONFIG_ARCH_A5K + hw_regs_t hw; + + ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_HARDDISK); + ide_register_hw(&hw, NULL); +#endif +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/io.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/io.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,216 @@ +/* + * linux/include/asm-arm/arch-arc/io.h + * + * Copyright (C) 1997 Russell King + * + * Modifications: + * 06-Dec-1997 RMK Created. + */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +/* + * This architecture does not require any delayed IO, and + * has the constant-optimised IO + */ +#undef ARCH_IO_DELAY + +/* + * We use two different types of addressing - PC style addresses, and ARM + * addresses. PC style accesses the PC hardware with the normal PC IO + * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ + * and are translated to the start of IO. Note that all addresses are + * shifted left! + */ +#define __PORT_PCIO(x) (!((x) & 0x80000000)) + +/* + * Dynamic IO functions - let the compiler + * optimize the expressions + */ +extern __inline__ void __outb (unsigned int value, unsigned int port) +{ + unsigned long temp; + __asm__ __volatile__( + "tst %2, #0x80000000\n\t" + "mov %0, %4\n\t" + "addeq %0, %0, %3\n\t" + "strb %1, [%0, %2, lsl #2] @ outb" + : "=&r" (temp) + : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) + : "cc"); +} + +extern __inline__ void __outw (unsigned int value, unsigned int port) +{ + unsigned long temp; + __asm__ __volatile__( + "tst %2, #0x80000000\n\t" + "mov %0, %4\n\t" + "addeq %0, %0, %3\n\t" + "str %1, [%0, %2, lsl #2] @ outw" + : "=&r" (temp) + : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) + : "cc"); +} + +extern __inline__ void __outl (unsigned int value, unsigned int port) +{ + unsigned long temp; + __asm__ __volatile__( + "tst %2, #0x80000000\n\t" + "mov %0, %4\n\t" + "addeq %0, %0, %3\n\t" + "str %1, [%0, %2, lsl #2] @ outl" + : "=&r" (temp) + : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) + : "cc"); +} + +#define DECLARE_DYN_IN(sz,fnsuffix,instr) \ +extern __inline__ unsigned sz __in##fnsuffix (unsigned int port) \ +{ \ + unsigned long temp, value; \ + __asm__ __volatile__( \ + "tst %2, #0x80000000\n\t" \ + "mov %0, %4\n\t" \ + "addeq %0, %0, %3\n\t" \ + "ldr" ##instr## " %1, [%0, %2, lsl #2] @ in"###fnsuffix \ + : "=&r" (temp), "=r" (value) \ + : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ + : "cc"); \ + return (unsigned sz)value; \ +} + +extern __inline__ unsigned int __ioaddr (unsigned int port) \ +{ \ + if (__PORT_PCIO(port)) \ + return (unsigned int)(PCIO_BASE + (port << 2)); \ + else \ + return (unsigned int)(IO_BASE + (port << 2)); \ +} + +#define DECLARE_IO(sz,fnsuffix,instr) \ + DECLARE_DYN_IN(sz,fnsuffix,instr) + +DECLARE_IO(char,b,"b") +DECLARE_IO(short,w,"") +DECLARE_IO(long,l,"") + +#undef DECLARE_IO +#undef DECLARE_DYN_IN + +/* + * Constant address IO functions + * + * These have to be macros for the 'J' constraint to work - + * +/-4096 immediate operand. + */ +#define __outbc(value,port) \ +({ \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "strb %0, [%1, %2] @ outbc" \ + : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "strb %0, [%1, %2] @ outbc" \ + : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \ +}) + +#define __inbc(port) \ +({ \ + unsigned char result; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "ldrb %0, [%1, %2] @ inbc" \ + : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "ldrb %0, [%1, %2] @ inbc" \ + : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ + result; \ +}) + +#define __outwc(value,port) \ +({ \ + unsigned long v = value; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outwc" \ + : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outwc" \ + : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ +}) + +#define __inwc(port) \ +({ \ + unsigned short result; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inwc" \ + : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inwc" \ + : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ + result & 0xffff; \ +}) + +#define __outlc(value,port) \ +({ \ + unsigned long v = value; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outlc" \ + : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outlc" \ + : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \ +}) + +#define __inlc(port) \ +({ \ + unsigned long result; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inlc" \ + : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inlc" \ + : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ + result; \ +}) + +#define __ioaddrc(port) \ +({ \ + unsigned long addr; \ + if (__PORT_PCIO((port))) \ + addr = PCIO_BASE + ((port) << 2); \ + else \ + addr = IO_BASE + ((port) << 2); \ + addr; \ +}) + +/* + * Translated address IO functions + * + * IO address has already been translated to a virtual address + */ +#define outb_t(v,p) \ + (*(volatile unsigned char *)(p) = (v)) + +#define inb_t(p) \ + (*(volatile unsigned char *)(p)) + +#define outl_t(v,p) \ + (*(volatile unsigned long *)(p) = (v)) + +#define inl_t(p) \ + (*(volatile unsigned long *)(p)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/irq.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/irq.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * include/asm-arm/arch-arc/irq.h + * + * Copyright (C) 1996 Russell King + * + * Changelog: + * 24-09-1996 RMK Created + * 10-10-1996 RMK Brought up to date with arch-sa110eval + * 22-10-1996 RMK Changed interrupt numbers & uses new inb/outb macros + * 11-01-1998 RMK Added mask_and_ack_irq + * 22-08-1998 RMK Restructured IRQ routines + */ +#include + +#define fixup_irq(x) (x) + +static void arc_mask_irq_ack_a(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]\n" +" strb %1, [%3]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA)), + "r" (ioaddr(IOC_IRQCLRA))); +} + +static void arc_mask_irq_a(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA))); +} + +static void arc_unmask_irq_a(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA))); +} + +static void arc_mask_irq_b(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB))); +} + +static void arc_unmask_irq_b(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB))); +} + +static void arc_mask_irq_fiq(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK))); +} + +static void arc_unmask_irq_fiq(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK))); +} + +static __inline__ void irq_init_irq(void) +{ + extern void ecard_disableirq(unsigned int irq); + extern void ecard_enableirq(unsigned int irq); + int irq; + + outb(0, IOC_IRQMASKA); + outb(0, IOC_IRQMASKB); + outb(0, IOC_FIQMASK); + + for (irq = 0; irq < NR_IRQS; irq++) { + switch (irq) { + case 0 ... 6: + irq_desc[irq].probe_ok = 1; + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = arc_mask_irq_ack_a; + irq_desc[irq].mask = arc_mask_irq_a; + irq_desc[irq].unmask = arc_unmask_irq_a; + break; + + case 7: + irq_desc[irq].noautoenable = 1; + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = arc_mask_irq_ack_a; + irq_desc[irq].mask = arc_mask_irq_a; + irq_desc[irq].unmask = arc_unmask_irq_a; + break; + + case 9 ... 15: + irq_desc[irq].probe_ok = 1; + case 8: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = arc_mask_irq_b; + irq_desc[irq].mask = arc_mask_irq_b; + irq_desc[irq].unmask = arc_unmask_irq_b; + break; + + case 32 ... 40: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = ecard_disableirq; + irq_desc[irq].mask = ecard_disableirq; + irq_desc[irq].unmask = ecard_enableirq; + break; + + case 64 ... 72: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = arc_mask_irq_fiq; + irq_desc[irq].mask = arc_mask_irq_fiq; + irq_desc[irq].unmask = arc_unmask_irq_fiq; + break; + } + } +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/irqs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/irqs.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/irqs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/irqs.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * linux/include/asm-arm/arch-arc/irqs.h + * + * Copyright (C) 1996 Russell King, Dave Gilbert + * + * Modifications: + * 04-04-1998 PJB Merged arc and a5k versions + */ + +#include + +#if defined(CONFIG_ARCH_A5K) +#define IRQ_PRINTER 0 +#define IRQ_BATLOW 1 +#define IRQ_FLOPPYINDEX 2 +#define IRQ_FLOPPYDISK 12 +#elif defined(CONFIG_ARCH_ARC) +#define IRQ_PRINTERBUSY 0 +#define IRQ_SERIALRING 1 +#define IRQ_PRINTERACK 2 +#define IRQ_FLOPPYCHANGED 12 +#endif + +#define IRQ_VSYNCPULSE 3 +#define IRQ_POWERON 4 +#define IRQ_TIMER0 5 +#define IRQ_TIMER1 6 +#define IRQ_IMMEDIATE 7 +#define IRQ_EXPCARDFIQ 8 +#define IRQ_SOUNDCHANGE 9 +#define IRQ_SERIALPORT 10 +#define IRQ_HARDDISK 11 +#define IRQ_EXPANSIONCARD 13 +#define IRQ_KEYBOARDTX 14 +#define IRQ_KEYBOARDRX 15 + +#if defined(CONFIG_ARCH_A5K) +#define FIQ_SERIALPORT 4 +#elif defined(CONFIG_ARCH_ARC) +#define FIQ_FLOPPYIRQ 1 +#define FIQ_FD1772 FIQ_FLOPPYIRQ +#endif + +#define FIQ_FLOPPYDATA 0 +#define FIQ_ECONET 2 +#define FIQ_EXPANSIONCARD 6 +#define FIQ_FORCE 7 + +#define IRQ_TIMER IRQ_TIMER0 + +#define irq_cannonicalize(i) (i) diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/keyboard.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/keyboard.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/keyboard.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/keyboard.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * linux/include/asm-arm/arch-arc/keyboard.h + * + * Keyboard driver definitions for Acorn Archimedes/A5000 + * architecture + * + * Copyright (C) 1998 Russell King + */ + +#include +#include +#include + +#define NR_SCANCODES 128 + +extern void a5kkbd_leds(unsigned char leds); +extern void a5kkbd_init_hw(void); +extern unsigned char a5kkbd_sysrq_xlate[NR_SCANCODES]; + +#define kbd_setkeycode(sc,kc) (-EINVAL) +#define kbd_getkeycode(sc) (-EINVAL) + +#define kbd_translate(sc, kcp, rm) ({ *(kcp) = (sc); 1; }) +#define kbd_unexpected_up(kc) (0200) +#define kbd_leds(leds) a5kkbd_leds(leds) +#define kbd_init_hw() a5kkbd_init_hw() +#define kbd_sysrq_xlate a5kkbd_sysrq_xlate +#define kbd_disable_irq() disable_irq(IRQ_KEYBOARDRX) +#define kbd_enable_irq() enable_irq(IRQ_KEYBOARDRX) + +#define SYSRQ_KEY 13 diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/memory.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/memory.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/memory.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/memory.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * linux/include/asm-arm/arch-arc/memory.h + * + * Copyright (c) 1996-1999 Russell King. + * + * Changelog: + * 22-Nov-1996 RMK Created + * 21-Mar-1999 RMK Renamed to memory.h + * RMK Moved PAGE_OFFSET and TASK_SIZE here + */ +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +/* + * User space: 26MB + */ +#define TASK_SIZE (0x01a00000UL) + +/* + * Page offset: 32MB + */ +#define PAGE_OFFSET (0x02000000UL) + +#define __virt_to_phys__is_a_macro +#define __virt_to_phys(vpage) vpage +#define __phys_to_virt__is_a_macro +#define __phys_to_virt(ppage) ppage + +/* + * Virtual view <-> DMA view memory address translations + * virt_to_bus: Used to translate the virtual address to an + * address suitable to be passed to set_dma_addr + * bus_to_virt: Used to convert an address for DMA operations + * to an address that the kernel can use. + */ +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) (x) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) (x) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/oldlatches.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/oldlatches.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/oldlatches.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/oldlatches.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * linux/include/asm-arm/arch-arc/oldlatches.h + * + * Copyright (C) 1996 Russell King, Dave Gilbert + * + * Dummy oldlatches.h + * + * Modifications: + * 04-04-1998 PJB/RMK Merged arc and a5k versions + */ +#ifndef _ASM_ARCH_OLDLATCH_H +#define _ASM_ARCH_OLDLATCH_H + +#include + +#if defined(CONFIG_ARCH_ARC) +#define LATCHA_FDSEL0 (1<<0) +#define LATCHA_FDSEL1 (1<<1) +#define LATCHA_FDSEL2 (1<<2) +#define LATCHA_FDSEL3 (1<<3) +#define LATCHA_FDSELALL (0xf) +#define LATCHA_SIDESEL (1<<4) +#define LATCHA_MOTOR (1<<5) +#define LATCHA_INUSE (1<<6) +#define LATCHA_CHANGERST (1<<7) + +#define LATCHB_FDCDENSITY (1<<1) +#define LATCHB_FDCRESET (1<<3) +#define LATCHB_PRINTSTROBE (1<<4) + +/* newval=(oldval & mask)|newdata */ +void oldlatch_bupdate(unsigned char mask,unsigned char newdata); + +/* newval=(oldval & mask)|newdata */ +void oldlatch_aupdate(unsigned char mask,unsigned char newdata); + +void oldlatch_init(void); + +#elif defined(CONFIG_ARCH_A5K) + +#ifdef __need_oldlatches +#error "Old latches not present in this (a5k) machine" +#endif + +#endif +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/processor.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/processor.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,29 @@ +/* + * linux/include/asm-arm/arch-arc/processor.h + * + * Copyright (c) 1996-1999 Russell King. + * + * Changelog: + * 10-Sep-1996 RMK Created + * 21-Mar-1999 RMK Added asm/arch/memory.h + */ + +#ifndef __ASM_ARCH_PROCESSOR_H +#define __ASM_ARCH_PROCESSOR_H + +#include + +/* + * Bus types + */ +#define EISA_bus 0 +#define EISA_bus__is_a_macro /* for versions in ksyms.c */ +#define MCA_bus 0 +#define MCA_bus__is_a_macro /* for versions in ksyms.c */ + +/* This decides where the kernel will search for a free chunk of vm + * space during mmap's. + */ +#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/serial.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/serial.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/serial.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/serial.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,64 @@ +/* + * linux/include/asm-arm/arch-arc/serial.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 15-10-1996 RMK Created + * 04-04-1998 PJB Merged `arc' and `a5k' architectures + */ +#ifndef __ASM_ARCH_SERIAL_H +#define __ASM_ARCH_SERIAL_H + +#include + +/* + * This assumes you have a 1.8432 MHz clock for your UART. + * + * It'd be nice if someone built a serial card with a 24.576 MHz + * clock, since the 16550A is capable of handling a top speed of 1.5 + * megabits/second; but this requires the faster clock. + */ +#define BASE_BAUD (1843200 / 16) + +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + +#if defined(CONFIG_ARCH_A5K) + /* UART CLK PORT IRQ FLAGS */ +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS3 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS4 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS5 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS6 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS7 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS8 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS9 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS10 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS11 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */ + +#elif defined(CONFIG_ARCH_ARC) + + /* UART CLK PORT IRQ FLAGS */ +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS3 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS4 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS5 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS6 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS7 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS8 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS9 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS10 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS11 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */ + +#endif +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/shmparam.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,5 @@ +/* + * linux/include/asm-arm/arch-arc/shmparam.h + * + * Copyright (c) 1996 Russell King. + */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/system.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/system.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * 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 + +#include + +#ifdef CONFIG_ARCH_ARC + +#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) + +#endif + +extern __inline__ void arch_reset(char mode) +{ + extern void ecard_reset(int card); + + /* + * Do any cleanups that the processor may require + */ + processor._proc_fin(); + + /* + * 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)(); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/time.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/time.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,196 @@ +/* + * linux/include/asm-arm/arch-arc/time.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 24-Sep-1996 RMK Created + * 10-Oct-1996 RMK Brought up to date with arch-sa110eval + * 04-Dec-1997 RMK Updated for new arch/arm/time.c + */ +#include + +static long last_rtc_update = 0; /* last time the cmos clock got updated */ + +extern __inline__ unsigned long gettimeoffset (void) +{ + unsigned int count1, count2, status1, status2; + unsigned long offset = 0; + + status1 = inb(IOC_IRQREQA); + barrier (); + outb (0, IOC_T0LATCH); + barrier (); + count1 = inb(IOC_T0CNTL) | (inb(IOC_T0CNTH) << 8); + barrier (); + status2 = inb(IOC_IRQREQA); + barrier (); + outb (0, IOC_T0LATCH); + barrier (); + count2 = inb(IOC_T0CNTL) | (inb(IOC_T0CNTH) << 8); + + if (count2 < count1) { + /* + * This means that we haven't just had an interrupt + * while reading into status2. + */ + if (status2 & (1 << 5)) + offset = tick; + count1 = count2; + } else if (count2 > count1) { + /* + * We have just had another interrupt while reading + * status2. + */ + offset += tick; + count1 = count2; + } + + count1 = LATCH - count1; + /* + * count1 = number of clock ticks since last interrupt + */ + offset += count1 * tick / LATCH; + return offset; +} + +extern int iic_control (unsigned char, int, char *, int); + +static int set_rtc_time(unsigned long nowtime) +{ + char buf[5], ctrl; + + if (iic_control(0xa1, 0, &ctrl, 1) != 0) + printk("RTC: failed to read control reg\n"); + + /* + * Reset divider + */ + ctrl |= 0x80; + + if (iic_control(0xa0, 0, &ctrl, 1) != 0) + printk("RTC: failed to stop the clock\n"); + + /* + * We only set the time - we don't set the date. + * This means that there is the possibility once + * a day for the correction to disrupt the date. + * We really ought to write the time and date, or + * nothing at all. + */ + buf[0] = 0; + buf[1] = nowtime % 60; nowtime /= 60; + buf[2] = nowtime % 60; nowtime /= 60; + buf[3] = nowtime % 24; + + BIN_TO_BCD(buf[1]); + BIN_TO_BCD(buf[2]); + BIN_TO_BCD(buf[3]); + + if (iic_control(0xa0, 1, buf, 4) != 0) + printk("RTC: Failed to set the time\n"); + + /* + * Re-enable divider + */ + ctrl &= ~0x80; + + if (iic_control(0xa0, 0, &ctrl, 1) != 0) + printk("RTC: failed to start the clock\n"); + + return 0; +} + +extern __inline__ unsigned long get_rtc_time(void) +{ + unsigned int year, i; + char buf[8]; + + /* + * The year is not part of the RTC counter + * registers, and is stored in RAM. This + * means that it will not be automatically + * updated. + */ + if (iic_control(0xa1, 0xc0, buf, 1) != 0) + printk("RTC: failed to read the year\n"); + + /* + * If the year is before 1970, then the year + * is actually 100 in advance. This gives us + * a year 2070 bug... + */ + year = 1900 + buf[0]; + if (year < 1970) + year += 100; + + /* + * Read the time and date in one go - this + * will ensure that we don't get any effects + * due to carry (the RTC latches the counters + * during a read). + */ + if (iic_control(0xa1, 2, buf, 5) != 0) { + printk("RTC: failed to read the time and date\n"); + memset(buf, 0, sizeof(buf)); + } + + /* + * The RTC combines years with date and weekday + * with month. We need to mask off this extra + * information before converting the date to + * binary. + */ + buf[4] &= 0x1f; + buf[3] &= 0x3f; + + for (i = 0; i < 5; i++) + BCD_TO_BIN(buf[i]); + + return mktime(year, buf[4], buf[3], buf[2], buf[1], buf[0]); +} + +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + do_timer(regs); + + /* If we have an externally synchronized linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + */ + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec >= 50000 - (tick >> 1) && + xtime.tv_usec < 50000 + (tick >> 1)) { + if (set_rtc_time(xtime.tv_sec) == 0) + last_rtc_update = xtime.tv_sec; + else + last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ + } + + if (!user_mode(regs)) + do_profile(instruction_pointer(regs)); +} + +static struct irqaction timerirq = { + timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + +/* + * Set up timer interrupt, and return the current time in seconds. + */ +extern __inline__ void setup_timer(void) +{ + outb(LATCH & 255, IOC_T0LTCHL); + outb(LATCH >> 8, IOC_T0LTCHH); + outb(0, IOC_T0GO); + + xtime.tv_sec = get_rtc_time(); + + setup_arm_irq(IRQ_TIMER, &timerirq); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/timex.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/timex.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,13 @@ +/* + * linux/include/asm-arm/arch-arc/timex.h + * + * Acorn Archimedes/A5000 architecture timex specifications + * + * Copyright (C) 1997, 1998 Russell King + */ + +/* + * On the RiscPC, the clock ticks at 2MHz. + */ +#define CLOCK_TICK_RATE 2000000 + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-arc/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/arch-arc/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-arc/uncompress.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,107 @@ +/* + * linux/include/asm-arm/arch-arc/uncompress.h + * + * Copyright (C) 1996 Russell King + */ +#define VIDMEM ((char *)0x02000000) + +int video_num_columns, video_num_lines, video_size_row; +int white, bytes_per_char_h; +extern unsigned long con_charconvtable[256]; + +struct param_struct { + unsigned long page_size; + unsigned long nr_pages; + unsigned long ramdisk_size; + unsigned long mountrootrdonly; + unsigned long rootdev; + unsigned long video_num_cols; + unsigned long video_num_rows; + unsigned long video_x; + unsigned long video_y; + unsigned long memc_control_reg; + unsigned char sounddefault; + unsigned char adfsdrives; + unsigned char bytes_per_char_h; + unsigned char bytes_per_char_v; + unsigned long unused[256/4-11]; +}; + +static struct param_struct *params = (struct param_struct *)0x0207c000; + +/* + * This does not append a newline + */ +static void puts(const char *s) +{ + extern void ll_write_char(char *, unsigned long); + int x,y; + unsigned char c; + char *ptr; + + x = params->video_x; + y = params->video_y; + + while ( ( c = *(unsigned char *)s++ ) != '\0' ) { + if ( c == '\n' ) { + x = 0; + if ( ++y >= video_num_lines ) { + y--; + } + } else { + ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); + ll_write_char(ptr, c|(white<<16)); + if ( ++x >= video_num_columns ) { + x = 0; + if ( ++y >= video_num_lines ) { + y--; + } + } + } + } + + params->video_x = x; + params->video_y = y; +} + +static void error(char *x); + +/* + * Setup for decompression + */ +static void arch_decomp_setup(void) +{ + int i; + + video_num_lines = params->video_num_rows; + video_num_columns = params->video_num_cols; + bytes_per_char_h = params->bytes_per_char_h; + video_size_row = video_num_columns * bytes_per_char_h; + if (bytes_per_char_h == 4) + for (i = 0; i < 256; i++) + con_charconvtable[i] = + (i & 128 ? 1 << 0 : 0) | + (i & 64 ? 1 << 4 : 0) | + (i & 32 ? 1 << 8 : 0) | + (i & 16 ? 1 << 12 : 0) | + (i & 8 ? 1 << 16 : 0) | + (i & 4 ? 1 << 20 : 0) | + (i & 2 ? 1 << 24 : 0) | + (i & 1 ? 1 << 28 : 0); + else + for (i = 0; i < 16; i++) + con_charconvtable[i] = + (i & 8 ? 1 << 0 : 0) | + (i & 4 ? 1 << 8 : 0) | + (i & 2 ? 1 << 16 : 0) | + (i & 1 ? 1 << 24 : 0); + + white = bytes_per_char_h == 8 ? 0xfc : 7; + + if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); +} + +/* + * nothing to do + */ +#define arch_decomp_wdog() diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/a.out.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/clps7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/clps7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/clps7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/clps7212.h 2000-03-28 13:53:14.000000000 +0100 @@ -0,0 +1,254 @@ +/* + * linux/include/asm-arm/arch-clps7212/clps7212.h + * + * CLPS7212 extensions added by Hugo Fiennes, + * CLPS7110 version written 1998,1999 by Werner Almesberger + * + * This file contains the hardware definitions of the CL-PS7212 chip + * + * The 7212 is basically a 7110 with extensions - a digital audio interface, + * some on-chip SRAM, faster clock, etc. + * + */ + +#ifndef _ASM_ARCH_CLPS7212_H +#define _ASM_ARCH_CLPS7212_H + +/* + * CL-PS7212 internal registers + * + * The names will almost certainly clash with something else ... so we'll + * probably have to prefix them with CLPS7212_ or something equally ugly later. + */ + +#define PADR 0x0000 /* Port A Data register ---------------------------- */ +#define PBDR 0x0001 /* Port B Data register ---------------------------- */ +#define PCDR 0x0002 /* Port C Data register ---------------------------- */ +#define PDDR 0x0003 /* Port D Data register ---------------------------- */ +#define PADDR 0x0040 /* Port A Data Direction register ------------------ */ +#define PBDDR 0x0041 /* Port B Data Direction register ------------------ */ +#define PCDDR 0x0042 /* Port C Data Direction register ------------------ */ +#define PDDDR 0x0043 /* Port D Data Direction register ------------------ */ +#define PEDR 0x0080 /* Port E Data register ---------------------------- */ +#define PEDDR 0x00c0 /* Port E Data Direction register ------------------ */ + +#define SYSCON 0x0100 /* System Control register ------------------------- */ +#define KBDSCAN 0x0000000f /* Keyboard scan */ +#define KBSC_HI 0x0 /* All driven high */ +#define KBSC_LO 0x1 /* All driven low */ +#define KBSC_X 0x2 /* All high impedance */ +#define KBSC_COL0 0x8 /* Column 0 high, others high impedance */ +#define KBSC_COL1 0x9 /* Column 1 high, others high impedance */ +#define KBSC_COL2 0xa /* Column 2 high, others high impedance */ +#define KBSC_COL3 0xb /* Column 3 high, others high impedance */ +#define KBSC_COL4 0xc /* Column 4 high, others high impedance */ +#define KBSC_COL5 0xd /* Column 5 high, others high impedance */ +#define KBSC_COL6 0xe /* Column 6 high, others high impedance */ +#define KBSC_COL7 0xf /* Column 7 high, others high impedance */ +#define TC1M 0x00000010 /* TC1 mode (0: free-running, 1: prescale) */ +#define TC1S 0x00000020 /* TC1 clock source (0: 2 kHz, 1: 512 kHz) */ +#define TC2M 0x00000040 /* TC2 mode (0: free-running, 1: prescale) */ +#define TC2S 0x00000080 /* TC2 clock source (0: 2 kHz, 1: 512 kHz) */ +#define UARTEN 0x00000100 /* Internal UART enable */ +#define BZTOG 0x00000200 /* Drive buzzer directly */ +#define BZMOD 0x00000400 /* Buzzer drive mode (0: BZTOG, 1: TC1 under-flow)*/ +#define DBGEN 0x00000800 /* Debug mode */ +#define LCDEN 0x00001000 /* LCD enable */ +#define CDENTX 0x00002000 /* Codec interface enable Tx */ +#define CDENRX 0x00004000 /* Codec interface enable Rx */ +#define SIREN 0x00008000 /* HP SIR protocol encoding enable */ +#define ADCKSEL 0x00030000 /* Microwire/SPI peripheral clock speed select */ +#define ADCKSEL_SHIFT 16 +#define ADCS_8 0x0 /* Sample 8 kHz, interface 4 kHz */ +#define ADCS_32 0x1 /* 32/16 kHz */ +#define ADCS_128 0x2 /* 128/64 kHz */ +#define ADCS_256 0x3 /* 256/128 kHz */ +#define EXCKEN 0x00040000 /* External expansion clock enable */ +#define WAKEDIS 0x00080000 /* Disable switch-on through wake-up */ +#define IRTXM 0x00100000 /* IrDA Tx mode (0: 3/16 of rate, 1: 1.63 us) */ + +#define SYSFLG 0x0140 /* System Status Flags register -------------------- */ +#define MCDR 0x00000001 /* Media changed direct read */ +#define DCDET 0x00000002 /* Main adapter is powering the system */ +#define WUDR 0x00000004 /* Wake-up direct read */ +#define WUON 0x00000008 /* Left standby on wake-up */ +#define DID 0x000000f0 /* Display ID nibble */ +#define DID_SHIFT 4 +#define CTS 0x00000100 /* UART CTS */ +#define DSR 0x00000200 /* UART DSR */ +#define DCD 0x00000400 /* UART DCD */ +#define UBUSY 0x00000800 /* UART transmitter busy */ +#define NBFLG 0x00001000 /* New battery flag */ +#define RSTFLG 0x00002000 /* Reset flag */ +#define PFFLG 0x00004000 /* Power fail flag */ +#define CLDFLG 0x00008000 /* Cold start flag */ +#define RTCDIV 0x003f0000 /* 64 Hz ticks since last RTC increment */ +#define RTCDIV_SHIFT 16 +#define URXFE 0x00400000 /* UART receiver FIFO empty */ +#define UTXFF 0x00800000 /* UART transmit FIFO full */ +#define CRXFE 0x01000000 /* Codec Rx FIFO empty */ +#define CTXFF 0x02000000 /* Codec Tx FIFO full */ +#define SSIBUSY 0x04000000 /* Synchronous serial interface busy */ +#define BOOT8BIT 0x80000000 /* Initial bus width (0: 32 bit, 1: 8 bit) */ +#define VERID 0xc0000000 /* Version ID */ +#define VERID_SHIFT 30 + +#define MEMCFG1 0x0180 /* Memory Configuration register 1 ----------------- */ +#define MEMCFG2 0x01c0 /* Memory Configuration register 2 ----------------- */ +#define CS_BW 0x03 /* Bus width */ +#define CS_BW_BUS32_E0 0 /* 32 bit if E=0 */ +#define CS_BW_BUS16_E0 1 /* 16 bit if E=0 */ +#define CS_BW_BUS8_E0 2 /* 8 bit if E=0 */ +#define CS_BW_PCMCIA_E0 3 /* PCMCIA if E=0 */ +#define CS_BW_BUS8_E1 0 /* 8 bit if E=1 */ +#define CS_BW_PCMCIA_E1 1 /* PCMCIA if E=1 */ +#define CS_BW_BUS32_E1 2 /* 32 bit if E=1 */ +#define CS_BW_BUS16_E1 3 /* 16 bit if E=1 */ +#define CS_RAWT 0x0c /* Random Access Wait State */ +#define CS_RAWT_SHIFT 2 /* WS = 4-N; speed = 50+50*WS ns */ +#define CS_SAWR 0x30 /* Sequential Access Wait State */ +#define CS_SAWR_SHIFT 4 /* WS = 3-N; speed[WS] = 40,80,120,150 ns */ +#define CS_SQAEN 0x40 /* Sequential Access Enable */ +#define CS_CLKEN 0x80 /* Expansion Clock Enable */ +#define DRFPR 0x0200 + +#define INTSR 0x0240 /* Interrupt Status register ----------------------- */ +#define EXTFIQ 0x00000001 /* External fast interrupt */ +#define BLINT 0x00000002 /* Battery low interrupt */ +#define WEINT 0x00000004 /* Watch dog expired interrupt */ +#define MCINT 0x00000008 /* Media changed interrupt */ +#define CSINT 0x00000010 /* Codec sound interrupt */ +#define EINT1 0x00000020 /* External interrupt 1 */ +#define EINT2 0x00000040 /* External interrupt 2 */ +#define EINT3 0x00000080 /* External interrupt 3 */ +#define TC1OI 0x00000100 /* TC1 under-flow interrupt */ +#define TC2OI 0x00000200 /* TC2 under-flow interrupt */ +#define RTCMI 0x00000400 /* RTC compare match interrupt */ +#define TINT 0x00000800 /* 64-Hz tick interrupt */ +#define UTXINT 0x00001000 /* Internal UART transmit FIFO half-empty intr. */ +#define URXINT 0x00002000 /* Internal UART receive FIFO half-full interrupt */ +#define UMSINT 0x00004000 /* Internal UART modem status changed interrupt */ +#define SSEOTI 0x00008000 /* Synchronous serial interface end-of-transfer */ + +#define INTMR 0x0280 /* Interrupt Mask register ------------------------- */ + +#define LCDCON 0x02c0 /* LCD Control register ---------------------------- */ +#define VBUFSIZ 0x00001fff /* Video buffer size (bits/128-1) */ +#define LINELEN 0x0007e000 /* Line length (pix/16-1) */ +#define LINELEN_SHIFT 13 +#define PIXPSC 0x01f80000 /* Pixel prescale (526628/pixels-1) */ +#define PIXPSC_SHIFT 19 +#define ACPSC 0x3e000000 /* AC prescale */ +#define ACPSC_SHIFT 25 +#define GSEN 0x40000000 /* Grayscale enable (0: monochrome) */ +#define GSMD 0x80000000 /* Grayscale mode (0: 2 bit, 1: 4 bit) */ + +#define TC1D 0x0300 /* Timer Counter 1 Data register ------------------- */ +#define TC_MASK 0x0000ffff +#define TC2D 0x0340 /* Timer Counter 2 Data register ------------------- */ + +#define RTCDR 0x0380 /* Realtime Clock Data register -------------------- */ + +#define RTCMR 0x03c0 /* Realtime Clock Match register ------------------- */ + +#define PMPCON 0x0400 + +#define CODR 0x0440 /* Codec Interface Data register ------------------- */ + +#define UARTDR 0x0480 /* UART FIFO Data register ------------------------- */ +#define RX_DATA 0x000000ff /* Rx data */ +#define FRMERR 0x00000100 /* UART framing error */ +#define PARERR 0x00000200 /* UART parity error */ +#define OVERR 0x00000400 /* UART overrun error */ + +#define UBRLCR 0x04c0 /* UART Bit Rate and Line Control register --------- */ +#define BRDIV 0x00000fff /* Bit rate divisor */ +#define BR_115200 1 +#define BR_57600 3 +#define BR_38400 5 +#define BR_19200 11 +#define BR_9600 23 +#define BR_2400 95 +#define BR_1200 191 +#define BREAK 0x00001000 /* Set Tx high */ +#define PRTEN 0x00002000 /* Parity enable */ +#define EVENPRT 0x00004000 /* Even parity */ +#define XSTOP 0x00008000 /* Extra stop bit */ +#define FIFOEN 0x00010000 /* Enable FIFO */ +#define WRDLEN 0x00030000 /* Word length */ +#define WRDLEN_SHIFT 17 +#define WL_5 0x0 /* 5 bits */ +#define WL_6 0x1 /* 6 bits */ +#define WL_7 0x2 /* 7 bits */ +#define WL_8 0x3 /* 8 bits */ + +#define SYNCIO 0x0500 +#define TXFRMEN 0x00004000 /* Initiate data transfer */ +#define SMCKEN 0x00002000 /* Enable sample clock on SMPLCK */ +#define FRLEN 0x00001f00 /* Frame length */ +#define FRLEN_SHIFT 8 +#define ADCCFB 0x000000ff /* ADC Configuration byte */ +#define ADCRSW 0x0000ffff /* ADC result word */ + +#define PALLSW 0x0540 /* Least-significant 32-bit word of LCD Palette reg. */ +#define PALMSW 0x0580 /* Most-significant 32-bit word of LCD Palette reg. */ + +#define STFCLR 0x05c0 /* Write to clear all start up reason flags -------- */ +#define BLEOI 0x0600 /* Write to clear Battery Low interrupt ------------ */ +#define MCEOI 0x0640 /* Write to clear Media Changed interrupt ---------- */ +#define TEOI 0x0680 /* Write to clear Tick and Watchdog interrupt ------ */ +#define TC1EOI 0x06c0 /* Write to clear TC1 interrupt -------------------- */ +#define TC2EOI 0x0700 /* Write to clear TC2 interrupt -------------------- */ +#define RTCEOI 0x0740 /* Write to clear RTC Match interrupt -------------- */ +#define UMSEOI 0x0780 /* Write to clear UART Modem Status Changed interrupt*/ +#define COEOI 0x07c0 /* Write to clear Codec Sound interrupt ------------ */ +#define HALT 0x0800 /* Write to enter idle state ----------------------- */ +#define STDBY 0x0840 /* Write to standby state -------------------------- */ + +#define FBADDR 0x1000 /* LCD framebuffer address ------------------------- */ +#define SYSCON2 0x1100 /* System configuration register 2 ----------------- */ +#define SYSFLG2 0x1140 /* System status register 2 ------------------------ */ +#define INTSR2 0x1240 /* Interrupt status register 2 --------------------- */ +#define INTMR2 0x1280 /* Interrupt mask register 2 ----------------------- */ +#define UARTDR2 0x1480 /* UART2 data register ----------------------------- */ +#define UBLCR2 0x14c0 /* UART2 bitrate & line control register ----------- */ +#define SS2DR 0x1500 /* SS2DR master/slave SSI2 data register ----------- */ +#define SRXEOF 0x1600 /* Write to clear RX FIFO overflow flag ------------ */ +#define SS2POP 0x16c0 /* Write to pop SSI2 residual byte into RX FIFO ---- */ +#define KBDEOI 0x1700 /* Write to clear keyboard interrupt --------------- */ + +#define DAICONTROL 0x2000 /* Digital Audio Interface control ---------- */ +#define DAICONTROL_DAIEN (1<<16) /* Digital Audio Enable */ +#define DAICONTROL_ECS (1<<17) /* External clock select */ +#define DAICONTROL_LTCM (1<<19) /* Left channel mask */ +#define DAICONTROL_RTCM (1<<21) /* Right channel mask */ +#define DAIDATA0 0x2040 /* Digital Audio data 0 --------------------- */ +#define DAIDATA1 0x2080 /* Digital Audio data 1 --------------------- */ +#define DAIDATA2 0x20c0 /* Digital Audio data 2 --------------------- */ +#define DAIDATA2_LEFTENABLE 0x0011c000 /* Magic to enable left channel */ +#define DAIDATA2_RIGHTENABLE 0x000dc000 /* Magic to enable right channel */ +#define DAISTATUS 0x2100 /* Digital Audio status --------------------- */ +#define DAISTATUS_FIFO (1<<12) /* FIFO */ +#define SYSCON3 0x2200 /* System configuration 3 ------------------- */ +#define SYSCON3_DAIPSEL (1<<3) +#define SYSCON3_DAIEN (1<<9) /* Enable DAI */ +#define INTSR3 0x2240 /* Interrupt status register 3 -------------- */ +#define INTMR3 0x2280 /* Interrupt mask register 3 ---------------- */ +#define INTMR3_DAI (1<<0) /* DAI FIQ enable */ +#define LEDFLSH 0x22c0 /* LED flash control register --------------- */ + +/* + * CL-PS7212 PCMCIA memory constants + * + * Need to #define PCMCIA_BASE before using these macros. + */ + +#define PCMCIA_ATTR8(a) (PCMCIA_BASE+0x00000000+(a)) +#define PCMCIA_MEM(a) (PCMCIA_BASE+0x04000000+(a)) +#define PCMCIA_IO8(a) (PCMCIA_BASE+0x08000000+(a)) +#if 0 +#define PCMCIA_IO16(a) (PCMCIA_BASE+0x0c000000+((a) & ~3)+(((a) & 2) << 24)) +#endif +#define PCMCIA_IO16(a) (PCMCIA_BASE+0x00000000+((a&0xf)<<1)+(a&~0xf)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/dma.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/dma.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/empeg7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/empeg7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/empeg7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/empeg7212.h 2000-11-27 12:32:42.000000000 +0000 @@ -0,0 +1,224 @@ +/* + * empeg-net7212 hardware-specifics + * + * (C) 2000 empeg ltd, http://www.empeg.com + * + * Authors: + * Hugo Fiennes, + * Mike Crowe, + * + */ + +#ifndef __ASM_ARCH_EMPEG7212_H +#define __ASM_ARCH_EMPEG7212_H + +/* ... and IRQ defintions */ +#define EMPEG_IRQ_IR 4 +#define EMPEG_IRQ_USBIRQ 1 +#define EMPEG_IRQ_IDE1 6 +#define EMPEG_IRQ_IDE2 7 +#define EMPEG_IRQ_AUDIOOUT 0 + +#define EMPEG_IR_MAJOR (242) +#define EMPEG_USB_MAJOR (243) +#define EMPEG_DISPLAY_MAJOR (244) +#define EMPEG_AUDIO_MAJOR (245) +#define EMPEG_STATE_MAJOR (246) +#define EMPEG_RDS_MAJOR (248) +#define EMPEG_AUDIOIN_MAJOR (249) + +/* Empeg IR ioctl values */ +#define EMPEG_IR_MAGIC 'i' + +/* Set/get the remote control type */ +#define EMPEG_IR_WRITE_TYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define EMPEG_IR_READ_TYPE _IOR(EMPEG_IR_MAGIC, 2, int) + +/* Set/get the delay before repeats are honoured (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define EMPEG_IR_READ_RPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) + +/* Set/get the interval between repeats (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define EMPEG_IR_READ_RPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) + +/* Set/get the timeout for a repeat occuring. If a repeat code happens + * after this amount of time without one then it will be ignored. */ +#define EMPEG_IR_WRITE_RPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define EMPEG_IR_READ_RPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +/* Deprecated ioctl values */ +#define IR_IOCSTYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define IR_IOCGTYPE _IOR(EMPEG_IR_MAGIC, 2, int) +#define IR_IOCTTYPE IR_IOCGTYPE /*deprecated*/ +#define IR_IOCSRPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define IR_IOCGRPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) +#define IR_IOCSRPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define IR_IOCGRPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) +#define IR_IOCSRPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define IR_IOCGRPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +#define IR_TYPE_COUNT 1 + +#define IR_TYPE_CAPTURE 0 +#define IR_TYPE_KENWOOD 1 + +/* Empeg Display ioctl values */ +#define EMPEG_DISPLAY_MAGIC 'd' + +/* Deprecated ioctl codes */ +#define DIS_IOCREFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define DIS_IOCSPOWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define DIS_IOCSPALETTE _IOW(EMPEG_DISPLAY_MAGIC, 4, int) +#define DIS_IOCCLEAR _IO(EMPEG_DISPLAY_MAGIC, 5) +#define DIS_IOCENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define DIS_IOCPOPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define DIS_IOCFLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) + +/* Should use these ioctl codes instead */ +#define EMPEG_DISPLAY_REFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define EMPEG_DISPLAY_POWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define EMPEG_DISPLAY_WRITE_PALETTE _IOW(EMPEG_DISPLAY_MAGIC, 4, int) +#define EMPEG_DISPLAY_CLEAR _IO(EMPEG_DISPLAY_MAGIC, 5) +#define EMPEG_DISPLAY_ENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define EMPEG_DISPLAY_POPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define EMPEG_DISPLAY_FLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) +#define EMPEG_DISPLAY_QUERYQUEUEFREE _IOR(EMPEG_DISPLAY_MAGIC, 9, int) +#define EMPEG_DISPLAY_SETCONTRAST _IOW(EMPEG_DISPLAY_MAGIC, 10, int) +#define EMPEG_DISPLAY_GETCONTRAST _IOR(EMPEG_DISPLAY_MAGIC, 10, int) +#define EMPEG_DISPLAY_SETBACKLIGHT _IOW(EMPEG_DISPLAY_MAGIC, 11, int) +#define EMPEG_DISPLAY_GETBACKLIGHT _IOR(EMPEG_DISPLAY_MAGIC, 11, int) + +/* Sound IOCTLs */ +/* Make use of the bitmasks in soundcard.h, we only support. + * PCM, RADIO and LINE. */ + +#define EMPEG_MIXER_MAGIC 'm' +#define EMPEG_DSP_MAGIC 'a' + +#define EMPEG_MIXER_READ_SOURCE _IOR(EMPEG_MIXER_MAGIC, 0, int) +#define EMPEG_MIXER_WRITE_SOURCE _IOW(EMPEG_MIXER_MAGIC, 0, int) +#define EMPEG_MIXER_READ_FLAGS _IOR(EMPEG_MIXER_MAGIC, 1, int) +#define EMPEG_MIXER_WRITE_FLAGS _IOW(EMPEG_MIXER_MAGIC, 1, int) +#define EMPEG_MIXER_READ_DB _IOR(EMPEG_MIXER_MAGIC, 2, int) +#define EMPEG_MIXER_WRITE_LOUDNESS _IOW(EMPEG_MIXER_MAGIC, 4, int) +#define EMPEG_MIXER_READ_LOUDNESS _IOR(EMPEG_MIXER_MAGIC, 4, int) +#define EMPEG_MIXER_READ_LOUDNESS_DB _IOR(EMPEG_MIXER_MAGIC, 5, int) +#define EMPEG_MIXER_WRITE_BALANCE _IOW(EMPEG_MIXER_MAGIC, 6, int) +#define EMPEG_MIXER_READ_BALANCE _IOR(EMPEG_MIXER_MAGIC, 6, int) +#define EMPEG_MIXER_READ_BALANCE_DB _IOR(EMPEG_MIXER_MAGIC, 7, int) +#define EMPEG_MIXER_WRITE_FADE _IOW(EMPEG_MIXER_MAGIC, 8, int) +#define EMPEG_MIXER_READ_FADE _IOR(EMPEG_MIXER_MAGIC, 8, int) +#define EMPEG_MIXER_READ_FADE_DB _IOR(EMPEG_MIXER_MAGIC, 9, int) +#define EMPEG_MIXER_SET_EQ _IOW(EMPEG_MIXER_MAGIC, 10, int) +#define EMPEG_MIXER_GET_EQ _IOR(EMPEG_MIXER_MAGIC, 11, int) +#define EMPEG_MIXER_SET_EQ_FOUR_CHANNEL _IOW(EMPEG_MIXER_MAGIC, 12, int) +#define EMPEG_MIXER_GET_EQ_FOUR_CHANNEL _IOR(EMPEG_MIXER_MAGIC, 13, int) +#define EMPEG_MIXER_GET_COMPRESSION _IOR(EMPEG_MIXER_MAGIC, 14, int) +#define EMPEG_MIXER_SET_COMPRESSION _IOW(EMPEG_MIXER_MAGIC, 14, int) +#define EMPEG_MIXER_SET_SAM _IOW(EMPEG_MIXER_MAGIC, 15, int) +#define EMPEG_MIXER_SET_HAM _IOW(EMPEG_MIXER_MAGIC, 16, int) + +/* Retrieve volume level corresponding to 0dB */ +#define EMPEG_MIXER_READ_ZERO_LEVEL _IOR(EMPEG_MIXER_MAGIC, 3, int) + +#define EMPEG_MIXER_FLAG_MUTE (1<<0) +/*#define EMPEG_MIXER_FLAG_LOUDNESS (1<<1)*/ + +/* Radio IOCTLs */ +/* These are in addition to those provided by the Video4Linux API */ +#define EMPEG_RADIO_MAGIC 'r' +#define EMPEG_RADIO_READ_MONO _IOR(EMPEG_RADIO_MAGIC, 73, int) +#define EMPEG_RADIO_WRITE_MONO _IOW(EMPEG_RADIO_MAGIC, 73, int) +#define EMPEG_RADIO_READ_DX _IOR(EMPEG_RADIO_MAGIC, 74, int) +#define EMPEG_RADIO_WRITE_DX _IOW(EMPEG_RADIO_MAGIC, 74, int) +#define EMPEG_RADIO_READ_SENSITIVITY _IOR(EMPEG_RADIO_MAGIC, 75, int) +#define EMPEG_RADIO_WRITE_SENSITIVITY _IOW(EMPEG_RADIO_MAGIC, 75, int) +#define EMPEG_RADIO_SEARCH _IO(EMPEG_RADIO_MAGIC, 76) /* Pass in direction in *arg */ +#define EMPEG_RADIO_GET_MULTIPATH _IOR(EMPEG_RADIO_MAGIC, 77, int) +#define EMPEG_RADIO_SET_STEREO _IOW(EMPEG_RADIO_MAGIC, 78, int) + +#define EMPEG_DSP_BEEP _IOW(EMPEG_DSP_MAGIC, 0, int) +#define EMPEG_DSP_PURGE _IOR(EMPEG_DSP_MAGIC, 1, int) + +/* State storage ioctls */ +/* Shouldn't need either of these in normal use. */ +#define EMPEG_STATE_MAGIC 's' +#define EMPEG_STATE_FORCESTORE _IO(EMPEG_STATE_MAGIC, 74) +#define EMPEG_STATE_FAKEPOWERFAIL _IO(EMPEG_STATE_MAGIC, 75) + +/* Where flash is mapped when running */ +#define EMPEG_FLASHBASE (FLASH_BASE) + +#ifndef __ASSEMBLY__ +struct empeg_eq_section_t +{ + unsigned int word1; + unsigned int word2; +}; + +#ifdef __KERNEL__ + +/* Inlines to get ethernet/pna stuff */ + +/* Flash/PROM layout: + + 00000 - bootstrap + 02000 - 48 bit ethernet ID + 02008 - 32 bit hardware version + 0200c - 32 bit unit serial number + 02010 - 128 bit (16 byte) unique ID + 0e000 - linux loader + 10000 - linux kernel + +*/ + +static __inline__ void empeg_getetherid(unsigned char *addr) +{ + unsigned char *flashinfo=(unsigned char*)(EMPEG_FLASHBASE+0x2000); + int a; + + /* Fill in ID */ + for(a=0;a<6;a++) addr[a]=flashinfo[a]; +} + +/* Set/get network type - cleaner done in here, honest! */ +extern int mercury_networktype; +static __inline__ const char* empeg_getethertype(void) +{ + return(mercury_networktype?"pna":"ethernet"); +} + +/* Inline to get hardware revision */ +static __inline__ int empeg_gethwrevision(void) +{ + int *flashinfo=(int*)(EMPEG_FLASHBASE+0x2000); + return(flashinfo[2]); +} + +/* Inline to get serial number */ +static __inline__ int empeg_getserialnumber(void) +{ + int *flashinfo=(int*)(EMPEG_FLASHBASE+0x2000); + return(flashinfo[3]); +} + +/* Inline to get unique ID */ +static __inline__ void empeg_getuniqueid(unsigned long *buffer) +{ + unsigned long *flashinfo=(unsigned long*)(EMPEG_FLASHBASE+0x2000); + int a; + + for(a=0;a<4;a++) buffer[a]=flashinfo[4+a]; +} + +extern void audio_emitted_action(void); + +extern void display_off(void); + +#endif /* __KERNEL__ */ +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_ARCH_EMPEG7212_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/hardware.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,193 @@ +/* + * linux/include/asm-arm/arch-clps7212/hardware.h + * + * Written 1998,1999 by Werner Almesberger + * + * This file contains Linux-specific hardware definitions for the CL-PS7212 + * architecture and #includes hardware definitions of the CL-PS7212 chip, + * plus architecture-specific hardware definitions. + */ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include + +#if defined(CONFIG_ARCH_EB7212) +#include +#elif defined(CONFIG_ARCH_MERCURY) +#include +#else +#error Unknown EP7212 hardware architecture! +#endif + +/* + * Our memory model (generalized): + * + * Physical Size Type Virtual + * (_START) (_SIZE) (_BASE) + * 00000000-7fffffff 2GB don't care n/a + * 40000000-4ffffff 256MB CompactFlash (Psion) f0000000 + * 70000000-7fffffff 256MB PCMCIA (Geofox) f0000000 + * 80000000-8000ffff 64kB internal registers d0000000 + * 80010000-bfffffff 960kB not used n/a + * c0000000-ffffffff 1024MB RAM, non-contiguous c0000000 (1) + * + */ + +/* + * Start conventions for the kernel: + * + * R0 = 0 head-armv.S sanity check + * R1 = 9 CL-PS7212 + */ + +/* + * Memory map when kernel is started: + * + * Physical location Offset in Size Description + * start end boot file + * -------- -------- ---------- ----- -------------------------------------- + * c0000000-c001ffff 128kB Video RAM (1) + * c0020000-c00207ff 2kB frag_p2v_lookup_table + * c0020800-c00209ff 0.5kB frag_v2p_lookup_table + * c0020a00-c0020fff 1.5kB currently unused (2) + * c0021000-c0022fff 8kB currently unused (3) + * c0023000-c00235ff 00000800 1.5kB parameters (asm/setup.h:param_struct) + * c0023600-c00237ff 00000e00 0.5kB list of available memory areas (4) + * c0023800-c0023fff 2kB currently unused + * c0024000-c0033fff 64kB page tables (5) + * c0034000-c0037fff 16kB swapper_pg_dir (5) + * c0038000-... 00002000 start of text segment, then initrd + * + * (1) 0-12bff for Psion (640x240), 0-18fff for Geofox (640x320). Unused pages + * can be given to VM. + * (2) Architectures without KMEM_IS_VIRTUAL can use page c002 for VM. + * (3) Can be used for VM. + * (4) Either contained in boot file or provided by relocator. + * (5) Initialized by head-armv.S + * + * Note: Boot file locations 0x0000-0x07ff contain the relocator, locations + * 0x1000-0x1fff contain a scratch page which is only used during + * relocation. The physical location of either depends on where EPOC32 + * loads them. + */ + +/* + * IO address mapping + */ + +#define IO_BASE 0xd0000000 /* virtual */ +#define IO_START 0x80000000 /* physical */ +#define IO_SIZE 0x00100000 /* actually it's only 0x1000, + but this way we can use a + section to map it and don't + waste an entire page table*/ + +/* + * PCMCIA address mapping + * + * PCMCIA_START depends on the machine architecture. + */ + +#define PCMCIA_BASE 0xf0000000 /* virtual */ +#define PCMCIA_SIZE 0x10000000 /* 4 areas of 64MB each */ + +/* + * RAM definitions + */ + +#define RAM_START 0xc0000000 /* physical */ + +/* + * KERNTOPHYS does *not* translate from kernel addresses to physical addresses. + * Instead, it translates from addresses of kernel objects (code, data, etc.) + * to addresses of memory, both in kernel address space. In our case, this is a + * no-op. + * + * This KERNTOPHYS is only used in arch/arm/mm/init.c + */ + +#define KERNTOPHYS(x) ((unsigned long) &(x)) + +#define KERNEL_BASE 0xc0028000 +/*#define PARAMS_BASE 0xc0000400*/ +/*#define Z_PARAMS_BASE @@@*/ +#define FLUSH_BASE_PHYS 0 /* ROM @@@ ?*/ +#define FLUSH_BASE 0xdf000000 /* ROM @@@ ?*/ + + +/* + * LCD display definitions. + * + * LCD_X_SIZE and LCD_Y_SIZE depend on the machine architecture. + */ + +#define LCD_BASE 0xc0000000 +#define LCD_MEM_SIZE (LCD_X_SIZE*LCD_Y_SIZE/2) + +/* + * Register definitions + */ + +#include + +/* + * Allow access to IO registers as if they were normal variables + */ + +#define __IOB(x) (*(volatile unsigned char *) (IO_BASE+(x))) +#define __IOL(x) (*(volatile unsigned long *) (IO_BASE+(x))) + +#define IO_PADR __IOB(PADR) +#define IO_PBDR __IOB(PBDR) +#define IO_PCDR __IOB(PCDR) +#define IO_PDDR __IOB(PDDR) +#define IO_PADDR __IOB(PADDR) +#define IO_PBDDR __IOB(PBDDR) +#define IO_PCDDR __IOB(PCDDR) +#define IO_PDDDR __IOB(PDDDR) +#define IO_PEDR __IOB(PEDR) +#define IO_PEDDR __IOB(PEDDR) +#define IO_SYSCON __IOL(SYSCON) +#define IO_SYSFLG __IOL(SYSFLG) +#define IO_MEMCFG1 __IOL(MEMCFG1) +#define IO_MEMCFG2 __IOL(MEMCFG2) +/* DRFPR */ +#define IO_INTSR __IOL(INTSR) +#define IO_INTMR __IOL(INTMR) +#define IO_INTMR2 __IOL(INTMR2) +#define IO_INTMR3 __IOL(INTMR3) +#define IO_LCDCON __IOL(LCDCON) +#define IO_TC1D __IOL(TC1D) +#define IO_TC2D __IOL(TC2D) +#define IO_RTCDR __IOL(RTCDR) +#define IO_RTCMR __IOL(RTCMR) +/* PMPCON */ +#define IO_CODR __IOB(CODR) +#define IO_UARTDR __IOL(UARTDR) +#define IO_UBRLCR __IOL(UBRLCR) +#define IO_SYNCIO __IOL(SYNCIO) +#define IO_PALLSW __IOL(PALLSW) +#define IO_PALMSW __IOL(PALMSW) +#define IO_STFCLR __IOL(STFCLR) +#define IO_BLEOI __IOL(BLEOI) +#define IO_MCEOI __IOL(MCEOI) +#define IO_TEOI __IOL(TEOI) +#define IO_TC1EOI __IOL(TC1EOI) +#define IO_TC2EOI __IOL(TC2EOI) +#define IO_RTCEOI __IOL(RTCEOI) +#define IO_UMSEOI __IOL(UMSEOI) +#define IO_COEOI __IOL(COEOI) +#define IO_HALT __IOL(HALT) +#define IO_STDBY __IOL(STDBY) + +#define IO_DAICONTROL __IOL(DAICONTROL) +#define IO_DAIDATA0 __IOL(DAIDATA0) +#define IO_DAIDATA1 __IOL(DAIDATA1) +#define IO_DAIDATA2 __IOL(DAIDATA2) +#define IO_DAISTATUS __IOL(DAISTATUS) +#define IO_SYSCON3 __IOL(SYSCON3) +#define IO_INTMASK3 __IOL(INTMASK3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/hw_eb7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/hw_eb7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/hw_eb7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/hw_eb7212.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * linux/include/asm-arm/arch-clps7212/hw_eb7212.h + * + * (c)2000 empeg ltd + * Based on arch-ep7110/hw_psion.h by Werner Almesberger 1998,1999 + * + * Hardware definitions for the Cirrus EP7212 evaluation board + */ + +#ifndef __ASM_ARCH_HW_EB7212_H +#define __ASM_ARCH_HW_EB7212_H + +/* + * We pretend we have a "PCMCIA" area. In actual fact, this is where the memory + * mapped IO sits (ethernet, parallel, etc) + */ + +#define PCMCIA_START 0x50000000 + +/* + * LCD display size + */ + +#define LCD_X_SIZE 640 +#define LCD_Y_SIZE 240 + +/* + * Register/port usage + */ + +/* + * Port B + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * |VPCEN|OPEN |VLDD3|VLDD2|VLDD1|VLDD0|EECLK|EECS | + * | out |in/ou|in/ou|in/ou|in/ou|in/ou| out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_VLD_PORT IO_PBDR /* Contrast control */ +#define HW_VLD_DIR IO_PBDDR +#define HW_VLD_MASK 0x3c +#define HW_VLD_SHIFT 2 +#define HW_OPEN_PORT IO_PBDR /* Indicates that the case is open */ +#define HW_OPEN_DIR IO_PBDDR +#define HW_OPEN_BIT 0x40 +#define HW_VPCEN_PORT IO_PBDR /* Enables the power to the CF Card */ +#define HW_VPCEN_BIT 0x80 + +/* + * Port C + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * |ADICT|BBLD |IREN |ELEN |RSEN |PLED | DTR | RTS | + * | out | out | out | out | out | out | out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_RTS_PORT IO_PCDR /* RS-232 RTS */ +#define HW_RTS_BIT 0x01 +#define HW_DTR_PORT IO_PCDR /* RS-232 DTR */ +#define HW_DTR_BIT 0x02 +#define HW_PLED_PORT IO_PCDR /* Disable power LED */ +#define HW_PLED_BIT 0x04 +#define HW_RSEN_PORT IO_PCDR /* Enable RS-232 driver */ +#define HW_RSEN_BIT 0x08 +#define HW_ELEN_PORT IO_PCDR /* Enable backlight */ +#define HW_ELEN_BIT 0x10 +#define HW_IREN_PORT IO_PCDR /* Enable IR receiver */ +#define HW_IREN_BIT 0x20 +#define HW_BBLD_PORT IO_PCDR /* Apply load to backup battery */ +#define HW_BBLD_BIT 0x40 +#define HW_ADICT_PORT IO_PCDR /* Set audio circuit to "dictaphone" */ +#define HW_ADICT_BIT 0x80 + +/* + * Port D + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * | X2 | VLL |TRIX2|SLED |DORSW| DON |AMPEN|CDEN | + * |in/ou| out | n/a | out | out | out | out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_CDEN_PORT IO_PDDR /* CODEC enable */ +#define HW_CDEN_BIT 0x01 +#define HW_AMPEN_PORT IO_PDDR /* Audio Amplifier Enable */ +#define HW_AMPEN_BIT 0x02 +#define HW_DON_PORT IO_PDDR /* Display On */ +#define HW_DON_BIT 0x04 +#define HW_SLED_PORT IO_PDDR /* Turns Status LED ON */ +#define HW_SLED_BIT 0x10 +#define HW_VLL_PORT IO_PDDR /* LCD Logic Rail */ +#define HW_VLL_BIT 0x40 +#define HW_X2_PORT IO_PDDR /* Pen Down Detect Line */ +#define HW_X2_DIR IO_PDDDR +#define HW_X2_BIT 0x80 + +/* + * Port E + * + * +--3--+--2--+--1--+--0--+ + * |Y1EN |X1EN |Y2EN |X2EN | + * | out | out | out | out | + * +-----+-----+-----+-----+ + */ + +#define HW_X2EN_PORT IO_PEDR /* Digitiser X2 Drive */ +#define HW_X2EN_BIT 0x01 +#define HW_Y2EN_PORT IO_PEDR /* Digitiser Y2 Drive */ +#define HW_Y2EN_BIT 0x02 +#define HW_X1EN_PORT IO_PEDR /* Digitiser X1 Drive */ +#define HW_X1EN_BIT 0x04 +#define HW_Y1EN_PORT IO_PEDR /* Digitiser Y1 Drive */ +#define HW_Y1EN_BIT 0x08 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/hw_mercury.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/hw_mercury.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/hw_mercury.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/hw_mercury.h 2000-05-07 17:16:34.000000000 +0100 @@ -0,0 +1,136 @@ +/* + * linux/include/asm-arm/arch-clps7212/hw_mercury.h + * + * (c)2000 empeg ltd + * Based on arch-ep7110/hw_psion.h by Werner Almesberger 1998,1999 + * + * Hardware definitions for the Diamond Mercury + */ + +#ifndef __ASM_ARCH_HW_EB7212_H +#define __ASM_ARCH_HW_EB7212_H + +/* Mappings of hardware */ + +/* Crystal 8900A ethernet controller */ +#define ETH_START 0x20000000 +#define ETH_BASE 0xf0000000 +#define ETH_SIZE (1024*1024) + +/* Broadcom CBM4210 pna2.0 controller */ +#define PNA_START 0x30000000 +#define PNA_BASE 0xf0100000 +#define PNA_SIZE (1024*1024) + +/* Flash/PROM */ +#define FLASH_START 0x00000000 +#define FLASH_BASE 0xf0200000 +#define FLASH_SIZE (1024*1024) + +/* + * LCD display size + */ + +#define LCD_X_SIZE 640 +#define LCD_Y_SIZE 240 + +/* + * Register/port usage + */ + +/* + * Port A + * bits 0-3 - keyboard scanline inputs + * bits 4-5 - rotary control inputs (EOR of these taken to DSR line too) + * bit 6 - unused + * bit 7 - fault input from amp board + */ + +/* + * Port B + * bit 0 - PCM1716 latch + * bit 1 - PCM1716 clock + * bit 2 - PCM1716 data + * bit 3 - mute control + * bit 4 - LM1972 data + * bit 5 - LM1972 load + * bit 6 - LM1972 clock + * bit 7 - unused + */ + +#define PORTB_1716LATCH (1<<0) +#define PORTB_1716CLOCK (1<<1) +#define PORTB_1716DATA (1<<2) +#define PORTB_MUTE (1<<3) +#define PORTB_1972DATA (1<<4) +#define PORTB_1972LOAD (1<<5) +#define PORTB_1972CLOCK (1<<6) + +/* + * Port D + * bits 0-7 are LCD databus + */ + +/* + * Port E + * bit 0 - LCD data latch ('E' on LCD 6800 bus) + * bit 1 - LCD address (A0 on LCD 6800 bus) + * bit 2 - LCD backlight PSU enable + */ + +/* Mercury specific declarations */ + +/* + * Input + */ +#define MERCURY_INPUT_MAJOR (242) +#define MERCURY_IRQ_INPUT 14 /* Modem status interrupt */ +#define MERCURY_IRQ_ROTARYTIMER 8 /* Timer interrupt */ +#define EMPEG_IR_MAGIC 'i' + +/* Set/get the remote control type */ +#define EMPEG_IR_WRITE_TYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define EMPEG_IR_READ_TYPE _IOR(EMPEG_IR_MAGIC, 2, int) + +/* Set/get the delay before repeats are honoured (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define EMPEG_IR_READ_RPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) + +/* Set/get the interval between repeats (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define EMPEG_IR_READ_RPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) + +/* Set/get the timeout for a repeat occuring. If a repeat code happens + * after this amount of time without one then it will be ignored. */ +#define EMPEG_IR_WRITE_RPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define EMPEG_IR_READ_RPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +#define IR_TYPE_COUNT 1 + +#define IR_TYPE_CAPTURE 0 +#define IR_TYPE_KENWOOD 1 + +/* + * Display + */ +#define EMPEG_DISPLAY_MAJOR (244) + +/* Empeg Display ioctl values */ +#define EMPEG_DISPLAY_MAGIC 'd' + +#define EMPEG_DISPLAY_REFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define EMPEG_DISPLAY_POWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define EMPEG_DISPLAY_ENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define EMPEG_DISPLAY_POPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define EMPEG_DISPLAY_FLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) +#define EMPEG_DISPLAY_QUERYQUEUEFREE _IOR(EMPEG_DISPLAY_MAGIC, 9, int) + +#ifndef __ASSEMBLY__ +#ifdef __KERNEL__ +extern void audio_emitted_action(void); +#endif +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/ide.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/ide.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/io.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/io.h 2000-03-22 12:29:59.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * linux/include/asm-arm/arch-clps7110/io.h + * + * Written 1998,1999 by Werner Almesberger + * Strongly inspired by the other asm-atm/arch-*?/io.h files + */ + +#ifndef __ASM_ARCH_IO_H +#define __ASM_ARCH_IO_H + +/* No delayed IO required */ + +#undef ARCH_IO_DELAY + +/* + * Use outb/outl/inb/etc. for PC-style hardware. In our case, that's + * everything in the CF/PCMCIA slot. + */ + +#if 1 +#define __inb(p) (*(volatile uint8_t *) PCMCIA_IO8(p)) +#define __outb(v,p) (*(volatile uint8_t *) PCMCIA_IO8(p) = (v)) +#define __inw(p) (*(volatile uint16_t *) PCMCIA_IO16(p)) +#define __outw(v,p) (*(volatile uint16_t *) PCMCIA_IO16(p) = (v)) +#else +#define __inb(p) ({ uint8_t v; \ + v = *(volatile uint8_t *) PCMCIA_IO8(p); \ + printk("inb(0x%x) = 0x%02x\n",p,v); v;}) +#define __outb(v,p) ({ uint8_t _v = (v); \ + printk("outb(0x%x) := 0x%02x\n",p,_v); \ + *(volatile uint8_t *) PCMCIA_IO8(p) = _v;}) +#define __inw(p) ({ uint16_t v; \ + v = *(volatile uint32_t *) PCMCIA_IO16(p) & 0xffff; \ + if (p != 0x1f0) \ + /*printk("inw(0x%x) = 0x%04x\n",p,v)*/; v;}) +#define __outw(v,p) ({ uint16_t _v = (v); \ + printk("outw(0x%x) := 0x%04x\n",p,_v); \ + *(volatile uint32_t *) PCMCIA_IO16(p) = _v;}) +#endif +#define __inl(p) ({ panic("__inl"); }) +#define __outl(v,p) panic("__outl") + +#if 0 +#define DECLARE_DYN_OUT(fnsuffix,instr) \ + extern __inline__ void __out##fnsuffix(unsigned int value,unsigned int port) \ + { \ + __asm__ __volatile__( \ + "str" ##instr## " %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); \ + } + + +#define DECLARE_DYN_IN(sz,fnsuffix,instr) \ + extern __inline__ unsigned sz __in##fnsuffix(unsigned int port) \ + { \ + unsigned long value; \ + __asm__ __volatile__( \ + "ldr" ##instr## " %0,[%1,%2]" \ + : "=&r" (value) : "r" (IO_BASE), "Jr" (port)); \ + return (unsigned sz) value; \ + } + + +extern __inline__ unsigned int __ioaddr(unsigned int port) +{ + return (unsigned int) (IO_BASE + port); +} + + +#define DECLARE_IO(sz,fnsuffix,instr) \ + DECLARE_DYN_OUT(fnsuffix,instr) \ + DECLARE_DYN_IN(sz,fnsuffix,instr) + +DECLARE_IO(char,b,"b") +/* The ARM710 doesn't support strh/ldrh */ +DECLARE_IO(long,l,"") + +#undef DECLARE_IO +#undef DECLARE_DYN_OUT +#undef DECLARE_DYN_IN + +/* Constant-address functions */ + +#define __outbc(value,port) \ + ({ __asm__ __volatile__( \ + "strb %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); }) + +#define __inbc(port) \ + ({ unsigned char result; \ + __asm__ __volatile__( \ + "ldrb %0,[%1,%2]" \ + : "=r" (result) : "r" (IO_BASE), "Jr" (port)); \ + result; }) + +#define __outlc(value,port) \ + ({ __asm__ __volatile__( \ + "str %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); }) + +#define __inlc(port) \ + ({ unsigned long result; \ + __asm__ __volatile__( \ + "ldr %0,[%1,%2]" \ + : "=r" (result) : "r" (IO_BASE), "Jr" (port)); \ + result; }) + +#define __ioaddrc(port) ((unsigned long) (IO_BASE+port) + +/* Translated IO: address is already virtual address */ + +#define outb_t(v,p) (*(volatile unsigned char *) (p) = (v)) +#define inb_t(v,p) (*(volatile unsigned char *) (p)) +#define outl_t(v,p) (*(volatile unsigned long *) (p) = (v)) +#define inl_t(v,p) (*(volatile unsigned long *)) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/irq.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/irq.h 2007-07-10 12:31:24.000000000 +0100 @@ -0,0 +1,53 @@ +/* + * include/asm-arm/arch-clps7212/irq.h + * + * Written 1998,1999 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_IRQ_H +#define _ASM_ARCH_IRQ_H + +#include +#include +#include + + +#define fixup_irq(x) (x) + +static void clps7212_mask_irq(unsigned int irq) +{ +#ifdef DEBUG_IRQ + printk ("masking IRQ:%d\n",irq); +#endif + IO_INTMR &= ~(1 << irq); +} + + +static void clps7212_unmask_irq(unsigned int irq) +{ +#ifdef DEBUG_IRQ + printk("unmasking IRQ:%d\n" ,irq); +#endif + IO_INTMR |= 1 << irq; +} + +static __inline__ void irq_init_irq(void) +{ + int i; + +#ifdef DEBUG_IRQ + printk("Disabling all ints..\n"); +#endif + IO_INTMR = 0; /* disable all interrupts */ + IO_INTMR2 = 0; + IO_INTMR3 = 0; + for (i = 0; i < NR_IRQS; i++) { + irq_desc[i].valid = 1; + irq_desc[i].probe_ok = 1; + irq_desc[i].mask_ack = clps7212_mask_irq; + irq_desc[i].mask = clps7212_mask_irq; + irq_desc[i].unmask = clps7212_unmask_irq; + } +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/irqs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/irqs.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/irqs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/irqs.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * linux/include/asm-arm/arch-clps7212/irqs.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_IRQS_H +#define _ASM_ARCH_IRQS_H + +/* + * For descriptions, see hardware.h + */ + +#define NR_IRQS 16 + +#define IRQ_EXTFIQ 0 +#define IRQ_BLINT 1 +#define IRQ_WEINT 2 +#define IRQ_MCINT 3 +#define IRQ_CSINT 4 +#define IRQ_EINT1 5 +#define IRQ_EINT2 6 +#define IRQ_EINT3 7 +#define IRQ_TC1OI 8 +#define IRQ_TC2OI 9 +#define IRQ_RTCMI 10 +#define IRQ_TINT 11 +#define IRQ_UTXINT 12 +#define IRQ_URXINT 13 +#define IRQ_UMSINT 14 +#define IRQ_SSEOTI 15 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/memory.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/memory.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/memory.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/memory.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * linux/include/asm-arm/arch-clps7212/mmu.h + * + * Written 1998,1999 by Werner Almesberger + * + * General memory mapping definitions plus special functions to help managing + * physically fragmented memory. + */ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + + +/* + * Task size: 3GB + */ +#define TASK_SIZE (0xc0000000UL) + +/* + * Page offset: 3GB + */ +#define PAGE_OFFSET (0xc0000000UL) + + +#include + +#define FRAG_LIST_START 0xc0000400 /* @@@ fix this later */ +#define frag_list ((struct frag_list_entry *) FRAG_LIST_START) + + +#ifndef __ASSEMBLY__ + +struct frag_list_entry { + unsigned long start; /* physical start address */ + unsigned long size; /* size (in bytes) */ +}; + +#endif + +#ifndef __ASSEMBLY__ + +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) __phys_to_virt(x) + +#ifndef KMEM_IS_VIRTUAL + +#define __virt_to_phys__is_a_macro +#define __virt_to_phys(vpage) vpage +#define __phys_to_virt__is_a_macro +#define __phys_to_virt(ppage) ppage + +#else /* KMEM_IS_VIRTUAL */ + +extern unsigned long __virt_to_phys(unsigned long vpage); +extern unsigned long __phys_to_virt(unsigned long ppage); + +#endif /* KMEM_IS_VIRTUAL */ + +#endif /* __ASSEMBLY__ */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/mmu_clps7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/mmu_clps7212.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/mmu_clps7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/mmu_clps7212.h 2000-03-14 18:16:59.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * linux/include/asm-arm/arch-clps7212/mmu_clps7212.h + * + * Written 1998,1999 by Werner Almesberger + */ + +/* Included by mmu.h */ + + +#ifndef __ASM_ARCH_MMU_CLPS7212_H +#define __ASM_ARCH_MMU_CLPS7212_H + +#define VCONT_TABLE_START 0x00010000 /* offset of page tables + (from RAM base) */ +#define VCONT_TABLES 64 /* map up to 64 MB */ + + +#ifndef __ASSEMBLY__ + +void setup_frag_p2v_lookup_table(void); +void setup_frag_v2p_lookup_table(void); + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/param.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/param.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,17 @@ +/* + * linux/include/asm-arm/arch-clps7110/param.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_PARAM_H +#define _ASM_ARCH_PARAM_H + +/* + * Considering asm-arm/arch-*?/param.h, we don't seem to have much of a + * choice ;-) + */ + +#define HZ 100 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/pm.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/pm.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/pm.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/pm.h 2000-07-05 18:43:34.000000000 +0100 @@ -0,0 +1,3 @@ +/* This file intentionally left blank. */ + +/* But not too blank otherwise make distclean deletes it. */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/processor.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/processor.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/shmparam.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +/* ? */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/system.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/system.h 2000-06-14 20:23:37.000000000 +0100 @@ -0,0 +1,50 @@ +/* + * linux/include/asm-arm/arch-clps7212/system.h + * + */ + +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +extern __inline__ void arch_reset(char mode) +{ + __asm__("mrs r0,cpsr\n" + "orr r0,r0,#192\n" + "msr cpsr,r0\n" /* Disable IRQs & FIQs */ + "mov r0,#0\n" + "mcr p15,0,r0,c7,c7\n" /* Flush cache */ + "mov r0,#0x30\n" + "mcr p15,0,r0,c1,c0\n" + "mov r0,r0\n" /* nop */ + "mov pc,#0\n"); /* bang */ + /* + * If we're still alive, just loop. + */ + while (1); +} + +extern __inline__ void arch_power_off(void) +{ + /* Put the CPU into standby mode */ + IO_STDBY=1; +} + +#if 0 +#define ARCH_IDLE_OK + +#define arch_start_idle() /* power-saving ? @@@ */ +#define arch_end_idle() /* power-saving ? @@@ */ +#endif + +#undef proc_idle /* ours is better than proc/system.h's */ +extern __inline__ void proc_idle(void) +{ + /* Put the CPU into idle mode */ + IO_HALT=1; + + /* 2 nops afterwards to help CPU restart quickly */ + __asm__("mov r0,r0\n" + "mov r0,r0\n"); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/time.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/time.h 2007-07-10 12:31:29.000000000 +0100 @@ -0,0 +1,74 @@ +/* + * linux/include/asm-arm/arch-clps7212/time.h + * + * Written 1998,1999 by Werner Almesberger + * + */ + +#ifndef _ASM_ARCH_TIME_H +#define _ASM_ARCH_TIME_H + +#include + + +extern __inline__ unsigned long gettimeoffset(void) +{ + int offsetinticks; + + /* We are called with IRQs disabled: get current timer offset */ + offsetinticks=(LATCH-(IO_TC2D&0xffff)); + + /* Has a timer irq (counter rollover) happened since disabling IRQs? */ + if (IO_INTSR&TC2OI) offsetinticks+=LATCH; + + return (offsetinticks*tick)/LATCH; +} + + +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned long flags; + + /* We do this whole routine with IRQs disabled. If we're interrupted, + and the interrupt does a gettimeoffset, the clearing of the TC2 + interrupt and the incrementing of the lostticks count have to be + atomic! */ + save_flags_cli(flags); + do_timer(regs); + IO_TC2EOI = 0; /* reset timer interrupt */ + restore_flags(flags); +} + + +/* + * Writing back the time to RTC isn't supported yet. + */ + + +#define update_rtc() + + +/* + * Set up timer interrupt, and return the current time in seconds. + */ + +static struct irqaction timerirq = { + timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + + +extern __inline__ void setup_timer(void) +{ + /* Timer 2: 512 kHz, Pre-scale mode */ + IO_SYSCON |= TC2M | TC2S; + IO_TC2D = LATCH; + IO_TC2EOI = 0; + setup_arm_irq(IRQ_TC2OI, &timerirq); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/timex.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/timex.h 2000-03-23 12:03:42.000000000 +0000 @@ -0,0 +1,12 @@ +/* + * linux/include/asm-arm/arch-clps7212/timex.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_TIMEX_H +#define _ASM_ARCH_TIMEX_H + +#define CLOCK_TICK_RATE 512000 /* 512 KHz */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/arch-clps7212/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-clps7212/uncompress.h 2000-03-28 19:23:33.000000000 +0100 @@ -0,0 +1,34 @@ +/* + * linux/include/asm-arm/arch-clps7110/uncompress.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef __ASM_ARCH_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +static volatile unsigned char *uart=(volatile unsigned char*)0xd0000480; +static volatile unsigned int *sysflg=(volatile unsigned int*)0xd0000140; + +static void puts(const char *s) +{ + + do { + /* Write char at time */ + while((*sysflg)&(1<<23)); + if ((*uart=*s)==10) { + while((*sysflg)&(1<<23)); + *uart=13; + } + } while(*++s); + while((*sysflg)&(1<<11)); +} + +/* + * No (de)compression yet + */ + +#define arch_decomp_setup() +#define arch_decomp_wdog() + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/a.out.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,16 @@ +/* + * linux/include/asm-arm/arch-ebsa110/a.out.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_ARCH_A_OUT_H +#define __ASM_ARCH_A_OUT_H + +#include + +#define STACK_TOP \ + ((current->personality == PER_LINUX_32BIT) ? \ + TASK_SIZE : 0x04000000) + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/dma.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/dma.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,20 @@ +/* + * linux/include/asm-arm/arch-ebsa110/dma.h + * + * Architecture DMA routes + * + * Copyright (C) 1997.1998 Russell King + */ +#ifndef __ASM_ARCH_DMA_H +#define __ASM_ARCH_DMA_H + +/* + * This is the maximum DMA address that can be DMAd to. + * There should not be more than (0xd0000000 - 0xc0000000) + * bytes of RAM. + */ +#define MAX_DMA_ADDRESS 0xd0000000 +#define MAX_DMA_CHANNELS 8 + +#endif /* _ASM_ARCH_DMA_H */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/hardware.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * linux/include/asm-arm/arch-ebsa110/hardware.h + * + * Copyright (C) 1996-1999 Russell King. + * + * This file contains the hardware definitions of the EBSA-110. + */ +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#ifndef __ASSEMBLER__ + +/* + * IO definitions + */ +#define PIT_CTRL ((volatile unsigned char *)0xf200000d) +#define PIT_T2 ((volatile unsigned char *)0xf2000009) +#define PIT_T1 ((volatile unsigned char *)0xf2000005) +#define PIT_T0 ((volatile unsigned char *)0xf2000001) + +/* + * Mapping areas + */ +#define IO_BASE 0xe0000000 + +/* + * RAM definitions + */ +#define FLUSH_BASE_PHYS 0x40000000 + +#else + +#define IO_BASE 0 + +#endif + +#define IO_SIZE 0x20000000 +#define IO_START 0xe0000000 + +#define FLUSH_BASE 0xdf000000 +#define PCIO_BASE 0xf0000000 + +#define PARAMS_BASE (PAGE_OFFSET + 0x400) + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/ide.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/ide.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1 @@ +/* no ide */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/io.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/io.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * linux/include/asm-arm/arch-ebsa110/io.h + * + * Copyright (C) 1997,1998 Russell King + * + * Modifications: + * 06-Dec-1997 RMK Created. + */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +/* + * This architecture does not require any delayed IO, and + * has the constant-optimised IO + */ +#undef ARCH_IO_DELAY + +/* + * Note that the translation here is weird - + * the ISA mem space and some peripherals (ethernet and VG468) + * appear as a 16-bit memory on a 32-bit bus. This means that + * byte lanes 2 and 3 are not used, and this translation must + * be used. + */ +#define __isa_addr(x) (((x) & 1) | (((x) & 0xfffffffe)) << 1) + +#define __isa_io_addr(p) (PCIO_BASE + ((p) << 2)) + +#define __inb(p) (*(volatile unsigned char *)__isa_io_addr(p)) +#define __inl(p) (panic("__inl(%X) called", p),0) + +extern __inline__ unsigned int __inw(unsigned int port) +{ + unsigned int value; + __asm__ __volatile__( + "ldr%?h %0, [%1] @ inw" + : "=r" (value) + : "r" (__isa_io_addr(port))); + return value; +} + +#define __outb(v,p) (*(volatile unsigned char *)__isa_io_addr(p) = v) +#define __outl(v,p) panic("__outl(%X,%X) called", v, p) + +extern __inline__ unsigned int __outw(unsigned int value, unsigned int port) +{ + __asm__ __volatile__( + "str%?h %0, [%1] @ outw" + : : "r" (value), "r" (__isa_io_addr(port))); +} + +#define __ioaddr(p) __isa_io_addr(p) + +/* + * ioremap support - basic support only + */ +#define ioremap(addr,size) ((void *)(addr)) +#define iounmap(addr) + +#define __isa_mem_addr(x) ((void *)(0xe0000000 + __isa_addr((unsigned long)(x)))) + +#define readb(addr) (*(volatile unsigned char *)__isa_mem_addr(addr)) +#define readw(addr) (*(volatile unsigned short *)__isa_mem_addr(addr)) +#define readl(addr) (*(volatile unsigned long *)__isa_mem_addr(addr)) + +#define writeb(b,addr) (*(volatile unsigned char *)__isa_mem_addr(addr) = (b)) +#define writew(b,addr) (*(volatile unsigned short *)__isa_mem_addr(addr) = (b)) +#define writel(b,addr) (*(volatile unsigned long *)__isa_mem_addr(addr) = (b)) + +#define memset_io(a,b,c) __ebsa110_set_isamem(__isa_mem_addr(a),(b),(c)) +#define memcpy_fromio(a,b,c) __ebsa110_copy_fromisamem((a),__isa_mem_addr(b),(c)) +#define memcpy_toio(a,b,c) __ebsa110_copy_toisamem(__isa_mem_addr(a),(b),(c)) + + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/irq.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/irq.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,52 @@ +/* + * include/asm-arm/arch-ebsa110/irq.h + * + * Copyright (C) 1996-1998 Russell King + * + * Changelog: + * 22-08-1998 RMK Restructured IRQ routines + */ + +#define IRQ_MCLR ((volatile unsigned char *)0xf3000000) +#define IRQ_MSET ((volatile unsigned char *)0xf2c00000) +#define IRQ_MASK ((volatile unsigned char *)0xf2c00000) + +#define fixup_irq(x) (x) + +static void ebsa110_mask_and_ack_irq(unsigned int irq) +{ + *IRQ_MCLR = 1 << irq; +} + +static void ebsa110_mask_irq(unsigned int irq) +{ + *IRQ_MCLR = 1 << irq; +} + +static void ebsa110_unmask_irq(unsigned int irq) +{ + *IRQ_MSET = 1 << irq; +} + +static __inline__ void irq_init_irq(void) +{ + unsigned long flags; + int irq; + + save_flags_cli (flags); + *IRQ_MCLR = 0xff; + *IRQ_MSET = 0x55; + *IRQ_MSET = 0x00; + if (*IRQ_MASK != 0x55) + while (1); + *IRQ_MCLR = 0xff; /* clear all interrupt enables */ + restore_flags (flags); + + for (irq = 0; irq < NR_IRQS; irq++) { + irq_desc[irq].valid = 1; + irq_desc[irq].probe_ok = 1; + irq_desc[irq].mask_ack = ebsa110_mask_and_ack_irq; + irq_desc[irq].mask = ebsa110_mask_irq; + irq_desc[irq].unmask = ebsa110_unmask_irq; + } +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/irqs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/irqs.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/irqs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/irqs.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,16 @@ +/* + * linux/include/asm-arm/arch-ebsa110/irqs.h + * + * Copyright (C) 1996 Russell King + */ + +#define NR_IRQS 8 + +#define IRQ_EBSA110_PRINTER 0 +#define IRQ_EBSA110_COM1 1 +#define IRQ_EBSA110_COM2 2 +#define IRQ_EBSA110_ETHERNET 3 +#define IRQ_EBSA110_TIMER0 4 +#define IRQ_EBSA110_TIMER1 5 +#define IRQ_EBSA110_PCMCIA 6 +#define IRQ_EBSA110_IMMEDIATE 7 diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/memory.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/memory.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/memory.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/memory.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * linux/include/asm-arm/arch-ebsa110/memory.h + * + * Copyright (c) 1996-1999 Russell King. + * + * Changelog: + * 20-Oct-1996 RMK Created + * 31-Dec-1997 RMK Fixed definitions to reduce warnings + * 21-Mar-1999 RMK Renamed to memory.h + * RMK Moved TASK_SIZE and PAGE_OFFSET here + */ +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +/* + * Task size: 3GB + */ +#define TASK_SIZE (0xc0000000UL) + +/* + * Page offset: 3GB + */ +#define PAGE_OFFSET (0xc0000000UL) + +#define __virt_to_phys__is_a_macro +#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET) +#define __phys_to_virt__is_a_macro +#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET) + +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) __phys_to_virt(x) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/param.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/param.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-ebsa110/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/processor.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/processor.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,28 @@ +/* + * linux/include/asm-arm/arch-ebsa110/processor.h + * + * Copyright (C) 1996-1999 Russell King + * + * Changelog: + * 21-Mar-1999 RMK Added asm/arch/memory.h + */ + +#ifndef __ASM_ARCH_PROCESSOR_H +#define __ASM_ARCH_PROCESSOR_H + +#include + +/* + * Bus types + */ +#define EISA_bus 0 +#define EISA_bus__is_a_macro /* for versions in ksyms.c */ +#define MCA_bus 0 +#define MCA_bus__is_a_macro /* for versions in ksyms.c */ + +/* This decides where the kernel will search for a free chunk of vm + * space during mmap's. + */ +#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/serial.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/serial.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/serial.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/serial.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * linux/include/asm-arm/arch-ebsa110/serial.h + * + * Copyright (c) 1996,1997,1998 Russell King. + * + * Changelog: + * 15-10-1996 RMK Created + */ +#ifndef __ASM_ARCH_SERIAL_H +#define __ASM_ARCH_SERIAL_H + +/* + * This assumes you have a 1.8432 MHz clock for your UART. + * + * It'd be nice if someone built a serial card with a 24.576 MHz + * clock, since the 16550A is capable of handling a top speed of 1.5 + * megabits/second; but this requires the faster clock. + */ +#define BASE_BAUD (1843200 / 16) + +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + + /* UART CLK PORT IRQ FLAGS */ +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0x3F8, 1, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, 2, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS3 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS4 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS5 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS6 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS7 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS8 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS9 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS10 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS11 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */ + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/shmparam.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,5 @@ +/* + * linux/include/asm-arm/arch-ebsa110/shmparam.h + * + * Copyright (c) 1996 Russell King. + */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/system.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/system.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,18 @@ +/* + * linux/include/asm-arm/arch-ebsa110/system.h + * + * Copyright (c) 1996-1998 Russell King. + */ +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +extern __inline__ void arch_reset(char mode) +{ + /* + * loop endlessly + */ + cli(); + while(1); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/time.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/time.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,107 @@ +/* + * linux/include/asm-arm/arch-ebsa110/time.h + * + * Copyright (c) 1996,1997,1998 Russell King. + * + * No real time clock on the evalulation board! + * + * Changelog: + * 10-Oct-1996 RMK Created + * 04-Dec-1997 RMK Updated for new arch/arm/kernel/time.c + * 07-Aug-1998 RMK Updated for arch/arm/kernel/leds.c + * 28-Dec-1998 APH Made leds code optional + */ + +#include +#include + +#define IRQ_TIMER IRQ_EBSA110_TIMER0 + +#define MCLK_47_8 + +#if defined(MCLK_42_3) +#define PIT1_COUNT 0xecbe +#elif defined(MCLK_47_8) +/* + * This should be 0x10B43, but that doesn't exactly fit. + * We run the timer interrupt at 5ms, and then divide it by + * two in software... This is so that the user processes + * see exactly the same model whichever ARM processor they're + * running on. + */ +#define PIT1_COUNT 0x85A1 +#define DIVISOR 2 +#endif + +extern __inline__ unsigned long gettimeoffset (void) +{ + return 0; +} + +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + *PIT_T1 = (PIT1_COUNT) & 0xff; + *PIT_T1 = (PIT1_COUNT) >> 8; + +#ifdef CONFIG_LEDS + { + static int count = 50; + if (--count == 0) { + count = 50; + leds_event(led_timer); + } + } +#endif + + { +#ifdef DIVISOR + static unsigned int divisor; + + if (divisor-- == 0) { + divisor = DIVISOR - 1; +#else + { +#endif + do_timer(regs); + } + } + + if (!user_mode(regs)) + do_profile(instruction_pointer(regs)); +} + +static struct irqaction timerirq = { + timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + +/* + * Set up timer interrupt, and return the current time in seconds. + */ +extern __inline__ void setup_timer(void) +{ + /* + * Timer 1, mode 0, 16-bit, autoreload + */ + *PIT_CTRL = 0x70; + + /* + * Refresh counter clocked at 47.8MHz/7 = 146.4ns + * We want centi-second interrupts + */ + *PIT_T1 = (PIT1_COUNT) & 0xff; + *PIT_T1 = (PIT1_COUNT) >> 8; + + /* + * Default the date to 1 Jan 1970 0:0:0 + * You will have to run a time daemon to set the + * clock correctly at bootup + */ + xtime.tv_sec = mktime(1970, 1, 1, 0, 0, 0); + + setup_arm_irq(IRQ_TIMER, &timerirq); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/timex.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/timex.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,15 @@ +/* + * linux/include/asm-arm/arch-ebsa110/timex.h + * + * EBSA110 architecture timex specifications + * + * Copyright (C) 1997, 1998 Russell King + */ + +/* + * On the EBSA, the clock ticks at weird rates. + * This is therefore not used to calculate the + * divisor. + */ +//#define CLOCK_TICK_RATE 2000000 + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa110/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa110/uncompress.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * linux/include/asm-arm/arch-ebsa110/uncompress.h + * + * Copyright (C) 1996,1997,1998 Russell King + */ + +/* + * This does not append a newline + */ +static void puts(const char *s) +{ + __asm__ __volatile__(" + ldrb %0, [%2], #1 + teq %0, #0 + beq 3f +1: strb %0, [%3] +2: ldrb %1, [%3, #0x14] + and %1, %1, #0x60 + teq %1, #0x60 + bne 2b + teq %0, #'\n' + moveq %0, #'\r' + beq 1b + ldrb %0, [%2], #1 + teq %0, #0 + bne 1b +3: " : : "r" (0), "r" (0), "r" (s), "r" (0xf0000be0) : "cc"); +} + +/* + * nothing to do + */ +#define arch_decomp_setup() +#define arch_decomp_wdog() diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/a.out.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,16 @@ +/* + * linux/include/asm-arm/arch-ebsa110/a.out.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_ARCH_A_OUT_H +#define __ASM_ARCH_A_OUT_H + +#include + +#define STACK_TOP \ + ((current->personality == PER_LINUX_32BIT) ? \ + TASK_SIZE : 0x04000000) + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/dma.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/dma.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,30 @@ +/* + * linux/include/asm-arm/arch-ebsa285/dma.h + * + * Architecture DMA routines + * + * Copyright (C) 1998,1999 Russell King + * Copyright (C) 1998,1999 Philip Blundell + */ +#ifndef __ASM_ARCH_DMA_H +#define __ASM_ARCH_DMA_H + +/* + * This is the maximum DMA address that can be DMAd to. + */ +#define MAX_DMA_ADDRESS 0xffffffff + +/* + * The 21285 has two internal DMA channels; we call these 8 and 9. + * On CATS hardware we have an additional eight ISA dma channels + * numbered 0..7. + */ +#define _ISA_DMA(x) (0+(x)) +#define _DC21285_DMA(x) (8+(x)) + +#define MAX_DMA_CHANNELS 10 + +#define DMA_FLOPPY _ISA_DMA(2) +#define DMA_ISA_CASCADE _ISA_DMA(4) + +#endif /* _ASM_ARCH_DMA_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/hardware.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,137 @@ +/* + * linux/include/asm-arm/arch-ebsa285/hardware.h + * + * Copyright (C) 1998-1999 Russell King. + * + * This file contains the hardware definitions of the EBSA-285. + */ +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include +#include + +#ifdef CONFIG_HOST_FOOTBRIDGE +/* Virtual Physical + * 0xfff00000 0x40000000 X-Bus + * 0xff000000 0x7c000000 PCI I/O space + * + * 0xfe000000 0x42000000 CSR + * 0xfd000000 0x78000000 Outbound write flush + * 0xfc000000 0x79000000 PCI IACK/special space + * + * 0xf9000000 0x7a000000 PCI Config type 1 + * 0xf8000000 0x7b000000 PCI Config type 0 + * + */ +#define XBUS_SIZE 0x00100000 +#define XBUS_BASE 0xfff00000 + +#define PCIO_SIZE 0x00100000 +#define PCIO_BASE 0xff000000 + +#define ARMCSR_SIZE 0x01000000 +#define ARMCSR_BASE 0xfe000000 + +#define WFLUSH_SIZE 0x01000000 +#define WFLUSH_BASE 0xfd000000 + +#define PCIIACK_SIZE 0x01000000 +#define PCIIACK_BASE 0xfc000000 + +#define PCICFG1_SIZE 0x01000000 +#define PCICFG1_BASE 0xf9000000 + +#define PCICFG0_SIZE 0x01000000 +#define PCICFG0_BASE 0xf8000000 + +#define PCIMEM_SIZE 0x18000000 +#define PCIMEM_BASE 0xe0000000 + +#define FLUSH_SIZE 0x00100000 +#define FLUSH_BASE 0xdf000000 + +#define FLASH_SIZE 0x00400000 +#define FLASH_BASE 0xd8000000 + +#elif defined(CONFIG_ARCH_CO285) + +#define PCIMEM_SIZE 0x80000000 +#define PCIMEM_BASE 0x80000000 + +#define FLASH_SIZE 0x01000000 +#define FLASH_BASE 0x7f000000 + +#define FLUSH_SIZE 0x00100000 +#define FLUSH_BASE 0x7e000000 + +#define WFLUSH_SIZE 0x01000000 +#define WFLUSH_BASE 0x7d000000 + +#define ARMCSR_SIZE 0x00100000 +#define ARMCSR_BASE 0x7cf00000 + +#define XBUS_SIZE 0x00020000 +#define XBUS_BASE 0x7cee0000 + +#define PCIO_SIZE 0x00010000 +#define PCIO_BASE 0x7ced0000 + +#else + +#error Add your add-in architecture here + +#endif + +#define XBUS_LEDS ((volatile unsigned char *)(XBUS_BASE + 0x12000)) +#define XBUS_LED_AMBER (1 << 0) +#define XBUS_LED_GREEN (1 << 1) +#define XBUS_LED_RED (1 << 2) +#define XBUS_LED_TOGGLE (1 << 8) + +#define XBUS_SWITCH ((volatile unsigned char *)(XBUS_BASE + 0x12000)) +#define XBUS_SWITCH_SWITCH ((*XBUS_SWITCH) & 15) +#define XBUS_SWITCH_J17_13 ((*XBUS_SWITCH) & (1 << 4)) +#define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5)) +#define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6)) + +#define PARAMS_OFFSET 0x0100 +#define PARAMS_BASE (PAGE_OFFSET + PARAMS_OFFSET) + +#define FLUSH_BASE_PHYS 0x50000000 + + +/* PIC irq control */ +#define PIC_LO 0x20 +#define PIC_MASK_LO 0x21 +#define PIC_HI 0xA0 +#define PIC_MASK_HI 0xA1 + +/* GPIO pins */ +#define GPIO_CCLK 0x800 +#define GPIO_DSCLK 0x400 +#define GPIO_E2CLK 0x200 +#define GPIO_IOLOAD 0x100 +#define GPIO_RED_LED 0x080 +#define GPIO_WDTIMER 0x040 +#define GPIO_DATA 0x020 +#define GPIO_IOCLK 0x010 +#define GPIO_DONE 0x008 +#define GPIO_FAN 0x004 +#define GPIO_GREEN_LED 0x002 +#define GPIO_RESET 0x001 + +/* CPLD pins */ +#define CPLD_DS_ENABLE 8 +#define CPLD_7111_DISABLE 4 +#define CPLD_UNMUTE 2 +#define CPLD_FLASH_WR_ENABLE 1 + +#ifndef __ASSEMBLY__ +extern void gpio_modify_op(int mask, int set); +extern void gpio_modify_io(int mask, int in); +extern int gpio_read(void); +extern void cpld_modify(int mask, int set); +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/ide.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/ide.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,38 @@ +/* + * linux/include/asm-arm/arch-ebsa285/ide.h + * + * Copyright (c) 1998 Russell King + * + * Modifications: + * 29-07-1998 RMK Major re-work of IDE architecture specific code + */ +#include + +/* + * Set up a hw structure for a specified data port, control port and IRQ. + * This should follow whatever the default interface uses. + */ +static __inline__ void +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +{ + ide_ioreg_t reg = (ide_ioreg_t) data_port; + int i; + + memset(hw, 0, sizeof(*hw)); + + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { + hw->io_ports[i] = reg; + reg += 1; + } + hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; + hw->irq = irq; +} + +/* + * This registers the standard ports for this architecture with the IDE + * driver. + */ +static __inline__ void +ide_init_default_hwifs(void) +{ +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/io.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/io.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,92 @@ +/* + * linux/include/asm-arm/arch-ebsa285/io.h + * + * Copyright (C) 1997,1998 Russell King + * + * Modifications: + * 06-Dec-1997 RMK Created. + */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +#include + +/* + * This architecture does not require any delayed IO, and + * has the constant-optimised IO + */ +#undef ARCH_IO_DELAY +#define ARCH_READWRITE + +#define __pci_io_addr(x) (PCIO_BASE + (unsigned int)(x)) + +#define __inb(p) (*(volatile unsigned char *)__pci_io_addr(p)) +#define __inl(p) (*(volatile unsigned long *)__pci_io_addr(p)) + +extern __inline__ unsigned int __inw(unsigned int port) +{ + unsigned int value; + __asm__ __volatile__( + "ldr%?h %0, [%1, %2] @ inw" + : "=&r" (value) + : "r" (PCIO_BASE), "r" (port)); + return value; +} + + +#define __outb(v,p) (*(volatile unsigned char *)__pci_io_addr(p) = (v)) +#define __outl(v,p) (*(volatile unsigned long *)__pci_io_addr(p) = (v)) + +extern __inline__ void __outw(unsigned int value, unsigned int port) +{ + __asm__ __volatile__( + "str%?h %0, [%1, %2] @ outw" + : : "r" (value), "r" (PCIO_BASE), "r" (port)); +} + +#define __ioaddr(p) __pci_io_addr(p) + +/* + * ioremap support - validate a PCI memory address, + * and convert a PCI memory address to a physical + * address for the page tables. + */ +#define valid_ioaddr(iomem,size) ((iomem) < 0x80000000 && (iomem) + (size) <= 0x80000000) +#define io_to_phys(iomem) ((iomem) + DC21285_PCI_MEM) + +/* + * Fudge up IO addresses by this much. Once we're confident that nobody + * is using read*() and so on with addresses they didn't get from ioremap + * this can go away. + */ +#define IO_FUDGE_FACTOR PCIMEM_BASE + +#define __pci_mem_addr(x) ((void *)(IO_FUDGE_FACTOR + (unsigned long)(x))) + +/* + * ioremap takes a PCI memory address, as specified in + * linux/Documentation/IO-mapping.txt + */ +#define ioremap(iomem_addr,size) \ +({ \ + unsigned long _addr = (iomem_addr), _size = (size); \ + void *_ret = NULL; \ + if (valid_ioaddr(_addr, _size)) { \ + _addr = io_to_phys(_addr); \ + _ret = __ioremap(_addr, _size, 0) - IO_FUDGE_FACTOR; \ + } \ + _ret; }) + +#define ioremap_nocache(iomem_addr,size) ioremap((iomem_addr),(size)) + +#define iounmap(_addr) do { __iounmap(__pci_mem_addr((_addr))); } while (0) + +#define readb(addr) (*(volatile unsigned char *)__pci_mem_addr(addr)) +#define readw(addr) (*(volatile unsigned short *)__pci_mem_addr(addr)) +#define readl(addr) (*(volatile unsigned long *)__pci_mem_addr(addr)) + +#define writeb(b,addr) (*(volatile unsigned char *)__pci_mem_addr(addr) = (b)) +#define writew(b,addr) (*(volatile unsigned short *)__pci_mem_addr(addr) = (b)) +#define writel(b,addr) (*(volatile unsigned long *)__pci_mem_addr(addr) = (b)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/irq.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/irq.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,211 @@ +/* + * include/asm-arm/arch-ebsa285/irq.h + * + * Copyright (C) 1996-1998 Russell King + * + * Changelog: + * 22-Aug-1998 RMK Restructured IRQ routines + * 03-Sep-1998 PJB Merged CATS support + * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder + * 26-Jan-1999 PJB Don't use IACK on CATS + * 16-Mar-1999 RMK Added autodetect of ISA PICs + */ +#include +#include +#include +#include + +/* + * Footbridge IRQ translation table + * Converts from our IRQ numbers into FootBridge masks + */ +static int dc21285_irq_mask[] = { + IRQ_MASK_UART_RX, /* 0 */ + IRQ_MASK_UART_TX, /* 1 */ + IRQ_MASK_TIMER1, /* 2 */ + IRQ_MASK_TIMER2, /* 3 */ + IRQ_MASK_TIMER3, /* 4 */ + IRQ_MASK_IN0, /* 5 */ + IRQ_MASK_IN1, /* 6 */ + IRQ_MASK_IN2, /* 7 */ + IRQ_MASK_IN3, /* 8 */ + IRQ_MASK_DOORBELLHOST, /* 9 */ + IRQ_MASK_DMA1, /* 10 */ + IRQ_MASK_DMA2, /* 11 */ + IRQ_MASK_PCI, /* 12 */ + IRQ_MASK_SDRAMPARITY, /* 13 */ + IRQ_MASK_I2OINPOST, /* 14 */ + IRQ_MASK_PCI_ERR /* 15 */ +}; + +static int isa_irq = -1; + +static inline int fixup_irq(unsigned int irq) +{ +#ifdef CONFIG_HOST_FOOTBRIDGE + if (irq == isa_irq) + irq = *(unsigned char *)PCIIACK_BASE; +#endif + + return irq; +} + +static void dc21285_mask_irq(unsigned int irq) +{ + *CSR_IRQ_DISABLE = dc21285_irq_mask[irq & 15]; +} + +static void dc21285_unmask_irq(unsigned int irq) +{ + *CSR_IRQ_ENABLE = dc21285_irq_mask[irq & 15]; +} + +static void isa_mask_pic_lo_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); + + outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO); +} + +static void isa_mask_ack_pic_lo_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); + + outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO); + outb(0x20, PIC_LO); +} + +static void isa_unmask_pic_lo_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); + + outb(inb(PIC_MASK_LO) & ~mask, PIC_MASK_LO); +} + +static void isa_mask_pic_hi_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); + + outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI); +} + +static void isa_mask_ack_pic_hi_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); + + outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI); + outb(0x62, PIC_LO); + outb(0x20, PIC_HI); +} + +static void isa_unmask_pic_hi_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); + + outb(inb(PIC_MASK_HI) & ~mask, PIC_MASK_HI); +} + +static void no_action(int cpl, void *dev_id, struct pt_regs *regs) +{ +} + +static struct irqaction irq_cascade = { no_action, 0, 0, "cascade", NULL, NULL }; + +static __inline__ void irq_init_irq(void) +{ + int irq; + + /* + * setup DC21285 IRQs + */ + *CSR_IRQ_DISABLE = -1; + *CSR_FIQ_DISABLE = -1; + + for (irq = _DC21285_IRQ(0); irq < _DC21285_IRQ(16); irq++) { + irq_desc[irq].valid = 1; + irq_desc[irq].probe_ok = 1; + irq_desc[irq].mask_ack = dc21285_mask_irq; + irq_desc[irq].mask = dc21285_mask_irq; + irq_desc[irq].unmask = dc21285_unmask_irq; + } + + /* + * Determine the ISA settings for + * the machine we're running on. + */ + switch (machine_arch_type) { + default: + isa_irq = -1; + break; + + case MACH_TYPE_EBSA285: + /* The following is dependent on which slot + * you plug the Southbridge card into. We + * currently assume that you plug it into + * the right-hand most slot. + */ + isa_irq = IRQ_PCI; + break; + + case MACH_TYPE_CATS: + isa_irq = IRQ_IN2; + break; + + case MACH_TYPE_NETWINDER: + isa_irq = IRQ_IN3; + break; + } + + if (isa_irq != -1) { + /* + * Setup, and then probe for an ISA PIC + * If the PIC is not there, then we + * ignore the PIC. + */ + outb(0x11, PIC_LO); + outb(_ISA_IRQ(0), PIC_MASK_LO); /* IRQ number */ + outb(0x04, PIC_MASK_LO); /* Slave on Ch2 */ + outb(0x01, PIC_MASK_LO); /* x86 */ + outb(0xf5, PIC_MASK_LO); /* pattern: 11110101 */ + + outb(0x11, PIC_HI); + outb(_ISA_IRQ(8), PIC_MASK_HI); /* IRQ number */ + outb(0x02, PIC_MASK_HI); /* Slave on Ch1 */ + outb(0x01, PIC_MASK_HI); /* x86 */ + outb(0xfa, PIC_MASK_HI); /* pattern: 11111010 */ + +// outb(0x68, PIC_LO); /* enable special mode */ +// outb(0x68, PIC_HI); /* enable special mode */ + outb(0x0b, PIC_LO); + outb(0x0b, PIC_HI); + + if (inb(PIC_MASK_LO) == 0xf5 && inb(PIC_MASK_HI) == 0xfa) { + outb(0xff, PIC_MASK_LO);/* mask all IRQs */ + outb(0xff, PIC_MASK_HI);/* mask all IRQs */ + } else + isa_irq = -1; + } + + if (isa_irq != -1) { + for (irq = _ISA_IRQ(0); irq < _ISA_IRQ(8); irq++) { + irq_desc[irq].valid = 1; + irq_desc[irq].probe_ok = 1; + irq_desc[irq].mask_ack = isa_mask_ack_pic_lo_irq; + irq_desc[irq].mask = isa_mask_pic_lo_irq; + irq_desc[irq].unmask = isa_unmask_pic_lo_irq; + } + + for (irq = _ISA_IRQ(8); irq < _ISA_IRQ(16); irq++) { + irq_desc[irq].valid = 1; + irq_desc[irq].probe_ok = 1; + irq_desc[irq].mask_ack = isa_mask_ack_pic_hi_irq; + irq_desc[irq].mask = isa_mask_pic_hi_irq; + irq_desc[irq].unmask = isa_unmask_pic_hi_irq; + } + + request_region(PIC_LO, 2, "pic1"); + request_region(PIC_HI, 2, "pic2"); + setup_arm_irq(IRQ_ISA_CASCADE, &irq_cascade); + setup_arm_irq(isa_irq, &irq_cascade); + } +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/irqs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/irqs.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/irqs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/irqs.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,87 @@ +/* + * linux/include/asm-arm/arch-ebsa285/irqs.h + * + * Copyright (C) 1998 Russell King + * Copyright (C) 1998 Phil Blundell + * + * Changelog: + * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder + * 01-Feb-1999 PJB ISA IRQs start at 0 not 16 + */ + +#define NR_IRQS 32 +#define NR_DC21285_IRQS 16 + +#define _ISA_IRQ(x) (0 + (x)) +#define _DC21285_IRQ(x) (16 + (x)) + +/* + * This is a list of all interrupts that the 21285 + * can generate and we handle. + */ +#define IRQ_CONRX _DC21285_IRQ(0) +#define IRQ_CONTX _DC21285_IRQ(1) +#define IRQ_TIMER1 _DC21285_IRQ(2) +#define IRQ_TIMER2 _DC21285_IRQ(3) +#define IRQ_TIMER3 _DC21285_IRQ(4) +#define IRQ_IN0 _DC21285_IRQ(5) +#define IRQ_IN1 _DC21285_IRQ(6) +#define IRQ_IN2 _DC21285_IRQ(7) +#define IRQ_IN3 _DC21285_IRQ(8) +#define IRQ_DOORBELLHOST _DC21285_IRQ(9) +#define IRQ_DMA1 _DC21285_IRQ(10) +#define IRQ_DMA2 _DC21285_IRQ(11) +#define IRQ_PCI _DC21285_IRQ(12) +#define IRQ_SDRAMPARITY _DC21285_IRQ(13) +#define IRQ_I2OINPOST _DC21285_IRQ(14) +#define IRQ_PCI_ERR _DC21285_IRQ(15) + +#define IRQ_ISA_TIMER _ISA_IRQ(0) +#define IRQ_ISA_KEYBOARD _ISA_IRQ(1) +#define IRQ_ISA_CASCADE _ISA_IRQ(2) +#define IRQ_ISA_UART2 _ISA_IRQ(3) +#define IRQ_ISA_UART _ISA_IRQ(4) +#define IRQ_ISA_FLOPPY _ISA_IRQ(6) +#define IRQ_ISA_PRINTER _ISA_IRQ(7) +#define IRQ_ISA_RTC_ALARM _ISA_IRQ(8) +#define IRQ_ISA_2 _ISA_IRQ(9) +#define IRQ_ISA_PS2MOUSE _ISA_IRQ(12) +#define IRQ_ISA_HARDDISK1 _ISA_IRQ(14) +#define IRQ_ISA_HARDDISK2 _ISA_IRQ(15) + +#define IRQ_MASK_UART_RX (1 << 2) +#define IRQ_MASK_UART_TX (1 << 3) +#define IRQ_MASK_TIMER1 (1 << 4) +#define IRQ_MASK_TIMER2 (1 << 5) +#define IRQ_MASK_TIMER3 (1 << 6) +#define IRQ_MASK_IN0 (1 << 8) +#define IRQ_MASK_IN1 (1 << 9) +#define IRQ_MASK_IN2 (1 << 10) +#define IRQ_MASK_IN3 (1 << 11) +#define IRQ_MASK_DOORBELLHOST (1 << 15) +#define IRQ_MASK_DMA1 (1 << 16) +#define IRQ_MASK_DMA2 (1 << 17) +#define IRQ_MASK_PCI (1 << 18) +#define IRQ_MASK_SDRAMPARITY (1 << 24) +#define IRQ_MASK_I2OINPOST (1 << 25) +#define IRQ_MASK_PCI_ERR ((1 <<23) | (1 << 27) | (1 << 28) | (1 << 29) | (1 << 30) | (1 << 31)) + +/* + * Netwinder interrupt allocations + */ +#define IRQ_NETWINDER_ETHER10 IRQ_IN0 +#define IRQ_NETWINDER_ETHER100 IRQ_IN1 +#define IRQ_NETWINDER_VIDCOMP IRQ_IN2 +#define IRQ_NETWINDER_PS2MOUSE _ISA_IRQ(5) +#define IRQ_NETWINDER_IR _ISA_IRQ(6) +#define IRQ_NETWINDER_BUTTON _ISA_IRQ(10) +#define IRQ_NETWINDER_VGA _ISA_IRQ(11) +#define IRQ_NETWINDER_SOUND _ISA_IRQ(12) + +#undef RTC_IRQ +#define RTC_IRQ IRQ_ISA_RTC_ALARM +#undef AUX_IRQ +#define AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE) +#define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY + +#define irq_cannonicalize(_i) (((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i) diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/keyboard.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/keyboard.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/keyboard.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/keyboard.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,95 @@ +/* + * linux/include/asm-arm/arch-ebsa285/keyboard.h + * + * Keyboard driver definitions for EBSA285 architecture + * + * (C) 1998 Russell King + * (C) 1998 Phil Blundell + */ +#include +#include +#include +#include + +extern int have_isa_bridge; + +extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); +extern int pckbd_getkeycode(unsigned int scancode); +extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, + char raw_mode); +extern char pckbd_unexpected_up(unsigned char keycode); +extern void pckbd_leds(unsigned char leds); +extern void pckbd_init_hw(void); +extern unsigned char pckbd_sysrq_xlate[128]; + +#define KEYBOARD_IRQ IRQ_ISA_KEYBOARD + +#define NR_SCANCODES 128 + +#define kbd_setkeycode(sc,kc) \ + ({ \ + int __ret; \ + if (have_isa_bridge) \ + __ret = pckbd_setkeycode(sc,kc);\ + else \ + __ret = -EINVAL; \ + __ret; \ + }) + +#define kbd_getkeycode(sc) \ + ({ \ + int __ret; \ + if (have_isa_bridge) \ + __ret = pckbd_getkeycode(sc); \ + else \ + __ret = -EINVAL; \ + __ret; \ + }) + +#define kbd_translate(sc, kcp, rm) \ + ({ \ + pckbd_translate(sc, kcp, rm); \ + }) + +#define kbd_unexpected_up pckbd_unexpected_up + +#define kbd_leds(leds) \ + do { \ + if (have_isa_bridge) \ + pckbd_leds(leds); \ + } while (0) + +#define kbd_init_hw() \ + do { \ + if (have_isa_bridge) \ + pckbd_init_hw(); \ + } while (0) + +#define kbd_sysrq_xlate pckbd_sysrq_xlate + +#define kbd_disable_irq() +#define kbd_enable_irq() + +#define SYSRQ_KEY 0x54 + +/* resource allocation */ +#define kbd_request_region() request_region(0x60, 16, "keyboard") +#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \ + "keyboard", NULL) + +/* How to access the keyboard macros on this platform. */ +#define kbd_read_input() inb(KBD_DATA_REG) +#define kbd_read_status() inb(KBD_STATUS_REG) +#define kbd_write_output(val) outb(val, KBD_DATA_REG) +#define kbd_write_command(val) outb(val, KBD_CNTL_REG) + +/* Some stoneage hardware needs delays after some operations. */ +#define kbd_pause() do { } while(0) + +/* + * Machine specific bits for the PS/2 driver + */ +#define aux_request_irq(hand, dev_id) \ + request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id) + +#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/memory.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/memory.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/memory.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/memory.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * linux/include/asm-arm/arch-ebsa285/memory.h + * + * Copyright (c) 1996-1999 Russell King. + * + * Changelog: + * 20-Oct-1996 RMK Created + * 31-Dec-1997 RMK Fixed definitions to reduce warnings. + * 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions. + * 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros. + * 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture. + * Renamed to memory.h + * Moved PAGE_OFFSET and TASK_SIZE here + */ +#ifndef __ASM_ARCH_MMU_H +#define __ASM_ARCH_MMU_H + +#if defined(CONFIG_HOST_FOOTBRIDGE) + +/* + * Task size: 3GB + */ +#define TASK_SIZE (0xc0000000UL) + +/* + * Page offset: 3GB + */ +#define PAGE_OFFSET (0xc0000000UL) + +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) ((x) - 0xe0000000) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) ((x) + 0xe0000000) + +#elif defined(CONFIG_ADDIN_FOOTBRIDGE) + +#if defined(CONFIG_ARCH_CO285) + +/* + * Task size: 1.5GB + */ +#define TASK_SIZE (0x60000000UL) + +/* + * Page offset: 1.5GB + */ +#define PAGE_OFFSET (0x60000000UL) + +#else + +#error Add in your architecture here + +#endif + +#ifndef __ASSEMBLY__ +extern unsigned long __virt_to_bus(unsigned long); +extern unsigned long __bus_to_virt(unsigned long); +#endif + +#endif + +/* + * On Footbridge machines, the dram is contiguous. + * On Host Footbridge, these conversions are constant. + * On an add-in footbridge, these depend on register settings. + */ +#define __virt_to_phys__is_a_macro +#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET) +#define __phys_to_virt__is_a_macro +#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/param.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/param.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-ebsa285/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/processor.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/processor.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,28 @@ +/* + * linux/include/asm-arm/arch-ebsa110/processor.h + * + * Copyright (C) 1996-1999 Russell King + * + * Changelog: + * 21-Mar-1999 RMK Added asm/arch/memory.h + */ + +#ifndef __ASM_ARCH_PROCESSOR_H +#define __ASM_ARCH_PROCESSOR_H + +#include + +/* + * Bus types + */ +#define EISA_bus 0 +#define EISA_bus__is_a_macro /* for versions in ksyms.c */ +#define MCA_bus 0 +#define MCA_bus__is_a_macro /* for versions in ksyms.c */ + +/* This decides where the kernel will search for a free chunk of vm + * space during mmap's. + */ +#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/serial.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/serial.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/serial.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/serial.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * linux/include/asm-arm/arch-ebsa285/serial.h + * + * Copyright (c) 1996,1997,1998 Russell King. + * + * Changelog: + * 15-10-1996 RMK Created + * 25-05-1998 PJB CATS support + */ +#ifndef __ASM_ARCH_SERIAL_H +#define __ASM_ARCH_SERIAL_H + +#include + +/* + * This assumes you have a 1.8432 MHz clock for your UART. + * + * It'd be nice if someone built a serial card with a 24.576 MHz + * clock, since the 16550A is capable of handling a top speed of 1.5 + * megabits/second; but this requires the faster clock. + */ +#define BASE_BAUD (1843200 / 16) + +#define _SER_IRQ0 IRQ_ISA_UART +#define _SER_IRQ1 IRQ_ISA_UART2 + +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + + /* UART CLK PORT IRQ FLAGS */ +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0x3F8, _SER_IRQ0, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, _SER_IRQ1, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS3 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS4 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS5 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS6 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS7 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS8 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS9 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS10 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS11 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS12 */ \ + { 0, BASE_BAUD, 0 , 0 , STD_COM_FLAGS }, /* ttyS13 */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/shmparam.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,5 @@ +/* + * linux/include/asm-arm/arch-ebsa110/shmparam.h + * + * Copyright (c) 1996 Russell King. + */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/system.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/system.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * linux/include/asm-arm/arch-ebsa285/system.h + * + * Copyright (c) 1996,1997,1998 Russell King. + */ +#include +#include +#include +#include + +extern __inline__ void arch_reset(char mode) +{ + cli(); + + if (mode == 's') { + __asm__ volatile ( + "mov lr, #0x41000000 @ prepare to jump to ROM + mov r0, #0x130 + mcr p15, 0, r0, c1, c0 @ MMU off + mcr p15, 0, ip, c7, c7 @ flush caches + mov pc, lr" : : : "cc"); + } else { + if (machine_is_netwinder()) { + /* open up the SuperIO chip + */ + outb(0x87, 0x370); + outb(0x87, 0x370); + + /* aux function group 1 (logical device 7) + */ + outb(0x07, 0x370); + outb(0x07, 0x371); + + /* set GP16 for WD-TIMER output + */ + outb(0xe6, 0x370); + outb(0x00, 0x371); + + /* set a RED LED and toggle WD_TIMER for rebooting + */ + outb(0xc4, 0x338); + } else { + /* To reboot, we set up the 21285 watchdog and + * enable it. We then wait for it to timeout. + */ + *CSR_TIMER4_LOAD = 0x8000; + *CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE | + TIMER_CNTL_AUTORELOAD | + TIMER_CNTL_DIV16; + *CSR_SA110_CNTL |= 1 << 13; + } + } +} + +#define arch_start_idle() leds_event(led_idle_start) +#define arch_end_idle() leds_event(led_idle_end) diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/time.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/time.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,358 @@ +/* + * linux/include/asm-arm/arch-ebsa285/time.h + * + * Copyright (c) 1998 Russell King. + * Copyright (c) 1998 Phil Blundell + * + * CATS has a real-time clock, though the evaluation board doesn't. + * + * Changelog: + * 21-Mar-1998 RMK Created + * 27-Aug-1998 PJB CATS support + * 28-Dec-1998 APH Made leds optional + * 20-Jan-1999 RMK Started merge of EBSA285, CATS and NetWinder + * 16-Mar-1999 RMK More support for EBSA285-like machines with RTCs in + */ + +#define RTC_PORT(x) (rtc_base+(x)) +#define RTC_ALWAYS_BCD 0 + +#include +#include + +#include +#include +#include + +static int rtc_base; +static unsigned long (*gettimeoffset)(void); +static int (*set_rtc_mmss)(unsigned long nowtime); +static long last_rtc_update = 0; /* last time the cmos clock got updated */ + +#ifdef CONFIG_LEDS +static void do_leds(void) +{ + static unsigned int count = 50; + static int last_pid; + + if (current->pid != last_pid) { + last_pid = current->pid; + if (last_pid) + leds_event(led_idle_end); + else + leds_event(led_idle_start); + } + + if (--count == 0) { + count = 50; + leds_event(led_timer); + } +} +#else +#define do_leds() +#endif + +#define mSEC_10_from_14 ((14318180 + 100) / 200) + +static unsigned long isa_gettimeoffset(void) +{ + int count; + + static int count_p = (mSEC_10_from_14/6); /* for the first call after boot */ + static unsigned long jiffies_p = 0; + + /* + * cache volatile jiffies temporarily; we have IRQs turned off. + */ + unsigned long jiffies_t; + + /* timer count may underflow right here */ + outb_p(0x00, 0x43); /* latch the count ASAP */ + + count = inb_p(0x40); /* read the latched count */ + + /* + * We do this guaranteed double memory access instead of a _p + * postfix in the previous port access. Wheee, hackady hack + */ + jiffies_t = jiffies; + + count |= inb_p(0x40) << 8; + + /* Detect timer underflows. If we haven't had a timer tick since + the last time we were called, and time is apparently going + backwards, the counter must have wrapped during this routine. */ + if ((jiffies_t == jiffies_p) && (count > count_p)) + count -= (mSEC_10_from_14/6); + else + jiffies_p = jiffies_t; + + count_p = count; + + count = (((mSEC_10_from_14/6)-1) - count) * tick; + count = (count + (mSEC_10_from_14/6)/2) / (mSEC_10_from_14/6); + + return count; +} + +static void isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + if (machine_is_netwinder()) + do_leds(); + + do_timer(regs); + + /* If we have an externally synchronized linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + */ + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec > 50000 - (tick >> 1) && + xtime.tv_usec < 50000 + (tick >> 1)) { + if (set_rtc_mmss(xtime.tv_sec) == 0) + last_rtc_update = xtime.tv_sec; + else + last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ + } + + if (!user_mode(regs)) + do_profile(instruction_pointer(regs)); +} + +static struct irqaction isa_timer_irq = { + isa_timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + +__initfunc(static unsigned long +get_isa_cmos_time(void)) +{ + unsigned int year, mon, day, hour, min, sec; + int i; + + // check to see if the RTC makes sense..... + if ((CMOS_READ(RTC_VALID) & RTC_VRT) == 0) + return mktime(1970, 1, 1, 0, 0, 0); + + /* The Linux interpretation of the CMOS clock register contents: + * When the Update-In-Progress (UIP) flag goes from 1 to 0, the + * RTC registers show the second which has precisely just started. + * Let's hope other operating systems interpret the RTC the same way. + */ + /* read RTC exactly on falling edge of update flag */ + for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */ + if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP) + break; + + for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms */ + if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)) + break; + + do { /* Isn't this overkill ? UIP above should guarantee consistency */ + sec = CMOS_READ(RTC_SECONDS); + min = CMOS_READ(RTC_MINUTES); + hour = CMOS_READ(RTC_HOURS); + day = CMOS_READ(RTC_DAY_OF_MONTH); + mon = CMOS_READ(RTC_MONTH); + year = CMOS_READ(RTC_YEAR); + } while (sec != CMOS_READ(RTC_SECONDS)); + + if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year); + } + if ((year += 1900) < 1970) + year += 100; + return mktime(year, mon, day, hour, min, sec); +} + +static int +set_isa_cmos_time(unsigned long nowtime) +{ + int retval = 0; + int real_seconds, real_minutes, cmos_minutes; + unsigned char save_control, save_freq_select; + + save_control = CMOS_READ(RTC_CONTROL); /* tell the clock it's being set */ + CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL); + + save_freq_select = CMOS_READ(RTC_FREQ_SELECT); /* stop and reset prescaler */ + CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); + + cmos_minutes = CMOS_READ(RTC_MINUTES); + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) + BCD_TO_BIN(cmos_minutes); + + /* + * since we're only adjusting minutes and seconds, + * don't interfere with hour overflow. This avoids + * messing with unknown time zones but requires your + * RTC not to be off by more than 15 minutes + */ + real_seconds = nowtime % 60; + real_minutes = nowtime / 60; + if (((abs(real_minutes - cmos_minutes) + 15)/30) & 1) + real_minutes += 30; /* correct for half hour time zone */ + real_minutes %= 60; + + if (abs(real_minutes - cmos_minutes) < 30) { + if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { + BIN_TO_BCD(real_seconds); + BIN_TO_BCD(real_minutes); + } + CMOS_WRITE(real_seconds,RTC_SECONDS); + CMOS_WRITE(real_minutes,RTC_MINUTES); + } else + retval = -1; + + /* The following flags have to be released exactly in this order, + * otherwise the DS12887 (popular MC146818A clone with integrated + * battery and quartz) will not reset the oscillator and will not + * update precisely 500 ms later. You won't find this mentioned in + * the Dallas Semiconductor data sheets, but who believes data + * sheets anyway ... -- Markus Kuhn + */ + CMOS_WRITE(save_control, RTC_CONTROL); + CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); + + return retval; +} + + + +static unsigned long __ebsa285_text timer1_gettimeoffset (void) +{ + unsigned long value = LATCH - *CSR_TIMER1_VALUE; + + return (tick * value) / LATCH; +} + +static void __ebsa285_text timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + *CSR_TIMER1_CLR = 0; + + /* Do the LEDs things on non-CATS hardware. + */ + if (!machine_is_cats()) + do_leds(); + + do_timer(regs); + + /* If we have an externally synchronized linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + */ + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec > 50000 - (tick >> 1) && + xtime.tv_usec < 50000 + (tick >> 1)) { + if (set_rtc_mmss(xtime.tv_sec) == 0) + last_rtc_update = xtime.tv_sec; + else + last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ + } + + if (!user_mode(regs)) + do_profile(instruction_pointer(regs)); +} + +static struct irqaction __ebsa285_data timer1_irq = { + timer1_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + +static int +set_dummy_time(unsigned long secs) +{ + return 1; +} + +/* + * Set up timer interrupt, and return the current time in seconds. + */ +extern __inline__ void setup_timer(void) +{ + if (machine_arch_type == MACH_TYPE_CO285) + /* + * Add-in 21285s shouldn't access the RTC + */ + rtc_base = 0; + else + rtc_base = 0x70; + + if (rtc_base) { + int reg_d, reg_b; + + /* + * Probe for the RTC. + */ + reg_d = CMOS_READ(RTC_REG_D); + + /* + * make sure the divider is set + */ + CMOS_WRITE(RTC_REF_CLCK_32KHZ, RTC_REG_A); + + /* + * Set control reg B + * (24 hour mode, update enabled) + */ + reg_b = CMOS_READ(RTC_REG_B) & 0x7f; + reg_b |= 2; + CMOS_WRITE(reg_b, RTC_REG_B); + + if ((CMOS_READ(RTC_REG_A) & 0x7f) == RTC_REF_CLCK_32KHZ && + CMOS_READ(RTC_REG_B) == reg_b) { + + /* + * We have a RTC. Check the battery + */ + if ((reg_d & 0x80) == 0) + printk(KERN_WARNING "RTC: *** warning: CMOS battery bad\n"); + + xtime.tv_sec = get_isa_cmos_time(); + set_rtc_mmss = set_isa_cmos_time; + } else + rtc_base = 0; + } + + if (!rtc_base) { + /* + * Default the date to 1 Jan 1970 0:0:0 + */ + xtime.tv_sec = mktime(1970, 1, 1, 0, 0, 0); + set_rtc_mmss = set_dummy_time; + } + if (machine_is_ebsa285() || machine_is_co285()) { + gettimeoffset = timer1_gettimeoffset; + + *CSR_TIMER1_CLR = 0; + *CSR_TIMER1_LOAD = LATCH; + *CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16; + + setup_arm_irq(IRQ_TIMER1, &timer1_irq); + } else { + /* enable PIT timer */ + /* set for periodic (4) and LSB/MSB write (0x30) */ + outb(0x34, 0x43); + outb((mSEC_10_from_14/6) & 0xFF, 0x40); + outb((mSEC_10_from_14/6) >> 8, 0x40); + + gettimeoffset = isa_gettimeoffset; + + setup_arm_irq(IRQ_ISA_TIMER, &isa_timer_irq); + } +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/timex.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/timex.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,14 @@ +/* + * linux/include/asm-arm/arch-ebsa285/timex.h + * + * EBSA285 architecture timex specifications + * + * Copyright (C) 1998 Russell King + */ + +/* + * On EBSA285 boards, the clock runs at 50MHz and is + * divided by a 4-bit prescaler. Other boards use an + * ISA derived timer, and this is unused. + */ +#define CLOCK_TICK_RATE (50000000 / 16) diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/arch-ebsa285/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-ebsa285/uncompress.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * linux/include/asm-arm/arch-ebsa285/uncompress.h + * + * Copyright (C) 1996-1999 Russell King + */ + +/* + * Note! This could cause problems on the NetWinder + */ +#define DC21285_BASE ((volatile unsigned int *)0x42000160) +#define SER0_BASE ((volatile unsigned char *)0x7c0003f8) + +static __inline__ void putc(char c) +{ + if (machine_is_netwinder()) { + while ((SER0_BASE[5] & 0x60) != 0x60); + SER0_BASE[0] = c; + } else { + while (DC21285_BASE[6] & 8); + DC21285_BASE[0] = c; + } +} + +/* + * This does not append a newline + */ +static void puts(const char *s) +{ + while (*s) { + putc(*s); + if (*s == '\n') + putc('\r'); + s++; + } +} + +/* + * nothing to do + */ +#define arch_decomp_setup() +#define arch_decomp_wdog() diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/a.out.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,16 @@ +/* + * linux/include/asm-arm/arch-nexuspci/a.out.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_ARCH_A_OUT_H +#define __ASM_ARCH_A_OUT_H + +#include + +#define STACK_TOP \ + ((current->personality == PER_LINUX_32BIT) ? \ + TASK_SIZE : 0x04000000) + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/dma.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/dma.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,9 @@ +/* + * linux/include/asm-arm/arch-nexuspci/dma.h + * + * Architecture DMA routines - NexusPCI has no DMA, so this file is very + * simple. :-) + * + * Copyright (C) 1998 Philip Blundell + */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/hardware.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * linux/include/asm-arm/arch-nexuspci/hardware.h + * + * Copyright (C) 1998-1999 Philip Blundell + * + * This file contains the hardware definitions of the Nexus PCI card. + */ +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +/* Logical Physical + * 0xfff00000 0x10000000 SCC2691 DUART + * 0xffe00000 0x20000000 INTCONT + * 0xffd00000 0x30000000 Status + * 0xffc00000 0x60000000 PLX registers + * 0xfe000000 0x70000000 PCI I/O + */ + +/* + * Mapping areas + */ +#define PCIO_BASE 0xfe000000 +#define FLUSH_BASE 0xdf000000 + +/* + * RAM definitions + */ +#define RAM_BASE 0x40000000 +#define FLUSH_BASE_PHYS 0x40000000 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/io.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/io.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,143 @@ +/* + * linux/include/asm-arm/arch-ebsa110/io.h + * + * Copyright (C) 1997,1998 Russell King + * + * Modifications: + * 06-Dec-1997 RMK Created. + */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +/* + * This architecture does not require any delayed IO, and + * has the constant-optimised IO + */ +#undef ARCH_IO_DELAY + +/* + * Dynamic IO functions - let the compiler + * optimize the expressions + */ +#define DECLARE_DYN_OUT(fnsuffix,instr,typ) \ +extern __inline__ void __out##fnsuffix (unsigned int value, unsigned int port) \ +{ \ + __asm__ __volatile__( \ + "str" ##instr## " %0, [%1, %2]" \ + : \ + : "r" (value), "r" (PCIO_BASE), typ (port)); \ +} + +#define DECLARE_DYN_IN(sz,fnsuffix,instr,typ) \ +extern __inline__ unsigned sz __in##fnsuffix (unsigned int port) \ +{ \ + unsigned long value; \ + __asm__ __volatile__( \ + "ldr" ##instr## " %0, [%1, %2]" \ + : "=&r" (value) \ + : "r" (PCIO_BASE), typ (port)); \ + return (unsigned sz)value; \ +} + +extern __inline__ unsigned int __ioaddr (unsigned int port) \ +{ \ + return (unsigned int)(PCIO_BASE + port); \ +} + +#define DECLARE_IO(sz,fnsuffix,instr,typ) \ + DECLARE_DYN_OUT(fnsuffix,instr,typ) \ + DECLARE_DYN_IN(sz,fnsuffix,instr,typ) + +DECLARE_IO(char,b,"b","Jr") +DECLARE_IO(short,w,"h","r") +DECLARE_IO(long,l,"","Jr") + +#undef DECLARE_IO +#undef DECLARE_DYN_OUT +#undef DECLARE_DYN_IN + +/* + * Constant address IO functions + * + * These have to be macros for the 'J' constraint to work - + * +/-4096 immediate operand. + */ +#define __outbc(value,port) \ +({ \ + __asm__ __volatile__( \ + "strb %0, [%1, %2]" \ + : \ + : "r" (value), "r" (PCIO_BASE), "Jr" (port)); \ +}) + +#define __inbc(port) \ +({ \ + unsigned char result; \ + __asm__ __volatile__( \ + "ldrb %0, [%1, %2]" \ + : "=r" (result) \ + : "r" (PCIO_BASE), "Jr" (port)); \ + result; \ +}) + +#define __outwc(value,port) \ +({ \ + __asm__ __volatile__( \ + "strh %0, [%1, %2]" \ + : \ + : "r" (value), "r" (PCIO_BASE), "r" (port)); \ +}) + +#define __inwc(port) \ +({ \ + unsigned short result; \ + __asm__ __volatile__( \ + "ldrh %0, [%1, %2]" \ + : "=r" (result) \ + : "r" (PCIO_BASE), "r" (port)); \ + result & 0xffff; \ +}) + +#define __outlc(value,port) \ +({ \ + __asm__ __volatile__( \ + "str %0, [%1, %2]" \ + : \ + : "r" (value), "r" (PCIO_BASE), "Jr" (port)); \ +}) + +#define __inlc(port) \ +({ \ + unsigned long result; \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2]" \ + : "=r" (result) \ + : "r" (PCIO_BASE), "Jr" (port)); \ + result; \ +}) + +#define __ioaddrc(port) \ +({ \ + unsigned long addr; \ + addr = PCIO_BASE + port; \ + addr; \ +}) + +/* + * Translated address IO functions + * + * IO address has already been translated to a virtual address + */ +#define outb_t(v,p) \ + (*(volatile unsigned char *)(p) = (v)) + +#define inb_t(p) \ + (*(volatile unsigned char *)(p)) + +#define outl_t(v,p) \ + (*(volatile unsigned long *)(p) = (v)) + +#define inl_t(p) \ + (*(volatile unsigned long *)(p)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/irq.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/irq.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * include/asm-arm/arch-nexuspci/irq.h + * + * Copyright (C) 1998 Philip Blundell + * + * Changelog: + * 22-08-1998 RMK Restructured IRQ routines + */ + +#include + +#define fixup_irq(x) (x) + +#define INTCONT 0xffe00000 + +extern unsigned long soft_irq_mask; + +static void nexuspci_mask_irq(unsigned int irq) +{ + writel((irq << 1), INTCONT); + soft_irq_mask &= ~(1< + +/* + * Bus types + */ +#define EISA_bus 0 +#define EISA_bus__is_a_macro /* for versions in ksyms.c */ +#define MCA_bus 0 +#define MCA_bus__is_a_macro /* for versions in ksyms.c */ + +/* This decides where the kernel will search for a free chunk of vm + * space during mmap's. + */ +#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/shmparam.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,5 @@ +/* + * linux/include/asm-arm/arch-nexuspci/shmparam.h + * + * Copyright (c) 1996 Russell King. + */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/system.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/system.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,17 @@ +/* + * linux/include/asm-arm/arch-nexuspci/system.h + * + * Copyright (c) 1996,1997,1998 Russell King. + */ +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +extern __inline__ void arch_reset(char mode) +{ + /* + * loop endlessly - the watchdog will reset us if it's enabled. + */ + cli(); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/time.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/time.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * linux/include/asm-arm/arch-nexuspci/time.h + * + * Copyright (c) 1997 Phil Blundell. + * + * Nexus PCI card has no real-time clock. We get timer ticks from the + * SCC chip. + */ + +#define UART_BASE 0xfff00000 +#define INTCONT 0xffe00000 + +#define update_rtc() + +extern __inline__ unsigned long gettimeoffset (void) +{ + return 0; +} + +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + static int count = 50; + + writeb(0x90, UART_BASE + 8); + + if (--count == 0) { + static int state = 1; + state ^= 1; + writeb(0x1a + state, INTCONT); + count = 50; + } + + readb(UART_BASE + 0x14); + readb(UART_BASE + 0x14); + readb(UART_BASE + 0x14); + readb(UART_BASE + 0x14); + readb(UART_BASE + 0x14); + readb(UART_BASE + 0x14); + + do_timer(regs); + + if (!user_mode(regs)) + do_profile(instruction_pointer(regs)); +} + +static struct irqaction timerirq = { + timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + +extern __inline__ void setup_timer(void) +{ + int tick = 3686400 / 16 / 2 / 100; + + writeb(tick & 0xff, UART_BASE + 0x1c); + writeb(tick >> 8, UART_BASE + 0x18); + writeb(0x80, UART_BASE + 8); + writeb(0x10, UART_BASE + 0x14); + + /* + * Default the date to 1 Jan 1970 0:0:0 + * You will have to run a time daemon to set the + * clock correctly at bootup + */ + xtime.tv_sec = mktime(1970, 1, 1, 0, 0, 0); + + setup_arm_irq(IRQ_TIMER, &timerirq); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/timex.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/timex.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-nexuspci/timex.h + * + * NexusPCI StrongARM card timex specifications + * + * Copyright (C) 1998 Philip Blundell + */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/arch-nexuspci/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-nexuspci/uncompress.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,18 @@ +/* + * linux/include/asm-arm/arch-nexuspci/uncompress.h + * from linux/include/asm-arm/arch-ebsa110/uncompress.h + * + * Copyright (C) 1996,1997,1998 Russell King + */ + +/* + * This does not append a newline + */ +static void puts(const char *s) +{ +} + +/* + * nothing to do + */ +#define arch_decomp_setup() diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/a.out.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/a.out.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,16 @@ +/* + * linux/include/asm-arm/arch-rpc/a.out.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_ARCH_A_OUT_H +#define __ASM_ARCH_A_OUT_H + +#include + +#define STACK_TOP \ + ((current->personality == PER_LINUX_32BIT) ? \ + TASK_SIZE : 0x04000000) + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/dma.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/dma.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,24 @@ +#ifndef __ASM_ARCH_DMA_H +#define __ASM_ARCH_DMA_H + +/* + * This is the maximum DMA address that can be DMAd to. + * There should not be more than (0xd0000000 - 0xc0000000) + * bytes of RAM. + */ +#define MAX_DMA_ADDRESS 0xd0000000 +#define MAX_DMA_CHANNELS 8 + +#define DMA_0 0 +#define DMA_1 1 +#define DMA_2 2 +#define DMA_3 3 +#define DMA_S0 4 +#define DMA_S1 5 +#define DMA_VIRTUAL_FLOPPY 6 +#define DMA_VIRTUAL_SOUND 7 + +#define DMA_FLOPPY DMA_VIRTUAL_FLOPPY + +#endif /* _ASM_ARCH_DMA_H */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/hardware.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * linux/include/asm-arm/arch-rpc/hardware.h + * + * Copyright (C) 1996-1999 Russell King. + * + * This file contains the hardware definitions of the RiscPC series machines. + */ +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include + +/* + * What hardware must be present + */ +#define HAS_IOMD +#define HAS_VIDC20 + +/* Hardware addresses of major areas. + * *_START is the physical address + * *_SIZE is the size of the region + * *_BASE is the virtual address + */ +#define RAM_SIZE 0x10000000 +#define RAM_START 0x10000000 + +#define EASI_SIZE 0x08000000 /* EASI I/O */ +#define EASI_START 0x08000000 +#define EASI_BASE 0xe5000000 + +#define IO_START 0x03000000 /* I/O */ +#define IO_SIZE 0x01000000 +#define IO_BASE 0xe0000000 + +#define SCREEN_START 0x02000000 /* VRAM */ +#define SCREEN2_END 0xe0000000 +#define SCREEN2_BASE 0xd8000000 +#define SCREEN1_END 0xd8000000 +#define SCREEN1_BASE 0xd0000000 + +#define FLUSH_BASE 0xdf000000 + + +#ifndef __ASSEMBLER__ + +/* + * for use with inb/outb + */ +#define IO_VIDC_AUDIO_BASE 0x80140000 +#define IO_VIDC_BASE 0x80100000 +#define IO_IOMD_BASE 0x80080000 +#define IOC_BASE 0x80080000 + +#define IO_EC_EASI_BASE 0x81400000 +#define IO_EC_IOC4_BASE 0x8009c000 +#define IO_EC_IOC_BASE 0x80090000 +#define IO_EC_MEMC8_BASE 0x8000ac00 +#define IO_EC_MEMC_BASE 0x80000000 + +/* + * IO definitions + */ +#define EXPMASK_BASE ((volatile unsigned char *)0xe0360000) +#define IOEB_BASE ((volatile unsigned char *)0xe0350050) +#define PCIO_FLOPPYDMABASE ((volatile unsigned char *)0xe002a000) +#define PCIO_BASE 0xe0010000 + +/* + * Offsets from RAM base + */ +#define PARAMS_OFFSET 0x0100 + +/* + * RAM definitions + */ +#define GET_MEMORY_END(p) (PAGE_OFFSET + p->u1.s.page_size * \ + (p->u1.s.pages_in_bank[0] + \ + p->u1.s.pages_in_bank[1] + \ + p->u1.s.pages_in_bank[2] + \ + p->u1.s.pages_in_bank[3])) + +#define PARAMS_BASE (PAGE_OFFSET + PARAMS_OFFSET) +#define Z_PARAMS_BASE (RAM_START + PARAMS_OFFSET) +#define FLUSH_BASE_PHYS 0x00000000 /* ROM */ + +#else + +#define VIDC_SND_BASE 0xe0500000 +#define VIDC_BASE 0xe0400000 +#define IOMD_BASE 0xe0200000 +#define IOC_BASE 0xe0200000 +#define PCIO_FLOPPYDMABASE 0xe002a000 +#define PCIO_BASE 0xe0010000 + +#endif +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/ide.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/ide.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * linux/include/asm-arm/arch-rpc/ide.h + * + * Copyright (c) 1997 Russell King + * + * Modifications: + * 29-07-1998 RMK Major re-work of IDE architecture specific code + */ +#include + +/* + * Set up a hw structure for a specified data port, control port and IRQ. + * This should follow whatever the default interface uses. + */ +static __inline__ void +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +{ + ide_ioreg_t reg = (ide_ioreg_t) data_port; + int i; + + memset(hw, 0, sizeof(*hw)); + + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { + hw->io_ports[i] = reg; + reg += 1; + } + hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; + hw->irq = irq; +} + +/* + * This registers the standard ports for this architecture with the IDE + * driver. + */ +static __inline__ void +ide_init_default_hwifs(void) +{ + hw_regs_t hw; + + ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_HARDDISK); + ide_register_hw(&hw, NULL); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/io.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/io.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,209 @@ +/* + * linux/include/asm-arm/arch-rpc/io.h + * + * Copyright (C) 1997 Russell King + * + * Modifications: + * 06-Dec-1997 RMK Created. + */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +/* + * This architecture does not require any delayed IO, and + * has the constant-optimised IO + */ +#undef ARCH_IO_DELAY + +/* + * We use two different types of addressing - PC style addresses, and ARM + * addresses. PC style accesses the PC hardware with the normal PC IO + * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ + * and are translated to the start of IO. Note that all addresses are + * shifted left! + */ +#define __PORT_PCIO(x) (!((x) & 0x80000000)) + +/* + * Dynamic IO functions - let the compiler + * optimize the expressions + */ +extern __inline__ void __outb (unsigned int value, unsigned int port) +{ + unsigned long temp; + __asm__ __volatile__( + "tst %2, #0x80000000\n\t" + "mov %0, %4\n\t" + "addeq %0, %0, %3\n\t" + "strb %1, [%0, %2, lsl #2] @ outb" + : "=&r" (temp) + : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) + : "cc"); +} + +extern __inline__ void __outw (unsigned int value, unsigned int port) +{ + unsigned long temp; + __asm__ __volatile__( + "tst %2, #0x80000000\n\t" + "mov %0, %4\n\t" + "addeq %0, %0, %3\n\t" + "str %1, [%0, %2, lsl #2] @ outw" + : "=&r" (temp) + : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) + : "cc"); +} + +extern __inline__ void __outl (unsigned int value, unsigned int port) +{ + unsigned long temp; + __asm__ __volatile__( + "tst %2, #0x80000000\n\t" + "mov %0, %4\n\t" + "addeq %0, %0, %3\n\t" + "str %1, [%0, %2, lsl #2] @ outl" + : "=&r" (temp) + : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) + : "cc"); +} + +#define DECLARE_DYN_IN(sz,fnsuffix,instr) \ +extern __inline__ unsigned sz __in##fnsuffix (unsigned int port) \ +{ \ + unsigned long temp, value; \ + __asm__ __volatile__( \ + "tst %2, #0x80000000\n\t" \ + "mov %0, %4\n\t" \ + "addeq %0, %0, %3\n\t" \ + "ldr" ##instr## " %1, [%0, %2, lsl #2] @ in"###fnsuffix \ + : "=&r" (temp), "=r" (value) \ + : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ + : "cc"); \ + return (unsigned sz)value; \ +} + +extern __inline__ unsigned int __ioaddr (unsigned int port) \ +{ \ + if (__PORT_PCIO(port)) \ + return (unsigned int)(PCIO_BASE + (port << 2)); \ + else \ + return (unsigned int)(IO_BASE + (port << 2)); \ +} + +#define DECLARE_IO(sz,fnsuffix,instr) \ + DECLARE_DYN_IN(sz,fnsuffix,instr) + +DECLARE_IO(char,b,"b") +DECLARE_IO(short,w,"") +DECLARE_IO(long,l,"") + +#undef DECLARE_IO +#undef DECLARE_DYN_IN + +/* + * Constant address IO functions + * + * These have to be macros for the 'J' constraint to work - + * +/-4096 immediate operand. + */ +#define __outbc(value,port) \ +({ \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "strb %0, [%1, %2] @ outbc" \ + : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "strb %0, [%1, %2] @ outbc" \ + : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \ +}) + +#define __inbc(port) \ +({ \ + unsigned char result; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "ldrb %0, [%1, %2] @ inbc" \ + : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "ldrb %0, [%1, %2] @ inbc" \ + : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ + result; \ +}) + +#define __outwc(value,port) \ +({ \ + unsigned long v = value; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outwc" \ + : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outwc" \ + : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ +}) + +#define __inwc(port) \ +({ \ + unsigned short result; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inwc" \ + : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inwc" \ + : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ + result & 0xffff; \ +}) + +#define __outlc(value,port) \ +({ \ + unsigned long v = value; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outlc" \ + : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "str %0, [%1, %2] @ outlc" \ + : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \ +}) + +#define __inlc(port) \ +({ \ + unsigned long result; \ + if (__PORT_PCIO((port))) \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inlc" \ + : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ + else \ + __asm__ __volatile__( \ + "ldr %0, [%1, %2] @ inlc" \ + : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ + result; \ +}) + +#define __ioaddrc(port) \ + (__PORT_PCIO((port)) ? PCIO_BASE + ((port) << 2) : IO_BASE + ((port) << 2)) + +/* + * Translated address IO functions + * + * IO address has already been translated to a virtual address + */ +#define outb_t(v,p) \ + (*(volatile unsigned char *)(p) = (v)) + +#define inb_t(p) \ + (*(volatile unsigned char *)(p)) + +#define outl_t(v,p) \ + (*(volatile unsigned long *)(p) = (v)) + +#define inl_t(p) \ + (*(volatile unsigned long *)(p)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/irq.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/irq.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,177 @@ +/* + * include/asm-arm/arch-rpc/irq.h + * + * Copyright (C) 1996 Russell King + * + * Changelog: + * 10-10-1996 RMK Brought up to date with arch-sa110eval + * 22-08-1998 RMK Restructured IRQ routines + */ +#include + +#define fixup_irq(x) (x) + +static void rpc_mask_irq_ack_a(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]\n" +" strb %1, [%3]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA)), + "r" (ioaddr(IOMD_IRQCLRA))); +} + +static void rpc_mask_irq_a(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA))); +} + +static void rpc_unmask_irq_a(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA))); +} + +static void rpc_mask_irq_b(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKB))); +} + +static void rpc_unmask_irq_b(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKB))); +} + +static void rpc_mask_irq_dma(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_DMAMASK))); +} + +static void rpc_unmask_irq_dma(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_DMAMASK))); +} + +static void rpc_mask_irq_fiq(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_FIQMASK))); +} + +static void rpc_unmask_irq_fiq(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_FIQMASK))); +} + +static __inline__ void irq_init_irq(void) +{ + extern void ecard_disableirq(unsigned int irq); + extern void ecard_enableirq(unsigned int irq); + int irq; + + outb(0, IOMD_IRQMASKA); + outb(0, IOMD_IRQMASKB); + outb(0, IOMD_FIQMASK); + outb(0, IOMD_DMAMASK); + + for (irq = 0; irq < NR_IRQS; irq++) { + switch (irq) { + case 0 ... 6: + irq_desc[irq].probe_ok = 1; + case 7: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_ack_a; + irq_desc[irq].mask = rpc_mask_irq_a; + irq_desc[irq].unmask = rpc_unmask_irq_a; + break; + + case 9 ... 15: + irq_desc[irq].probe_ok = 1; + case 8: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_b; + irq_desc[irq].mask = rpc_mask_irq_b; + irq_desc[irq].unmask = rpc_unmask_irq_b; + break; + + case 16 ... 22: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_dma; + irq_desc[irq].mask = rpc_mask_irq_dma; + irq_desc[irq].unmask = rpc_unmask_irq_dma; + break; + + case 32 ... 40: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = ecard_disableirq; + irq_desc[irq].mask = ecard_disableirq; + irq_desc[irq].unmask = ecard_enableirq; + break; + + case 64 ... 72: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_fiq; + irq_desc[irq].mask = rpc_mask_irq_fiq; + irq_desc[irq].unmask = rpc_unmask_irq_fiq; + break; + } + } +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/irqs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/irqs.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/irqs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/irqs.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * linux/include/asm-arm/arch-rpc/irqs.h + * + * Copyright (C) 1996 Russell King + */ + +#define IRQ_PRINTER 0 +#define IRQ_BATLOW 1 +#define IRQ_FLOPPYINDEX 2 +#define IRQ_VSYNCPULSE 3 +#define IRQ_POWERON 4 +#define IRQ_TIMER0 5 +#define IRQ_TIMER1 6 +#define IRQ_IMMEDIATE 7 +#define IRQ_EXPCARDFIQ 8 +#define IRQ_HARDDISK 9 +#define IRQ_SERIALPORT 10 +#define IRQ_FLOPPYDISK 12 +#define IRQ_EXPANSIONCARD 13 +#define IRQ_KEYBOARDTX 14 +#define IRQ_KEYBOARDRX 15 + +#define IRQ_DMA0 16 +#define IRQ_DMA1 17 +#define IRQ_DMA2 18 +#define IRQ_DMA3 19 +#define IRQ_DMAS0 20 +#define IRQ_DMAS1 21 + +#define FIQ_FLOPPYDATA 0 +#define FIQ_ECONET 2 +#define FIQ_SERIALPORT 4 +#define FIQ_EXPANSIONCARD 6 +#define FIQ_FORCE 7 + +#define IRQ_TIMER IRQ_TIMER0 + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/keyboard.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/keyboard.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/keyboard.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/keyboard.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,30 @@ +/* + * linux/include/asm-arm/arch-rpc/keyboard.h + * + * Keyboard driver definitions for RiscPC architecture + * + * (C) 1998 Russell King + */ + +#include +#include +#include + +#define NR_SCANCODES 128 + +extern void ps2kbd_leds(unsigned char leds); +extern void ps2kbd_init_hw(void); +extern unsigned char ps2kbd_sysrq_xlate[NR_SCANCODES]; + +#define kbd_setkeycode(sc,kc) (-EINVAL) +#define kbd_getkeycode(sc) (-EINVAL) + +#define kbd_translate(sc, kcp, rm) ({ *(kcp) = (sc); 1; }) +#define kbd_unexpected_up(kc) (0200) +#define kbd_leds(leds) ps2kbd_leds(leds) +#define kbd_init_hw() ps2kbd_init_hw() +#define kbd_sysrq_xlate ps2kbd_sysrq_xlate +#define kbd_disable_irq() disable_irq(IRQ_KEYBOARDRX) +#define kbd_enable_irq() enable_irq(IRQ_KEYBOARDRX) + +#define SYSRQ_KEY 13 diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/memory.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/memory.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/memory.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/memory.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * linux/include/asm-arm/arch-rpc/memory.h + * + * Copyright (c) 1996,1997,1998 Russell King. + * + * Changelog: + * 20-Oct-1996 RMK Created + * 31-Dec-1997 RMK Fixed definitions to reduce warnings + * 11-Jan-1998 RMK Uninlined to reduce hits on cache + * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt + * 21-Mar-1999 RMK Renamed to memory.h + * RMK Added TASK_SIZE and PAGE_OFFSET + */ +#ifndef __ASM_ARCH_MMU_H +#define __ASM_ARCH_MMU_H + +/* + * Task size: 3GB + */ +#define TASK_SIZE (0xc0000000UL) + +/* + * Page offset: 3GB + */ +#define PAGE_OFFSET (0xc0000000UL) + +#ifndef __ASSEMBLY__ +extern unsigned long __virt_to_phys(unsigned long vpage); +extern unsigned long __phys_to_virt(unsigned long ppage); +#endif + +/* + * These are exactly the same on the RiscPC as the + * physical memory view. + */ +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) __phys_to_virt(x) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/mm-init.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/mm-init.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/mm-init.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/mm-init.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,47 @@ +/* + * linux/include/asm-arm/arch-rpc/mmap.h + * + * Copyright (C) 1996 Russell King + */ + +#define HAVE_MAP_VID_MEM + +unsigned long map_screen_mem(unsigned long log_start, unsigned long kmem, int update) +{ + static int updated = 0; + unsigned long address; + pgd_t *pgd; + + if (updated) + return 0; + updated = update; + + address = SCREEN_START | PMD_TYPE_SECT | PMD_DOMAIN(DOMAIN_KERNEL) | PMD_SECT_AP_WRITE; + pgd = swapper_pg_dir + (SCREEN2_BASE >> PGDIR_SHIFT); + pgd_val(pgd[0]) = address; + pgd_val(pgd[1]) = address + (1 << PGDIR_SHIFT); + + if (update) { + unsigned long pgtable = PAGE_ALIGN(kmem), *p; + int i; + + memzero ((void *)pgtable, 4096); + + pgd_val(pgd[-2]) = __virt_to_phys(pgtable) | PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL); + pgd_val(pgd[-1]) = __virt_to_phys(pgtable + PTRS_PER_PTE*4) | PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL); + p = (unsigned long *)pgtable; + + i = PTRS_PER_PTE * 2 - ((SCREEN1_END - log_start) >> PAGE_SHIFT); + address = SCREEN_START | PTE_TYPE_SMALL | PTE_AP_WRITE; + + while (i < PTRS_PER_PTE * 2) { + p[i++] = address; + address += PAGE_SIZE; + } + + flush_page_to_ram(pgtable); + + kmem = pgtable + PAGE_SIZE; + } + return kmem; +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/param.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/param.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-rpc/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/processor.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/processor.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,29 @@ +/* + * linux/include/asm-arm/arch-rpc/processor.h + * + * Copyright (c) 1996-1999 Russell King. + * + * Changelog: + * 10-Sep-1996 RMK Created + * 21-Mar-1999 RMK Added asm/arch/memory.h + */ + +#ifndef __ASM_ARCH_PROCESSOR_H +#define __ASM_ARCH_PROCESSOR_H + +#include + +/* + * Bus types + */ +#define EISA_bus 0 +#define EISA_bus__is_a_macro /* for versions in ksyms.c */ +#define MCA_bus 0 +#define MCA_bus__is_a_macro /* for versions in ksyms.c */ + +/* This decides where the kernel will search for a free chunk of vm + * space during mmap's. + */ +#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/serial.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/serial.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/serial.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/serial.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * linux/include/asm-arm/arch-rpc/serial.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 15-10-1996 RMK Created + */ +#ifndef __ASM_ARCH_SERIAL_H +#define __ASM_ARCH_SERIAL_H + +/* + * This assumes you have a 1.8432 MHz clock for your UART. + * + * It'd be nice if someone built a serial card with a 24.576 MHz + * clock, since the 16550A is capable of handling a top speed of 1.5 + * megabits/second; but this requires the faster clock. + */ +#define BASE_BAUD (1843200 / 16) + +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + + /* UART CLK PORT IRQ FLAGS */ +#define SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS3 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS4 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS5 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS6 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS7 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS8 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS9 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS10 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS11 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \ + { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/shmparam.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,5 @@ +/* + * linux/include/asm-arm/arch-rpc/shmparam.h + * + * Copyright (c) 1996 Russell King. + */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/system.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/system.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,23 @@ +/* + * linux/include/asm-arm/arch-rpc/system.h + * + * Copyright (c) 1996 Russell King + */ +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +#include + +#define arch_reset(mode) { \ + extern void ecard_reset (int card); \ + outb (0, IOMD_ROMCR0); \ + ecard_reset(-1); \ + cli(); \ + __asm__ __volatile__("msr spsr, r1;" \ + "mcr p15, 0, %0, c1, c0, 0;" \ + "movs pc, #0" \ + : \ + : "r" (processor.u.armv3v4.reset())); \ + } + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/time.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/time.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,204 @@ +/* + * linux/include/asm-arm/arch-rpc/time.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 24-Sep-1996 RMK Created + * 10-Oct-1996 RMK Brought up to date with arch-sa110eval + * 04-Dec-1997 RMK Updated for new arch/arm/time.c + */ +#include + +static long last_rtc_update = 0; /* last time the cmos clock got updated */ + +extern __inline__ unsigned long gettimeoffset (void) +{ + unsigned long offset = 0; + unsigned int count1, count2, status1, status2; + + status1 = IOMD_IRQREQA; + barrier (); + outb(0, IOMD_T0LATCH); + barrier (); + count1 = inb(IOMD_T0CNTL) | (inb(IOMD_T0CNTH) << 8); + barrier (); + status2 = inb(IOMD_IRQREQA); + barrier (); + outb(0, IOMD_T0LATCH); + barrier (); + count2 = inb(IOMD_T0CNTL) | (inb(IOMD_T0CNTH) << 8); + + if (count2 < count1) { + /* + * This means that we haven't just had an interrupt + * while reading into status2. + */ + if (status2 & (1 << 5)) + offset = tick; + count1 = count2; + } else if (count2 > count1) { + /* + * We have just had another interrupt while reading + * status2. + */ + offset += tick; + count1 = count2; + } + + count1 = LATCH - count1; + /* + * count1 = number of clock ticks since last interrupt + */ + offset += count1 * tick / LATCH; + return offset; +} + +extern int iic_control(unsigned char, int, char *, int); + +static int set_rtc_time(unsigned long nowtime) +{ + char buf[5], ctrl; + + if (iic_control(0xa1, 0, &ctrl, 1) != 0) + printk("RTC: failed to read control reg\n"); + + /* + * Reset divider + */ + ctrl |= 0x80; + + if (iic_control(0xa0, 0, &ctrl, 1) != 0) + printk("RTC: failed to stop the clock\n"); + + /* + * We only set the time - we don't set the date. + * This means that there is the possibility once + * a day for the correction to disrupt the date. + * We really ought to write the time and date, or + * nothing at all. + */ + buf[0] = 0; + buf[1] = nowtime % 60; nowtime /= 60; + buf[2] = nowtime % 60; nowtime /= 60; + buf[3] = nowtime % 24; + + BIN_TO_BCD(buf[1]); + BIN_TO_BCD(buf[2]); + BIN_TO_BCD(buf[3]); + + if (iic_control(0xa0, 1, buf, 4) != 0) + printk("RTC: Failed to set the time\n"); + + /* + * Re-enable divider + */ + ctrl &= ~0x80; + + if (iic_control(0xa0, 0, &ctrl, 1) != 0) + printk("RTC: failed to start the clock\n"); + + return 0; +} + +extern __inline__ unsigned long get_rtc_time(void) +{ + unsigned int year, i; + char buf[8]; + + /* + * The year is not part of the RTC counter + * registers, and is stored in RAM. This + * means that it will not be automatically + * updated. + */ + if (iic_control(0xa1, 0xc0, buf, 1) != 0) + printk("RTC: failed to read the year\n"); + + /* + * If the year is before 1970, then the year + * is actually 100 in advance. This gives us + * a year 2070 bug... + */ + year = 1900 + buf[0]; + if (year < 1970) + year += 100; + + /* + * Read the time and date in one go - this + * will ensure that we don't get any effects + * due to carry (the RTC latches the counters + * during a read). + */ + if (iic_control(0xa1, 2, buf, 5) != 0) { + printk("RTC: failed to read the time and date\n"); + memset(buf, 0, sizeof(buf)); + } + + /*FIXME: + * This doesn't seem to work. Does RISC OS + * actually use the RTC year? It doesn't + * seem to. In that case, how does it update + * the CMOS year? + */ + /*year += (buf[3] >> 6) & 3;*/ + + /* + * The RTC combines years with date and weekday + * with month. We need to mask off this extra + * information before converting the date to + * binary. + */ + buf[4] &= 0x1f; + buf[3] &= 0x3f; + + for (i = 0; i < 5; i++) + BCD_TO_BIN(buf[i]); + + return mktime(year, buf[4], buf[3], buf[2], buf[1], buf[0]); +} + +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + do_timer(regs); + + /* If we have an externally synchronized linux clock, then update + * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be + * called as close as possible to 500 ms before the new second starts. + */ + if ((time_status & STA_UNSYNC) == 0 && + xtime.tv_sec > last_rtc_update + 660 && + xtime.tv_usec >= 50000 - (tick >> 1) && + xtime.tv_usec < 50000 + (tick >> 1)) { + if (set_rtc_time(xtime.tv_sec) == 0) + last_rtc_update = xtime.tv_sec; + else + last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ + } + + if (!user_mode(regs)) + do_profile(instruction_pointer(regs)); +} + +static struct irqaction timerirq = { + timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + +/* + * Set up timer interrupt, and return the current time in seconds. + */ +extern __inline__ void setup_timer(void) +{ + outb(LATCH & 255, IOMD_T0LTCHL); + outb(LATCH >> 8, IOMD_T0LTCHH); + outb(0, IOMD_T0GO); + + xtime.tv_sec = get_rtc_time(); + + setup_arm_irq(IRQ_TIMER, &timerirq); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/timex.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/timex.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,13 @@ +/* + * linux/include/asm-arm/arch-rpc/timex.h + * + * RiscPC architecture timex specifications + * + * Copyright (C) 1997, 1998 Russell King + */ + +/* + * On the RiscPC, the clock ticks at 2MHz. + */ +#define CLOCK_TICK_RATE 2000000 + diff -Nru linux-2.2.14-rmk-mercury/include/asm/arch-rpc/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/arch-rpc/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/arch-rpc/uncompress.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,146 @@ +/* + * linux/include/asm-arm/arch-a5k/uncompress.h + * + * Copyright (C) 1996 Russell King + */ +#define VIDMEM ((char *)SCREEN_START) + +#include +#include + +int video_num_columns, video_num_lines, video_size_row; +int white, bytes_per_char_h; +extern unsigned long con_charconvtable[256]; + +struct param_struct { + unsigned long page_size; + unsigned long nr_pages; + unsigned long ramdisk_size; + unsigned long mountrootrdonly; + unsigned long rootdev; + unsigned long video_num_cols; + unsigned long video_num_rows; + unsigned long video_x; + unsigned long video_y; + unsigned long memc_control_reg; + unsigned char sounddefault; + unsigned char adfsdrives; + unsigned char bytes_per_char_h; + unsigned char bytes_per_char_v; + unsigned long unused[256/4-11]; +}; + +static const unsigned long palette_4[16] = { + 0x00000000, + 0x000000cc, + 0x0000cc00, /* Green */ + 0x0000cccc, /* Yellow */ + 0x00cc0000, /* Blue */ + 0x00cc00cc, /* Magenta */ + 0x00cccc00, /* Cyan */ + 0x00cccccc, /* White */ + 0x00000000, + 0x000000ff, + 0x0000ff00, + 0x0000ffff, + 0x00ff0000, + 0x00ff00ff, + 0x00ffff00, + 0x00ffffff +}; + +#define palette_setpixel(p) *(unsigned long *)(IO_START+0x00400000) = 0x10000000|((p) & 255) +#define palette_write(v) *(unsigned long *)(IO_START+0x00400000) = 0x00000000|((v) & 0x00ffffff) + +static struct param_struct * const params = (struct param_struct *)Z_PARAMS_BASE; + +#ifndef STANDALONE_DEBUG +/* + * This does not append a newline + */ +static void puts(const char *s) +{ + extern void ll_write_char(char *, unsigned long); + int x,y; + unsigned char c; + char *ptr; + + x = params->video_x; + y = params->video_y; + + while ( ( c = *(unsigned char *)s++ ) != '\0' ) { + if ( c == '\n' ) { + x = 0; + if ( ++y >= video_num_lines ) { + y--; + } + } else { + ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); + ll_write_char(ptr, c|(white<<16)); + if ( ++x >= video_num_columns ) { + x = 0; + if ( ++y >= video_num_lines ) { + y--; + } + } + } + } + + params->video_x = x; + params->video_y = y; +} + +static void error(char *x); + +/* + * Setup for decompression + */ +static void arch_decomp_setup(void) +{ + int i; + + video_num_lines = params->video_num_rows; + video_num_columns = params->video_num_cols; + bytes_per_char_h = params->bytes_per_char_h; + video_size_row = video_num_columns * bytes_per_char_h; + if (bytes_per_char_h == 4) + for (i = 0; i < 256; i++) + con_charconvtable[i] = + (i & 128 ? 1 << 0 : 0) | + (i & 64 ? 1 << 4 : 0) | + (i & 32 ? 1 << 8 : 0) | + (i & 16 ? 1 << 12 : 0) | + (i & 8 ? 1 << 16 : 0) | + (i & 4 ? 1 << 20 : 0) | + (i & 2 ? 1 << 24 : 0) | + (i & 1 ? 1 << 28 : 0); + else + for (i = 0; i < 16; i++) + con_charconvtable[i] = + (i & 8 ? 1 << 0 : 0) | + (i & 4 ? 1 << 8 : 0) | + (i & 2 ? 1 << 16 : 0) | + (i & 1 ? 1 << 24 : 0); + + + palette_setpixel(0); + if (bytes_per_char_h == 1) { + palette_write (0); + palette_write (0x00ffffff); + for (i = 2; i < 256; i++) + palette_write (0); + white = 1; + } else { + for (i = 0; i < 256; i++) + palette_write (i < 16 ? palette_4[i] : 0); + white = 7; + } + + if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); +} +#endif + +/* + * nothing to do + */ +#define arch_decomp_wdog() diff -Nru linux-2.2.14-rmk-mercury/include/asm/assembler.h linux-2.2.14-rmk-mercury-gcc3/include/asm/assembler.h --- linux-2.2.14-rmk-mercury/include/asm/assembler.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/assembler.h 2007-07-10 14:03:05.000000000 +0100 @@ -0,0 +1,11 @@ +/* + * linux/asm/assembler.h + * + * This file contains arm architecture specific defines + * for the different processors. + * + * Do not include any C declarations in this file - it is included by + * assembler source. + */ +#include +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/atomic.h linux-2.2.14-rmk-mercury-gcc3/include/asm/atomic.h --- linux-2.2.14-rmk-mercury/include/asm/atomic.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/atomic.h 2007-07-10 12:36:50.000000000 +0100 @@ -0,0 +1,94 @@ +/* + * linux/include/asm-arm/atomic.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 27-06-1996 RMK Created + * 13-04-1997 RMK Made functions atomic! + * 07-12-1997 RMK Upgraded for v2.1. + * 26-08-1998 PJB Added #ifdef __KERNEL__ + */ +#ifndef __ASM_ARM_ATOMIC_H +#define __ASM_ARM_ATOMIC_H + +#ifdef __SMP__ +#error SMP not supported +#endif + +#include + +#ifdef CONFIG_ARCH_CO285 +typedef struct { volatile int counter; } atomic_t; +#else +typedef struct { int counter; } atomic_t; +#endif + +#define ATOMIC_INIT(i) { (i) } + +#ifdef __KERNEL__ +#include + +#define atomic_read(v) ((v)->counter) +#define atomic_set(v,i) (((v)->counter) = (i)) + +static __inline__ void atomic_add(int i, volatile atomic_t *v) +{ + unsigned long flags; + + save_flags_cli (flags); + v->counter += i; + restore_flags (flags); +} + +static __inline__ void atomic_sub(int i, volatile atomic_t *v) +{ + unsigned long flags; + + save_flags_cli (flags); + v->counter -= i; + restore_flags (flags); +} + +static __inline__ void atomic_inc(volatile atomic_t *v) +{ + unsigned long flags; + + save_flags_cli (flags); + v->counter += 1; + restore_flags (flags); +} + +static __inline__ void atomic_dec(volatile atomic_t *v) +{ + unsigned long flags; + + save_flags_cli (flags); + v->counter -= 1; + restore_flags (flags); +} + +static __inline__ int atomic_dec_and_test(volatile atomic_t *v) +{ + unsigned long flags; + int result; + + save_flags_cli (flags); + v->counter -= 1; + result = (v->counter == 0); + restore_flags (flags); + + return result; +} + +static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *addr) +{ + unsigned long flags; + + save_flags_cli (flags); + *addr &= ~mask; + restore_flags (flags); +} + +#endif +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/bitops.h linux-2.2.14-rmk-mercury-gcc3/include/asm/bitops.h --- linux-2.2.14-rmk-mercury/include/asm/bitops.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/bitops.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,93 @@ +#ifndef __ASM_ARM_BITOPS_H +#define __ASM_ARM_BITOPS_H + +/* + * Copyright 1995, Russell King. + * Various bits and pieces copyrights include: + * Linus Torvalds (test_bit). + */ + +/* + * These should be done with inline assembly. + * All bit operations return 0 if the bit + * was cleared before the operation and != 0 if it was not. + * + * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). + */ + +/* + * Function prototypes to keep gcc -Wall happy + */ +extern void set_bit(int nr, volatile void * addr); +extern void clear_bit(int nr, volatile void * addr); +extern void change_bit(int nr, volatile void * addr); +extern int test_and_set_bit(int nr, volatile void * addr); +extern int test_and_clear_bit(int nr, volatile void * addr); +extern int test_and_change_bit(int nr, volatile void * addr); +extern int find_first_zero_bit(void * addr, unsigned size); +extern int find_next_zero_bit(void * addr, int size, int offset); + +/* + * This routine doesn't need to be atomic. + */ +extern __inline__ int test_bit(int nr, const void * addr) +{ + return ((unsigned char *) addr)[nr >> 3] & (1U << (nr & 7)); +} + +/* + * ffz = Find First Zero in word. Undefined if no zero exists, + * so code should check against ~0UL first.. + */ +extern __inline__ unsigned long ffz(unsigned long word) +{ + int k; + + word = ~word; + k = 31; + if (word & 0x0000ffff) { k -= 16; word <<= 16; } + if (word & 0x00ff0000) { k -= 8; word <<= 8; } + if (word & 0x0f000000) { k -= 4; word <<= 4; } + if (word & 0x30000000) { k -= 2; word <<= 2; } + if (word & 0x40000000) { k -= 1; } + return k; +} + +#ifdef __KERNEL__ + +/* + * ffs: find first bit set. This is defined the same way as + * the libc and compiler builtin ffs routines, therefore + * differs in spirit from the above ffz (man ffs). + */ + +#define ffs(x) generic_ffs(x) + +/* + * hweightN: returns the hamming weight (i.e. the number + * of bits set) of a N-bit word + */ + +#define hweight32(x) generic_hweight32(x) +#define hweight16(x) generic_hweight16(x) +#define hweight8(x) generic_hweight8(x) + +#endif /* __KERNEL__ */ + +#ifdef __KERNEL__ + +#define ext2_set_bit test_and_set_bit +#define ext2_clear_bit test_and_clear_bit +#define ext2_test_bit test_bit +#define ext2_find_first_zero_bit find_first_zero_bit +#define ext2_find_next_zero_bit find_next_zero_bit + +/* Bitmap functions for the minix filesystem. */ +#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr) +#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr) +#define minix_test_bit(nr,addr) test_bit(nr,addr) +#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) + +#endif /* __KERNEL__ */ + +#endif /* _ARM_BITOPS_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/bugs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/bugs.h --- linux-2.2.14-rmk-mercury/include/asm/bugs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/bugs.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,13 @@ +/* + * include/asm-arm/bugs.h + * + * Copyright (C) 1995 Russell King + */ +#ifndef __ASM_BUGS_H +#define __ASM_BUGS_H + +#include + +#define check_bugs() processor._check_bugs() + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/byteorder.h linux-2.2.14-rmk-mercury-gcc3/include/asm/byteorder.h --- linux-2.2.14-rmk-mercury/include/asm/byteorder.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/byteorder.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,51 @@ +#ifndef __ASM_ARM_BYTEORDER_H +#define __ASM_ARM_BYTEORDER_H + +#include + +#if defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ < 8 + +/* Recent versions of GCC can open code the swaps at least as well + as we can write them by hand, so the "optimisations" here only + make sense for older compilers. Worse, some versions of GCC + actually go wrong in the presence of the assembler versions. + We play it safe and only turn them on for compilers older than + GCC 2.8.0. */ + +static __inline__ __const__ __u32 ___arch__swab32(__u32 x) +{ + unsigned long xx; + __asm__("eor\t%1, %0, %0, ror #16\n\t" + "bic\t%1, %1, #0xff0000\n\t" + "mov\t%0, %0, ror #8\n\t" + "eor\t%0, %0, %1, lsr #8\n\t" + : "=r" (x), "=&r" (xx) + : "0" (x)); + return x; +} + +static __inline__ __const__ __u16 ___arch__swab16(__u16 x) +{ + __asm__("eor\t%0, %0, %0, lsr #8\n\t" + "eor\t%0, %0, %0, lsl #8\n\t" + "bic\t%0, %0, #0xff0000\n\t" + "eor\t%0, %0, %0, lsr #8\n\t" + : "=r" (x) + : "0" (x)); + return x; +} + +#define __arch__swab32(x) ___arch__swab32(x) +#define __arch__swab16(x) ___arch__swab16(x) + +#endif /* __GNUC__ */ + +#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) +# define __BYTEORDER_HAS_U64__ +# define __SWAB_64_THRU_32__ +#endif + +#include + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/cache.h linux-2.2.14-rmk-mercury-gcc3/include/asm/cache.h --- linux-2.2.14-rmk-mercury/include/asm/cache.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/cache.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,11 @@ +/* + * include/asm-i386/cache.h + */ +#ifndef __ASMARM_CACHE_H +#define __ASMARM_CACHE_H + +#define L1_CACHE_BYTES 32 +#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) +#define SMP_CACHE_BYTES L1_CACHE_BYTES + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/checksum.h linux-2.2.14-rmk-mercury-gcc3/include/asm/checksum.h --- linux-2.2.14-rmk-mercury/include/asm/checksum.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/checksum.h 2007-07-10 12:46:28.000000000 +0100 @@ -0,0 +1,161 @@ +/* + * linux/include/asm-arm/checksum.h + * + * IP checksum routines + * + * Copyright (C) Original authors of ../asm-i386/checksum.h + * Copyright (C) 1996,1997,1998 Russell King + */ +#ifndef __ASM_ARM_CHECKSUM_H +#define __ASM_ARM_CHECKSUM_H + +#ifndef __ASM_ARM_SEGMENT_H +#include +#endif + +/* + * computes the checksum of a memory block at buff, length len, + * and adds in "sum" (32-bit) + * + * returns a 32-bit number suitable for feeding into itself + * or csum_tcpudp_magic + * + * this function must be called with even lengths, except + * for the last fragment, which may be odd + * + * it's best to have buff aligned on a 32-bit boundary + */ +unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum); + +/* + * the same as csum_partial, but copies from src while it + * checksums, and handles user-space pointer exceptions correctly, when needed. + * + * here even more important to align src and dst on a 32-bit (or even + * better 64-bit) boundary + */ + +unsigned int +csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum); + +unsigned int +csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr); + +#if 0 +/* + * This combination is currently not used, but possible: + */ +unsigned int +csum_partial_copy_to_user(const char *src, char *dst, int len, int sum, int *err_ptr); +#endif + +/* + * These are the old (and unsafe) way of doing checksums, a warning message will be + * printed if they are used and an exception occurs. + * + * these functions should go away after some time. + */ +#define csum_partial_copy_fromuser csum_partial_copy +unsigned int +csum_partial_copy(const char *src, char *dst, int len, int sum); + +/* + * This is a version of ip_compute_csum() optimized for IP headers, + * which always checksum on 4 octet boundaries. + * + * Converted and optimised for ARM by R. M. King. + * + * Note: the order that the LDM registers are loaded with respect to + * the adc's doesn't matter. + */ +static inline unsigned short +ip_fast_csum(unsigned char * iph, unsigned int ihl) +{ + unsigned int sum, tmp1; + + __asm__ __volatile__( +" sub %2, %2, #5\n" +" ldr %0, [%1], #4\n" +" ldr %3, [%1], #4\n" +" adds %0, %0, %3\n" +" ldr %3, [%1], #4\n" +" adcs %0, %0, %3\n" +" ldr %3, [%1], #4\n" +" adcs %0, %0, %3\n" +"1: ldr %3, [%1], #4\n" +" adcs %0, %0, %3\n" +" tst %2, #15\n" +" subne %2, %2, #1\n" +" bne 1b\n" +" adc %0, %0, #0\n" +" adds %0, %0, %0, lsl #16\n" +" addcs %0, %0, #0x10000\n" +" mvn %0, %0\n" +" mov %0, %0, lsr #16\n" + : "=&r" (sum), "=&r" (iph), "=&r" (ihl), "=&r" (tmp1) + : "1" (iph), "2" (ihl)); + return(sum); +} + +/* + * Fold a partial checksum without adding pseudo headers + */ +static inline unsigned int +csum_fold(unsigned int sum) +{ + __asm__( +" adds %0, %0, %0, lsl #16\n" +" addcs %0, %0, #0x10000" + : "=r" (sum) + : "0" (sum)); + return (~sum) >> 16; +} + +static inline unsigned long +csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, + unsigned short proto, unsigned int sum) +{ + __asm__( +" adds %0, %1, %2\n" +" adcs %0, %0, %3\n" +" adcs %0, %0, %4\n" +" adc %0, %0, #0" + : "=&r"(sum) + : "r" (sum), "r" (daddr), "r" (saddr), "r" ((ntohs(len)<<16)+proto*256)); + return sum; +} +/* + * computes the checksum of the TCP/UDP pseudo-header + * returns a 16-bit checksum, already complemented + */ +static inline unsigned short int +csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, + unsigned short proto, unsigned int sum) +{ + return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); +} + + +/* + * this routine is used for miscellaneous IP-like checksums, mainly + * in icmp.c + */ +static inline unsigned short +ip_compute_csum(unsigned char * buff, int len) +{ + return csum_fold(csum_partial(buff, len, 0)); +} + +#define _HAVE_ARCH_IPV6_CSUM +extern unsigned long +__csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, __u32 len, + __u32 proto, unsigned int sum); + +extern __inline__ unsigned short int +csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, __u16 len, + unsigned short proto, unsigned int sum) +{ + return csum_fold(__csum_ipv6_magic(saddr, daddr, htonl((__u32)len), + htonl(proto), sum)); +} +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/current.h linux-2.2.14-rmk-mercury-gcc3/include/asm/current.h --- linux-2.2.14-rmk-mercury/include/asm/current.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/current.h 2007-07-10 12:18:33.000000000 +0100 @@ -0,0 +1,23 @@ +#ifndef _ASMARM_CURRENT_H +#define _ASMARM_CURRENT_H + +static inline unsigned long get_sp(void) +{ + unsigned long sp; + __asm__ ("mov %0,sp" : "=r" (sp)); + return sp; +} + +static inline struct task_struct *get_current(void) +{ + struct task_struct *ts; + __asm__ __volatile__( +" bic %0, sp, #0x1f00\n" +" bic %0, %0, #0x00ff" + : "=r" (ts)); + return ts; +} + +#define current (get_current()) + +#endif /* _ASMARM_CURRENT_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/dec21285.h linux-2.2.14-rmk-mercury-gcc3/include/asm/dec21285.h --- linux-2.2.14-rmk-mercury/include/asm/dec21285.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/dec21285.h 2007-07-10 12:31:23.000000000 +0100 @@ -0,0 +1,130 @@ +/* + * include/asm-arm/dec21285.h + * + * Copyright (C) 1998 Russell King + * + * DC21285 registers + */ +#define DC21285_PCI_IACK 0x79000000 +#define DC21285_ARMCSR_BASE 0x42000000 +#define DC21285_PCI_TYPE_0_CONFIG 0x7b000000 +#define DC21285_PCI_TYPE_1_CONFIG 0x7a000000 +#define DC21285_OUTBOUND_WRITE_FLUSH 0x78000000 +#define DC21285_FLASH 0x41000000 +#define DC21285_PCI_IO 0x7c000000 +#define DC21285_PCI_MEM 0x80000000 + +#ifndef __ASSEMBLY__ +#include +#define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) +#else +#define DC21285_IO(x) (x) +#endif + +#define CSR_PCICMD DC21285_IO(0x0004) +#define CSR_CLASSREV DC21285_IO(0x0008) +#define CSR_PCICACHELINESIZE DC21285_IO(0x000c) +#define CSR_PCICSRBASE DC21285_IO(0x0010) +#define CSR_PCICSRIOBASE DC21285_IO(0x0014) +#define CSR_PCISDRAMBASE DC21285_IO(0x0018) +#define CSR_PCIROMBASE DC21285_IO(0x0030) +#define CSR_MBOX0 DC21285_IO(0x0050) +#define CSR_MBOX1 DC21285_IO(0x0054) +#define CSR_MBOX2 DC21285_IO(0x0058) +#define CSR_MBOX3 DC21285_IO(0x005c) +#define CSR_DOORBELL DC21285_IO(0x0060) +#define CSR_DOORBELL_SETUP DC21285_IO(0x0064) +#define CSR_ROMWRITEREG DC21285_IO(0x0068) +#define CSR_CSRBASEMASK DC21285_IO(0x00f8) +#define CSR_CSRBASEOFFSET DC21285_IO(0x00fc) +#define CSR_SDRAMBASEMASK DC21285_IO(0x0100) +#define CSR_SDRAMBASEOFFSET DC21285_IO(0x0104) +#define CSR_ROMBASEMASK DC21285_IO(0x0108) +#define CSR_SDRAMTIMING DC21285_IO(0x010c) +#define CSR_SDRAMADDRSIZE0 DC21285_IO(0x0110) +#define CSR_SDRAMADDRSIZE1 DC21285_IO(0x0114) +#define CSR_SDRAMADDRSIZE2 DC21285_IO(0x0118) +#define CSR_SDRAMADDRSIZE3 DC21285_IO(0x011c) +#define CSR_I2O_INFREEHEAD DC21285_IO(0x0120) +#define CSR_I2O_INPOSTTAIL DC21285_IO(0x0124) +#define CSR_I2O_OUTPOSTHEAD DC21285_IO(0x0128) +#define CSR_I2O_OUTFREETAIL DC21285_IO(0x012c) +#define CSR_I2O_INFREECOUNT DC21285_IO(0x0130) +#define CSR_I2O_OUTPOSTCOUNT DC21285_IO(0x0134) +#define CSR_I2O_INPOSTCOUNT DC21285_IO(0x0138) +#define CSR_SA110_CNTL DC21285_IO(0x013c) +#define SA110_CNTL_INITCMPLETE (1 << 0) +#define SA110_CNTL_ASSERTSERR (1 << 1) +#define SA110_CNTL_RXSERR (1 << 3) +#define SA110_CNTL_SA110DRAMPARITY (1 << 4) +#define SA110_CNTL_PCISDRAMPARITY (1 << 5) +#define SA110_CNTL_DMASDRAMPARITY (1 << 6) +#define SA110_CNTL_DISCARDTIMER (1 << 8) +#define SA110_CNTL_PCINRESET (1 << 9) +#define SA110_CNTL_I2O_256 (0 << 10) +#define SA110_CNTL_I20_512 (1 << 10) +#define SA110_CNTL_I2O_1024 (2 << 10) +#define SA110_CNTL_I2O_2048 (3 << 10) +#define SA110_CNTL_I2O_4096 (4 << 10) +#define SA110_CNTL_I2O_8192 (5 << 10) +#define SA110_CNTL_I2O_16384 (6 << 10) +#define SA110_CNTL_I2O_32768 (7 << 10) +#define SA110_CNTL_WATCHDOG (1 << 13) +#define SA110_CNTL_ROMWIDTH_UNDEF (0 << 14) +#define SA110_CNTL_ROMWIDTH_16 (1 << 14) +#define SA110_CNTL_ROMWIDTH_32 (2 << 14) +#define SA110_CNTL_ROMWIDTH_8 (3 << 14) +#define SA110_CNTL_ROMACCESSTIME(x) ((x)<<16) +#define SA110_CNTL_ROMBURSTTIME(x) ((x)<<20) +#define SA110_CNTL_ROMTRISTATETIME(x) ((x)<<24) +#define SA110_CNTL_XCSDIR(x) ((x)<<28) +#define SA110_CNTL_PCICFN (1 << 31) + +#define CSR_PCIADDR_EXTN DC21285_IO(0x0140) +#define CSR_PREFETCHMEMRANGE DC21285_IO(0x0144) +#define CSR_XBUS_CYCLE DC21285_IO(0x0148) +#define CSR_XBUS_IOSTROBE DC21285_IO(0x014c) +#define CSR_DOORBELL_PCI DC21285_IO(0x0150) +#define CSR_DOORBELL_SA110 DC21285_IO(0x0154) +#define CSR_UARTDR DC21285_IO(0x0160) +#define CSR_RXSTAT DC21285_IO(0x0164) +#define CSR_H_UBRLCR DC21285_IO(0x0168) +#define CSR_M_UBRLCR DC21285_IO(0x016c) +#define CSR_L_UBRLCR DC21285_IO(0x0170) +#define CSR_UARTCON DC21285_IO(0x0174) +#define CSR_UARTFLG DC21285_IO(0x0178) +#define CSR_IRQ_STATUS DC21285_IO(0x0180) +#define CSR_IRQ_RAWSTATUS DC21285_IO(0x0184) +#define CSR_IRQ_ENABLE DC21285_IO(0x0188) +#define CSR_IRQ_DISABLE DC21285_IO(0x018c) +#define CSR_IRQ_SOFT DC21285_IO(0x0190) +#define CSR_FIQ_STATUS DC21285_IO(0x0280) +#define CSR_FIQ_RAWSTATUS DC21285_IO(0x0284) +#define CSR_FIQ_ENABLE DC21285_IO(0x0288) +#define CSR_FIQ_DISABLE DC21285_IO(0x028c) +#define CSR_FIQ_SOFT DC21285_IO(0x0290) +#define CSR_TIMER1_LOAD DC21285_IO(0x0300) +#define CSR_TIMER1_VALUE DC21285_IO(0x0304) +#define CSR_TIMER1_CNTL DC21285_IO(0x0308) +#define CSR_TIMER1_CLR DC21285_IO(0x030c) +#define CSR_TIMER2_LOAD DC21285_IO(0x0320) +#define CSR_TIMER2_VALUE DC21285_IO(0x0324) +#define CSR_TIMER2_CNTL DC21285_IO(0x0328) +#define CSR_TIMER2_CLR DC21285_IO(0x032c) +#define CSR_TIMER3_LOAD DC21285_IO(0x0340) +#define CSR_TIMER3_VALUE DC21285_IO(0x0344) +#define CSR_TIMER3_CNTL DC21285_IO(0x0348) +#define CSR_TIMER3_CLR DC21285_IO(0x034c) +#define CSR_TIMER4_LOAD DC21285_IO(0x0360) +#define CSR_TIMER4_VALUE DC21285_IO(0x0364) +#define CSR_TIMER4_CNTL DC21285_IO(0x0368) +#define CSR_TIMER4_CLR DC21285_IO(0x036c) + +#define TIMER_CNTL_ENABLE (1 << 7) +#define TIMER_CNTL_AUTORELOAD (1 << 6) +#define TIMER_CNTL_DIV1 (0) +#define TIMER_CNTL_DIV16 (1 << 2) +#define TIMER_CNTL_DIV256 (2 << 2) +#define TIMER_CNTL_CNTEXT (3 << 2) + + diff -Nru linux-2.2.14-rmk-mercury/include/asm/delay.h linux-2.2.14-rmk-mercury-gcc3/include/asm/delay.h --- linux-2.2.14-rmk-mercury/include/asm/delay.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/delay.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,32 @@ +#ifndef __ASM_ARM_DELAY_H +#define __ASM_ARM_DELAY_H + +/* + * Copyright (C) 1995 Russell King + * + * Delay routines, using a pre-computed "loops_per_second" value. + */ + +extern void __delay(int loops); + +/* + * division by multiplication: you don't have to worry about + * loss of precision. + * + * Use only for very small delays ( < 1 msec). Should probably use a + * lookup table, really, as the multiplications take much too long with + * short delays. This is a "reasonable" implementation, though (and the + * first constant multiplications gets optimized away if the delay is + * a constant) + */ +extern void udelay(unsigned long usecs); + +extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) +{ + return a * b / c; +} + + + +#endif /* defined(_ARM_DELAY_H) */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm/dma.h --- linux-2.2.14-rmk-mercury/include/asm/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/dma.h 2007-07-10 12:29:49.000000000 +0100 @@ -0,0 +1,140 @@ +#ifndef __ASM_ARM_DMA_H +#define __ASM_ARM_DMA_H + +typedef unsigned int dmach_t; + +#include +#include +#include +#include +#include + +/* + * DMA modes + */ +typedef unsigned int dmamode_t; + +#define DMA_MODE_MASK 3 + +#define DMA_MODE_READ 0 +#define DMA_MODE_WRITE 1 +#define DMA_MODE_CASCADE 2 +#define DMA_AUTOINIT 4 + +typedef struct { + unsigned long address; + unsigned long length; +} dmasg_t; + +extern const char dma_str[]; + +extern spinlock_t dma_spin_lock; + +extern __inline__ unsigned long claim_dma_lock(void) +{ + unsigned long flags; + spin_lock_irqsave(&dma_spin_lock, flags); + return flags; +} + +extern __inline__ void release_dma_lock(unsigned long flags) +{ + spin_unlock_irqrestore(&dma_spin_lock, flags); +} + +/* Clear the 'DMA Pointer Flip Flop'. + * Write 0 for LSB/MSB, 1 for MSB/LSB access. + * + * NOTE: This is an architecture specific function, and should + * be hidden from the drivers. + */ +#define clear_dma_ff(channel) + +/* Set only the page register bits of the transfer address. + * + * NOTE: This is an architecture specific function, and should + * be hidden from the drivers + */ +extern __inline__ void set_dma_page(dmach_t channel, char pagenr) +{ + printk(dma_str, "set_dma_page", channel); +} + +/* Request a DMA channel + * + * Some architectures may need to do allocate an interrupt + */ +extern int request_dma(dmach_t channel, const char * device_id); + +/* Free a DMA channel + * + * Some architectures may need to do free an interrupt + */ +extern void free_dma(dmach_t channel); + +/* Enable DMA for this channel + * + * On some architectures, this may have other side effects like + * enabling an interrupt and setting the DMA registers. + */ +extern void enable_dma(dmach_t channel); + +/* Disable DMA for this channel + * + * On some architectures, this may have other side effects like + * disabling an interrupt or whatever. + */ +extern void disable_dma(dmach_t channel); + +/* Set the DMA scatter gather list for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA address immediately, but defer it to the enable_dma(). + */ +extern void set_dma_sg(dmach_t channel, dmasg_t *sg, int nr_sg); + +/* Set the DMA address for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA address immediately, but defer it to the enable_dma(). + */ +extern void set_dma_addr(dmach_t channel, unsigned long physaddr); + +/* Set the DMA byte count for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA count immediately, but defer it to the enable_dma(). + */ +extern void set_dma_count(dmach_t channel, unsigned long count); + +/* Set the transfer direction for this channel + * + * This should not be called if a DMA channel is enabled, + * especially since some DMA architectures don't update the + * DMA transfer direction immediately, but defer it to the + * enable_dma(). + */ +extern void set_dma_mode(dmach_t channel, dmamode_t mode); + +/* Get DMA residue count. After a DMA transfer, this + * should return zero. Reading this while a DMA transfer is + * still in progress will return unpredictable results. + * If called before the channel has been used, it may return 1. + * Otherwise, it returns the number of _bytes_ left to transfer. + */ +extern int get_dma_residue(dmach_t channel); + +#ifndef NO_DMA +#define NO_DMA 255 +#endif + +#ifdef CONFIG_PCI_QUIRKS +extern int isa_dma_bridge_buggy; +#else +#define isa_dma_bridge_buggy (0) +#endif + +#endif /* _ARM_DMA_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/ecard.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ecard.h --- linux-2.2.14-rmk-mercury/include/asm/ecard.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ecard.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,250 @@ +/* + * linux/include/asm-arm/ecard.h + * + * definitions for expansion cards + * + * This is a new system as from Linux 1.2.3 + * + * Changelog: + * 11-12-1996 RMK Further minor improvements + * 12-09-1997 RMK Added interrupt enable/disable for card level + * + * Reference: Acorns Risc OS 3 Programmers Reference Manuals. + */ + +#ifndef __ASM_ECARD_H +#define __ASM_ECARD_H + +/* + * Currently understood cards (but not necessarily + * supported): + * Manufacturer Product ID + */ +#define MANU_ACORN 0x0000 +#define PROD_ACORN_SCSI 0x0002 +#define PROD_ACORN_ETHER1 0x0003 +#define PROD_ACORN_MFM 0x000b + +#define MANU_ANT2 0x0011 +#define PROD_ANT_ETHER3 0x00a4 + +#define MANU_ATOMWIDE 0x0017 +#define PROD_ATOMWIDE_3PSERIAL 0x0090 + +#define MANU_IRLAM_INSTRUMENTS 0x001f +#define MANU_IRLAM_INSTRUMENTS_ETHERN 0x5678 + +#define MANU_OAK 0x0021 +#define PROD_OAK_SCSI 0x0058 + +#define MANU_MORLEY 0x002b +#define PROD_MORLEY_SCSI_UNCACHED 0x0067 + +#define MANU_CUMANA 0x003a +#define PROD_CUMANA_SCSI_1 0x00a0 +#define PROD_CUMANA_SCSI_2 0x003a + +#define MANU_ICS 0x003c +#define PROD_ICS_IDE 0x00ae + +#define MANU_ICS2 0x003d +#define PROD_ICS2_IDE 0x00ae + +#define MANU_SERPORT 0x003f +#define PROD_SERPORT_DSPORT 0x00b9 + +#define MANU_I3 0x0046 +#define PROD_I3_ETHERLAN500 0x00d4 +#define PROD_I3_ETHERLAN600 0x00ec +#define PROD_I3_ETHERLAN600A 0x011e + +#define MANU_ANT 0x0053 +#define PROD_ANT_ETHERB 0x00e4 + +#define MANU_ALSYSTEMS 0x005b +#define PROD_ALSYS_SCSIATAPI 0x0107 + +#define MANU_MCS 0x0063 +#define PROD_MCS_CONNECT32 0x0125 + +#define MANU_EESOX 0x0064 +#define PROD_EESOX_SCSI2 0x008c + +#define MANU_YELLOWSTONE 0x0096 +#define PROD_YELLOWSTONE_RAPIDE32 0x0120 + +#ifdef ECARD_C +#define CONST +#else +#define CONST const +#endif + +#define MAX_ECARDS 9 + +typedef enum { /* Cards address space */ + ECARD_IOC, + ECARD_MEMC, + ECARD_EASI +} card_type_t; + +typedef enum { /* Speed for ECARD_IOC space */ + ECARD_SLOW = 0, + ECARD_MEDIUM = 1, + ECARD_FAST = 2, + ECARD_SYNC = 3 +} card_speed_t; + +typedef struct { /* Card ID structure */ + unsigned short manufacturer; + unsigned short product; +} card_ids; + +struct in_ecid { /* Packed card ID information */ + unsigned short product; /* Product code */ + unsigned short manufacturer; /* Manufacturer code */ + unsigned char id:4; /* Simple ID */ + unsigned char cd:1; /* Chunk dir present */ + unsigned char is:1; /* Interrupt status pointers */ + unsigned char w:2; /* Width */ + unsigned char country; /* Country */ + unsigned char irqmask; /* IRQ mask */ + unsigned char fiqmask; /* FIQ mask */ + unsigned long irqoff; /* IRQ offset */ + unsigned long fiqoff; /* FIQ offset */ +}; + +typedef struct expansion_card ecard_t; +typedef unsigned long *loader_t; + +typedef struct { /* Card handler routines */ + void (*irqenable)(ecard_t *ec, int irqnr); + void (*irqdisable)(ecard_t *ec, int irqnr); + int (*irqpending)(ecard_t *ec); + void (*fiqenable)(ecard_t *ec, int fiqnr); + void (*fiqdisable)(ecard_t *ec, int fiqnr); + int (*fiqpending)(ecard_t *ec); +} expansioncard_ops_t; + +/* + * This contains all the info needed on an expansion card + */ +struct expansion_card { + struct expansion_card *next; + + /* Public data */ + volatile unsigned char *irqaddr; /* address of IRQ register */ + volatile unsigned char *fiqaddr; /* address of FIQ register */ + unsigned char irqmask; /* IRQ mask */ + unsigned char fiqmask; /* FIQ mask */ + unsigned char claimed; /* Card claimed? */ + + void *irq_data; /* Data for use for IRQ by card */ + void *fiq_data; /* Data for use for FIQ by card */ + expansioncard_ops_t *ops; /* Enable/Disable Ops for card */ + + CONST unsigned int slot_no; /* Slot number */ + CONST unsigned int dma; /* DMA number (for request_dma) */ + CONST unsigned int irq; /* IRQ number (for request_irq) */ + CONST unsigned int fiq; /* FIQ number (for request_irq) */ + CONST card_type_t type; /* Type of card */ + CONST struct in_ecid cid; /* Card Identification */ + + /* Private internal data */ + const char *card_desc; /* Card description */ + CONST unsigned int podaddr; /* Base Linux address for card */ + CONST loader_t loader; /* loader program */ +}; + +struct in_chunk_dir { + unsigned int start_offset; + union { + unsigned char string[256]; + unsigned char data[1]; + } d; +}; + +/* + * ecard_claim: claim an expansion card entry + */ +#define ecard_claim(ec) ((ec)->claimed = 1) + +/* + * ecard_release: release an expansion card entry + */ +#define ecard_release(ec) ((ec)->claimed = 0) + +/* + * Start finding cards from the top of the list + */ +extern void ecard_startfind (void); + +/* + * Find an expansion card with the correct cid, product and manufacturer code + */ +extern struct expansion_card *ecard_find (int cid, const card_ids *ids); + +/* + * Read a chunk from an expansion card + * cd : where to put read data + * ec : expansion card info struct + * id : id number to find + * num: (n+1)'th id to find. + */ +extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec, int id, int num); + +/* + * Obtain the address of a card + */ +extern unsigned int ecard_address (struct expansion_card *ec, card_type_t card_type, card_speed_t speed); + +#ifdef ECARD_C +/* Definitions internal to ecard.c - for it's use only!! + * + * External expansion card header as read from the card + */ +struct ex_ecid { + unsigned char r_irq:1; + unsigned char r_zero:1; + unsigned char r_fiq:1; + unsigned char r_id:4; + unsigned char r_a:1; + + unsigned char r_cd:1; + unsigned char r_is:1; + unsigned char r_w:2; + unsigned char r_r1:4; + + unsigned char r_r2:8; + + unsigned char r_prod[2]; + + unsigned char r_manu[2]; + + unsigned char r_country; + + unsigned char r_irqmask; + unsigned char r_irqoff[3]; + + unsigned char r_fiqmask; + unsigned char r_fiqoff[3]; +}; + +/* + * Chunk directory entry as read from the card + */ +struct ex_chunk_dir { + unsigned char r_id; + unsigned char r_len[3]; + unsigned long r_start; + union { + char string[256]; + char data[1]; + } d; +#define c_id(x) ((x)->r_id) +#define c_len(x) ((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16)) +#define c_start(x) ((x)->r_start) +}; + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/elf.h linux-2.2.14-rmk-mercury-gcc3/include/asm/elf.h --- linux-2.2.14-rmk-mercury/include/asm/elf.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/elf.h 2007-07-10 12:31:26.000000000 +0100 @@ -0,0 +1,68 @@ +#ifndef __ASMARM_ELF_H +#define __ASMARM_ELF_H + +/* + * ELF register definitions.. + */ + +#include +#include +#include + +typedef unsigned long elf_greg_t; + +#define EM_ARM 40 + +#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef struct { void *null; } elf_fpregset_t; + +/* + * This is used to ensure we don't load something for the wrong architecture. + */ +#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) ) + +/* + * These are used to set parameters in the core dumps. + */ +#define ELF_CLASS ELFCLASS32 +#define ELF_DATA ELFDATA2LSB; +#define ELF_ARCH EM_ARM + +#define USE_ELF_CORE_DUMP + +/* This is the location that an ET_DYN program is loaded if exec'ed. Typical + use of this is to invoke "./ld.so someprog" to test out a new version of + the loader. We need to make sure that it is out of the way of the program + that it will "exec", and that there is sufficient room for the brk. */ + +#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) + +/* When the program starts, a1 contains a pointer to a function to be + registered with atexit, as per the SVR4 ABI. A value of 0 means we + have no such handler. */ +#define ELF_PLAT_INIT(_r) (_r)->ARM_r0 = 0 + +/* This yields a mask that user programs can use to figure out what + instruction set this cpu supports. */ + +#define ELF_HWCAP (armidlist[armidindex].hwcap) + +/* This yields a string that ld.so will use to load implementation + specific libraries for optimization. This is more specific in + intent than poking at uname or /proc/cpuinfo. */ + +/* For now we just provide a fairly general string that describes the + processor family. This could be made more specific later if someone + implemented optimisations that require it. 26-bit CPUs give you + "v1l" for ARM2 (no SWP) and "v2l" for anything else (ARM1 isn't + supported). 32-bit CPUs give you "v3[lb]" for anything based on an + ARM6 or ARM7 core and "armv4[lb]" for anything based on a StrongARM-1 + core. */ + +#define ELF_PLATFORM_SIZE 8 +extern char elf_platform[]; +#define ELF_PLATFORM (elf_platform) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/errno.h linux-2.2.14-rmk-mercury-gcc3/include/asm/errno.h --- linux-2.2.14-rmk-mercury/include/asm/errno.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/errno.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,132 @@ +#ifndef _ARM_ERRNO_H +#define _ARM_ERRNO_H + +#define EPERM 1 /* Operation not permitted */ +#define ENOENT 2 /* No such file or directory */ +#define ESRCH 3 /* No such process */ +#define EINTR 4 /* Interrupted system call */ +#define EIO 5 /* I/O error */ +#define ENXIO 6 /* No such device or address */ +#define E2BIG 7 /* Arg list too long */ +#define ENOEXEC 8 /* Exec format error */ +#define EBADF 9 /* Bad file number */ +#define ECHILD 10 /* No child processes */ +#define EAGAIN 11 /* Try again */ +#define ENOMEM 12 /* Out of memory */ +#define EACCES 13 /* Permission denied */ +#define EFAULT 14 /* Bad address */ +#define ENOTBLK 15 /* Block device required */ +#define EBUSY 16 /* Device or resource busy */ +#define EEXIST 17 /* File exists */ +#define EXDEV 18 /* Cross-device link */ +#define ENODEV 19 /* No such device */ +#define ENOTDIR 20 /* Not a directory */ +#define EISDIR 21 /* Is a directory */ +#define EINVAL 22 /* Invalid argument */ +#define ENFILE 23 /* File table overflow */ +#define EMFILE 24 /* Too many open files */ +#define ENOTTY 25 /* Not a typewriter */ +#define ETXTBSY 26 /* Text file busy */ +#define EFBIG 27 /* File too large */ +#define ENOSPC 28 /* No space left on device */ +#define ESPIPE 29 /* Illegal seek */ +#define EROFS 30 /* Read-only file system */ +#define EMLINK 31 /* Too many links */ +#define EPIPE 32 /* Broken pipe */ +#define EDOM 33 /* Math argument out of domain of func */ +#define ERANGE 34 /* Math result not representable */ +#define EDEADLK 35 /* Resource deadlock would occur */ +#define ENAMETOOLONG 36 /* File name too long */ +#define ENOLCK 37 /* No record locks available */ +#define ENOSYS 38 /* Function not implemented */ +#define ENOTEMPTY 39 /* Directory not empty */ +#define ELOOP 40 /* Too many symbolic links encountered */ +#define EWOULDBLOCK EAGAIN /* Operation would block */ +#define ENOMSG 42 /* No message of desired type */ +#define EIDRM 43 /* Identifier removed */ +#define ECHRNG 44 /* Channel number out of range */ +#define EL2NSYNC 45 /* Level 2 not synchronized */ +#define EL3HLT 46 /* Level 3 halted */ +#define EL3RST 47 /* Level 3 reset */ +#define ELNRNG 48 /* Link number out of range */ +#define EUNATCH 49 /* Protocol driver not attached */ +#define ENOCSI 50 /* No CSI structure available */ +#define EL2HLT 51 /* Level 2 halted */ +#define EBADE 52 /* Invalid exchange */ +#define EBADR 53 /* Invalid request descriptor */ +#define EXFULL 54 /* Exchange full */ +#define ENOANO 55 /* No anode */ +#define EBADRQC 56 /* Invalid request code */ +#define EBADSLT 57 /* Invalid slot */ + +#define EDEADLOCK EDEADLK + +#define EBFONT 59 /* Bad font file format */ +#define ENOSTR 60 /* Device not a stream */ +#define ENODATA 61 /* No data available */ +#define ETIME 62 /* Timer expired */ +#define ENOSR 63 /* Out of streams resources */ +#define ENONET 64 /* Machine is not on the network */ +#define ENOPKG 65 /* Package not installed */ +#define EREMOTE 66 /* Object is remote */ +#define ENOLINK 67 /* Link has been severed */ +#define EADV 68 /* Advertise error */ +#define ESRMNT 69 /* Srmount error */ +#define ECOMM 70 /* Communication error on send */ +#define EPROTO 71 /* Protocol error */ +#define EMULTIHOP 72 /* Multihop attempted */ +#define EDOTDOT 73 /* RFS specific error */ +#define EBADMSG 74 /* Not a data message */ +#define EOVERFLOW 75 /* Value too large for defined data type */ +#define ENOTUNIQ 76 /* Name not unique on network */ +#define EBADFD 77 /* File descriptor in bad state */ +#define EREMCHG 78 /* Remote address changed */ +#define ELIBACC 79 /* Can not access a needed shared library */ +#define ELIBBAD 80 /* Accessing a corrupted shared library */ +#define ELIBSCN 81 /* .lib section in a.out corrupted */ +#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ +#define ELIBEXEC 83 /* Cannot exec a shared library directly */ +#define EILSEQ 84 /* Illegal byte sequence */ +#define ERESTART 85 /* Interrupted system call should be restarted */ +#define ESTRPIPE 86 /* Streams pipe error */ +#define EUSERS 87 /* Too many users */ +#define ENOTSOCK 88 /* Socket operation on non-socket */ +#define EDESTADDRREQ 89 /* Destination address required */ +#define EMSGSIZE 90 /* Message too long */ +#define EPROTOTYPE 91 /* Protocol wrong type for socket */ +#define ENOPROTOOPT 92 /* Protocol not available */ +#define EPROTONOSUPPORT 93 /* Protocol not supported */ +#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ +#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ +#define EPFNOSUPPORT 96 /* Protocol family not supported */ +#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ +#define EADDRINUSE 98 /* Address already in use */ +#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ +#define ENETDOWN 100 /* Network is down */ +#define ENETUNREACH 101 /* Network is unreachable */ +#define ENETRESET 102 /* Network dropped connection because of reset */ +#define ECONNABORTED 103 /* Software caused connection abort */ +#define ECONNRESET 104 /* Connection reset by peer */ +#define ENOBUFS 105 /* No buffer space available */ +#define EISCONN 106 /* Transport endpoint is already connected */ +#define ENOTCONN 107 /* Transport endpoint is not connected */ +#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ +#define ETOOMANYREFS 109 /* Too many references: cannot splice */ +#define ETIMEDOUT 110 /* Connection timed out */ +#define ECONNREFUSED 111 /* Connection refused */ +#define EHOSTDOWN 112 /* Host is down */ +#define EHOSTUNREACH 113 /* No route to host */ +#define EALREADY 114 /* Operation already in progress */ +#define EINPROGRESS 115 /* Operation now in progress */ +#define ESTALE 116 /* Stale NFS file handle */ +#define EUCLEAN 117 /* Structure needs cleaning */ +#define ENOTNAM 118 /* Not a XENIX named type file */ +#define ENAVAIL 119 /* No XENIX semaphores available */ +#define EISNAM 120 /* Is a named type file */ +#define EREMOTEIO 121 /* Remote I/O error */ +#define EDQUOT 122 /* Quota exceeded */ + +#define ENOMEDIUM 123 /* No medium found */ +#define EMEDIUMTYPE 124 /* Wrong medium type */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/fcntl.h linux-2.2.14-rmk-mercury-gcc3/include/asm/fcntl.h --- linux-2.2.14-rmk-mercury/include/asm/fcntl.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/fcntl.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,63 @@ +#ifndef _ARM_FCNTL_H +#define _ARM_FCNTL_H + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 010000 +#define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_DIRECTORY 040000 /* must be a directory */ +#define O_NOFOLLOW 0100000 /* don't follow links */ + +#define F_DUPFD 0 /* dup */ +#define F_GETFD 1 /* get f_flags */ +#define F_SETFD 2 /* set f_flags */ +#define F_GETFL 3 /* more flags (cloexec) */ +#define F_SETFL 4 +#define F_GETLK 5 +#define F_SETLK 6 +#define F_SETLKW 7 + +#define F_SETOWN 8 /* for sockets. */ +#define F_GETOWN 9 /* for sockets. */ +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ + +/* for F_[GET|SET]FL */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* for posix fcntl() and lockf() */ +#define F_RDLCK 0 +#define F_WRLCK 1 +#define F_UNLCK 2 + +/* for old implementation of bsd flock () */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +/* operations for bsd flock(), also used by the kernel implementation */ +#define LOCK_SH 1 /* shared lock */ +#define LOCK_EX 2 /* exclusive lock */ +#define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +#define LOCK_UN 8 /* remove lock */ + +struct flock { + short l_type; + short l_whence; + off_t l_start; + off_t l_len; + pid_t l_pid; +}; + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/fiq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/fiq.h --- linux-2.2.14-rmk-mercury/include/asm/fiq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/fiq.h 2007-07-10 12:29:10.000000000 +0100 @@ -0,0 +1,35 @@ +/* + * linux/include/asm-arm/fiq.h + * + * Support for FIQ on ARM architectures. + * Written by Philip Blundell , 1998 + * Re-written by Russell King + */ + +#ifndef __ASM_FIQ_H +#define __ASM_FIQ_H + +#include + +struct fiq_handler { + struct fiq_handler *next; + /* Name + */ + const char *name; + /* Called to ask driver to relinquish/ + * reacquire FIQ + * return zero to accept, or - + */ + int (*fiq_op)(void *, int relinquish); + /* data for the relinquish/reacquire functions + */ + void *dev_id; +}; + +extern int claim_fiq(struct fiq_handler *f); +extern void release_fiq(struct fiq_handler *f); +extern void set_fiq_handler(void *start, unsigned int length); +extern void set_fiq_regs(struct pt_regs *regs); +extern void get_fiq_regs(struct pt_regs *regs); + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/floppy.h linux-2.2.14-rmk-mercury-gcc3/include/asm/floppy.h --- linux-2.2.14-rmk-mercury/include/asm/floppy.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/floppy.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,139 @@ +/* + * linux/include/asm-arm/floppy.h + * + * (C) 1996 Russell King + */ +#ifndef __ASM_ARM_FLOPPY_H +#define __ASM_ARM_FLOPPY_H +#if 0 +#include +#endif + +#define fd_outb(val,port) \ + do { \ + if ((port) == FD_DOR) \ + fd_setdor((val)); \ + else \ + outb((val),(port)); \ + } while(0) + +#define fd_inb(port) inb((port)) +#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ + SA_INTERRUPT|SA_SAMPLE_RANDOM,"floppy",NULL) +#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) +#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) +#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) + +#define fd_request_dma() request_dma(FLOPPY_DMA,"floppy") +#define fd_free_dma() free_dma(FLOPPY_DMA) +#define fd_disable_dma() disable_dma(FLOPPY_DMA) +#define fd_enable_dma() enable_dma(FLOPPY_DMA) +#define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) +#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, (mode)) +#define fd_set_dma_addr(addr) set_dma_addr(FLOPPY_DMA, virt_to_bus((addr))) +#define fd_set_dma_count(len) set_dma_count(FLOPPY_DMA, (len)) +#define fd_cacheflush(addr,sz) + +/* need to clean up dma.h */ +#define DMA_FLOPPYDISK DMA_FLOPPY + +/* Floppy_selects is the list of DOR's to select drive fd + * + * On initialisation, the floppy list is scanned, and the drives allocated + * in the order that they are found. This is done by seeking the drive + * to a non-zero track, and then restoring it to track 0. If an error occurs, + * then there is no floppy drive present. [to be put back in again] + */ +static unsigned char floppy_selects[2][4] = +{ + { 0x10, 0x21, 0x23, 0x33 }, + { 0x10, 0x21, 0x23, 0x33 } +}; + +#define fd_setdor(dor) \ +do { \ + int new_dor = (dor); \ + if (new_dor & 0xf0) \ + new_dor = (new_dor & 0x0c) | floppy_selects[fdc][new_dor & 3]; \ + else \ + new_dor &= 0x0c; \ + outb(new_dor, FD_DOR); \ +} while (0) + +/* + * Someday, we'll automatically detect which drives are present... + */ +extern __inline__ void fd_scandrives (void) +{ +#if 0 + int floppy, drive_count; + + fd_disable_irq(); + raw_cmd = &default_raw_cmd; + raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_SEEK; + raw_cmd->track = 0; + raw_cmd->rate = ?; + drive_count = 0; + for (floppy = 0; floppy < 4; floppy ++) { + current_drive = drive_count; + /* + * Turn on floppy motor + */ + if (start_motor(redo_fd_request)) + continue; + /* + * Set up FDC + */ + fdc_specify(); + /* + * Tell FDC to recalibrate + */ + output_byte(FD_RECALIBRATE); + LAST_OUT(UNIT(floppy)); + /* wait for command to complete */ + if (!successful) { + int i; + for (i = drive_count; i < 3; i--) + floppy_selects[fdc][i] = floppy_selects[fdc][i + 1]; + floppy_selects[fdc][3] = 0; + floppy -= 1; + } else + drive_count++; + } +#else + floppy_selects[0][0] = 0x10; + floppy_selects[0][1] = 0x21; + floppy_selects[0][2] = 0x23; + floppy_selects[0][3] = 0x33; +#endif +} + +#define FDC1 (0x3f0) +static int FDC2 = -1; + +#define FLOPPY0_TYPE 4 +#define FLOPPY1_TYPE 4 + +#define N_FDC 1 +#define N_DRIVE 8 + +#define FLOPPY_MOTOR_MASK 0xf0 + +#define CROSS_64KB(a,s) (0) + +/* + * This allows people to reverse the order of + * fd0 and fd1, in case their hardware is + * strangely connected (as some RiscPCs + * and A5000s seem to be). + */ +static void driveswap(int *ints, int dummy, int dummy2) +{ + floppy_selects[0][0] ^= floppy_selects[0][1]; + floppy_selects[0][1] ^= floppy_selects[0][0]; + floppy_selects[0][0] ^= floppy_selects[0][1]; +} + +#define EXTRA_FLOPPY_PARAMS ,{ "driveswap", &driveswap, NULL, 0, 0 } + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/hardirq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/hardirq.h --- linux-2.2.14-rmk-mercury/include/asm/hardirq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/hardirq.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,28 @@ +#ifndef __ASM_HARDIRQ_H +#define __ASM_HARDIRQ_H + +#include + +extern unsigned int local_irq_count[NR_CPUS]; + +/* + * Are we in an interrupt context? Either doing bottom half + * or hardware interrupt processing? + */ +#define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0) + +#ifndef __SMP__ + +#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0) +#define hardirq_endlock(cpu) do { } while (0) + +#define hardirq_enter(cpu) (local_irq_count[cpu]++) +#define hardirq_exit(cpu) (local_irq_count[cpu]--) + +#define synchronize_irq() do { } while (0) + +#else +#error SMP not supported +#endif /* __SMP__ */ + +#endif /* __ASM_HARDIRQ_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm/hardware.h --- linux-2.2.14-rmk-mercury/include/asm/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/hardware.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,26 @@ +/* + * linux/include/asm-arm/hardware.h + * + * Copyright (C) 1996 Russell King + * + * Common hardware definitions + */ + +#ifndef __ASM_HARDWARE_H +#define __ASM_HARDWARE_H + +#include + +#ifdef HAS_EXPMASK +#ifndef __ASSEMBLER__ +#define __EXPMASK(offset) (((volatile unsigned char *)EXPMASK_BASE)[offset]) +#else +#define __EXPMASK(offset) offset +#endif + +#define EXPMASK_STATUS __EXPMASK(0x00) +#define EXPMASK_ENABLE __EXPMASK(0x04) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ide.h --- linux-2.2.14-rmk-mercury/include/asm/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ide.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,51 @@ +/* + * linux/include/asm-arm/ide.h + * + * Copyright (C) 1994-1996 Linus Torvalds & authors + */ + +/* + * This file contains the i386 architecture specific IDE code. + */ + +#ifndef __ASMARM_IDE_H +#define __ASMARM_IDE_H + +#ifdef __KERNEL__ + +#ifndef MAX_HWIFS +#define MAX_HWIFS 4 +#endif + +#define ide__sti() __sti() + +#include + +typedef union { + unsigned all : 8; /* all of the bits together */ + struct { + unsigned head : 4; /* always zeros here */ + unsigned unit : 1; /* drive select number, 0 or 1 */ + unsigned bit5 : 1; /* always 1 */ + unsigned lba : 1; /* using LBA instead of CHS */ + unsigned bit7 : 1; /* always 1 */ + } b; + } select_t; + +#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) +#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) +#define ide_check_region(from,extent) check_region((from), (extent)) +#define ide_request_region(from,extent,name) request_region((from), (extent), (name)) +#define ide_release_region(from,extent) release_region((from), (extent)) + +/* + * The following are not needed for the non-m68k ports + */ +#define ide_ack_intr(hwif) (1) +#define ide_fix_driveid(id) do {} while (0) +#define ide_release_lock(lock) do {} while (0) +#define ide_get_lock(lock, hdlr, data) do {} while (0) + +#endif /* __KERNEL__ */ + +#endif /* __ASMi386_IDE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/init.h linux-2.2.14-rmk-mercury-gcc3/include/asm/init.h --- linux-2.2.14-rmk-mercury/include/asm/init.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/init.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,32 @@ +#ifndef _ASMARM_INIT_H +#define _ASMARM_INIT_H + +#include + +/* C routines */ + +#ifdef CONFIG_TEXT_SECTIONS + +#define __init __attribute__ ((__section__ (".text.init"))) +#define __initfunc(__arginit) \ + __arginit __init; \ + __arginit + +#else + +#define __init +#define __initfunc(__arginit) __arginit + +#endif + +#define __initdata __attribute__ ((__section__ (".data.init"))) + +/* Assembly routines */ +#define __INIT .section ".text.init",@alloc,@execinstr +#define __INITDATA .section ".data.init",@alloc,@write +#define __FINIT .previous + +#define __cacheline_aligned __attribute__ \ + ((__aligned__ (L1_CACHE_BYTES))) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/io.h --- linux-2.2.14-rmk-mercury/include/asm/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/io.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,249 @@ +/* + * linux/include/asm-arm/io.h + * + * Copyright (C) 1996 Russell King + * + * Modifications: + * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both + * constant addresses and variable addresses. + * 04-Dec-1997 RMK Moved a lot of this stuff to the new architecture + * specific IO header files. + * 27-Mar-1999 PJB Second parameter of memcpy_toio is const.. + * 04-Apr-1999 PJB Added check_signature. + */ +#ifndef __ASM_ARM_IO_H +#define __ASM_ARM_IO_H + +#ifdef __KERNEL__ + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); +extern void __iounmap(void *addr); + +#endif + +#include +#include +#include +#include + +/* unsigned long virt_to_phys(void *x) */ +#define virt_to_phys(x) (__virt_to_phys((unsigned long)(x))) + +/* void *phys_to_virt(unsigned long x) */ +#define phys_to_virt(x) ((void *)(__phys_to_virt((unsigned long)(x)))) + +/* + * Virtual view <-> DMA view memory address translations + * virt_to_bus: Used to translate the virtual address to an + * address suitable to be passed to set_dma_addr + * bus_to_virt: Used to convert an address for DMA operations + * to an address that the kernel can use. + */ +#define virt_to_bus(x) (__virt_to_bus((unsigned long)(x))) +#define bus_to_virt(x) ((void *)(__bus_to_virt((unsigned long)(x)))) + +/* + * These macros actually build the multi-value IO function prototypes + */ +#define __OUTS(s,i,x) extern void outs##s(unsigned int port, const void *from, int len); +#define __INS(s,i,x) extern void ins##s(unsigned int port, void *to, int len); + +#define __IO(s,i,x) \ + __OUTS(s,i,x) \ + __INS(s,i,x) + +__IO(b,"b",char) +__IO(w,"h",short) +__IO(l,"",long) + +/* + * Note that due to the way __builtin_constant_t() works, you + * - can't use it inside an inline function (it will never be true) + * - you don't have to worry about side effects withing the __builtin.. + */ +#ifdef __outbc +#define outb(val,port) \ + (__builtin_constant_p((port)) ? __outbc((val),(port)) : __outb((val),(port))) +#else +#define outb(val,port) __outb((val),(port)) +#endif + +#ifdef __outwc +#define outw(val,port) \ + (__builtin_constant_p((port)) ? __outwc((val),(port)) : __outw((val),(port))) +#else +#define outw(val,port) __outw((val),(port)) +#endif + +#ifdef __outlc +#define outl(val,port) \ + (__builtin_constant_p((port)) ? __outlc((val),(port)) : __outl((val),(port))) +#else +#define outl(val,port) __outl((val),(port)) +#endif + +#ifdef __inbc +#define inb(port) \ + (__builtin_constant_p((port)) ? __inbc((port)) : __inb((port))) +#else +#define inb(port) __inb((port)) +#endif + +#ifdef __inwc +#define inw(port) \ + (__builtin_constant_p((port)) ? __inwc((port)) : __inw((port))) +#else +#define inw(port) __inw((port)) +#endif + +#ifdef __inlc +#define inl(port) \ + (__builtin_constant_p((port)) ? __inlc((port)) : __inl((port))) +#else +#define inl(port) __inl((port)) +#endif + +/* + * This macro will give you the translated IO address for this particular + * architecture, which can be used with the out_t... functions. + */ +#define ioaddr(port) \ + (__builtin_constant_p((port)) ? __ioaddrc((port)) : __ioaddr((port))) + +#ifndef ARCH_IO_DELAY +/* + * This architecture does not require any delayed IO. + * It is handled in the hardware. + */ +#define outb_p(val,port) outb((val),(port)) +#define outw_p(val,port) outw((val),(port)) +#define outl_p(val,port) outl((val),(port)) +#define inb_p(port) inb((port)) +#define inw_p(port) inw((port)) +#define inl_p(port) inl((port)) +#define outsb_p(port,from,len) outsb(port,from,len) +#define outsw_p(port,from,len) outsw(port,from,len) +#define outsl_p(port,from,len) outsl(port,from,len) +#define insb_p(port,to,len) insb(port,to,len) +#define insw_p(port,to,len) insw(port,to,len) +#define insl_p(port,to,len) insl(port,to,len) + +#else + +/* + * We have to delay the IO... + */ +#ifdef __outbc_p +#define outb_p(val,port) \ + (__builtin_constant_p((port)) ? __outbc_p((val),(port)) : __outb_p((val),(port))) +#else +#define outb_p(val,port) __outb_p((val),(port)) +#endif + +#ifdef __outwc_p +#define outw_p(val,port) \ + (__builtin_constant_p((port)) ? __outwc_p((val),(port)) : __outw_p((val),(port))) +#else +#define outw_p(val,port) __outw_p((val),(port)) +#endif + +#ifdef __outlc_p +#define outl_p(val,port) \ + (__builtin_constant_p((port)) ? __outlc_p((val),(port)) : __outl_p((val),(port))) +#else +#define outl_p(val,port) __outl_p((val),(port)) +#endif + +#ifdef __inbc_p +#define inb_p(port) \ + (__builtin_constant_p((port)) ? __inbc_p((port)) : __inb_p((port))) +#else +#define inb_p(port) __inb_p((port)) +#endif + +#ifdef __inwc_p +#define inw_p(port) \ + (__builtin_constant_p((port)) ? __inwc_p((port)) : __inw_p((port))) +#else +#define inw_p(port) __inw_p((port)) +#endif + +#ifdef __inlc_p +#define inl_p(port) \ + (__builtin_constant_p((port)) ? __inlc_p((port)) : __inl_p((port))) +#else +#define inl_p(port) __inl_p((port)) +#endif + +#endif + +/* for panic */ +#include + +#ifndef readb +#define readb(p) (panic("readb called, but not implemented"),0) +#endif +#ifndef readw +#define readw(p) (panic("readw called, but not implemented"),0) +#endif +#ifndef readl +#define readl(p) (panic("readl called, but not implemented"),0) +#endif +#ifndef writeb +#define writeb(v,p) panic("writeb called, but not implemented") +#endif +#ifndef writew +#define writew(v,p) panic("writew called, but not implemented") +#endif +#ifndef writel +#define writel(v,p) panic("writel called, but not implemented") +#endif + +/* + * String version of IO memory access ops: + */ +#ifndef memcpy_fromio +extern void _memcpy_fromio(void *, unsigned long, unsigned long); +#define memcpy_fromio(to,from,len) _memcpy_fromio((to),(unsigned long)(from),(len)) +#endif + +#ifndef memcpy_toio +extern void _memcpy_toio(unsigned long, const void *, unsigned long); +#define memcpy_toio(to,from,len) _memcpy_toio((unsigned long)(to),(from),(len)) +#endif + +#ifndef memset_io +extern void _memset_io(unsigned long, int, unsigned long); +#define memset_io(addr,c,len) _memset_io((unsigned long)(addr),(c),(len)) +#endif + +/* + * This isn't especially architecture dependent so it seems like it + * might as well go here as anywhere. + */ +static inline int check_signature(unsigned long io_addr, + const unsigned char *signature, int length) +{ + int retval = 0; + do { + if (readb(io_addr) != *signature) + goto out; + io_addr++; + signature++; + length--; + } while (length); + retval = 1; +out: + return retval; +} + +#undef ARCH_READWRITE +#undef ARCH_IO_DELAY +#undef ARCH_IO_CONSTANT + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/ioc.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ioc.h --- linux-2.2.14-rmk-mercury/include/asm/ioc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ioc.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Use these macros to read/write the IOC. All it does is perform the actual + * read/write. + */ + +#ifndef IOC_CONTROL + +#ifndef __ASSEMBLER__ +#define __IOC(offset) (IOC_BASE + (offset >> 2)) +#else +#define __IOC(offset) offset +#endif + +#define IOC_CONTROL __IOC(0x00) +#define IOC_KARTTX __IOC(0x04) +#define IOC_KARTRX __IOC(0x04) + +#define IOC_IRQSTATA __IOC(0x10) +#define IOC_IRQREQA __IOC(0x14) +#define IOC_IRQCLRA __IOC(0x14) +#define IOC_IRQMASKA __IOC(0x18) + +#define IOC_IRQSTATB __IOC(0x20) +#define IOC_IRQREQB __IOC(0x24) +#define IOC_IRQMASKB __IOC(0x28) + +#define IOC_FIQSTAT __IOC(0x30) +#define IOC_FIQREQ __IOC(0x34) +#define IOC_FIQMASK __IOC(0x38) + +#define IOC_T0CNTL __IOC(0x40) +#define IOC_T0LTCHL __IOC(0x40) +#define IOC_T0CNTH __IOC(0x44) +#define IOC_T0LTCHH __IOC(0x44) +#define IOC_T0GO __IOC(0x48) +#define IOC_T0LATCH __IOC(0x4c) + +#define IOC_T1CNTL __IOC(0x50) +#define IOC_T1LTCHL __IOC(0x50) +#define IOC_T1CNTH __IOC(0x54) +#define IOC_T1LTCHH __IOC(0x54) +#define IOC_T1GO __IOC(0x58) +#define IOC_T1LATCH __IOC(0x5c) + +#define IOC_T2CNTL __IOC(0x60) +#define IOC_T2LTCHL __IOC(0x60) +#define IOC_T2CNTH __IOC(0x64) +#define IOC_T2LTCHH __IOC(0x64) +#define IOC_T2GO __IOC(0x68) +#define IOC_T2LATCH __IOC(0x6c) + +#define IOC_T3CNTL __IOC(0x70) +#define IOC_T3LTCHL __IOC(0x70) +#define IOC_T3CNTH __IOC(0x74) +#define IOC_T3LTCHH __IOC(0x74) +#define IOC_T3GO __IOC(0x78) +#define IOC_T3LATCH __IOC(0x7c) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/ioctl.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ioctl.h --- linux-2.2.14-rmk-mercury/include/asm/ioctl.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ioctl.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * linux/ioctl.h for Linux by H.H. Bergman. + */ + +#ifndef _ASMARM_IOCTL_H +#define _ASMARM_IOCTL_H + +/* ioctl command encoding: 32 bits total, command in lower 16 bits, + * size of the parameter structure in the lower 14 bits of the + * upper 16 bits. + * Encoding the size of the parameter structure in the ioctl request + * is useful for catching programs compiled with old versions + * and to avoid overwriting user space outside the user buffer area. + * The highest 2 bits are reserved for indicating the ``access mode''. + * NOTE: This limits the max parameter size to 16kB -1 ! + */ + +/* + * The following is for compatibility across the various Linux + * platforms. The i386 ioctl numbering scheme doesn't really enforce + * a type field. De facto, however, the top 8 bits of the lower 16 + * bits are indeed used as a type field, so we might just as well make + * this explicit here. Please be sure to use the decoding macros + * below from now on. + */ +#define _IOC_NRBITS 8 +#define _IOC_TYPEBITS 8 +#define _IOC_SIZEBITS 14 +#define _IOC_DIRBITS 2 + +#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) +#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) +#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) +#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) + +#define _IOC_NRSHIFT 0 +#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) +#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) +#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) + +/* + * Direction bits. + */ +#define _IOC_NONE 0U +#define _IOC_WRITE 1U +#define _IOC_READ 2U + +#define _IOC(dir,type,nr,size) \ + (((dir) << _IOC_DIRSHIFT) | \ + ((type) << _IOC_TYPESHIFT) | \ + ((nr) << _IOC_NRSHIFT) | \ + ((size) << _IOC_SIZESHIFT)) + +/* used to create numbers */ +#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) +#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) +#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) +#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) + +/* used to decode ioctl numbers.. */ +#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) +#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) +#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) +#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) + +/* ...and for the drivers/sound files... */ + +#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) +#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) +#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) +#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) +#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) + +#endif /* _ASMARM_IOCTL_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/ioctls.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ioctls.h --- linux-2.2.14-rmk-mercury/include/asm/ioctls.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ioctls.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,80 @@ +#ifndef __ASM_ARM_IOCTLS_H +#define __ASM_ARM_IOCTLS_H + +#include + +/* 0x54 is just a magic number to make these relatively unique ('T') */ + +#define TCGETS 0x5401 +#define TCSETS 0x5402 +#define TCSETSW 0x5403 +#define TCSETSF 0x5404 +#define TCGETA 0x5405 +#define TCSETA 0x5406 +#define TCSETAW 0x5407 +#define TCSETAF 0x5408 +#define TCSBRK 0x5409 +#define TCXONC 0x540A +#define TCFLSH 0x540B +#define TIOCEXCL 0x540C +#define TIOCNXCL 0x540D +#define TIOCSCTTY 0x540E +#define TIOCGPGRP 0x540F +#define TIOCSPGRP 0x5410 +#define TIOCOUTQ 0x5411 +#define TIOCSTI 0x5412 +#define TIOCGWINSZ 0x5413 +#define TIOCSWINSZ 0x5414 +#define TIOCMGET 0x5415 +#define TIOCMBIS 0x5416 +#define TIOCMBIC 0x5417 +#define TIOCMSET 0x5418 +#define TIOCGSOFTCAR 0x5419 +#define TIOCSSOFTCAR 0x541A +#define FIONREAD 0x541B +#define TIOCINQ FIONREAD +#define TIOCLINUX 0x541C +#define TIOCCONS 0x541D +#define TIOCGSERIAL 0x541E +#define TIOCSSERIAL 0x541F +#define TIOCPKT 0x5420 +#define FIONBIO 0x5421 +#define TIOCNOTTY 0x5422 +#define TIOCSETD 0x5423 +#define TIOCGETD 0x5424 +#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ +#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ +#define TIOCSBRK 0x5427 /* BSD compatibility */ +#define TIOCCBRK 0x5428 /* BSD compatibility */ +#define TIOCGSID 0x5429 /* Return the session ID of FD */ +#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ +#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ + +#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ +#define FIOCLEX 0x5451 +#define FIOASYNC 0x5452 +#define TIOCSERCONFIG 0x5453 +#define TIOCSERGWILD 0x5454 +#define TIOCSERSWILD 0x5455 +#define TIOCGLCKTRMIOS 0x5456 +#define TIOCSLCKTRMIOS 0x5457 +#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ +#define TIOCSERGETLSR 0x5459 /* Get line status register */ +#define TIOCSERGETMULTI 0x545A /* Get multiport config */ +#define TIOCSERSETMULTI 0x545B /* Set multiport config */ + +#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ +#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ + +/* Used for packet mode */ +#define TIOCPKT_DATA 0 +#define TIOCPKT_FLUSHREAD 1 +#define TIOCPKT_FLUSHWRITE 2 +#define TIOCPKT_STOP 4 +#define TIOCPKT_START 8 +#define TIOCPKT_NOSTOP 16 +#define TIOCPKT_DOSTOP 32 + +#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/iomd.h linux-2.2.14-rmk-mercury-gcc3/include/asm/iomd.h --- linux-2.2.14-rmk-mercury/include/asm/iomd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/iomd.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,183 @@ + +#ifndef __ASSEMBLER__ +#define __IOMD(offset) (IO_IOMD_BASE + (offset >> 2)) +#else +#define __IOMD(offset) offset +#endif + +#define IOMD_CONTROL __IOMD(0x000) +#define IOMD_KARTTX __IOMD(0x004) +#define IOMD_KARTRX __IOMD(0x004) +#define IOMD_KCTRL __IOMD(0x008) + +#define IOMD_IRQSTATA __IOMD(0x010) +#define IOMD_IRQREQA __IOMD(0x014) +#define IOMD_IRQCLRA __IOMD(0x014) +#define IOMD_IRQMASKA __IOMD(0x018) + +#define IOMD_IRQSTATB __IOMD(0x020) +#define IOMD_IRQREQB __IOMD(0x024) +#define IOMD_IRQMASKB __IOMD(0x028) + +#define IOMD_FIQSTAT __IOMD(0x030) +#define IOMD_FIQREQ __IOMD(0x034) +#define IOMD_FIQMASK __IOMD(0x038) + +#define IOMD_T0CNTL __IOMD(0x040) +#define IOMD_T0LTCHL __IOMD(0x040) +#define IOMD_T0CNTH __IOMD(0x044) +#define IOMD_T0LTCHH __IOMD(0x044) +#define IOMD_T0GO __IOMD(0x048) +#define IOMD_T0LATCH __IOMD(0x04c) + +#define IOMD_T1CNTL __IOMD(0x050) +#define IOMD_T1LTCHL __IOMD(0x050) +#define IOMD_T1CNTH __IOMD(0x054) +#define IOMD_T1LTCHH __IOMD(0x054) +#define IOMD_T1GO __IOMD(0x058) +#define IOMD_T1LATCH __IOMD(0x05c) + +#define IOMD_ROMCR0 __IOMD(0x080) +#define IOMD_ROMCR1 __IOMD(0x084) +#define IOMD_DRAMCR __IOMD(0x088) +#define IOMD_VREFCR __IOMD(0x08C) + +#define IOMD_FSIZE __IOMD(0x090) +#define IOMD_ID0 __IOMD(0x094) +#define IOMD_ID1 __IOMD(0x098) +#define IOMD_VERSION __IOMD(0x09C) + +#define IOMD_MOUSEX __IOMD(0x0A0) +#define IOMD_MOUSEY __IOMD(0x0A4) + +#define IOMD_DMATCR __IOMD(0x0C0) +#define IOMD_IOTCR __IOMD(0x0C4) +#define IOMD_ECTCR __IOMD(0x0C8) +#define IOMD_DMAEXT __IOMD(0x0CC) + +#define DMA_EXT_IO0 1 +#define DMA_EXT_IO1 2 +#define DMA_EXT_IO2 4 +#define DMA_EXT_IO3 8 + +#define IOMD_IO0CURA __IOMD(0x100) +#define IOMD_IO0ENDA __IOMD(0x104) +#define IOMD_IO0CURB __IOMD(0x108) +#define IOMD_IO0ENDB __IOMD(0x10C) +#define IOMD_IO0CR __IOMD(0x110) +#define IOMD_IO0ST __IOMD(0x114) + +#define IOMD_IO1CURA __IOMD(0x120) +#define IOMD_IO1ENDA __IOMD(0x124) +#define IOMD_IO1CURB __IOMD(0x128) +#define IOMD_IO1ENDB __IOMD(0x12C) +#define IOMD_IO1CR __IOMD(0x130) +#define IOMD_IO1ST __IOMD(0x134) + +#define IOMD_IO2CURA __IOMD(0x140) +#define IOMD_IO2ENDA __IOMD(0x144) +#define IOMD_IO2CURB __IOMD(0x148) +#define IOMD_IO2ENDB __IOMD(0x14C) +#define IOMD_IO2CR __IOMD(0x150) +#define IOMD_IO2ST __IOMD(0x154) + +#define IOMD_IO3CURA __IOMD(0x160) +#define IOMD_IO3ENDA __IOMD(0x164) +#define IOMD_IO3CURB __IOMD(0x168) +#define IOMD_IO3ENDB __IOMD(0x16C) +#define IOMD_IO3CR __IOMD(0x170) +#define IOMD_IO3ST __IOMD(0x174) + +#define IOMD_SD0CURA __IOMD(0x180) +#define IOMD_SD0ENDA __IOMD(0x184) +#define IOMD_SD0CURB __IOMD(0x188) +#define IOMD_SD0ENDB __IOMD(0x18C) +#define IOMD_SD0CR __IOMD(0x190) +#define IOMD_SD0ST __IOMD(0x194) + +#define IOMD_SD1CURA __IOMD(0x1A0) +#define IOMD_SD1ENDA __IOMD(0x1A4) +#define IOMD_SD1CURB __IOMD(0x1A8) +#define IOMD_SD1ENDB __IOMD(0x1AC) +#define IOMD_SD1CR __IOMD(0x1B0) +#define IOMD_SD1ST __IOMD(0x1B4) + +#define IOMD_CURSCUR __IOMD(0x1C0) +#define IOMD_CURSINIT __IOMD(0x1C4) + +#define IOMD_VIDCUR __IOMD(0x1D0) +#define IOMD_VIDEND __IOMD(0x1D4) +#define IOMD_VIDSTART __IOMD(0x1D8) +#define IOMD_VIDINIT __IOMD(0x1DC) +#define IOMD_VIDCR __IOMD(0x1E0) + +#define IOMD_DMASTAT __IOMD(0x1F0) +#define IOMD_DMAREQ __IOMD(0x1F4) +#define IOMD_DMAMASK __IOMD(0x1F8) + +#define DMA_END_S (1 << 31) +#define DMA_END_L (1 << 30) + +#define DMA_CR_C 0x80 +#define DMA_CR_D 0x40 +#define DMA_CR_E 0x20 + +#define DMA_ST_OFL 4 +#define DMA_ST_INT 2 +#define DMA_ST_AB 1 + +#ifndef IOC_CONTROL +/* + * IOC compatability + */ +#define IOC_CONTROL IOMD_CONTROL +#define IOC_IRQSTATA IOMD_IRQSTATA +#define IOC_IRQREQA IOMD_IRQREQA +#define IOC_IRQCLRA IOMD_IRQCLRA +#define IOC_IRQMASKA IOMD_IRQMASKA + +#define IOC_IRQSTATB IOMD_IRQSTATB +#define IOC_IRQREQB IOMD_IRQREQB +#define IOC_IRQMASKB IOMD_IRQMASKB + +#define IOC_FIQSTAT IOMD_FIQSTAT +#define IOC_FIQREQ IOMD_FIQREQ +#define IOC_FIQMASK IOMD_FIQMASK + +#define IOC_T0CNTL IOMD_T0CNTL +#define IOC_T0LTCHL IOMD_T0LTCHL +#define IOC_T0CNTH IOMD_T0CNTH +#define IOC_T0LTCHH IOMD_T0LTCHH +#define IOC_T0GO IOMD_T0GO +#define IOC_T0LATCH IOMD_T0LATCH + +#define IOC_T1CNTL IOMD_T1CNTL +#define IOC_T1LTCHL IOMD_T1LTCHL +#define IOC_T1CNTH IOMD_T1CNTH +#define IOC_T1LTCHH IOMD_T1LTCHH +#define IOC_T1GO IOMD_T1GO +#define IOC_T1LATCH IOMD_T1LATCH +#endif + +/* + * DMA (MEMC) compatability + */ +#define HALF_SAM vram_half_sam +#define VDMA_ALIGNMENT (HALF_SAM * 2) +#define VDMA_XFERSIZE (HALF_SAM) +#define VDMA_INIT IOMD_VIDINIT +#define VDMA_START IOMD_VIDSTART +#define VDMA_END IOMD_VIDEND + +#ifndef __ASSEMBLER__ +extern unsigned int vram_half_sam; +#define video_set_dma(start,end,offset) \ +do { \ + outl (SCREEN_START + start, VDMA_START); \ + outl (SCREEN_START + end - VDMA_XFERSIZE, VDMA_END); \ + if (offset >= end - VDMA_XFERSIZE) \ + offset |= 0x40000000; \ + outl (SCREEN_START + offset, VDMA_INIT); \ +} while (0) +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/ipc.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ipc.h --- linux-2.2.14-rmk-mercury/include/asm/ipc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ipc.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,28 @@ +#ifndef __ASMARM_IPC_H +#define __ASMARM_IPC_H + +/* + * These are used to wrap system calls on ARM. + * + * See arch/arm/kernel/sys-arm.c for ugly details.. + */ +struct ipc_kludge { + struct msgbuf *msgp; + long msgtyp; +}; + +#define SEMOP 1 +#define SEMGET 2 +#define SEMCTL 3 +#define MSGSND 11 +#define MSGRCV 12 +#define MSGGET 13 +#define MSGCTL 14 +#define SHMAT 21 +#define SHMDT 22 +#define SHMGET 23 +#define SHMCTL 24 + +#define IPCCALL(version,op) ((version)<<16 | (op)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/irq.h --- linux-2.2.14-rmk-mercury/include/asm/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/irq.h 2007-07-10 12:25:55.000000000 +0100 @@ -0,0 +1,28 @@ +#ifndef __ASM_ARM_IRQ_H +#define __ASM_ARM_IRQ_H + +#include + +#ifndef irq_cannonicalize +#define irq_cannonicalize(i) (i) +#endif + +#ifndef NR_IRQS +#define NR_IRQS 128 +#endif + +/* + * Use this value to indicate lack of interrupt + * capability + */ +#ifndef NO_IRQ +#define NO_IRQ ((unsigned int)(-1)) +#endif + +#define disable_irq_nosync(i) disable_irq(i) + +extern void disable_irq(unsigned int); +extern void enable_irq(unsigned int); + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/keyboard.h linux-2.2.14-rmk-mercury-gcc3/include/asm/keyboard.h --- linux-2.2.14-rmk-mercury/include/asm/keyboard.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/keyboard.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,24 @@ +/* + * linux/include/asm-arm/keyboard.h + * + * Keyboard driver definitions for ARM + * + * (C) 1998 Russell King + */ +#ifndef __ASM_ARM_KEYBOARD_H +#define __ASM_ARM_KEYBOARD_H + +/* + * We provide a unified keyboard interface when in VC_MEDIUMRAW + * mode. This means that all keycodes must be common between + * all supported keyboards. This unfortunately puts us at odds + * with the PC keyboard interface chip... but we can't do anything + * about that now. + */ +#ifdef __KERNEL__ + +#include + +#endif /* __KERNEL__ */ + +#endif /* __ASM_ARM_KEYBOARD_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/leds.h linux-2.2.14-rmk-mercury-gcc3/include/asm/leds.h --- linux-2.2.14-rmk-mercury/include/asm/leds.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/leds.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * include/asm-arm/leds.h + * + * Copyright (C) 1998 Russell King + * + * Event-driven interface for LEDs on machines + * + * Added led_start and led_stop- Alex Holden, 28th Dec 1998. + */ +#ifndef ASM_ARM_LEDS_H +#define ASM_ARM_LEDS_H + +#include + +typedef enum { + led_idle_start, + led_idle_end, + led_timer, + led_start, + led_stop, + led_claim, /* override idle & timer leds */ + led_release, /* restore idle & timer leds */ + led_green_on, + led_green_off, + led_amber_on, + led_amber_off, + led_red_on, + led_red_off +} led_event_t; + +/* Use this routine to handle LEDs */ + +#ifdef CONFIG_LEDS +extern void (*leds_event)(led_event_t); +#define set_leds_event(r) leds_event = r +#else +#define leds_event(e) +#define set_leds_event(r) +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/limits.h linux-2.2.14-rmk-mercury-gcc3/include/asm/limits.h --- linux-2.2.14-rmk-mercury/include/asm/limits.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/limits.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,11 @@ +#ifndef __ASM_PIPE_H +#define __ASM_PIPE_H + +#ifndef PAGE_SIZE +#include +#endif + +#define PIPE_BUF PAGE_SIZE + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/linux_logo.h linux-2.2.14-rmk-mercury-gcc3/include/asm/linux_logo.h --- linux-2.2.14-rmk-mercury/include/asm/linux_logo.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/linux_logo.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * linux/include/asm-arm/linux_logo.h + * + * Copyright (C) 1998 Russell King + * + * Linux console driver logo definitions for ARM + */ + +#include +#include + +#define linux_logo_banner "ARM Linux version " UTS_RELEASE + +#define LINUX_LOGO_COLORS 214 + +#ifdef INCLUDE_LINUX_LOGO_DATA + +#define INCLUDE_LINUX_LOGOBW +#define INCLUDE_LINUX_LOGO16 + +#include + +#else + +/* prototypes only */ +extern unsigned char linux_logo_red[]; +extern unsigned char linux_logo_green[]; +extern unsigned char linux_logo_blue[]; +extern unsigned char linux_logo[]; +extern unsigned char linux_logo_bw[]; +extern unsigned char linux_logo16_red[]; +extern unsigned char linux_logo16_green[]; +extern unsigned char linux_logo16_blue[]; +extern unsigned char linux_logo16[]; +extern unsigned char *linux_serial_image; + +extern int (*console_show_logo)(void); + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/md.h linux-2.2.14-rmk-mercury-gcc3/include/asm/md.h --- linux-2.2.14-rmk-mercury/include/asm/md.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/md.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,13 @@ +/* $Id: md.h,v 1.1 1997/12/15 15:11:57 jj Exp $ + * md.h: High speed xor_block operation for RAID4/5 + * + */ + +#ifndef __ASM_MD_H +#define __ASM_MD_H + +/* #define HAVE_ARCH_XORBLOCK */ + +#define MD_XORBLOCK_ALIGNMENT sizeof(long) + +#endif /* __ASM_MD_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/memc.h linux-2.2.14-rmk-mercury-gcc3/include/asm/memc.h --- linux-2.2.14-rmk-mercury/include/asm/memc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/memc.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,17 @@ +#define VDMA_ALIGNMENT PAGE_SIZE +#define VDMA_XFERSIZE 16 +#define VDMA_INIT 0 +#define VDMA_START 1 +#define VDMA_END 2 + +#ifndef __ASSEMBLER__ +extern void memc_write(unsigned int reg, unsigned long val); + +#define video_set_dma(start,end,offset) \ +do { \ + memc_write (VDMA_START, (start >> 2)); \ + memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2); \ + memc_write (VDMA_INIT, (offset >> 2)); \ +} while (0) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/mman.h linux-2.2.14-rmk-mercury-gcc3/include/asm/mman.h --- linux-2.2.14-rmk-mercury/include/asm/mman.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/mman.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,32 @@ +#ifndef __ARM_MMAN_H__ +#define __ARM_MMAN_H__ + +#define PROT_READ 0x1 /* page can be read */ +#define PROT_WRITE 0x2 /* page can be written */ +#define PROT_EXEC 0x4 /* page can be executed */ +#define PROT_NONE 0x0 /* page can not be accessed */ + +#define MAP_SHARED 0x01 /* Share changes */ +#define MAP_PRIVATE 0x02 /* Changes are private */ +#define MAP_TYPE 0x0f /* Mask for type of mapping */ +#define MAP_FIXED 0x10 /* Interpret addr exactly */ +#define MAP_ANONYMOUS 0x20 /* don't use a file */ + +#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ +#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ +#define MAP_LOCKED 0x2000 /* pages are locked */ +#define MAP_NORESERVE 0x4000 /* don't check for reservations */ + +#define MS_ASYNC 1 /* sync memory asynchronously */ +#define MS_INVALIDATE 2 /* invalidate the caches */ +#define MS_SYNC 4 /* synchronous memory sync */ + +#define MCL_CURRENT 1 /* lock all current mappings */ +#define MCL_FUTURE 2 /* lock all future mappings */ + +/* compatibility flags */ +#define MAP_ANON MAP_ANONYMOUS +#define MAP_FILE 0 + +#endif /* __ARM_MMAN_H__ */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/mmu_context.h linux-2.2.14-rmk-mercury-gcc3/include/asm/mmu_context.h --- linux-2.2.14-rmk-mercury/include/asm/mmu_context.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/mmu_context.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,18 @@ +/* + * linux/include/asm-arm/mmu_context.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 27-06-1996 RMK Created + */ +#ifndef __ASM_ARM_MMU_CONTEXT_H +#define __ASM_ARM_MMU_CONTEXT_H + +#define get_mmu_context(x) do { } while (0) + +#define init_new_context(mm) do { } while(0) +#define destroy_context(mm) do { } while(0) +#define activate_context(tsk) do { } while(0) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/namei.h linux-2.2.14-rmk-mercury-gcc3/include/asm/namei.h --- linux-2.2.14-rmk-mercury/include/asm/namei.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/namei.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,18 @@ +/* + * linux/include/asm-arm/namei.h + * + * Included from linux/fs/namei.c + */ + +#ifndef __ASMARM_NAMEI_H +#define __ASMARM_NAMEI_H + +/* This dummy routine maybe changed to something useful + * for /usr/gnemul/ emulation stuff. + * Look at asm-sparc/namei.h for details. + */ + +#define __prefix_lookup_dentry(name, lookup_flags) \ + do {} while (0) + +#endif /* __ASMARM_NAMEI_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/page.h linux-2.2.14-rmk-mercury-gcc3/include/asm/page.h --- linux-2.2.14-rmk-mercury/include/asm/page.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/page.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,22 @@ +#ifndef _ASMARM_PAGE_H +#define _ASMARM_PAGE_H + +#include +#include + +#ifdef __KERNEL__ + +#define get_user_page(vaddr) __get_free_page(GFP_KERNEL) +#define free_user_page(page, addr) free_page(addr) +#define clear_page(page) memzero((void *)(page), PAGE_SIZE) +#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) + +#endif + +/* unsigned long __pa(void *x) */ +#define __pa(x) __virt_to_phys((unsigned long)(x)) + +/* void *__va(unsigned long x) */ +#define __va(x) ((void *)(__phys_to_virt((unsigned long)(x)))) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/param.h --- linux-2.2.14-rmk-mercury/include/asm/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/param.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm/pgtable.h linux-2.2.14-rmk-mercury-gcc3/include/asm/pgtable.h --- linux-2.2.14-rmk-mercury/include/asm/pgtable.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/pgtable.h 2007-07-10 12:25:51.000000000 +0100 @@ -0,0 +1,16 @@ +#ifndef _ASMARM_PGTABLE_H +#define _ASMARM_PGTABLE_H + +#include +#include + +#define module_map vmalloc +#define module_unmap vfree + +extern int do_check_pgt_cache(int, int); + +/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ +#define PageSkip(page) (0) +#define kern_addr_valid(addr) (1) + +#endif /* _ASMARM_PGTABLE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/poll.h linux-2.2.14-rmk-mercury-gcc3/include/asm/poll.h --- linux-2.2.14-rmk-mercury/include/asm/poll.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/poll.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,25 @@ +#ifndef __ASMARM_POLL_H +#define __ASMARM_POLL_H + +/* These are specified by iBCS2 */ +#define POLLIN 0x0001 +#define POLLPRI 0x0002 +#define POLLOUT 0x0004 +#define POLLERR 0x0008 +#define POLLHUP 0x0010 +#define POLLNVAL 0x0020 + +/* The rest seem to be more-or-less nonstandard. Check them! */ +#define POLLRDNORM 0x0040 +#define POLLRDBAND 0x0080 +#define POLLWRNORM 0x0100 +#define POLLWRBAND 0x0200 +#define POLLMSG 0x0400 + +struct pollfd { + int fd; + short events; + short revents; +}; + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/posix_types.h linux-2.2.14-rmk-mercury-gcc3/include/asm/posix_types.h --- linux-2.2.14-rmk-mercury/include/asm/posix_types.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/posix_types.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * linux/include/asm-arm/posix_types.h + * + * Copyright (c) 1996-1998 Russell King. + * + * Changelog: + * 27-06-1996 RMK Created + */ +#ifndef __ARCH_ARM_POSIX_TYPES_H +#define __ARCH_ARM_POSIX_TYPES_H + +/* + * This file is generally used by user-level software, so you need to + * be a little careful about namespace pollution etc. Also, we cannot + * assume GCC is being used. + */ + +typedef unsigned short __kernel_dev_t; +typedef unsigned long __kernel_ino_t; +typedef unsigned short __kernel_mode_t; +typedef unsigned short __kernel_nlink_t; +typedef long __kernel_off_t; +typedef int __kernel_pid_t; +typedef unsigned short __kernel_ipc_pid_t; +typedef unsigned short __kernel_uid_t; +typedef unsigned short __kernel_gid_t; +typedef unsigned int __kernel_size_t; +typedef int __kernel_ssize_t; +typedef int __kernel_ptrdiff_t; +typedef long __kernel_time_t; +typedef long __kernel_suseconds_t; +typedef long __kernel_clock_t; +typedef int __kernel_daddr_t; +typedef char * __kernel_caddr_t; + +#ifdef __GNUC__ +typedef long long __kernel_loff_t; +#endif + +typedef struct { +#if defined(__KERNEL__) || defined(__USE_ALL) + int val[2]; +#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ + int __val[2]; +#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ +} __kernel_fsid_t; + +#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) + +#undef __FD_SET +#define __FD_SET(fd, fdsetp) \ + (((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31))) + +#undef __FD_CLR +#define __FD_CLR(fd, fdsetp) \ + (((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31))) + +#undef __FD_ISSET +#define __FD_ISSET(fd, fdsetp) \ + ((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0) + +#undef __FD_ZERO +#define __FD_ZERO(fdsetp) \ + (memset (fdsetp, 0, sizeof (*(fd_set *)fdsetp))) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/assembler.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/assembler.h --- linux-2.2.14-rmk-mercury/include/asm/proc/assembler.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/assembler.h 2007-07-10 14:03:03.000000000 +0100 @@ -0,0 +1,86 @@ +/* + * linux/asm-arm/proc-armv/assembler.h + * + * Copyright (C) 1996 Russell King + * + * This file contains arm architecture specific defines + * for the different processors + */ +#ifndef __ASSEMBLY__ +#error "Only include this from assembly code" +#endif + +#define MODE_USR USR_MODE +#define MODE_FIQ FIQ_MODE +#define MODE_IRQ IRQ_MODE +#define MODE_SVC SVC_MODE + +#define DEFAULT_FIQ MODE_FIQ + +/* + * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) + * RETINSTR - return instruction (eg, mov pc, lr) + */ +#ifdef __STDC__ +#define LOADREGS(cond, base, reglist...)\ + ldm##cond base,reglist + +#define RETINSTR(instr, regs...)\ + instr regs +#else +#define LOADREGS(cond, base)\ + ldm/**/cond base, + +#define RETINSTR(instr, a,b)\ + instr a,b +#endif + +/* + * No nop required after mode change + */ +#define MODENOP + +/* + * Change to `mode' + */ +#define MODE(savereg,tmpreg,mode) \ + mrs savereg, cpsr; \ + bic tmpreg, savereg, $0x1f; \ + orr tmpreg, tmpreg, $mode; \ + msr cpsr, tmpreg + +/* + * Restore mode + */ +#define RESTOREMODE(savereg) \ + msr cpsr, savereg + +/* + * save interrupt state (uses stack) + */ +#define SAVEIRQS(tmpreg)\ + mrs tmpreg, cpsr; \ + str tmpreg, [sp, $-4]! + +/* + * restore interrupt state (uses stack) + */ +#define RESTOREIRQS(tmpreg)\ + ldr tmpreg, [sp], $4; \ + msr cpsr, tmpreg + +/* + * disable IRQs + */ +#define DISABLEIRQS(tmpreg)\ + mrs tmpreg , cpsr; \ + orr tmpreg , tmpreg , $I_BIT; \ + msr cpsr, tmpreg + +/* + * enable IRQs + */ +#define ENABLEIRQS(tmpreg)\ + mrs tmpreg , cpsr; \ + bic tmpreg , tmpreg , $I_BIT; \ + msr cpsr, tmpreg diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/domain.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/domain.h --- linux-2.2.14-rmk-mercury/include/asm/proc/domain.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/domain.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * linux/include/asm-arm/proc-armv/domain.h + * + * Copyright (C) 1999 Russell King. + */ +#ifndef __ASM_PROC_DOMAIN_H +#define __ASM_PROC_DOMAIN_H + +/* + * Domain numbers + * + * DOMAIN_IO - domain 2 includes all IO only + * DOMAIN_KERNEL - domain 1 includes all kernel memory only + * DOMAIN_USER - domain 0 includes all user memory only + */ +#define DOMAIN_USER 0 +#define DOMAIN_KERNEL 1 +#define DOMAIN_TABLE 1 +#define DOMAIN_IO 2 + +/* + * Domain types + */ +#define DOMAIN_NOACCESS 0 +#define DOMAIN_CLIENT 1 +#define DOMAIN_MANAGER 3 + +#define domain_val(dom,type) ((type) << 2*(dom)) + +#define set_domain(x) \ + do { \ + __asm__ __volatile__( \ + "mcr p15, 0, %0, c3, c0 @ set domain" \ + : : "r" (x)); \ + } while (0) + +#define modify_domain(dom,type) \ + do { \ + unsigned int domain = current->tss.domain; \ + domain &= ~domain_val(dom, DOMAIN_MANAGER); \ + domain |= domain_val(dom, type); \ + current->tss.domain = domain; \ + set_domain(current->tss.domain); \ + } while (0) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/elf.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/elf.h --- linux-2.2.14-rmk-mercury/include/asm/proc/elf.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/elf.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,21 @@ +/* + * ELF definitions for 32-bit CPUs + */ + +#define ELF_EXEC_PAGESIZE 4096 + +/* We can execute both 32-bit and 26-bit code. */ +#define ELF_PROC_OK(x) (1) + +#ifdef __KERNEL__ + +#if 0 /* not yet */ +#define SET_PERSONALITY(ex,ibcs2) \ + current_personality = (ex->e_flags & EF_ARM_APCS26) ? \ + PER_LINUX : PER_LINUX_32BIT +#else +#define SET_PERSONALITY(ex,ibcs2) \ + current->personality = PER_LINUX_32BIT +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/io.h --- linux-2.2.14-rmk-mercury/include/asm/proc/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/io.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,35 @@ +/* + * linux/include/asm-arm/proc-armv/io.h + */ + +/* + * The caches on some architectures aren't dma-coherent and have need to + * handle this in software. There are two types of operations that + * can be applied to dma buffers. + * + * - dma_cache_wback_inv(start, size) makes caches and RAM coherent by + * writing the content of the caches back to memory, if necessary. + * The function also invalidates the affected part of the caches as + * necessary before DMA transfers from outside to memory. + * - dma_cache_inv(start, size) invalidates the affected parts of the + * caches. Dirty lines of the caches may be written back or simply + * be discarded. This operation is necessary before dma operations + * to the memory. + * - dma_cache_wback(start, size) writes back any dirty lines but does + * not invalidate the cache. This can be used before DMA reads from + * memory, + */ + +#include + +#define dma_cache_inv(start, size) \ + do { processor.u.armv3v4._cache_purge_area((unsigned long)(start), \ + ((unsigned long)(start)+(size))); } while (0) + +#define dma_cache_wback(start, size) \ + do { processor.u.armv3v4._cache_wback_area((unsigned long)(start), \ + ((unsigned long)(start)+(size))); } while (0) + +#define dma_cache_wback_inv(start, size) \ + do { processor.u.armv3v4._flush_cache_area((unsigned long)(start), \ + ((unsigned long)(start)+(size)), 0); } while (0) diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/mm-init.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/mm-init.h --- linux-2.2.14-rmk-mercury/include/asm/proc/mm-init.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/mm-init.h 2007-07-10 12:31:31.000000000 +0100 @@ -0,0 +1,177 @@ +/* + * linux/include/asm-arm/proc-armv/mm-init.h + * + * Copyright (C) 1996 Russell King + * + * This contains the code to setup the memory map on an ARM v3 or v4 machine. + * This is both processor & architecture specific, and requires some + * more work to get it to fit into our separate processor and architecture + * structure. + */ + +/* + * On ebsa, we want the memory map set up so: + * + * PHYS VIRT + * 00000000 00000000 Zero page + * 000003ff 000003ff Zero page end + * 00000000 c0000000 Kernel and all physical memory + * 01ffffff c1ffffff End of physical (32MB) + * e0000000 e0000000 IO start + * ffffffff ffffffff IO end + * + * On rpc, we want: + * + * PHYS VIRT + * 10000000 00000000 Zero page + * 100003ff 000003ff Zero page end + * 10000000 c0000000 Kernel and all physical memory + * 1fffffff cfffffff End of physical (32MB) + * 02000000 d?000000 Screen memory (first image) + * 02000000 d8000000 Screen memory (second image) + * 00000000 df000000 StrongARM cache invalidation area + * 03000000 e0000000 IO start + * 03ffffff e0ffffff IO end + * + * We set it up using the section page table entries. + */ +#include + +#define PTE_SIZE (PTRS_PER_PTE * BYTES_PER_PTR) + +extern unsigned long setup_io_pagetables(unsigned long start_mem); + +/* + * Add a SECTION mapping between VIRT and PHYS in domain DOMAIN with protection PROT + */ +static inline void +alloc_init_section(unsigned long *mem, unsigned long virt, unsigned long phys, int domain, int prot) +{ + pgd_t *pgdp; + pmd_t *pmdp, pmd; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + pmd_val(pmd) = phys | PMD_TYPE_SECT | PMD_DOMAIN(domain) | prot; + set_pmd(pmdp, pmd); +} + +/* + * Clear any mapping + */ +static inline void +free_init_section(unsigned long virt) +{ + pgd_t *pgdp; + pmd_t *pmdp; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + pmd_clear(pmdp); +} + +/* + * Add a PAGE mapping between VIRT and PHYS in domain DOMAIN with protection PROT + */ +static inline void +alloc_init_page(unsigned long *mem, unsigned long virt, unsigned long phys, int domain, int prot) +{ + pgd_t *pgdp; + pmd_t *pmdp; + pte_t *ptep; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + if (pmd_none(*pmdp)) { + unsigned long memory = *mem; + + memory = (memory + PTE_SIZE - 1) & ~(PTE_SIZE - 1); + + ptep = (pte_t *)memory; + memzero(ptep, PTE_SIZE); + memory += PTE_SIZE; + + ptep = (pte_t *)memory; + memzero(ptep, PTE_SIZE); + + set_pmd(pmdp, __mk_pmd(ptep, PMD_TYPE_TABLE | PMD_DOMAIN(domain))); + + *mem = memory + PTE_SIZE; + } + + ptep = pte_offset(pmdp, virt); + + set_pte(ptep, mk_pte_phys(phys, __pgprot(prot))); +} + +static inline unsigned long +setup_pagetables(unsigned long start_mem, unsigned long end_mem) +{ + unsigned long address = 0; + + do { + if (address >= PAGE_OFFSET && address < end_mem) + /* + * map in physical ram & kernel + */ + alloc_init_section(&start_mem, address, __virt_to_phys(address), DOMAIN_KERNEL, + PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE | PMD_SECT_AP_WRITE); + else + /* + * unmap everything else + */ + free_init_section(address); + + address += PGDIR_SIZE; + } while (address != 0); + + /* + * An area to invalidate the cache + */ + alloc_init_section(&start_mem, FLUSH_BASE, FLUSH_BASE_PHYS, DOMAIN_KERNEL, + PMD_SECT_CACHEABLE | PMD_SECT_AP_READ); + + /* + * Now set up our IO mappings + */ + start_mem = setup_io_pagetables(start_mem); + + /* + * map in zero page + */ + alloc_init_page(&start_mem, 0, __virt_to_phys(PAGE_OFFSET), + DOMAIN_USER, L_PTE_CACHEABLE | L_PTE_YOUNG | L_PTE_PRESENT); + + flush_cache_all(); + + return start_mem; +} + +static inline +void mark_usable_memory_areas(unsigned long *start_mem, unsigned long end_mem) +{ + unsigned long smem; + + *start_mem = smem = PAGE_ALIGN(*start_mem); + + /* + * Mark all of memory from the end of kernel to end of memory + */ + while (smem < end_mem) { + clear_bit(PG_reserved, &mem_map[MAP_NR(smem)].flags); + smem += PAGE_SIZE; + } + + /* + * Mark memory from page 1 to start of the swapper page directory + */ + smem = PAGE_OFFSET + PAGE_SIZE; + while (smem < (unsigned long)&swapper_pg_dir) { + clear_bit(PG_reserved, &mem_map[MAP_NR(smem)].flags); + smem += PAGE_SIZE; + } +} + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/page.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/page.h --- linux-2.2.14-rmk-mercury/include/asm/proc/page.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/page.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,73 @@ +/* + * linux/include/asm-arm/proc-armv/page.h + * + * Copyright (C) 1995, 1996 Russell King + */ + +#ifndef __ASM_PROC_PAGE_H +#define __ASM_PROC_PAGE_H + +#include + +/* PAGE_SHIFT determines the page size */ +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) + +#ifdef __KERNEL__ + +#define STRICT_MM_TYPECHECKS + +#ifdef STRICT_MM_TYPECHECKS +/* + * These are used to make use of C type-checking.. + */ +typedef struct { unsigned long pte; } pte_t; +typedef struct { unsigned long pmd; } pmd_t; +typedef struct { unsigned long pgd; } pgd_t; +typedef struct { unsigned long pgprot; } pgprot_t; + +#define pte_val(x) ((x).pte) +#define pmd_val(x) ((x).pmd) +#define pgd_val(x) ((x).pgd) +#define pgprot_val(x) ((x).pgprot) + +#define __pte(x) ((pte_t) { (x) } ) +#define __pmd(x) ((pmd_t) { (x) } ) +#define __pgd(x) ((pgd_t) { (x) } ) +#define __pgprot(x) ((pgprot_t) { (x) } ) + +#else +/* + * .. while these make it easier on the compiler + */ +typedef unsigned long pte_t; +typedef unsigned long pmd_t; +typedef unsigned long pgd_t; +typedef unsigned long pgprot_t; + +#define pte_val(x) (x) +#define pmd_val(x) (x) +#define pgd_val(x) (x) +#define pgprot_val(x) (x) + +#define __pte(x) (x) +#define __pmd(x) (x) +#define __pgd(x) (x) +#define __pgprot(x) (x) + +#endif + +/* to align the pointer to the (next) page boundary */ +#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) + +/* This handles the memory map.. */ +#ifndef PAGE_OFFSET +#define PAGE_OFFSET 0xc0000000 +#endif + +#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT) + +#endif /* __KERNEL__ */ + +#endif /* __ASM_PROC_PAGE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/param.h --- linux-2.2.14-rmk-mercury/include/asm/proc/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/param.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,25 @@ +/* + * linux/include/asm-arm/proc-armv/param.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_PROC_PARAM_H +#define __ASM_PROC_PARAM_H + +#include /* for HZ */ + +#define EXEC_PAGESIZE 4096 + +#ifndef NGROUPS +#define NGROUPS 32 +#endif + +#ifndef NOGROUP +#define NOGROUP (-1) +#endif + +#define MAXHOSTNAMELEN 64 /* max length of hostname */ + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/pgtable.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/pgtable.h --- linux-2.2.14-rmk-mercury/include/asm/proc/pgtable.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/pgtable.h 2007-07-10 12:25:49.000000000 +0100 @@ -0,0 +1,627 @@ +/* + * linux/include/asm-arm/proc-armv/pgtable.h + * + * Copyright (C) 1995-1999 Russell King + * + * 12-Jan-1997 RMK Altered flushing routines to use function pointers + * now possible to combine ARM6, ARM7 and StrongARM versions. + * 17-Apr-1999 RMK Now pass an area size to clean_cache_area and + * flush_icache_area. + */ +#ifndef __ASM_PROC_PGTABLE_H +#define __ASM_PROC_PGTABLE_H + +#include /* For TASK_SIZE */ +#include + +#define LIBRARY_TEXT_START 0x0c000000 + +/* + * Cache flushing... + */ +#define flush_cache_all() \ + processor.u.armv3v4._flush_cache_all() + +#define flush_cache_mm(_mm) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_cache_all(); \ + } while (0) + +#define flush_cache_range(_mm,_start,_end) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_cache_area \ + ((_start), (_end), 1); \ + } while (0) + +#define flush_cache_page(_vma,_vmaddr) \ + do { \ + if ((_vma)->vm_mm == current->mm) \ + processor.u.armv3v4._flush_cache_area \ + ((_vmaddr), (_vmaddr) + PAGE_SIZE, \ + ((_vma)->vm_flags & VM_EXEC) ? 1 : 0); \ + } while (0) + +#define clean_cache_range(_start,_end) \ + do { \ + unsigned long _s, _sz; \ + _s = (unsigned long)_start; \ + _sz = (unsigned long)_end - _s; \ + processor.u.armv3v4._clean_cache_area(_s, _sz); \ + } while (0) + +#define clean_cache_area(_start,_size) \ + do { \ + unsigned long _s; \ + _s = (unsigned long)_start; \ + processor.u.armv3v4._clean_cache_area(_s, _size); \ + } while (0) + +#define flush_icache_range(_start,_end) \ + processor.u.armv3v4._flush_icache_area((_start), (_end) - (_start)) + +/* + * We don't have a MEMC chip... + */ +#define update_memc_all() do { } while (0) +#define update_memc_task(tsk) do { } while (0) +#define update_memc_mm(mm) do { } while (0) +#define update_memc_addr(mm,addr,pte) do { } while (0) + +/* + * This flushes back any buffered write data. We have to clean and flush the entries + * in the cache for this page. Is it necessary to invalidate the I-cache? + */ +#define flush_page_to_ram(_page) \ + processor.u.armv3v4._flush_ram_page ((_page) & PAGE_MASK); + +/* + * TLB flushing: + * + * - flush_tlb() flushes the current mm struct TLBs + * - flush_tlb_all() flushes all processes TLBs + * - flush_tlb_mm(mm) flushes the specified mm context TLB's + * - flush_tlb_page(vma, vmaddr) flushes one page + * - flush_tlb_range(mm, start, end) flushes a range of pages + * + * GCC uses conditional instructions, and expects the assembler code to do so as well. + * + * We drain the write buffer in here to ensure that the page tables in ram + * are really up to date. It is more efficient to do this here... + */ +#define flush_tlb() flush_tlb_all() + +#define flush_tlb_all() \ + processor.u.armv3v4._flush_tlb_all() + +#define flush_tlb_mm(_mm) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_tlb_all(); \ + } while (0) + +#define flush_tlb_range(_mm,_start,_end) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_tlb_area \ + ((_start), (_end), 1); \ + } while (0) + +#define flush_tlb_page(_vma,_vmaddr) \ + do { \ + if ((_vma)->vm_mm == current->mm) \ + processor.u.armv3v4._flush_tlb_area \ + ((_vmaddr), (_vmaddr) + PAGE_SIZE, \ + ((_vma)->vm_flags & VM_EXEC) ? 1 : 0); \ + } while (0) + +/* + * PMD_SHIFT determines the size of the area a second-level page table can map + */ +#define PMD_SHIFT 20 +#define PMD_SIZE (1UL << PMD_SHIFT) +#define PMD_MASK (~(PMD_SIZE-1)) + +/* + * PGDIR_SHIFT determines what a third-level page table entry can map + */ +#define PGDIR_SHIFT 20 +#define PGDIR_SIZE (1UL << PGDIR_SHIFT) +#define PGDIR_MASK (~(PGDIR_SIZE-1)) + +/* + * entries per page directory level: the sa110 is two-level, so + * we don't really have any PMD directory physically. + */ +#define PTRS_PER_PTE 256 +#define PTRS_PER_PMD 1 +#define PTRS_PER_PGD 4096 +#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) + + +/* Just any arbitrary offset to the start of the vmalloc VM area: the + * current 8MB value just means that there will be a 8MB "hole" after the + * physical memory until the kernel virtual memory starts. That means that + * any out-of-bounds memory accesses will hopefully be caught. + * The vmalloc() routines leaves a hole of 4kB between each vmalloced + * area for the same reason. ;) + */ +#define VMALLOC_OFFSET (8*1024*1024) +#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) +#define VMALLOC_VMADDR(x) ((unsigned long)(x)) +#define VMALLOC_END (PAGE_OFFSET + 0x10000000) + +#undef TEST_VERIFY_AREA + +/* + * The sa110 doesn't have any external MMU info: the kernel page + * tables contain all the necessary information. + */ +extern __inline__ void update_mmu_cache(struct vm_area_struct * vma, + unsigned long address, pte_t pte) +{ +} + + +/* + * BAD_PAGETABLE is used when we need a bogus page-table, while + * BAD_PAGE is used for a bogus page. + * + * ZERO_PAGE is a global shared page that is always zero: used + * for zero-mapped memory areas etc.. + */ +extern pte_t __bad_page(void); +extern pte_t * __bad_pagetable(void); +extern unsigned long *empty_zero_page; + +#define BAD_PAGETABLE __bad_pagetable() +#define BAD_PAGE __bad_page() +#define ZERO_PAGE(vaddr) ((unsigned long) empty_zero_page) + +/* number of bits that fit into a memory pointer */ +#define BYTES_PER_PTR (sizeof(unsigned long)) +#define BITS_PER_PTR (8*BYTES_PER_PTR) + +/* to align the pointer to a pointer address */ +#define PTR_MASK (~(sizeof(void*)-1)) + +/* sizeof(void*)==1<>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) + +/* to set the page-dir + * Note that we need to flush the cache and TLBs + * if we are affecting the current task. + */ +#define SET_PAGE_DIR(tsk,pgdir) \ +do { \ + tsk->tss.memmap = __virt_to_phys((unsigned long)pgdir); \ + if ((tsk) == current) { \ + flush_cache_all(); \ + __asm__ __volatile__( \ + "mcr%? p15, 0, %0, c2, c0, 0\n" \ + : : "r" (tsk->tss.memmap)); \ + flush_tlb_all(); \ + } \ +} while (0) + + +/* + * The "pgd_xxx()" functions here are trivial for a folded two-level + * setup: the pgd is never bad, and a pmd always exists (as it's folded + * into the pgd entry) + */ +#define pgd_none(pgd) (0) +#define pgd_bad(pgd) (0) +#define pgd_present(pgd) (1) +#define pgd_clear(pgdp) + +/* to find an entry in a kernel page-table-directory */ +#define pgd_offset_k(address) pgd_offset(&init_mm, address) + +/* to find an entry in a page-table-directory */ +extern __inline__ pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) +{ + return mm->pgd + (address >> PGDIR_SHIFT); +} + +extern unsigned long get_page_2k(int priority); +extern void free_page_2k(unsigned long page); + +/* + * Allocate and free page tables. The xxx_kernel() versions are + * used to allocate a kernel page table - this turns on ASN bits + * if any. + */ + +#ifndef __SMP__ +extern struct pgtable_cache_struct { + unsigned long *pgd_cache; + unsigned long *pte_cache; + unsigned long pgtable_cache_sz; +} quicklists; + +#define pgd_quicklist (quicklists.pgd_cache) +#define pmd_quicklist ((unsigned long *)0) +#define pte_quicklist (quicklists.pte_cache) +#define pgtable_cache_size (quicklists.pgtable_cache_sz) +#else +#error Pgtable caches have to be per-CPU, so that no locking is needed. +#endif + +extern pgd_t *get_pgd_slow(void); + +extern __inline__ pgd_t *get_pgd_fast(void) +{ + unsigned long *ret; + + if((ret = pgd_quicklist) != NULL) { + pgd_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + clean_cache_area(ret, 4); + pgtable_cache_size--; + } else + ret = (unsigned long *)get_pgd_slow(); + return (pgd_t *)ret; +} + +extern __inline__ void free_pgd_fast(pgd_t *pgd) +{ + *(unsigned long *)pgd = (unsigned long) pgd_quicklist; + pgd_quicklist = (unsigned long *) pgd; + pgtable_cache_size++; +} + +extern __inline__ void free_pgd_slow(pgd_t *pgd) +{ + free_pages((unsigned long) pgd, 2); +} + +#define pgd_free(pgd) free_pgd_fast(pgd) +#define pgd_alloc() get_pgd_fast() + +extern __inline__ void set_pgdir(unsigned long address, pgd_t entry) +{ + struct task_struct * p; + pgd_t *pgd; + + read_lock(&tasklist_lock); + for_each_task(p) { + if (!p->mm) + continue; + *pgd_offset(p->mm,address) = entry; + } + read_unlock(&tasklist_lock); + for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd) + pgd[address >> PGDIR_SHIFT] = entry; +} + +extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; + +/**************** +* PMD functions * +****************/ + +/* PMD types (actually level 1 descriptor) */ +#define PMD_TYPE_MASK 0x0003 +#define PMD_TYPE_FAULT 0x0000 +#define PMD_TYPE_TABLE 0x0001 +#define PMD_TYPE_SECT 0x0002 +#define PMD_UPDATABLE 0x0010 +#define PMD_SECT_CACHEABLE 0x0008 +#define PMD_SECT_BUFFERABLE 0x0004 +#define PMD_SECT_AP_WRITE 0x0400 +#define PMD_SECT_AP_READ 0x0800 +#define PMD_DOMAIN(x) ((x) << 5) + +#define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_USER)) +#define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL)) + +#define pmd_none(pmd) (!pmd_val(pmd)) +#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0)) +#define pmd_bad(pmd) (pmd_val(pmd) & 2) +#define mk_user_pmd(ptep) __mk_pmd(ptep, _PAGE_USER_TABLE) +#define mk_kernel_pmd(ptep) __mk_pmd(ptep, _PAGE_KERNEL_TABLE) +#define set_pmd(pmdp,pmd) processor.u.armv3v4._set_pmd(pmdp,pmd) + +/* Find an entry in the second-level page table.. */ +#define pmd_offset(dir, address) ((pmd_t *)(dir)) + +extern __inline__ int pmd_present(pmd_t pmd) +{ + return ((pmd_val(pmd) + 1) & 2); +} + +/* We don't use pmd cache, so this is a dummy routine */ +extern __inline__ pmd_t *get_pmd_fast(void) +{ + return (pmd_t *)0; +} + +extern __inline__ void free_pmd_fast(pmd_t *pmd) +{ +} + +extern __inline__ void free_pmd_slow(pmd_t *pmd) +{ +} + +extern void __bad_pmd(pmd_t *pmd); +extern void __bad_pmd_kernel(pmd_t *pmd); + +/* + * allocating and freeing a pmd is trivial: the 1-entry pmd is + * inside the pgd, so has no extra memory associated with it. + */ +extern __inline__ void pmd_free(pmd_t *pmd) +{ +} + +extern __inline__ pmd_t *pmd_alloc(pgd_t *pgd, unsigned long address) +{ + return (pmd_t *) pgd; +} + +#define pmd_free_kernel pmd_free +#define pmd_alloc_kernel pmd_alloc + +extern __inline__ pmd_t __mk_pmd(pte_t *ptep, unsigned long prot) +{ + unsigned long pte_ptr = (unsigned long)ptep; + pmd_t pmd; + + pte_ptr -= PTRS_PER_PTE * BYTES_PER_PTR; + + /* + * The pmd must be loaded with the physical + * address of the PTE table + */ + pmd_val(pmd) = __virt_to_phys(pte_ptr) | prot; + + return pmd; +} + +extern __inline__ unsigned long pmd_page(pmd_t pmd) +{ + unsigned long ptr; + + ptr = pmd_val(pmd) & ~(PTRS_PER_PTE * BYTES_PER_PTR - 1); + + ptr += PTRS_PER_PTE * BYTES_PER_PTR; + + return __phys_to_virt(ptr); +} + + +/**************** +* PTE functions * +****************/ + +/* PTE types (actially level 2 descriptor) */ +#define PTE_TYPE_MASK 0x0003 +#define PTE_TYPE_FAULT 0x0000 +#define PTE_TYPE_LARGE 0x0001 +#define PTE_TYPE_SMALL 0x0002 +#define PTE_AP_READ 0x0aa0 +#define PTE_AP_WRITE 0x0550 +#define PTE_CACHEABLE 0x0008 +#define PTE_BUFFERABLE 0x0004 + +#define pte_none(pte) (!pte_val(pte)) +#define pte_clear(ptep) set_pte(ptep, __pte(0)) + +/* + * Conversion functions: convert a page and protection to a page entry, + * and a page entry and page directory to the page they refer to. + */ +extern __inline__ pte_t mk_pte(unsigned long page, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = __virt_to_phys(page) | pgprot_val(pgprot); + return pte; +} + +/* This takes a physical page address that is used by the remapping functions */ +extern __inline__ pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = physpage + pgprot_val(pgprot); + return pte; +} + +#define set_pte(ptep, pte) processor.u.armv3v4._set_pte(ptep,pte) + +extern __inline__ unsigned long pte_page(pte_t pte) +{ + return __phys_to_virt(pte_val(pte) & PAGE_MASK); +} + +extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted); +extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted); + +extern __inline__ pte_t *get_pte_fast(void) +{ + unsigned long *ret; + + if((ret = (unsigned long *)pte_quicklist) != NULL) { + pte_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + clean_cache_area(ret, 4); + pgtable_cache_size--; + } + return (pte_t *)ret; +} + +extern __inline__ void free_pte_fast(pte_t *pte) +{ + *(unsigned long *)pte = (unsigned long) pte_quicklist; + pte_quicklist = (unsigned long *) pte; + pgtable_cache_size++; +} + +extern __inline__ void free_pte_slow(pte_t *pte) +{ + free_page_2k((unsigned long)(pte - PTRS_PER_PTE)); +} + +#define pte_free_kernel(pte) free_pte_fast(pte) +#define pte_free(pte) free_pte_fast(pte) + +/*############################################################################### + * New PageTableEntry stuff... + */ +/* We now keep two sets of ptes - the physical and the linux version. + * This gives us many advantages, and allows us greater flexibility. + * + * The Linux pte's contain: + * bit meaning + * 0 page present + * 1 young + * 2 bufferable - matches physical pte + * 3 cacheable - matches physical pte + * 4 user + * 5 write + * 6 execute + * 7 dirty + * 8-11 unused + * 12-31 virtual page address + * + * These are stored at the pte pointer; the physical PTE is at -1024bytes + */ +#define L_PTE_PRESENT (1 << 0) +#define L_PTE_YOUNG (1 << 1) +#define L_PTE_BUFFERABLE (1 << 2) +#define L_PTE_CACHEABLE (1 << 3) +#define L_PTE_USER (1 << 4) +#define L_PTE_WRITE (1 << 5) +#define L_PTE_EXEC (1 << 6) +#define L_PTE_DIRTY (1 << 7) + +/* + * The following macros handle the cache and bufferable bits... + */ +#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG +#define _L_PTE_READ L_PTE_USER | L_PTE_CACHEABLE +#define _L_PTE_EXEC _L_PTE_READ | L_PTE_EXEC + +#define PAGE_NONE __pgprot(_L_PTE_DEFAULT) +#define PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_BUFFERABLE) +#define PAGE_SHARED __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_BUFFERABLE | L_PTE_WRITE) +#define PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) +#define PAGE_KERNEL __pgprot(_L_PTE_DEFAULT | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | L_PTE_DIRTY | L_PTE_WRITE) + +#define _PAGE_CHG_MASK (PAGE_MASK | L_PTE_DIRTY | L_PTE_YOUNG) + +/* + * The table below defines the page protection levels that we insert into our + * Linux page table version. These get translated into the best that the + * architecture can perform. Note that on most ARM hardware: + * 1) We cannot do execute protection + * 2) If we could do execute protection, then read is implied + * 3) write implies read permissions + */ +#define __P000 PAGE_NONE +#define __P001 PAGE_READONLY +#define __P010 PAGE_COPY +#define __P011 PAGE_COPY +#define __P100 PAGE_READONLY +#define __P101 PAGE_READONLY +#define __P110 PAGE_COPY +#define __P111 PAGE_COPY + +#define __S000 PAGE_NONE +#define __S001 PAGE_READONLY +#define __S010 PAGE_SHARED +#define __S011 PAGE_SHARED +#define __S100 PAGE_READONLY +#define __S101 PAGE_READONLY +#define __S110 PAGE_SHARED +#define __S111 PAGE_SHARED + + + +#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT) + +/* + * The following only work if pte_present() is true. + * Undefined behaviour if not.. + */ +#define pte_read(pte) (pte_val(pte) & L_PTE_USER) +#define pte_write(pte) (pte_val(pte) & L_PTE_WRITE) +#define pte_exec(pte) (pte_val(pte) & L_PTE_EXEC) +#define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY) +#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) + +#define PTE_BIT_FUNC(fn,op) \ +extern inline pte_t fn(pte_t pte) { pte_val(pte) op; return pte; } + +//PTE_BIT_FUNC(pte_rdprotect, &= ~L_PTE_USER); +PTE_BIT_FUNC(pte_wrprotect, &= ~L_PTE_WRITE); +PTE_BIT_FUNC(pte_exprotect, &= ~L_PTE_EXEC); +PTE_BIT_FUNC(pte_mkclean, &= ~L_PTE_DIRTY); +PTE_BIT_FUNC(pte_mkold, &= ~L_PTE_YOUNG); +//PTE_BIT_FUNC(pte_mkread, |= L_PTE_USER); +PTE_BIT_FUNC(pte_mkwrite, |= L_PTE_WRITE); +PTE_BIT_FUNC(pte_mkexec, |= L_PTE_EXEC); +PTE_BIT_FUNC(pte_mkdirty, |= L_PTE_DIRTY); +PTE_BIT_FUNC(pte_mkyoung, |= L_PTE_YOUNG); +PTE_BIT_FUNC(pte_nocache, &= ~L_PTE_CACHEABLE); + +extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) +{ + pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); + return pte; +} + +/* Find an entry in the third-level page table.. */ +extern __inline__ pte_t * pte_offset(pmd_t * dir, unsigned long address) +{ + return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); +} + +extern __inline__ pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + if (pmd_none(*pmd)) { + pte_t *page = (pte_t *) get_pte_fast(); + + if (!page) + return get_pte_kernel_slow(pmd, address); + set_pmd(pmd, mk_kernel_pmd(page)); + return page + address; + } + if (pmd_bad(*pmd)) { + __bad_pmd_kernel(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} + +extern __inline__ pte_t * pte_alloc(pmd_t * pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + + if (pmd_none(*pmd)) { + pte_t *page = (pte_t *) get_pte_fast(); + + if (!page) + return get_pte_slow(pmd, address); + set_pmd(pmd, mk_user_pmd(page)); + return page + address; + } + if (pmd_bad(*pmd)) { + __bad_pmd(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} + +#define SWP_TYPE(entry) (((entry) >> 2) & 0x7f) +#define SWP_OFFSET(entry) ((entry) >> 9) +#define SWP_ENTRY(type,offset) (((type) << 2) | ((offset) << 9)) + +#endif /* __ASM_PROC_PAGE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/processor.h --- linux-2.2.14-rmk-mercury/include/asm/proc/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/processor.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * linux/include/asm-arm/proc-armv/processor.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 20-09-1996 RMK Created + * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*' + * 28-09-1996 RMK Moved start_thread into the processor dependencies + * 09-09-1998 PJB Delete redundant `wp_works_ok' + */ +#ifndef __ASM_PROC_PROCESSOR_H +#define __ASM_PROC_PROCESSOR_H + +#include + +#define KERNEL_STACK_SIZE PAGE_SIZE + +struct context_save_struct { + unsigned long cpsr; + unsigned long r4; + unsigned long r5; + unsigned long r6; + unsigned long r7; + unsigned long r8; + unsigned long r9; + unsigned long sl; + unsigned long fp; + unsigned long pc; +}; + +#define INIT_CSS (struct context_save_struct){ SVC_MODE, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + +#define EXTRA_THREAD_STRUCT \ + unsigned int domain; + +#define EXTRA_THREAD_STRUCT_INIT \ + , domain_val(DOMAIN_USER, DOMAIN_CLIENT) | \ + domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ + domain_val(DOMAIN_IO, DOMAIN_CLIENT) + +#define SWAPPER_PG_DIR (((unsigned long)swapper_pg_dir) - PAGE_OFFSET) + +#define start_thread(regs,pc,sp) \ +({ \ + unsigned long *stack = (unsigned long *)sp; \ + set_fs(USER_DS); \ + memzero(regs->uregs, sizeof(regs->uregs)); \ + if (current->personality & ADDR_LIMIT_32BIT) \ + regs->ARM_cpsr = USR_MODE; \ + else \ + regs->ARM_cpsr = USR26_MODE; \ + regs->ARM_pc = pc; /* pc */ \ + regs->ARM_sp = sp; /* sp */ \ + regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ + regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ + regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ +}) + +/* Allocation and freeing of basic task resources. */ +/* + * NOTE! The task struct and the stack go together + */ +#define ll_alloc_task_struct() ((struct task_struct *) __get_free_pages(GFP_KERNEL,1)) +#define ll_free_task_struct(p) free_pages((unsigned long)(p),1) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/ptrace.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/ptrace.h --- linux-2.2.14-rmk-mercury/include/asm/proc/ptrace.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/ptrace.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * linux/include/asm-arm/proc-armv/ptrace.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_PROC_PTRACE_H +#define __ASM_PROC_PTRACE_H + +#define USR26_MODE 0x00 +#define FIQ26_MODE 0x01 +#define IRQ26_MODE 0x02 +#define SVC26_MODE 0x03 +#define USR_MODE 0x10 +#define FIQ_MODE 0x11 +#define IRQ_MODE 0x12 +#define SVC_MODE 0x13 +#define ABT_MODE 0x17 +#define UND_MODE 0x1b +#define SYSTEM_MODE 0x1f +#define MODE_MASK 0x1f +#define F_BIT 0x40 +#define I_BIT 0x80 +#define CC_V_BIT (1 << 28) +#define CC_C_BIT (1 << 29) +#define CC_Z_BIT (1 << 30) +#define CC_N_BIT (1 << 31) +#define PCMASK 0 + +#ifndef __ASSEMBLY__ + +/* this struct defines the way the registers are stored on the + stack during a system call. */ + +struct pt_regs { + long uregs[18]; +}; + +#define ARM_cpsr uregs[16] +#define ARM_pc uregs[15] +#define ARM_lr uregs[14] +#define ARM_sp uregs[13] +#define ARM_ip uregs[12] +#define ARM_fp uregs[11] +#define ARM_r10 uregs[10] +#define ARM_r9 uregs[9] +#define ARM_r8 uregs[8] +#define ARM_r7 uregs[7] +#define ARM_r6 uregs[6] +#define ARM_r5 uregs[5] +#define ARM_r4 uregs[4] +#define ARM_r3 uregs[3] +#define ARM_r2 uregs[2] +#define ARM_r1 uregs[1] +#define ARM_r0 uregs[0] +#define ARM_ORIG_r0 uregs[17] + +#ifdef __KERNEL__ + +#define user_mode(regs) \ + (((regs)->ARM_cpsr & 0xf) == 0) + +#define processor_mode(regs) \ + ((regs)->ARM_cpsr & MODE_MASK) + +#define interrupts_enabled(regs) \ + (!((regs)->ARM_cpsr & I_BIT)) + +#define fast_interrupts_enabled(regs) \ + (!((regs)->ARM_cpsr & F_BIT)) + +#define condition_codes(regs) \ + ((regs)->ARM_cpsr & (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT)) + +#define instruction_pointer(regs) ((regs)->ARM_pc) +#define pc_pointer(v) (v) + +/* Are the current registers suitable for user mode? + * (used to maintain security in signal handlers) + */ +static inline int valid_user_regs(struct pt_regs *regs) +{ + if ((regs->ARM_cpsr & 0xf) == 0 && + (regs->ARM_cpsr & (F_BIT|I_BIT)) == 0) + return 1; + + /* + * Force CPSR to something logical... + */ + regs->ARM_cpsr &= (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT|0x10); + + return 0; +} + +#endif /* __KERNEL__ */ + +#endif /* __ASSEMBLY__ */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/semaphore.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/semaphore.h --- linux-2.2.14-rmk-mercury/include/asm/proc/semaphore.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/semaphore.h 2007-07-10 12:15:53.000000000 +0100 @@ -0,0 +1,117 @@ +/* + * linux/include/asm-arm/semaphore.h + */ +#ifndef __ASM_PROC_SEMAPHORE_H +#define __ASM_PROC_SEMAPHORE_H + +/* + * This is ugly, but we want the default case to fall through. + * "__down" is the actual routine that waits... + */ +extern inline void down(struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__down_failed) + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); +} + +/* + * This is ugly, but we want the default case to fall through. + * "__down_interruptible" is the actual routine that waits... + */ +extern inline int down_interruptible (struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down interruptible operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_interruptible_failed) "\n" +" mov %1, r0" + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); + + return temp; +} + +extern inline int down_trylock(struct semaphore *sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down try lock operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_trylock_failed) "\n" +" mov %1, r0" + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); + + return temp; +} + +/* + * Note! This is subtle. We jump to wake people up only if + * the semaphore was negative (== somebody was waiting on it). + * The default case (no contention) will result in NO + * jumps for both down() and up(). + */ +extern inline void up(struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic up operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" adds %1, %1, #1\n" +" str %1, [%2]\n" +" orrle %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__up_wakeup) + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/proc/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/shmparam.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,19 @@ +/* + * linux/include/asm-arm/proc-armv/shmparam.h + * + * Copyright (C) 1996 Russell King + * + * definitions for the shared process memory on ARM v3 or v4 + * processors + */ + +#ifndef __ASM_PROC_SHMPARAM_H +#define __ASM_PROC_SHMPARAM_H + +#ifndef SHM_RANGE_START +#define SHM_RANGE_START 0x50000000 +#define SHM_RANGE_END 0x60000000 +#define SHMMAX 0x01000000 +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/system.h --- linux-2.2.14-rmk-mercury/include/asm/proc/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/system.h 2007-07-10 12:36:47.000000000 +0100 @@ -0,0 +1,153 @@ +/* + * linux/include/asm-arm/proc-armv/system.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_PROC_SYSTEM_H +#define __ASM_PROC_SYSTEM_H + +extern const char xchg_str[]; +extern void abort(void); + +extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) +{ + switch (size) { + case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); + break; + case 2: abort (); + case 4: __asm__ __volatile__ ("swp %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); + break; + default: arm_invalidptr(xchg_str, size); + } + return x; +} + +#define set_cr(x) \ + do { \ + __asm__ __volatile__( \ + "mcr p15, 0, %0, c1, c0 @ set CR" \ + : : "r" (x)); \ + } while (0) + +extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ +extern unsigned long cr_alignment; /* defined in entry-armv.S */ + +/* + * We can wait for an interrupt... + */ +#define proc_idle() \ + do { \ + __asm__ __volatile__( \ +" mcr p15, 0, %0, c15, c8, 2 @ proc_idle" \ + : : "r" (0)); \ + } while (0) + +/* + * A couple of speedups for the ARM + */ + +/* + * Save the current interrupt enable state & disable IRQs + */ +#define __save_flags_cli(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %1, cpsr @ save_flags_cli\n" \ +" and %0, %1, #192\n" \ +" orr %1, %1, #128\n" \ +" msr cpsr, %1" \ + : "=r" (x), "=r" (temp) \ + : \ + : "memory"); \ + } while (0) + +/* Same as above, but disable FIQs too: don't stay in this mode too long + otherwise things break :) */ +#define __save_flags_clif(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %1, cpsr @ save_flags_clif\n" \ +" and %0, %1, #192\n" \ +" orr %1, %1, #192\n" \ +" msr cpsr, %1" \ + : "=r" (x), "=r" (temp) \ + : \ + : "memory"); \ + } while (0) + +/* + * Enable IRQs + */ +#define __sti() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ sti\n" \ +" bic %0, %0, #128\n" \ +" msr cpsr, %0" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * Disable IRQs + */ +#define __cli() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ cli\n" \ +" orr %0, %0, #128\n" \ +" msr cpsr, %0" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * save current IRQ & FIQ state + */ +#define __save_flags(x) \ + do { \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ save_flags\n" \ +" and %0, %0, #192" \ + : "=r" (x) \ + : \ + : "memory"); \ + } while (0) + +/* + * restore saved IRQ & FIQ state + */ +#define __restore_flags(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ restore_flags\n" \ +" bic %0, %0, #192\n" \ +" orr %0, %0, %1\n" \ +" msr cpsr, %0" \ + : "=&r" (temp) \ + : "r" (x) \ + : "memory"); \ + } while (0) + +#ifdef __SMP__ +#error SMP not supported +#else + +#define cli() __cli() +#define sti() __sti() +#define save_flags(x) __save_flags(x) +#define restore_flags(x) __restore_flags(x) +#define save_flags_cli(x) __save_flags_cli(x) +#define save_flags_clif(x) __save_flags_clif(x) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/uaccess.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/uaccess.h --- linux-2.2.14-rmk-mercury/include/asm/proc/uaccess.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/uaccess.h 2007-07-10 12:25:52.000000000 +0100 @@ -0,0 +1,177 @@ +/* + * linux/include/asm-arm/proc-armv/uaccess.h + */ + +#include +#include + +/* + * Note that this is actually 0x1,0000,0000 + */ +#define KERNEL_DS 0x00000000 +#define USER_DS PAGE_OFFSET + +#define get_ds() (KERNEL_DS) +#define get_fs() (current->addr_limit) + +#define segment_eq(a,b) ((a) == (b)) + +extern __inline__ void set_fs (mm_segment_t fs) +{ + current->addr_limit = fs; + + modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); +} + +/* We use 33-bit arithmetic here... */ +#define __range_ok(addr,size) ({ \ + unsigned long flag, sum; \ + __asm__ __volatile__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ + : "=&r" (flag), "=&r" (sum) \ + : "r" (addr), "Ir" (size), "0" (current->addr_limit) \ + : "cc"); \ + flag; }) + +#define __addr_ok(addr) ({ \ + unsigned long flag; \ + __asm__ __volatile__("cmp %2, %0; movlo %0, #0" \ + : "=&r" (flag) \ + : "0" (current->addr_limit), "r" (addr) \ + : "cc"); \ + (flag == 0); }) + +#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) + +#define __put_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + "1: strbt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "i" (EFAULT), "0" (err)) + +#define __put_user_asm_half(x,addr,err) \ +({ \ + unsigned long __temp = (unsigned long)(x); \ + __asm__ __volatile__( \ + "1: strbt %1,[%3],#0\n" \ + "2: strbt %2,[%4],#0\n" \ + "3:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "4: mvn %0, %5\n" \ + " b 3b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 4b\n" \ + " .long 2b, 4b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (__temp), "r" (__temp >> 8), \ + "r" (addr), "r" ((int)(addr) + 1), \ + "i" (EFAULT), "0" (err)); \ +}) + +#define __put_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + "1: strt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "i" (EFAULT), "0" (err)) + +#define __get_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + "1: ldrbt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " mov %1, #0\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "i" (EFAULT), "0" (err)) + +#define __get_user_asm_half(x,addr,err) \ +({ \ + unsigned long __temp; \ + __asm__ __volatile__( \ + "1: ldrbt %1,[%3],#0\n" \ + "2: ldrbt %2,[%4],#0\n" \ + " orr %1, %1, %2, lsl #8\n" \ + "3:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "4: mvn %0, %5\n" \ + " mov %1, #0\n" \ + " b 3b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 4b\n" \ + " .long 2b, 4b\n" \ + " .previous" \ + : "=r" (err), "=r" (x), "=&r" (__temp) \ + : "r" (addr), "r" ((int)(addr) + 1), \ + "i" (EFAULT), "0" (err)); \ +}) + + +#define __get_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + "1: ldrt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " mov %1, #0\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "i" (EFAULT), "0" (err)) + +extern unsigned long __arch_copy_from_user(void *to, const void *from, unsigned long n); +#define __do_copy_from_user(to,from,n) \ + (n) = __arch_copy_from_user(to,from,n) + +extern unsigned long __arch_copy_to_user(void *to, const void *from, unsigned long n); +#define __do_copy_to_user(to,from,n) \ + (n) = __arch_copy_to_user(to,from,n) + +extern unsigned long __arch_clear_user(void *addr, unsigned long n); +#define __do_clear_user(addr,sz) \ + (sz) = __arch_clear_user(addr,sz) + +extern unsigned long __arch_strncpy_from_user(char *to, const char *from, unsigned long count); +#define __do_strncpy_from_user(dst,src,count,res) \ + (res) = __arch_strncpy_from_user(dst,src,count) + +extern unsigned long __arch_strnlen_user(const char *s, long n); +#define __do_strnlen_user(s,n,res) \ + (res) = __arch_strnlen_user(s,n) diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/proc/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc/uncompress.h 2007-07-10 14:21:19.000000000 +0100 @@ -0,0 +1,22 @@ +/* + * linux/include/asm-arm/proc-armv/uncompress.h + * + * (c) 1997 Russell King + */ + +static inline void proc_decomp_setup (void) +{ + __asm__ __volatile__( +" mrc p15, 0, r0, c0, c0\n" +" eor r0, r0, #0x44 << 24\n" +" eor r0, r0, #0x01 << 16\n" +" eor r0, r0, #0xA1 << 8\n" +" movs r0, r0, lsr #4\n" +" mcreq p15, 0, r0, c7, c5, 0 @ flush I cache\n" +" mrceq p15, 0, r0, c1, c0\n" +" orreq r0, r0, #1 << 12\n" +" mcreq p15, 0, r0, c1, c0 @ enable I cache\n" +" mov r0, #0\n" +" mcreq p15, 0, r0, c15, c1, 2 @ enable clock switching\n" + : : : "r0", "cc", "memory"); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/assembler.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/assembler.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/assembler.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/assembler.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,64 @@ +/* + * linux/asm-arm/proc-armo/assembler.h + * + * Copyright (C) 1996 Russell King + * + * This file contains arm architecture specific defines + * for the different processors + */ +#ifndef __ASSEMBLY__ +#error "Only include this from assembly code" +#endif + +#define MODE_USR USR26_MODE +#define MODE_FIQ FIQ26_MODE +#define MODE_IRQ IRQ26_MODE +#define MODE_SVC SVC26_MODE + +#define DEFAULT_FIQ MODE_FIQ + +#ifdef __STDC__ +#define LOADREGS(cond, base, reglist...)\ + ldm##cond base,reglist^ + +#define RETINSTR(instr, regs...)\ + instr##s regs +#else +#define LOADREGS(cond, base, reglist...)\ + ldm/**/cond base,reglist^ + +#define RETINSTR(instr, regs...)\ + instr/**/s regs +#endif + +#define MODENOP\ + mov r0, r0 + +#define MODE(savereg,tmpreg,mode) \ + mov savereg, pc; \ + bic tmpreg, savereg, $0x0c000003; \ + orr tmpreg, tmpreg, $mode; \ + teqp tmpreg, $0 + +#define RESTOREMODE(savereg) \ + teqp savereg, $0 + +#define SAVEIRQS(tmpreg) + +#define RESTOREIRQS(tmpreg) + +#define DISABLEIRQS(tmpreg)\ + teqp pc, $0x08000003 + +#define ENABLEIRQS(tmpreg)\ + teqp pc, $0x00000003 + +#define USERMODE(tmpreg)\ + teqp pc, $0x00000000;\ + mov r0, r0 + +#define SVCMODE(tmpreg)\ + teqp pc, $0x00000003;\ + mov r0, r0 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/elf.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/elf.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/elf.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/elf.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,19 @@ +/* + * ELF definitions for 26-bit CPUs + */ + +#define ELF_EXEC_PAGESIZE 32768 + +#if 0 /* not yet */ +#define ELF_PROC_OK(x) \ + ((x)->e_flags & EF_ARM_APCS26) +#else +#define ELF_PROC_OK(x) (1) +#endif + +#ifdef __KERNEL__ + +#define SET_PERSONALITY(ex,ibcs2) \ + current->personality = PER_LINUX + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/io.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/io.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/proc-armo/io.h + */ + +/* Nothing to do */ +#define dma_cache_inv(_start,_size) do { } while (0) +#define dma_cache_wback(_start,_size) do { } while (0) +#define dma_cache_wback_inv(_start,_size) do { } while (0) diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/mm-init.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/mm-init.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/mm-init.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/mm-init.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,55 @@ +/* + * linux/include/asm-arm/proc-armo/mm-init.h + * + * Copyright (C) 1996 Russell King + * + * This contains the code to setup the memory map on an ARM2/ARM250/ARM3 + * machine. This is both processor & architecture specific, and requires + * some more work to get it to fit into our separate processor and + * architecture structure. + */ +#include + +int page_nr; + +#define setup_processor_functions() +#define PTE_SIZE (PTRS_PER_PTE * BYTES_PER_PTR) + +static inline void setup_swapper_dir (int index, pte_t *ptep) +{ + set_pmd (pmd_offset (swapper_pg_dir + index, 0), mk_pmd (ptep)); +} + +static inline unsigned long +setup_pagetables(unsigned long start_mem, unsigned long end_mem) +{ + unsigned int i; + union { unsigned long l; pte_t *pte; } u; + + page_nr = MAP_NR(end_mem); + + /* map in pages for (0x0000 - 0x8000) */ + u.l = ((start_mem + (PTE_SIZE-1)) & ~(PTE_SIZE-1)); + start_mem = u.l + PTE_SIZE; + memzero (u.pte, PTE_SIZE); + u.pte[0] = mk_pte(PAGE_OFFSET + 491520, PAGE_READONLY); + setup_swapper_dir (0, u.pte); + + for (i = 1; i < PTRS_PER_PGD; i++) + pgd_val(swapper_pg_dir[i]) = 0; + + return start_mem; +} + +static inline void +mark_usable_memory_areas(unsigned long *start_mem, unsigned long end_mem) +{ + unsigned long smem; + + *start_mem = smem = PAGE_ALIGN(*start_mem); + + while (smem < end_mem) { + clear_bit(PG_reserved, &mem_map[MAP_NR(smem)].flags); + smem += PAGE_SIZE; + } +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/page.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/page.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/page.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/page.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,76 @@ +/* + * linux/include/asm-arm/proc-armo/page.h + * + * Copyright (C) 1995, 1996 Russell King + */ + +#ifndef __ASM_PROC_PAGE_H +#define __ASM_PROC_PAGE_H + +#include + +/* PAGE_SHIFT determines the page size. This is configurable. */ +#if defined(CONFIG_PAGESIZE_8) +#define PAGE_SHIFT 13 /* 8K */ +#elif defined(CONFIG_PAGESIZE_16) +#define PAGE_SHIFT 14 /* 16K */ +#else /* default */ +#define PAGE_SHIFT 15 /* 32K */ +#endif +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) + +#ifdef __KERNEL__ + +#define STRICT_MM_TYPECHECKS + +#ifdef STRICT_MM_TYPECHECKS +/* + * These are used to make use of C type-checking.. + */ +typedef struct { unsigned long pte; } pte_t; +typedef struct { unsigned long pmd; } pmd_t; +typedef struct { unsigned long pgd; } pgd_t; +typedef struct { unsigned long pgprot; } pgprot_t; + +#define pte_val(x) ((x).pte) +#define pmd_val(x) ((x).pmd) +#define pgd_val(x) ((x).pgd) +#define pgprot_val(x) ((x).pgprot) + +#define __pte(x) ((pte_t) { (x) } ) +#define __pmd(x) ((pmd_t) { (x) } ) +#define __pgd(x) ((pgd_t) { (x) } ) +#define __pgprot(x) ((pgprot_t) { (x) } ) + +#else +/* + * .. while these make it easier on the compiler + */ +typedef unsigned long pte_t; +typedef unsigned long pmd_t; +typedef unsigned long pgd_t; +typedef unsigned long pgprot_t; + +#define pte_val(x) (x) +#define pmd_val(x) (x) +#define pgd_val(x) (x) +#define pgprot_val(x) (x) + +#define __pte(x) (x) +#define __pmd(x) (x) +#define __pgd(x) (x) +#define __pgprot(x) (x) + +#endif + +/* to align the pointer to the (next) page boundary */ +#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) + +/* This handles the memory map.. */ +#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT) + +#endif /* __KERNEL__ */ + +#endif /* __ASM_PROC_PAGE_H */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/param.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/param.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,27 @@ +/* + * linux/include/asm-arm/proc-armo/param.h + * + * Copyright (C) 1995, 1996 Russell King + */ + +#ifndef __ASM_PROC_PARAM_H +#define __ASM_PROC_PARAM_H + +#ifndef HZ +#define HZ 100 +#endif + +#define EXEC_PAGESIZE 32768 + +#ifndef NGROUPS +#define NGROUPS 32 +#endif + +#ifndef NOGROUP +#define NOGROUP (-1) +#endif + +#define MAXHOSTNAMELEN 64 /* max length of hostname */ + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/pgtable.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/pgtable.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/pgtable.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/pgtable.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,514 @@ +/* + * linux/include/asm-arm/proc-armo/pgtable.h + * + * Copyright (C) 1995-1999 Russell King + * Modified 18/19-Oct-1997 for two-level page table + */ +#ifndef __ASM_PROC_PGTABLE_H +#define __ASM_PROC_PGTABLE_H + +#include +#include +#include /* For TASK_SIZE */ + +#define LIBRARY_TEXT_START 0x0c000000 + +/* + * Cache flushing... + */ +#define flush_cache_all() do { } while (0) +#define flush_cache_mm(mm) do { } while (0) +#define flush_cache_range(mm,start,end) do { } while (0) +#define flush_cache_page(vma,vmaddr) do { } while (0) +#define flush_page_to_ram(page) do { } while (0) +#define clean_cache_range(_start,_end) do { } while (0) +#define clean_cache_area(_start,_size) do { } while (0) +#define flush_icache_range(start,end) do { } while (0) + +/* + * TLB flushing: + * + * - flush_tlb() flushes the current mm struct TLBs + * - flush_tlb_all() flushes all processes TLBs + * - flush_tlb_mm(mm) flushes the specified mm context TLB's + * - flush_tlb_page(vma, vmaddr) flushes one page + * - flush_tlb_range(mm, start, end) flushes a range of pages + */ +#define flush_tlb() do { } while (0) +#define flush_tlb_all() do { } while (0) +#define flush_tlb_mm(mm) do { } while (0) +#define flush_tlb_range(mm, start, end) do { } while (0) +#define flush_tlb_page(vma, vmaddr) do { } while (0) + +/* + * We have a mem map cache... + */ +extern __inline__ void update_memc_all(void) +{ + struct task_struct *p; + + p = &init_task; + do { + processor.u.armv2._update_map(p); + p = p->next_task; + } while (p != &init_task); + + processor.u.armv2._remap_memc (current); +} + +extern __inline__ void update_memc_task(struct task_struct *tsk) +{ + processor.u.armv2._update_map(tsk); + + if (tsk == current) + processor.u.armv2._remap_memc (tsk); +} + +extern __inline__ void update_memc_mm(struct mm_struct *mm) +{ + struct task_struct *p; + + p = &init_task; + do { + if (p->mm == mm) + processor.u.armv2._update_map(p); + p = p->next_task; + } while (p != &init_task); + + if (current->mm == mm) + processor.u.armv2._remap_memc (current); +} + +extern __inline__ void update_memc_addr(struct mm_struct *mm, unsigned long addr, pte_t pte) +{ + struct task_struct *p; + + p = &init_task; + do { + if (p->mm == mm) + processor.u.armv2._update_mmu_cache(p, addr, pte); + p = p->next_task; + } while (p != &init_task); + + if (current->mm == mm) + processor.u.armv2._remap_memc (current); +} + +#define __flush_entry_to_ram(entry) + +/* PMD_SHIFT determines the size of the area a second-level page table can map */ +#define PMD_SHIFT 20 +#define PMD_SIZE (1UL << PMD_SHIFT) +#define PMD_MASK (~(PMD_SIZE-1)) + +/* PGDIR_SHIFT determines what a third-level page table entry can map */ +#define PGDIR_SHIFT 20 +#define PGDIR_SIZE (1UL << PGDIR_SHIFT) +#define PGDIR_MASK (~(PGDIR_SIZE-1)) + +/* + * entries per page directory level: the arm3 is one-level, so + * we don't really have any PMD or PTE directory physically. + * + * 18-Oct-1997 RMK Now two-level (32x32) + */ +#define PTRS_PER_PTE 32 +#define PTRS_PER_PMD 1 +#define PTRS_PER_PGD 32 +#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) + +#define VMALLOC_START 0x01a00000 +#define VMALLOC_VMADDR(x) ((unsigned long)(x)) +#define VMALLOC_END 0x01c00000 + +#define _PAGE_PRESENT 0x01 +#define _PAGE_READONLY 0x02 +#define _PAGE_NOT_USER 0x04 +#define _PAGE_OLD 0x08 +#define _PAGE_CLEAN 0x10 + +#define _PAGE_TABLE (_PAGE_PRESENT) +#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_OLD | _PAGE_CLEAN) + +/* -- present -- -- !dirty -- --- !write --- ---- !user --- */ +#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY | _PAGE_NOT_USER) +#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_CLEAN ) +#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY ) +#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY ) +#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_NOT_USER) + +/* + * The arm can't do page protection for execute, and considers that the same are read. + * Also, write permissions imply read permissions. This is the closest we can get.. + */ +#define __P000 PAGE_NONE +#define __P001 PAGE_READONLY +#define __P010 PAGE_COPY +#define __P011 PAGE_COPY +#define __P100 PAGE_READONLY +#define __P101 PAGE_READONLY +#define __P110 PAGE_COPY +#define __P111 PAGE_COPY + +#define __S000 PAGE_NONE +#define __S001 PAGE_READONLY +#define __S010 PAGE_SHARED +#define __S011 PAGE_SHARED +#define __S100 PAGE_READONLY +#define __S101 PAGE_READONLY +#define __S110 PAGE_SHARED +#define __S111 PAGE_SHARED + +#undef TEST_VERIFY_AREA + +extern unsigned long *empty_zero_page; + +/* + * BAD_PAGETABLE is used when we need a bogus page-table, while + * BAD_PAGE is used for a bogus page. + * + * ZERO_PAGE is a global shared page that is always zero: used + * for zero-mapped memory areas etc.. + */ +extern pte_t __bad_page(void); +extern pte_t *__bad_pagetable(void); + +#define BAD_PAGETABLE __bad_pagetable() +#define BAD_PAGE __bad_page() +#define ZERO_PAGE(vaddr) ((unsigned long) empty_zero_page) + +/* number of bits that fit into a memory pointer */ +#define BYTES_PER_PTR (sizeof(unsigned long)) +#define BITS_PER_PTR (8*BYTES_PER_PTR) + +/* to align the pointer to a pointer address */ +#define PTR_MASK (~(sizeof(void*)-1)) + +/* sizeof(void*)==1<>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) + +/* to set the page-dir */ +#define SET_PAGE_DIR(tsk,pgdir) \ +do { \ + tsk->tss.memmap = (unsigned long)pgdir; \ + processor.u.armv2._update_map(tsk); \ + if ((tsk) == current) \ + processor.u.armv2._remap_memc (current); \ +} while (0) + +extern unsigned long physical_start; +extern unsigned long physical_end; + +#define pte_none(pte) (!pte_val(pte)) +#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) +#define pte_clear(ptep) set_pte((ptep), __pte(0)) + +#define pmd_none(pmd) (!pmd_val(pmd)) +#define pmd_bad(pmd) ((pmd_val(pmd) & 0xfc000002)) +#define pmd_present(pmd) (pmd_val(pmd) & _PAGE_PRESENT) +#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0)) + +/* + * The "pgd_xxx()" functions here are trivial for a folded two-level + * setup: the pgd is never bad, and a pmd always exists (as it's folded + * into the pgd entry) + */ +#define pgd_none(pgd) (0) +#define pgd_bad(pgd) (0) +#define pgd_present(pgd) (1) +#define pgd_clear(pgdp) + +/* + * The following only work if pte_present() is true. + * Undefined behaviour if not.. + */ +extern inline int pte_read(pte_t pte) { return !(pte_val(pte) & _PAGE_NOT_USER); } +extern inline int pte_write(pte_t pte) { return !(pte_val(pte) & _PAGE_READONLY); } +extern inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NOT_USER); } +extern inline int pte_dirty(pte_t pte) { return !(pte_val(pte) & _PAGE_CLEAN); } +extern inline int pte_young(pte_t pte) { return !(pte_val(pte) & _PAGE_OLD); } +#define pte_cacheable(pte) 1 + +extern inline pte_t pte_nocache(pte_t pte) { return pte; } +extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) |= _PAGE_READONLY; return pte; } +extern inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) |= _PAGE_NOT_USER; return pte; } +extern inline pte_t pte_exprotect(pte_t pte) { pte_val(pte) |= _PAGE_NOT_USER; return pte; } +extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) |= _PAGE_CLEAN; return pte; } +extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) |= _PAGE_OLD; return pte; } + +extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) &= ~_PAGE_READONLY; return pte; } +extern inline pte_t pte_mkread(pte_t pte) { pte_val(pte) &= ~_PAGE_NOT_USER; return pte; } +extern inline pte_t pte_mkexec(pte_t pte) { pte_val(pte) &= ~_PAGE_NOT_USER; return pte; } +extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) &= ~_PAGE_CLEAN; return pte; } +extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) &= ~_PAGE_OLD; return pte; } + +/* + * Conversion functions: convert a page and protection to a page entry, + * and a page entry and page directory to the page they refer to. + */ +extern __inline__ pte_t mk_pte(unsigned long page, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = __virt_to_phys(page) | pgprot_val(pgprot); + return pte; +} + +/* This takes a physical page address that is used by the remapping functions */ +extern __inline__ pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = physpage + pgprot_val(pgprot); + return pte; +} + +extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) +{ + pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); + return pte; +} + +/* Certain architectures need to do special things when pte's + * within a page table are directly modified. Thus, the following + * hook is made available. + */ +#define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval)) + +extern __inline__ unsigned long pte_page(pte_t pte) +{ + return __phys_to_virt(pte_val(pte) & PAGE_MASK); +} + +extern __inline__ pmd_t mk_pmd(pte_t *ptep) +{ + pmd_t pmd; + pmd_val(pmd) = __virt_to_phys((unsigned long)ptep) | _PAGE_TABLE; + return pmd; +} + +/* these are aliases for the above function */ +#define mk_user_pmd(ptep) mk_pmd(ptep) +#define mk_kernel_pmd(ptep) mk_pmd(ptep) + +#define set_pmd(pmdp,pmd) ((*(pmdp)) = (pmd)) + +extern __inline__ unsigned long pmd_page(pmd_t pmd) +{ + return __phys_to_virt(pmd_val(pmd) & ~_PAGE_TABLE); +} + +/* to find an entry in a kernel page-table-directory */ +#define pgd_offset_k(address) pgd_offset(&init_mm, address) + +/* to find an entry in a page-table-directory */ +extern __inline__ pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) +{ + return mm->pgd + (address >> PGDIR_SHIFT); +} + +/* Find an entry in the second-level page table.. */ +#define pmd_offset(dir, address) ((pmd_t *)(dir)) + +/* Find an entry in the third-level page table.. */ +extern __inline__ pte_t * pte_offset(pmd_t *dir, unsigned long address) +{ + return (pte_t *)pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); +} + +/* + * Allocate and free page tables. The xxx_kernel() versions are + * used to allocate a kernel page table - this turns on ASN bits + * if any. + */ + +#ifndef __SMP__ +#ifndef CONFIG_NO_PGT_CACHE +extern struct pgtable_cache_struct { + unsigned long *pgd_cache; + unsigned long *pte_cache; + unsigned long pgtable_cache_sz; +} quicklists; + +#define pmd_quicklist ((unsigned long *)0) +#define pte_quicklist (quicklists.pte_cache) +#define pgd_quicklist (quicklists.pgd_cache) +#define pgtable_cache_size (quicklists.pgtable_cache_sz) +#endif + +#else +#error Pgtable caches have to be per-CPU, so that no locking is needed. +#endif + +extern pgd_t *get_pgd_slow(void); +extern void free_table(void *table); + +#ifndef CONFIG_NO_PGT_CACHE +extern __inline__ pgd_t *get_pgd_fast(void) +{ + unsigned long *ret; + + if((ret = pgd_quicklist) != NULL) { + pgd_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + pgtable_cache_size--; + } else + ret = (unsigned long *)get_pgd_slow(); + return (pgd_t *)ret; +} + +extern __inline__ void free_pgd_fast(pgd_t *pgd) +{ + *(unsigned long *)pgd = (unsigned long) pgd_quicklist; + pgd_quicklist = (unsigned long *) pgd; + pgtable_cache_size++; +} +#endif + +/* keep this as an inline so we get type checking */ +extern __inline__ void free_pgd_slow(pgd_t *pgd) +{ + free_table((void *)pgd); +} + +extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted); + +#ifndef CONFIG_NO_PGT_CACHE +extern __inline__ pte_t *get_pte_fast(void) +{ + unsigned long *ret; + + if((ret = (unsigned long *)pte_quicklist) != NULL) { + pte_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + pgtable_cache_size--; + } + return (pte_t *)ret; +} + +extern __inline__ void free_pte_fast(pte_t *pte) +{ + *(unsigned long *)pte = (unsigned long) pte_quicklist; + pte_quicklist = (unsigned long *) pte; + pgtable_cache_size++; +} +#endif + +/* keep this as an inline so we get type checking */ +extern __inline__ void free_pte_slow(pte_t *pte) +{ + free_table((void *)pte); +} + +/* We don't use pmd cache, so this is a dummy routine */ +extern __inline__ pmd_t *get_pmd_fast(void) +{ + return (pmd_t *)0; +} + +extern __inline__ void free_pmd_fast(pmd_t *pmd) +{ +} + +extern __inline__ void free_pmd_slow(pmd_t *pmd) +{ +} + +extern void __bad_pmd(pmd_t *pmd); +extern void __bad_pmd_kernel(pmd_t *pmd); + +#ifdef CONFIG_NO_PGT_CACHE +#define pte_free_kernel(pte) free_pte_slow(pte) +#define pte_free(pte) free_pte_slow(pte) +#define pgd_free(pgd) free_pgd_slow(pgd) +#define pgd_alloc() get_pgd_slow() + +extern __inline__ pte_t *pte_alloc(pmd_t * pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + + if (pmd_none (*pmd)) { + return get_pte_slow(pmd, address); + } + if (pmd_bad (*pmd)) { + __bad_pmd(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} +#else +#define pte_free_kernel(pte) free_pte_fast(pte) +#define pte_free(pte) free_pte_fast(pte) +#define pgd_free(pgd) free_pgd_fast(pgd) +#define pgd_alloc() get_pgd_fast() + +extern __inline__ pte_t *pte_alloc(pmd_t * pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + + if (pmd_none (*pmd)) { + pte_t *page = (pte_t *) get_pte_fast(); + + if (!page) + return get_pte_slow(pmd, address); + set_pmd(pmd, mk_pmd(page)); + return page + address; + } + if (pmd_bad (*pmd)) { + __bad_pmd(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} +#endif + +/* + * allocating and freeing a pmd is trivial: the 1-entry pmd is + * inside the pgd, so has no extra memory associated with it. + */ +extern __inline__ void pmd_free(pmd_t *pmd) +{ +} + +extern __inline__ pmd_t *pmd_alloc(pgd_t *pgd, unsigned long address) +{ + return (pmd_t *) pgd; +} + +#define pmd_free_kernel pmd_free +#define pmd_alloc_kernel pmd_alloc +#define pte_alloc_kernel pte_alloc + +extern __inline__ void set_pgdir(unsigned long address, pgd_t entry) +{ + struct task_struct * p; + + read_lock(&tasklist_lock); + for_each_task(p) { + if (!p->mm) + continue; + *pgd_offset(p->mm,address) = entry; + } + read_unlock(&tasklist_lock); +#ifndef CONFIG_NO_PGT_CACHE + { + pgd_t *pgd; + for (pgd = (pgd_t *)pgd_quicklist; pgd; + pgd = (pgd_t *)*(unsigned long *)pgd) + pgd[address >> PGDIR_SHIFT] = entry; + } +#endif +} + +extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; + +#define update_mmu_cache(vma,address,pte) + +#define SWP_TYPE(entry) (((entry) >> 1) & 0x7f) +#define SWP_OFFSET(entry) ((entry) >> 8) +#define SWP_ENTRY(type,offset) (((type) << 1) | ((offset) << 8)) + +#endif /* __ASM_PROC_PAGE_H */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/processor.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/processor.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * linux/include/asm-arm/proc-armo/processor.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 27-06-1996 RMK Created + * 10-10-1996 RMK Brought up to date with SA110 + * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*' + * 28-09-1996 RMK Moved start_thread into the processor dependencies + * 11-01-1998 RMK Added new uaccess_t + * 09-09-1998 PJB Delete redundant `wp_works_ok' + */ +#ifndef __ASM_PROC_PROCESSOR_H +#define __ASM_PROC_PROCESSOR_H + +#include +#include + +#define KERNEL_STACK_SIZE 4096 + +struct context_save_struct { + unsigned long r4; + unsigned long r5; + unsigned long r6; + unsigned long r7; + unsigned long r8; + unsigned long r9; + unsigned long sl; + unsigned long fp; + unsigned long pc; +}; + +#define INIT_CSS (struct context_save_struct){ 0, 0, 0, 0, 0, 0, 0, 0, SVC26_MODE } + +typedef struct { + void (*put_byte)(void); /* Special calling convention */ + void (*get_byte)(void); /* Special calling convention */ + void (*put_half)(void); /* Special calling convention */ + void (*get_half)(void); /* Special calling convention */ + void (*put_word)(void); /* Special calling convention */ + void (*get_word)(void); /* Special calling convention */ + unsigned long (*copy_from_user)(void *to, const void *from, unsigned long sz); + unsigned long (*copy_to_user)(void *to, const void *from, unsigned long sz); + unsigned long (*clear_user)(void *addr, unsigned long sz); + unsigned long (*strncpy_from_user)(char *to, const char *from, unsigned long sz); + unsigned long (*strnlen_user)(const char *s, long n); +} uaccess_t; + +extern uaccess_t uaccess_user, uaccess_kernel; + +#define EXTRA_THREAD_STRUCT \ + uaccess_t *uaccess; /* User access functions*/ \ + unsigned long memcmap[256]; + +#define EXTRA_THREAD_STRUCT_INIT \ + ,&uaccess_kernel, \ + { 0, } + +#define SWAPPER_PG_DIR ((unsigned long)swapper_pg_dir) + +#define start_thread(regs,pc,sp) \ +({ \ + unsigned long *stack = (unsigned long *)sp; \ + set_fs(USER_DS); \ + memzero(regs->uregs, sizeof (regs->uregs)); \ + regs->ARM_pc = pc; /* pc */ \ + regs->ARM_sp = sp; /* sp */ \ + regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ + regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ + regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ +}) + +/* Allocation and freeing of basic task resources. */ +/* + * NOTE! The task struct and the stack go together + */ +extern unsigned long get_page_8k(int priority); +extern void free_page_8k(unsigned long page); + +#define ll_alloc_task_struct() ((struct task_struct *)get_page_8k(GFP_KERNEL)) +#define ll_free_task_struct(p) free_page_8k((unsigned long)(p)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/ptrace.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/ptrace.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/ptrace.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/ptrace.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,94 @@ +/* + * linux/include/asm-arm/proc-armo/ptrace.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_PROC_PTRACE_H +#define __ASM_PROC_PTRACE_H + +#define USR26_MODE 0x00 +#define FIQ26_MODE 0x01 +#define IRQ26_MODE 0x02 +#define SVC26_MODE 0x03 +#define MODE_MASK 0x03 +#define F_BIT (1 << 26) +#define I_BIT (1 << 27) +#define CC_V_BIT (1 << 28) +#define CC_C_BIT (1 << 29) +#define CC_Z_BIT (1 << 30) +#define CC_N_BIT (1 << 31) +#define PCMASK 0xfc000003 + +#ifndef __ASSEMBLY__ + +/* this struct defines the way the registers are stored on the + stack during a system call. */ + +struct pt_regs { + long uregs[17]; +}; + +#define ARM_pc uregs[15] +#define ARM_lr uregs[14] +#define ARM_sp uregs[13] +#define ARM_ip uregs[12] +#define ARM_fp uregs[11] +#define ARM_r10 uregs[10] +#define ARM_r9 uregs[9] +#define ARM_r8 uregs[8] +#define ARM_r7 uregs[7] +#define ARM_r6 uregs[6] +#define ARM_r5 uregs[5] +#define ARM_r4 uregs[4] +#define ARM_r3 uregs[3] +#define ARM_r2 uregs[2] +#define ARM_r1 uregs[1] +#define ARM_r0 uregs[0] +#define ARM_ORIG_r0 uregs[16] + +#ifdef __KERNEL__ + +#define processor_mode(regs) \ + ((regs)->ARM_pc & MODE_MASK) + +#define user_mode(regs) \ + (processor_mode(regs) == USR26_MODE) + +#define interrupts_enabled(regs) \ + (!((regs)->ARM_pc & I_BIT)) + +#define fast_interrupts_enabled(regs) \ + (!((regs)->ARM_pc & F_BIT)) + +#define condition_codes(regs) \ + ((regs)->ARM_pc & (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT)) + +#define pc_pointer(v) \ + ((v) & 0x03fffffc) + +#define instruction_pointer(regs) \ + (pc_pointer((regs)->ARM_pc)) + +/* Are the current registers suitable for user mode? + * (used to maintain security in signal handlers) + */ +static inline int valid_user_regs(struct pt_regs *regs) +{ + if (user_mode(regs) && + (regs->ARM_pc & (F_BIT | I_BIT)) == 0) + return 1; + + /* + * force it to be something sensible + */ + regs->ARM_pc &= ~(MODE_MASK | F_BIT | I_BIT); + + return 0; +} + +#endif /* __KERNEL__ */ + +#endif /* __ASSEMBLY__ */ + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/semaphore.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/semaphore.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/semaphore.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/semaphore.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,109 @@ +/* + * linux/include/asm-arm/proc-armo/semaphore.h + */ +#ifndef __ASM_PROC_SEMAPHORE_H +#define __ASM_PROC_SEMAPHORE_H + +/* + * This is ugly, but we want the default case to fall through. + * "__down" is the actual routine that waits... + */ +extern inline void down(struct semaphore * sem) +{ + __asm__ __volatile__ (" + @ atomic down operation + mov r0, pc + orr lr, r0, #0x08000000 + teqp lr, #0 + ldr lr, [%0] + and r0, r0, #0x0c000003 + subs lr, lr, #1 + str lr, [%0] + orrmi r0, r0, #0x80000000 @ set N + teqp r0, #0 + movmi r0, %0 + blmi " SYMBOL_NAME_STR(__down_failed) + : + : "r" (sem) + : "r0", "lr", "cc"); +} + +/* + * This is ugly, but we want the default case to fall through. + * "__down_interruptible" is the actual routine that waits... + */ +extern inline int down_interruptible (struct semaphore * sem) +{ + int result; + __asm__ __volatile__ (" + @ atomic down operation + mov r0, pc + orr lr, r0, #0x08000000 + teqp lr, #0 + ldr lr, [%1] + and r0, r0, #0x0c000003 + subs lr, lr, #1 + str lr, [%1] + orrmi r0, r0, #0x80000000 @ set N + teqp r0, #0 + movmi r0, %1 + movpl r0, #0 + blmi " SYMBOL_NAME_STR(__down_interruptible_failed) " + mov %0, r0" + : "=r" (result) + : "r" (sem) + : "r0", "lr", "cc"); + return result; +} + +extern inline int down_trylock(struct semaphore * sem) +{ + int result; + __asm__ __volatile__ (" + @ atomic down operation + mov r0, pc + orr lr, r0, #0x08000000 + teqp lr, #0 + ldr lr, [%1] + and r0, r0, #0x0c000003 + subs lr, lr, #1 + str lr, [%1] + orrmi r0, r0, #0x80000000 @ set N + teqp r0, #0 + movmi r0, %1 + movpl r0, #0 + blmi " SYMBOL_NAME_STR(__down_trylock_failed) " + mov %0, r0" + : "=r" (result) + : "r" (sem) + : "r0", "lr", "cc"); + return result; +} + +/* + * Note! This is subtle. We jump to wake people up only if + * the semaphore was negative (== somebody was waiting on it). + * The default case (no contention) will result in NO + * jumps for both down() and up(). + */ +extern inline void up(struct semaphore * sem) +{ + __asm__ __volatile__ (" + @ atomic up operation + mov r0, pc + orr lr, r0, #0x08000000 + teqp lr, #0 + ldr lr, [%0] + and r0, r0, #0x0c000003 + adds lr, lr, #1 + str lr, [%0] + orrle r0, r0, #0x80000000 @ set N + teqp r0, #0 + movmi r0, %0 + blmi " SYMBOL_NAME_STR(__up_wakeup) + : + : "r" (sem) + : "r0", "lr", "cc"); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/shmparam.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,18 @@ +/* + * linux/include/asm-arm/proc-armo/shmparam.h + * + * Copyright (C) 1996 Russell King + * + * definitions for the shared process memory on the ARM3 + */ + +#ifndef __ASM_PROC_SHMPARAM_H +#define __ASM_PROC_SHMPARAM_H + +#ifndef SHM_RANGE_START +#define SHM_RANGE_START 0x00a00000 +#define SHM_RANGE_END 0x00c00000 +#define SHMMAX 0x003fa000 +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/system.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/system.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,125 @@ +/* + * linux/include/asm-arm/proc-armo/system.h + * + * Copyright (C) 1995, 1996 Russell King + */ + +#ifndef __ASM_PROC_SYSTEM_H +#define __ASM_PROC_SYSTEM_H + +extern const char xchg_str[]; + +#include + +extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) +{ + switch (size) { + case 1: return processor.u.armv2._xchg_1(x, ptr); + case 2: return processor.u.armv2._xchg_2(x, ptr); + case 4: return processor.u.armv2._xchg_4(x, ptr); + default: arm_invalidptr(xchg_str, size); + } + return 0; +} + +/* + * We need to turn the caches off before calling the reset vector - RiscOS + * messes up if we don't + */ +#define proc_hard_reset() processor._proc_fin() + +/* + * This processor does not idle + */ +#define proc_idle() + +/* + * A couple of speedups for the ARM + */ + +/* + * Save the current interrupt enable state & disable IRQs + */ +#define __save_flags_cli(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ +" mov %0, pc @ save_flags_cli\n" \ +" orr %1, %0, #0x08000000\n" \ +" and %0, %0, #0x0c000000\n" \ +" teqp %1, #0\n" \ + : "=r" (x), "=r" (temp) \ + : \ + : "memory"); \ + } while (0) + +/* + * Enable IRQs + */ +#define __sti() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ +" mov %0, pc @ sti\n" \ +" bic %0, %0, #0x08000000\n" \ +" teqp %0, #0\n" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * Disable IRQs + */ +#define __cli() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ +" mov %0, pc @ cli\n" \ +" orr %0, %0, #0x08000000\n" \ +" teqp %0, #0\n" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * save current IRQ & FIQ state + */ +#define __save_flags(x) \ + do { \ + __asm__ __volatile__( \ +" mov %0, pc @ save_flags\n" \ +" and %0, %0, #0x0c000000\n" \ + : "=r" (x)); \ + } while (0) + +/* + * restore saved IRQ & FIQ state + */ +#define __restore_flags(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ +" mov %0, pc @ restore_flags\n" \ +" bic %0, %0, #0x0c000000\n" \ +" orr %0, %0, %1\n" \ +" teqp %0, #0\n" \ + : "=&r" (temp) \ + : "r" (x) \ + : "memory"); \ + } while (0) + +#ifdef __SMP__ +#error SMP not supported +#else + +#define cli() __cli() +#define sti() __sti() +#define save_flags(x) __save_flags(x) +#define restore_flags(x) __restore_flags(x) +#define save_flags_cli(x) __save_flags_cli(x) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/uaccess.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/uaccess.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/uaccess.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/uaccess.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * linux/include/asm-arm/proc-armo/segment.h + * + * Copyright (C) 1996 Russell King + */ + +/* + * The fs functions are implemented on the ARM2 and ARM3 architectures + * manually. + * Use *_user functions to access user memory with faulting behaving + * as though the user is accessing the memory. + * Use set_fs(get_ds()) and then the *_user functions to allow them to + * access kernel memory. + */ + +/* + * These are the values used to represent the user `fs' and the kernel `ds' + */ +#define KERNEL_DS 0x03000000 +#define USER_DS 0x02000000 + +#define get_ds() (KERNEL_DS) +#define get_fs() (current->addr_limit) +#define segment_eq(a,b) ((a) == (b)) + +extern uaccess_t uaccess_user, uaccess_kernel; + +extern __inline__ void set_fs (mm_segment_t fs) +{ + current->addr_limit = fs; + current->tss.uaccess = fs == USER_DS ? &uaccess_user : &uaccess_kernel; +} + +#define __range_ok(addr,size) ({ \ + unsigned long flag, sum; \ + __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ + : "=&r" (flag), "=&r" (sum) \ + : "r" (addr), "Ir" (size), "0" (current->addr_limit) \ + : "cc"); \ + flag; }) + +#define __addr_ok(addr) ({ \ + unsigned long flag; \ + __asm__ __volatile__("cmp %2, %0; movlo %0, #0" \ + : "=&r" (flag) \ + : "0" (current->addr_limit), "r" (addr) \ + : "cc"); \ + (flag == 0); }) + +#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) + +#define __put_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + " mov r0, %1\n" \ + " mov r1, %2\n" \ + " mov r2, %0\n" \ + " mov lr, pc\n" \ + " mov pc, %3\n" \ + " mov %0, r2\n" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "r" (current->tss.uaccess->put_byte), \ + "0" (err) \ + : "r0", "r1", "r2", "lr") + +#define __put_user_asm_half(x,addr,err) \ + __asm__ __volatile__( \ + " mov r0, %1\n" \ + " mov r1, %2\n" \ + " mov r2, %0\n" \ + " mov lr, pc\n" \ + " mov pc, %3\n" \ + " mov %0, r2\n" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "r" (current->tss.uaccess->put_half), \ + "0" (err) \ + : "r0", "r1", "r2", "lr") + +#define __put_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + " mov r0, %1\n" \ + " mov r1, %2\n" \ + " mov r2, %0\n" \ + " mov lr, pc\n" \ + " mov pc, %3\n" \ + " mov %0, r2\n" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "r" (current->tss.uaccess->put_word), \ + "0" (err) \ + : "r0", "r1", "r2", "lr") + +#define __get_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + " mov r0, %2\n" \ + " mov r1, %0\n" \ + " mov lr, pc\n" \ + " mov pc, %3\n" \ + " mov %0, r1\n" \ + " mov %1, r0\n" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "r" (current->tss.uaccess->get_byte), "0" (err) \ + : "r0", "r1", "r2", "lr") + +#define __get_user_asm_half(x,addr,err) \ + __asm__ __volatile__( \ + " mov r0, %2\n" \ + " mov r1, %0\n" \ + " mov lr, pc\n" \ + " mov pc, %3\n" \ + " mov %0, r1\n" \ + " mov %1, r0\n" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "r" (current->tss.uaccess->get_half), "0" (err) \ + : "r0", "r1", "r2", "lr") + +#define __get_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + " mov r0, %2\n" \ + " mov r1, %0\n" \ + " mov lr, pc\n" \ + " mov pc, %3\n" \ + " mov %0, r1\n" \ + " mov %1, r0\n" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "r" (current->tss.uaccess->get_word), "0" (err) \ + : "r0", "r1", "r2", "lr") + +#define __do_copy_from_user(to,from,n) \ + (n) = current->tss.uaccess->copy_from_user((to),(from),(n)) + +#define __do_copy_to_user(to,from,n) \ + (n) = current->tss.uaccess->copy_to_user((to),(from),(n)) + +#define __do_clear_user(addr,sz) \ + (sz) = current->tss.uaccess->clear_user((addr),(sz)) + +#define __do_strncpy_from_user(dst,src,count,res) \ + (res) = current->tss.uaccess->strncpy_from_user(dst,src,count) + +#define __do_strnlen_user(s,n,res) \ + (res) = current->tss.uaccess->strnlen_user(s,n) diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armo/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armo/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armo/uncompress.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,7 @@ +/* + * linux/include/asm-arm/proc-armo/uncompress.h + * + * (c) 1997 Russell King + */ + +#define proc_decomp_setup() diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/assembler.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/assembler.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/assembler.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/assembler.h 2007-07-10 14:03:03.000000000 +0100 @@ -0,0 +1,86 @@ +/* + * linux/asm-arm/proc-armv/assembler.h + * + * Copyright (C) 1996 Russell King + * + * This file contains arm architecture specific defines + * for the different processors + */ +#ifndef __ASSEMBLY__ +#error "Only include this from assembly code" +#endif + +#define MODE_USR USR_MODE +#define MODE_FIQ FIQ_MODE +#define MODE_IRQ IRQ_MODE +#define MODE_SVC SVC_MODE + +#define DEFAULT_FIQ MODE_FIQ + +/* + * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) + * RETINSTR - return instruction (eg, mov pc, lr) + */ +#ifdef __STDC__ +#define LOADREGS(cond, base, reglist...)\ + ldm##cond base,reglist + +#define RETINSTR(instr, regs...)\ + instr regs +#else +#define LOADREGS(cond, base)\ + ldm/**/cond base, + +#define RETINSTR(instr, a,b)\ + instr a,b +#endif + +/* + * No nop required after mode change + */ +#define MODENOP + +/* + * Change to `mode' + */ +#define MODE(savereg,tmpreg,mode) \ + mrs savereg, cpsr; \ + bic tmpreg, savereg, $0x1f; \ + orr tmpreg, tmpreg, $mode; \ + msr cpsr, tmpreg + +/* + * Restore mode + */ +#define RESTOREMODE(savereg) \ + msr cpsr, savereg + +/* + * save interrupt state (uses stack) + */ +#define SAVEIRQS(tmpreg)\ + mrs tmpreg, cpsr; \ + str tmpreg, [sp, $-4]! + +/* + * restore interrupt state (uses stack) + */ +#define RESTOREIRQS(tmpreg)\ + ldr tmpreg, [sp], $4; \ + msr cpsr, tmpreg + +/* + * disable IRQs + */ +#define DISABLEIRQS(tmpreg)\ + mrs tmpreg , cpsr; \ + orr tmpreg , tmpreg , $I_BIT; \ + msr cpsr, tmpreg + +/* + * enable IRQs + */ +#define ENABLEIRQS(tmpreg)\ + mrs tmpreg , cpsr; \ + bic tmpreg , tmpreg , $I_BIT; \ + msr cpsr, tmpreg diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/domain.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/domain.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/domain.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/domain.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * linux/include/asm-arm/proc-armv/domain.h + * + * Copyright (C) 1999 Russell King. + */ +#ifndef __ASM_PROC_DOMAIN_H +#define __ASM_PROC_DOMAIN_H + +/* + * Domain numbers + * + * DOMAIN_IO - domain 2 includes all IO only + * DOMAIN_KERNEL - domain 1 includes all kernel memory only + * DOMAIN_USER - domain 0 includes all user memory only + */ +#define DOMAIN_USER 0 +#define DOMAIN_KERNEL 1 +#define DOMAIN_TABLE 1 +#define DOMAIN_IO 2 + +/* + * Domain types + */ +#define DOMAIN_NOACCESS 0 +#define DOMAIN_CLIENT 1 +#define DOMAIN_MANAGER 3 + +#define domain_val(dom,type) ((type) << 2*(dom)) + +#define set_domain(x) \ + do { \ + __asm__ __volatile__( \ + "mcr p15, 0, %0, c3, c0 @ set domain" \ + : : "r" (x)); \ + } while (0) + +#define modify_domain(dom,type) \ + do { \ + unsigned int domain = current->tss.domain; \ + domain &= ~domain_val(dom, DOMAIN_MANAGER); \ + domain |= domain_val(dom, type); \ + current->tss.domain = domain; \ + set_domain(current->tss.domain); \ + } while (0) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/elf.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/elf.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/elf.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/elf.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,21 @@ +/* + * ELF definitions for 32-bit CPUs + */ + +#define ELF_EXEC_PAGESIZE 4096 + +/* We can execute both 32-bit and 26-bit code. */ +#define ELF_PROC_OK(x) (1) + +#ifdef __KERNEL__ + +#if 0 /* not yet */ +#define SET_PERSONALITY(ex,ibcs2) \ + current_personality = (ex->e_flags & EF_ARM_APCS26) ? \ + PER_LINUX : PER_LINUX_32BIT +#else +#define SET_PERSONALITY(ex,ibcs2) \ + current->personality = PER_LINUX_32BIT +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/io.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/io.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,35 @@ +/* + * linux/include/asm-arm/proc-armv/io.h + */ + +/* + * The caches on some architectures aren't dma-coherent and have need to + * handle this in software. There are two types of operations that + * can be applied to dma buffers. + * + * - dma_cache_wback_inv(start, size) makes caches and RAM coherent by + * writing the content of the caches back to memory, if necessary. + * The function also invalidates the affected part of the caches as + * necessary before DMA transfers from outside to memory. + * - dma_cache_inv(start, size) invalidates the affected parts of the + * caches. Dirty lines of the caches may be written back or simply + * be discarded. This operation is necessary before dma operations + * to the memory. + * - dma_cache_wback(start, size) writes back any dirty lines but does + * not invalidate the cache. This can be used before DMA reads from + * memory, + */ + +#include + +#define dma_cache_inv(start, size) \ + do { processor.u.armv3v4._cache_purge_area((unsigned long)(start), \ + ((unsigned long)(start)+(size))); } while (0) + +#define dma_cache_wback(start, size) \ + do { processor.u.armv3v4._cache_wback_area((unsigned long)(start), \ + ((unsigned long)(start)+(size))); } while (0) + +#define dma_cache_wback_inv(start, size) \ + do { processor.u.armv3v4._flush_cache_area((unsigned long)(start), \ + ((unsigned long)(start)+(size)), 0); } while (0) diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/mm-init.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/mm-init.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/mm-init.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/mm-init.h 2007-07-10 12:31:31.000000000 +0100 @@ -0,0 +1,177 @@ +/* + * linux/include/asm-arm/proc-armv/mm-init.h + * + * Copyright (C) 1996 Russell King + * + * This contains the code to setup the memory map on an ARM v3 or v4 machine. + * This is both processor & architecture specific, and requires some + * more work to get it to fit into our separate processor and architecture + * structure. + */ + +/* + * On ebsa, we want the memory map set up so: + * + * PHYS VIRT + * 00000000 00000000 Zero page + * 000003ff 000003ff Zero page end + * 00000000 c0000000 Kernel and all physical memory + * 01ffffff c1ffffff End of physical (32MB) + * e0000000 e0000000 IO start + * ffffffff ffffffff IO end + * + * On rpc, we want: + * + * PHYS VIRT + * 10000000 00000000 Zero page + * 100003ff 000003ff Zero page end + * 10000000 c0000000 Kernel and all physical memory + * 1fffffff cfffffff End of physical (32MB) + * 02000000 d?000000 Screen memory (first image) + * 02000000 d8000000 Screen memory (second image) + * 00000000 df000000 StrongARM cache invalidation area + * 03000000 e0000000 IO start + * 03ffffff e0ffffff IO end + * + * We set it up using the section page table entries. + */ +#include + +#define PTE_SIZE (PTRS_PER_PTE * BYTES_PER_PTR) + +extern unsigned long setup_io_pagetables(unsigned long start_mem); + +/* + * Add a SECTION mapping between VIRT and PHYS in domain DOMAIN with protection PROT + */ +static inline void +alloc_init_section(unsigned long *mem, unsigned long virt, unsigned long phys, int domain, int prot) +{ + pgd_t *pgdp; + pmd_t *pmdp, pmd; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + pmd_val(pmd) = phys | PMD_TYPE_SECT | PMD_DOMAIN(domain) | prot; + set_pmd(pmdp, pmd); +} + +/* + * Clear any mapping + */ +static inline void +free_init_section(unsigned long virt) +{ + pgd_t *pgdp; + pmd_t *pmdp; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + pmd_clear(pmdp); +} + +/* + * Add a PAGE mapping between VIRT and PHYS in domain DOMAIN with protection PROT + */ +static inline void +alloc_init_page(unsigned long *mem, unsigned long virt, unsigned long phys, int domain, int prot) +{ + pgd_t *pgdp; + pmd_t *pmdp; + pte_t *ptep; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + if (pmd_none(*pmdp)) { + unsigned long memory = *mem; + + memory = (memory + PTE_SIZE - 1) & ~(PTE_SIZE - 1); + + ptep = (pte_t *)memory; + memzero(ptep, PTE_SIZE); + memory += PTE_SIZE; + + ptep = (pte_t *)memory; + memzero(ptep, PTE_SIZE); + + set_pmd(pmdp, __mk_pmd(ptep, PMD_TYPE_TABLE | PMD_DOMAIN(domain))); + + *mem = memory + PTE_SIZE; + } + + ptep = pte_offset(pmdp, virt); + + set_pte(ptep, mk_pte_phys(phys, __pgprot(prot))); +} + +static inline unsigned long +setup_pagetables(unsigned long start_mem, unsigned long end_mem) +{ + unsigned long address = 0; + + do { + if (address >= PAGE_OFFSET && address < end_mem) + /* + * map in physical ram & kernel + */ + alloc_init_section(&start_mem, address, __virt_to_phys(address), DOMAIN_KERNEL, + PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE | PMD_SECT_AP_WRITE); + else + /* + * unmap everything else + */ + free_init_section(address); + + address += PGDIR_SIZE; + } while (address != 0); + + /* + * An area to invalidate the cache + */ + alloc_init_section(&start_mem, FLUSH_BASE, FLUSH_BASE_PHYS, DOMAIN_KERNEL, + PMD_SECT_CACHEABLE | PMD_SECT_AP_READ); + + /* + * Now set up our IO mappings + */ + start_mem = setup_io_pagetables(start_mem); + + /* + * map in zero page + */ + alloc_init_page(&start_mem, 0, __virt_to_phys(PAGE_OFFSET), + DOMAIN_USER, L_PTE_CACHEABLE | L_PTE_YOUNG | L_PTE_PRESENT); + + flush_cache_all(); + + return start_mem; +} + +static inline +void mark_usable_memory_areas(unsigned long *start_mem, unsigned long end_mem) +{ + unsigned long smem; + + *start_mem = smem = PAGE_ALIGN(*start_mem); + + /* + * Mark all of memory from the end of kernel to end of memory + */ + while (smem < end_mem) { + clear_bit(PG_reserved, &mem_map[MAP_NR(smem)].flags); + smem += PAGE_SIZE; + } + + /* + * Mark memory from page 1 to start of the swapper page directory + */ + smem = PAGE_OFFSET + PAGE_SIZE; + while (smem < (unsigned long)&swapper_pg_dir) { + clear_bit(PG_reserved, &mem_map[MAP_NR(smem)].flags); + smem += PAGE_SIZE; + } +} + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/page.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/page.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/page.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/page.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,73 @@ +/* + * linux/include/asm-arm/proc-armv/page.h + * + * Copyright (C) 1995, 1996 Russell King + */ + +#ifndef __ASM_PROC_PAGE_H +#define __ASM_PROC_PAGE_H + +#include + +/* PAGE_SHIFT determines the page size */ +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) + +#ifdef __KERNEL__ + +#define STRICT_MM_TYPECHECKS + +#ifdef STRICT_MM_TYPECHECKS +/* + * These are used to make use of C type-checking.. + */ +typedef struct { unsigned long pte; } pte_t; +typedef struct { unsigned long pmd; } pmd_t; +typedef struct { unsigned long pgd; } pgd_t; +typedef struct { unsigned long pgprot; } pgprot_t; + +#define pte_val(x) ((x).pte) +#define pmd_val(x) ((x).pmd) +#define pgd_val(x) ((x).pgd) +#define pgprot_val(x) ((x).pgprot) + +#define __pte(x) ((pte_t) { (x) } ) +#define __pmd(x) ((pmd_t) { (x) } ) +#define __pgd(x) ((pgd_t) { (x) } ) +#define __pgprot(x) ((pgprot_t) { (x) } ) + +#else +/* + * .. while these make it easier on the compiler + */ +typedef unsigned long pte_t; +typedef unsigned long pmd_t; +typedef unsigned long pgd_t; +typedef unsigned long pgprot_t; + +#define pte_val(x) (x) +#define pmd_val(x) (x) +#define pgd_val(x) (x) +#define pgprot_val(x) (x) + +#define __pte(x) (x) +#define __pmd(x) (x) +#define __pgd(x) (x) +#define __pgprot(x) (x) + +#endif + +/* to align the pointer to the (next) page boundary */ +#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) + +/* This handles the memory map.. */ +#ifndef PAGE_OFFSET +#define PAGE_OFFSET 0xc0000000 +#endif + +#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT) + +#endif /* __KERNEL__ */ + +#endif /* __ASM_PROC_PAGE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/param.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/param.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,25 @@ +/* + * linux/include/asm-arm/proc-armv/param.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_PROC_PARAM_H +#define __ASM_PROC_PARAM_H + +#include /* for HZ */ + +#define EXEC_PAGESIZE 4096 + +#ifndef NGROUPS +#define NGROUPS 32 +#endif + +#ifndef NOGROUP +#define NOGROUP (-1) +#endif + +#define MAXHOSTNAMELEN 64 /* max length of hostname */ + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/pgtable.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/pgtable.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/pgtable.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/pgtable.h 2007-07-10 12:25:49.000000000 +0100 @@ -0,0 +1,627 @@ +/* + * linux/include/asm-arm/proc-armv/pgtable.h + * + * Copyright (C) 1995-1999 Russell King + * + * 12-Jan-1997 RMK Altered flushing routines to use function pointers + * now possible to combine ARM6, ARM7 and StrongARM versions. + * 17-Apr-1999 RMK Now pass an area size to clean_cache_area and + * flush_icache_area. + */ +#ifndef __ASM_PROC_PGTABLE_H +#define __ASM_PROC_PGTABLE_H + +#include /* For TASK_SIZE */ +#include + +#define LIBRARY_TEXT_START 0x0c000000 + +/* + * Cache flushing... + */ +#define flush_cache_all() \ + processor.u.armv3v4._flush_cache_all() + +#define flush_cache_mm(_mm) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_cache_all(); \ + } while (0) + +#define flush_cache_range(_mm,_start,_end) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_cache_area \ + ((_start), (_end), 1); \ + } while (0) + +#define flush_cache_page(_vma,_vmaddr) \ + do { \ + if ((_vma)->vm_mm == current->mm) \ + processor.u.armv3v4._flush_cache_area \ + ((_vmaddr), (_vmaddr) + PAGE_SIZE, \ + ((_vma)->vm_flags & VM_EXEC) ? 1 : 0); \ + } while (0) + +#define clean_cache_range(_start,_end) \ + do { \ + unsigned long _s, _sz; \ + _s = (unsigned long)_start; \ + _sz = (unsigned long)_end - _s; \ + processor.u.armv3v4._clean_cache_area(_s, _sz); \ + } while (0) + +#define clean_cache_area(_start,_size) \ + do { \ + unsigned long _s; \ + _s = (unsigned long)_start; \ + processor.u.armv3v4._clean_cache_area(_s, _size); \ + } while (0) + +#define flush_icache_range(_start,_end) \ + processor.u.armv3v4._flush_icache_area((_start), (_end) - (_start)) + +/* + * We don't have a MEMC chip... + */ +#define update_memc_all() do { } while (0) +#define update_memc_task(tsk) do { } while (0) +#define update_memc_mm(mm) do { } while (0) +#define update_memc_addr(mm,addr,pte) do { } while (0) + +/* + * This flushes back any buffered write data. We have to clean and flush the entries + * in the cache for this page. Is it necessary to invalidate the I-cache? + */ +#define flush_page_to_ram(_page) \ + processor.u.armv3v4._flush_ram_page ((_page) & PAGE_MASK); + +/* + * TLB flushing: + * + * - flush_tlb() flushes the current mm struct TLBs + * - flush_tlb_all() flushes all processes TLBs + * - flush_tlb_mm(mm) flushes the specified mm context TLB's + * - flush_tlb_page(vma, vmaddr) flushes one page + * - flush_tlb_range(mm, start, end) flushes a range of pages + * + * GCC uses conditional instructions, and expects the assembler code to do so as well. + * + * We drain the write buffer in here to ensure that the page tables in ram + * are really up to date. It is more efficient to do this here... + */ +#define flush_tlb() flush_tlb_all() + +#define flush_tlb_all() \ + processor.u.armv3v4._flush_tlb_all() + +#define flush_tlb_mm(_mm) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_tlb_all(); \ + } while (0) + +#define flush_tlb_range(_mm,_start,_end) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_tlb_area \ + ((_start), (_end), 1); \ + } while (0) + +#define flush_tlb_page(_vma,_vmaddr) \ + do { \ + if ((_vma)->vm_mm == current->mm) \ + processor.u.armv3v4._flush_tlb_area \ + ((_vmaddr), (_vmaddr) + PAGE_SIZE, \ + ((_vma)->vm_flags & VM_EXEC) ? 1 : 0); \ + } while (0) + +/* + * PMD_SHIFT determines the size of the area a second-level page table can map + */ +#define PMD_SHIFT 20 +#define PMD_SIZE (1UL << PMD_SHIFT) +#define PMD_MASK (~(PMD_SIZE-1)) + +/* + * PGDIR_SHIFT determines what a third-level page table entry can map + */ +#define PGDIR_SHIFT 20 +#define PGDIR_SIZE (1UL << PGDIR_SHIFT) +#define PGDIR_MASK (~(PGDIR_SIZE-1)) + +/* + * entries per page directory level: the sa110 is two-level, so + * we don't really have any PMD directory physically. + */ +#define PTRS_PER_PTE 256 +#define PTRS_PER_PMD 1 +#define PTRS_PER_PGD 4096 +#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) + + +/* Just any arbitrary offset to the start of the vmalloc VM area: the + * current 8MB value just means that there will be a 8MB "hole" after the + * physical memory until the kernel virtual memory starts. That means that + * any out-of-bounds memory accesses will hopefully be caught. + * The vmalloc() routines leaves a hole of 4kB between each vmalloced + * area for the same reason. ;) + */ +#define VMALLOC_OFFSET (8*1024*1024) +#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) +#define VMALLOC_VMADDR(x) ((unsigned long)(x)) +#define VMALLOC_END (PAGE_OFFSET + 0x10000000) + +#undef TEST_VERIFY_AREA + +/* + * The sa110 doesn't have any external MMU info: the kernel page + * tables contain all the necessary information. + */ +extern __inline__ void update_mmu_cache(struct vm_area_struct * vma, + unsigned long address, pte_t pte) +{ +} + + +/* + * BAD_PAGETABLE is used when we need a bogus page-table, while + * BAD_PAGE is used for a bogus page. + * + * ZERO_PAGE is a global shared page that is always zero: used + * for zero-mapped memory areas etc.. + */ +extern pte_t __bad_page(void); +extern pte_t * __bad_pagetable(void); +extern unsigned long *empty_zero_page; + +#define BAD_PAGETABLE __bad_pagetable() +#define BAD_PAGE __bad_page() +#define ZERO_PAGE(vaddr) ((unsigned long) empty_zero_page) + +/* number of bits that fit into a memory pointer */ +#define BYTES_PER_PTR (sizeof(unsigned long)) +#define BITS_PER_PTR (8*BYTES_PER_PTR) + +/* to align the pointer to a pointer address */ +#define PTR_MASK (~(sizeof(void*)-1)) + +/* sizeof(void*)==1<>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) + +/* to set the page-dir + * Note that we need to flush the cache and TLBs + * if we are affecting the current task. + */ +#define SET_PAGE_DIR(tsk,pgdir) \ +do { \ + tsk->tss.memmap = __virt_to_phys((unsigned long)pgdir); \ + if ((tsk) == current) { \ + flush_cache_all(); \ + __asm__ __volatile__( \ + "mcr%? p15, 0, %0, c2, c0, 0\n" \ + : : "r" (tsk->tss.memmap)); \ + flush_tlb_all(); \ + } \ +} while (0) + + +/* + * The "pgd_xxx()" functions here are trivial for a folded two-level + * setup: the pgd is never bad, and a pmd always exists (as it's folded + * into the pgd entry) + */ +#define pgd_none(pgd) (0) +#define pgd_bad(pgd) (0) +#define pgd_present(pgd) (1) +#define pgd_clear(pgdp) + +/* to find an entry in a kernel page-table-directory */ +#define pgd_offset_k(address) pgd_offset(&init_mm, address) + +/* to find an entry in a page-table-directory */ +extern __inline__ pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) +{ + return mm->pgd + (address >> PGDIR_SHIFT); +} + +extern unsigned long get_page_2k(int priority); +extern void free_page_2k(unsigned long page); + +/* + * Allocate and free page tables. The xxx_kernel() versions are + * used to allocate a kernel page table - this turns on ASN bits + * if any. + */ + +#ifndef __SMP__ +extern struct pgtable_cache_struct { + unsigned long *pgd_cache; + unsigned long *pte_cache; + unsigned long pgtable_cache_sz; +} quicklists; + +#define pgd_quicklist (quicklists.pgd_cache) +#define pmd_quicklist ((unsigned long *)0) +#define pte_quicklist (quicklists.pte_cache) +#define pgtable_cache_size (quicklists.pgtable_cache_sz) +#else +#error Pgtable caches have to be per-CPU, so that no locking is needed. +#endif + +extern pgd_t *get_pgd_slow(void); + +extern __inline__ pgd_t *get_pgd_fast(void) +{ + unsigned long *ret; + + if((ret = pgd_quicklist) != NULL) { + pgd_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + clean_cache_area(ret, 4); + pgtable_cache_size--; + } else + ret = (unsigned long *)get_pgd_slow(); + return (pgd_t *)ret; +} + +extern __inline__ void free_pgd_fast(pgd_t *pgd) +{ + *(unsigned long *)pgd = (unsigned long) pgd_quicklist; + pgd_quicklist = (unsigned long *) pgd; + pgtable_cache_size++; +} + +extern __inline__ void free_pgd_slow(pgd_t *pgd) +{ + free_pages((unsigned long) pgd, 2); +} + +#define pgd_free(pgd) free_pgd_fast(pgd) +#define pgd_alloc() get_pgd_fast() + +extern __inline__ void set_pgdir(unsigned long address, pgd_t entry) +{ + struct task_struct * p; + pgd_t *pgd; + + read_lock(&tasklist_lock); + for_each_task(p) { + if (!p->mm) + continue; + *pgd_offset(p->mm,address) = entry; + } + read_unlock(&tasklist_lock); + for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd) + pgd[address >> PGDIR_SHIFT] = entry; +} + +extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; + +/**************** +* PMD functions * +****************/ + +/* PMD types (actually level 1 descriptor) */ +#define PMD_TYPE_MASK 0x0003 +#define PMD_TYPE_FAULT 0x0000 +#define PMD_TYPE_TABLE 0x0001 +#define PMD_TYPE_SECT 0x0002 +#define PMD_UPDATABLE 0x0010 +#define PMD_SECT_CACHEABLE 0x0008 +#define PMD_SECT_BUFFERABLE 0x0004 +#define PMD_SECT_AP_WRITE 0x0400 +#define PMD_SECT_AP_READ 0x0800 +#define PMD_DOMAIN(x) ((x) << 5) + +#define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_USER)) +#define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL)) + +#define pmd_none(pmd) (!pmd_val(pmd)) +#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0)) +#define pmd_bad(pmd) (pmd_val(pmd) & 2) +#define mk_user_pmd(ptep) __mk_pmd(ptep, _PAGE_USER_TABLE) +#define mk_kernel_pmd(ptep) __mk_pmd(ptep, _PAGE_KERNEL_TABLE) +#define set_pmd(pmdp,pmd) processor.u.armv3v4._set_pmd(pmdp,pmd) + +/* Find an entry in the second-level page table.. */ +#define pmd_offset(dir, address) ((pmd_t *)(dir)) + +extern __inline__ int pmd_present(pmd_t pmd) +{ + return ((pmd_val(pmd) + 1) & 2); +} + +/* We don't use pmd cache, so this is a dummy routine */ +extern __inline__ pmd_t *get_pmd_fast(void) +{ + return (pmd_t *)0; +} + +extern __inline__ void free_pmd_fast(pmd_t *pmd) +{ +} + +extern __inline__ void free_pmd_slow(pmd_t *pmd) +{ +} + +extern void __bad_pmd(pmd_t *pmd); +extern void __bad_pmd_kernel(pmd_t *pmd); + +/* + * allocating and freeing a pmd is trivial: the 1-entry pmd is + * inside the pgd, so has no extra memory associated with it. + */ +extern __inline__ void pmd_free(pmd_t *pmd) +{ +} + +extern __inline__ pmd_t *pmd_alloc(pgd_t *pgd, unsigned long address) +{ + return (pmd_t *) pgd; +} + +#define pmd_free_kernel pmd_free +#define pmd_alloc_kernel pmd_alloc + +extern __inline__ pmd_t __mk_pmd(pte_t *ptep, unsigned long prot) +{ + unsigned long pte_ptr = (unsigned long)ptep; + pmd_t pmd; + + pte_ptr -= PTRS_PER_PTE * BYTES_PER_PTR; + + /* + * The pmd must be loaded with the physical + * address of the PTE table + */ + pmd_val(pmd) = __virt_to_phys(pte_ptr) | prot; + + return pmd; +} + +extern __inline__ unsigned long pmd_page(pmd_t pmd) +{ + unsigned long ptr; + + ptr = pmd_val(pmd) & ~(PTRS_PER_PTE * BYTES_PER_PTR - 1); + + ptr += PTRS_PER_PTE * BYTES_PER_PTR; + + return __phys_to_virt(ptr); +} + + +/**************** +* PTE functions * +****************/ + +/* PTE types (actially level 2 descriptor) */ +#define PTE_TYPE_MASK 0x0003 +#define PTE_TYPE_FAULT 0x0000 +#define PTE_TYPE_LARGE 0x0001 +#define PTE_TYPE_SMALL 0x0002 +#define PTE_AP_READ 0x0aa0 +#define PTE_AP_WRITE 0x0550 +#define PTE_CACHEABLE 0x0008 +#define PTE_BUFFERABLE 0x0004 + +#define pte_none(pte) (!pte_val(pte)) +#define pte_clear(ptep) set_pte(ptep, __pte(0)) + +/* + * Conversion functions: convert a page and protection to a page entry, + * and a page entry and page directory to the page they refer to. + */ +extern __inline__ pte_t mk_pte(unsigned long page, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = __virt_to_phys(page) | pgprot_val(pgprot); + return pte; +} + +/* This takes a physical page address that is used by the remapping functions */ +extern __inline__ pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = physpage + pgprot_val(pgprot); + return pte; +} + +#define set_pte(ptep, pte) processor.u.armv3v4._set_pte(ptep,pte) + +extern __inline__ unsigned long pte_page(pte_t pte) +{ + return __phys_to_virt(pte_val(pte) & PAGE_MASK); +} + +extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted); +extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted); + +extern __inline__ pte_t *get_pte_fast(void) +{ + unsigned long *ret; + + if((ret = (unsigned long *)pte_quicklist) != NULL) { + pte_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + clean_cache_area(ret, 4); + pgtable_cache_size--; + } + return (pte_t *)ret; +} + +extern __inline__ void free_pte_fast(pte_t *pte) +{ + *(unsigned long *)pte = (unsigned long) pte_quicklist; + pte_quicklist = (unsigned long *) pte; + pgtable_cache_size++; +} + +extern __inline__ void free_pte_slow(pte_t *pte) +{ + free_page_2k((unsigned long)(pte - PTRS_PER_PTE)); +} + +#define pte_free_kernel(pte) free_pte_fast(pte) +#define pte_free(pte) free_pte_fast(pte) + +/*############################################################################### + * New PageTableEntry stuff... + */ +/* We now keep two sets of ptes - the physical and the linux version. + * This gives us many advantages, and allows us greater flexibility. + * + * The Linux pte's contain: + * bit meaning + * 0 page present + * 1 young + * 2 bufferable - matches physical pte + * 3 cacheable - matches physical pte + * 4 user + * 5 write + * 6 execute + * 7 dirty + * 8-11 unused + * 12-31 virtual page address + * + * These are stored at the pte pointer; the physical PTE is at -1024bytes + */ +#define L_PTE_PRESENT (1 << 0) +#define L_PTE_YOUNG (1 << 1) +#define L_PTE_BUFFERABLE (1 << 2) +#define L_PTE_CACHEABLE (1 << 3) +#define L_PTE_USER (1 << 4) +#define L_PTE_WRITE (1 << 5) +#define L_PTE_EXEC (1 << 6) +#define L_PTE_DIRTY (1 << 7) + +/* + * The following macros handle the cache and bufferable bits... + */ +#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG +#define _L_PTE_READ L_PTE_USER | L_PTE_CACHEABLE +#define _L_PTE_EXEC _L_PTE_READ | L_PTE_EXEC + +#define PAGE_NONE __pgprot(_L_PTE_DEFAULT) +#define PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_BUFFERABLE) +#define PAGE_SHARED __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_BUFFERABLE | L_PTE_WRITE) +#define PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) +#define PAGE_KERNEL __pgprot(_L_PTE_DEFAULT | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | L_PTE_DIRTY | L_PTE_WRITE) + +#define _PAGE_CHG_MASK (PAGE_MASK | L_PTE_DIRTY | L_PTE_YOUNG) + +/* + * The table below defines the page protection levels that we insert into our + * Linux page table version. These get translated into the best that the + * architecture can perform. Note that on most ARM hardware: + * 1) We cannot do execute protection + * 2) If we could do execute protection, then read is implied + * 3) write implies read permissions + */ +#define __P000 PAGE_NONE +#define __P001 PAGE_READONLY +#define __P010 PAGE_COPY +#define __P011 PAGE_COPY +#define __P100 PAGE_READONLY +#define __P101 PAGE_READONLY +#define __P110 PAGE_COPY +#define __P111 PAGE_COPY + +#define __S000 PAGE_NONE +#define __S001 PAGE_READONLY +#define __S010 PAGE_SHARED +#define __S011 PAGE_SHARED +#define __S100 PAGE_READONLY +#define __S101 PAGE_READONLY +#define __S110 PAGE_SHARED +#define __S111 PAGE_SHARED + + + +#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT) + +/* + * The following only work if pte_present() is true. + * Undefined behaviour if not.. + */ +#define pte_read(pte) (pte_val(pte) & L_PTE_USER) +#define pte_write(pte) (pte_val(pte) & L_PTE_WRITE) +#define pte_exec(pte) (pte_val(pte) & L_PTE_EXEC) +#define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY) +#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) + +#define PTE_BIT_FUNC(fn,op) \ +extern inline pte_t fn(pte_t pte) { pte_val(pte) op; return pte; } + +//PTE_BIT_FUNC(pte_rdprotect, &= ~L_PTE_USER); +PTE_BIT_FUNC(pte_wrprotect, &= ~L_PTE_WRITE); +PTE_BIT_FUNC(pte_exprotect, &= ~L_PTE_EXEC); +PTE_BIT_FUNC(pte_mkclean, &= ~L_PTE_DIRTY); +PTE_BIT_FUNC(pte_mkold, &= ~L_PTE_YOUNG); +//PTE_BIT_FUNC(pte_mkread, |= L_PTE_USER); +PTE_BIT_FUNC(pte_mkwrite, |= L_PTE_WRITE); +PTE_BIT_FUNC(pte_mkexec, |= L_PTE_EXEC); +PTE_BIT_FUNC(pte_mkdirty, |= L_PTE_DIRTY); +PTE_BIT_FUNC(pte_mkyoung, |= L_PTE_YOUNG); +PTE_BIT_FUNC(pte_nocache, &= ~L_PTE_CACHEABLE); + +extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) +{ + pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); + return pte; +} + +/* Find an entry in the third-level page table.. */ +extern __inline__ pte_t * pte_offset(pmd_t * dir, unsigned long address) +{ + return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); +} + +extern __inline__ pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + if (pmd_none(*pmd)) { + pte_t *page = (pte_t *) get_pte_fast(); + + if (!page) + return get_pte_kernel_slow(pmd, address); + set_pmd(pmd, mk_kernel_pmd(page)); + return page + address; + } + if (pmd_bad(*pmd)) { + __bad_pmd_kernel(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} + +extern __inline__ pte_t * pte_alloc(pmd_t * pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + + if (pmd_none(*pmd)) { + pte_t *page = (pte_t *) get_pte_fast(); + + if (!page) + return get_pte_slow(pmd, address); + set_pmd(pmd, mk_user_pmd(page)); + return page + address; + } + if (pmd_bad(*pmd)) { + __bad_pmd(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} + +#define SWP_TYPE(entry) (((entry) >> 2) & 0x7f) +#define SWP_OFFSET(entry) ((entry) >> 9) +#define SWP_ENTRY(type,offset) (((type) << 2) | ((offset) << 9)) + +#endif /* __ASM_PROC_PAGE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/processor.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/processor.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * linux/include/asm-arm/proc-armv/processor.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 20-09-1996 RMK Created + * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*' + * 28-09-1996 RMK Moved start_thread into the processor dependencies + * 09-09-1998 PJB Delete redundant `wp_works_ok' + */ +#ifndef __ASM_PROC_PROCESSOR_H +#define __ASM_PROC_PROCESSOR_H + +#include + +#define KERNEL_STACK_SIZE PAGE_SIZE + +struct context_save_struct { + unsigned long cpsr; + unsigned long r4; + unsigned long r5; + unsigned long r6; + unsigned long r7; + unsigned long r8; + unsigned long r9; + unsigned long sl; + unsigned long fp; + unsigned long pc; +}; + +#define INIT_CSS (struct context_save_struct){ SVC_MODE, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + +#define EXTRA_THREAD_STRUCT \ + unsigned int domain; + +#define EXTRA_THREAD_STRUCT_INIT \ + , domain_val(DOMAIN_USER, DOMAIN_CLIENT) | \ + domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ + domain_val(DOMAIN_IO, DOMAIN_CLIENT) + +#define SWAPPER_PG_DIR (((unsigned long)swapper_pg_dir) - PAGE_OFFSET) + +#define start_thread(regs,pc,sp) \ +({ \ + unsigned long *stack = (unsigned long *)sp; \ + set_fs(USER_DS); \ + memzero(regs->uregs, sizeof(regs->uregs)); \ + if (current->personality & ADDR_LIMIT_32BIT) \ + regs->ARM_cpsr = USR_MODE; \ + else \ + regs->ARM_cpsr = USR26_MODE; \ + regs->ARM_pc = pc; /* pc */ \ + regs->ARM_sp = sp; /* sp */ \ + regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ + regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ + regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ +}) + +/* Allocation and freeing of basic task resources. */ +/* + * NOTE! The task struct and the stack go together + */ +#define ll_alloc_task_struct() ((struct task_struct *) __get_free_pages(GFP_KERNEL,1)) +#define ll_free_task_struct(p) free_pages((unsigned long)(p),1) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/ptrace.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/ptrace.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/ptrace.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/ptrace.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * linux/include/asm-arm/proc-armv/ptrace.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_PROC_PTRACE_H +#define __ASM_PROC_PTRACE_H + +#define USR26_MODE 0x00 +#define FIQ26_MODE 0x01 +#define IRQ26_MODE 0x02 +#define SVC26_MODE 0x03 +#define USR_MODE 0x10 +#define FIQ_MODE 0x11 +#define IRQ_MODE 0x12 +#define SVC_MODE 0x13 +#define ABT_MODE 0x17 +#define UND_MODE 0x1b +#define SYSTEM_MODE 0x1f +#define MODE_MASK 0x1f +#define F_BIT 0x40 +#define I_BIT 0x80 +#define CC_V_BIT (1 << 28) +#define CC_C_BIT (1 << 29) +#define CC_Z_BIT (1 << 30) +#define CC_N_BIT (1 << 31) +#define PCMASK 0 + +#ifndef __ASSEMBLY__ + +/* this struct defines the way the registers are stored on the + stack during a system call. */ + +struct pt_regs { + long uregs[18]; +}; + +#define ARM_cpsr uregs[16] +#define ARM_pc uregs[15] +#define ARM_lr uregs[14] +#define ARM_sp uregs[13] +#define ARM_ip uregs[12] +#define ARM_fp uregs[11] +#define ARM_r10 uregs[10] +#define ARM_r9 uregs[9] +#define ARM_r8 uregs[8] +#define ARM_r7 uregs[7] +#define ARM_r6 uregs[6] +#define ARM_r5 uregs[5] +#define ARM_r4 uregs[4] +#define ARM_r3 uregs[3] +#define ARM_r2 uregs[2] +#define ARM_r1 uregs[1] +#define ARM_r0 uregs[0] +#define ARM_ORIG_r0 uregs[17] + +#ifdef __KERNEL__ + +#define user_mode(regs) \ + (((regs)->ARM_cpsr & 0xf) == 0) + +#define processor_mode(regs) \ + ((regs)->ARM_cpsr & MODE_MASK) + +#define interrupts_enabled(regs) \ + (!((regs)->ARM_cpsr & I_BIT)) + +#define fast_interrupts_enabled(regs) \ + (!((regs)->ARM_cpsr & F_BIT)) + +#define condition_codes(regs) \ + ((regs)->ARM_cpsr & (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT)) + +#define instruction_pointer(regs) ((regs)->ARM_pc) +#define pc_pointer(v) (v) + +/* Are the current registers suitable for user mode? + * (used to maintain security in signal handlers) + */ +static inline int valid_user_regs(struct pt_regs *regs) +{ + if ((regs->ARM_cpsr & 0xf) == 0 && + (regs->ARM_cpsr & (F_BIT|I_BIT)) == 0) + return 1; + + /* + * Force CPSR to something logical... + */ + regs->ARM_cpsr &= (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT|0x10); + + return 0; +} + +#endif /* __KERNEL__ */ + +#endif /* __ASSEMBLY__ */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/semaphore.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/semaphore.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/semaphore.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/semaphore.h 2007-07-10 12:15:53.000000000 +0100 @@ -0,0 +1,117 @@ +/* + * linux/include/asm-arm/semaphore.h + */ +#ifndef __ASM_PROC_SEMAPHORE_H +#define __ASM_PROC_SEMAPHORE_H + +/* + * This is ugly, but we want the default case to fall through. + * "__down" is the actual routine that waits... + */ +extern inline void down(struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__down_failed) + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); +} + +/* + * This is ugly, but we want the default case to fall through. + * "__down_interruptible" is the actual routine that waits... + */ +extern inline int down_interruptible (struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down interruptible operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_interruptible_failed) "\n" +" mov %1, r0" + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); + + return temp; +} + +extern inline int down_trylock(struct semaphore *sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down try lock operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_trylock_failed) "\n" +" mov %1, r0" + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); + + return temp; +} + +/* + * Note! This is subtle. We jump to wake people up only if + * the semaphore was negative (== somebody was waiting on it). + * The default case (no contention) will result in NO + * jumps for both down() and up(). + */ +extern inline void up(struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic up operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" adds %1, %1, #1\n" +" str %1, [%2]\n" +" orrle %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__up_wakeup) + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/shmparam.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,19 @@ +/* + * linux/include/asm-arm/proc-armv/shmparam.h + * + * Copyright (C) 1996 Russell King + * + * definitions for the shared process memory on ARM v3 or v4 + * processors + */ + +#ifndef __ASM_PROC_SHMPARAM_H +#define __ASM_PROC_SHMPARAM_H + +#ifndef SHM_RANGE_START +#define SHM_RANGE_START 0x50000000 +#define SHM_RANGE_END 0x60000000 +#define SHMMAX 0x01000000 +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/system.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/system.h 2007-07-10 12:36:47.000000000 +0100 @@ -0,0 +1,153 @@ +/* + * linux/include/asm-arm/proc-armv/system.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_PROC_SYSTEM_H +#define __ASM_PROC_SYSTEM_H + +extern const char xchg_str[]; +extern void abort(void); + +extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) +{ + switch (size) { + case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); + break; + case 2: abort (); + case 4: __asm__ __volatile__ ("swp %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); + break; + default: arm_invalidptr(xchg_str, size); + } + return x; +} + +#define set_cr(x) \ + do { \ + __asm__ __volatile__( \ + "mcr p15, 0, %0, c1, c0 @ set CR" \ + : : "r" (x)); \ + } while (0) + +extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ +extern unsigned long cr_alignment; /* defined in entry-armv.S */ + +/* + * We can wait for an interrupt... + */ +#define proc_idle() \ + do { \ + __asm__ __volatile__( \ +" mcr p15, 0, %0, c15, c8, 2 @ proc_idle" \ + : : "r" (0)); \ + } while (0) + +/* + * A couple of speedups for the ARM + */ + +/* + * Save the current interrupt enable state & disable IRQs + */ +#define __save_flags_cli(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %1, cpsr @ save_flags_cli\n" \ +" and %0, %1, #192\n" \ +" orr %1, %1, #128\n" \ +" msr cpsr, %1" \ + : "=r" (x), "=r" (temp) \ + : \ + : "memory"); \ + } while (0) + +/* Same as above, but disable FIQs too: don't stay in this mode too long + otherwise things break :) */ +#define __save_flags_clif(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %1, cpsr @ save_flags_clif\n" \ +" and %0, %1, #192\n" \ +" orr %1, %1, #192\n" \ +" msr cpsr, %1" \ + : "=r" (x), "=r" (temp) \ + : \ + : "memory"); \ + } while (0) + +/* + * Enable IRQs + */ +#define __sti() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ sti\n" \ +" bic %0, %0, #128\n" \ +" msr cpsr, %0" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * Disable IRQs + */ +#define __cli() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ cli\n" \ +" orr %0, %0, #128\n" \ +" msr cpsr, %0" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * save current IRQ & FIQ state + */ +#define __save_flags(x) \ + do { \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ save_flags\n" \ +" and %0, %0, #192" \ + : "=r" (x) \ + : \ + : "memory"); \ + } while (0) + +/* + * restore saved IRQ & FIQ state + */ +#define __restore_flags(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ restore_flags\n" \ +" bic %0, %0, #192\n" \ +" orr %0, %0, %1\n" \ +" msr cpsr, %0" \ + : "=&r" (temp) \ + : "r" (x) \ + : "memory"); \ + } while (0) + +#ifdef __SMP__ +#error SMP not supported +#else + +#define cli() __cli() +#define sti() __sti() +#define save_flags(x) __save_flags(x) +#define restore_flags(x) __restore_flags(x) +#define save_flags_cli(x) __save_flags_cli(x) +#define save_flags_clif(x) __save_flags_clif(x) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/uaccess.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/uaccess.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/uaccess.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/uaccess.h 2007-07-10 12:25:52.000000000 +0100 @@ -0,0 +1,177 @@ +/* + * linux/include/asm-arm/proc-armv/uaccess.h + */ + +#include +#include + +/* + * Note that this is actually 0x1,0000,0000 + */ +#define KERNEL_DS 0x00000000 +#define USER_DS PAGE_OFFSET + +#define get_ds() (KERNEL_DS) +#define get_fs() (current->addr_limit) + +#define segment_eq(a,b) ((a) == (b)) + +extern __inline__ void set_fs (mm_segment_t fs) +{ + current->addr_limit = fs; + + modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); +} + +/* We use 33-bit arithmetic here... */ +#define __range_ok(addr,size) ({ \ + unsigned long flag, sum; \ + __asm__ __volatile__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ + : "=&r" (flag), "=&r" (sum) \ + : "r" (addr), "Ir" (size), "0" (current->addr_limit) \ + : "cc"); \ + flag; }) + +#define __addr_ok(addr) ({ \ + unsigned long flag; \ + __asm__ __volatile__("cmp %2, %0; movlo %0, #0" \ + : "=&r" (flag) \ + : "0" (current->addr_limit), "r" (addr) \ + : "cc"); \ + (flag == 0); }) + +#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) + +#define __put_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + "1: strbt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "i" (EFAULT), "0" (err)) + +#define __put_user_asm_half(x,addr,err) \ +({ \ + unsigned long __temp = (unsigned long)(x); \ + __asm__ __volatile__( \ + "1: strbt %1,[%3],#0\n" \ + "2: strbt %2,[%4],#0\n" \ + "3:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "4: mvn %0, %5\n" \ + " b 3b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 4b\n" \ + " .long 2b, 4b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (__temp), "r" (__temp >> 8), \ + "r" (addr), "r" ((int)(addr) + 1), \ + "i" (EFAULT), "0" (err)); \ +}) + +#define __put_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + "1: strt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "i" (EFAULT), "0" (err)) + +#define __get_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + "1: ldrbt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " mov %1, #0\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "i" (EFAULT), "0" (err)) + +#define __get_user_asm_half(x,addr,err) \ +({ \ + unsigned long __temp; \ + __asm__ __volatile__( \ + "1: ldrbt %1,[%3],#0\n" \ + "2: ldrbt %2,[%4],#0\n" \ + " orr %1, %1, %2, lsl #8\n" \ + "3:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "4: mvn %0, %5\n" \ + " mov %1, #0\n" \ + " b 3b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 4b\n" \ + " .long 2b, 4b\n" \ + " .previous" \ + : "=r" (err), "=r" (x), "=&r" (__temp) \ + : "r" (addr), "r" ((int)(addr) + 1), \ + "i" (EFAULT), "0" (err)); \ +}) + + +#define __get_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + "1: ldrt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " mov %1, #0\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "i" (EFAULT), "0" (err)) + +extern unsigned long __arch_copy_from_user(void *to, const void *from, unsigned long n); +#define __do_copy_from_user(to,from,n) \ + (n) = __arch_copy_from_user(to,from,n) + +extern unsigned long __arch_copy_to_user(void *to, const void *from, unsigned long n); +#define __do_copy_to_user(to,from,n) \ + (n) = __arch_copy_to_user(to,from,n) + +extern unsigned long __arch_clear_user(void *addr, unsigned long n); +#define __do_clear_user(addr,sz) \ + (sz) = __arch_clear_user(addr,sz) + +extern unsigned long __arch_strncpy_from_user(char *to, const char *from, unsigned long count); +#define __do_strncpy_from_user(dst,src,count,res) \ + (res) = __arch_strncpy_from_user(dst,src,count) + +extern unsigned long __arch_strnlen_user(const char *s, long n); +#define __do_strnlen_user(s,n,res) \ + (res) = __arch_strnlen_user(s,n) diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-armv/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm/proc-armv/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-armv/uncompress.h 2007-07-10 14:21:19.000000000 +0100 @@ -0,0 +1,22 @@ +/* + * linux/include/asm-arm/proc-armv/uncompress.h + * + * (c) 1997 Russell King + */ + +static inline void proc_decomp_setup (void) +{ + __asm__ __volatile__( +" mrc p15, 0, r0, c0, c0\n" +" eor r0, r0, #0x44 << 24\n" +" eor r0, r0, #0x01 << 16\n" +" eor r0, r0, #0xA1 << 8\n" +" movs r0, r0, lsr #4\n" +" mcreq p15, 0, r0, c7, c5, 0 @ flush I cache\n" +" mrceq p15, 0, r0, c1, c0\n" +" orreq r0, r0, #1 << 12\n" +" mcreq p15, 0, r0, c1, c0 @ enable I cache\n" +" mov r0, #0\n" +" mcreq p15, 0, r0, c15, c1, 2 @ enable clock switching\n" + : : : "r0", "cc", "memory"); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/proc-fns.h linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-fns.h --- linux-2.2.14-rmk-mercury/include/asm/proc-fns.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/proc-fns.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,127 @@ +/* + * linux/include/asm-arm/proc-fns.h + * + * Copyright (C) 1997 Russell King + */ +#ifndef __ASM_PROCFNS_H +#define __ASM_PROCFNS_H + +#include + +#ifdef __KERNEL__ + +/* forward-declare task_struct */ +struct task_struct; + +/* + * Don't change this structure + */ +extern struct processor { + const char *name; + /* MISC + * + * flush caches for task switch + */ + struct task_struct *(*_switch_to)(struct task_struct *prev, struct task_struct *next); + /* + * get data abort address/flags + */ + void (*_data_abort)(unsigned long pc); + /* + * check for any bugs + */ + void (*_check_bugs)(void); + /* + * Set up any processor specifics + */ + void (*_proc_init)(void); + /* + * Disable any processor specifics + */ + void (*_proc_fin)(void); + /* + * Processor architecture specific + */ + union { + struct { + /* CACHE + * + * flush all caches + */ + void (*_flush_cache_all)(void); + /* + * flush a specific page or pages + */ + void (*_flush_cache_area)(unsigned long address, unsigned long end, int flags); + /* + * flush cache entry for an address + */ + void (*_flush_cache_entry)(unsigned long address); + /* + * clean a virtual address range from the + * D-cache without flushing the cache. + */ + void (*_clean_cache_area)(unsigned long start, unsigned long size); + /* + * flush a page to RAM + */ + void (*_flush_ram_page)(unsigned long page); + /* TLB + * + * flush all TLBs + */ + void (*_flush_tlb_all)(void); + /* + * flush a specific TLB + */ + void (*_flush_tlb_area)(unsigned long address, unsigned long end, int flags); + /* + * Set a PMD (handling IMP bit 4) + */ + void (*_set_pmd)(pmd_t *pmdp, pmd_t pmd); + /* + * Set a PTE + */ + void (*_set_pte)(pte_t *ptep, pte_t pte); + /* + * Special stuff for a reset + */ + unsigned long (*reset)(void); + /* + * flush an icached page + */ + void (*_flush_icache_area)(unsigned long start, unsigned long size); + /* + * write back dirty cached data + */ + void (*_cache_wback_area)(unsigned long start, unsigned long end); + /* + * purge cached data without (necessarily) writing it back + */ + void (*_cache_purge_area)(unsigned long start, unsigned long end); + } armv3v4; + struct { + /* MEMC + * + * remap memc tables + */ + void (*_remap_memc)(void *tsk); + /* + * update task's idea of mmap + */ + void (*_update_map)(void *tsk); + /* + * update task's idea after abort + */ + void (*_update_mmu_cache)(void *vma, unsigned long addr, pte_t pte); + /* XCHG + */ + unsigned long (*_xchg_1)(unsigned long x, volatile void *ptr); + unsigned long (*_xchg_2)(unsigned long x, volatile void *ptr); + unsigned long (*_xchg_4)(unsigned long x, volatile void *ptr); + } armv2; + } u; +} processor; +#endif +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm/processor.h --- linux-2.2.14-rmk-mercury/include/asm/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/processor.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,100 @@ +/* + * include/asm-arm/processor.h + * + * Copyright (C) 1995 Russell King + */ + +#ifndef __ASM_ARM_PROCESSOR_H +#define __ASM_ARM_PROCESSOR_H + +#define FP_SIZE 35 + +struct fp_hard_struct { + unsigned int save[FP_SIZE]; /* as yet undefined */ +}; + +struct fp_soft_struct { + unsigned int save[FP_SIZE]; /* undefined information */ +}; + +union fp_state { + struct fp_hard_struct hard; + struct fp_soft_struct soft; +}; + +typedef unsigned long mm_segment_t; /* domain register */ + +#ifdef __KERNEL__ + +#define NR_DEBUGS 5 + +#include +#include +#include + +struct thread_struct { + unsigned long address; /* Address of fault */ + unsigned long trap_no; /* Trap number */ + unsigned long error_code; /* Error code of trap */ + union fp_state fpstate; /* FPE save state */ + unsigned long debug[NR_DEBUGS]; /* Debug/ptrace */ + struct context_save_struct *save; /* context save */ + unsigned long memmap; /* page tables */ + EXTRA_THREAD_STRUCT +}; + +#define INIT_MMAP \ +{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } + +#define INIT_TSS { \ + 0, \ + 0, \ + 0, \ + { { { 0, }, }, }, \ + { 0, }, \ + (struct context_save_struct *)0, \ + SWAPPER_PG_DIR \ + EXTRA_THREAD_STRUCT_INIT \ +} + +/* + * Return saved PC of a blocked thread. + */ +extern __inline__ unsigned long thread_saved_pc(struct thread_struct *t) +{ + return t->save ? t->save->pc & ~PCMASK : 0; +} + +extern __inline__ unsigned long get_css_fp(struct thread_struct *t) +{ + return t->save ? t->save->fp : 0; +} + +asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call"); + +extern __inline__ void init_thread_css(struct context_save_struct *save) +{ + *save = INIT_CSS; + save->pc |= (unsigned long)ret_from_sys_call; +} + +/* Forward declaration, a strange C thing */ +struct mm_struct; + +/* Free all resources held by a thread. */ +extern void release_thread(struct task_struct *); + +/* Copy and release all segment info associated with a VM */ +#define copy_segments(nr, tsk, mm) do { } while (0) +#define release_segments(mm) do { } while (0) +#define forget_segments() do { } while (0) + +extern struct task_struct *alloc_task_struct(void); +extern void free_task_struct(struct task_struct *); + +#define init_task (init_task_union.task) +#define init_stack (init_task_union.stack) + +#endif + +#endif /* __ASM_ARM_PROCESSOR_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/procinfo.h linux-2.2.14-rmk-mercury-gcc3/include/asm/procinfo.h --- linux-2.2.14-rmk-mercury/include/asm/procinfo.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/procinfo.h 2007-07-10 12:31:26.000000000 +0100 @@ -0,0 +1,34 @@ +/* + * linux/include/asm-arm/procinfo.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_PROCINFO_H +#define __ASM_PROCINFO_H + +#include + +#ifndef __ASSEMBLER__ + +#define HWCAP_SWP (1 << 0) +#define HWCAP_HALF (1 << 1) + +struct armversions { + const unsigned long id; /* Processor ID */ + const unsigned long mask; /* Processor ID mask */ + const char *manu; /* Manufacturer */ + const char *name; /* Processor name */ + const char *arch_vsn; /* Architecture version */ + const char *elf_vsn; /* ELF library version */ + const int hwcap; /* ELF HWCAP */ + const struct processor *proc; /* Processor-specific ASM */ +}; + +extern const struct armversions armidlist[]; +extern int armidindex; + +#endif + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/ptrace.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ptrace.h --- linux-2.2.14-rmk-mercury/include/asm/ptrace.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ptrace.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,11 @@ +#ifndef __ASM_ARM_PTRACE_H +#define __ASM_ARM_PTRACE_H + +#include + +#ifdef __KERNEL__ +extern void show_regs(struct pt_regs *); +#endif + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/resource.h linux-2.2.14-rmk-mercury-gcc3/include/asm/resource.h --- linux-2.2.14-rmk-mercury/include/asm/resource.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/resource.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,39 @@ +#ifndef _ARM_RESOURCE_H +#define _ARM_RESOURCE_H + +/* + * Resource limits + */ + +#define RLIMIT_CPU 0 /* CPU time in ms */ +#define RLIMIT_FSIZE 1 /* Maximum filesize */ +#define RLIMIT_DATA 2 /* max data size */ +#define RLIMIT_STACK 3 /* max stack size */ +#define RLIMIT_CORE 4 /* max core file size */ +#define RLIMIT_RSS 5 /* max resident set size */ +#define RLIMIT_NPROC 6 /* max number of processes */ +#define RLIMIT_NOFILE 7 /* max number of open files */ +#define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ +#define RLIMIT_AS 9 /* address space limit */ + +#define RLIM_NLIMITS 10 + +#ifdef __KERNEL__ + +#define INIT_RLIMITS \ +{ \ + { LONG_MAX, LONG_MAX }, \ + { LONG_MAX, LONG_MAX }, \ + { LONG_MAX, LONG_MAX }, \ + { _STK_LIM, _STK_LIM }, \ + { 0, LONG_MAX }, \ + { LONG_MAX, LONG_MAX }, \ + { MAX_TASKS_PER_USER, MAX_TASKS_PER_USER }, \ + { INR_OPEN, INR_OPEN }, \ + { LONG_MAX, LONG_MAX }, \ + { LONG_MAX, LONG_MAX }, \ +} + +#endif /* __KERNEL__ */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/scatterlist.h linux-2.2.14-rmk-mercury-gcc3/include/asm/scatterlist.h --- linux-2.2.14-rmk-mercury/include/asm/scatterlist.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/scatterlist.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,13 @@ +#ifndef _ASMARM_SCATTERLIST_H +#define _ASMARM_SCATTERLIST_H + +struct scatterlist { + char * address; /* Location data is to be transferred to */ + char * alt_address; /* Location of actual if address is a + * dma indirect buffer. NULL otherwise */ + unsigned int length; +}; + +#define ISA_DMA_THRESHOLD (0xffffffff) + +#endif /* _ASMARM_SCATTERLIST_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/segment.h linux-2.2.14-rmk-mercury-gcc3/include/asm/segment.h --- linux-2.2.14-rmk-mercury/include/asm/segment.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/segment.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,11 @@ +#ifndef __ASM_ARM_SEGMENT_H +#define __ASM_ARM_SEGMENT_H + +#define __KERNEL_CS 0x0 +#define __KERNEL_DS 0x0 + +#define __USER_CS 0x1 +#define __USER_DS 0x1 + +#endif /* __ASM_ARM_SEGMENT_H */ + diff -Nru linux-2.2.14-rmk-mercury/include/asm/semaphore-helper.h linux-2.2.14-rmk-mercury-gcc3/include/asm/semaphore-helper.h --- linux-2.2.14-rmk-mercury/include/asm/semaphore-helper.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/semaphore-helper.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,84 @@ +#ifndef ASMARM_SEMAPHORE_HELPER_H +#define ASMARM_SEMAPHORE_HELPER_H + +/* + * These two _must_ execute atomically wrt each other. + */ +static inline void wake_one_more(struct semaphore * sem) +{ + unsigned long flags; + + spin_lock_irqsave(&semaphore_wake_lock, flags); + if (atomic_read(&sem->count) <= 0) + sem->waking++; + spin_unlock_irqrestore(&semaphore_wake_lock, flags); +} + +static inline int waking_non_zero(struct semaphore *sem) +{ + unsigned long flags; + int ret = 0; + + spin_lock_irqsave(&semaphore_wake_lock, flags); + if (sem->waking > 0) { + sem->waking--; + ret = 1; + } + spin_unlock_irqrestore(&semaphore_wake_lock, flags); + return ret; +} + +/* + * waking non zero interruptible + * 1 got the lock + * 0 go to sleep + * -EINTR interrupted + * + * We must undo the sem->count down_interruptible() increment while we are + * protected by the spinlock in order to make this atomic_inc() with the + * atomic_read() in wake_one_more(), otherwise we can race. -arca + */ +static inline int waking_non_zero_interruptible(struct semaphore *sem, + struct task_struct *tsk) +{ + unsigned long flags; + int ret = 0; + + spin_lock_irqsave(&semaphore_wake_lock, flags); + if (sem->waking > 0) { + sem->waking--; + ret = 1; + } else if (signal_pending(tsk)) { + atomic_inc(&sem->count); + ret = -EINTR; + } + spin_unlock_irqrestore(&semaphore_wake_lock, flags); + return ret; +} + +/* + * waking_non_zero_try_lock: + * 1 failed to lock + * 0 got the lock + * + * We must undo the sem->count down_interruptible() increment while we are + * protected by the spinlock in order to make this atomic_inc() with the + * atomic_read() in wake_one_more(), otherwise we can race. -arca + */ +static inline int waking_non_zero_trylock(struct semaphore *sem) +{ + unsigned long flags; + int ret = 1; + + spin_lock_irqsave(&semaphore_wake_lock, flags); + if (sem->waking <= 0) + atomic_inc(&sem->count); + else { + sem->waking--; + ret = 0; + } + spin_unlock_irqrestore(&semaphore_wake_lock, flags); + return ret; +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/semaphore.h linux-2.2.14-rmk-mercury-gcc3/include/asm/semaphore.h --- linux-2.2.14-rmk-mercury/include/asm/semaphore.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/semaphore.h 2007-07-10 12:36:50.000000000 +0100 @@ -0,0 +1,33 @@ +/* + * linux/include/asm-arm/semaphore.h + */ +#ifndef __ASM_ARM_SEMAPHORE_H +#define __ASM_ARM_SEMAPHORE_H + +#include +#include + +struct semaphore { + atomic_t count; + int waking; + struct wait_queue * wait; +}; + +#define MUTEX ((struct semaphore) { ATOMIC_INIT(1), 0, NULL }) +#define MUTEX_LOCKED ((struct semaphore) { ATOMIC_INIT(0), 0, NULL }) + +asmlinkage void __down_failed (void /* special register calling convention */); +asmlinkage int __down_interruptible_failed (void /* special register calling convention */); +asmlinkage int __down_failed_trylock(void /* params in registers */); +asmlinkage void __up_wakeup (void /* special register calling convention */); + +extern void __down(struct semaphore * sem); +extern int __down_interruptible(struct semaphore * sem); +extern int __down_trylock(struct semaphore * sem); +extern void __up(struct semaphore * sem); + +#define sema_init(sem, val) atomic_set(&((sem)->count), (val)) + +#include + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/serial.h linux-2.2.14-rmk-mercury-gcc3/include/asm/serial.h --- linux-2.2.14-rmk-mercury/include/asm/serial.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/serial.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,15 @@ +/* + * linux/include/asm-arm/serial.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 15-10-1996 RMK Created + */ + +#ifndef __ASM_SERIAL_H +#define __ASM_SERIAL_H + +#include + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/setup.h linux-2.2.14-rmk-mercury-gcc3/include/asm/setup.h --- linux-2.2.14-rmk-mercury/include/asm/setup.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/setup.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * include/asm/setup.h + * + * Structure passed to kernel to tell it about the + * hardware it's running on. See linux/Documentation/arm/Setup + * for more info. + * + * Copyright (C) 1997-1999 Russell King + */ +#ifndef __ASMARM_SETUP_H +#define __ASMARM_SETUP_H + +/* + * Usage: + * - do not go blindly adding fields, add them at the end + * - when adding fields, don't rely on the address until + * a patch from me has been released + * - unused fields should be zero (for future expansion) + * - this structure is relatively short-lived - only + * guaranteed to contain useful data in setup_arch() + */ +#define COMMAND_LINE_SIZE 1024 + +struct param_struct { + union { + struct { + unsigned long page_size; /* 0 */ + unsigned long nr_pages; /* 4 */ + unsigned long ramdisk_size; /* 8 */ + unsigned long flags; /* 12 */ +#define FLAG_READONLY 1 +#define FLAG_RDLOAD 4 +#define FLAG_RDPROMPT 8 + unsigned long rootdev; /* 16 */ + unsigned long video_num_cols; /* 20 */ + unsigned long video_num_rows; /* 24 */ + unsigned long video_x; /* 28 */ + unsigned long video_y; /* 32 */ + unsigned long memc_control_reg; /* 36 */ + unsigned char sounddefault; /* 40 */ + unsigned char adfsdrives; /* 41 */ + unsigned char bytes_per_char_h; /* 42 */ + unsigned char bytes_per_char_v; /* 43 */ + unsigned long pages_in_bank[4]; /* 44 */ + unsigned long pages_in_vram; /* 60 */ + unsigned long initrd_start; /* 64 */ + unsigned long initrd_size; /* 68 */ + unsigned long rd_start; /* 72 */ + unsigned long system_rev; /* 76 */ + unsigned long system_serial_low; /* 80 */ + unsigned long system_serial_high; /* 84 */ + } s; + char unused[256]; + } u1; + union { + char paths[8][128]; + struct { + unsigned long magic; + char n[1024 - sizeof(unsigned long)]; + } s; + } u2; + char commandline[COMMAND_LINE_SIZE]; +}; + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/shmparam.h 2007-07-10 12:29:18.000000000 +0100 @@ -0,0 +1,47 @@ +#ifndef _ASMARM_SHMPARAM_H +#define _ASMARM_SHMPARAM_H + +/* + * Include the machine specific shm parameters before the processor + * dependent parameters so that the machine parameters can override + * the processor parameters + */ +#include +#include + +/* + * Format of a swap-entry for shared memory pages currently out in + * swap space (see also mm/swap.c). + * + * SWP_TYPE = SHM_SWP_TYPE + * SWP_OFFSET is used as follows: + * + * bits 0..6 : id of shared memory segment page belongs to (SHM_ID) + * bits 7..21: index of page within shared memory segment (SHM_IDX) + * (actually fewer bits get used since SHMMAX is so low) + */ + +/* + * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and + * there is a static array of size SHMMNI. + */ +#define _SHM_ID_BITS 7 +#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1) + +#define SHM_IDX_SHIFT (_SHM_ID_BITS) +#define _SHM_IDX_BITS 15 +#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1) + +/* + * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and + * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS). + */ + +#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */ +#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */ +#define SHMALL /* max shm system wide (pages) */ \ + (1<<(_SHM_IDX_BITS+_SHM_ID_BITS)) +#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ +#define SHMSEG SHMMNI /* max shared segs per process */ + +#endif /* _ASMARM_SHMPARAM_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/sigcontext.h linux-2.2.14-rmk-mercury-gcc3/include/asm/sigcontext.h --- linux-2.2.14-rmk-mercury/include/asm/sigcontext.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/sigcontext.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,33 @@ +#ifndef _ASMARM_SIGCONTEXT_H +#define _ASMARM_SIGCONTEXT_H + +/* + * Signal context structure - contains all info to do with the state + * before the signal handler was invoked. Note: only add new entries + * to the end of the structure. + */ +struct sigcontext { + unsigned long trap_no; + unsigned long error_code; + unsigned long oldmask; + unsigned long arm_r0; + unsigned long arm_r1; + unsigned long arm_r2; + unsigned long arm_r3; + unsigned long arm_r4; + unsigned long arm_r5; + unsigned long arm_r6; + unsigned long arm_r7; + unsigned long arm_r8; + unsigned long arm_r9; + unsigned long arm_r10; + unsigned long arm_fp; + unsigned long arm_ip; + unsigned long arm_sp; + unsigned long arm_lr; + unsigned long arm_pc; + unsigned long arm_cpsr; +}; + + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/siginfo.h linux-2.2.14-rmk-mercury-gcc3/include/asm/siginfo.h --- linux-2.2.14-rmk-mercury/include/asm/siginfo.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/siginfo.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,197 @@ +#ifndef _ASMARM_SIGINFO_H +#define _ASMARM_SIGINFO_H + +#include + +/* XXX: This structure was copied from the Alpha; is there an iBCS version? */ + +typedef union sigval { + int sival_int; + void *sival_ptr; +} sigval_t; + +#define SI_MAX_SIZE 128 +#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3) + +typedef struct siginfo { + int si_signo; + int si_errno; + int si_code; + + union { + int _pad[SI_PAD_SIZE]; + + /* kill() */ + struct { + pid_t _pid; /* sender's pid */ + uid_t _uid; /* sender's uid */ + } _kill; + + /* POSIX.1b timers */ + struct { + unsigned int _timer1; + unsigned int _timer2; + } _timer; + + /* POSIX.1b signals */ + struct { + pid_t _pid; /* sender's pid */ + uid_t _uid; /* sender's uid */ + sigval_t _sigval; + } _rt; + + /* SIGCHLD */ + struct { + pid_t _pid; /* which child */ + uid_t _uid; /* sender's uid */ + int _status; /* exit code */ + clock_t _utime; + clock_t _stime; + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ + struct { + void *_addr; /* faulting insn/memory ref. */ + } _sigfault; + + /* SIGPOLL */ + struct { + int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + int _fd; + } _sigpoll; + } _sifields; +} siginfo_t; + +/* + * How these fields are to be accessed. + */ +#define si_pid _sifields._kill._pid +#define si_uid _sifields._kill._uid +#define si_status _sifields._sigchld._status +#define si_utime _sifields._sigchld._utime +#define si_stime _sifields._sigchld._stime +#define si_value _sifields._rt._sigval +#define si_int _sifields._rt._sigval.sival_int +#define si_ptr _sifields._rt._sigval.sival_ptr +#define si_addr _sifields._sigfault._addr +#define si_band _sifields._sigpoll._band +#define si_fd _sifields._sigpoll._fd + +/* + * si_code values + * Digital reserves positive values for kernel-generated signals. + */ +#define SI_USER 0 /* sent by kill, sigsend, raise */ +#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ +#define SI_QUEUE -1 /* sent by sigqueue */ +#define SI_TIMER -2 /* sent by timer expiration */ +#define SI_MESGQ -3 /* sent by real time mesq state change */ +#define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ + +#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) +#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) + +/* + * SIGILL si_codes + */ +#define ILL_ILLOPC 1 /* illegal opcode */ +#define ILL_ILLOPN 2 /* illegal operand */ +#define ILL_ILLADR 3 /* illegal addressing mode */ +#define ILL_ILLTRP 4 /* illegal trap */ +#define ILL_PRVOPC 5 /* privileged opcode */ +#define ILL_PRVREG 6 /* privileged register */ +#define ILL_COPROC 7 /* coprocessor error */ +#define ILL_BADSTK 8 /* internal stack error */ +#define NSIGILL 8 + +/* + * SIGFPE si_codes + */ +#define FPE_INTDIV 1 /* integer divide by zero */ +#define FPE_INTOVF 2 /* integer overflow */ +#define FPE_FLTDIV 3 /* floating point divide by zero */ +#define FPE_FLTOVF 4 /* floating point overflow */ +#define FPE_FLTUND 5 /* floating point underflow */ +#define FPE_FLTRES 6 /* floating point inexact result */ +#define FPE_FLTINV 7 /* floating point invalid operation */ +#define FPE_FLTSUB 8 /* subscript out of range */ +#define NSIGFPE 8 + +/* + * SIGSEGV si_codes + */ +#define SEGV_MAPERR 1 /* address not mapped to object */ +#define SEGV_ACCERR 2 /* invalid permissions for mapped object */ +#define NSIGSEGV 2 + +/* + * SIGBUS si_codes + */ +#define BUS_ADRALN 1 /* invalid address alignment */ +#define BUS_ADRERR 2 /* non-existant physical address */ +#define BUS_OBJERR 3 /* object specific hardware error */ +#define NSIGBUS 3 + +/* + * SIGTRAP si_codes + */ +#define TRAP_BRKPT 1 /* process breakpoint */ +#define TRAP_TRACE 2 /* process trace trap */ +#define NSIGTRAP 2 + +/* + * SIGCHLD si_codes + */ +#define CLD_EXITED 1 /* child has exited */ +#define CLD_KILLED 2 /* child was killed */ +#define CLD_DUMPED 3 /* child terminated abnormally */ +#define CLD_TRAPPED 4 /* traced child has trapped */ +#define CLD_STOPPED 5 /* child has stopped */ +#define CLD_CONTINUED 6 /* stopped child has continued */ +#define NSIGCHLD + +/* + * SIGPOLL si_codes + */ +#define POLL_IN 1 /* data input available */ +#define POLL_OUT 2 /* output buffers available */ +#define POLL_MSG 3 /* input message available */ +#define POLL_ERR 4 /* i/o error */ +#define POLL_PRI 5 /* high priority input available */ +#define POLL_HUP 6 /* device disconnected */ +#define NSIGPOLL 6 + +/* + * sigevent definitions + * + * It seems likely that SIGEV_THREAD will have to be handled from + * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the + * thread manager then catches and does the appropriate nonsense. + * However, everything is written out here so as to not get lost. + */ +#define SIGEV_SIGNAL 0 /* notify via signal */ +#define SIGEV_NONE 1 /* other notification: meaningless */ +#define SIGEV_THREAD 2 /* deliver via thread creation */ + +#define SIGEV_MAX_SIZE 64 +#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3) + +typedef struct sigevent { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + union { + int _pad[SIGEV_PAD_SIZE]; + + struct { + void (*_function)(sigval_t); + void *_attribute; /* really pthread_attr_t */ + } _sigev_thread; + } _sigev_un; +} sigevent_t; + +#define sigev_notify_function _sigev_un._sigev_thread._function +#define sigev_notify_attributes _sigev_un._sigev_thread._attribute + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/signal.h linux-2.2.14-rmk-mercury-gcc3/include/asm/signal.h --- linux-2.2.14-rmk-mercury/include/asm/signal.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/signal.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,189 @@ +#ifndef _ASMARM_SIGNAL_H +#define _ASMARM_SIGNAL_H + +#include + +/* Avoid too many header ordering problems. */ +struct siginfo; + +#ifdef __KERNEL__ +/* Most things should be clean enough to redefine this at will, if care + is taken to make libc match. */ + +#define _NSIG 64 +#define _NSIG_BPW 32 +#define _NSIG_WORDS (_NSIG / _NSIG_BPW) + +typedef unsigned long old_sigset_t; /* at least 32 bits */ + +typedef struct { + unsigned long sig[_NSIG_WORDS]; +} sigset_t; + +#else +/* Here we must cater to libcs that poke about in kernel headers. */ + +#define NSIG 32 +typedef unsigned long sigset_t; + +#endif /* __KERNEL__ */ + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT 6 +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGPOLL SIGIO +/* +#define SIGLOST 29 +*/ +#define SIGPWR 30 +#define SIGUNUSED 31 + +/* These should not be considered constants from userland. */ +#define SIGRTMIN 32 +#define SIGRTMAX (_NSIG-1) + +#define SIGSWI 32 + +/* + * SA_FLAGS values: + * + * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the + * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. + * SA_RESETHAND clears the handler when the signal is delivered. + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. + * SA_NODEFER prevents the current signal from being masked in the handler. + * + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single + * Unix names RESETHAND and NODEFER respectively. + */ +#define SA_NOCLDSTOP 0x00000001 +#define SA_NOCLDWAIT 0x00000002 /* not supported yet */ +#define SA_SIGINFO 0x00000004 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 + +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ + +#define SA_RESTORER 0x04000000 +#define SA_THIRTYTWO 0x02000000 /* deliver signal in 32-bit mode even if + task is running 26 bits. */ + +/* + * sigaltstack controls + */ +#define SS_ONSTACK 1 +#define SS_DISABLE 2 + +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 + +#ifdef __KERNEL__ + +/* + * These values of sa_flags are used only by the kernel as part of the + * irq handling routines. + * + * SA_INTERRUPT is also used by the irq handling routines. + * SA_SHIRQ is for shared interrupt support on PCI and EISA. + */ +#define SA_PROBE 0x80000000 +#define SA_SAMPLE_RANDOM 0x10000000 +#define SA_IRQNOMASK 0x08000000 +#define SA_SHIRQ 0x04000000 +#endif + +#define SIG_BLOCK 0 /* for blocking signals */ +#define SIG_UNBLOCK 1 /* for unblocking signals */ +#define SIG_SETMASK 2 /* for setting the signal mask */ + +/* Type of a signal handler. */ +typedef void (*__sighandler_t)(int); + +#define SIG_DFL ((__sighandler_t)0) /* default signal handling */ +#define SIG_IGN ((__sighandler_t)1) /* ignore signal */ +#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ + +#ifdef __KERNEL__ +struct old_sigaction { + __sighandler_t sa_handler; + old_sigset_t sa_mask; + unsigned long sa_flags; + void (*sa_restorer)(void); +}; + +struct sigaction { + __sighandler_t sa_handler; + unsigned long sa_flags; + void (*sa_restorer)(void); + sigset_t sa_mask; /* mask last for extensibility */ +}; + +struct k_sigaction { + struct sigaction sa; +}; + +#else +/* Here we must cater to libcs that poke about in kernel headers. */ + +struct sigaction { + union { + __sighandler_t _sa_handler; + void (*_sa_sigaction)(int, struct siginfo *, void *); + } _u; + sigset_t sa_mask; + unsigned long sa_flags; + void (*sa_restorer)(void); +}; + +#define sa_handler _u._sa_handler +#define sa_sigaction _u._sa_sigaction + +#endif /* __KERNEL__ */ + +typedef struct sigaltstack { + void *ss_sp; + int ss_flags; + size_t ss_size; +} stack_t; + +#ifdef __KERNEL__ +#include + +#define sigmask(sig) (1UL << ((sig) - 1)) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/smp.h linux-2.2.14-rmk-mercury-gcc3/include/asm/smp.h --- linux-2.2.14-rmk-mercury/include/asm/smp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/smp.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef __ASM_SMP_H +#define __ASM_SMP_H + +#ifdef __SMP__ +#error SMP not supported +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/smplock.h linux-2.2.14-rmk-mercury-gcc3/include/asm/smplock.h --- linux-2.2.14-rmk-mercury/include/asm/smplock.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/smplock.h 2007-07-10 12:36:50.000000000 +0100 @@ -0,0 +1,49 @@ +/* + * + * + * Default SMP lock implementation + */ +#include +#include + +extern spinlock_t kernel_flag; + +/* + * Release global kernel lock and global interrupt lock + */ +#define release_kernel_lock(task, cpu) \ +do { \ + if (task->lock_depth >= 0) \ + spin_unlock(&kernel_flag); \ + release_irqlock(cpu); \ + __sti(); \ +} while (0) + +/* + * Re-acquire the kernel lock + */ +#define reacquire_kernel_lock(task) \ +do { \ + if (task->lock_depth >= 0) \ + spin_lock(&kernel_flag); \ +} while (0) + + +/* + * Getting the big kernel lock. + * + * This cannot happen asynchronously, + * so we only need to worry about other + * CPU's. + */ +extern __inline__ void lock_kernel(void) +{ + if (!++current->lock_depth) + spin_lock(&kernel_flag); +} + +extern __inline__ void unlock_kernel(void) +{ + if (--current->lock_depth < 0) + spin_unlock(&kernel_flag); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm/socket.h linux-2.2.14-rmk-mercury-gcc3/include/asm/socket.h --- linux-2.2.14-rmk-mercury/include/asm/socket.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/socket.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,56 @@ +#ifndef _ASMARM_SOCKET_H +#define _ASMARM_SOCKET_H + +#include + +/* For setsockoptions(2) */ +#define SOL_SOCKET 1 + +#define SO_DEBUG 1 +#define SO_REUSEADDR 2 +#define SO_TYPE 3 +#define SO_ERROR 4 +#define SO_DONTROUTE 5 +#define SO_BROADCAST 6 +#define SO_SNDBUF 7 +#define SO_RCVBUF 8 +#define SO_KEEPALIVE 9 +#define SO_OOBINLINE 10 +#define SO_NO_CHECK 11 +#define SO_PRIORITY 12 +#define SO_LINGER 13 +#define SO_BSDCOMPAT 14 +/* To add :#define SO_REUSEPORT 15 */ +#define SO_PASSCRED 16 +#define SO_PEERCRED 17 +#define SO_RCVLOWAT 18 +#define SO_SNDLOWAT 19 +#define SO_RCVTIMEO 20 +#define SO_SNDTIMEO 21 + +/* Security levels - as per NRL IPv6 - don't actually do anything */ +#define SO_SECURITY_AUTHENTICATION 22 +#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 +#define SO_SECURITY_ENCRYPTION_NETWORK 24 + +#define SO_BINDTODEVICE 25 + +/* Socket filtering */ +#define SO_ATTACH_FILTER 26 +#define SO_DETACH_FILTER 27 + +#ifdef __KERNEL__ +/* Socket types. */ +#define SOCK_STREAM 1 /* stream (connection) socket */ +#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ +#define SOCK_RAW 3 /* raw socket */ +#define SOCK_RDM 4 /* reliably-delivered message */ +#define SOCK_SEQPACKET 5 /* sequential packet socket */ +#define SOCK_PACKET 10 /* linux specific way of */ + /* getting packets at the dev */ + /* level. For writing rarp and */ + /* other similar things on the */ + /* user level. */ +#endif + +#endif /* _ASM_SOCKET_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/sockios.h linux-2.2.14-rmk-mercury-gcc3/include/asm/sockios.h --- linux-2.2.14-rmk-mercury/include/asm/sockios.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/sockios.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,12 @@ +#ifndef __ARCH_ARM_SOCKIOS_H +#define __ARCH_ARM_SOCKIOS_H + +/* Socket-level I/O control calls. */ +#define FIOSETOWN 0x8901 +#define SIOCSPGRP 0x8902 +#define FIOGETOWN 0x8903 +#define SIOCGPGRP 0x8904 +#define SIOCATMARK 0x8905 +#define SIOCGSTAMP 0x8906 /* Get stamp */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/softirq.h linux-2.2.14-rmk-mercury-gcc3/include/asm/softirq.h --- linux-2.2.14-rmk-mercury/include/asm/softirq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/softirq.h 2007-07-10 12:36:50.000000000 +0100 @@ -0,0 +1,71 @@ +#ifndef __ASM_SOFTIRQ_H +#define __ASM_SOFTIRQ_H + +#include +#include + +extern unsigned int local_bh_count[NR_CPUS]; +#define in_bh() (local_bh_count[smp_processor_id()] != 0) + +#define get_active_bhs() (bh_mask & bh_active) +#define clear_active_bhs(x) atomic_clear_mask((int)(x),&bh_active) + +extern inline void init_bh(int nr, void (*routine)(void)) +{ + bh_base[nr] = routine; + atomic_set(&bh_mask_count[nr], 0); + bh_mask |= 1 << nr; +} + +extern inline void remove_bh(int nr) +{ + bh_base[nr] = NULL; + bh_mask &= ~(1 << nr); +} + +extern inline void mark_bh(int nr) +{ + set_bit(nr, &bh_active); +} + +#ifdef __SMP__ +#error SMP not supported +#else + +extern inline void start_bh_atomic(void) +{ + local_bh_count[smp_processor_id()]++; + barrier(); +} + +extern inline void end_bh_atomic(void) +{ + barrier(); + local_bh_count[smp_processor_id()]--; +} + +/* These are for the irq's testing the lock */ +#define softirq_trylock(cpu) (in_bh() ? 0 : (local_bh_count[smp_processor_id()]=1)) +#define softirq_endlock(cpu) (local_bh_count[smp_processor_id()] = 0) +#define synchronize_bh() do { } while (0) + +#endif /* SMP */ + +/* + * These use a mask count to correctly handle + * nested disable/enable calls + */ +extern inline void disable_bh(int nr) +{ + bh_mask &= ~(1 << nr); + atomic_inc(&bh_mask_count[nr]); + synchronize_bh(); +} + +extern inline void enable_bh(int nr) +{ + if (atomic_dec_and_test(&bh_mask_count[nr])) + bh_mask |= 1 << nr; +} + +#endif /* __ASM_SOFTIRQ_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/spinlock.h linux-2.2.14-rmk-mercury-gcc3/include/asm/spinlock.h --- linux-2.2.14-rmk-mercury/include/asm/spinlock.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/spinlock.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,77 @@ +#ifndef __ASM_SPINLOCK_H +#define __ASM_SPINLOCK_H + +#ifndef __SMP__ + +/* + * To be safe, we assume the only compiler that can cope with + * empty initialisers is EGCS. + */ +#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 90)) +#define EMPTY_INIT_OK +#endif + +/* + * Your basic spinlocks, allowing only a single CPU anywhere + */ +#ifdef EMPTY_INIT_OK + typedef struct { } spinlock_t; +# define SPIN_LOCK_UNLOCKED (spinlock_t) { } +#else + typedef unsigned char spinlock_t; +# define SPIN_LOCK_UNLOCKED 0 +#endif + +#define spin_lock_init(lock) do { } while(0) +#define spin_lock(lock) do { } while(0) +#define spin_trylock(lock) do { } while(0) +#define spin_unlock_wait(lock) do { } while(0) +#define spin_unlock(lock) do { } while(0) +#define spin_lock_irq(lock) cli() +#define spin_unlock_irq(lock) sti() + +#define spin_lock_irqsave(lock, flags) \ + do { __save_flags_cli(flags); } while (0) +#define spin_unlock_irqrestore(lock, flags) \ + restore_flags(flags) + +/* + * Read-write spinlocks, allowing multiple readers + * but only one writer. + * + * NOTE! it is quite common to have readers in interrupts + * but no interrupt writers. For those circumstances we + * can "mix" irq-safe locks - any writer needs to get a + * irq-safe write-lock, but readers can get non-irqsafe + * read-locks. + */ +#ifdef EMPTY_INIT_OK + typedef struct { } rwlock_t; +# define RW_LOCK_UNLOCKED (rwlock_t) { } +#else + typedef unsigned char rwlock_t; +# define RW_LOCK_UNLOCKED 0 +#endif + +#define read_lock(lock) do { } while(0) +#define read_unlock(lock) do { } while(0) +#define write_lock(lock) do { } while(0) +#define write_unlock(lock) do { } while(0) +#define read_lock_irq(lock) cli() +#define read_unlock_irq(lock) sti() +#define write_lock_irq(lock) cli() +#define write_unlock_irq(lock) sti() + +#define read_lock_irqsave(lock, flags) \ + do { __save_flags_cli(flags); } while (0) +#define read_unlock_irqrestore(lock, flags) \ + restore_flags(flags) +#define write_lock_irqsave(lock, flags) \ + do { __save_flags_cli(flags); } while (0) +#define write_unlock_irqrestore(lock, flags) \ + restore_flags(flags) + +#else +#error ARM architecture does not support spin locks +#endif /* SMP */ +#endif /* __ASM_SPINLOCK_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/stat.h linux-2.2.14-rmk-mercury-gcc3/include/asm/stat.h --- linux-2.2.14-rmk-mercury/include/asm/stat.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/stat.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,41 @@ +#ifndef _ASMARM_STAT_H +#define _ASMARM_STAT_H + +struct __old_kernel_stat { + unsigned short st_dev; + unsigned short st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned short st_rdev; + unsigned long st_size; + unsigned long st_atime; + unsigned long st_mtime; + unsigned long st_ctime; +}; + +struct stat { + unsigned short st_dev; + unsigned short __pad1; + unsigned long st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned short st_rdev; + unsigned short __pad2; + unsigned long st_size; + unsigned long st_blksize; + unsigned long st_blocks; + unsigned long st_atime; + unsigned long __unused1; + unsigned long st_mtime; + unsigned long __unused2; + unsigned long st_ctime; + unsigned long __unused3; + unsigned long __unused4; + unsigned long __unused5; +}; + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/statfs.h linux-2.2.14-rmk-mercury-gcc3/include/asm/statfs.h --- linux-2.2.14-rmk-mercury/include/asm/statfs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/statfs.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,25 @@ +#ifndef _ASMARM_STATFS_H +#define _ASMARM_STATFS_H + +#ifndef __KERNEL_STRICT_NAMES + +#include + +typedef __kernel_fsid_t fsid_t; + +#endif + +struct statfs { + long f_type; + long f_bsize; + long f_blocks; + long f_bfree; + long f_bavail; + long f_files; + long f_ffree; + __kernel_fsid_t f_fsid; + long f_namelen; + long f_spare[6]; +}; + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/string.h linux-2.2.14-rmk-mercury-gcc3/include/asm/string.h --- linux-2.2.14-rmk-mercury/include/asm/string.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/string.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,37 @@ +#ifndef __ASM_ARM_STRING_H +#define __ASM_ARM_STRING_H + +/* + * inline versions, hmm... + */ + +#define __HAVE_ARCH_STRRCHR +extern char * strrchr(const char * s, int c); + +#define __HAVE_ARCH_STRCHR +extern char * strchr(const char * s, int c); + +#define __HAVE_ARCH_MEMCPY +#define __HAVE_ARCH_MEMMOVE +#define __HAVE_ARCH_MEMSET +#define __HAVE_ARCH_MEMCHR + +#define __HAVE_ARCH_MEMZERO + +extern void __memzero(void *ptr, __kernel_size_t n); + +#define memset(p,v,n) \ + ({ \ + if ((n) != 0) { \ + if (__builtin_constant_p((v)) && (v) == 0) \ + __memzero((p),(n)); \ + else \ + memset((p),(v),(n)); \ + } \ + (p); \ + }) + +#define memzero(p,n) ({ if ((n) != 0) __memzero((p),(n)); (p); }) + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm/system.h --- linux-2.2.14-rmk-mercury/include/asm/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/system.h 2007-07-10 12:36:50.000000000 +0100 @@ -0,0 +1,151 @@ +#ifndef __ASM_ARM_SYSTEM_H +#define __ASM_ARM_SYSTEM_H + +#include + +#ifdef __KERNEL__ + +#include + +#define __ebsa285_data __attribute__((__section__(".data.ebsa285"))) +#define __netwinder_data __attribute__((__section__(".data.netwinder"))) + +#ifdef CONFIG_TEXT_SECTIONS +#define __ebsa285_text __attribute__((__section__(".text.ebsa285"))) +#define __netwinder_text __attribute__((__section__(".text.netwinder"))) +#else +#define __ebsa285_text +#define __netwinder_text +#endif + +/* The type of machine we're running on */ +extern unsigned int __machine_arch_type; + +#define MACH_TYPE_EBSA110 0 +#define MACH_TYPE_RISCPC 1 +#define MACH_TYPE_NEXUSPCI 3 +#define MACH_TYPE_EBSA285 4 +#define MACH_TYPE_NETWINDER 5 +#define MACH_TYPE_CATS 6 +#define MACH_TYPE_TBOX 7 +#define MACH_TYPE_CO285 8 +#define MACH_TYPE_CLPS7212 9 +#define MACH_TYPE_ARCHIMEDES 10 +#define MACH_TYPE_A5K 11 + +/* + * Sort out a definition for machine_arch_type + * The rules are: + * 1. If one architecture is selected, then all machine_is_xxx() + * are constant. + * 2. If two or more architectures are selected, then the selected + * machine_is_xxx() are variable, and the unselected machine_is_xxx() + * are constant zero. + */ +#ifdef CONFIG_ARCH_EBSA110 +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_EBSA110 +# endif +# define machine_is_ebsa110() (machine_arch_type == MACH_TYPE_EBSA110) +#else +# define machine_is_ebsa110() (0) +#endif + +#ifdef CONFIG_ARCH_RPC +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_RISCPC +# endif +# define machine_is_riscpc() (machine_arch_type == MACH_TYPE_RISCPC) +#else +# define machine_is_riscpc() (0) +#endif + +#ifdef CONFIG_ARCH_EBSA285 +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_EBSA285 +# endif +# define machine_is_ebsa285() (machine_arch_type == MACH_TYPE_EBSA285) +#else +# define machine_is_ebsa285() (0) +#endif + +#ifdef CONFIG_ARCH_NETWINDER +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_NETWINDER +# endif +# define machine_is_netwinder() (machine_arch_type == MACH_TYPE_NETWINDER) +#else +# define machine_is_netwinder() (0) +#endif + +#ifdef CONFIG_CATS +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_CATS +# endif +# define machine_is_cats() (machine_arch_type == MACH_TYPE_CATS) +#else +# define machine_is_cats() (0) +#endif + +#ifdef CONFIG_ARCH_CO285 +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_CO285 +# endif +# define machine_is_co285() (machine_arch_type == MACH_TYPE_CO285) +#else +# define machine_is_co285() (0) +#endif + +#ifndef machine_arch_type +#define machine_arch_type __machine_arch_type +#endif + +#include + +#define xchg(ptr,x) \ + ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) + +#define tas(ptr) (xchg((ptr),1)) + +/* + * switch_to(prev, next) should switch from task `prev' to `next' + * `prev' will never be the same as `next'. + */ +#define switch_to(prev,next,last) do { last = processor._switch_to(prev,next); } while (0) + +extern void arm_malalignedptr(const char *, void *, volatile void *); +extern void arm_invalidptr(const char *, int); +extern asmlinkage void __backtrace(void); + +/* + * Include processor dependent parts + */ +#include +#include + +#define mb() __asm__ __volatile__ ("" : : : "memory") +#define rmb() mb() +#define wmb() mb() +#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/termbits.h linux-2.2.14-rmk-mercury-gcc3/include/asm/termbits.h --- linux-2.2.14-rmk-mercury/include/asm/termbits.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/termbits.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,172 @@ +#ifndef __ASM_ARM_TERMBITS_H +#define __ASM_ARM_TERMBITS_H + +#include + +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; + +#define NCCS 19 +struct termios { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ +}; + +/* c_cc characters */ +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VTIME 5 +#define VMIN 6 +#define VSWTC 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VEOL 11 +#define VREPRINT 12 +#define VDISCARD 13 +#define VWERASE 14 +#define VLNEXT 15 +#define VEOL2 16 + +/* c_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IUCLC 0001000 +#define IXON 0002000 +#define IXANY 0004000 +#define IXOFF 0010000 +#define IMAXBEL 0020000 + +/* c_oflag bits */ +#define OPOST 0000001 +#define OLCUC 0000002 +#define ONLCR 0000004 +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#define NLDLY 0000400 +#define NL0 0000000 +#define NL1 0000400 +#define CRDLY 0003000 +#define CR0 0000000 +#define CR1 0001000 +#define CR2 0002000 +#define CR3 0003000 +#define TABDLY 0014000 +#define TAB0 0000000 +#define TAB1 0004000 +#define TAB2 0010000 +#define TAB3 0014000 +#define XTABS 0014000 +#define BSDLY 0020000 +#define BS0 0000000 +#define BS1 0020000 +#define VTDLY 0040000 +#define VT0 0000000 +#define VT1 0040000 +#define FFDLY 0100000 +#define FF0 0000000 +#define FF1 0100000 + +/* c_cflag bit meaning */ +#define CBAUD 0010017 +#define B0 0000000 /* hang up */ +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 +#define EXTA B19200 +#define EXTB B38400 +#define CSIZE 0000060 +#define CS5 0000000 +#define CS6 0000020 +#define CS7 0000040 +#define CS8 0000060 +#define CSTOPB 0000100 +#define CREAD 0000200 +#define PARENB 0000400 +#define PARODD 0001000 +#define HUPCL 0002000 +#define CLOCAL 0004000 +#define CBAUDEX 0010000 +#define B57600 0010001 +#define B115200 0010002 +#define B230400 0010003 +#define B460800 0010004 +#define B500000 0010005 +#define B576000 0010006 +#define B921600 0010007 +#define B1000000 0010010 +#define B1152000 0010011 +#define B1500000 0010012 +#define B2000000 0010013 +#define B2500000 0010014 +#define B3000000 0010015 +#define B3500000 0010016 +#define B4000000 0010017 +#define CIBAUD 002003600000 /* input baud rate (not used) */ +#define CMSPAR 010000000000 /* mark or space (stick) parity */ +#define CRTSCTS 020000000000 /* flow control */ + +/* c_lflag bits */ +#define ISIG 0000001 +#define ICANON 0000002 +#define XCASE 0000004 +#define ECHO 0000010 +#define ECHOE 0000020 +#define ECHOK 0000040 +#define ECHONL 0000100 +#define NOFLSH 0000200 +#define TOSTOP 0000400 +#define ECHOCTL 0001000 +#define ECHOPRT 0002000 +#define ECHOKE 0004000 +#define FLUSHO 0010000 +#define PENDIN 0040000 +#define IEXTEN 0100000 + +/* tcflow() and TCXONC use these */ +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +/* tcflush() and TCFLSH use these */ +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +/* tcsetattr uses these */ +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 + +#endif /* __ASM_ARM_TERMBITS_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/termios.h linux-2.2.14-rmk-mercury-gcc3/include/asm/termios.h --- linux-2.2.14-rmk-mercury/include/asm/termios.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/termios.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,104 @@ +#ifndef __ASM_ARM_TERMIOS_H +#define __ASM_ARM_TERMIOS_H + +#include +#include + +struct winsize { + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; + unsigned short ws_ypixel; +}; + +#define NCC 8 +struct termio { + unsigned short c_iflag; /* input mode flags */ + unsigned short c_oflag; /* output mode flags */ + unsigned short c_cflag; /* control mode flags */ + unsigned short c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +#ifdef __KERNEL__ +/* intr=^C quit=^| erase=del kill=^U + eof=^D vtime=\0 vmin=\1 sxtc=\0 + start=^Q stop=^S susp=^Z eol=\0 + reprint=^R discard=^U werase=^W lnext=^V + eol2=\0 +*/ +#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" +#endif + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Reserved for Mobitex module */ +#define N_R3964 9 /* Reserved for Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Reserved for Profibus */ +#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */ +#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ + +#ifdef __KERNEL__ + +#include + +/* + * Translate a "termio" structure into a "termios". Ugh. + */ +#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ + unsigned short __tmp; \ + get_user(__tmp,&(termio)->x); \ + *(unsigned short *) &(termios)->x = __tmp; \ +} + +#define user_termio_to_kernel_termios(termios, termio) \ +({ \ + SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ + SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ + SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ + SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ + copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ +}) + +/* + * Translate a "termios" structure into a "termio". Ugh. + */ +#define kernel_termios_to_user_termio(termio, termios) \ +({ \ + put_user((termios)->c_iflag, &(termio)->c_iflag); \ + put_user((termios)->c_oflag, &(termio)->c_oflag); \ + put_user((termios)->c_cflag, &(termio)->c_cflag); \ + put_user((termios)->c_lflag, &(termio)->c_lflag); \ + put_user((termios)->c_line, &(termio)->c_line); \ + copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ +}) + +#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) +#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) + +#endif /* __KERNEL__ */ + +#endif /* __ASM_ARM_TERMIOS_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/therm.h linux-2.2.14-rmk-mercury-gcc3/include/asm/therm.h --- linux-2.2.14-rmk-mercury/include/asm/therm.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/therm.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,28 @@ +/* + * linux/include/asm-arm/therm.h: Definitions for Dallas Semiconductor + * DS1620 thermometer driver (as used in the Rebel.com NetWinder) + */ +#ifndef __ASM_THERM_H +#define __ASM_THERM_H + +/* ioctl numbers for /dev/therm */ +#define CMD_SET_THERMOSTATE 0x53 +#define CMD_GET_THERMOSTATE 0x54 +#define CMD_GET_STATUS 0x56 +#define CMD_GET_TEMPERATURE 0x57 +#define CMD_SET_THERMOSTATE2 0x58 +#define CMD_GET_THERMOSTATE2 0x59 +#define CMD_GET_TEMPERATURE2 0x5a +#define CMD_GET_FAN 0x5b +#define CMD_SET_FAN 0x5c + +#define FAN_OFF 0 +#define FAN_ON 1 +#define FAN_ALWAYS_ON 2 + +struct therm { + int hi; + int lo; +}; + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm/timex.h --- linux-2.2.14-rmk-mercury/include/asm/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/timex.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,22 @@ +/* + * linux/include/asm-arm/timex.h + * + * Architecture Specific TIME specifications + * + * Copyright (C) 1997,1998 Russell King + */ +#ifndef _ASMARM_TIMEX_H +#define _ASMARM_TIMEX_H + +#include + +typedef unsigned long cycles_t; + +extern cycles_t cacheflush_time; + +static inline cycles_t get_cycles (void) +{ + return 0; +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/types.h linux-2.2.14-rmk-mercury-gcc3/include/asm/types.h --- linux-2.2.14-rmk-mercury/include/asm/types.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/types.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,47 @@ +#ifndef __ASM_ARM_TYPES_H +#define __ASM_ARM_TYPES_H + +typedef unsigned short umode_t; + +/* + * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the + * header files exported to user space + */ + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +typedef __signed__ long long __s64; +typedef unsigned long long __u64; +#endif + +/* + * These aren't exported outside the kernel to avoid name space clashes + */ +#ifdef __KERNEL__ + +typedef signed char s8; +typedef unsigned char u8; + +typedef signed short s16; +typedef unsigned short u16; + +typedef signed int s32; +typedef unsigned int u32; + +typedef signed long long s64; +typedef unsigned long long u64; + +#define BITS_PER_LONG 32 + +#endif /* __KERNEL__ */ + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm/uaccess.h linux-2.2.14-rmk-mercury-gcc3/include/asm/uaccess.h --- linux-2.2.14-rmk-mercury/include/asm/uaccess.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/uaccess.h 2007-07-10 12:36:51.000000000 +0100 @@ -0,0 +1,199 @@ +#ifndef _ASMARM_UACCESS_H +#define _ASMARM_UACCESS_H + +/* + * User space memory access functions + */ +#include + +#define VERIFY_READ 0 +#define VERIFY_WRITE 1 + +/* + * The exception table consists of pairs of addresses: the first is the + * address of an instruction that is allowed to fault, and the second is + * the address at which the program should continue. No registers are + * modified, so it is entirely up to the continuation code to figure out + * what to do. + * + * All the routines below use bits of fixup code that are out of line + * with the main instruction path. This means when everything is well, + * we don't even have to jump over them. Further, they do not intrude + * on our cache or tlb entries. + */ + +struct exception_table_entry +{ + unsigned long insn, fixup; +}; + +/* Returns 0 if exception not found and fixup otherwise. */ +extern unsigned long search_exception_table(unsigned long); + +#include + +extern inline int verify_area(int type, const void * addr, unsigned long size) +{ + return access_ok(type,addr,size) ? 0 : -EFAULT; +} + +/* + * Single-value transfer routines. They automatically use the right + * size if we just have the right pointer type. + * + * The "__xxx" versions of the user access functions do not verify the + * address space - it must have been done previously with a separate + * "access_ok()" call. + * + * The "xxx_ret" versions return constant specified in the third + * argument if something bad happens. + */ +#define get_user(x,p) __get_user_check((x),(p),sizeof(*(p))) +#define __get_user(x,p) __get_user_nocheck((x),(p),sizeof(*(p))) +#define get_user_ret(x,p,r) ({ if (get_user(x,p)) return r; }) +#define __get_user_ret(x,p,r) ({ if (__get_user(x,p)) return r; }) + +#define put_user(x,p) __put_user_check((__typeof(*(p)))(x),(p),sizeof(*(p))) +#define __put_user(x,p) __put_user_nocheck((__typeof(*(p)))(x),(p),sizeof(*(p))) +#define put_user_ret(x,p,r) ({ if (put_user(x,p)) return r; }) +#define __put_user_ret(x,p,r) ({ if (__put_user(x,p)) return r; }) + +static __inline__ unsigned long copy_from_user(void *to, const void *from, unsigned long n) +{ + char *end = (char *)to + n; + if (access_ok(VERIFY_READ, from, n)) { + __do_copy_from_user(to, from, n); + if (n) memset(end - n, 0, n); + } + return n; +} + +static __inline__ unsigned long __copy_from_user(void *to, const void *from, unsigned long n) +{ + __do_copy_from_user(to, from, n); + return n; +} + +#define copy_from_user_ret(t,f,n,r) \ + ({ if (copy_from_user(t,f,n)) return r; }) + +static __inline__ unsigned long copy_to_user(void *to, const void *from, unsigned long n) +{ + if (access_ok(VERIFY_WRITE, to, n)) + __do_copy_to_user(to, from, n); + return n; +} + +static __inline__ unsigned long __copy_to_user(void *to, const void *from, unsigned long n) +{ + __do_copy_to_user(to, from, n); + return n; +} + +#define copy_to_user_ret(t,f,n,r) \ + ({ if (copy_to_user(t,f,n)) return r; }) + +static __inline__ unsigned long clear_user (void *to, unsigned long n) +{ + if (access_ok(VERIFY_WRITE, to, n)) + __do_clear_user(to, n); + return n; +} + +static __inline__ unsigned long __clear_user (void *to, unsigned long n) +{ + __do_clear_user(to, n); + return n; +} + +static __inline__ long strncpy_from_user (char *dst, const char *src, long count) +{ + long res = -EFAULT; + if (access_ok(VERIFY_READ, src, 1)) + __do_strncpy_from_user(dst, src, count, res); + return res; +} + +static __inline__ long __strncpy_from_user (char *dst, const char *src, long count) +{ + long res; + __do_strncpy_from_user(dst, src, count, res); + return res; +} + +#define strlen_user(s) strnlen_user(s, ~0UL >> 1) + +extern __inline__ long strnlen_user (const char *s, long n) +{ + unsigned long res = 0; + + if (__addr_ok(s)) + __do_strnlen_user (s, n, res); + + return res; +} + +/* + * These are the work horses of the get/put_user functions + */ +#define __get_user_check(x,ptr,size) \ +({ \ + long __gu_err = -EFAULT, __gu_val = 0; \ + const __typeof__(*(ptr)) *__gu_addr = (ptr); \ + if (access_ok(VERIFY_READ,__gu_addr,size)) \ + __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ + (x) = (__typeof__(*(ptr)))__gu_val; \ + __gu_err; \ +}) + +#define __get_user_nocheck(x,ptr,size) \ +({ \ + long __gu_err = 0, __gu_val = 0; \ + __get_user_size(__gu_val,(ptr),(size),__gu_err); \ + (x) = (__typeof__(*(ptr)))__gu_val; \ + __gu_err; \ +}) + +#define __put_user_check(x,ptr,size) \ +({ \ + long __pu_err = -EFAULT; \ + __typeof__(*(ptr)) *__pu_addr = (ptr); \ + if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ + __put_user_size((x),__pu_addr,(size),__pu_err); \ + __pu_err; \ +}) + +#define __put_user_nocheck(x,ptr,size) \ +({ \ + long __pu_err = 0; \ + __put_user_size((x),(ptr),(size),__pu_err); \ + __pu_err; \ +}) + +extern long __get_user_bad(void); + +#define __get_user_size(x,ptr,size,retval) \ +do { \ + retval = 0; \ + switch (size) { \ + case 1: __get_user_asm_byte(x,ptr,retval); break; \ + case 2: __get_user_asm_half(x,ptr,retval); break; \ + case 4: __get_user_asm_word(x,ptr,retval); break; \ + default: (x) = __get_user_bad(); \ + } \ +} while (0) + +extern long __put_user_bad(void); + +#define __put_user_size(x,ptr,size,retval) \ +do { \ + retval = 0; \ + switch (size) { \ + case 1: __put_user_asm_byte(x,ptr,retval); break; \ + case 2: __put_user_asm_half(x,ptr,retval); break; \ + case 4: __put_user_asm_word(x,ptr,retval); break; \ + default: __put_user_bad(); \ + } \ +} while (0) + +#endif /* _ASMARM_UACCESS_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/ucontext.h linux-2.2.14-rmk-mercury-gcc3/include/asm/ucontext.h --- linux-2.2.14-rmk-mercury/include/asm/ucontext.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/ucontext.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,12 @@ +#ifndef _ASMARM_UCONTEXT_H +#define _ASMARM_UCONTEXT_H + +struct ucontext { + unsigned long uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + struct sigcontext uc_mcontext; + sigset_t uc_sigmask; /* mask last for extensibility */ +}; + +#endif /* !_ASMARM_UCONTEXT_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/unaligned.h linux-2.2.14-rmk-mercury-gcc3/include/asm/unaligned.h --- linux-2.2.14-rmk-mercury/include/asm/unaligned.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/unaligned.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,59 @@ +#ifndef __ARM_UNALIGNED_H +#define __ARM_UNALIGNED_H + +#define get_unaligned(ptr) \ + ((__typeof__(*(ptr)))__get_unaligned((ptr), sizeof(*(ptr)))) + +#define put_unaligned(val, ptr) \ + __put_unaligned((unsigned long)(val), (ptr), sizeof(*(ptr))) + +extern void bad_unaligned_access_length (void); + +extern inline unsigned long __get_unaligned(const void *ptr, size_t size) +{ + unsigned long val; + switch (size) { + case 1: + val = *(const unsigned char *)ptr; + break; + + case 2: + val = ((const unsigned char *)ptr)[0] | (((const unsigned char *)ptr)[1] << 8); + break; + + case 4: + val = ((const unsigned char *)ptr)[0] | (((const unsigned char *)ptr)[1] << 8) | + (((const unsigned char *)ptr)[2]) << 16 | (((const unsigned char *)ptr)[3] << 24); + break; + + default: + bad_unaligned_access_length (); + } + return val; +} + +extern inline void __put_unaligned(unsigned long val, void *ptr, size_t size) +{ + switch (size) { + case 1: + *(unsigned char *)ptr = val; + break; + + case 2: + ((unsigned char *)ptr)[0] = val; + ((unsigned char *)ptr)[1] = val >> 8; + break; + + case 4: + ((unsigned char *)ptr)[0] = val; + ((unsigned char *)ptr)[1] = val >> 8; + ((unsigned char *)ptr)[2] = val >> 16; + ((unsigned char *)ptr)[3] = val >> 24; + break; + + default: + bad_unaligned_access_length (); + } +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/unistd.h linux-2.2.14-rmk-mercury-gcc3/include/asm/unistd.h --- linux-2.2.14-rmk-mercury/include/asm/unistd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/unistd.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,407 @@ +#ifndef __ASM_ARM_UNISTD_H +#define __ASM_ARM_UNISTD_H + +#define __NR_SYSCALL_BASE 0x900000 + +/* + * This file contains the system call numbers. + */ + +#define __NR_setup (__NR_SYSCALL_BASE+ 0) /* used only by init, to get system going */ +#define __NR_exit (__NR_SYSCALL_BASE+ 1) +#define __NR_fork (__NR_SYSCALL_BASE+ 2) +#define __NR_read (__NR_SYSCALL_BASE+ 3) +#define __NR_write (__NR_SYSCALL_BASE+ 4) +#define __NR_open (__NR_SYSCALL_BASE+ 5) +#define __NR_close (__NR_SYSCALL_BASE+ 6) +#define __NR_waitpid (__NR_SYSCALL_BASE+ 7) +#define __NR_creat (__NR_SYSCALL_BASE+ 8) +#define __NR_link (__NR_SYSCALL_BASE+ 9) +#define __NR_unlink (__NR_SYSCALL_BASE+ 10) +#define __NR_execve (__NR_SYSCALL_BASE+ 11) +#define __NR_chdir (__NR_SYSCALL_BASE+ 12) +#define __NR_time (__NR_SYSCALL_BASE+ 13) +#define __NR_mknod (__NR_SYSCALL_BASE+ 14) +#define __NR_chmod (__NR_SYSCALL_BASE+ 15) +#define __NR_lchown (__NR_SYSCALL_BASE+ 16) +#define __NR_break (__NR_SYSCALL_BASE+ 17) +#define __NR_oldstat (__NR_SYSCALL_BASE+ 18) +#define __NR_lseek (__NR_SYSCALL_BASE+ 19) +#define __NR_getpid (__NR_SYSCALL_BASE+ 20) +#define __NR_mount (__NR_SYSCALL_BASE+ 21) +#define __NR_umount (__NR_SYSCALL_BASE+ 22) +#define __NR_setuid (__NR_SYSCALL_BASE+ 23) +#define __NR_getuid (__NR_SYSCALL_BASE+ 24) +#define __NR_stime (__NR_SYSCALL_BASE+ 25) +#define __NR_ptrace (__NR_SYSCALL_BASE+ 26) +#define __NR_alarm (__NR_SYSCALL_BASE+ 27) +#define __NR_oldfstat (__NR_SYSCALL_BASE+ 28) +#define __NR_pause (__NR_SYSCALL_BASE+ 29) +#define __NR_utime (__NR_SYSCALL_BASE+ 30) +#define __NR_stty (__NR_SYSCALL_BASE+ 31) +#define __NR_gtty (__NR_SYSCALL_BASE+ 32) +#define __NR_access (__NR_SYSCALL_BASE+ 33) +#define __NR_nice (__NR_SYSCALL_BASE+ 34) +#define __NR_ftime (__NR_SYSCALL_BASE+ 35) +#define __NR_sync (__NR_SYSCALL_BASE+ 36) +#define __NR_kill (__NR_SYSCALL_BASE+ 37) +#define __NR_rename (__NR_SYSCALL_BASE+ 38) +#define __NR_mkdir (__NR_SYSCALL_BASE+ 39) +#define __NR_rmdir (__NR_SYSCALL_BASE+ 40) +#define __NR_dup (__NR_SYSCALL_BASE+ 41) +#define __NR_pipe (__NR_SYSCALL_BASE+ 42) +#define __NR_times (__NR_SYSCALL_BASE+ 43) +#define __NR_prof (__NR_SYSCALL_BASE+ 44) +#define __NR_brk (__NR_SYSCALL_BASE+ 45) +#define __NR_setgid (__NR_SYSCALL_BASE+ 46) +#define __NR_getgid (__NR_SYSCALL_BASE+ 47) +#define __NR_signal (__NR_SYSCALL_BASE+ 48) +#define __NR_geteuid (__NR_SYSCALL_BASE+ 49) +#define __NR_getegid (__NR_SYSCALL_BASE+ 50) +#define __NR_acct (__NR_SYSCALL_BASE+ 51) +#define __NR_umount2 (__NR_SYSCALL_BASE+ 52) +#define __NR_lock (__NR_SYSCALL_BASE+ 53) +#define __NR_ioctl (__NR_SYSCALL_BASE+ 54) +#define __NR_fcntl (__NR_SYSCALL_BASE+ 55) +#define __NR_mpx (__NR_SYSCALL_BASE+ 56) +#define __NR_setpgid (__NR_SYSCALL_BASE+ 57) +#define __NR_ulimit (__NR_SYSCALL_BASE+ 58) +#define __NR_oldolduname (__NR_SYSCALL_BASE+ 59) +#define __NR_umask (__NR_SYSCALL_BASE+ 60) +#define __NR_chroot (__NR_SYSCALL_BASE+ 61) +#define __NR_ustat (__NR_SYSCALL_BASE+ 62) +#define __NR_dup2 (__NR_SYSCALL_BASE+ 63) +#define __NR_getppid (__NR_SYSCALL_BASE+ 64) +#define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) +#define __NR_setsid (__NR_SYSCALL_BASE+ 66) +#define __NR_sigaction (__NR_SYSCALL_BASE+ 67) +#define __NR_sgetmask (__NR_SYSCALL_BASE+ 68) +#define __NR_ssetmask (__NR_SYSCALL_BASE+ 69) +#define __NR_setreuid (__NR_SYSCALL_BASE+ 70) +#define __NR_setregid (__NR_SYSCALL_BASE+ 71) +#define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) +#define __NR_sigpending (__NR_SYSCALL_BASE+ 73) +#define __NR_sethostname (__NR_SYSCALL_BASE+ 74) +#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) +#define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) +#define __NR_getrusage (__NR_SYSCALL_BASE+ 77) +#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) +#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) +#define __NR_getgroups (__NR_SYSCALL_BASE+ 80) +#define __NR_setgroups (__NR_SYSCALL_BASE+ 81) +#define __NR_select (__NR_SYSCALL_BASE+ 82) +#define __NR_symlink (__NR_SYSCALL_BASE+ 83) +#define __NR_oldlstat (__NR_SYSCALL_BASE+ 84) +#define __NR_readlink (__NR_SYSCALL_BASE+ 85) +#define __NR_uselib (__NR_SYSCALL_BASE+ 86) +#define __NR_swapon (__NR_SYSCALL_BASE+ 87) +#define __NR_reboot (__NR_SYSCALL_BASE+ 88) +#define __NR_readdir (__NR_SYSCALL_BASE+ 89) +#define __NR_mmap (__NR_SYSCALL_BASE+ 90) +#define __NR_munmap (__NR_SYSCALL_BASE+ 91) +#define __NR_truncate (__NR_SYSCALL_BASE+ 92) +#define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) +#define __NR_fchmod (__NR_SYSCALL_BASE+ 94) +#define __NR_fchown (__NR_SYSCALL_BASE+ 95) +#define __NR_getpriority (__NR_SYSCALL_BASE+ 96) +#define __NR_setpriority (__NR_SYSCALL_BASE+ 97) +#define __NR_profil (__NR_SYSCALL_BASE+ 98) +#define __NR_statfs (__NR_SYSCALL_BASE+ 99) +#define __NR_fstatfs (__NR_SYSCALL_BASE+100) +#define __NR_ioperm (__NR_SYSCALL_BASE+101) +#define __NR_socketcall (__NR_SYSCALL_BASE+102) +#define __NR_syslog (__NR_SYSCALL_BASE+103) +#define __NR_setitimer (__NR_SYSCALL_BASE+104) +#define __NR_getitimer (__NR_SYSCALL_BASE+105) +#define __NR_stat (__NR_SYSCALL_BASE+106) +#define __NR_lstat (__NR_SYSCALL_BASE+107) +#define __NR_fstat (__NR_SYSCALL_BASE+108) +#define __NR_olduname (__NR_SYSCALL_BASE+109) +#define __NR_iopl (__NR_SYSCALL_BASE+110) +#define __NR_vhangup (__NR_SYSCALL_BASE+111) +#define __NR_idle (__NR_SYSCALL_BASE+112) +#define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ +#define __NR_wait4 (__NR_SYSCALL_BASE+114) +#define __NR_swapoff (__NR_SYSCALL_BASE+115) +#define __NR_sysinfo (__NR_SYSCALL_BASE+116) +#define __NR_ipc (__NR_SYSCALL_BASE+117) +#define __NR_fsync (__NR_SYSCALL_BASE+118) +#define __NR_sigreturn (__NR_SYSCALL_BASE+119) +#define __NR_clone (__NR_SYSCALL_BASE+120) +#define __NR_setdomainname (__NR_SYSCALL_BASE+121) +#define __NR_uname (__NR_SYSCALL_BASE+122) +#define __NR_modify_ldt (__NR_SYSCALL_BASE+123) +#define __NR_adjtimex (__NR_SYSCALL_BASE+124) +#define __NR_mprotect (__NR_SYSCALL_BASE+125) +#define __NR_sigprocmask (__NR_SYSCALL_BASE+126) +#define __NR_create_module (__NR_SYSCALL_BASE+127) +#define __NR_init_module (__NR_SYSCALL_BASE+128) +#define __NR_delete_module (__NR_SYSCALL_BASE+129) +#define __NR_get_kernel_syms (__NR_SYSCALL_BASE+130) +#define __NR_quotactl (__NR_SYSCALL_BASE+131) +#define __NR_getpgid (__NR_SYSCALL_BASE+132) +#define __NR_fchdir (__NR_SYSCALL_BASE+133) +#define __NR_bdflush (__NR_SYSCALL_BASE+134) +#define __NR_sysfs (__NR_SYSCALL_BASE+135) +#define __NR_personality (__NR_SYSCALL_BASE+136) +#define __NR_afs_syscall (__NR_SYSCALL_BASE+137) /* Syscall for Andrew File System */ +#define __NR_setfsuid (__NR_SYSCALL_BASE+138) +#define __NR_setfsgid (__NR_SYSCALL_BASE+139) +#define __NR__llseek (__NR_SYSCALL_BASE+140) +#define __NR_getdents (__NR_SYSCALL_BASE+141) +#define __NR__newselect (__NR_SYSCALL_BASE+142) +#define __NR_flock (__NR_SYSCALL_BASE+143) +#define __NR_msync (__NR_SYSCALL_BASE+144) +#define __NR_readv (__NR_SYSCALL_BASE+145) +#define __NR_writev (__NR_SYSCALL_BASE+146) +#define __NR_getsid (__NR_SYSCALL_BASE+147) +#define __NR_fdatasync (__NR_SYSCALL_BASE+148) +#define __NR__sysctl (__NR_SYSCALL_BASE+149) +#define __NR_mlock (__NR_SYSCALL_BASE+150) +#define __NR_munlock (__NR_SYSCALL_BASE+151) +#define __NR_mlockall (__NR_SYSCALL_BASE+152) +#define __NR_munlockall (__NR_SYSCALL_BASE+153) +#define __NR_sched_setparam (__NR_SYSCALL_BASE+154) +#define __NR_sched_getparam (__NR_SYSCALL_BASE+155) +#define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) +#define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) +#define __NR_sched_yield (__NR_SYSCALL_BASE+158) +#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) +#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) +#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) +#define __NR_nanosleep (__NR_SYSCALL_BASE+162) +#define __NR_mremap (__NR_SYSCALL_BASE+163) +#define __NR_setresuid (__NR_SYSCALL_BASE+164) +#define __NR_getresuid (__NR_SYSCALL_BASE+165) +#define __NR_vm86 (__NR_SYSCALL_BASE+166) +#define __NR_query_module (__NR_SYSCALL_BASE+167) +#define __NR_poll (__NR_SYSCALL_BASE+168) +#define __NR_nfsservctl (__NR_SYSCALL_BASE+169) +#define __NR_setresgid (__NR_SYSCALL_BASE+170) +#define __NR_getresgid (__NR_SYSCALL_BASE+171) +#define __NR_prctl (__NR_SYSCALL_BASE+172) +#define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) +#define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) +#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) +#define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) +#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) +#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) +#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) +#define __NR_pread (__NR_SYSCALL_BASE+180) +#define __NR_pwrite (__NR_SYSCALL_BASE+181) +#define __NR_chown (__NR_SYSCALL_BASE+182) +#define __NR_getcwd (__NR_SYSCALL_BASE+183) +#define __NR_capget (__NR_SYSCALL_BASE+184) +#define __NR_capset (__NR_SYSCALL_BASE+185) +#define __NR_sigaltstack (__NR_SYSCALL_BASE+186) +#define __NR_sendfile (__NR_SYSCALL_BASE+187) + /* 188 reserved */ + /* 189 reserved */ +#define __NR_vfork (__NR_SYSCALL_BASE+190) + +#define __sys2(x) #x +#define __sys1(x) __sys2(x) + +#ifndef __syscall +#define __syscall(name) "swi\t" __sys1(__NR_##name) "\n\t" +#endif + +#define __syscall_return(type, res) \ +do { \ + if ((unsigned long)(res) >= (unsigned long)(-125)) { \ + errno = -(res); \ + res = -1; \ + } \ + return (type) (res); \ +} while (0) + +#define _syscall0(type,name) \ +type name(void) { \ + long __res; \ + __asm__ __volatile__ ( \ + __syscall(name) \ + "mov %0,r0" \ + :"=r" (__res) : : "r0","lr"); \ + __syscall_return(type,__res); \ +} + +#define _syscall1(type,name,type1,arg1) \ +type name(type1 arg1) { \ + long __res; \ + __asm__ __volatile__ ( \ + "mov\tr0,%1\n\t" \ + __syscall(name) \ + "mov %0,r0" \ + : "=r" (__res) \ + : "r" ((long)(arg1)) \ + : "r0","lr"); \ + __syscall_return(type,__res); \ +} + +#define _syscall2(type,name,type1,arg1,type2,arg2) \ +type name(type1 arg1,type2 arg2) { \ + long __res; \ + __asm__ __volatile__ ( \ + "mov\tr0,%1\n\t" \ + "mov\tr1,%2\n\t" \ + __syscall(name) \ + "mov\t%0,r0" \ + : "=r" (__res) \ + : "r" ((long)(arg1)),"r" ((long)(arg2)) \ + : "r0","r1","lr"); \ + __syscall_return(type,__res); \ +} + + +#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ +type name(type1 arg1,type2 arg2,type3 arg3) { \ + long __res; \ + __asm__ __volatile__ ( \ + "mov\tr0,%1\n\t" \ + "mov\tr1,%2\n\t" \ + "mov\tr2,%3\n\t" \ + __syscall(name) \ + "mov\t%0,r0" \ + : "=r" (__res) \ + : "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)) \ + : "r0","r1","r2","lr"); \ + __syscall_return(type,__res); \ +} + + +#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ +type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ + long __res; \ + __asm__ __volatile__ ( \ + "mov\tr0,%1\n\t" \ + "mov\tr1,%2\n\t" \ + "mov\tr2,%3\n\t" \ + "mov\tr3,%4\n\t" \ + __syscall(name) \ + "mov\t%0,r0" \ + : "=r" (__res) \ + : "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)),"r" ((long)(arg4)) \ + : "r0","r1","r2","r3","lr"); \ + __syscall_return(type,__res); \ +} + + +#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ +type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \ + long __res; \ + __asm__ __volatile__ ( \ + "mov\tr0,%1\n\t" \ + "mov\tr1,%2\n\t" \ + "mov\tr2,%3\n\t" \ + "mov\tr3,%4\n\t" \ + "mov\tr4,%5\n\t" \ + __syscall(name) \ + "mov\t%0,r0" \ + : "=r" (__res) \ + : "r" ((long)(arg1)),"r" ((long)(arg2)),"r" ((long)(arg3)),"r" ((long)(arg4)), \ + "r" ((long)(arg5)) \ + : "r0","r1","r2","r3","r4","lr"); \ + __syscall_return(type,__res); \ +} + +#ifdef __KERNEL_SYSCALLS__ + +static inline int idle(void) +{ + extern int sys_idle(void); + return sys_idle(); +} + +static inline int pause(void) +{ + extern int sys_pause(void); + return sys_pause(); +} + +static inline int sync(void) +{ + extern int sys_sync(void); + return sys_sync(); +} + +static inline pid_t setsid(void) +{ + extern int sys_setsid(void); + return sys_setsid(); +} + +static inline int write(int fd, const char *buf, off_t count) +{ + extern int sys_write(int, const char *, int); + return sys_write(fd, buf, count); +} + +static inline int read(int fd, char *buf, off_t count) +{ + extern int sys_read(int, char *, int); + return sys_read(fd, buf, count); +} + +static inline off_t lseek(int fd, off_t offset, int count) +{ + extern off_t sys_lseek(int, off_t, int); + return sys_lseek(fd, offset, count); +} + +static inline int dup(int fd) +{ + extern int sys_dup(int); + return sys_dup(fd); +} + +static inline int open(const char *file, int flag, int mode) +{ + extern int sys_open(const char *, int, int); + return sys_open(file, flag, mode); +} + +static inline int close(int fd) +{ + return sys_close(fd); +} + +static inline int _exit(int exitcode) +{ + extern int sys_exit(int) __attribute__((noreturn)); + return sys_exit(exitcode); +} + +static inline pid_t waitpid(pid_t pid, int *wait_stat, int options) +{ + extern int sys_wait4(int, int *, int, struct rusage *); + return sys_wait4((int)pid, wait_stat, options, NULL); +} + +static inline int delete_module(const char *name) +{ + extern int sys_delete_module(const char *name); + return sys_delete_module(name); +} + +static inline pid_t wait(int * wait_stat) +{ + extern int sys_wait4(int, int *, int, struct rusage *); + return sys_wait4(-1, wait_stat, 0, NULL); +} + +/* + * The following two can't be eliminated yet - they rely on + * specific conditions. + */ +static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp); + +/* + * Create a new kernel thread + */ +extern pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); + +#endif +#endif /* __ASM_ARM_UNISTD_H */ + + + diff -Nru linux-2.2.14-rmk-mercury/include/asm/user.h linux-2.2.14-rmk-mercury-gcc3/include/asm/user.h --- linux-2.2.14-rmk-mercury/include/asm/user.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/user.h 2007-07-10 12:30:01.000000000 +0100 @@ -0,0 +1,82 @@ +#ifndef _ARM_USER_H +#define _ARM_USER_H + +#include +#include +/* Core file format: The core file is written in such a way that gdb + can understand it and provide useful information to the user (under + linux we use the 'trad-core' bfd). There are quite a number of + obstacles to being able to view the contents of the floating point + registers, and until these are solved you will not be able to view the + contents of them. Actually, you can read in the core file and look at + the contents of the user struct to find out what the floating point + registers contain. + The actual file contents are as follows: + UPAGE: 1 page consisting of a user struct that tells gdb what is present + in the file. Directly after this is a copy of the task_struct, which + is currently not used by gdb, but it may come in useful at some point. + All of the registers are stored as part of the upage. The upage should + always be only one page. + DATA: The data area is stored. We use current->end_text to + current->brk to pick up all of the user variables, plus any memory + that may have been malloced. No attempt is made to determine if a page + is demand-zero or if a page is totally unused, we just cover the entire + range. All of the addresses are rounded in such a way that an integral + number of pages is written. + STACK: We need the stack information in order to get a meaningful + backtrace. We need to write the data from (esp) to + current->start_stack, so we round each of these off in order to be able + to write an integer number of pages. + The minimum core file size is 3 pages, or 12288 bytes. +*/ + +struct user_fp { + struct fp_reg { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; +}; + +/* When the kernel dumps core, it starts by dumping the user struct - + this will be used by gdb to figure out where the data and stack segments + are within the file, and what virtual addresses to use. */ +struct user{ +/* We start with the registers, to mimic the way that "memory" is returned + from the ptrace(3,...) function. */ + struct pt_regs regs; /* Where the registers are actually stored */ +/* ptrace does not yet supply these. Someday.... */ + int u_fpvalid; /* True if math co-processor being used. */ + /* for this mess. Not yet used. */ +/* The rest of this junk is to help gdb figure out what goes where */ + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack area. + This is actually the bottom of the stack, + the top of the stack is always found in the + esp register. */ + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + struct pt_regs * u_ar0; /* Used by gdb to help find the values for */ + /* the registers. */ + unsigned long magic; /* To uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ + int u_debugreg[8]; + struct user_fp u_fp; /* FP state */ + struct user_fp_struct * u_fp0;/* Used by gdb to help find the values for */ + /* the FP registers. */ +}; +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _ARM_USER_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm/vga.h linux-2.2.14-rmk-mercury-gcc3/include/asm/vga.h --- linux-2.2.14-rmk-mercury/include/asm/vga.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/vga.h 2007-07-10 12:29:00.000000000 +0100 @@ -0,0 +1,12 @@ +#ifndef ASMARM_VGA_H +#define ASMARM_VGA_H + +#include +#include + +#define VGA_MAP_MEM(x) (PCIMEM_BASE + (x)) + +#define vga_readb(x) (*(x)) +#define vga_writeb(x,y) (*(y) = (x)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm/vt.h linux-2.2.14-rmk-mercury-gcc3/include/asm/vt.h --- linux-2.2.14-rmk-mercury/include/asm/vt.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm/vt.h 2000-03-10 15:46:49.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef _ASMARM_VT_H +#define _ASMARM_VT_H + +#define VT_GETSCRINFO 0x56FD /* get screen info */ +#define VT_GETPALETTE 0x56FE /* get palette */ +#define VT_SETPALETTE 0x56FF /* set palette */ + +#endif /* _ASMARM_VT_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/a.out.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/a.out.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/a.out.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/a.out.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/clps7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/clps7212.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/clps7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/clps7212.h 2000-03-28 13:53:14.000000000 +0100 @@ -0,0 +1,254 @@ +/* + * linux/include/asm-arm/arch-clps7212/clps7212.h + * + * CLPS7212 extensions added by Hugo Fiennes, + * CLPS7110 version written 1998,1999 by Werner Almesberger + * + * This file contains the hardware definitions of the CL-PS7212 chip + * + * The 7212 is basically a 7110 with extensions - a digital audio interface, + * some on-chip SRAM, faster clock, etc. + * + */ + +#ifndef _ASM_ARCH_CLPS7212_H +#define _ASM_ARCH_CLPS7212_H + +/* + * CL-PS7212 internal registers + * + * The names will almost certainly clash with something else ... so we'll + * probably have to prefix them with CLPS7212_ or something equally ugly later. + */ + +#define PADR 0x0000 /* Port A Data register ---------------------------- */ +#define PBDR 0x0001 /* Port B Data register ---------------------------- */ +#define PCDR 0x0002 /* Port C Data register ---------------------------- */ +#define PDDR 0x0003 /* Port D Data register ---------------------------- */ +#define PADDR 0x0040 /* Port A Data Direction register ------------------ */ +#define PBDDR 0x0041 /* Port B Data Direction register ------------------ */ +#define PCDDR 0x0042 /* Port C Data Direction register ------------------ */ +#define PDDDR 0x0043 /* Port D Data Direction register ------------------ */ +#define PEDR 0x0080 /* Port E Data register ---------------------------- */ +#define PEDDR 0x00c0 /* Port E Data Direction register ------------------ */ + +#define SYSCON 0x0100 /* System Control register ------------------------- */ +#define KBDSCAN 0x0000000f /* Keyboard scan */ +#define KBSC_HI 0x0 /* All driven high */ +#define KBSC_LO 0x1 /* All driven low */ +#define KBSC_X 0x2 /* All high impedance */ +#define KBSC_COL0 0x8 /* Column 0 high, others high impedance */ +#define KBSC_COL1 0x9 /* Column 1 high, others high impedance */ +#define KBSC_COL2 0xa /* Column 2 high, others high impedance */ +#define KBSC_COL3 0xb /* Column 3 high, others high impedance */ +#define KBSC_COL4 0xc /* Column 4 high, others high impedance */ +#define KBSC_COL5 0xd /* Column 5 high, others high impedance */ +#define KBSC_COL6 0xe /* Column 6 high, others high impedance */ +#define KBSC_COL7 0xf /* Column 7 high, others high impedance */ +#define TC1M 0x00000010 /* TC1 mode (0: free-running, 1: prescale) */ +#define TC1S 0x00000020 /* TC1 clock source (0: 2 kHz, 1: 512 kHz) */ +#define TC2M 0x00000040 /* TC2 mode (0: free-running, 1: prescale) */ +#define TC2S 0x00000080 /* TC2 clock source (0: 2 kHz, 1: 512 kHz) */ +#define UARTEN 0x00000100 /* Internal UART enable */ +#define BZTOG 0x00000200 /* Drive buzzer directly */ +#define BZMOD 0x00000400 /* Buzzer drive mode (0: BZTOG, 1: TC1 under-flow)*/ +#define DBGEN 0x00000800 /* Debug mode */ +#define LCDEN 0x00001000 /* LCD enable */ +#define CDENTX 0x00002000 /* Codec interface enable Tx */ +#define CDENRX 0x00004000 /* Codec interface enable Rx */ +#define SIREN 0x00008000 /* HP SIR protocol encoding enable */ +#define ADCKSEL 0x00030000 /* Microwire/SPI peripheral clock speed select */ +#define ADCKSEL_SHIFT 16 +#define ADCS_8 0x0 /* Sample 8 kHz, interface 4 kHz */ +#define ADCS_32 0x1 /* 32/16 kHz */ +#define ADCS_128 0x2 /* 128/64 kHz */ +#define ADCS_256 0x3 /* 256/128 kHz */ +#define EXCKEN 0x00040000 /* External expansion clock enable */ +#define WAKEDIS 0x00080000 /* Disable switch-on through wake-up */ +#define IRTXM 0x00100000 /* IrDA Tx mode (0: 3/16 of rate, 1: 1.63 us) */ + +#define SYSFLG 0x0140 /* System Status Flags register -------------------- */ +#define MCDR 0x00000001 /* Media changed direct read */ +#define DCDET 0x00000002 /* Main adapter is powering the system */ +#define WUDR 0x00000004 /* Wake-up direct read */ +#define WUON 0x00000008 /* Left standby on wake-up */ +#define DID 0x000000f0 /* Display ID nibble */ +#define DID_SHIFT 4 +#define CTS 0x00000100 /* UART CTS */ +#define DSR 0x00000200 /* UART DSR */ +#define DCD 0x00000400 /* UART DCD */ +#define UBUSY 0x00000800 /* UART transmitter busy */ +#define NBFLG 0x00001000 /* New battery flag */ +#define RSTFLG 0x00002000 /* Reset flag */ +#define PFFLG 0x00004000 /* Power fail flag */ +#define CLDFLG 0x00008000 /* Cold start flag */ +#define RTCDIV 0x003f0000 /* 64 Hz ticks since last RTC increment */ +#define RTCDIV_SHIFT 16 +#define URXFE 0x00400000 /* UART receiver FIFO empty */ +#define UTXFF 0x00800000 /* UART transmit FIFO full */ +#define CRXFE 0x01000000 /* Codec Rx FIFO empty */ +#define CTXFF 0x02000000 /* Codec Tx FIFO full */ +#define SSIBUSY 0x04000000 /* Synchronous serial interface busy */ +#define BOOT8BIT 0x80000000 /* Initial bus width (0: 32 bit, 1: 8 bit) */ +#define VERID 0xc0000000 /* Version ID */ +#define VERID_SHIFT 30 + +#define MEMCFG1 0x0180 /* Memory Configuration register 1 ----------------- */ +#define MEMCFG2 0x01c0 /* Memory Configuration register 2 ----------------- */ +#define CS_BW 0x03 /* Bus width */ +#define CS_BW_BUS32_E0 0 /* 32 bit if E=0 */ +#define CS_BW_BUS16_E0 1 /* 16 bit if E=0 */ +#define CS_BW_BUS8_E0 2 /* 8 bit if E=0 */ +#define CS_BW_PCMCIA_E0 3 /* PCMCIA if E=0 */ +#define CS_BW_BUS8_E1 0 /* 8 bit if E=1 */ +#define CS_BW_PCMCIA_E1 1 /* PCMCIA if E=1 */ +#define CS_BW_BUS32_E1 2 /* 32 bit if E=1 */ +#define CS_BW_BUS16_E1 3 /* 16 bit if E=1 */ +#define CS_RAWT 0x0c /* Random Access Wait State */ +#define CS_RAWT_SHIFT 2 /* WS = 4-N; speed = 50+50*WS ns */ +#define CS_SAWR 0x30 /* Sequential Access Wait State */ +#define CS_SAWR_SHIFT 4 /* WS = 3-N; speed[WS] = 40,80,120,150 ns */ +#define CS_SQAEN 0x40 /* Sequential Access Enable */ +#define CS_CLKEN 0x80 /* Expansion Clock Enable */ +#define DRFPR 0x0200 + +#define INTSR 0x0240 /* Interrupt Status register ----------------------- */ +#define EXTFIQ 0x00000001 /* External fast interrupt */ +#define BLINT 0x00000002 /* Battery low interrupt */ +#define WEINT 0x00000004 /* Watch dog expired interrupt */ +#define MCINT 0x00000008 /* Media changed interrupt */ +#define CSINT 0x00000010 /* Codec sound interrupt */ +#define EINT1 0x00000020 /* External interrupt 1 */ +#define EINT2 0x00000040 /* External interrupt 2 */ +#define EINT3 0x00000080 /* External interrupt 3 */ +#define TC1OI 0x00000100 /* TC1 under-flow interrupt */ +#define TC2OI 0x00000200 /* TC2 under-flow interrupt */ +#define RTCMI 0x00000400 /* RTC compare match interrupt */ +#define TINT 0x00000800 /* 64-Hz tick interrupt */ +#define UTXINT 0x00001000 /* Internal UART transmit FIFO half-empty intr. */ +#define URXINT 0x00002000 /* Internal UART receive FIFO half-full interrupt */ +#define UMSINT 0x00004000 /* Internal UART modem status changed interrupt */ +#define SSEOTI 0x00008000 /* Synchronous serial interface end-of-transfer */ + +#define INTMR 0x0280 /* Interrupt Mask register ------------------------- */ + +#define LCDCON 0x02c0 /* LCD Control register ---------------------------- */ +#define VBUFSIZ 0x00001fff /* Video buffer size (bits/128-1) */ +#define LINELEN 0x0007e000 /* Line length (pix/16-1) */ +#define LINELEN_SHIFT 13 +#define PIXPSC 0x01f80000 /* Pixel prescale (526628/pixels-1) */ +#define PIXPSC_SHIFT 19 +#define ACPSC 0x3e000000 /* AC prescale */ +#define ACPSC_SHIFT 25 +#define GSEN 0x40000000 /* Grayscale enable (0: monochrome) */ +#define GSMD 0x80000000 /* Grayscale mode (0: 2 bit, 1: 4 bit) */ + +#define TC1D 0x0300 /* Timer Counter 1 Data register ------------------- */ +#define TC_MASK 0x0000ffff +#define TC2D 0x0340 /* Timer Counter 2 Data register ------------------- */ + +#define RTCDR 0x0380 /* Realtime Clock Data register -------------------- */ + +#define RTCMR 0x03c0 /* Realtime Clock Match register ------------------- */ + +#define PMPCON 0x0400 + +#define CODR 0x0440 /* Codec Interface Data register ------------------- */ + +#define UARTDR 0x0480 /* UART FIFO Data register ------------------------- */ +#define RX_DATA 0x000000ff /* Rx data */ +#define FRMERR 0x00000100 /* UART framing error */ +#define PARERR 0x00000200 /* UART parity error */ +#define OVERR 0x00000400 /* UART overrun error */ + +#define UBRLCR 0x04c0 /* UART Bit Rate and Line Control register --------- */ +#define BRDIV 0x00000fff /* Bit rate divisor */ +#define BR_115200 1 +#define BR_57600 3 +#define BR_38400 5 +#define BR_19200 11 +#define BR_9600 23 +#define BR_2400 95 +#define BR_1200 191 +#define BREAK 0x00001000 /* Set Tx high */ +#define PRTEN 0x00002000 /* Parity enable */ +#define EVENPRT 0x00004000 /* Even parity */ +#define XSTOP 0x00008000 /* Extra stop bit */ +#define FIFOEN 0x00010000 /* Enable FIFO */ +#define WRDLEN 0x00030000 /* Word length */ +#define WRDLEN_SHIFT 17 +#define WL_5 0x0 /* 5 bits */ +#define WL_6 0x1 /* 6 bits */ +#define WL_7 0x2 /* 7 bits */ +#define WL_8 0x3 /* 8 bits */ + +#define SYNCIO 0x0500 +#define TXFRMEN 0x00004000 /* Initiate data transfer */ +#define SMCKEN 0x00002000 /* Enable sample clock on SMPLCK */ +#define FRLEN 0x00001f00 /* Frame length */ +#define FRLEN_SHIFT 8 +#define ADCCFB 0x000000ff /* ADC Configuration byte */ +#define ADCRSW 0x0000ffff /* ADC result word */ + +#define PALLSW 0x0540 /* Least-significant 32-bit word of LCD Palette reg. */ +#define PALMSW 0x0580 /* Most-significant 32-bit word of LCD Palette reg. */ + +#define STFCLR 0x05c0 /* Write to clear all start up reason flags -------- */ +#define BLEOI 0x0600 /* Write to clear Battery Low interrupt ------------ */ +#define MCEOI 0x0640 /* Write to clear Media Changed interrupt ---------- */ +#define TEOI 0x0680 /* Write to clear Tick and Watchdog interrupt ------ */ +#define TC1EOI 0x06c0 /* Write to clear TC1 interrupt -------------------- */ +#define TC2EOI 0x0700 /* Write to clear TC2 interrupt -------------------- */ +#define RTCEOI 0x0740 /* Write to clear RTC Match interrupt -------------- */ +#define UMSEOI 0x0780 /* Write to clear UART Modem Status Changed interrupt*/ +#define COEOI 0x07c0 /* Write to clear Codec Sound interrupt ------------ */ +#define HALT 0x0800 /* Write to enter idle state ----------------------- */ +#define STDBY 0x0840 /* Write to standby state -------------------------- */ + +#define FBADDR 0x1000 /* LCD framebuffer address ------------------------- */ +#define SYSCON2 0x1100 /* System configuration register 2 ----------------- */ +#define SYSFLG2 0x1140 /* System status register 2 ------------------------ */ +#define INTSR2 0x1240 /* Interrupt status register 2 --------------------- */ +#define INTMR2 0x1280 /* Interrupt mask register 2 ----------------------- */ +#define UARTDR2 0x1480 /* UART2 data register ----------------------------- */ +#define UBLCR2 0x14c0 /* UART2 bitrate & line control register ----------- */ +#define SS2DR 0x1500 /* SS2DR master/slave SSI2 data register ----------- */ +#define SRXEOF 0x1600 /* Write to clear RX FIFO overflow flag ------------ */ +#define SS2POP 0x16c0 /* Write to pop SSI2 residual byte into RX FIFO ---- */ +#define KBDEOI 0x1700 /* Write to clear keyboard interrupt --------------- */ + +#define DAICONTROL 0x2000 /* Digital Audio Interface control ---------- */ +#define DAICONTROL_DAIEN (1<<16) /* Digital Audio Enable */ +#define DAICONTROL_ECS (1<<17) /* External clock select */ +#define DAICONTROL_LTCM (1<<19) /* Left channel mask */ +#define DAICONTROL_RTCM (1<<21) /* Right channel mask */ +#define DAIDATA0 0x2040 /* Digital Audio data 0 --------------------- */ +#define DAIDATA1 0x2080 /* Digital Audio data 1 --------------------- */ +#define DAIDATA2 0x20c0 /* Digital Audio data 2 --------------------- */ +#define DAIDATA2_LEFTENABLE 0x0011c000 /* Magic to enable left channel */ +#define DAIDATA2_RIGHTENABLE 0x000dc000 /* Magic to enable right channel */ +#define DAISTATUS 0x2100 /* Digital Audio status --------------------- */ +#define DAISTATUS_FIFO (1<<12) /* FIFO */ +#define SYSCON3 0x2200 /* System configuration 3 ------------------- */ +#define SYSCON3_DAIPSEL (1<<3) +#define SYSCON3_DAIEN (1<<9) /* Enable DAI */ +#define INTSR3 0x2240 /* Interrupt status register 3 -------------- */ +#define INTMR3 0x2280 /* Interrupt mask register 3 ---------------- */ +#define INTMR3_DAI (1<<0) /* DAI FIQ enable */ +#define LEDFLSH 0x22c0 /* LED flash control register --------------- */ + +/* + * CL-PS7212 PCMCIA memory constants + * + * Need to #define PCMCIA_BASE before using these macros. + */ + +#define PCMCIA_ATTR8(a) (PCMCIA_BASE+0x00000000+(a)) +#define PCMCIA_MEM(a) (PCMCIA_BASE+0x04000000+(a)) +#define PCMCIA_IO8(a) (PCMCIA_BASE+0x08000000+(a)) +#if 0 +#define PCMCIA_IO16(a) (PCMCIA_BASE+0x0c000000+((a) & ~3)+(((a) & 2) << 24)) +#endif +#define PCMCIA_IO16(a) (PCMCIA_BASE+0x00000000+((a&0xf)<<1)+(a&~0xf)) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/dma.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/dma.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/dma.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/empeg7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/empeg7212.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/empeg7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/empeg7212.h 2000-11-27 12:32:42.000000000 +0000 @@ -0,0 +1,224 @@ +/* + * empeg-net7212 hardware-specifics + * + * (C) 2000 empeg ltd, http://www.empeg.com + * + * Authors: + * Hugo Fiennes, + * Mike Crowe, + * + */ + +#ifndef __ASM_ARCH_EMPEG7212_H +#define __ASM_ARCH_EMPEG7212_H + +/* ... and IRQ defintions */ +#define EMPEG_IRQ_IR 4 +#define EMPEG_IRQ_USBIRQ 1 +#define EMPEG_IRQ_IDE1 6 +#define EMPEG_IRQ_IDE2 7 +#define EMPEG_IRQ_AUDIOOUT 0 + +#define EMPEG_IR_MAJOR (242) +#define EMPEG_USB_MAJOR (243) +#define EMPEG_DISPLAY_MAJOR (244) +#define EMPEG_AUDIO_MAJOR (245) +#define EMPEG_STATE_MAJOR (246) +#define EMPEG_RDS_MAJOR (248) +#define EMPEG_AUDIOIN_MAJOR (249) + +/* Empeg IR ioctl values */ +#define EMPEG_IR_MAGIC 'i' + +/* Set/get the remote control type */ +#define EMPEG_IR_WRITE_TYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define EMPEG_IR_READ_TYPE _IOR(EMPEG_IR_MAGIC, 2, int) + +/* Set/get the delay before repeats are honoured (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define EMPEG_IR_READ_RPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) + +/* Set/get the interval between repeats (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define EMPEG_IR_READ_RPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) + +/* Set/get the timeout for a repeat occuring. If a repeat code happens + * after this amount of time without one then it will be ignored. */ +#define EMPEG_IR_WRITE_RPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define EMPEG_IR_READ_RPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +/* Deprecated ioctl values */ +#define IR_IOCSTYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define IR_IOCGTYPE _IOR(EMPEG_IR_MAGIC, 2, int) +#define IR_IOCTTYPE IR_IOCGTYPE /*deprecated*/ +#define IR_IOCSRPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define IR_IOCGRPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) +#define IR_IOCSRPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define IR_IOCGRPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) +#define IR_IOCSRPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define IR_IOCGRPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +#define IR_TYPE_COUNT 1 + +#define IR_TYPE_CAPTURE 0 +#define IR_TYPE_KENWOOD 1 + +/* Empeg Display ioctl values */ +#define EMPEG_DISPLAY_MAGIC 'd' + +/* Deprecated ioctl codes */ +#define DIS_IOCREFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define DIS_IOCSPOWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define DIS_IOCSPALETTE _IOW(EMPEG_DISPLAY_MAGIC, 4, int) +#define DIS_IOCCLEAR _IO(EMPEG_DISPLAY_MAGIC, 5) +#define DIS_IOCENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define DIS_IOCPOPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define DIS_IOCFLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) + +/* Should use these ioctl codes instead */ +#define EMPEG_DISPLAY_REFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define EMPEG_DISPLAY_POWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define EMPEG_DISPLAY_WRITE_PALETTE _IOW(EMPEG_DISPLAY_MAGIC, 4, int) +#define EMPEG_DISPLAY_CLEAR _IO(EMPEG_DISPLAY_MAGIC, 5) +#define EMPEG_DISPLAY_ENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define EMPEG_DISPLAY_POPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define EMPEG_DISPLAY_FLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) +#define EMPEG_DISPLAY_QUERYQUEUEFREE _IOR(EMPEG_DISPLAY_MAGIC, 9, int) +#define EMPEG_DISPLAY_SETCONTRAST _IOW(EMPEG_DISPLAY_MAGIC, 10, int) +#define EMPEG_DISPLAY_GETCONTRAST _IOR(EMPEG_DISPLAY_MAGIC, 10, int) +#define EMPEG_DISPLAY_SETBACKLIGHT _IOW(EMPEG_DISPLAY_MAGIC, 11, int) +#define EMPEG_DISPLAY_GETBACKLIGHT _IOR(EMPEG_DISPLAY_MAGIC, 11, int) + +/* Sound IOCTLs */ +/* Make use of the bitmasks in soundcard.h, we only support. + * PCM, RADIO and LINE. */ + +#define EMPEG_MIXER_MAGIC 'm' +#define EMPEG_DSP_MAGIC 'a' + +#define EMPEG_MIXER_READ_SOURCE _IOR(EMPEG_MIXER_MAGIC, 0, int) +#define EMPEG_MIXER_WRITE_SOURCE _IOW(EMPEG_MIXER_MAGIC, 0, int) +#define EMPEG_MIXER_READ_FLAGS _IOR(EMPEG_MIXER_MAGIC, 1, int) +#define EMPEG_MIXER_WRITE_FLAGS _IOW(EMPEG_MIXER_MAGIC, 1, int) +#define EMPEG_MIXER_READ_DB _IOR(EMPEG_MIXER_MAGIC, 2, int) +#define EMPEG_MIXER_WRITE_LOUDNESS _IOW(EMPEG_MIXER_MAGIC, 4, int) +#define EMPEG_MIXER_READ_LOUDNESS _IOR(EMPEG_MIXER_MAGIC, 4, int) +#define EMPEG_MIXER_READ_LOUDNESS_DB _IOR(EMPEG_MIXER_MAGIC, 5, int) +#define EMPEG_MIXER_WRITE_BALANCE _IOW(EMPEG_MIXER_MAGIC, 6, int) +#define EMPEG_MIXER_READ_BALANCE _IOR(EMPEG_MIXER_MAGIC, 6, int) +#define EMPEG_MIXER_READ_BALANCE_DB _IOR(EMPEG_MIXER_MAGIC, 7, int) +#define EMPEG_MIXER_WRITE_FADE _IOW(EMPEG_MIXER_MAGIC, 8, int) +#define EMPEG_MIXER_READ_FADE _IOR(EMPEG_MIXER_MAGIC, 8, int) +#define EMPEG_MIXER_READ_FADE_DB _IOR(EMPEG_MIXER_MAGIC, 9, int) +#define EMPEG_MIXER_SET_EQ _IOW(EMPEG_MIXER_MAGIC, 10, int) +#define EMPEG_MIXER_GET_EQ _IOR(EMPEG_MIXER_MAGIC, 11, int) +#define EMPEG_MIXER_SET_EQ_FOUR_CHANNEL _IOW(EMPEG_MIXER_MAGIC, 12, int) +#define EMPEG_MIXER_GET_EQ_FOUR_CHANNEL _IOR(EMPEG_MIXER_MAGIC, 13, int) +#define EMPEG_MIXER_GET_COMPRESSION _IOR(EMPEG_MIXER_MAGIC, 14, int) +#define EMPEG_MIXER_SET_COMPRESSION _IOW(EMPEG_MIXER_MAGIC, 14, int) +#define EMPEG_MIXER_SET_SAM _IOW(EMPEG_MIXER_MAGIC, 15, int) +#define EMPEG_MIXER_SET_HAM _IOW(EMPEG_MIXER_MAGIC, 16, int) + +/* Retrieve volume level corresponding to 0dB */ +#define EMPEG_MIXER_READ_ZERO_LEVEL _IOR(EMPEG_MIXER_MAGIC, 3, int) + +#define EMPEG_MIXER_FLAG_MUTE (1<<0) +/*#define EMPEG_MIXER_FLAG_LOUDNESS (1<<1)*/ + +/* Radio IOCTLs */ +/* These are in addition to those provided by the Video4Linux API */ +#define EMPEG_RADIO_MAGIC 'r' +#define EMPEG_RADIO_READ_MONO _IOR(EMPEG_RADIO_MAGIC, 73, int) +#define EMPEG_RADIO_WRITE_MONO _IOW(EMPEG_RADIO_MAGIC, 73, int) +#define EMPEG_RADIO_READ_DX _IOR(EMPEG_RADIO_MAGIC, 74, int) +#define EMPEG_RADIO_WRITE_DX _IOW(EMPEG_RADIO_MAGIC, 74, int) +#define EMPEG_RADIO_READ_SENSITIVITY _IOR(EMPEG_RADIO_MAGIC, 75, int) +#define EMPEG_RADIO_WRITE_SENSITIVITY _IOW(EMPEG_RADIO_MAGIC, 75, int) +#define EMPEG_RADIO_SEARCH _IO(EMPEG_RADIO_MAGIC, 76) /* Pass in direction in *arg */ +#define EMPEG_RADIO_GET_MULTIPATH _IOR(EMPEG_RADIO_MAGIC, 77, int) +#define EMPEG_RADIO_SET_STEREO _IOW(EMPEG_RADIO_MAGIC, 78, int) + +#define EMPEG_DSP_BEEP _IOW(EMPEG_DSP_MAGIC, 0, int) +#define EMPEG_DSP_PURGE _IOR(EMPEG_DSP_MAGIC, 1, int) + +/* State storage ioctls */ +/* Shouldn't need either of these in normal use. */ +#define EMPEG_STATE_MAGIC 's' +#define EMPEG_STATE_FORCESTORE _IO(EMPEG_STATE_MAGIC, 74) +#define EMPEG_STATE_FAKEPOWERFAIL _IO(EMPEG_STATE_MAGIC, 75) + +/* Where flash is mapped when running */ +#define EMPEG_FLASHBASE (FLASH_BASE) + +#ifndef __ASSEMBLY__ +struct empeg_eq_section_t +{ + unsigned int word1; + unsigned int word2; +}; + +#ifdef __KERNEL__ + +/* Inlines to get ethernet/pna stuff */ + +/* Flash/PROM layout: + + 00000 - bootstrap + 02000 - 48 bit ethernet ID + 02008 - 32 bit hardware version + 0200c - 32 bit unit serial number + 02010 - 128 bit (16 byte) unique ID + 0e000 - linux loader + 10000 - linux kernel + +*/ + +static __inline__ void empeg_getetherid(unsigned char *addr) +{ + unsigned char *flashinfo=(unsigned char*)(EMPEG_FLASHBASE+0x2000); + int a; + + /* Fill in ID */ + for(a=0;a<6;a++) addr[a]=flashinfo[a]; +} + +/* Set/get network type - cleaner done in here, honest! */ +extern int mercury_networktype; +static __inline__ const char* empeg_getethertype(void) +{ + return(mercury_networktype?"pna":"ethernet"); +} + +/* Inline to get hardware revision */ +static __inline__ int empeg_gethwrevision(void) +{ + int *flashinfo=(int*)(EMPEG_FLASHBASE+0x2000); + return(flashinfo[2]); +} + +/* Inline to get serial number */ +static __inline__ int empeg_getserialnumber(void) +{ + int *flashinfo=(int*)(EMPEG_FLASHBASE+0x2000); + return(flashinfo[3]); +} + +/* Inline to get unique ID */ +static __inline__ void empeg_getuniqueid(unsigned long *buffer) +{ + unsigned long *flashinfo=(unsigned long*)(EMPEG_FLASHBASE+0x2000); + int a; + + for(a=0;a<4;a++) buffer[a]=flashinfo[4+a]; +} + +extern void audio_emitted_action(void); + +extern void display_off(void); + +#endif /* __KERNEL__ */ +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_ARCH_EMPEG7212_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/hardware.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/hardware.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/hardware.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/hardware.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,193 @@ +/* + * linux/include/asm-arm/arch-clps7212/hardware.h + * + * Written 1998,1999 by Werner Almesberger + * + * This file contains Linux-specific hardware definitions for the CL-PS7212 + * architecture and #includes hardware definitions of the CL-PS7212 chip, + * plus architecture-specific hardware definitions. + */ + +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +#include + +#if defined(CONFIG_ARCH_EB7212) +#include +#elif defined(CONFIG_ARCH_MERCURY) +#include +#else +#error Unknown EP7212 hardware architecture! +#endif + +/* + * Our memory model (generalized): + * + * Physical Size Type Virtual + * (_START) (_SIZE) (_BASE) + * 00000000-7fffffff 2GB don't care n/a + * 40000000-4ffffff 256MB CompactFlash (Psion) f0000000 + * 70000000-7fffffff 256MB PCMCIA (Geofox) f0000000 + * 80000000-8000ffff 64kB internal registers d0000000 + * 80010000-bfffffff 960kB not used n/a + * c0000000-ffffffff 1024MB RAM, non-contiguous c0000000 (1) + * + */ + +/* + * Start conventions for the kernel: + * + * R0 = 0 head-armv.S sanity check + * R1 = 9 CL-PS7212 + */ + +/* + * Memory map when kernel is started: + * + * Physical location Offset in Size Description + * start end boot file + * -------- -------- ---------- ----- -------------------------------------- + * c0000000-c001ffff 128kB Video RAM (1) + * c0020000-c00207ff 2kB frag_p2v_lookup_table + * c0020800-c00209ff 0.5kB frag_v2p_lookup_table + * c0020a00-c0020fff 1.5kB currently unused (2) + * c0021000-c0022fff 8kB currently unused (3) + * c0023000-c00235ff 00000800 1.5kB parameters (asm/setup.h:param_struct) + * c0023600-c00237ff 00000e00 0.5kB list of available memory areas (4) + * c0023800-c0023fff 2kB currently unused + * c0024000-c0033fff 64kB page tables (5) + * c0034000-c0037fff 16kB swapper_pg_dir (5) + * c0038000-... 00002000 start of text segment, then initrd + * + * (1) 0-12bff for Psion (640x240), 0-18fff for Geofox (640x320). Unused pages + * can be given to VM. + * (2) Architectures without KMEM_IS_VIRTUAL can use page c002 for VM. + * (3) Can be used for VM. + * (4) Either contained in boot file or provided by relocator. + * (5) Initialized by head-armv.S + * + * Note: Boot file locations 0x0000-0x07ff contain the relocator, locations + * 0x1000-0x1fff contain a scratch page which is only used during + * relocation. The physical location of either depends on where EPOC32 + * loads them. + */ + +/* + * IO address mapping + */ + +#define IO_BASE 0xd0000000 /* virtual */ +#define IO_START 0x80000000 /* physical */ +#define IO_SIZE 0x00100000 /* actually it's only 0x1000, + but this way we can use a + section to map it and don't + waste an entire page table*/ + +/* + * PCMCIA address mapping + * + * PCMCIA_START depends on the machine architecture. + */ + +#define PCMCIA_BASE 0xf0000000 /* virtual */ +#define PCMCIA_SIZE 0x10000000 /* 4 areas of 64MB each */ + +/* + * RAM definitions + */ + +#define RAM_START 0xc0000000 /* physical */ + +/* + * KERNTOPHYS does *not* translate from kernel addresses to physical addresses. + * Instead, it translates from addresses of kernel objects (code, data, etc.) + * to addresses of memory, both in kernel address space. In our case, this is a + * no-op. + * + * This KERNTOPHYS is only used in arch/arm/mm/init.c + */ + +#define KERNTOPHYS(x) ((unsigned long) &(x)) + +#define KERNEL_BASE 0xc0028000 +/*#define PARAMS_BASE 0xc0000400*/ +/*#define Z_PARAMS_BASE @@@*/ +#define FLUSH_BASE_PHYS 0 /* ROM @@@ ?*/ +#define FLUSH_BASE 0xdf000000 /* ROM @@@ ?*/ + + +/* + * LCD display definitions. + * + * LCD_X_SIZE and LCD_Y_SIZE depend on the machine architecture. + */ + +#define LCD_BASE 0xc0000000 +#define LCD_MEM_SIZE (LCD_X_SIZE*LCD_Y_SIZE/2) + +/* + * Register definitions + */ + +#include + +/* + * Allow access to IO registers as if they were normal variables + */ + +#define __IOB(x) (*(volatile unsigned char *) (IO_BASE+(x))) +#define __IOL(x) (*(volatile unsigned long *) (IO_BASE+(x))) + +#define IO_PADR __IOB(PADR) +#define IO_PBDR __IOB(PBDR) +#define IO_PCDR __IOB(PCDR) +#define IO_PDDR __IOB(PDDR) +#define IO_PADDR __IOB(PADDR) +#define IO_PBDDR __IOB(PBDDR) +#define IO_PCDDR __IOB(PCDDR) +#define IO_PDDDR __IOB(PDDDR) +#define IO_PEDR __IOB(PEDR) +#define IO_PEDDR __IOB(PEDDR) +#define IO_SYSCON __IOL(SYSCON) +#define IO_SYSFLG __IOL(SYSFLG) +#define IO_MEMCFG1 __IOL(MEMCFG1) +#define IO_MEMCFG2 __IOL(MEMCFG2) +/* DRFPR */ +#define IO_INTSR __IOL(INTSR) +#define IO_INTMR __IOL(INTMR) +#define IO_INTMR2 __IOL(INTMR2) +#define IO_INTMR3 __IOL(INTMR3) +#define IO_LCDCON __IOL(LCDCON) +#define IO_TC1D __IOL(TC1D) +#define IO_TC2D __IOL(TC2D) +#define IO_RTCDR __IOL(RTCDR) +#define IO_RTCMR __IOL(RTCMR) +/* PMPCON */ +#define IO_CODR __IOB(CODR) +#define IO_UARTDR __IOL(UARTDR) +#define IO_UBRLCR __IOL(UBRLCR) +#define IO_SYNCIO __IOL(SYNCIO) +#define IO_PALLSW __IOL(PALLSW) +#define IO_PALMSW __IOL(PALMSW) +#define IO_STFCLR __IOL(STFCLR) +#define IO_BLEOI __IOL(BLEOI) +#define IO_MCEOI __IOL(MCEOI) +#define IO_TEOI __IOL(TEOI) +#define IO_TC1EOI __IOL(TC1EOI) +#define IO_TC2EOI __IOL(TC2EOI) +#define IO_RTCEOI __IOL(RTCEOI) +#define IO_UMSEOI __IOL(UMSEOI) +#define IO_COEOI __IOL(COEOI) +#define IO_HALT __IOL(HALT) +#define IO_STDBY __IOL(STDBY) + +#define IO_DAICONTROL __IOL(DAICONTROL) +#define IO_DAIDATA0 __IOL(DAIDATA0) +#define IO_DAIDATA1 __IOL(DAIDATA1) +#define IO_DAIDATA2 __IOL(DAIDATA2) +#define IO_DAISTATUS __IOL(DAISTATUS) +#define IO_SYSCON3 __IOL(SYSCON3) +#define IO_INTMASK3 __IOL(INTMASK3) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/hw_eb7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/hw_eb7212.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/hw_eb7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/hw_eb7212.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * linux/include/asm-arm/arch-clps7212/hw_eb7212.h + * + * (c)2000 empeg ltd + * Based on arch-ep7110/hw_psion.h by Werner Almesberger 1998,1999 + * + * Hardware definitions for the Cirrus EP7212 evaluation board + */ + +#ifndef __ASM_ARCH_HW_EB7212_H +#define __ASM_ARCH_HW_EB7212_H + +/* + * We pretend we have a "PCMCIA" area. In actual fact, this is where the memory + * mapped IO sits (ethernet, parallel, etc) + */ + +#define PCMCIA_START 0x50000000 + +/* + * LCD display size + */ + +#define LCD_X_SIZE 640 +#define LCD_Y_SIZE 240 + +/* + * Register/port usage + */ + +/* + * Port B + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * |VPCEN|OPEN |VLDD3|VLDD2|VLDD1|VLDD0|EECLK|EECS | + * | out |in/ou|in/ou|in/ou|in/ou|in/ou| out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_VLD_PORT IO_PBDR /* Contrast control */ +#define HW_VLD_DIR IO_PBDDR +#define HW_VLD_MASK 0x3c +#define HW_VLD_SHIFT 2 +#define HW_OPEN_PORT IO_PBDR /* Indicates that the case is open */ +#define HW_OPEN_DIR IO_PBDDR +#define HW_OPEN_BIT 0x40 +#define HW_VPCEN_PORT IO_PBDR /* Enables the power to the CF Card */ +#define HW_VPCEN_BIT 0x80 + +/* + * Port C + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * |ADICT|BBLD |IREN |ELEN |RSEN |PLED | DTR | RTS | + * | out | out | out | out | out | out | out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_RTS_PORT IO_PCDR /* RS-232 RTS */ +#define HW_RTS_BIT 0x01 +#define HW_DTR_PORT IO_PCDR /* RS-232 DTR */ +#define HW_DTR_BIT 0x02 +#define HW_PLED_PORT IO_PCDR /* Disable power LED */ +#define HW_PLED_BIT 0x04 +#define HW_RSEN_PORT IO_PCDR /* Enable RS-232 driver */ +#define HW_RSEN_BIT 0x08 +#define HW_ELEN_PORT IO_PCDR /* Enable backlight */ +#define HW_ELEN_BIT 0x10 +#define HW_IREN_PORT IO_PCDR /* Enable IR receiver */ +#define HW_IREN_BIT 0x20 +#define HW_BBLD_PORT IO_PCDR /* Apply load to backup battery */ +#define HW_BBLD_BIT 0x40 +#define HW_ADICT_PORT IO_PCDR /* Set audio circuit to "dictaphone" */ +#define HW_ADICT_BIT 0x80 + +/* + * Port D + * + * +--7--+--6--+--5--+--4--+--3--+--2--+--1--+--0--+ + * | X2 | VLL |TRIX2|SLED |DORSW| DON |AMPEN|CDEN | + * |in/ou| out | n/a | out | out | out | out | out | + * +-----+-----+-----+-----+-----+-----+-----+-----+ + */ + +#define HW_CDEN_PORT IO_PDDR /* CODEC enable */ +#define HW_CDEN_BIT 0x01 +#define HW_AMPEN_PORT IO_PDDR /* Audio Amplifier Enable */ +#define HW_AMPEN_BIT 0x02 +#define HW_DON_PORT IO_PDDR /* Display On */ +#define HW_DON_BIT 0x04 +#define HW_SLED_PORT IO_PDDR /* Turns Status LED ON */ +#define HW_SLED_BIT 0x10 +#define HW_VLL_PORT IO_PDDR /* LCD Logic Rail */ +#define HW_VLL_BIT 0x40 +#define HW_X2_PORT IO_PDDR /* Pen Down Detect Line */ +#define HW_X2_DIR IO_PDDDR +#define HW_X2_BIT 0x80 + +/* + * Port E + * + * +--3--+--2--+--1--+--0--+ + * |Y1EN |X1EN |Y2EN |X2EN | + * | out | out | out | out | + * +-----+-----+-----+-----+ + */ + +#define HW_X2EN_PORT IO_PEDR /* Digitiser X2 Drive */ +#define HW_X2EN_BIT 0x01 +#define HW_Y2EN_PORT IO_PEDR /* Digitiser Y2 Drive */ +#define HW_Y2EN_BIT 0x02 +#define HW_X1EN_PORT IO_PEDR /* Digitiser X1 Drive */ +#define HW_X1EN_BIT 0x04 +#define HW_Y1EN_PORT IO_PEDR /* Digitiser Y1 Drive */ +#define HW_Y1EN_BIT 0x08 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/hw_mercury.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/hw_mercury.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/hw_mercury.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/hw_mercury.h 2000-05-07 17:16:34.000000000 +0100 @@ -0,0 +1,136 @@ +/* + * linux/include/asm-arm/arch-clps7212/hw_mercury.h + * + * (c)2000 empeg ltd + * Based on arch-ep7110/hw_psion.h by Werner Almesberger 1998,1999 + * + * Hardware definitions for the Diamond Mercury + */ + +#ifndef __ASM_ARCH_HW_EB7212_H +#define __ASM_ARCH_HW_EB7212_H + +/* Mappings of hardware */ + +/* Crystal 8900A ethernet controller */ +#define ETH_START 0x20000000 +#define ETH_BASE 0xf0000000 +#define ETH_SIZE (1024*1024) + +/* Broadcom CBM4210 pna2.0 controller */ +#define PNA_START 0x30000000 +#define PNA_BASE 0xf0100000 +#define PNA_SIZE (1024*1024) + +/* Flash/PROM */ +#define FLASH_START 0x00000000 +#define FLASH_BASE 0xf0200000 +#define FLASH_SIZE (1024*1024) + +/* + * LCD display size + */ + +#define LCD_X_SIZE 640 +#define LCD_Y_SIZE 240 + +/* + * Register/port usage + */ + +/* + * Port A + * bits 0-3 - keyboard scanline inputs + * bits 4-5 - rotary control inputs (EOR of these taken to DSR line too) + * bit 6 - unused + * bit 7 - fault input from amp board + */ + +/* + * Port B + * bit 0 - PCM1716 latch + * bit 1 - PCM1716 clock + * bit 2 - PCM1716 data + * bit 3 - mute control + * bit 4 - LM1972 data + * bit 5 - LM1972 load + * bit 6 - LM1972 clock + * bit 7 - unused + */ + +#define PORTB_1716LATCH (1<<0) +#define PORTB_1716CLOCK (1<<1) +#define PORTB_1716DATA (1<<2) +#define PORTB_MUTE (1<<3) +#define PORTB_1972DATA (1<<4) +#define PORTB_1972LOAD (1<<5) +#define PORTB_1972CLOCK (1<<6) + +/* + * Port D + * bits 0-7 are LCD databus + */ + +/* + * Port E + * bit 0 - LCD data latch ('E' on LCD 6800 bus) + * bit 1 - LCD address (A0 on LCD 6800 bus) + * bit 2 - LCD backlight PSU enable + */ + +/* Mercury specific declarations */ + +/* + * Input + */ +#define MERCURY_INPUT_MAJOR (242) +#define MERCURY_IRQ_INPUT 14 /* Modem status interrupt */ +#define MERCURY_IRQ_ROTARYTIMER 8 /* Timer interrupt */ +#define EMPEG_IR_MAGIC 'i' + +/* Set/get the remote control type */ +#define EMPEG_IR_WRITE_TYPE _IOW(EMPEG_IR_MAGIC, 1, int) +#define EMPEG_IR_READ_TYPE _IOR(EMPEG_IR_MAGIC, 2, int) + +/* Set/get the delay before repeats are honoured (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTDELAY _IOW(EMPEG_IR_MAGIC, 3, unsigned long) +#define EMPEG_IR_READ_RPTDELAY _IOR(EMPEG_IR_MAGIC, 4, unsigned long) + +/* Set/get the interval between repeats (in microseconds) + * Cannot be greater than one second. */ +#define EMPEG_IR_WRITE_RPTINT _IOW(EMPEG_IR_MAGIC, 4, unsigned long) +#define EMPEG_IR_READ_RPTINT _IOR(EMPEG_IR_MAGIC, 5, unsigned long) + +/* Set/get the timeout for a repeat occuring. If a repeat code happens + * after this amount of time without one then it will be ignored. */ +#define EMPEG_IR_WRITE_RPTTMOUT _IOW(EMPEG_IR_MAGIC, 6, unsigned long) +#define EMPEG_IR_READ_RPTTMOUT _IOR(EMPEG_IR_MAGIC, 7, unsigned long) + +#define IR_TYPE_COUNT 1 + +#define IR_TYPE_CAPTURE 0 +#define IR_TYPE_KENWOOD 1 + +/* + * Display + */ +#define EMPEG_DISPLAY_MAJOR (244) + +/* Empeg Display ioctl values */ +#define EMPEG_DISPLAY_MAGIC 'd' + +#define EMPEG_DISPLAY_REFRESH _IO(EMPEG_DISPLAY_MAGIC, 0) +#define EMPEG_DISPLAY_POWER _IOW(EMPEG_DISPLAY_MAGIC, 1, int) +#define EMPEG_DISPLAY_ENQUEUE _IO(EMPEG_DISPLAY_MAGIC, 6) +#define EMPEG_DISPLAY_POPQUEUE _IO(EMPEG_DISPLAY_MAGIC, 7) +#define EMPEG_DISPLAY_FLUSHQUEUE _IO(EMPEG_DISPLAY_MAGIC, 8) +#define EMPEG_DISPLAY_QUERYQUEUEFREE _IOR(EMPEG_DISPLAY_MAGIC, 9, int) + +#ifndef __ASSEMBLY__ +#ifdef __KERNEL__ +extern void audio_emitted_action(void); +#endif +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/ide.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/ide.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/ide.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/io.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/io.h 2000-03-22 12:29:59.000000000 +0000 @@ -0,0 +1,119 @@ +/* + * linux/include/asm-arm/arch-clps7110/io.h + * + * Written 1998,1999 by Werner Almesberger + * Strongly inspired by the other asm-atm/arch-*?/io.h files + */ + +#ifndef __ASM_ARCH_IO_H +#define __ASM_ARCH_IO_H + +/* No delayed IO required */ + +#undef ARCH_IO_DELAY + +/* + * Use outb/outl/inb/etc. for PC-style hardware. In our case, that's + * everything in the CF/PCMCIA slot. + */ + +#if 1 +#define __inb(p) (*(volatile uint8_t *) PCMCIA_IO8(p)) +#define __outb(v,p) (*(volatile uint8_t *) PCMCIA_IO8(p) = (v)) +#define __inw(p) (*(volatile uint16_t *) PCMCIA_IO16(p)) +#define __outw(v,p) (*(volatile uint16_t *) PCMCIA_IO16(p) = (v)) +#else +#define __inb(p) ({ uint8_t v; \ + v = *(volatile uint8_t *) PCMCIA_IO8(p); \ + printk("inb(0x%x) = 0x%02x\n",p,v); v;}) +#define __outb(v,p) ({ uint8_t _v = (v); \ + printk("outb(0x%x) := 0x%02x\n",p,_v); \ + *(volatile uint8_t *) PCMCIA_IO8(p) = _v;}) +#define __inw(p) ({ uint16_t v; \ + v = *(volatile uint32_t *) PCMCIA_IO16(p) & 0xffff; \ + if (p != 0x1f0) \ + /*printk("inw(0x%x) = 0x%04x\n",p,v)*/; v;}) +#define __outw(v,p) ({ uint16_t _v = (v); \ + printk("outw(0x%x) := 0x%04x\n",p,_v); \ + *(volatile uint32_t *) PCMCIA_IO16(p) = _v;}) +#endif +#define __inl(p) ({ panic("__inl"); }) +#define __outl(v,p) panic("__outl") + +#if 0 +#define DECLARE_DYN_OUT(fnsuffix,instr) \ + extern __inline__ void __out##fnsuffix(unsigned int value,unsigned int port) \ + { \ + __asm__ __volatile__( \ + "str" ##instr## " %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); \ + } + + +#define DECLARE_DYN_IN(sz,fnsuffix,instr) \ + extern __inline__ unsigned sz __in##fnsuffix(unsigned int port) \ + { \ + unsigned long value; \ + __asm__ __volatile__( \ + "ldr" ##instr## " %0,[%1,%2]" \ + : "=&r" (value) : "r" (IO_BASE), "Jr" (port)); \ + return (unsigned sz) value; \ + } + + +extern __inline__ unsigned int __ioaddr(unsigned int port) +{ + return (unsigned int) (IO_BASE + port); +} + + +#define DECLARE_IO(sz,fnsuffix,instr) \ + DECLARE_DYN_OUT(fnsuffix,instr) \ + DECLARE_DYN_IN(sz,fnsuffix,instr) + +DECLARE_IO(char,b,"b") +/* The ARM710 doesn't support strh/ldrh */ +DECLARE_IO(long,l,"") + +#undef DECLARE_IO +#undef DECLARE_DYN_OUT +#undef DECLARE_DYN_IN + +/* Constant-address functions */ + +#define __outbc(value,port) \ + ({ __asm__ __volatile__( \ + "strb %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); }) + +#define __inbc(port) \ + ({ unsigned char result; \ + __asm__ __volatile__( \ + "ldrb %0,[%1,%2]" \ + : "=r" (result) : "r" (IO_BASE), "Jr" (port)); \ + result; }) + +#define __outlc(value,port) \ + ({ __asm__ __volatile__( \ + "str %0,[%1,%2]" \ + : : "r" (value), "r" (IO_BASE), "Jr" (port)); }) + +#define __inlc(port) \ + ({ unsigned long result; \ + __asm__ __volatile__( \ + "ldr %0,[%1,%2]" \ + : "=r" (result) : "r" (IO_BASE), "Jr" (port)); \ + result; }) + +#define __ioaddrc(port) ((unsigned long) (IO_BASE+port) + +/* Translated IO: address is already virtual address */ + +#define outb_t(v,p) (*(volatile unsigned char *) (p) = (v)) +#define inb_t(v,p) (*(volatile unsigned char *) (p)) +#define outl_t(v,p) (*(volatile unsigned long *) (p) = (v)) +#define inl_t(v,p) (*(volatile unsigned long *)) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/irq.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/irq.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/irq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/irq.h 2007-07-10 12:31:24.000000000 +0100 @@ -0,0 +1,53 @@ +/* + * include/asm-arm/arch-clps7212/irq.h + * + * Written 1998,1999 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_IRQ_H +#define _ASM_ARCH_IRQ_H + +#include +#include +#include + + +#define fixup_irq(x) (x) + +static void clps7212_mask_irq(unsigned int irq) +{ +#ifdef DEBUG_IRQ + printk ("masking IRQ:%d\n",irq); +#endif + IO_INTMR &= ~(1 << irq); +} + + +static void clps7212_unmask_irq(unsigned int irq) +{ +#ifdef DEBUG_IRQ + printk("unmasking IRQ:%d\n" ,irq); +#endif + IO_INTMR |= 1 << irq; +} + +static __inline__ void irq_init_irq(void) +{ + int i; + +#ifdef DEBUG_IRQ + printk("Disabling all ints..\n"); +#endif + IO_INTMR = 0; /* disable all interrupts */ + IO_INTMR2 = 0; + IO_INTMR3 = 0; + for (i = 0; i < NR_IRQS; i++) { + irq_desc[i].valid = 1; + irq_desc[i].probe_ok = 1; + irq_desc[i].mask_ack = clps7212_mask_irq; + irq_desc[i].mask = clps7212_mask_irq; + irq_desc[i].unmask = clps7212_unmask_irq; + } +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/irqs.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/irqs.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/irqs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/irqs.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * linux/include/asm-arm/arch-clps7212/irqs.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_IRQS_H +#define _ASM_ARCH_IRQS_H + +/* + * For descriptions, see hardware.h + */ + +#define NR_IRQS 16 + +#define IRQ_EXTFIQ 0 +#define IRQ_BLINT 1 +#define IRQ_WEINT 2 +#define IRQ_MCINT 3 +#define IRQ_CSINT 4 +#define IRQ_EINT1 5 +#define IRQ_EINT2 6 +#define IRQ_EINT3 7 +#define IRQ_TC1OI 8 +#define IRQ_TC2OI 9 +#define IRQ_RTCMI 10 +#define IRQ_TINT 11 +#define IRQ_UTXINT 12 +#define IRQ_URXINT 13 +#define IRQ_UMSINT 14 +#define IRQ_SSEOTI 15 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/memory.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/memory.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/memory.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/memory.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,63 @@ +/* + * linux/include/asm-arm/arch-clps7212/mmu.h + * + * Written 1998,1999 by Werner Almesberger + * + * General memory mapping definitions plus special functions to help managing + * physically fragmented memory. + */ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + + +/* + * Task size: 3GB + */ +#define TASK_SIZE (0xc0000000UL) + +/* + * Page offset: 3GB + */ +#define PAGE_OFFSET (0xc0000000UL) + + +#include + +#define FRAG_LIST_START 0xc0000400 /* @@@ fix this later */ +#define frag_list ((struct frag_list_entry *) FRAG_LIST_START) + + +#ifndef __ASSEMBLY__ + +struct frag_list_entry { + unsigned long start; /* physical start address */ + unsigned long size; /* size (in bytes) */ +}; + +#endif + +#ifndef __ASSEMBLY__ + +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) __phys_to_virt(x) + +#ifndef KMEM_IS_VIRTUAL + +#define __virt_to_phys__is_a_macro +#define __virt_to_phys(vpage) vpage +#define __phys_to_virt__is_a_macro +#define __phys_to_virt(ppage) ppage + +#else /* KMEM_IS_VIRTUAL */ + +extern unsigned long __virt_to_phys(unsigned long vpage); +extern unsigned long __phys_to_virt(unsigned long ppage); + +#endif /* KMEM_IS_VIRTUAL */ + +#endif /* __ASSEMBLY__ */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/mmu_clps7212.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/mmu_clps7212.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/mmu_clps7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/mmu_clps7212.h 2000-03-14 18:16:59.000000000 +0000 @@ -0,0 +1,25 @@ +/* + * linux/include/asm-arm/arch-clps7212/mmu_clps7212.h + * + * Written 1998,1999 by Werner Almesberger + */ + +/* Included by mmu.h */ + + +#ifndef __ASM_ARCH_MMU_CLPS7212_H +#define __ASM_ARCH_MMU_CLPS7212_H + +#define VCONT_TABLE_START 0x00010000 /* offset of page tables + (from RAM base) */ +#define VCONT_TABLES 64 /* map up to 64 MB */ + + +#ifndef __ASSEMBLY__ + +void setup_frag_p2v_lookup_table(void); +void setup_frag_v2p_lookup_table(void); + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/param.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/param.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1,17 @@ +/* + * linux/include/asm-arm/arch-clps7110/param.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_PARAM_H +#define _ASM_ARCH_PARAM_H + +/* + * Considering asm-arm/arch-*?/param.h, we don't seem to have much of a + * choice ;-) + */ + +#define HZ 100 + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/pm.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/pm.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/pm.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/pm.h 2000-07-05 18:43:34.000000000 +0100 @@ -0,0 +1,3 @@ +/* This file intentionally left blank. */ + +/* But not too blank otherwise make distclean deletes it. */ diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/processor.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/processor.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1 @@ +#include diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/shmparam.h 2000-03-14 18:12:45.000000000 +0000 @@ -0,0 +1 @@ +/* ? */ diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/system.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/system.h 2000-06-14 20:23:37.000000000 +0100 @@ -0,0 +1,50 @@ +/* + * linux/include/asm-arm/arch-clps7212/system.h + * + */ + +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +extern __inline__ void arch_reset(char mode) +{ + __asm__("mrs r0,cpsr\n" + "orr r0,r0,#192\n" + "msr cpsr,r0\n" /* Disable IRQs & FIQs */ + "mov r0,#0\n" + "mcr p15,0,r0,c7,c7\n" /* Flush cache */ + "mov r0,#0x30\n" + "mcr p15,0,r0,c1,c0\n" + "mov r0,r0\n" /* nop */ + "mov pc,#0\n"); /* bang */ + /* + * If we're still alive, just loop. + */ + while (1); +} + +extern __inline__ void arch_power_off(void) +{ + /* Put the CPU into standby mode */ + IO_STDBY=1; +} + +#if 0 +#define ARCH_IDLE_OK + +#define arch_start_idle() /* power-saving ? @@@ */ +#define arch_end_idle() /* power-saving ? @@@ */ +#endif + +#undef proc_idle /* ours is better than proc/system.h's */ +extern __inline__ void proc_idle(void) +{ + /* Put the CPU into idle mode */ + IO_HALT=1; + + /* 2 nops afterwards to help CPU restart quickly */ + __asm__("mov r0,r0\n" + "mov r0,r0\n"); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/time.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/time.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/time.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/time.h 2007-07-10 12:31:29.000000000 +0100 @@ -0,0 +1,74 @@ +/* + * linux/include/asm-arm/arch-clps7212/time.h + * + * Written 1998,1999 by Werner Almesberger + * + */ + +#ifndef _ASM_ARCH_TIME_H +#define _ASM_ARCH_TIME_H + +#include + + +extern __inline__ unsigned long gettimeoffset(void) +{ + int offsetinticks; + + /* We are called with IRQs disabled: get current timer offset */ + offsetinticks=(LATCH-(IO_TC2D&0xffff)); + + /* Has a timer irq (counter rollover) happened since disabling IRQs? */ + if (IO_INTSR&TC2OI) offsetinticks+=LATCH; + + return (offsetinticks*tick)/LATCH; +} + + +static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + unsigned long flags; + + /* We do this whole routine with IRQs disabled. If we're interrupted, + and the interrupt does a gettimeoffset, the clearing of the TC2 + interrupt and the incrementing of the lostticks count have to be + atomic! */ + save_flags_cli(flags); + do_timer(regs); + IO_TC2EOI = 0; /* reset timer interrupt */ + restore_flags(flags); +} + + +/* + * Writing back the time to RTC isn't supported yet. + */ + + +#define update_rtc() + + +/* + * Set up timer interrupt, and return the current time in seconds. + */ + +static struct irqaction timerirq = { + timer_interrupt, + 0, + 0, + "timer", + NULL, + NULL +}; + + +extern __inline__ void setup_timer(void) +{ + /* Timer 2: 512 kHz, Pre-scale mode */ + IO_SYSCON |= TC2M | TC2S; + IO_TC2D = LATCH; + IO_TC2EOI = 0; + setup_arm_irq(IRQ_TC2OI, &timerirq); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/timex.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/timex.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/timex.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/timex.h 2000-03-23 12:03:42.000000000 +0000 @@ -0,0 +1,12 @@ +/* + * linux/include/asm-arm/arch-clps7212/timex.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef _ASM_ARCH_TIMEX_H +#define _ASM_ARCH_TIMEX_H + +#define CLOCK_TICK_RATE 512000 /* 512 KHz */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/arch/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm-arm/arch/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/arch/uncompress.h 2000-03-28 19:23:33.000000000 +0100 @@ -0,0 +1,34 @@ +/* + * linux/include/asm-arm/arch-clps7110/uncompress.h + * + * Written 1998 by Werner Almesberger + */ + +#ifndef __ASM_ARCH_UNCOMPRESS_H +#define __ASM_ARCH_UNCOMPRESS_H + +static volatile unsigned char *uart=(volatile unsigned char*)0xd0000480; +static volatile unsigned int *sysflg=(volatile unsigned int*)0xd0000140; + +static void puts(const char *s) +{ + + do { + /* Write char at time */ + while((*sysflg)&(1<<23)); + if ((*uart=*s)==10) { + while((*sysflg)&(1<<23)); + *uart=13; + } + } while(*++s); + while((*sysflg)&(1<<11)); +} + +/* + * No (de)compression yet + */ + +#define arch_decomp_setup() +#define arch_decomp_wdog() + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/checksum.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/checksum.h --- linux-2.2.14-rmk-mercury/include/asm-arm/checksum.h 2000-03-10 15:46:49.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/checksum.h 2007-07-10 12:46:28.000000000 +0100 @@ -73,26 +73,25 @@ { unsigned int sum, tmp1; - __asm__ __volatile__(" - sub %2, %2, #5 - ldr %0, [%1], #4 - ldr %3, [%1], #4 - adds %0, %0, %3 - ldr %3, [%1], #4 - adcs %0, %0, %3 - ldr %3, [%1], #4 - adcs %0, %0, %3 -1: ldr %3, [%1], #4 - adcs %0, %0, %3 - tst %2, #15 - subne %2, %2, #1 - bne 1b - adc %0, %0, #0 - adds %0, %0, %0, lsl #16 - addcs %0, %0, #0x10000 - mvn %0, %0 - mov %0, %0, lsr #16 - " + __asm__ __volatile__( +" sub %2, %2, #5\n" +" ldr %0, [%1], #4\n" +" ldr %3, [%1], #4\n" +" adds %0, %0, %3\n" +" ldr %3, [%1], #4\n" +" adcs %0, %0, %3\n" +" ldr %3, [%1], #4\n" +" adcs %0, %0, %3\n" +"1: ldr %3, [%1], #4\n" +" adcs %0, %0, %3\n" +" tst %2, #15\n" +" subne %2, %2, #1\n" +" bne 1b\n" +" adc %0, %0, #0\n" +" adds %0, %0, %0, lsl #16\n" +" addcs %0, %0, #0x10000\n" +" mvn %0, %0\n" +" mov %0, %0, lsr #16\n" : "=&r" (sum), "=&r" (iph), "=&r" (ihl), "=&r" (tmp1) : "1" (iph), "2" (ihl)); return(sum); @@ -104,9 +103,9 @@ static inline unsigned int csum_fold(unsigned int sum) { - __asm__(" - adds %0, %0, %0, lsl #16 - addcs %0, %0, #0x10000" + __asm__( +" adds %0, %0, %0, lsl #16\n" +" addcs %0, %0, #0x10000" : "=r" (sum) : "0" (sum)); return (~sum) >> 16; @@ -116,11 +115,11 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, unsigned short proto, unsigned int sum) { - __asm__(" - adds %0, %1, %2 - adcs %0, %0, %3 - adcs %0, %0, %4 - adc %0, %0, #0" + __asm__( +" adds %0, %1, %2\n" +" adcs %0, %0, %3\n" +" adcs %0, %0, %4\n" +" adc %0, %0, #0" : "=&r"(sum) : "r" (sum), "r" (daddr), "r" (saddr), "r" ((ntohs(len)<<16)+proto*256)); return sum; diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/current.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/current.h --- linux-2.2.14-rmk-mercury/include/asm-arm/current.h 2000-03-10 15:46:49.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/current.h 2007-07-10 12:18:33.000000000 +0100 @@ -11,10 +11,10 @@ static inline struct task_struct *get_current(void) { struct task_struct *ts; - __asm__ __volatile__(" - bic %0, sp, #0x1f00 - bic %0, %0, #0x00ff - " : "=r" (ts)); + __asm__ __volatile__( +" bic %0, sp, #0x1f00\n" +" bic %0, %0, #0x00ff" + : "=r" (ts)); return ts; } diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/assembler.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/assembler.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/assembler.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/assembler.h 2007-07-10 14:03:03.000000000 +0100 @@ -0,0 +1,86 @@ +/* + * linux/asm-arm/proc-armv/assembler.h + * + * Copyright (C) 1996 Russell King + * + * This file contains arm architecture specific defines + * for the different processors + */ +#ifndef __ASSEMBLY__ +#error "Only include this from assembly code" +#endif + +#define MODE_USR USR_MODE +#define MODE_FIQ FIQ_MODE +#define MODE_IRQ IRQ_MODE +#define MODE_SVC SVC_MODE + +#define DEFAULT_FIQ MODE_FIQ + +/* + * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) + * RETINSTR - return instruction (eg, mov pc, lr) + */ +#ifdef __STDC__ +#define LOADREGS(cond, base, reglist...)\ + ldm##cond base,reglist + +#define RETINSTR(instr, regs...)\ + instr regs +#else +#define LOADREGS(cond, base)\ + ldm/**/cond base, + +#define RETINSTR(instr, a,b)\ + instr a,b +#endif + +/* + * No nop required after mode change + */ +#define MODENOP + +/* + * Change to `mode' + */ +#define MODE(savereg,tmpreg,mode) \ + mrs savereg, cpsr; \ + bic tmpreg, savereg, $0x1f; \ + orr tmpreg, tmpreg, $mode; \ + msr cpsr, tmpreg + +/* + * Restore mode + */ +#define RESTOREMODE(savereg) \ + msr cpsr, savereg + +/* + * save interrupt state (uses stack) + */ +#define SAVEIRQS(tmpreg)\ + mrs tmpreg, cpsr; \ + str tmpreg, [sp, $-4]! + +/* + * restore interrupt state (uses stack) + */ +#define RESTOREIRQS(tmpreg)\ + ldr tmpreg, [sp], $4; \ + msr cpsr, tmpreg + +/* + * disable IRQs + */ +#define DISABLEIRQS(tmpreg)\ + mrs tmpreg , cpsr; \ + orr tmpreg , tmpreg , $I_BIT; \ + msr cpsr, tmpreg + +/* + * enable IRQs + */ +#define ENABLEIRQS(tmpreg)\ + mrs tmpreg , cpsr; \ + bic tmpreg , tmpreg , $I_BIT; \ + msr cpsr, tmpreg diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/domain.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/domain.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/domain.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/domain.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * linux/include/asm-arm/proc-armv/domain.h + * + * Copyright (C) 1999 Russell King. + */ +#ifndef __ASM_PROC_DOMAIN_H +#define __ASM_PROC_DOMAIN_H + +/* + * Domain numbers + * + * DOMAIN_IO - domain 2 includes all IO only + * DOMAIN_KERNEL - domain 1 includes all kernel memory only + * DOMAIN_USER - domain 0 includes all user memory only + */ +#define DOMAIN_USER 0 +#define DOMAIN_KERNEL 1 +#define DOMAIN_TABLE 1 +#define DOMAIN_IO 2 + +/* + * Domain types + */ +#define DOMAIN_NOACCESS 0 +#define DOMAIN_CLIENT 1 +#define DOMAIN_MANAGER 3 + +#define domain_val(dom,type) ((type) << 2*(dom)) + +#define set_domain(x) \ + do { \ + __asm__ __volatile__( \ + "mcr p15, 0, %0, c3, c0 @ set domain" \ + : : "r" (x)); \ + } while (0) + +#define modify_domain(dom,type) \ + do { \ + unsigned int domain = current->tss.domain; \ + domain &= ~domain_val(dom, DOMAIN_MANAGER); \ + domain |= domain_val(dom, type); \ + current->tss.domain = domain; \ + set_domain(current->tss.domain); \ + } while (0) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/elf.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/elf.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/elf.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/elf.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,21 @@ +/* + * ELF definitions for 32-bit CPUs + */ + +#define ELF_EXEC_PAGESIZE 4096 + +/* We can execute both 32-bit and 26-bit code. */ +#define ELF_PROC_OK(x) (1) + +#ifdef __KERNEL__ + +#if 0 /* not yet */ +#define SET_PERSONALITY(ex,ibcs2) \ + current_personality = (ex->e_flags & EF_ARM_APCS26) ? \ + PER_LINUX : PER_LINUX_32BIT +#else +#define SET_PERSONALITY(ex,ibcs2) \ + current->personality = PER_LINUX_32BIT +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/io.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/io.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/io.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/io.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,35 @@ +/* + * linux/include/asm-arm/proc-armv/io.h + */ + +/* + * The caches on some architectures aren't dma-coherent and have need to + * handle this in software. There are two types of operations that + * can be applied to dma buffers. + * + * - dma_cache_wback_inv(start, size) makes caches and RAM coherent by + * writing the content of the caches back to memory, if necessary. + * The function also invalidates the affected part of the caches as + * necessary before DMA transfers from outside to memory. + * - dma_cache_inv(start, size) invalidates the affected parts of the + * caches. Dirty lines of the caches may be written back or simply + * be discarded. This operation is necessary before dma operations + * to the memory. + * - dma_cache_wback(start, size) writes back any dirty lines but does + * not invalidate the cache. This can be used before DMA reads from + * memory, + */ + +#include + +#define dma_cache_inv(start, size) \ + do { processor.u.armv3v4._cache_purge_area((unsigned long)(start), \ + ((unsigned long)(start)+(size))); } while (0) + +#define dma_cache_wback(start, size) \ + do { processor.u.armv3v4._cache_wback_area((unsigned long)(start), \ + ((unsigned long)(start)+(size))); } while (0) + +#define dma_cache_wback_inv(start, size) \ + do { processor.u.armv3v4._flush_cache_area((unsigned long)(start), \ + ((unsigned long)(start)+(size)), 0); } while (0) diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/mm-init.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/mm-init.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/mm-init.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/mm-init.h 2007-07-10 12:31:31.000000000 +0100 @@ -0,0 +1,177 @@ +/* + * linux/include/asm-arm/proc-armv/mm-init.h + * + * Copyright (C) 1996 Russell King + * + * This contains the code to setup the memory map on an ARM v3 or v4 machine. + * This is both processor & architecture specific, and requires some + * more work to get it to fit into our separate processor and architecture + * structure. + */ + +/* + * On ebsa, we want the memory map set up so: + * + * PHYS VIRT + * 00000000 00000000 Zero page + * 000003ff 000003ff Zero page end + * 00000000 c0000000 Kernel and all physical memory + * 01ffffff c1ffffff End of physical (32MB) + * e0000000 e0000000 IO start + * ffffffff ffffffff IO end + * + * On rpc, we want: + * + * PHYS VIRT + * 10000000 00000000 Zero page + * 100003ff 000003ff Zero page end + * 10000000 c0000000 Kernel and all physical memory + * 1fffffff cfffffff End of physical (32MB) + * 02000000 d?000000 Screen memory (first image) + * 02000000 d8000000 Screen memory (second image) + * 00000000 df000000 StrongARM cache invalidation area + * 03000000 e0000000 IO start + * 03ffffff e0ffffff IO end + * + * We set it up using the section page table entries. + */ +#include + +#define PTE_SIZE (PTRS_PER_PTE * BYTES_PER_PTR) + +extern unsigned long setup_io_pagetables(unsigned long start_mem); + +/* + * Add a SECTION mapping between VIRT and PHYS in domain DOMAIN with protection PROT + */ +static inline void +alloc_init_section(unsigned long *mem, unsigned long virt, unsigned long phys, int domain, int prot) +{ + pgd_t *pgdp; + pmd_t *pmdp, pmd; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + pmd_val(pmd) = phys | PMD_TYPE_SECT | PMD_DOMAIN(domain) | prot; + set_pmd(pmdp, pmd); +} + +/* + * Clear any mapping + */ +static inline void +free_init_section(unsigned long virt) +{ + pgd_t *pgdp; + pmd_t *pmdp; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + pmd_clear(pmdp); +} + +/* + * Add a PAGE mapping between VIRT and PHYS in domain DOMAIN with protection PROT + */ +static inline void +alloc_init_page(unsigned long *mem, unsigned long virt, unsigned long phys, int domain, int prot) +{ + pgd_t *pgdp; + pmd_t *pmdp; + pte_t *ptep; + + pgdp = pgd_offset_k(virt); + pmdp = pmd_offset(pgdp, virt); + + if (pmd_none(*pmdp)) { + unsigned long memory = *mem; + + memory = (memory + PTE_SIZE - 1) & ~(PTE_SIZE - 1); + + ptep = (pte_t *)memory; + memzero(ptep, PTE_SIZE); + memory += PTE_SIZE; + + ptep = (pte_t *)memory; + memzero(ptep, PTE_SIZE); + + set_pmd(pmdp, __mk_pmd(ptep, PMD_TYPE_TABLE | PMD_DOMAIN(domain))); + + *mem = memory + PTE_SIZE; + } + + ptep = pte_offset(pmdp, virt); + + set_pte(ptep, mk_pte_phys(phys, __pgprot(prot))); +} + +static inline unsigned long +setup_pagetables(unsigned long start_mem, unsigned long end_mem) +{ + unsigned long address = 0; + + do { + if (address >= PAGE_OFFSET && address < end_mem) + /* + * map in physical ram & kernel + */ + alloc_init_section(&start_mem, address, __virt_to_phys(address), DOMAIN_KERNEL, + PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE | PMD_SECT_AP_WRITE); + else + /* + * unmap everything else + */ + free_init_section(address); + + address += PGDIR_SIZE; + } while (address != 0); + + /* + * An area to invalidate the cache + */ + alloc_init_section(&start_mem, FLUSH_BASE, FLUSH_BASE_PHYS, DOMAIN_KERNEL, + PMD_SECT_CACHEABLE | PMD_SECT_AP_READ); + + /* + * Now set up our IO mappings + */ + start_mem = setup_io_pagetables(start_mem); + + /* + * map in zero page + */ + alloc_init_page(&start_mem, 0, __virt_to_phys(PAGE_OFFSET), + DOMAIN_USER, L_PTE_CACHEABLE | L_PTE_YOUNG | L_PTE_PRESENT); + + flush_cache_all(); + + return start_mem; +} + +static inline +void mark_usable_memory_areas(unsigned long *start_mem, unsigned long end_mem) +{ + unsigned long smem; + + *start_mem = smem = PAGE_ALIGN(*start_mem); + + /* + * Mark all of memory from the end of kernel to end of memory + */ + while (smem < end_mem) { + clear_bit(PG_reserved, &mem_map[MAP_NR(smem)].flags); + smem += PAGE_SIZE; + } + + /* + * Mark memory from page 1 to start of the swapper page directory + */ + smem = PAGE_OFFSET + PAGE_SIZE; + while (smem < (unsigned long)&swapper_pg_dir) { + clear_bit(PG_reserved, &mem_map[MAP_NR(smem)].flags); + smem += PAGE_SIZE; + } +} + diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/page.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/page.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/page.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/page.h 2007-07-10 12:15:57.000000000 +0100 @@ -0,0 +1,73 @@ +/* + * linux/include/asm-arm/proc-armv/page.h + * + * Copyright (C) 1995, 1996 Russell King + */ + +#ifndef __ASM_PROC_PAGE_H +#define __ASM_PROC_PAGE_H + +#include + +/* PAGE_SHIFT determines the page size */ +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) + +#ifdef __KERNEL__ + +#define STRICT_MM_TYPECHECKS + +#ifdef STRICT_MM_TYPECHECKS +/* + * These are used to make use of C type-checking.. + */ +typedef struct { unsigned long pte; } pte_t; +typedef struct { unsigned long pmd; } pmd_t; +typedef struct { unsigned long pgd; } pgd_t; +typedef struct { unsigned long pgprot; } pgprot_t; + +#define pte_val(x) ((x).pte) +#define pmd_val(x) ((x).pmd) +#define pgd_val(x) ((x).pgd) +#define pgprot_val(x) ((x).pgprot) + +#define __pte(x) ((pte_t) { (x) } ) +#define __pmd(x) ((pmd_t) { (x) } ) +#define __pgd(x) ((pgd_t) { (x) } ) +#define __pgprot(x) ((pgprot_t) { (x) } ) + +#else +/* + * .. while these make it easier on the compiler + */ +typedef unsigned long pte_t; +typedef unsigned long pmd_t; +typedef unsigned long pgd_t; +typedef unsigned long pgprot_t; + +#define pte_val(x) (x) +#define pmd_val(x) (x) +#define pgd_val(x) (x) +#define pgprot_val(x) (x) + +#define __pte(x) (x) +#define __pmd(x) (x) +#define __pgd(x) (x) +#define __pgprot(x) (x) + +#endif + +/* to align the pointer to the (next) page boundary */ +#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) + +/* This handles the memory map.. */ +#ifndef PAGE_OFFSET +#define PAGE_OFFSET 0xc0000000 +#endif + +#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT) + +#endif /* __KERNEL__ */ + +#endif /* __ASM_PROC_PAGE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/param.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/param.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/param.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/param.h 2007-07-10 11:46:47.000000000 +0100 @@ -0,0 +1,25 @@ +/* + * linux/include/asm-arm/proc-armv/param.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_PROC_PARAM_H +#define __ASM_PROC_PARAM_H + +#include /* for HZ */ + +#define EXEC_PAGESIZE 4096 + +#ifndef NGROUPS +#define NGROUPS 32 +#endif + +#ifndef NOGROUP +#define NOGROUP (-1) +#endif + +#define MAXHOSTNAMELEN 64 /* max length of hostname */ + +#endif + diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/pgtable.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/pgtable.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/pgtable.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/pgtable.h 2007-07-10 12:25:49.000000000 +0100 @@ -0,0 +1,627 @@ +/* + * linux/include/asm-arm/proc-armv/pgtable.h + * + * Copyright (C) 1995-1999 Russell King + * + * 12-Jan-1997 RMK Altered flushing routines to use function pointers + * now possible to combine ARM6, ARM7 and StrongARM versions. + * 17-Apr-1999 RMK Now pass an area size to clean_cache_area and + * flush_icache_area. + */ +#ifndef __ASM_PROC_PGTABLE_H +#define __ASM_PROC_PGTABLE_H + +#include /* For TASK_SIZE */ +#include + +#define LIBRARY_TEXT_START 0x0c000000 + +/* + * Cache flushing... + */ +#define flush_cache_all() \ + processor.u.armv3v4._flush_cache_all() + +#define flush_cache_mm(_mm) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_cache_all(); \ + } while (0) + +#define flush_cache_range(_mm,_start,_end) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_cache_area \ + ((_start), (_end), 1); \ + } while (0) + +#define flush_cache_page(_vma,_vmaddr) \ + do { \ + if ((_vma)->vm_mm == current->mm) \ + processor.u.armv3v4._flush_cache_area \ + ((_vmaddr), (_vmaddr) + PAGE_SIZE, \ + ((_vma)->vm_flags & VM_EXEC) ? 1 : 0); \ + } while (0) + +#define clean_cache_range(_start,_end) \ + do { \ + unsigned long _s, _sz; \ + _s = (unsigned long)_start; \ + _sz = (unsigned long)_end - _s; \ + processor.u.armv3v4._clean_cache_area(_s, _sz); \ + } while (0) + +#define clean_cache_area(_start,_size) \ + do { \ + unsigned long _s; \ + _s = (unsigned long)_start; \ + processor.u.armv3v4._clean_cache_area(_s, _size); \ + } while (0) + +#define flush_icache_range(_start,_end) \ + processor.u.armv3v4._flush_icache_area((_start), (_end) - (_start)) + +/* + * We don't have a MEMC chip... + */ +#define update_memc_all() do { } while (0) +#define update_memc_task(tsk) do { } while (0) +#define update_memc_mm(mm) do { } while (0) +#define update_memc_addr(mm,addr,pte) do { } while (0) + +/* + * This flushes back any buffered write data. We have to clean and flush the entries + * in the cache for this page. Is it necessary to invalidate the I-cache? + */ +#define flush_page_to_ram(_page) \ + processor.u.armv3v4._flush_ram_page ((_page) & PAGE_MASK); + +/* + * TLB flushing: + * + * - flush_tlb() flushes the current mm struct TLBs + * - flush_tlb_all() flushes all processes TLBs + * - flush_tlb_mm(mm) flushes the specified mm context TLB's + * - flush_tlb_page(vma, vmaddr) flushes one page + * - flush_tlb_range(mm, start, end) flushes a range of pages + * + * GCC uses conditional instructions, and expects the assembler code to do so as well. + * + * We drain the write buffer in here to ensure that the page tables in ram + * are really up to date. It is more efficient to do this here... + */ +#define flush_tlb() flush_tlb_all() + +#define flush_tlb_all() \ + processor.u.armv3v4._flush_tlb_all() + +#define flush_tlb_mm(_mm) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_tlb_all(); \ + } while (0) + +#define flush_tlb_range(_mm,_start,_end) \ + do { \ + if ((_mm) == current->mm) \ + processor.u.armv3v4._flush_tlb_area \ + ((_start), (_end), 1); \ + } while (0) + +#define flush_tlb_page(_vma,_vmaddr) \ + do { \ + if ((_vma)->vm_mm == current->mm) \ + processor.u.armv3v4._flush_tlb_area \ + ((_vmaddr), (_vmaddr) + PAGE_SIZE, \ + ((_vma)->vm_flags & VM_EXEC) ? 1 : 0); \ + } while (0) + +/* + * PMD_SHIFT determines the size of the area a second-level page table can map + */ +#define PMD_SHIFT 20 +#define PMD_SIZE (1UL << PMD_SHIFT) +#define PMD_MASK (~(PMD_SIZE-1)) + +/* + * PGDIR_SHIFT determines what a third-level page table entry can map + */ +#define PGDIR_SHIFT 20 +#define PGDIR_SIZE (1UL << PGDIR_SHIFT) +#define PGDIR_MASK (~(PGDIR_SIZE-1)) + +/* + * entries per page directory level: the sa110 is two-level, so + * we don't really have any PMD directory physically. + */ +#define PTRS_PER_PTE 256 +#define PTRS_PER_PMD 1 +#define PTRS_PER_PGD 4096 +#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) + + +/* Just any arbitrary offset to the start of the vmalloc VM area: the + * current 8MB value just means that there will be a 8MB "hole" after the + * physical memory until the kernel virtual memory starts. That means that + * any out-of-bounds memory accesses will hopefully be caught. + * The vmalloc() routines leaves a hole of 4kB between each vmalloced + * area for the same reason. ;) + */ +#define VMALLOC_OFFSET (8*1024*1024) +#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) +#define VMALLOC_VMADDR(x) ((unsigned long)(x)) +#define VMALLOC_END (PAGE_OFFSET + 0x10000000) + +#undef TEST_VERIFY_AREA + +/* + * The sa110 doesn't have any external MMU info: the kernel page + * tables contain all the necessary information. + */ +extern __inline__ void update_mmu_cache(struct vm_area_struct * vma, + unsigned long address, pte_t pte) +{ +} + + +/* + * BAD_PAGETABLE is used when we need a bogus page-table, while + * BAD_PAGE is used for a bogus page. + * + * ZERO_PAGE is a global shared page that is always zero: used + * for zero-mapped memory areas etc.. + */ +extern pte_t __bad_page(void); +extern pte_t * __bad_pagetable(void); +extern unsigned long *empty_zero_page; + +#define BAD_PAGETABLE __bad_pagetable() +#define BAD_PAGE __bad_page() +#define ZERO_PAGE(vaddr) ((unsigned long) empty_zero_page) + +/* number of bits that fit into a memory pointer */ +#define BYTES_PER_PTR (sizeof(unsigned long)) +#define BITS_PER_PTR (8*BYTES_PER_PTR) + +/* to align the pointer to a pointer address */ +#define PTR_MASK (~(sizeof(void*)-1)) + +/* sizeof(void*)==1<>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) + +/* to set the page-dir + * Note that we need to flush the cache and TLBs + * if we are affecting the current task. + */ +#define SET_PAGE_DIR(tsk,pgdir) \ +do { \ + tsk->tss.memmap = __virt_to_phys((unsigned long)pgdir); \ + if ((tsk) == current) { \ + flush_cache_all(); \ + __asm__ __volatile__( \ + "mcr%? p15, 0, %0, c2, c0, 0\n" \ + : : "r" (tsk->tss.memmap)); \ + flush_tlb_all(); \ + } \ +} while (0) + + +/* + * The "pgd_xxx()" functions here are trivial for a folded two-level + * setup: the pgd is never bad, and a pmd always exists (as it's folded + * into the pgd entry) + */ +#define pgd_none(pgd) (0) +#define pgd_bad(pgd) (0) +#define pgd_present(pgd) (1) +#define pgd_clear(pgdp) + +/* to find an entry in a kernel page-table-directory */ +#define pgd_offset_k(address) pgd_offset(&init_mm, address) + +/* to find an entry in a page-table-directory */ +extern __inline__ pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) +{ + return mm->pgd + (address >> PGDIR_SHIFT); +} + +extern unsigned long get_page_2k(int priority); +extern void free_page_2k(unsigned long page); + +/* + * Allocate and free page tables. The xxx_kernel() versions are + * used to allocate a kernel page table - this turns on ASN bits + * if any. + */ + +#ifndef __SMP__ +extern struct pgtable_cache_struct { + unsigned long *pgd_cache; + unsigned long *pte_cache; + unsigned long pgtable_cache_sz; +} quicklists; + +#define pgd_quicklist (quicklists.pgd_cache) +#define pmd_quicklist ((unsigned long *)0) +#define pte_quicklist (quicklists.pte_cache) +#define pgtable_cache_size (quicklists.pgtable_cache_sz) +#else +#error Pgtable caches have to be per-CPU, so that no locking is needed. +#endif + +extern pgd_t *get_pgd_slow(void); + +extern __inline__ pgd_t *get_pgd_fast(void) +{ + unsigned long *ret; + + if((ret = pgd_quicklist) != NULL) { + pgd_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + clean_cache_area(ret, 4); + pgtable_cache_size--; + } else + ret = (unsigned long *)get_pgd_slow(); + return (pgd_t *)ret; +} + +extern __inline__ void free_pgd_fast(pgd_t *pgd) +{ + *(unsigned long *)pgd = (unsigned long) pgd_quicklist; + pgd_quicklist = (unsigned long *) pgd; + pgtable_cache_size++; +} + +extern __inline__ void free_pgd_slow(pgd_t *pgd) +{ + free_pages((unsigned long) pgd, 2); +} + +#define pgd_free(pgd) free_pgd_fast(pgd) +#define pgd_alloc() get_pgd_fast() + +extern __inline__ void set_pgdir(unsigned long address, pgd_t entry) +{ + struct task_struct * p; + pgd_t *pgd; + + read_lock(&tasklist_lock); + for_each_task(p) { + if (!p->mm) + continue; + *pgd_offset(p->mm,address) = entry; + } + read_unlock(&tasklist_lock); + for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd) + pgd[address >> PGDIR_SHIFT] = entry; +} + +extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; + +/**************** +* PMD functions * +****************/ + +/* PMD types (actually level 1 descriptor) */ +#define PMD_TYPE_MASK 0x0003 +#define PMD_TYPE_FAULT 0x0000 +#define PMD_TYPE_TABLE 0x0001 +#define PMD_TYPE_SECT 0x0002 +#define PMD_UPDATABLE 0x0010 +#define PMD_SECT_CACHEABLE 0x0008 +#define PMD_SECT_BUFFERABLE 0x0004 +#define PMD_SECT_AP_WRITE 0x0400 +#define PMD_SECT_AP_READ 0x0800 +#define PMD_DOMAIN(x) ((x) << 5) + +#define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_USER)) +#define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL)) + +#define pmd_none(pmd) (!pmd_val(pmd)) +#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0)) +#define pmd_bad(pmd) (pmd_val(pmd) & 2) +#define mk_user_pmd(ptep) __mk_pmd(ptep, _PAGE_USER_TABLE) +#define mk_kernel_pmd(ptep) __mk_pmd(ptep, _PAGE_KERNEL_TABLE) +#define set_pmd(pmdp,pmd) processor.u.armv3v4._set_pmd(pmdp,pmd) + +/* Find an entry in the second-level page table.. */ +#define pmd_offset(dir, address) ((pmd_t *)(dir)) + +extern __inline__ int pmd_present(pmd_t pmd) +{ + return ((pmd_val(pmd) + 1) & 2); +} + +/* We don't use pmd cache, so this is a dummy routine */ +extern __inline__ pmd_t *get_pmd_fast(void) +{ + return (pmd_t *)0; +} + +extern __inline__ void free_pmd_fast(pmd_t *pmd) +{ +} + +extern __inline__ void free_pmd_slow(pmd_t *pmd) +{ +} + +extern void __bad_pmd(pmd_t *pmd); +extern void __bad_pmd_kernel(pmd_t *pmd); + +/* + * allocating and freeing a pmd is trivial: the 1-entry pmd is + * inside the pgd, so has no extra memory associated with it. + */ +extern __inline__ void pmd_free(pmd_t *pmd) +{ +} + +extern __inline__ pmd_t *pmd_alloc(pgd_t *pgd, unsigned long address) +{ + return (pmd_t *) pgd; +} + +#define pmd_free_kernel pmd_free +#define pmd_alloc_kernel pmd_alloc + +extern __inline__ pmd_t __mk_pmd(pte_t *ptep, unsigned long prot) +{ + unsigned long pte_ptr = (unsigned long)ptep; + pmd_t pmd; + + pte_ptr -= PTRS_PER_PTE * BYTES_PER_PTR; + + /* + * The pmd must be loaded with the physical + * address of the PTE table + */ + pmd_val(pmd) = __virt_to_phys(pte_ptr) | prot; + + return pmd; +} + +extern __inline__ unsigned long pmd_page(pmd_t pmd) +{ + unsigned long ptr; + + ptr = pmd_val(pmd) & ~(PTRS_PER_PTE * BYTES_PER_PTR - 1); + + ptr += PTRS_PER_PTE * BYTES_PER_PTR; + + return __phys_to_virt(ptr); +} + + +/**************** +* PTE functions * +****************/ + +/* PTE types (actially level 2 descriptor) */ +#define PTE_TYPE_MASK 0x0003 +#define PTE_TYPE_FAULT 0x0000 +#define PTE_TYPE_LARGE 0x0001 +#define PTE_TYPE_SMALL 0x0002 +#define PTE_AP_READ 0x0aa0 +#define PTE_AP_WRITE 0x0550 +#define PTE_CACHEABLE 0x0008 +#define PTE_BUFFERABLE 0x0004 + +#define pte_none(pte) (!pte_val(pte)) +#define pte_clear(ptep) set_pte(ptep, __pte(0)) + +/* + * Conversion functions: convert a page and protection to a page entry, + * and a page entry and page directory to the page they refer to. + */ +extern __inline__ pte_t mk_pte(unsigned long page, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = __virt_to_phys(page) | pgprot_val(pgprot); + return pte; +} + +/* This takes a physical page address that is used by the remapping functions */ +extern __inline__ pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) +{ + pte_t pte; + pte_val(pte) = physpage + pgprot_val(pgprot); + return pte; +} + +#define set_pte(ptep, pte) processor.u.armv3v4._set_pte(ptep,pte) + +extern __inline__ unsigned long pte_page(pte_t pte) +{ + return __phys_to_virt(pte_val(pte) & PAGE_MASK); +} + +extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted); +extern pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long address_preadjusted); + +extern __inline__ pte_t *get_pte_fast(void) +{ + unsigned long *ret; + + if((ret = (unsigned long *)pte_quicklist) != NULL) { + pte_quicklist = (unsigned long *)(*ret); + ret[0] = ret[1]; + clean_cache_area(ret, 4); + pgtable_cache_size--; + } + return (pte_t *)ret; +} + +extern __inline__ void free_pte_fast(pte_t *pte) +{ + *(unsigned long *)pte = (unsigned long) pte_quicklist; + pte_quicklist = (unsigned long *) pte; + pgtable_cache_size++; +} + +extern __inline__ void free_pte_slow(pte_t *pte) +{ + free_page_2k((unsigned long)(pte - PTRS_PER_PTE)); +} + +#define pte_free_kernel(pte) free_pte_fast(pte) +#define pte_free(pte) free_pte_fast(pte) + +/*############################################################################### + * New PageTableEntry stuff... + */ +/* We now keep two sets of ptes - the physical and the linux version. + * This gives us many advantages, and allows us greater flexibility. + * + * The Linux pte's contain: + * bit meaning + * 0 page present + * 1 young + * 2 bufferable - matches physical pte + * 3 cacheable - matches physical pte + * 4 user + * 5 write + * 6 execute + * 7 dirty + * 8-11 unused + * 12-31 virtual page address + * + * These are stored at the pte pointer; the physical PTE is at -1024bytes + */ +#define L_PTE_PRESENT (1 << 0) +#define L_PTE_YOUNG (1 << 1) +#define L_PTE_BUFFERABLE (1 << 2) +#define L_PTE_CACHEABLE (1 << 3) +#define L_PTE_USER (1 << 4) +#define L_PTE_WRITE (1 << 5) +#define L_PTE_EXEC (1 << 6) +#define L_PTE_DIRTY (1 << 7) + +/* + * The following macros handle the cache and bufferable bits... + */ +#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG +#define _L_PTE_READ L_PTE_USER | L_PTE_CACHEABLE +#define _L_PTE_EXEC _L_PTE_READ | L_PTE_EXEC + +#define PAGE_NONE __pgprot(_L_PTE_DEFAULT) +#define PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_BUFFERABLE) +#define PAGE_SHARED __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_BUFFERABLE | L_PTE_WRITE) +#define PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) +#define PAGE_KERNEL __pgprot(_L_PTE_DEFAULT | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | L_PTE_DIRTY | L_PTE_WRITE) + +#define _PAGE_CHG_MASK (PAGE_MASK | L_PTE_DIRTY | L_PTE_YOUNG) + +/* + * The table below defines the page protection levels that we insert into our + * Linux page table version. These get translated into the best that the + * architecture can perform. Note that on most ARM hardware: + * 1) We cannot do execute protection + * 2) If we could do execute protection, then read is implied + * 3) write implies read permissions + */ +#define __P000 PAGE_NONE +#define __P001 PAGE_READONLY +#define __P010 PAGE_COPY +#define __P011 PAGE_COPY +#define __P100 PAGE_READONLY +#define __P101 PAGE_READONLY +#define __P110 PAGE_COPY +#define __P111 PAGE_COPY + +#define __S000 PAGE_NONE +#define __S001 PAGE_READONLY +#define __S010 PAGE_SHARED +#define __S011 PAGE_SHARED +#define __S100 PAGE_READONLY +#define __S101 PAGE_READONLY +#define __S110 PAGE_SHARED +#define __S111 PAGE_SHARED + + + +#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT) + +/* + * The following only work if pte_present() is true. + * Undefined behaviour if not.. + */ +#define pte_read(pte) (pte_val(pte) & L_PTE_USER) +#define pte_write(pte) (pte_val(pte) & L_PTE_WRITE) +#define pte_exec(pte) (pte_val(pte) & L_PTE_EXEC) +#define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY) +#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) + +#define PTE_BIT_FUNC(fn,op) \ +extern inline pte_t fn(pte_t pte) { pte_val(pte) op; return pte; } + +//PTE_BIT_FUNC(pte_rdprotect, &= ~L_PTE_USER); +PTE_BIT_FUNC(pte_wrprotect, &= ~L_PTE_WRITE); +PTE_BIT_FUNC(pte_exprotect, &= ~L_PTE_EXEC); +PTE_BIT_FUNC(pte_mkclean, &= ~L_PTE_DIRTY); +PTE_BIT_FUNC(pte_mkold, &= ~L_PTE_YOUNG); +//PTE_BIT_FUNC(pte_mkread, |= L_PTE_USER); +PTE_BIT_FUNC(pte_mkwrite, |= L_PTE_WRITE); +PTE_BIT_FUNC(pte_mkexec, |= L_PTE_EXEC); +PTE_BIT_FUNC(pte_mkdirty, |= L_PTE_DIRTY); +PTE_BIT_FUNC(pte_mkyoung, |= L_PTE_YOUNG); +PTE_BIT_FUNC(pte_nocache, &= ~L_PTE_CACHEABLE); + +extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) +{ + pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); + return pte; +} + +/* Find an entry in the third-level page table.. */ +extern __inline__ pte_t * pte_offset(pmd_t * dir, unsigned long address) +{ + return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); +} + +extern __inline__ pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + if (pmd_none(*pmd)) { + pte_t *page = (pte_t *) get_pte_fast(); + + if (!page) + return get_pte_kernel_slow(pmd, address); + set_pmd(pmd, mk_kernel_pmd(page)); + return page + address; + } + if (pmd_bad(*pmd)) { + __bad_pmd_kernel(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} + +extern __inline__ pte_t * pte_alloc(pmd_t * pmd, unsigned long address) +{ + address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); + + if (pmd_none(*pmd)) { + pte_t *page = (pte_t *) get_pte_fast(); + + if (!page) + return get_pte_slow(pmd, address); + set_pmd(pmd, mk_user_pmd(page)); + return page + address; + } + if (pmd_bad(*pmd)) { + __bad_pmd(pmd); + return NULL; + } + return (pte_t *) pmd_page(*pmd) + address; +} + +#define SWP_TYPE(entry) (((entry) >> 2) & 0x7f) +#define SWP_OFFSET(entry) ((entry) >> 9) +#define SWP_ENTRY(type,offset) (((type) << 2) | ((offset) << 9)) + +#endif /* __ASM_PROC_PAGE_H */ diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/processor.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/processor.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/processor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/processor.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,67 @@ +/* + * linux/include/asm-arm/proc-armv/processor.h + * + * Copyright (c) 1996 Russell King. + * + * Changelog: + * 20-09-1996 RMK Created + * 26-09-1996 RMK Added 'EXTRA_THREAD_STRUCT*' + * 28-09-1996 RMK Moved start_thread into the processor dependencies + * 09-09-1998 PJB Delete redundant `wp_works_ok' + */ +#ifndef __ASM_PROC_PROCESSOR_H +#define __ASM_PROC_PROCESSOR_H + +#include + +#define KERNEL_STACK_SIZE PAGE_SIZE + +struct context_save_struct { + unsigned long cpsr; + unsigned long r4; + unsigned long r5; + unsigned long r6; + unsigned long r7; + unsigned long r8; + unsigned long r9; + unsigned long sl; + unsigned long fp; + unsigned long pc; +}; + +#define INIT_CSS (struct context_save_struct){ SVC_MODE, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + +#define EXTRA_THREAD_STRUCT \ + unsigned int domain; + +#define EXTRA_THREAD_STRUCT_INIT \ + , domain_val(DOMAIN_USER, DOMAIN_CLIENT) | \ + domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \ + domain_val(DOMAIN_IO, DOMAIN_CLIENT) + +#define SWAPPER_PG_DIR (((unsigned long)swapper_pg_dir) - PAGE_OFFSET) + +#define start_thread(regs,pc,sp) \ +({ \ + unsigned long *stack = (unsigned long *)sp; \ + set_fs(USER_DS); \ + memzero(regs->uregs, sizeof(regs->uregs)); \ + if (current->personality & ADDR_LIMIT_32BIT) \ + regs->ARM_cpsr = USR_MODE; \ + else \ + regs->ARM_cpsr = USR26_MODE; \ + regs->ARM_pc = pc; /* pc */ \ + regs->ARM_sp = sp; /* sp */ \ + regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ + regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ + regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ +}) + +/* Allocation and freeing of basic task resources. */ +/* + * NOTE! The task struct and the stack go together + */ +#define ll_alloc_task_struct() ((struct task_struct *) __get_free_pages(GFP_KERNEL,1)) +#define ll_free_task_struct(p) free_pages((unsigned long)(p),1) + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/ptrace.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/ptrace.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/ptrace.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/ptrace.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,98 @@ +/* + * linux/include/asm-arm/proc-armv/ptrace.h + * + * Copyright (C) 1996-1999 Russell King + */ +#ifndef __ASM_PROC_PTRACE_H +#define __ASM_PROC_PTRACE_H + +#define USR26_MODE 0x00 +#define FIQ26_MODE 0x01 +#define IRQ26_MODE 0x02 +#define SVC26_MODE 0x03 +#define USR_MODE 0x10 +#define FIQ_MODE 0x11 +#define IRQ_MODE 0x12 +#define SVC_MODE 0x13 +#define ABT_MODE 0x17 +#define UND_MODE 0x1b +#define SYSTEM_MODE 0x1f +#define MODE_MASK 0x1f +#define F_BIT 0x40 +#define I_BIT 0x80 +#define CC_V_BIT (1 << 28) +#define CC_C_BIT (1 << 29) +#define CC_Z_BIT (1 << 30) +#define CC_N_BIT (1 << 31) +#define PCMASK 0 + +#ifndef __ASSEMBLY__ + +/* this struct defines the way the registers are stored on the + stack during a system call. */ + +struct pt_regs { + long uregs[18]; +}; + +#define ARM_cpsr uregs[16] +#define ARM_pc uregs[15] +#define ARM_lr uregs[14] +#define ARM_sp uregs[13] +#define ARM_ip uregs[12] +#define ARM_fp uregs[11] +#define ARM_r10 uregs[10] +#define ARM_r9 uregs[9] +#define ARM_r8 uregs[8] +#define ARM_r7 uregs[7] +#define ARM_r6 uregs[6] +#define ARM_r5 uregs[5] +#define ARM_r4 uregs[4] +#define ARM_r3 uregs[3] +#define ARM_r2 uregs[2] +#define ARM_r1 uregs[1] +#define ARM_r0 uregs[0] +#define ARM_ORIG_r0 uregs[17] + +#ifdef __KERNEL__ + +#define user_mode(regs) \ + (((regs)->ARM_cpsr & 0xf) == 0) + +#define processor_mode(regs) \ + ((regs)->ARM_cpsr & MODE_MASK) + +#define interrupts_enabled(regs) \ + (!((regs)->ARM_cpsr & I_BIT)) + +#define fast_interrupts_enabled(regs) \ + (!((regs)->ARM_cpsr & F_BIT)) + +#define condition_codes(regs) \ + ((regs)->ARM_cpsr & (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT)) + +#define instruction_pointer(regs) ((regs)->ARM_pc) +#define pc_pointer(v) (v) + +/* Are the current registers suitable for user mode? + * (used to maintain security in signal handlers) + */ +static inline int valid_user_regs(struct pt_regs *regs) +{ + if ((regs->ARM_cpsr & 0xf) == 0 && + (regs->ARM_cpsr & (F_BIT|I_BIT)) == 0) + return 1; + + /* + * Force CPSR to something logical... + */ + regs->ARM_cpsr &= (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT|0x10); + + return 0; +} + +#endif /* __KERNEL__ */ + +#endif /* __ASSEMBLY__ */ + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/semaphore.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/semaphore.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/semaphore.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/semaphore.h 2007-07-10 12:15:53.000000000 +0100 @@ -0,0 +1,117 @@ +/* + * linux/include/asm-arm/semaphore.h + */ +#ifndef __ASM_PROC_SEMAPHORE_H +#define __ASM_PROC_SEMAPHORE_H + +/* + * This is ugly, but we want the default case to fall through. + * "__down" is the actual routine that waits... + */ +extern inline void down(struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__down_failed) + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); +} + +/* + * This is ugly, but we want the default case to fall through. + * "__down_interruptible" is the actual routine that waits... + */ +extern inline int down_interruptible (struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down interruptible operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_interruptible_failed) "\n" +" mov %1, r0" + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); + + return temp; +} + +extern inline int down_trylock(struct semaphore *sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic down try lock operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_trylock_failed) "\n" +" mov %1, r0" + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); + + return temp; +} + +/* + * Note! This is subtle. We jump to wake people up only if + * the semaphore was negative (== somebody was waiting on it). + * The default case (no contention) will result in NO + * jumps for both down() and up(). + */ +extern inline void up(struct semaphore * sem) +{ + unsigned int cpsr, temp; + + __asm__ __volatile__ ( +" @ atomic up operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" adds %1, %1, #1\n" +" str %1, [%2]\n" +" orrle %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__up_wakeup) + : "=&r" (cpsr), "=&r" (temp) + : "r" (sem) + : "r0", "lr", "cc"); +} + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/shmparam.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/shmparam.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/shmparam.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/shmparam.h 2000-03-10 15:46:50.000000000 +0000 @@ -0,0 +1,19 @@ +/* + * linux/include/asm-arm/proc-armv/shmparam.h + * + * Copyright (C) 1996 Russell King + * + * definitions for the shared process memory on ARM v3 or v4 + * processors + */ + +#ifndef __ASM_PROC_SHMPARAM_H +#define __ASM_PROC_SHMPARAM_H + +#ifndef SHM_RANGE_START +#define SHM_RANGE_START 0x50000000 +#define SHM_RANGE_END 0x60000000 +#define SHMMAX 0x01000000 +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/system.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/system.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/system.h 2007-07-10 12:36:47.000000000 +0100 @@ -0,0 +1,153 @@ +/* + * linux/include/asm-arm/proc-armv/system.h + * + * Copyright (C) 1996 Russell King + */ + +#ifndef __ASM_PROC_SYSTEM_H +#define __ASM_PROC_SYSTEM_H + +extern const char xchg_str[]; +extern void abort(void); + +extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) +{ + switch (size) { + case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); + break; + case 2: abort (); + case 4: __asm__ __volatile__ ("swp %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); + break; + default: arm_invalidptr(xchg_str, size); + } + return x; +} + +#define set_cr(x) \ + do { \ + __asm__ __volatile__( \ + "mcr p15, 0, %0, c1, c0 @ set CR" \ + : : "r" (x)); \ + } while (0) + +extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ +extern unsigned long cr_alignment; /* defined in entry-armv.S */ + +/* + * We can wait for an interrupt... + */ +#define proc_idle() \ + do { \ + __asm__ __volatile__( \ +" mcr p15, 0, %0, c15, c8, 2 @ proc_idle" \ + : : "r" (0)); \ + } while (0) + +/* + * A couple of speedups for the ARM + */ + +/* + * Save the current interrupt enable state & disable IRQs + */ +#define __save_flags_cli(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %1, cpsr @ save_flags_cli\n" \ +" and %0, %1, #192\n" \ +" orr %1, %1, #128\n" \ +" msr cpsr, %1" \ + : "=r" (x), "=r" (temp) \ + : \ + : "memory"); \ + } while (0) + +/* Same as above, but disable FIQs too: don't stay in this mode too long + otherwise things break :) */ +#define __save_flags_clif(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %1, cpsr @ save_flags_clif\n" \ +" and %0, %1, #192\n" \ +" orr %1, %1, #192\n" \ +" msr cpsr, %1" \ + : "=r" (x), "=r" (temp) \ + : \ + : "memory"); \ + } while (0) + +/* + * Enable IRQs + */ +#define __sti() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ sti\n" \ +" bic %0, %0, #128\n" \ +" msr cpsr, %0" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * Disable IRQs + */ +#define __cli() \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ cli\n" \ +" orr %0, %0, #128\n" \ +" msr cpsr, %0" \ + : "=r" (temp) \ + : \ + : "memory"); \ + } while(0) + +/* + * save current IRQ & FIQ state + */ +#define __save_flags(x) \ + do { \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ save_flags\n" \ +" and %0, %0, #192" \ + : "=r" (x) \ + : \ + : "memory"); \ + } while (0) + +/* + * restore saved IRQ & FIQ state + */ +#define __restore_flags(x) \ + do { \ + unsigned long temp; \ + __asm__ __volatile__( \ + "mrs %0, cpsr @ restore_flags\n" \ +" bic %0, %0, #192\n" \ +" orr %0, %0, %1\n" \ +" msr cpsr, %0" \ + : "=&r" (temp) \ + : "r" (x) \ + : "memory"); \ + } while (0) + +#ifdef __SMP__ +#error SMP not supported +#else + +#define cli() __cli() +#define sti() __sti() +#define save_flags(x) __save_flags(x) +#define restore_flags(x) __restore_flags(x) +#define save_flags_cli(x) __save_flags_cli(x) +#define save_flags_clif(x) __save_flags_clif(x) + +#endif + +#endif diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/uaccess.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/uaccess.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/uaccess.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/uaccess.h 2007-07-10 12:25:52.000000000 +0100 @@ -0,0 +1,177 @@ +/* + * linux/include/asm-arm/proc-armv/uaccess.h + */ + +#include +#include + +/* + * Note that this is actually 0x1,0000,0000 + */ +#define KERNEL_DS 0x00000000 +#define USER_DS PAGE_OFFSET + +#define get_ds() (KERNEL_DS) +#define get_fs() (current->addr_limit) + +#define segment_eq(a,b) ((a) == (b)) + +extern __inline__ void set_fs (mm_segment_t fs) +{ + current->addr_limit = fs; + + modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); +} + +/* We use 33-bit arithmetic here... */ +#define __range_ok(addr,size) ({ \ + unsigned long flag, sum; \ + __asm__ __volatile__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ + : "=&r" (flag), "=&r" (sum) \ + : "r" (addr), "Ir" (size), "0" (current->addr_limit) \ + : "cc"); \ + flag; }) + +#define __addr_ok(addr) ({ \ + unsigned long flag; \ + __asm__ __volatile__("cmp %2, %0; movlo %0, #0" \ + : "=&r" (flag) \ + : "0" (current->addr_limit), "r" (addr) \ + : "cc"); \ + (flag == 0); }) + +#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) + +#define __put_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + "1: strbt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "i" (EFAULT), "0" (err)) + +#define __put_user_asm_half(x,addr,err) \ +({ \ + unsigned long __temp = (unsigned long)(x); \ + __asm__ __volatile__( \ + "1: strbt %1,[%3],#0\n" \ + "2: strbt %2,[%4],#0\n" \ + "3:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "4: mvn %0, %5\n" \ + " b 3b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 4b\n" \ + " .long 2b, 4b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (__temp), "r" (__temp >> 8), \ + "r" (addr), "r" ((int)(addr) + 1), \ + "i" (EFAULT), "0" (err)); \ +}) + +#define __put_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + "1: strt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err) \ + : "r" (x), "r" (addr), "i" (EFAULT), "0" (err)) + +#define __get_user_asm_byte(x,addr,err) \ + __asm__ __volatile__( \ + "1: ldrbt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " mov %1, #0\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "i" (EFAULT), "0" (err)) + +#define __get_user_asm_half(x,addr,err) \ +({ \ + unsigned long __temp; \ + __asm__ __volatile__( \ + "1: ldrbt %1,[%3],#0\n" \ + "2: ldrbt %2,[%4],#0\n" \ + " orr %1, %1, %2, lsl #8\n" \ + "3:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "4: mvn %0, %5\n" \ + " mov %1, #0\n" \ + " b 3b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 4b\n" \ + " .long 2b, 4b\n" \ + " .previous" \ + : "=r" (err), "=r" (x), "=&r" (__temp) \ + : "r" (addr), "r" ((int)(addr) + 1), \ + "i" (EFAULT), "0" (err)); \ +}) + + +#define __get_user_asm_word(x,addr,err) \ + __asm__ __volatile__( \ + "1: ldrt %1,[%2],#0\n" \ + "2:\n" \ + " .section .fixup,\"ax\"\n" \ + " .align 2\n" \ + "3: mvn %0, %3\n" \ + " mov %1, #0\n" \ + " b 2b\n" \ + " .previous\n" \ + " .section __ex_table,\"a\"\n" \ + " .align 3\n" \ + " .long 1b, 3b\n" \ + " .previous" \ + : "=r" (err), "=r" (x) \ + : "r" (addr), "i" (EFAULT), "0" (err)) + +extern unsigned long __arch_copy_from_user(void *to, const void *from, unsigned long n); +#define __do_copy_from_user(to,from,n) \ + (n) = __arch_copy_from_user(to,from,n) + +extern unsigned long __arch_copy_to_user(void *to, const void *from, unsigned long n); +#define __do_copy_to_user(to,from,n) \ + (n) = __arch_copy_to_user(to,from,n) + +extern unsigned long __arch_clear_user(void *addr, unsigned long n); +#define __do_clear_user(addr,sz) \ + (sz) = __arch_clear_user(addr,sz) + +extern unsigned long __arch_strncpy_from_user(char *to, const char *from, unsigned long count); +#define __do_strncpy_from_user(dst,src,count,res) \ + (res) = __arch_strncpy_from_user(dst,src,count) + +extern unsigned long __arch_strnlen_user(const char *s, long n); +#define __do_strnlen_user(s,n,res) \ + (res) = __arch_strnlen_user(s,n) diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc/uncompress.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc/uncompress.h 2007-07-10 14:21:19.000000000 +0100 @@ -0,0 +1,22 @@ +/* + * linux/include/asm-arm/proc-armv/uncompress.h + * + * (c) 1997 Russell King + */ + +static inline void proc_decomp_setup (void) +{ + __asm__ __volatile__( +" mrc p15, 0, r0, c0, c0\n" +" eor r0, r0, #0x44 << 24\n" +" eor r0, r0, #0x01 << 16\n" +" eor r0, r0, #0xA1 << 8\n" +" movs r0, r0, lsr #4\n" +" mcreq p15, 0, r0, c7, c5, 0 @ flush I cache\n" +" mrceq p15, 0, r0, c1, c0\n" +" orreq r0, r0, #1 << 12\n" +" mcreq p15, 0, r0, c1, c0 @ enable I cache\n" +" mov r0, #0\n" +" mcreq p15, 0, r0, c15, c1, 2 @ enable clock switching\n" + : : : "r0", "cc", "memory"); +} diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/assembler.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/assembler.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/assembler.h 2000-03-10 15:46:50.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/assembler.h 2007-07-10 14:03:03.000000000 +0100 @@ -28,11 +28,11 @@ #define RETINSTR(instr, regs...)\ instr regs #else -#define LOADREGS(cond, base, reglist...)\ - ldm/**/cond base,reglist +#define LOADREGS(cond, base)\ + ldm/**/cond base, -#define RETINSTR(instr, regs...)\ - instr regs +#define RETINSTR(instr, a,b)\ + instr a,b #endif /* diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/pgtable.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/pgtable.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/pgtable.h 2000-03-10 15:46:50.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/pgtable.h 2007-07-10 12:25:49.000000000 +0100 @@ -557,7 +557,7 @@ #define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG) #define PTE_BIT_FUNC(fn,op) \ -extern inline pte_t fn##(pte_t pte) { pte_val(pte) op##; return pte; } +extern inline pte_t fn(pte_t pte) { pte_val(pte) op; return pte; } //PTE_BIT_FUNC(pte_rdprotect, &= ~L_PTE_USER); PTE_BIT_FUNC(pte_wrprotect, &= ~L_PTE_WRITE); diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/semaphore.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/semaphore.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/semaphore.h 2000-03-10 15:46:50.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/semaphore.h 2007-07-10 12:15:53.000000000 +0100 @@ -12,19 +12,19 @@ { unsigned int cpsr, temp; - __asm__ __volatile__ (" - @ atomic down operation - mrs %0, cpsr - orr %1, %0, #128 @ disable IRQs - msr cpsr, %1 - ldr %1, [%2] - bic %0, %0, #0x80000000 @ clear N - subs %1, %1, #1 - str %1, [%2] - orrmi %0, %0, #0x80000000 @ set N - msr cpsr, %0 - movmi r0, %2 - blmi " SYMBOL_NAME_STR(__down_failed) + __asm__ __volatile__ ( +" @ atomic down operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__down_failed) : "=&r" (cpsr), "=&r" (temp) : "r" (sem) : "r0", "lr", "cc"); @@ -38,21 +38,21 @@ { unsigned int cpsr, temp; - __asm__ __volatile__ (" - @ atomic down interruptible operation - mrs %0, cpsr - orr %1, %0, #128 @ disable IRQs - msr cpsr, %1 - ldr %1, [%2] - bic %0, %0, #0x80000000 @ clear N - subs %1, %1, #1 - str %1, [%2] - orrmi %0, %0, #0x80000000 @ set N - msr cpsr, %0 - movmi r0, %2 - movpl r0, #0 - blmi " SYMBOL_NAME_STR(__down_interruptible_failed) " - mov %1, r0" + __asm__ __volatile__ ( +" @ atomic down interruptible operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_interruptible_failed) "\n" +" mov %1, r0" : "=&r" (cpsr), "=&r" (temp) : "r" (sem) : "r0", "lr", "cc"); @@ -64,21 +64,21 @@ { unsigned int cpsr, temp; - __asm__ __volatile__ (" - @ atomic down try lock operation - mrs %0, cpsr - orr %1, %0, #128 @ disable IRQs - msr cpsr, %1 - ldr %1, [%2] - bic %0, %0, #0x80000000 @ clear N - subs %1, %1, #1 - str %1, [%2] - orrmi %0, %0, #0x80000000 @ set N - msr cpsr, %0 - movmi r0, %2 - movpl r0, #0 - blmi " SYMBOL_NAME_STR(__down_trylock_failed) " - mov %1, r0" + __asm__ __volatile__ ( +" @ atomic down try lock operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" subs %1, %1, #1\n" +" str %1, [%2]\n" +" orrmi %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" movpl r0, #0\n" +" blmi " SYMBOL_NAME_STR(__down_trylock_failed) "\n" +" mov %1, r0" : "=&r" (cpsr), "=&r" (temp) : "r" (sem) : "r0", "lr", "cc"); @@ -96,19 +96,19 @@ { unsigned int cpsr, temp; - __asm__ __volatile__ (" - @ atomic up operation - mrs %0, cpsr - orr %1, %0, #128 @ disable IRQs - msr cpsr, %1 - ldr %1, [%2] - bic %0, %0, #0x80000000 @ clear N - adds %1, %1, #1 - str %1, [%2] - orrle %0, %0, #0x80000000 @ set N - msr cpsr, %0 - movmi r0, %2 - blmi " SYMBOL_NAME_STR(__up_wakeup) + __asm__ __volatile__ ( +" @ atomic up operation\n" +" mrs %0, cpsr\n" +" orr %1, %0, #128 @ disable IRQs\n" +" msr cpsr, %1\n" +" ldr %1, [%2]\n" +" bic %0, %0, #0x80000000 @ clear N\n" +" adds %1, %1, #1\n" +" str %1, [%2]\n" +" orrle %0, %0, #0x80000000 @ set N\n" +" msr cpsr, %0\n" +" movmi r0, %2\n" +" blmi " SYMBOL_NAME_STR(__up_wakeup) : "=&r" (cpsr), "=&r" (temp) : "r" (sem) : "r0", "lr", "cc"); diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/system.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/system.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/system.h 2000-03-14 18:09:34.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/system.h 2007-07-10 12:36:47.000000000 +0100 @@ -8,6 +8,7 @@ #define __ASM_PROC_SYSTEM_H extern const char xchg_str[]; +extern void abort(void); extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) { diff -Nru linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/uncompress.h linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/uncompress.h --- linux-2.2.14-rmk-mercury/include/asm-arm/proc-armv/uncompress.h 2000-03-10 15:46:50.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/asm-arm/proc-armv/uncompress.h 2007-07-10 14:21:19.000000000 +0100 @@ -6,17 +6,17 @@ static inline void proc_decomp_setup (void) { - __asm__ __volatile__(" - mrc p15, 0, r0, c0, c0 - eor r0, r0, #0x44 << 24 - eor r0, r0, #0x01 << 16 - eor r0, r0, #0xA1 << 8 - movs r0, r0, lsr #4 - mcreq p15, 0, r0, c7, c5, 0 @ flush I cache - mrceq p15, 0, r0, c1, c0 - orreq r0, r0, #1 << 12 - mcreq p15, 0, r0, c1, c0 @ enable I cache - mov r0, #0 - mcreq p15, 0, r0, c15, c1, 2 @ enable clock switching - " : : : "r0", "cc", "memory"); + __asm__ __volatile__( +" mrc p15, 0, r0, c0, c0\n" +" eor r0, r0, #0x44 << 24\n" +" eor r0, r0, #0x01 << 16\n" +" eor r0, r0, #0xA1 << 8\n" +" movs r0, r0, lsr #4\n" +" mcreq p15, 0, r0, c7, c5, 0 @ flush I cache\n" +" mrceq p15, 0, r0, c1, c0\n" +" orreq r0, r0, #1 << 12\n" +" mcreq p15, 0, r0, c1, c0 @ enable I cache\n" +" mov r0, #0\n" +" mcreq p15, 0, r0, c15, c1, 2 @ enable clock switching\n" + : : : "r0", "cc", "memory"); } diff -Nru linux-2.2.14-rmk-mercury/include/config/ac3200.h linux-2.2.14-rmk-mercury-gcc3/include/config/ac3200.h --- linux-2.2.14-rmk-mercury/include/config/ac3200.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ac3200.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_AC3200 diff -Nru linux-2.2.14-rmk-mercury/include/config/acenic.h linux-2.2.14-rmk-mercury-gcc3/include/config/acenic.h --- linux-2.2.14-rmk-mercury/include/config/acenic.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/acenic.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ACENIC diff -Nru linux-2.2.14-rmk-mercury/include/config/adfs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/adfs/fs.h --- linux-2.2.14-rmk-mercury/include/config/adfs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/adfs/fs.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ADFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/affs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/affs/fs.h --- linux-2.2.14-rmk-mercury/include/config/affs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/affs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_AFFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/alignment/trap.h linux-2.2.14-rmk-mercury-gcc3/include/config/alignment/trap.h --- linux-2.2.14-rmk-mercury/include/config/alignment/trap.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/alignment/trap.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ALIGNMENT_TRAP diff -Nru linux-2.2.14-rmk-mercury/include/config/apricot.h linux-2.2.14-rmk-mercury-gcc3/include/config/apricot.h --- linux-2.2.14-rmk-mercury/include/config/apricot.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/apricot.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_APRICOT diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/a5k.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/a5k.h --- linux-2.2.14-rmk-mercury/include/config/arch/a5k.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/a5k.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARCH_A5K diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/acorn.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/acorn.h --- linux-2.2.14-rmk-mercury/include/config/arch/acorn.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/acorn.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARCH_ACORN diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/arc.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/arc.h --- linux-2.2.14-rmk-mercury/include/config/arch/arc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/arc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARCH_ARC diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/clps7212.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/clps7212.h --- linux-2.2.14-rmk-mercury/include/config/arch/clps7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/clps7212.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_ARCH_CLPS7212 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/eb7212.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/eb7212.h --- linux-2.2.14-rmk-mercury/include/config/arch/eb7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/eb7212.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARCH_EB7212 diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/ebsa110.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/ebsa110.h --- linux-2.2.14-rmk-mercury/include/config/arch/ebsa110.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/ebsa110.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARCH_EBSA110 diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/mercury.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/mercury.h --- linux-2.2.14-rmk-mercury/include/config/arch/mercury.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/mercury.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_ARCH_MERCURY 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/arch/rpc.h linux-2.2.14-rmk-mercury-gcc3/include/config/arch/rpc.h --- linux-2.2.14-rmk-mercury/include/config/arch/rpc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arch/rpc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARCH_RPC diff -Nru linux-2.2.14-rmk-mercury/include/config/arcnet.h linux-2.2.14-rmk-mercury-gcc3/include/config/arcnet.h --- linux-2.2.14-rmk-mercury/include/config/arcnet.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arcnet.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARCNET diff -Nru linux-2.2.14-rmk-mercury/include/config/arm/am79c961a.h linux-2.2.14-rmk-mercury-gcc3/include/config/arm/am79c961a.h --- linux-2.2.14-rmk-mercury/include/config/arm/am79c961a.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arm/am79c961a.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARM_AM79C961A diff -Nru linux-2.2.14-rmk-mercury/include/config/arm.h linux-2.2.14-rmk-mercury-gcc3/include/config/arm.h --- linux-2.2.14-rmk-mercury/include/config/arm.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arm.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_ARM 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/arthur.h linux-2.2.14-rmk-mercury-gcc3/include/config/arthur.h --- linux-2.2.14-rmk-mercury/include/config/arthur.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/arthur.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ARTHUR diff -Nru linux-2.2.14-rmk-mercury/include/config/atalk.h linux-2.2.14-rmk-mercury-gcc3/include/config/atalk.h --- linux-2.2.14-rmk-mercury/include/config/atalk.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/atalk.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ATALK diff -Nru linux-2.2.14-rmk-mercury/include/config/audio/7212.h linux-2.2.14-rmk-mercury-gcc3/include/config/audio/7212.h --- linux-2.2.14-rmk-mercury/include/config/audio/7212.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/audio/7212.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_AUDIO_7212 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/autofs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/autofs/fs.h --- linux-2.2.14-rmk-mercury/include/config/autofs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/autofs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_AUTOFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/bcm4210.h linux-2.2.14-rmk-mercury-gcc3/include/config/bcm4210.h --- linux-2.2.14-rmk-mercury/include/config/bcm4210.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/bcm4210.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_BCM4210 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/binfmt/aout.h linux-2.2.14-rmk-mercury-gcc3/include/config/binfmt/aout.h --- linux-2.2.14-rmk-mercury/include/config/binfmt/aout.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/binfmt/aout.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BINFMT_AOUT diff -Nru linux-2.2.14-rmk-mercury/include/config/binfmt/elf.h linux-2.2.14-rmk-mercury-gcc3/include/config/binfmt/elf.h --- linux-2.2.14-rmk-mercury/include/config/binfmt/elf.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/binfmt/elf.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_BINFMT_ELF 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/binfmt/misc.h linux-2.2.14-rmk-mercury-gcc3/include/config/binfmt/misc.h --- linux-2.2.14-rmk-mercury/include/config/binfmt/misc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/binfmt/misc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BINFMT_MISC diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/fd.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/fd.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/fd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/fd.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_FD diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/hd/only.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/hd/only.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/hd/only.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/hd/only.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_HD_ONLY diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/hd.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/hd.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/hd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/hd.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_HD diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/ide.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/ide.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/ide.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/ide.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_IDE diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/loop.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/loop.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/loop.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/loop.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_LOOP diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/md.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/md.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/md.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/md.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_MD diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/nbd.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/nbd.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/nbd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/nbd.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_NBD diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/ram.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/ram.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/ram.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/ram.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_RAM diff -Nru linux-2.2.14-rmk-mercury/include/config/blk/dev/xd.h linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/xd.h --- linux-2.2.14-rmk-mercury/include/config/blk/dev/xd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/blk/dev/xd.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BLK_DEV_XD diff -Nru linux-2.2.14-rmk-mercury/include/config/boot/kernel/image.h linux-2.2.14-rmk-mercury-gcc3/include/config/boot/kernel/image.h --- linux-2.2.14-rmk-mercury/include/config/boot/kernel/image.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/boot/kernel/image.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BOOT_KERNEL_IMAGE diff -Nru linux-2.2.14-rmk-mercury/include/config/bridge.h linux-2.2.14-rmk-mercury-gcc3/include/config/bridge.h --- linux-2.2.14-rmk-mercury/include/config/bridge.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/bridge.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BRIDGE diff -Nru linux-2.2.14-rmk-mercury/include/config/bsd/process/acct.h linux-2.2.14-rmk-mercury-gcc3/include/config/bsd/process/acct.h --- linux-2.2.14-rmk-mercury/include/config/bsd/process/acct.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/bsd/process/acct.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BSD_PROCESS_ACCT diff -Nru linux-2.2.14-rmk-mercury/include/config/busmouse.h linux-2.2.14-rmk-mercury-gcc3/include/config/busmouse.h --- linux-2.2.14-rmk-mercury/include/config/busmouse.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/busmouse.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_BUSMOUSE diff -Nru linux-2.2.14-rmk-mercury/include/config/cmdline.h linux-2.2.14-rmk-mercury-gcc3/include/config/cmdline.h --- linux-2.2.14-rmk-mercury/include/config/cmdline.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/cmdline.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_CMDLINE "loadmodule=0xf0270000" diff -Nru linux-2.2.14-rmk-mercury/include/config/coda/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/coda/fs.h --- linux-2.2.14-rmk-mercury/include/config/coda/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/coda/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_CODA_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/computone.h linux-2.2.14-rmk-mercury-gcc3/include/config/computone.h --- linux-2.2.14-rmk-mercury/include/config/computone.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/computone.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_COMPUTONE diff -Nru linux-2.2.14-rmk-mercury/include/config/comx.h linux-2.2.14-rmk-mercury-gcc3/include/config/comx.h --- linux-2.2.14-rmk-mercury/include/config/comx.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/comx.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_COMX diff -Nru linux-2.2.14-rmk-mercury/include/config/cpu/26.h linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/26.h --- linux-2.2.14-rmk-mercury/include/config/cpu/26.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/26.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_CPU_26 diff -Nru linux-2.2.14-rmk-mercury/include/config/cpu/32.h linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/32.h --- linux-2.2.14-rmk-mercury/include/config/cpu/32.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/32.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_CPU_32 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/cpu/arm7.h linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/arm7.h --- linux-2.2.14-rmk-mercury/include/config/cpu/arm7.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/arm7.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_CPU_ARM7 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/cpu/is/slow.h linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/is/slow.h --- linux-2.2.14-rmk-mercury/include/config/cpu/is/slow.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/cpu/is/slow.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_CPU_IS_SLOW diff -Nru linux-2.2.14-rmk-mercury/include/config/cs89x0.h linux-2.2.14-rmk-mercury-gcc3/include/config/cs89x0.h --- linux-2.2.14-rmk-mercury/include/config/cs89x0.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/cs89x0.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_CS89x0 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/cyclades.h linux-2.2.14-rmk-mercury-gcc3/include/config/cyclades.h --- linux-2.2.14-rmk-mercury/include/config/cyclades.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/cyclades.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_CYCLADES diff -Nru linux-2.2.14-rmk-mercury/include/config/de4x5.h linux-2.2.14-rmk-mercury-gcc3/include/config/de4x5.h --- linux-2.2.14-rmk-mercury/include/config/de4x5.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/de4x5.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DE4X5 diff -Nru linux-2.2.14-rmk-mercury/include/config/debug/errors.h linux-2.2.14-rmk-mercury-gcc3/include/config/debug/errors.h --- linux-2.2.14-rmk-mercury/include/config/debug/errors.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/debug/errors.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_DEBUG_ERRORS 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/debug/info.h linux-2.2.14-rmk-mercury-gcc3/include/config/debug/info.h --- linux-2.2.14-rmk-mercury/include/config/debug/info.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/debug/info.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DEBUG_INFO diff -Nru linux-2.2.14-rmk-mercury/include/config/debug/ll.h linux-2.2.14-rmk-mercury-gcc3/include/config/debug/ll.h --- linux-2.2.14-rmk-mercury/include/config/debug/ll.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/debug/ll.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_DEBUG_LL 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/debug/user.h linux-2.2.14-rmk-mercury-gcc3/include/config/debug/user.h --- linux-2.2.14-rmk-mercury/include/config/debug/user.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/debug/user.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_DEBUG_USER 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/dec/elcp/old.h linux-2.2.14-rmk-mercury-gcc3/include/config/dec/elcp/old.h --- linux-2.2.14-rmk-mercury/include/config/dec/elcp/old.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/dec/elcp/old.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DEC_ELCP_OLD diff -Nru linux-2.2.14-rmk-mercury/include/config/dec/elcp.h linux-2.2.14-rmk-mercury-gcc3/include/config/dec/elcp.h --- linux-2.2.14-rmk-mercury/include/config/dec/elcp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/dec/elcp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DEC_ELCP diff -Nru linux-2.2.14-rmk-mercury/include/config/dgrs.h linux-2.2.14-rmk-mercury-gcc3/include/config/dgrs.h --- linux-2.2.14-rmk-mercury/include/config/dgrs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/dgrs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DGRS diff -Nru linux-2.2.14-rmk-mercury/include/config/digi.h linux-2.2.14-rmk-mercury-gcc3/include/config/digi.h --- linux-2.2.14-rmk-mercury/include/config/digi.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/digi.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DIGI diff -Nru linux-2.2.14-rmk-mercury/include/config/digiepca.h linux-2.2.14-rmk-mercury-gcc3/include/config/digiepca.h --- linux-2.2.14-rmk-mercury/include/config/digiepca.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/digiepca.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DIGIEPCA diff -Nru linux-2.2.14-rmk-mercury/include/config/dlci.h linux-2.2.14-rmk-mercury-gcc3/include/config/dlci.h --- linux-2.2.14-rmk-mercury/include/config/dlci.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/dlci.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DLCI diff -Nru linux-2.2.14-rmk-mercury/include/config/dm9102.h linux-2.2.14-rmk-mercury-gcc3/include/config/dm9102.h --- linux-2.2.14-rmk-mercury/include/config/dm9102.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/dm9102.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DM9102 diff -Nru linux-2.2.14-rmk-mercury/include/config/dtlk.h linux-2.2.14-rmk-mercury-gcc3/include/config/dtlk.h --- linux-2.2.14-rmk-mercury/include/config/dtlk.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/dtlk.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DTLK diff -Nru linux-2.2.14-rmk-mercury/include/config/dummy.h linux-2.2.14-rmk-mercury-gcc3/include/config/dummy.h --- linux-2.2.14-rmk-mercury/include/config/dummy.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/dummy.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_DUMMY diff -Nru linux-2.2.14-rmk-mercury/include/config/econet.h linux-2.2.14-rmk-mercury-gcc3/include/config/econet.h --- linux-2.2.14-rmk-mercury/include/config/econet.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/econet.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ECONET diff -Nru linux-2.2.14-rmk-mercury/include/config/eexpress/pro100.h linux-2.2.14-rmk-mercury-gcc3/include/config/eexpress/pro100.h --- linux-2.2.14-rmk-mercury/include/config/eexpress/pro100.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/eexpress/pro100.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_EEXPRESS_PRO100 diff -Nru linux-2.2.14-rmk-mercury/include/config/efs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/efs/fs.h --- linux-2.2.14-rmk-mercury/include/config/efs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/efs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_EFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/epic100.h linux-2.2.14-rmk-mercury-gcc3/include/config/epic100.h --- linux-2.2.14-rmk-mercury/include/config/epic100.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/epic100.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_EPIC100 diff -Nru linux-2.2.14-rmk-mercury/include/config/equalizer.h linux-2.2.14-rmk-mercury-gcc3/include/config/equalizer.h --- linux-2.2.14-rmk-mercury/include/config/equalizer.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/equalizer.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_EQUALIZER diff -Nru linux-2.2.14-rmk-mercury/include/config/es3210.h linux-2.2.14-rmk-mercury-gcc3/include/config/es3210.h --- linux-2.2.14-rmk-mercury/include/config/es3210.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/es3210.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ES3210 diff -Nru linux-2.2.14-rmk-mercury/include/config/espserial.h linux-2.2.14-rmk-mercury-gcc3/include/config/espserial.h --- linux-2.2.14-rmk-mercury/include/config/espserial.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/espserial.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ESPSERIAL diff -Nru linux-2.2.14-rmk-mercury/include/config/experimental.h linux-2.2.14-rmk-mercury-gcc3/include/config/experimental.h --- linux-2.2.14-rmk-mercury/include/config/experimental.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/experimental.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_EXPERIMENTAL 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ext2/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/ext2/fs.h --- linux-2.2.14-rmk-mercury/include/config/ext2/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ext2/fs.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_EXT2_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/fat/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/fat/fs.h --- linux-2.2.14-rmk-mercury/include/config/fat/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/fat/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_FAT_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/fddi.h linux-2.2.14-rmk-mercury-gcc3/include/config/fddi.h --- linux-2.2.14-rmk-mercury/include/config/fddi.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/fddi.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_FDDI diff -Nru linux-2.2.14-rmk-mercury/include/config/filter.h linux-2.2.14-rmk-mercury-gcc3/include/config/filter.h --- linux-2.2.14-rmk-mercury/include/config/filter.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/filter.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_FILTER diff -Nru linux-2.2.14-rmk-mercury/include/config/firewall.h linux-2.2.14-rmk-mercury-gcc3/include/config/firewall.h --- linux-2.2.14-rmk-mercury/include/config/firewall.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/firewall.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_FIREWALL diff -Nru linux-2.2.14-rmk-mercury/include/config/footbridge.h linux-2.2.14-rmk-mercury-gcc3/include/config/footbridge.h --- linux-2.2.14-rmk-mercury/include/config/footbridge.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/footbridge.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_FOOTBRIDGE diff -Nru linux-2.2.14-rmk-mercury/include/config/frame/pointer.h linux-2.2.14-rmk-mercury-gcc3/include/config/frame/pointer.h --- linux-2.2.14-rmk-mercury/include/config/frame/pointer.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/frame/pointer.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_FRAME_POINTER 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ftape.h linux-2.2.14-rmk-mercury-gcc3/include/config/ftape.h --- linux-2.2.14-rmk-mercury/include/config/ftape.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ftape.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_FTAPE diff -Nru linux-2.2.14-rmk-mercury/include/config/hamradio.h linux-2.2.14-rmk-mercury-gcc3/include/config/hamradio.h --- linux-2.2.14-rmk-mercury/include/config/hamradio.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/hamradio.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_HAMRADIO diff -Nru linux-2.2.14-rmk-mercury/include/config/hfs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/hfs/fs.h --- linux-2.2.14-rmk-mercury/include/config/hfs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/hfs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_HFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/hippi.h linux-2.2.14-rmk-mercury-gcc3/include/config/hippi.h --- linux-2.2.14-rmk-mercury/include/config/hippi.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/hippi.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_HIPPI diff -Nru linux-2.2.14-rmk-mercury/include/config/hpfs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/hpfs/fs.h --- linux-2.2.14-rmk-mercury/include/config/hpfs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/hpfs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_HPFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/inet/rarp.h linux-2.2.14-rmk-mercury-gcc3/include/config/inet/rarp.h --- linux-2.2.14-rmk-mercury/include/config/inet/rarp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/inet/rarp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_INET_RARP diff -Nru linux-2.2.14-rmk-mercury/include/config/inet.h linux-2.2.14-rmk-mercury-gcc3/include/config/inet.h --- linux-2.2.14-rmk-mercury/include/config/inet.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/inet.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_INET 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/advanced/router.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/advanced/router.h --- linux-2.2.14-rmk-mercury/include/config/ip/advanced/router.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/advanced/router.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IP_ADVANCED_ROUTER diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/alias.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/alias.h --- linux-2.2.14-rmk-mercury/include/config/ip/alias.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/alias.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IP_ALIAS diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/multicast.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/multicast.h --- linux-2.2.14-rmk-mercury/include/config/ip/multicast.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/multicast.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IP_MULTICAST diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/bootp/vendor/id.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/bootp/vendor/id.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/bootp/vendor/id.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/bootp/vendor/id.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP_BOOTP_VENDOR_ID "empeg:mercury" diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/bootp/vendor.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/bootp/vendor.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/bootp/vendor.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/bootp/vendor.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP_BOOTP_VENDOR 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/bootp.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/bootp.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/bootp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/bootp.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IP_PNP_BOOTP diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/dhcp.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/dhcp.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/dhcp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/dhcp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP_DHCP 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/pmap/port.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/pmap/port.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/pmap/port.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/pmap/port.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP_PMAP_PORT 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/rarp.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/rarp.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/rarp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/rarp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IP_PNP_RARP diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/ssdp/port.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/ssdp/port.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/ssdp/port.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/ssdp/port.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP_SSDP_PORT (21075) diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/ssdp.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/ssdp.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/ssdp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/ssdp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP_SSDP 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp/upnp.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/upnp.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp/upnp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp/upnp.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP_UPNP 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/pnp.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp.h --- linux-2.2.14-rmk-mercury/include/config/ip/pnp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/pnp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_IP_PNP 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ip/router.h linux-2.2.14-rmk-mercury-gcc3/include/config/ip/router.h --- linux-2.2.14-rmk-mercury/include/config/ip/router.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ip/router.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IP_ROUTER diff -Nru linux-2.2.14-rmk-mercury/include/config/ipv6.h linux-2.2.14-rmk-mercury-gcc3/include/config/ipv6.h --- linux-2.2.14-rmk-mercury/include/config/ipv6.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ipv6.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IPV6 diff -Nru linux-2.2.14-rmk-mercury/include/config/ipx.h linux-2.2.14-rmk-mercury-gcc3/include/config/ipx.h --- linux-2.2.14-rmk-mercury/include/config/ipx.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ipx.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IPX diff -Nru linux-2.2.14-rmk-mercury/include/config/irda.h linux-2.2.14-rmk-mercury-gcc3/include/config/irda.h --- linux-2.2.14-rmk-mercury/include/config/irda.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/irda.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_IRDA diff -Nru linux-2.2.14-rmk-mercury/include/config/isa/dma.h linux-2.2.14-rmk-mercury-gcc3/include/config/isa/dma.h --- linux-2.2.14-rmk-mercury/include/config/isa/dma.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/isa/dma.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ISA_DMA diff -Nru linux-2.2.14-rmk-mercury/include/config/iso9660/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/iso9660/fs.h --- linux-2.2.14-rmk-mercury/include/config/iso9660/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/iso9660/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ISO9660_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/joliet.h linux-2.2.14-rmk-mercury-gcc3/include/config/joliet.h --- linux-2.2.14-rmk-mercury/include/config/joliet.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/joliet.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_JOLIET diff -Nru linux-2.2.14-rmk-mercury/include/config/joystick.h linux-2.2.14-rmk-mercury-gcc3/include/config/joystick.h --- linux-2.2.14-rmk-mercury/include/config/joystick.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/joystick.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_JOYSTICK diff -Nru linux-2.2.14-rmk-mercury/include/config/lance.h linux-2.2.14-rmk-mercury-gcc3/include/config/lance.h --- linux-2.2.14-rmk-mercury/include/config/lance.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/lance.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_LANCE diff -Nru linux-2.2.14-rmk-mercury/include/config/lapb.h linux-2.2.14-rmk-mercury-gcc3/include/config/lapb.h --- linux-2.2.14-rmk-mercury/include/config/lapb.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/lapb.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_LAPB diff -Nru linux-2.2.14-rmk-mercury/include/config/llc.h linux-2.2.14-rmk-mercury-gcc3/include/config/llc.h --- linux-2.2.14-rmk-mercury/include/config/llc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/llc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_LLC diff -Nru linux-2.2.14-rmk-mercury/include/config/lne390.h linux-2.2.14-rmk-mercury-gcc3/include/config/lne390.h --- linux-2.2.14-rmk-mercury/include/config/lne390.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/lne390.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_LNE390 diff -Nru linux-2.2.14-rmk-mercury/include/config/load/module/images.h linux-2.2.14-rmk-mercury-gcc3/include/config/load/module/images.h --- linux-2.2.14-rmk-mercury/include/config/load/module/images.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/load/module/images.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_LOAD_MODULE_IMAGES 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/lockd.h linux-2.2.14-rmk-mercury-gcc3/include/config/lockd.h --- linux-2.2.14-rmk-mercury/include/config/lockd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/lockd.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_LOCKD 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/magic/sysrq.h linux-2.2.14-rmk-mercury-gcc3/include/config/magic/sysrq.h --- linux-2.2.14-rmk-mercury/include/config/magic/sysrq.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/magic/sysrq.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_MAGIC_SYSRQ diff -Nru linux-2.2.14-rmk-mercury/include/config/mercury/display.h linux-2.2.14-rmk-mercury-gcc3/include/config/mercury/display.h --- linux-2.2.14-rmk-mercury/include/config/mercury/display.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/mercury/display.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_MERCURY_DISPLAY 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/mercury/input.h linux-2.2.14-rmk-mercury-gcc3/include/config/mercury/input.h --- linux-2.2.14-rmk-mercury/include/config/mercury/input.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/mercury/input.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_MERCURY_INPUT 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/minix/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/minix/fs.h --- linux-2.2.14-rmk-mercury/include/config/minix/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/minix/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_MINIX_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/modules.h linux-2.2.14-rmk-mercury-gcc3/include/config/modules.h --- linux-2.2.14-rmk-mercury/include/config/modules.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/modules.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_MODULES diff -Nru linux-2.2.14-rmk-mercury/include/config/mouse.h linux-2.2.14-rmk-mercury-gcc3/include/config/mouse.h --- linux-2.2.14-rmk-mercury/include/config/mouse.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/mouse.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_MOUSE diff -Nru linux-2.2.14-rmk-mercury/include/config/moxa/intellio.h linux-2.2.14-rmk-mercury-gcc3/include/config/moxa/intellio.h --- linux-2.2.14-rmk-mercury/include/config/moxa/intellio.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/moxa/intellio.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_MOXA_INTELLIO diff -Nru linux-2.2.14-rmk-mercury/include/config/moxa/smartio.h linux-2.2.14-rmk-mercury-gcc3/include/config/moxa/smartio.h --- linux-2.2.14-rmk-mercury/include/config/moxa/smartio.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/moxa/smartio.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_MOXA_SMARTIO diff -Nru linux-2.2.14-rmk-mercury/include/config/msdos/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/msdos/fs.h --- linux-2.2.14-rmk-mercury/include/config/msdos/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/msdos/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_MSDOS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/msdos/partition.h linux-2.2.14-rmk-mercury-gcc3/include/config/msdos/partition.h --- linux-2.2.14-rmk-mercury/include/config/msdos/partition.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/msdos/partition.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_MSDOS_PARTITION 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/ncp/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/ncp/fs.h --- linux-2.2.14-rmk-mercury/include/config/ncp/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ncp/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NCP_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/ne2k/pci.h linux-2.2.14-rmk-mercury-gcc3/include/config/ne2k/pci.h --- linux-2.2.14-rmk-mercury/include/config/ne2k/pci.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ne2k/pci.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NE2K_PCI diff -Nru linux-2.2.14-rmk-mercury/include/config/ne3210.h linux-2.2.14-rmk-mercury-gcc3/include/config/ne3210.h --- linux-2.2.14-rmk-mercury/include/config/ne3210.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ne3210.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NE3210 diff -Nru linux-2.2.14-rmk-mercury/include/config/net/eisa.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/eisa.h --- linux-2.2.14-rmk-mercury/include/config/net/eisa.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/eisa.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_NET_EISA 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/net/ethernet.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/ethernet.h --- linux-2.2.14-rmk-mercury/include/config/net/ethernet.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/ethernet.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_NET_ETHERNET 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/net/fastroute.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/fastroute.h --- linux-2.2.14-rmk-mercury/include/config/net/fastroute.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/fastroute.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_FASTROUTE diff -Nru linux-2.2.14-rmk-mercury/include/config/net/fc.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/fc.h --- linux-2.2.14-rmk-mercury/include/config/net/fc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/fc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_FC diff -Nru linux-2.2.14-rmk-mercury/include/config/net/hw/flowcontrol.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/hw/flowcontrol.h --- linux-2.2.14-rmk-mercury/include/config/net/hw/flowcontrol.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/hw/flowcontrol.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_HW_FLOWCONTROL diff -Nru linux-2.2.14-rmk-mercury/include/config/net/ipgre.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/ipgre.h --- linux-2.2.14-rmk-mercury/include/config/net/ipgre.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/ipgre.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_IPGRE diff -Nru linux-2.2.14-rmk-mercury/include/config/net/ipip.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/ipip.h --- linux-2.2.14-rmk-mercury/include/config/net/ipip.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/ipip.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_IPIP diff -Nru linux-2.2.14-rmk-mercury/include/config/net/isa.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/isa.h --- linux-2.2.14-rmk-mercury/include/config/net/isa.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/isa.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_ISA diff -Nru linux-2.2.14-rmk-mercury/include/config/net/pocket.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/pocket.h --- linux-2.2.14-rmk-mercury/include/config/net/pocket.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/pocket.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_POCKET diff -Nru linux-2.2.14-rmk-mercury/include/config/net/radio.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/radio.h --- linux-2.2.14-rmk-mercury/include/config/net/radio.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/radio.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_RADIO diff -Nru linux-2.2.14-rmk-mercury/include/config/net/sb1000.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/sb1000.h --- linux-2.2.14-rmk-mercury/include/config/net/sb1000.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/sb1000.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_SB1000 diff -Nru linux-2.2.14-rmk-mercury/include/config/net/sched.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/sched.h --- linux-2.2.14-rmk-mercury/include/config/net/sched.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/sched.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_SCHED diff -Nru linux-2.2.14-rmk-mercury/include/config/net/vendor/3com.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/vendor/3com.h --- linux-2.2.14-rmk-mercury/include/config/net/vendor/3com.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/vendor/3com.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_VENDOR_3COM diff -Nru linux-2.2.14-rmk-mercury/include/config/net/vendor/racal.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/vendor/racal.h --- linux-2.2.14-rmk-mercury/include/config/net/vendor/racal.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/vendor/racal.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_VENDOR_RACAL diff -Nru linux-2.2.14-rmk-mercury/include/config/net/vendor/smc.h linux-2.2.14-rmk-mercury-gcc3/include/config/net/vendor/smc.h --- linux-2.2.14-rmk-mercury/include/config/net/vendor/smc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net/vendor/smc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NET_VENDOR_SMC diff -Nru linux-2.2.14-rmk-mercury/include/config/net.h linux-2.2.14-rmk-mercury-gcc3/include/config/net.h --- linux-2.2.14-rmk-mercury/include/config/net.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/net.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_NET 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/netdevices.h linux-2.2.14-rmk-mercury-gcc3/include/config/netdevices.h --- linux-2.2.14-rmk-mercury/include/config/netdevices.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/netdevices.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_NETDEVICES 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/netlink.h linux-2.2.14-rmk-mercury-gcc3/include/config/netlink.h --- linux-2.2.14-rmk-mercury/include/config/netlink.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/netlink.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NETLINK diff -Nru linux-2.2.14-rmk-mercury/include/config/nfs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/nfs/fs.h --- linux-2.2.14-rmk-mercury/include/config/nfs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/nfs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_NFS_FS 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/nfsd.h linux-2.2.14-rmk-mercury-gcc3/include/config/nfsd.h --- linux-2.2.14-rmk-mercury/include/config/nfsd.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/nfsd.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NFSD diff -Nru linux-2.2.14-rmk-mercury/include/config/nls.h linux-2.2.14-rmk-mercury-gcc3/include/config/nls.h --- linux-2.2.14-rmk-mercury/include/config/nls.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/nls.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NLS diff -Nru linux-2.2.14-rmk-mercury/include/config/ntfs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/ntfs/fs.h --- linux-2.2.14-rmk-mercury/include/config/ntfs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ntfs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NTFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/nvram.h linux-2.2.14-rmk-mercury-gcc3/include/config/nvram.h --- linux-2.2.14-rmk-mercury/include/config/nvram.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/nvram.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_NVRAM diff -Nru linux-2.2.14-rmk-mercury/include/config/nwfpe.h linux-2.2.14-rmk-mercury-gcc3/include/config/nwfpe.h --- linux-2.2.14-rmk-mercury/include/config/nwfpe.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/nwfpe.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_NWFPE 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/packet.h linux-2.2.14-rmk-mercury-gcc3/include/config/packet.h --- linux-2.2.14-rmk-mercury/include/config/packet.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/packet.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_PACKET diff -Nru linux-2.2.14-rmk-mercury/include/config/paride/parport.h linux-2.2.14-rmk-mercury-gcc3/include/config/paride/parport.h --- linux-2.2.14-rmk-mercury/include/config/paride/parport.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/paride/parport.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_PARIDE_PARPORT 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/paride.h linux-2.2.14-rmk-mercury-gcc3/include/config/paride.h --- linux-2.2.14-rmk-mercury/include/config/paride.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/paride.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_PARIDE diff -Nru linux-2.2.14-rmk-mercury/include/config/parport.h linux-2.2.14-rmk-mercury-gcc3/include/config/parport.h --- linux-2.2.14-rmk-mercury/include/config/parport.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/parport.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_PARPORT diff -Nru linux-2.2.14-rmk-mercury/include/config/partition/advanced.h linux-2.2.14-rmk-mercury-gcc3/include/config/partition/advanced.h --- linux-2.2.14-rmk-mercury/include/config/partition/advanced.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/partition/advanced.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_PARTITION_ADVANCED diff -Nru linux-2.2.14-rmk-mercury/include/config/pcnet32.h linux-2.2.14-rmk-mercury-gcc3/include/config/pcnet32.h --- linux-2.2.14-rmk-mercury/include/config/pcnet32.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/pcnet32.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_PCNET32 diff -Nru linux-2.2.14-rmk-mercury/include/config/pnp.h linux-2.2.14-rmk-mercury-gcc3/include/config/pnp.h --- linux-2.2.14-rmk-mercury/include/config/pnp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/pnp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_PNP diff -Nru linux-2.2.14-rmk-mercury/include/config/ppp.h linux-2.2.14-rmk-mercury-gcc3/include/config/ppp.h --- linux-2.2.14-rmk-mercury/include/config/ppp.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ppp.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_PPP diff -Nru linux-2.2.14-rmk-mercury/include/config/proc/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/proc/fs.h --- linux-2.2.14-rmk-mercury/include/config/proc/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/proc/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_PROC_FS 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/qic02/tape.h linux-2.2.14-rmk-mercury-gcc3/include/config/qic02/tape.h --- linux-2.2.14-rmk-mercury/include/config/qic02/tape.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/qic02/tape.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_QIC02_TAPE diff -Nru linux-2.2.14-rmk-mercury/include/config/qnx4fs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/qnx4fs/fs.h --- linux-2.2.14-rmk-mercury/include/config/qnx4fs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/qnx4fs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_QNX4FS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/quota.h linux-2.2.14-rmk-mercury-gcc3/include/config/quota.h --- linux-2.2.14-rmk-mercury/include/config/quota.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/quota.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_QUOTA diff -Nru linux-2.2.14-rmk-mercury/include/config/rcpci.h linux-2.2.14-rmk-mercury-gcc3/include/config/rcpci.h --- linux-2.2.14-rmk-mercury/include/config/rcpci.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/rcpci.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_RCPCI diff -Nru linux-2.2.14-rmk-mercury/include/config/riscom8.h linux-2.2.14-rmk-mercury-gcc3/include/config/riscom8.h --- linux-2.2.14-rmk-mercury/include/config/riscom8.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/riscom8.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_RISCOM8 diff -Nru linux-2.2.14-rmk-mercury/include/config/rocketport.h linux-2.2.14-rmk-mercury-gcc3/include/config/rocketport.h --- linux-2.2.14-rmk-mercury/include/config/rocketport.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/rocketport.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ROCKETPORT diff -Nru linux-2.2.14-rmk-mercury/include/config/romfs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/romfs/fs.h --- linux-2.2.14-rmk-mercury/include/config/romfs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/romfs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ROMFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/root/nfs.h linux-2.2.14-rmk-mercury-gcc3/include/config/root/nfs.h --- linux-2.2.14-rmk-mercury/include/config/root/nfs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/root/nfs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_ROOT_NFS 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/rtc.h linux-2.2.14-rmk-mercury-gcc3/include/config/rtc.h --- linux-2.2.14-rmk-mercury/include/config/rtc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/rtc.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_RTC diff -Nru linux-2.2.14-rmk-mercury/include/config/rtl8139.h linux-2.2.14-rmk-mercury-gcc3/include/config/rtl8139.h --- linux-2.2.14-rmk-mercury/include/config/rtl8139.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/rtl8139.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_RTL8139 diff -Nru linux-2.2.14-rmk-mercury/include/config/sbni.h linux-2.2.14-rmk-mercury-gcc3/include/config/sbni.h --- linux-2.2.14-rmk-mercury/include/config/sbni.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sbni.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SBNI diff -Nru linux-2.2.14-rmk-mercury/include/config/scsi.h linux-2.2.14-rmk-mercury-gcc3/include/config/scsi.h --- linux-2.2.14-rmk-mercury/include/config/scsi.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/scsi.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SCSI diff -Nru linux-2.2.14-rmk-mercury/include/config/serial/7110/console.h linux-2.2.14-rmk-mercury-gcc3/include/config/serial/7110/console.h --- linux-2.2.14-rmk-mercury/include/config/serial/7110/console.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/serial/7110/console.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_SERIAL_7110_CONSOLE 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/serial/7110.h linux-2.2.14-rmk-mercury-gcc3/include/config/serial/7110.h --- linux-2.2.14-rmk-mercury/include/config/serial/7110.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/serial/7110.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_SERIAL_7110 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/serial/extended.h linux-2.2.14-rmk-mercury-gcc3/include/config/serial/extended.h --- linux-2.2.14-rmk-mercury/include/config/serial/extended.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/serial/extended.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SERIAL_EXTENDED diff -Nru linux-2.2.14-rmk-mercury/include/config/serial/nonstandard.h linux-2.2.14-rmk-mercury-gcc3/include/config/serial/nonstandard.h --- linux-2.2.14-rmk-mercury/include/config/serial/nonstandard.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/serial/nonstandard.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_SERIAL_NONSTANDARD 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/serial.h linux-2.2.14-rmk-mercury-gcc3/include/config/serial.h --- linux-2.2.14-rmk-mercury/include/config/serial.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/serial.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SERIAL diff -Nru linux-2.2.14-rmk-mercury/include/config/sgi/disklabel.h linux-2.2.14-rmk-mercury-gcc3/include/config/sgi/disklabel.h --- linux-2.2.14-rmk-mercury/include/config/sgi/disklabel.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sgi/disklabel.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SGI_DISKLABEL diff -Nru linux-2.2.14-rmk-mercury/include/config/shaper.h linux-2.2.14-rmk-mercury-gcc3/include/config/shaper.h --- linux-2.2.14-rmk-mercury/include/config/shaper.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/shaper.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SHAPER diff -Nru linux-2.2.14-rmk-mercury/include/config/sis900.h linux-2.2.14-rmk-mercury-gcc3/include/config/sis900.h --- linux-2.2.14-rmk-mercury/include/config/sis900.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sis900.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SIS900 diff -Nru linux-2.2.14-rmk-mercury/include/config/sk98lin.h linux-2.2.14-rmk-mercury-gcc3/include/config/sk98lin.h --- linux-2.2.14-rmk-mercury/include/config/sk98lin.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sk98lin.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SK98LIN diff -Nru linux-2.2.14-rmk-mercury/include/config/skb/large.h linux-2.2.14-rmk-mercury-gcc3/include/config/skb/large.h --- linux-2.2.14-rmk-mercury/include/config/skb/large.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/skb/large.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SKB_LARGE diff -Nru linux-2.2.14-rmk-mercury/include/config/slip.h linux-2.2.14-rmk-mercury-gcc3/include/config/slip.h --- linux-2.2.14-rmk-mercury/include/config/slip.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/slip.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SLIP diff -Nru linux-2.2.14-rmk-mercury/include/config/smb/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/smb/fs.h --- linux-2.2.14-rmk-mercury/include/config/smb/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/smb/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SMB_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/smd/disklabel.h linux-2.2.14-rmk-mercury-gcc3/include/config/smd/disklabel.h --- linux-2.2.14-rmk-mercury/include/config/smd/disklabel.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/smd/disklabel.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SMD_DISKLABEL diff -Nru linux-2.2.14-rmk-mercury/include/config/specialix.h linux-2.2.14-rmk-mercury-gcc3/include/config/specialix.h --- linux-2.2.14-rmk-mercury/include/config/specialix.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/specialix.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SPECIALIX diff -Nru linux-2.2.14-rmk-mercury/include/config/staldrv.h linux-2.2.14-rmk-mercury-gcc3/include/config/staldrv.h --- linux-2.2.14-rmk-mercury/include/config/staldrv.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/staldrv.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_STALDRV diff -Nru linux-2.2.14-rmk-mercury/include/config/sunrpc.h linux-2.2.14-rmk-mercury-gcc3/include/config/sunrpc.h --- linux-2.2.14-rmk-mercury/include/config/sunrpc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sunrpc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_SUNRPC 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/sx.h linux-2.2.14-rmk-mercury-gcc3/include/config/sx.h --- linux-2.2.14-rmk-mercury/include/config/sx.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sx.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SX diff -Nru linux-2.2.14-rmk-mercury/include/config/syn/cookies.h linux-2.2.14-rmk-mercury-gcc3/include/config/syn/cookies.h --- linux-2.2.14-rmk-mercury/include/config/syn/cookies.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/syn/cookies.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SYN_COOKIES diff -Nru linux-2.2.14-rmk-mercury/include/config/sysctl.h linux-2.2.14-rmk-mercury-gcc3/include/config/sysctl.h --- linux-2.2.14-rmk-mercury/include/config/sysctl.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sysctl.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SYSCTL diff -Nru linux-2.2.14-rmk-mercury/include/config/sysv/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/sysv/fs.h --- linux-2.2.14-rmk-mercury/include/config/sysv/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sysv/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_SYSV_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/sysvipc.h linux-2.2.14-rmk-mercury-gcc3/include/config/sysvipc.h --- linux-2.2.14-rmk-mercury/include/config/sysvipc.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/sysvipc.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_SYSVIPC 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/tlan.h linux-2.2.14-rmk-mercury-gcc3/include/config/tlan.h --- linux-2.2.14-rmk-mercury/include/config/tlan.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/tlan.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_TLAN diff -Nru linux-2.2.14-rmk-mercury/include/config/tr.h linux-2.2.14-rmk-mercury-gcc3/include/config/tr.h --- linux-2.2.14-rmk-mercury/include/config/tr.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/tr.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_TR diff -Nru linux-2.2.14-rmk-mercury/include/config/ufs/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/ufs/fs.h --- linux-2.2.14-rmk-mercury/include/config/ufs/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/ufs/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_UFS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/umsdos/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/umsdos/fs.h --- linux-2.2.14-rmk-mercury/include/config/umsdos/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/umsdos/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_UMSDOS_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/unix.h linux-2.2.14-rmk-mercury-gcc3/include/config/unix.h --- linux-2.2.14-rmk-mercury/include/config/unix.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/unix.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#define CONFIG_UNIX 1 diff -Nru linux-2.2.14-rmk-mercury/include/config/unix98/ptys.h linux-2.2.14-rmk-mercury-gcc3/include/config/unix98/ptys.h --- linux-2.2.14-rmk-mercury/include/config/unix98/ptys.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/unix98/ptys.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_UNIX98_PTYS diff -Nru linux-2.2.14-rmk-mercury/include/config/vfat/fs.h linux-2.2.14-rmk-mercury-gcc3/include/config/vfat/fs.h --- linux-2.2.14-rmk-mercury/include/config/vfat/fs.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/vfat/fs.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_VFAT_FS diff -Nru linux-2.2.14-rmk-mercury/include/config/via/rhine.h linux-2.2.14-rmk-mercury-gcc3/include/config/via/rhine.h --- linux-2.2.14-rmk-mercury/include/config/via/rhine.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/via/rhine.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_VIA_RHINE diff -Nru linux-2.2.14-rmk-mercury/include/config/video/dev.h linux-2.2.14-rmk-mercury-gcc3/include/config/video/dev.h --- linux-2.2.14-rmk-mercury/include/config/video/dev.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/video/dev.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_VIDEO_DEV diff -Nru linux-2.2.14-rmk-mercury/include/config/vt.h linux-2.2.14-rmk-mercury-gcc3/include/config/vt.h --- linux-2.2.14-rmk-mercury/include/config/vt.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/vt.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_VT diff -Nru linux-2.2.14-rmk-mercury/include/config/wan/router.h linux-2.2.14-rmk-mercury-gcc3/include/config/wan/router.h --- linux-2.2.14-rmk-mercury/include/config/wan/router.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/wan/router.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_WAN_ROUTER diff -Nru linux-2.2.14-rmk-mercury/include/config/watchdog.h linux-2.2.14-rmk-mercury-gcc3/include/config/watchdog.h --- linux-2.2.14-rmk-mercury/include/config/watchdog.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/watchdog.h 2007-07-10 11:55:06.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_WATCHDOG diff -Nru linux-2.2.14-rmk-mercury/include/config/x25.h linux-2.2.14-rmk-mercury-gcc3/include/config/x25.h --- linux-2.2.14-rmk-mercury/include/config/x25.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/x25.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_X25 diff -Nru linux-2.2.14-rmk-mercury/include/config/yellowfin.h linux-2.2.14-rmk-mercury-gcc3/include/config/yellowfin.h --- linux-2.2.14-rmk-mercury/include/config/yellowfin.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/yellowfin.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_YELLOWFIN diff -Nru linux-2.2.14-rmk-mercury/include/config/znet.h linux-2.2.14-rmk-mercury-gcc3/include/config/znet.h --- linux-2.2.14-rmk-mercury/include/config/znet.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/config/znet.h 2007-07-10 11:46:46.000000000 +0100 @@ -0,0 +1 @@ +#undef CONFIG_ZNET diff -Nru linux-2.2.14-rmk-mercury/include/linux/autoconf.h linux-2.2.14-rmk-mercury-gcc3/include/linux/autoconf.h --- linux-2.2.14-rmk-mercury/include/linux/autoconf.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/linux/autoconf.h 2007-07-10 11:54:25.000000000 +0100 @@ -0,0 +1,330 @@ +/* + * Automatically generated C config: don't edit + */ +#define AUTOCONF_INCLUDED +#define CONFIG_ARM 1 + +/* + * Code maturity level options + */ +#define CONFIG_EXPERIMENTAL 1 + +/* + * System and processor type + */ +#undef CONFIG_ARCH_ARC +#undef CONFIG_ARCH_A5K +#undef CONFIG_ARCH_RPC +#undef CONFIG_ARCH_EBSA110 +#undef CONFIG_FOOTBRIDGE +#define CONFIG_ARCH_CLPS7212 1 +#undef CONFIG_BOOT_KERNEL_IMAGE +#define CONFIG_LOAD_MODULE_IMAGES 1 +#undef CONFIG_ARCH_ACORN +#define CONFIG_CPU_32 1 +#undef CONFIG_CPU_26 +#undef CONFIG_ARCH_EB7212 +#define CONFIG_ARCH_MERCURY 1 +#define CONFIG_CPU_ARM7 1 +#undef KMEM_IS_VIRTUAL +#undef CONFIG_ISA_DMA +#undef CONFIG_ALIGNMENT_TRAP + +/* + * Loadable module support + */ +#undef CONFIG_MODULES + +/* + * General setup + */ +#define CONFIG_NET 1 +#define CONFIG_SYSVIPC 1 +#undef CONFIG_BSD_PROCESS_ACCT +#undef CONFIG_SYSCTL +#define CONFIG_NWFPE 1 +#undef CONFIG_BINFMT_AOUT +#define CONFIG_BINFMT_ELF 1 +#undef CONFIG_BINFMT_MISC +#undef CONFIG_ARTHUR +#undef CONFIG_PARPORT +#define CONFIG_CMDLINE "loadmodule=0xf0270000" + +/* + * Plug and Play support + */ +#undef CONFIG_PNP + +/* + * Block devices + */ +#undef CONFIG_BLK_DEV_FD +#undef CONFIG_BLK_DEV_IDE + +/* + * Please see Documentation/ide.txt for help/info on IDE drives + */ +#undef CONFIG_BLK_DEV_HD_ONLY + +/* + * Additional Block Devices + */ +#undef CONFIG_BLK_DEV_LOOP +#undef CONFIG_BLK_DEV_NBD +#undef CONFIG_BLK_DEV_MD +#undef CONFIG_BLK_DEV_RAM +#undef CONFIG_BLK_DEV_XD +#define CONFIG_PARIDE_PARPORT 1 +#undef CONFIG_PARIDE +#undef CONFIG_BLK_DEV_HD + +/* + * Character devices + */ +#undef CONFIG_VT +#undef CONFIG_SERIAL +#undef CONFIG_SERIAL_EXTENDED +#define CONFIG_SERIAL_NONSTANDARD 1 +#undef CONFIG_COMPUTONE +#undef CONFIG_ROCKETPORT +#undef CONFIG_CYCLADES +#undef CONFIG_DIGIEPCA +#undef CONFIG_DIGI +#undef CONFIG_ESPSERIAL +#undef CONFIG_MOXA_INTELLIO +#undef CONFIG_MOXA_SMARTIO +#undef CONFIG_RISCOM8 +#undef CONFIG_SPECIALIX +#undef CONFIG_SX +#undef CONFIG_STALDRV +#define CONFIG_SERIAL_7110 1 +#define CONFIG_SERIAL_7110_CONSOLE 1 +#define CONFIG_AUDIO_7212 1 +#define CONFIG_MERCURY_DISPLAY 1 +#define CONFIG_MERCURY_INPUT 1 +#undef CONFIG_UNIX98_PTYS + +/* + * Mice + */ +#undef CONFIG_BUSMOUSE +#undef CONFIG_MOUSE + +/* + * Joysticks + */ +#undef CONFIG_JOYSTICK +#undef CONFIG_QIC02_TAPE +#undef CONFIG_WATCHDOG +#undef CONFIG_NVRAM +#undef CONFIG_RTC + +/* + * Video For Linux + */ +#undef CONFIG_VIDEO_DEV +#undef CONFIG_DTLK + +/* + * Ftape, the floppy tape device driver + */ +#undef CONFIG_FTAPE + +/* + * Networking options + */ +#undef CONFIG_PACKET +#undef CONFIG_NETLINK +#undef CONFIG_FIREWALL +#undef CONFIG_FILTER +#define CONFIG_UNIX 1 +#define CONFIG_INET 1 +#undef CONFIG_IP_MULTICAST +#undef CONFIG_IP_ADVANCED_ROUTER +#define CONFIG_IP_PNP 1 +#undef CONFIG_IP_PNP_BOOTP +#define CONFIG_IP_PNP_DHCP 1 +#define CONFIG_IP_PNP_BOOTP_VENDOR 1 +#define CONFIG_IP_PNP_BOOTP_VENDOR_ID "empeg:mercury" +#undef CONFIG_IP_PNP_RARP +#define CONFIG_IP_PNP_UPNP 1 +#define CONFIG_IP_PNP_SSDP 1 +#define CONFIG_IP_PNP_SSDP_PORT (21075) +#define CONFIG_IP_PNP_PMAP_PORT 1 +#undef CONFIG_IP_ROUTER +#undef CONFIG_NET_IPIP +#undef CONFIG_NET_IPGRE +#undef CONFIG_IP_ALIAS +#undef CONFIG_SYN_COOKIES + +/* + * (it is safe to leave these untouched) + */ +#undef CONFIG_INET_RARP +#undef CONFIG_SKB_LARGE +#undef CONFIG_IPV6 + +/* + * + */ +#undef CONFIG_IPX +#undef CONFIG_ATALK +#undef CONFIG_X25 +#undef CONFIG_LAPB +#undef CONFIG_BRIDGE +#undef CONFIG_LLC +#undef CONFIG_ECONET +#undef CONFIG_WAN_ROUTER +#undef CONFIG_NET_FASTROUTE +#undef CONFIG_NET_HW_FLOWCONTROL +#undef CONFIG_CPU_IS_SLOW + +/* + * QoS and/or fair queueing + */ +#undef CONFIG_NET_SCHED + +/* + * Amateur Radio support + */ +#undef CONFIG_HAMRADIO + +/* + * IrDA subsystem support + */ +#undef CONFIG_IRDA + +/* + * Network device support + */ +#define CONFIG_NETDEVICES 1 + +/* + * ARCnet devices + */ +#undef CONFIG_ARCNET +#undef CONFIG_DUMMY +#undef CONFIG_EQUALIZER +#undef CONFIG_NET_SB1000 + +/* + * Ethernet (10 or 100Mbit) + */ +#define CONFIG_NET_ETHERNET 1 +#undef CONFIG_ARM_AM79C961A +#undef CONFIG_NET_VENDOR_3COM +#undef CONFIG_LANCE +#undef CONFIG_NET_VENDOR_SMC +#undef CONFIG_NET_VENDOR_RACAL +#undef CONFIG_RTL8139 +#undef CONFIG_NET_ISA +#define CONFIG_NET_EISA 1 +#undef CONFIG_PCNET32 +#undef CONFIG_AC3200 +#undef CONFIG_APRICOT +#define CONFIG_CS89x0 1 +#undef CONFIG_DM9102 +#undef CONFIG_DE4X5 +#undef CONFIG_DEC_ELCP +#undef CONFIG_DEC_ELCP_OLD +#undef CONFIG_DGRS +#undef CONFIG_EEXPRESS_PRO100 +#undef CONFIG_LNE390 +#undef CONFIG_NE3210 +#undef CONFIG_NE2K_PCI +#undef CONFIG_TLAN +#undef CONFIG_VIA_RHINE +#undef CONFIG_SIS900 +#undef CONFIG_ES3210 +#undef CONFIG_EPIC100 +#undef CONFIG_ZNET +#undef CONFIG_NET_POCKET +#define CONFIG_BCM4210 1 + +/* + * Ethernet (1000 Mbit) + */ +#undef CONFIG_ACENIC +#undef CONFIG_YELLOWFIN +#undef CONFIG_SK98LIN +#undef CONFIG_FDDI +#undef CONFIG_HIPPI +#undef CONFIG_PPP +#undef CONFIG_SLIP +#undef CONFIG_NET_RADIO + +/* + * Token ring devices + */ +#undef CONFIG_TR +#undef CONFIG_NET_FC +#undef CONFIG_RCPCI +#undef CONFIG_SHAPER + +/* + * Wan interfaces + */ +#undef CONFIG_COMX +#undef CONFIG_DLCI +#undef CONFIG_SBNI + +/* + * SCSI support + */ +#undef CONFIG_SCSI + +/* + * Filesystems + */ +#undef CONFIG_QUOTA +#undef CONFIG_AUTOFS_FS +#undef CONFIG_ADFS_FS +#undef CONFIG_AFFS_FS +#undef CONFIG_HFS_FS +#undef CONFIG_FAT_FS +#undef CONFIG_MSDOS_FS +#undef CONFIG_UMSDOS_FS +#undef CONFIG_VFAT_FS +#undef CONFIG_ISO9660_FS +#undef CONFIG_JOLIET +#undef CONFIG_MINIX_FS +#undef CONFIG_NTFS_FS +#undef CONFIG_HPFS_FS +#define CONFIG_PROC_FS 1 +#undef CONFIG_QNX4FS_FS +#undef CONFIG_ROMFS_FS +#undef CONFIG_EXT2_FS +#undef CONFIG_SYSV_FS +#undef CONFIG_UFS_FS +#undef CONFIG_EFS_FS + +/* + * Network File Systems + */ +#undef CONFIG_CODA_FS +#define CONFIG_NFS_FS 1 +#define CONFIG_ROOT_NFS 1 +#undef CONFIG_NFSD +#define CONFIG_SUNRPC 1 +#define CONFIG_LOCKD 1 +#undef CONFIG_SMB_FS +#undef CONFIG_NCP_FS + +/* + * Partition Types + */ +#undef CONFIG_PARTITION_ADVANCED +#define CONFIG_MSDOS_PARTITION 1 +#undef CONFIG_SMD_DISKLABEL +#undef CONFIG_SGI_DISKLABEL +#undef CONFIG_NLS + +/* + * Kernel hacking + */ +#define CONFIG_FRAME_POINTER 1 +#define CONFIG_DEBUG_ERRORS 1 +#define CONFIG_DEBUG_USER 1 +#undef CONFIG_DEBUG_INFO +#undef CONFIG_MAGIC_SYSRQ +#define CONFIG_DEBUG_LL 1 diff -Nru linux-2.2.14-rmk-mercury/include/linux/genhd.h linux-2.2.14-rmk-mercury-gcc3/include/linux/genhd.h --- linux-2.2.14-rmk-mercury/include/linux/genhd.h 2000-03-10 15:46:47.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/linux/genhd.h 2007-07-10 12:18:58.000000000 +0100 @@ -65,7 +65,7 @@ return LINUX_OLD_RAID_PARTITION; case LINUX_RAID_PARTITION: return LINUX_RAID_PARTITION; - default: + default: ; } return 0; } diff -Nru linux-2.2.14-rmk-mercury/include/linux/sched.h linux-2.2.14-rmk-mercury-gcc3/include/linux/sched.h --- linux-2.2.14-rmk-mercury/include/linux/sched.h 2000-03-10 15:46:47.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/linux/sched.h 2007-07-10 12:36:50.000000000 +0100 @@ -472,7 +472,9 @@ extern unsigned long volatile jiffies; extern unsigned long itimer_ticks; extern unsigned long itimer_next; -extern struct timeval xtime; +//extern struct timeval xtime; +extern volatile struct timeval xtime __attribute__ ((aligned (16))); + extern void do_timer(struct pt_regs *); extern unsigned int * prof_buffer; diff -Nru linux-2.2.14-rmk-mercury/include/linux/signal.h linux-2.2.14-rmk-mercury-gcc3/include/linux/signal.h --- linux-2.2.14-rmk-mercury/include/linux/signal.h 2000-03-10 15:46:47.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/linux/signal.h 2007-07-10 12:17:49.000000000 +0100 @@ -189,7 +189,7 @@ memset(&set->sig[1], 0, sizeof(long)*(_NSIG_WORDS-1)); break; case 2: set->sig[1] = 0; - case 1: + case 1: ; } } @@ -201,7 +201,7 @@ memset(&set->sig[1], -1, sizeof(long)*(_NSIG_WORDS-1)); break; case 2: set->sig[1] = -1; - case 1: + case 1: ; } } diff -Nru linux-2.2.14-rmk-mercury/include/linux/sunrpc/debug.h linux-2.2.14-rmk-mercury-gcc3/include/linux/sunrpc/debug.h --- linux-2.2.14-rmk-mercury/include/linux/sunrpc/debug.h 2000-03-10 15:46:47.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/linux/sunrpc/debug.h 2007-07-10 12:42:12.000000000 +0100 @@ -45,12 +45,12 @@ extern unsigned int nlm_debug; #endif -#define dprintk(args...) dfprintk(FACILITY, ## args) +#define dprintk(args...) dfprintk(FACILITY, args) #undef ifdebug #ifdef RPC_DEBUG # define ifdebug(fac) if (rpc_debug & RPCDBG_##fac) -# define dfprintk(fac, args...) do { ifdebug(fac) printk(## args); } while(0) +# define dfprintk(fac, args...) do { ifdebug(fac) printk(args); } while(0) # define RPC_IFDEBUG(x) x #else # define dfprintk(fac, args...) do ; while (0) @@ -58,7 +58,7 @@ #endif #ifdef RPC_PROFILE -# define pprintk(args...) printk(## args) +# define pprintk(args...) printk(args) #else # define pprintk(args...) do ; while (0) #endif diff -Nru linux-2.2.14-rmk-mercury/include/linux/version.h linux-2.2.14-rmk-mercury-gcc3/include/linux/version.h --- linux-2.2.14-rmk-mercury/include/linux/version.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.2.14-rmk-mercury-gcc3/include/linux/version.h 2007-07-10 11:23:48.000000000 +0100 @@ -0,0 +1,3 @@ +#define UTS_RELEASE "2.2.14-rmk4-mercury19" +#define LINUX_VERSION_CODE 131598 +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) diff -Nru linux-2.2.14-rmk-mercury/include/net/sock.h linux-2.2.14-rmk-mercury-gcc3/include/net/sock.h --- linux-2.2.14-rmk-mercury/include/net/sock.h 2000-03-10 15:46:48.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/include/net/sock.h 2007-07-10 12:57:43.000000000 +0100 @@ -349,7 +349,7 @@ /* Define this to get the sk->debug debugging facility. */ #define SOCK_DEBUGGING #ifdef SOCK_DEBUGGING -#define SOCK_DEBUG(sk, msg...) do { if((sk) && ((sk)->debug)) printk(KERN_DEBUG ## msg); } while (0) +#define SOCK_DEBUG(sk, msg...) do { if((sk) && ((sk)->debug)) printk(KERN_DEBUG msg); } while (0) #else #define SOCK_DEBUG(sk, msg...) do { } while (0) #endif diff -Nru linux-2.2.14-rmk-mercury/kernel/sched.c linux-2.2.14-rmk-mercury-gcc3/kernel/sched.c --- linux-2.2.14-rmk-mercury/kernel/sched.c 2000-03-10 15:46:47.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/kernel/sched.c 2007-07-10 12:28:27.000000000 +0100 @@ -727,7 +727,7 @@ } default: del_from_runqueue(prev); - case TASK_RUNNING: + case TASK_RUNNING: ; } prev->need_resched = 0; diff -Nru linux-2.2.14-rmk-mercury/mm/slab.c linux-2.2.14-rmk-mercury-gcc3/mm/slab.c --- linux-2.2.14-rmk-mercury/mm/slab.c 2000-03-10 15:46:47.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/mm/slab.c 2007-07-10 12:29:44.000000000 +0100 @@ -1815,7 +1815,7 @@ * must have been become active). */ goto dma_fail; -good_dma: +good_dma: ; } if (slabp == best_cachep->c_freep) best_cachep->c_freep = slabp->s_nextp; diff -Nru linux-2.2.14-rmk-mercury/net/ipv4/arp.c linux-2.2.14-rmk-mercury-gcc3/net/ipv4/arp.c --- linux-2.2.14-rmk-mercury/net/ipv4/arp.c 2000-03-10 15:46:51.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/ipv4/arp.c 2007-07-10 13:00:44.000000000 +0100 @@ -274,6 +274,7 @@ neigh->output = neigh->ops->output; return 0; #endif + ; } #endif if (neigh->type == RTN_MULTICAST) { diff -Nru linux-2.2.14-rmk-mercury/net/ipv4/ipconfig.c linux-2.2.14-rmk-mercury-gcc3/net/ipv4/ipconfig.c --- linux-2.2.14-rmk-mercury/net/ipv4/ipconfig.c 2000-11-09 10:52:10.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/ipv4/ipconfig.c 2007-07-10 13:05:27.000000000 +0100 @@ -131,7 +131,7 @@ static int ic_proto_have_if __initdata = 0; #if CONFIG_IP_PNP_BOOTP_VENDOR -static const char bootp_vendor_ident[] __initdata = CONFIG_IP_PNP_BOOTP_VENDOR_ID; +static const char bootp_vendor_ident[] = CONFIG_IP_PNP_BOOTP_VENDOR_ID; #endif #ifdef CONFIG_IP_PNP_UPNP diff -Nru linux-2.2.14-rmk-mercury/net/ipv4/route.c linux-2.2.14-rmk-mercury-gcc3/net/ipv4/route.c --- linux-2.2.14-rmk-mercury/net/ipv4/route.c 2000-03-10 15:46:51.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/ipv4/route.c 2007-07-10 12:56:36.000000000 +0100 @@ -722,6 +722,7 @@ ntohl(old_gw), dev->name, ntohl(new_gw), ntohl(saddr), ntohl(daddr), tos); #endif + ; } static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst) diff -Nru linux-2.2.14-rmk-mercury/net/ipv4/tcp_ipv4.c linux-2.2.14-rmk-mercury-gcc3/net/ipv4/tcp_ipv4.c --- linux-2.2.14-rmk-mercury/net/ipv4/tcp_ipv4.c 2000-03-10 15:46:51.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/ipv4/tcp_ipv4.c 2007-07-10 12:59:53.000000000 +0100 @@ -227,7 +227,7 @@ if (tb->port == rover) goto next; break; - next: + next: ; } while (--remaining > 0); tcp_port_rover = rover; @@ -592,7 +592,7 @@ if (usin->sin_family) return(-EAFNOSUPPORT); if (!complained++) - printk(KERN_DEBUG "%s forgot to set AF_INET in " __FUNCTION__ "\n", current->comm); + printk(KERN_DEBUG "%s forgot to set AF_INET in %s\n", current->comm, __FUNCTION__); } nexthop = daddr = usin->sin_addr.s_addr; @@ -1585,7 +1585,7 @@ after(TCP_SKB_CB(skb)->seq, req->rcv_isn+1)) return; tcp_synq_unlink(tp, req, prev); - (req->sk ? sk->ack_backlog : tp->syn_backlog)--; + if(req->sk) sk->ack_backlog--; else tp->syn_backlog--; req->class->destructor(req); tcp_openreq_free(req); @@ -1730,7 +1730,7 @@ goto discard_it; } default: - /* CHECKSUM_UNNECESSARY */ + /* CHECKSUM_UNNECESSARY */; } if((th->doff * 4) < sizeof(struct tcphdr) || diff -Nru linux-2.2.14-rmk-mercury/net/ipv4/udp.c linux-2.2.14-rmk-mercury-gcc3/net/ipv4/udp.c --- linux-2.2.14-rmk-mercury/net/ipv4/udp.c 2000-03-10 15:46:51.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/ipv4/udp.c 2007-07-10 13:00:16.000000000 +0100 @@ -156,7 +156,7 @@ } while ((sk = sk->next) != NULL); best_size_so_far = size; best = result; - next: + next: ; } result = best; for(;; result += UDP_HTABLE_SIZE) { diff -Nru linux-2.2.14-rmk-mercury/net/ipv6/ip6_fib.c linux-2.2.14-rmk-mercury-gcc3/net/ipv6/ip6_fib.c --- linux-2.2.14-rmk-mercury/net/ipv6/ip6_fib.c 2000-03-10 15:46:52.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/ipv6/ip6_fib.c 2007-07-10 12:54:52.000000000 +0100 @@ -36,7 +36,7 @@ #undef CONFIG_IPV6_SUBTREES #if RT6_DEBUG >= 1 -#define BUG_TRAP(x) ({ if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } }) +#define BUG_TRAP(x) ({ if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):\n", __LINE__); } }) #else #define BUG_TRAP(x) do { ; } while (0) #endif diff -Nru linux-2.2.14-rmk-mercury/net/ipv6/route.c linux-2.2.14-rmk-mercury-gcc3/net/ipv6/route.c --- linux-2.2.14-rmk-mercury/net/ipv6/route.c 2000-03-10 15:46:52.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/ipv6/route.c 2007-07-10 12:55:00.000000000 +0100 @@ -60,7 +60,7 @@ #endif #if RT6_DEBUG >= 1 -#define BUG_TRAP(x) ({ if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } }) +#define BUG_TRAP(x) ({ if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):\n", __LINE__); } }) #else #define BUG_TRAP(x) do { ; } while (0) #endif diff -Nru linux-2.2.14-rmk-mercury/net/sched/cls_u32.c linux-2.2.14-rmk-mercury-gcc3/net/sched/cls_u32.c --- linux-2.2.14-rmk-mercury/net/sched/cls_u32.c 2000-03-10 15:46:54.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/sched/cls_u32.c 2007-07-10 12:55:07.000000000 +0100 @@ -52,7 +52,7 @@ #include #include -#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } +#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):\n", __LINE__); } struct tc_u_knode diff -Nru linux-2.2.14-rmk-mercury/net/sched/police.c linux-2.2.14-rmk-mercury-gcc3/net/sched/police.c --- linux-2.2.14-rmk-mercury/net/sched/police.c 2000-03-10 15:46:54.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/sched/police.c 2007-07-10 12:55:14.000000000 +0100 @@ -31,7 +31,7 @@ #include #include -#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } +#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):\n", __LINE__); } #define L2T(p,L) ((p)->R_tab->data[(L)>>(p)->R_tab->rate.cell_log]) #define L2T_P(p,L) ((p)->P_tab->data[(L)>>(p)->P_tab->rate.cell_log]) diff -Nru linux-2.2.14-rmk-mercury/net/sched/sch_api.c linux-2.2.14-rmk-mercury-gcc3/net/sched/sch_api.c --- linux-2.2.14-rmk-mercury/net/sched/sch_api.c 2000-03-10 15:46:54.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/sched/sch_api.c 2007-07-10 12:55:35.000000000 +0100 @@ -40,7 +40,7 @@ #include #include -#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } +#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):\n", __LINE__); } #ifdef CONFIG_RTNETLINK static int qdisc_notify(struct sk_buff *oskb, struct nlmsghdr *n, u32 clid, diff -Nru linux-2.2.14-rmk-mercury/net/sched/sch_cbq.c linux-2.2.14-rmk-mercury-gcc3/net/sched/sch_cbq.c --- linux-2.2.14-rmk-mercury/net/sched/sch_cbq.c 2000-03-10 15:46:54.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/sched/sch_cbq.c 2007-07-10 12:55:40.000000000 +0100 @@ -192,7 +192,7 @@ #define L2T(cl,len) ((cl)->R_tab->data[(len)>>(cl)->R_tab->rate.cell_log]) -#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } +#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):\n", __LINE__); } static __inline__ unsigned cbq_hash(u32 h) diff -Nru linux-2.2.14-rmk-mercury/net/sched/sch_generic.c linux-2.2.14-rmk-mercury-gcc3/net/sched/sch_generic.c --- linux-2.2.14-rmk-mercury/net/sched/sch_generic.c 2000-03-10 15:46:54.000000000 +0000 +++ linux-2.2.14-rmk-mercury-gcc3/net/sched/sch_generic.c 2007-07-10 12:55:45.000000000 +0100 @@ -30,7 +30,7 @@ #include #include -#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); } +#define BUG_TRAP(x) if (!(x)) { printk("Assertion (" #x ") failed at " __FILE__ "(%d):\n", __LINE__); } /* Main transmission queue. */ Binary files linux-2.2.14-rmk-mercury/scripts/lxdialog/lxdialog and linux-2.2.14-rmk-mercury-gcc3/scripts/lxdialog/lxdialog differ Binary files linux-2.2.14-rmk-mercury/scripts/mkdep and linux-2.2.14-rmk-mercury-gcc3/scripts/mkdep differ Binary files linux-2.2.14-rmk-mercury/scripts/split-include and linux-2.2.14-rmk-mercury-gcc3/scripts/split-include differ