diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Makefile | 19 | ||||
-rw-r--r-- | arch/mips/arc/init.c | 3 | ||||
-rw-r--r-- | arch/mips/baget/prom/init.c | 3 | ||||
-rw-r--r-- | arch/mips/config.in | 6 | ||||
-rw-r--r-- | arch/mips/ddb5074/prom.c | 2 | ||||
-rw-r--r-- | arch/mips/galileo-boards/ev64120/setup.c | 3 | ||||
-rw-r--r-- | arch/mips/galileo-boards/generic/cmdline.c | 5 | ||||
-rw-r--r-- | arch/mips/galileo-boards/generic/init.c | 19 | ||||
-rw-r--r-- | arch/mips/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/kernel/proc.c | 16 | ||||
-rw-r--r-- | arch/mips/kernel/setup.c | 28 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 25 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/cmdline.c | 31 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/init.c | 13 |
14 files changed, 71 insertions, 104 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 84a06b421..314fdff11 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -28,10 +28,10 @@ CROSS_COMPILE = $(tool-prefix) endif # -# The ELF GCC uses -G0 -mabicalls -fpic as default. We don't need PIC -# code in the kernel since it only slows down the whole thing. For the -# old GCC these options are just the defaults. At some point we might -# make use of global pointer optimizations. +# GCC uses -G0 -mabicalls -fpic as default. We don't want PIC in the kernel +# code since it only slows down the whole thing. At some point we might make +# use of global pointer optimizations but their use of $28 conflicts with +# the current pointer optimization. # # The DECStation requires an ECOFF kernel for remote booting, other MIPS # machines may also. Since BFD is incredibly buggy with respect to @@ -205,6 +205,16 @@ LOADADDR += 0x80100000 endif # +# PMC Sierra Momentum / Ocelot / CP7000 board +# Whatever you want to call it today. +# +ifdef CONFIG_PMC_CP7000 +LIBS += arch/mips/pmc/cp7000/cp7000.o +SUBDIRS += arch/mips/pmc/cp7000 +LOADADDR += 0x80100000 +endif + +# # Choosing incompatible machines durings configuration will result in # error messages during linking. Select a default linkscript if # none has been choosen above. @@ -273,4 +283,3 @@ archdep: touch $(TOPDIR)/include/asm-$(ARCH)/offset.h; \ fi; @$(MAKEBOOT) dep - diff --git a/arch/mips/arc/init.c b/arch/mips/arc/init.c index 05200cb42..76b5ade80 100644 --- a/arch/mips/arc/init.c +++ b/arch/mips/arc/init.c @@ -23,7 +23,7 @@ unsigned short prom_vers, prom_rev; extern void prom_testtree(void); -int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) +void __init prom_init(int argc, char **argv, char **envp, int *prom_vec) { struct linux_promblock *pb; @@ -55,5 +55,4 @@ int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) romvec->imode(); } #endif - return 0; } diff --git a/arch/mips/baget/prom/init.c b/arch/mips/baget/prom/init.c index 02fcc5b92..2d22860d8 100644 --- a/arch/mips/baget/prom/init.c +++ b/arch/mips/baget/prom/init.c @@ -8,13 +8,12 @@ char arcs_cmdline[COMMAND_LINE_SIZE]; -int __init prom_init(unsigned int mem_upper) +void __init prom_init(unsigned int mem_upper) { mips_memory_upper = mem_upper; mips_machgroup = MACH_GROUP_UNKNOWN; mips_machtype = MACH_UNKNOWN; arcs_cmdline[0] = 0; - return 0; } void prom_free_prom_memory (void) diff --git a/arch/mips/config.in b/arch/mips/config.in index f7c416fbf..5546d730a 100644 --- a/arch/mips/config.in +++ b/arch/mips/config.in @@ -32,6 +32,7 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then fi bool 'Support for Mips Magnum 4000' CONFIG_MIPS_MAGNUM_4000 bool 'Support for Olivetti M700-10' CONFIG_OLIVETTI_M700 +bool 'Support for PMC Sierra CP7000' CONFIG_PMC_CP7000 bool 'Support for SGI IP22' CONFIG_SGI_IP22 bool 'Support for SNI RM200 PCI' CONFIG_SNI_RM200_PCI @@ -40,6 +41,7 @@ bool 'Support for SNI RM200 PCI' CONFIG_SNI_RM200_PCI # unset CONFIG_ARC32 unset CONFIG_BOARD_SCACHE +unset CONFIG_HAVE_STD_PC_SERIAL_PORT unset CONFIG_ISA unset CONFIG_PCI unset CONFIG_MIPS_JAZZ @@ -92,6 +94,10 @@ if [ "$CONFIG_MIPS_MALTA" = "y" ]; then define_bool CONFIG_PCI y define_bool CONFIG_ISA n fi +if [ "$CONFIG_PMC_CP7000" = "y" ]; then + define_bool CONFIG_PCI y + define_bool CONFIG_SYSCLK_100 y +fi if [ "$CONFIG_SGI_IP22" = "y" ]; then define_bool CONFIG_ARC32 y define_bool CONFIG_BOARD_SCACHE y diff --git a/arch/mips/ddb5074/prom.c b/arch/mips/ddb5074/prom.c index 832f8a675..c1614203b 100644 --- a/arch/mips/ddb5074/prom.c +++ b/arch/mips/ddb5074/prom.c @@ -19,8 +19,6 @@ void __init prom_init(const char *s) { int i = 0; -// _serinit(); - if (s != (void *) -1) while (*s && i < sizeof(arcs_cmdline) - 1) arcs_cmdline[i++] = *s++; diff --git a/arch/mips/galileo-boards/ev64120/setup.c b/arch/mips/galileo-boards/ev64120/setup.c index 874245fa8..a746a15e7 100644 --- a/arch/mips/galileo-boards/ev64120/setup.c +++ b/arch/mips/galileo-boards/ev64120/setup.c @@ -189,7 +189,7 @@ void SetUpBootInfo(int argc, char **argv, char **envp) extern int _end; unsigned long mem_size; -int __init prom_init(int a, char **b, char **c, int *d) +void __init prom_init(int a, char **b, char **c, int *d) { unsigned long free_start, free_end, start_pfn, bootmap_size; @@ -209,7 +209,6 @@ int __init prom_init(int a, char **b, char **c, int *d) /* Free the entire available memory after the _end symbol. */ free_start += bootmap_size; free_bootmem(free_start, free_end - free_start); - return 0; } #if 0 diff --git a/arch/mips/galileo-boards/generic/cmdline.c b/arch/mips/galileo-boards/generic/cmdline.c index 3574e976c..f75c01979 100644 --- a/arch/mips/galileo-boards/generic/cmdline.c +++ b/arch/mips/galileo-boards/generic/cmdline.c @@ -2,8 +2,6 @@ * Carsten Langgaard, carstenl@mips.com * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. * - * ######################################################################## - * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. @@ -17,8 +15,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * - * ######################################################################## - * * Kernel command line creation using the prom monitor (YAMON) argc/argv. * */ @@ -57,5 +53,4 @@ void __init prom_init_cmdline(void) if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */ --cp; *cp = '\0'; - } diff --git a/arch/mips/galileo-boards/generic/init.c b/arch/mips/galileo-boards/generic/init.c index b488cb349..593207bf3 100644 --- a/arch/mips/galileo-boards/generic/init.c +++ b/arch/mips/galileo-boards/generic/init.c @@ -1,8 +1,4 @@ /* - * - * BRIEF MODULE DESCRIPTION - * Galileo PROM library initialisation code. - * * Copyright 2000 MontaVista Software Inc. * Author: MontaVista Software, Inc. * ppopov@mvista.com or support@mvista.com @@ -131,7 +127,7 @@ int get_ethernet_addr(char *ethernet_addr) } -int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) +void __init prom_init(int argc, char **argv, char **envp, int *prom_vec) { unsigned long mem_size, free_start, free_end, start_pfn, bootmap_size; @@ -142,21 +138,10 @@ int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) prom_argv = argv; prom_envp = envp; - //init_serial(); - mips_machgroup = MACH_GROUP_GALILEO; -#if 0 - prom_ops = &ev96100_prom_ops; - prom_ops->printf = prom_vec[5]; -#endif - puts("Linux running"); - puts(""); prom_init_cmdline(); - //prom_meminit(); - - /* 64 MB non-upgradable */ mem_size = 64 << 20; @@ -171,6 +156,4 @@ int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) /* Free the entire available memory after the _end symbol. */ free_start += bootmap_size; free_bootmem(free_start, free_end - free_start); - - return 0; } diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index bdb8bc727..9be8406e4 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -46,7 +46,7 @@ ifndef CONFIG_DECSTATION ifndef CONFIG_BAGET_MIPS ifndef CONFIG_MIPS_ATLAS ifndef CONFIG_MIPS_MALTA - ifndef CONFIG_MIPS_EV96100 + ifndef CONFIG_MIPS_EV96100 O_OBJS += time.o endif endif diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 0069c4a01..0fd3754fe 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c @@ -36,16 +36,14 @@ int get_cpuinfo(char *buffer) const char *mach_cobalt_names[] = GROUP_COBALT_NAMES; const char *mach_nec_ddb_names[] = GROUP_NEC_DDB_NAMES; const char *mach_baget_names[] = GROUP_BAGET_NAMES; + const char *mach_cosine_names[] = GROUP_COSINE_NAMES; + const char *mach_galileo_names[] = GROUP_GALILEO_NAMES; + const char *mach_pmc_names[] = GROUP_PMC_NAMES; const char **mach_group_to_name[] = { mach_unknown_names, - mach_jazz_names, - mach_dec_names, - mach_arc_names, - mach_sni_rm_names, - mach_acn_names, - mach_sgi_names, - mach_cobalt_names, - mach_nec_ddb_names, - mach_baget_names }; + mach_jazz_names, mach_dec_names, mach_arc_names, + mach_sni_rm_names, mach_acn_names, mach_sgi_names, + mach_cobalt_names, mach_nec_ddb_names, mach_baget_names, + mach_cosine_names, mach_galileo_names, mach_pmc_names }; unsigned int version = read_32bit_cp0_register(CP0_PRID); int len; diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 08ceb6758..31f906ef2 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -96,7 +96,6 @@ struct kbd_ops *kbd_ops; * * These are initialized so they are in the .data section */ -unsigned long mips_memory_upper = KSEG0; /* this is set by kernel_entry() */ unsigned long mips_machtype = MACH_UNKNOWN; unsigned long mips_machgroup = MACH_GROUP_UNKNOWN; @@ -131,7 +130,7 @@ extern void sgi_sysinit(void); extern void SetUpBootInfo(void); extern void loadmmu(void); extern asmlinkage void start_kernel(void); -extern int prom_init(int, char **, char **, int *); +extern void prom_init(int, char **, char **, int *); static struct resource code_resource = { "Kernel code" }; static struct resource data_resource = { "Kernel data" }; @@ -254,9 +253,7 @@ static inline void cpu_probe(void) case PRID_IMP_RM7000: mips_cpu.cputype = CPU_RM7000; mips_cpu.isa_level = MIPS_CPU_ISA_IV; - mips_cpu.options = MIPS_CPU_TLB | MIPS_CPU_4KEX | - MIPS_CPU_FPU | MIPS_CPU_32FPR | - MIPS_CPU_COUNTER; + mips_cpu.options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR; break; case PRID_IMP_R8000: mips_cpu.cputype = CPU_R8000; @@ -308,7 +305,8 @@ static inline void cpu_probe(void) } } -asmlinkage void __init init_arch(int argc, char **argv, char **envp, int *prom_vec) +asmlinkage void __init +init_arch(int argc, char **argv, char **envp, int *prom_vec) { unsigned int s; @@ -334,12 +332,7 @@ asmlinkage void __init init_arch(int argc, char **argv, char **envp, int *prom_v s |= ST0_CU0; write_32bit_cp0_register(CP0_STATUS, s); - /* - * Main should never return here, but - * just in case, we know what happens. - */ - for(;;) - start_kernel(); + start_kernel(); } static void __init default_irq_setup(void) @@ -440,17 +433,17 @@ static inline void parse_mem_cmdline(void) void __init setup_arch(char **cmdline_p) { + void atlas_setup(void); void baget_setup(void); + void ddb_setup(void); void decstation_setup(void); void deskstation_setup(void); void jazz_setup(void); void sni_rm200_pci_setup(void); void sgi_setup(void); - void ddb_setup(void); - void orion_setup(void); void ev96100_setup(void); - void atlas_setup(void); void malta_setup(void); + void cp7000_setup(void); unsigned long bootmap_size; unsigned long start_pfn, max_pfn; @@ -500,6 +493,11 @@ void __init setup_arch(char **cmdline_p) malta_setup(); break; #endif +#ifdef CONFIG_PMC_CP7000 + case MACH_GROUP_PMC: + cp7000_setup(); + break; +#endif #ifdef CONFIG_SGI_IP22 /* As of now this is only IP22. */ case MACH_GROUP_SGI: diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 27451eb37..1b1038c19 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -694,14 +694,15 @@ static inline void setup_dedicated_int(void) */ static inline void parity_protection_init(void) { - switch(mips_cpu.cputype) - { + switch(mips_cpu.cputype) { case CPU_5KC: - /* Set the PE bit (bit 31) in the CP0_ECC register. */ - printk("Enable the cache parity protection for MIPS 5KC CPUs.\n"); - write_32bit_cp0_register(CP0_ECC, read_32bit_cp0_register(CP0_ECC) - | 0x80000000); - break; + /* Set the PE bit (bit 31) in the CP0_ECC register. */ + printk(KERN_INFO "Enable the cache parity protection for " + "MIPS 5KC CPUs.\n"); + write_32bit_cp0_register(CP0_ECC, + read_32bit_cp0_register(CP0_ECC) + | 0x80000000); + break; default: } } @@ -815,8 +816,8 @@ void __init trap_init(void) /* * Handling the following exceptions depends mostly of the cpu type */ - if((mips_cpu.options & MIPS_CPU_4KEX) - && (mips_cpu.options & MIPS_CPU_4KTLB)) { + if ((mips_cpu.options & MIPS_CPU_4KEX) + && (mips_cpu.options & MIPS_CPU_4KTLB)) { if(mips_cpu.cputype == CPU_NEVADA) { memcpy((void *)KSEG0, &except_vec0_nevada, 0x80); } else if (mips_cpu.cputype == CPU_R4600) @@ -861,7 +862,6 @@ void __init trap_init(void) case CPU_R6000A: save_fp_context = _save_fp_context; restore_fp_context = _restore_fp_context; -#if 0 /* * The R6000 is the only R-series CPU that features a machine * check exception (similar to the R4000 cache error) and @@ -870,9 +870,8 @@ void __init trap_init(void) * current list of targets for Linux/MIPS. * (Duh, crap, there is someone with a tripple R6k machine) */ - (void)set_except_vector(14, handle_mc); - (void)set_except_vector(15, handle_ndc); -#endif + //set_except_vector(14, handle_mc); + //set_except_vector(15, handle_ndc); case CPU_R2000: case CPU_R3000: case CPU_R3000A: diff --git a/arch/mips/mips-boards/generic/cmdline.c b/arch/mips/mips-boards/generic/cmdline.c index b14650f41..d88f2dac1 100644 --- a/arch/mips/mips-boards/generic/cmdline.c +++ b/arch/mips/mips-boards/generic/cmdline.c @@ -2,25 +2,20 @@ * Carsten Langgaard, carstenl@mips.com * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. * - * ######################################################################## + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. * - * This program is free software; you can distribute it and/or modify it - * under the terms of the GNU General Public License (Version 2) as - * published by the Free Software Foundation. + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * ######################################################################## - * * Kernel command line creation using the prom monitor (YAMON) argc/argv. - * */ #include <linux/config.h> #include <linux/init.h> @@ -28,8 +23,6 @@ #include <asm/bootinfo.h> -/* #define DEBUG_CMDLINE */ - extern int prom_argc; extern char **prom_argv; @@ -58,8 +51,4 @@ void __init prom_init_cmdline(void) if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */ --cp; *cp = '\0'; - -#ifdef DEBUG_CMDLINE - prom_printf("prom_init_cmdline: %s\n", &(arcs_cmdline[0])); -#endif } diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index f5b71c020..9f8b4dd27 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c @@ -2,8 +2,6 @@ * Carsten Langgaard, carstenl@mips.com * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. * - * ######################################################################## - * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. @@ -17,8 +15,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * - * ######################################################################## - * * PROM library initialisation code. */ #include <linux/config.h> @@ -31,9 +27,9 @@ /* Environment variable */ typedef struct { - char *name; - char *val; -}t_env_var; + char *name; + char *val; +} t_env_var; int prom_argc; char **prom_argv, **prom_envp; @@ -95,8 +91,7 @@ int get_ethernet_addr(char *ethernet_addr) } str2eaddr(ethernet_addr, ethaddr_str); - if (init_debug > 1) - { + if (init_debug > 1) { int i; printk("get_ethernet_addr: "); for (i=0; i<5; i++) |