From: Paul M. <le...@us...> - 2002-07-12 20:15:00
|
Update of /cvsroot/linux-mips/linux/arch/mips/kernel In directory usw-pr-cvs1:/tmp/cvs-serv32248/arch/mips/kernel Modified Files: irq.c pci-dma.c pci_auto.c proc.c setup.c Log Message: Merge yoichi-san's vr41xx patch. Still some cleanups needed.. Index: irq.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/irq.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- irq.c 30 May 2002 20:42:08 -0000 1.12 +++ irq.c 12 Jul 2002 20:14:26 -0000 1.13 @@ -25,6 +25,8 @@ #include <asm/system.h> #include <asm/uaccess.h> +static void register_irq_proc (unsigned int irq); + /* * Controller mappings for all interrupt sources: */ Index: pci-dma.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/pci-dma.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pci-dma.c 26 Nov 2001 19:02:22 -0000 1.7 +++ pci-dma.c 12 Jul 2002 20:14:26 -0000 1.8 @@ -30,7 +30,7 @@ memset(ret, 0, size); #ifdef CONFIG_NONCOHERENT_IO dma_cache_wback_inv((unsigned long) ret, size); - ret = KSEG1ADDR(ret); + ret = (void *)KSEG1ADDR(ret); #endif *dma_handle = virt_to_bus(ret); } Index: pci_auto.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/pci_auto.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pci_auto.c 23 Mar 2002 02:16:27 -0000 1.6 +++ pci_auto.c 12 Jul 2002 20:14:26 -0000 1.7 @@ -321,7 +321,6 @@ int sub_bus) { u32 temp; - int cmdstat; /* * [jsun] we always bump up baselines a little, so that if there @@ -437,8 +436,6 @@ pci_devfn, sub_bus); continue; } else if ((pci_class >> 16) == PCI_CLASS_BRIDGE_CARDBUS) { - int iosave, memsave; - DBG(" CARDBUS Bridge: primary=%.2x, secondary=%.2x\n", current_bus, sub_bus + 1); DBG("PCI Autoconfig: Found CardBus bridge, device %d function %d\n", PCI_SLOT(pci_devfn), PCI_FUNC(pci_devfn)); Index: proc.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/proc.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- proc.c 30 May 2002 22:26:45 -0000 1.19 +++ proc.c 12 Jul 2002 20:14:26 -0000 1.20 @@ -63,12 +63,18 @@ [CPU_AU1500] "Au1500", [CPU_4KEC] "MIPS 4KEc", [CPU_4KSC] "MIPS 4KSc", - [CPU_VR41XX] "NEC Vr41xx", + [CPU_VR41XX] "NEC VR41xx", [CPU_R5500] "R5500", [CPU_TX49XX] "TX49xx", [CPU_TX39XX] "TX39xx", [CPU_RC32300] "RC32300", - [CPU_20KC] "MIPS 20Kc" + [CPU_20KC] "MIPS 20Kc", + [CPU_VR4111] "NEC VR4111", + [CPU_VR4121] "NEC VR4121", + [CPU_VR4122] "NEC VR4122", + [CPU_VR4131] "NEC VR4131", + [CPU_VR4181] "NEC VR4181", + [CPU_VR4181A] "NEC VR4181A" }; Index: setup.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/setup.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- setup.c 14 Jun 2002 14:01:52 -0000 1.65 +++ setup.c 12 Jul 2002 20:14:26 -0000 1.66 @@ -243,8 +243,8 @@ static inline void cpu_probe(void) { -#ifdef CONFIG_CPU_MIPS32 unsigned long config0 = read_32bit_cp0_register(CP0_CONFIG); +#ifdef CONFIG_CPU_MIPS32 unsigned long config1; if (config0 & (1 << 31)) { @@ -351,14 +351,48 @@ mips_cpu.tlbsize = 48; break; case PRID_IMP_VR41XX: - mips_cpu.cputype = CPU_VR41XX; + switch (mips_cpu.processor_id & 0xff) { +#ifndef CONFIG_VR4181 + case PRID_REV_VR4111: + mips_cpu.cputype = CPU_VR4111; + break; + case PRID_REV_VR4121: + mips_cpu.cputype = CPU_VR4121; + break; + case PRID_REV_VR4122_REV2_1: /* same as R1.0 and R2.0 */ + case PRID_REV_VR4122_REV3_0: + case PRID_REV_VR4122_REV3_1: + mips_cpu.cputype = CPU_VR4122; + break; + case PRID_REV_VR4131_REV1_2: + config0 |= 0x00010000UL; + case PRID_REV_VR4131_REV2_0: + case PRID_REV_VR4131_REV2_1: + config0 &= ~0x00000030UL; + config0 |= 0x00400000UL; + write_32bit_cp0_register(CP0_CONFIG, config0); + case PRID_REV_VR4131_REV2_2: + mips_cpu.cputype = CPU_VR4131; + mips_cpu.icache.ways = 2; + mips_cpu.dcache.ways = 2; + break; + case PRID_REV_VR4181A_REV1_0: + case PRID_REV_VR4181A_REV1_1: + mips_cpu.cputype = CPU_VR4181A; + break; +#else + case PRID_REV_VR4181: + mips_cpu.cputype = CPU_VR4181; + break; +#endif + default: + printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n"); + mips_cpu.cputype = CPU_VR41XX; + break; + } mips_cpu.isa_level = MIPS_CPU_ISA_III; mips_cpu.options = R4K_OPTS; mips_cpu.tlbsize = 32; -#ifdef CONFIG_VR4131 - mips_cpu.icache.ways = 2; - mips_cpu.dcache.ways = 2; -#endif break; case PRID_IMP_R4300: mips_cpu.cputype = CPU_R4300; @@ -626,8 +660,6 @@ asmlinkage void __init init_arch(int argc, char **argv, char **envp, int *prom_vec) { - unsigned int s; - /* Determine which MIPS variant we are running on. */ cpu_probe(); @@ -997,7 +1029,7 @@ max_low_pfn = MAXMEM_PFN; #ifndef CONFIG_HIGHMEM /* Maximum memory usable is what is directly addressable */ - printk(KERN_WARNING "Warning only %ldMB will be used.\n", + printk(KERN_WARNING "Warning only %dMB will be used.\n", MAXMEM>>20); printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n"); #endif |