MIPS: Add core files for MIPS SEAD-3 development platform.
PATCH v5 1/10 MIPS: Add core files for MIPS SEAD-3 development platform.
From: "Steven J. Hill" <[email protected]>
More information about the SEAD-3 platform can be found at
<http://www.mips.com/products/development-kits/mips-sead-3/>
on MTI's site. Currently, the M14K family of cores is what the SEAD-3 is utilised with.
--- .../include/asm/mach-sead3/cpu-feature-overrides.h | 72 ++++ arch/mips/include/asm/mach-sead3/irq.h | 9 + .../include/asm/mach-sead3/kernel-entry-init.h | 52 +++ arch/mips/include/asm/mach-sead3/war.h | 25 ++ arch/mips/include/asm/mips-boards/sead3int.h | 67 ++++ arch/mips/mti-sead3/Makefile | 19 + arch/mips/mti-sead3/Platform | 7 + arch/mips/mti-sead3/leds-sead3.c | 128 ++++++ arch/mips/mti-sead3/sead3-cmdline.c | 46 +++ arch/mips/mti-sead3/sead3-console.c | 46 +++ arch/mips/mti-sead3/sead3-display.c | 78 ++++ arch/mips/mti-sead3/sead3-ehci.c | 47 +++ arch/mips/mti-sead3/sead3-i2c-dev.c | 33 ++ arch/mips/mti-sead3/sead3-i2c-drv.c | 405 +++++++++++++++++++ arch/mips/mti-sead3/sead3-i2c.c | 37 ++ arch/mips/mti-sead3/sead3-init.c | 169 ++++++++ arch/mips/mti-sead3/sead3-int.c | 86 ++++ arch/mips/mti-sead3/sead3-lcd.c | 43 ++ arch/mips/mti-sead3/sead3-leds.c | 83 ++++ arch/mips/mti-sead3/sead3-memory.c | 138 +++++++ arch/mips/mti-sead3/sead3-mtd.c | 54 +++ arch/mips/mti-sead3/sead3-net.c | 51 +++ arch/mips/mti-sead3/sead3-pic32-bus.c | 103 +++++ arch/mips/mti-sead3/sead3-pic32-i2c-drv.c | 435 +++++++++++++++++++++ arch/mips/mti-sead3/sead3-platform.c | 45 +++ arch/mips/mti-sead3/sead3-reset.c | 39 ++ arch/mips/mti-sead3/sead3-serial.c | 45 +++ arch/mips/mti-sead3/sead3-setup.c | 20 + arch/mips/mti-sead3/sead3-time.c | 117 ++++++ 29 files changed, 2499 insertions(+) create mode 100644 arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h create mode 100644 arch/mips/include/asm/mach-sead3/irq.h create mode 100644 arch/mips/include/asm/mach-sead3/kernel-entry-init.h create mode 100644 arch/mips/include/asm/mach-sead3/war.h create mode 100644 arch/mips/include/asm/mips-boards/sead3int.h create mode 100644 arch/mips/mti-sead3/Makefile create mode 100644 arch/mips/mti-sead3/Platform create mode 100644 arch/mips/mti-sead3/leds-sead3.c create mode 100644 arch/mips/mti-sead3/sead3-cmdline.c create mode 100644 arch/mips/mti-sead3/sead3-console.c create mode 100644 arch/mips/mti-sead3/sead3-display.c create mode 100644 arch/mips/mti-sead3/sead3-ehci.c create mode 100644 arch/mips/mti-sead3/sead3-i2c-dev.c create mode 100644 arch/mips/mti-sead3/sead3-i2c-drv.c create mode 100644 arch/mips/mti-sead3/sead3-i2c.c create mode 100644 arch/mips/mti-sead3/sead3-init.c create mode 100644 arch/mips/mti-sead3/sead3-int.c create mode 100644 arch/mips/mti-sead3/sead3-lcd.c create mode 100644 arch/mips/mti-sead3/sead3-leds.c create mode 100644 arch/mips/mti-sead3/sead3-memory.c create mode 100644 arch/mips/mti-sead3/sead3-mtd.c create mode 100644 arch/mips/mti-sead3/sead3-net.c create mode 100644 arch/mips/mti-sead3/sead3-pic32-bus.c create mode 100644 arch/mips/mti-sead3/sead3-pic32-i2c-drv.c create mode 100644 arch/mips/mti-sead3/sead3-platform.c create mode 100644 arch/mips/mti-sead3/sead3-reset.c create mode 100644 arch/mips/mti-sead3/sead3-serial.c create mode 100644 arch/mips/mti-sead3/sead3-setup.c create mode 100644 arch/mips/mti-sead3/sead3-time.c
arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h new file +72 -0
@@ -0,0 +1,72 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2003, 2004 Chris Dearman +* Copyright (C) 2005 Ralf Baechle ([email protected]) +*/ +#ifndef __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H +#define __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H + + +/* +* CPU feature overrides for MIPS boards +*/ +#ifdef CONFIG_CPU_MIPS32 +#define cpu_has_tlb 1 +#define cpu_has_4kex 1 +#define cpu_has_4k_cache 1 +/* #define cpu_has_fpu ? */ +/* #define cpu_has_32fpr ? */ +#define cpu_has_counter 1 +/* #define cpu_has_watch ? */ +#define cpu_has_divec 1 +#define cpu_has_vce 0 +/* #define cpu_has_cache_cdex_p ? */ +/* #define cpu_has_cache_cdex_s ? */ +/* #define cpu_has_prefetch ? */ +#define cpu_has_mcheck 1 +/* #define cpu_has_ejtag ? */ +#ifdef CONFIG_CPU_HAS_LLSC +#define cpu_has_llsc 1 +#else +#define cpu_has_llsc 0 +#endif +/* #define cpu_has_vtag_icache ? */ +/* #define cpu_has_dc_aliases ? */ +/* #define cpu_has_ic_fills_f_dc ? */ +#define cpu_has_nofpuex 0 +/* #define cpu_has_64bits ? */ +/* #define cpu_has_64bit_zero_reg ? */ +/* #define cpu_has_inclusive_pcaches ? */ +#define cpu_icache_snoops_remote_store 1 +#endif + +#ifdef CONFIG_CPU_MIPS64 +#define cpu_has_tlb 1 +#define cpu_has_4kex 1 +#define cpu_has_4k_cache 1 +/* #define cpu_has_fpu ? */ +/* #define cpu_has_32fpr ? */ +#define cpu_has_counter 1 +/* #define cpu_has_watch ? */ +#define cpu_has_divec 1 +#define cpu_has_vce 0 +/* #define cpu_has_cache_cdex_p ? */ +/* #define cpu_has_cache_cdex_s ? */ +/* #define cpu_has_prefetch ? */ +#define cpu_has_mcheck 1 +/* #define cpu_has_ejtag ? */ +#define cpu_has_llsc 1 +/* #define cpu_has_vtag_icache ? */ +/* #define cpu_has_dc_aliases ? */ +/* #define cpu_has_ic_fills_f_dc ? */ +#define cpu_has_nofpuex 0 +/* #define cpu_has_64bits ? */ +/* #define cpu_has_64bit_zero_reg ? */ +/* #define cpu_has_inclusive_pcaches ? */ +#define cpu_icache_snoops_remote_store 1 +#endif + +#endif /* __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H */
arch/mips/include/asm/mach-sead3/irq.h new file +9 -0
@@ -0,0 +1,9 @@ +#ifndef __ASM_MACH_MIPS_IRQ_H +#define __ASM_MACH_MIPS_IRQ_H + +#define NR_IRQS 256 + + +#include_next <irq.h> + +#endif /* __ASM_MACH_MIPS_IRQ_H */
arch/mips/include/asm/mach-sead3/kernel-entry-init.h new file +52 -0
52 lines not on this page · raw message
arch/mips/include/asm/mach-sead3/war.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2002, 2004, 2007 by Ralf Baechle <[email protected]> +*/ +#ifndef __ASM_MIPS_MACH_MIPS_WAR_H +#define __ASM_MIPS_MACH_MIPS_WAR_H + +#define R4600_V1_INDEX_ICACHEOP_WAR 0 +#define R4600_V1_HIT_CACHEOP_WAR 0 +#define R4600_V2_HIT_CACHEOP_WAR 0 +#define R5432_CP0_INTERRUPT_WAR 0 +#define BCM1250_M3_WAR 0 +#define SIBYTE_1956_WAR 0 +#define MIPS4K_ICACHE_REFILL_WAR 1 +#define MIPS_CACHE_SYNC_WAR 1 +#define TX49XX_ICACHE_INDEX_INV_WAR 0 +#define RM9000_CDEX_SMP_WAR 0 +#define ICACHE_REFILLS_WORKAROUND_WAR 1 +#define R10000_LLSC_WAR 0 +#define MIPS34K_MISSED_ITLB_WAR 0 + +#endif /* __ASM_MIPS_MACH_MIPS_WAR_H */
arch/mips/include/asm/mips-boards/sead3int.h new file +67 -0
67 lines not on this page · raw message
arch/mips/mti-sead3/Makefile new file +19 -0
@@ -0,0 +1,19 @@ +# +# Carsten Langgaard, [email protected] +# Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. +# +# Copyright (C) 2008 Wind River Systems, Inc. +# written by Ralf Baechle <[email protected]> +# +obj-y := sead3-lcd.o sead3-cmdline.o \ + sead3-display.o sead3-init.o sead3-int.o \ + sead3-mtd.o sead3-net.o \ + sead3-memory.o sead3-platform.o \ + sead3-reset.o sead3-setup.o sead3-time.o + +obj-y += sead3-i2c-dev.o sead3-i2c.o \ + sead3-pic32-i2c-drv.o sead3-pic32-bus.o \ + leds-sead3.o sead3-leds.o + +obj-$(CONFIG_EARLY_PRINTK) += sead3-console.o +obj-$(CONFIG_USB_EHCI_HCD) += sead3-ehci.o
arch/mips/mti-sead3/Platform new file +7 -0
@@ -0,0 +1,7 @@ +# +# MIPS SEAD-3 board +# +platform-$(CONFIG_MIPS_SEAD3) += mti-sead3/ +cflags-$(CONFIG_MIPS_SEAD3) += -I$(srctree)/arch/mips/include/asm/mach-sead3 +load-$(CONFIG_MIPS_SEAD3) += 0xffffffff80100000 +all-$(CONFIG_MIPS_SEAD3) := $(COMPRESSION_FNAME).srec
arch/mips/mti-sead3/leds-sead3.c new file +128 -0
128 lines not on this page · raw message
arch/mips/mti-sead3/sead3-cmdline.c new file +46 -0
46 lines not on this page · raw message
arch/mips/mti-sead3/sead3-console.c new file +46 -0
46 lines not on this page · raw message
arch/mips/mti-sead3/sead3-display.c new file +78 -0
78 lines not on this page · raw message
arch/mips/mti-sead3/sead3-ehci.c new file +47 -0
47 lines not on this page · raw message
arch/mips/mti-sead3/sead3-i2c-dev.c new file +33 -0
@@ -0,0 +1,33 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. +*/ +#include <linux/init.h> +#include <linux/i2c.h> + +static struct i2c_board_info __initdata sead3_i2c_devices[] = { + { +I2C_BOARD_INFO ("adt7476" ,0x2c ), + .irq =0 , + }, + { +I2C_BOARD_INFO ("m41t80" ,0x68 ), + .irq =0 , + }, +}; + +static int __init sead3_i2c_init (void ) +{ +int err; + + err =i2c_register_board_info (0 , sead3_i2c_devices, +ARRAY_SIZE (sead3_i2c_devices)); +if (err <0 ) +pr_err ("sead3-i2c-dev: cannot register board I2C devices\n" ); +return err; +} + +arch_initcall (sead3_i2c_init);
arch/mips/mti-sead3/sead3-i2c-drv.c new file +405 -0
405 lines not on this page · raw message
arch/mips/mti-sead3/sead3-i2c.c new file +37 -0
@@ -0,0 +1,37 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. +*/ +#include <linux/module.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <irq.h> + +struct resource sead3_i2c_resources[] = { + { + .start =0x805200 , + .end =0x8053ff , + .flags =IORESOURCE_MEM , + }, +}; + +static struct platform_device sead3_i2c_device = { + .name ="sead3-i2c" , + .id =0 , + .num_resources =ARRAY_SIZE (sead3_i2c_resources), + .resource = sead3_i2c_resources, +}; + +static int __init sead3_i2c_init (void ) +{ +return platform_device_register (&sead3_i2c_device); +} + +module_init (sead3_i2c_init); + +MODULE_AUTHOR ("Chris Dearman <[email protected]>" ); +MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("I2C probe driver for SEAD3" );
arch/mips/mti-sead3/sead3-init.c new file +169 -0
169 lines not on this page · raw message
arch/mips/mti-sead3/sead3-int.c new file +86 -0
86 lines not on this page · raw message
arch/mips/mti-sead3/sead3-lcd.c new file +43 -0
43 lines not on this page · raw message
arch/mips/mti-sead3/sead3-leds.c new file +83 -0
83 lines not on this page · raw message
arch/mips/mti-sead3/sead3-memory.c new file +138 -0
138 lines not on this page · raw message
arch/mips/mti-sead3/sead3-mtd.c new file +54 -0
54 lines not on this page · raw message
arch/mips/mti-sead3/sead3-net.c new file +51 -0
51 lines not on this page · raw message
arch/mips/mti-sead3/sead3-pic32-bus.c new file +103 -0
103 lines not on this page · raw message
arch/mips/mti-sead3/sead3-pic32-i2c-drv.c new file +435 -0
435 lines not on this page · raw message
arch/mips/mti-sead3/sead3-platform.c new file +45 -0
45 lines not on this page · raw message
arch/mips/mti-sead3/sead3-reset.c new file +39 -0
@@ -0,0 +1,39 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. +*/ +#include <linux/io.h> +#include <linux/pm.h> + +#include <asm/reboot.h> +#include <asm/mips-boards/generic.h> + +static void mips_machine_restart (char *command) +{ +unsigned int __iomem *softres_reg = +ioremap (SOFTRES_REG ,sizeof (unsigned int )); + +__raw_writel (GORESET , softres_reg); +} + +static void mips_machine_halt (void ) +{ +unsigned int __iomem *softres_reg = +ioremap (SOFTRES_REG ,sizeof (unsigned int )); + +__raw_writel (GORESET , softres_reg); +} + +static int __init mips_reboot_setup (void ) +{ + _machine_restart = mips_machine_restart; + _machine_halt = mips_machine_halt; + pm_power_off = mips_machine_halt; + +return 0 ; +} + +arch_initcall (mips_reboot_setup);
arch/mips/mti-sead3/sead3-serial.c new file +45 -0
45 lines not on this page · raw message
arch/mips/mti-sead3/sead3-setup.c new file +20 -0
@@ -0,0 +1,20 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. +*/ +#include <linux/init.h> + +int coherentio;/* 0 => no DMA cache coherency (may be set by user) */ +int hw_coherentio;/* 0 => no HW DMA cache coherency (reflects real HW) */ + +const char *get_system_type (void ) +{ +return "MIPS SEAD3" ; +} + +void __init plat_mem_setup (void ) +{ +}
arch/mips/mti-sead3/sead3-time.c new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
1.7.11.1