diff options
Diffstat (limited to 'uClinux-2.4.20-uc1/arch/armnommu/kernel')
-rw-r--r-- | uClinux-2.4.20-uc1/arch/armnommu/kernel/calls.S | 16 | ||||
-rw-r--r-- | uClinux-2.4.20-uc1/arch/armnommu/kernel/entry-armv.S | 15 | ||||
-rw-r--r-- | uClinux-2.4.20-uc1/arch/armnommu/kernel/head-armv.S | 38 | ||||
-rw-r--r-- | uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c | 38 | ||||
-rw-r--r-- | uClinux-2.4.20-uc1/arch/armnommu/kernel/setup.c | 6 |
5 files changed, 113 insertions, 0 deletions
diff --git a/uClinux-2.4.20-uc1/arch/armnommu/kernel/calls.S b/uClinux-2.4.20-uc1/arch/armnommu/kernel/calls.S index ee1b74a..c769133 100644 --- a/uClinux-2.4.20-uc1/arch/armnommu/kernel/calls.S +++ b/uClinux-2.4.20-uc1/arch/armnommu/kernel/calls.S @@ -236,6 +236,22 @@ __syscall_start: .long SYMBOL_NAME(sys_mincore) /* 220 */ .long SYMBOL_NAME(sys_madvise) .long SYMBOL_NAME(sys_fcntl64) + .long SYMBOL_NAME(sys_FindImage) + .long SYMBOL_NAME(sys_DelImage) + .long SYMBOL_NAME(sys_CorruptCheck) +/* 225 */ .long SYMBOL_NAME(sys_ReadWinbondFlash) + .long SYMBOL_NAME(sys_WriteWinbondFlash) + .long SYMBOL_NAME(sys_WinbondFlashBlockSize) + .long SYMBOL_NAME(sys_WinbondFlashTotalSize) + .long SYMBOL_NAME(sys_WinbondFlashBase) + +#ifdef CONFIG_USB_WBUSBD +/* 230 */ + .long SYMBOL_NAME(sys_WinbondUSBRead) + .long SYMBOL_NAME(sys_WinbondUSBWrite) + .long SYMBOL_NAME(sys_WinbondUSBGetCBW) +#endif + __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff --git a/uClinux-2.4.20-uc1/arch/armnommu/kernel/entry-armv.S b/uClinux-2.4.20-uc1/arch/armnommu/kernel/entry-armv.S index b7d1bd5..776792e 100644 --- a/uClinux-2.4.20-uc1/arch/armnommu/kernel/entry-armv.S +++ b/uClinux-2.4.20-uc1/arch/armnommu/kernel/entry-armv.S @@ -777,6 +777,21 @@ irq_prio_netarm: .macro irq_prio_table .endm +#elif defined(CONFIG_CPU_W90N745) + + .macro disable_fiq + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \base, =AIC_IPER + ldr \irqnr, [\base] + @mov \irqnr, \irqnr, lsr #2 + teq \irqnr, #0x0 + .endm + + .macro irq_prio_table + .endm + #elif defined(CONFIG_CPU_S3C3410) .macro disable_fiq diff --git a/uClinux-2.4.20-uc1/arch/armnommu/kernel/head-armv.S b/uClinux-2.4.20-uc1/arch/armnommu/kernel/head-armv.S index b297678..31a91f0 100644 --- a/uClinux-2.4.20-uc1/arch/armnommu/kernel/head-armv.S +++ b/uClinux-2.4.20-uc1/arch/armnommu/kernel/head-armv.S @@ -143,6 +143,8 @@ __entry: mov r1, #MACH_TYPE_SNDS100 #elif defined (CONFIG_BOARD_SMDK40100) mov r1, #MACH_TYPE_S3C3410 +#elif defined (CONFIG_BOARD_W90N745) + mov r1, #MACH_TYPE_W90N745 #endif mov r0, #F_BIT | I_BIT | MODE_SVC @ make sure svc mode @@ -199,6 +201,42 @@ LC0: .long __bss_start .long init_task_union+8192 #endif +#if defined(CONFIG_BOARD_W90N745) + + adr r5, LC0 + ldmia r5, {r5, r6, r8, r9, sp} @ Setup stack + + /* Copy data sections to their new home. */ + + + /* Clear BSS */ + mov r4, #0 +1: cmp r5, r8 + strcc r4, [r5],#4 + bcc 1b + + /* Pretend we know what our processor code is (for arm_id) */ + + ldr r2, W90N745_PROCESSOR_TYPE + + str r2, [r6] + mov r2, #MACH_TYPE_W90N745 + str r2, [r9] + + mov fp, #0 + b start_kernel + +LC0: .long __bss_start + .long processor_id + .long _end + .long __machine_arch_type + .long init_task_union+8192 + +W90N745_PROCESSOR_TYPE: + .long 0x32103201 +#endif + + #if defined(CONFIG_BOARD_SNDS100) adr r5, LC0 diff --git a/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c b/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c index 227cd8f..f686290 100644 --- a/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c +++ b/uClinux-2.4.20-uc1/arch/armnommu/kernel/irq.c @@ -35,6 +35,8 @@ #include <asm/arch/irq.h> /* pick up fixup_irq definition */ +#include <linux/w83977.h> + /* * Maximum IRQ count. Currently, this is arbitary. However, it should * not be set too low to prevent false triggering. Conversely, if it @@ -156,6 +158,10 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) struct irqaction * action; int cpu; +#ifdef CONFIG_BOARD_W90N745 + irq = irq >> 2; +#endif + #ifdef CONFIG_BOARD_SNDS100 /* * FIXME: This is not the best place to put this work around. @@ -163,7 +169,9 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) CLEAR_PEND_INT(irq); #endif +#ifndef CONFIG_BOARD_W90N745 irq = fixup_irq(irq); +#endif /* * Some hardware gives randomly wrong interrupts. Rather @@ -172,12 +180,21 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) if (irq >= NR_IRQS) goto bad_irq; +#ifdef CONFIG_BOARD_W90N745 + if (irq <= 0) + goto bad_irq; +#endif + desc = irq_desc + irq; spin_lock(&irq_controller_lock); desc->mask_ack(irq); spin_unlock(&irq_controller_lock); +#ifdef CONFIG_BOARD_W90N745 + irq = fixup_irq(irq); +#endif + cpu = smp_processor_id(); irq_enter(cpu, irq); kstat.irqs[cpu][irq]++; @@ -223,6 +240,10 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) irq_exit(cpu, irq); +#ifdef CONFIG_BOARD_W90N745 + DWORD_WRITE(AIC_EOSCR, 1); +#endif + if (softirq_pending(cpu)) do_softirq(); return; @@ -513,6 +534,10 @@ void __init init_irq_proc(void) { } +#ifdef CONFIG_BOARD_W90N745 +extern void init_EBI(void); +#endif + void __init init_IRQ(void) { extern void init_dma(void); @@ -527,6 +552,19 @@ void __init init_IRQ(void) irq_desc[irq].unmask = dummy_mask_unmask_irq; } +#ifdef CONFIG_BOARD_W90N745 + CSR_WRITE(AIC_MDCR, 0x7FFFE); /* disable all interrupts */ + + CSR_WRITE(CAHCNF, 0x0);/*Close Cache*/ + CSR_WRITE(CAHCON, 0x87);/*Flush Cache*/ + while(CSR_READ(CAHCON)!=0) {} + CSR_WRITE(CAHCNF, 0x7);/*Open Cache*/ +#endif + init_arch_irq(); init_dma(); + +#ifdef CONFIG_W83977 + init_EBI(); +#endif } diff --git a/uClinux-2.4.20-uc1/arch/armnommu/kernel/setup.c b/uClinux-2.4.20-uc1/arch/armnommu/kernel/setup.c index a269e85..05af4f1 100644 --- a/uClinux-2.4.20-uc1/arch/armnommu/kernel/setup.c +++ b/uClinux-2.4.20-uc1/arch/armnommu/kernel/setup.c @@ -35,6 +35,12 @@ //#define MEM_SIZE (8*1024*1024) #define MEM_SIZE (END_MEM-PAGE_OFFSET) // FIXME +#ifndef DRAM_SIZE +#define MEM_SIZE (7*1024*1024) +#else +#define MEM_SIZE DRAM_SIZE +#endif + #endif #ifndef CONFIG_CMDLINE |