aboutsummaryrefslogtreecommitdiff
path: root/arch/cris
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/cris
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/Kconfig180
-rw-r--r--arch/cris/Kconfig.debug41
-rw-r--r--arch/cris/Makefile112
-rw-r--r--arch/cris/arch-v10/Kconfig422
-rw-r--r--arch/cris/arch-v10/README.mm244
-rw-r--r--arch/cris/arch-v10/boot/Makefile12
-rw-r--r--arch/cris/arch-v10/boot/compressed/Makefile40
-rw-r--r--arch/cris/arch-v10/boot/compressed/README25
-rw-r--r--arch/cris/arch-v10/boot/compressed/decompress.ld29
-rw-r--r--arch/cris/arch-v10/boot/compressed/head.S111
-rw-r--r--arch/cris/arch-v10/boot/compressed/misc.c273
-rw-r--r--arch/cris/arch-v10/boot/rescue/Makefile55
-rw-r--r--arch/cris/arch-v10/boot/rescue/head.S333
-rw-r--r--arch/cris/arch-v10/boot/rescue/kimagerescue.S144
-rw-r--r--arch/cris/arch-v10/boot/rescue/rescue.ld20
-rw-r--r--arch/cris/arch-v10/boot/rescue/testrescue.S26
-rw-r--r--arch/cris/arch-v10/boot/tools/build.c288
-rw-r--r--arch/cris/arch-v10/defconfig505
-rw-r--r--arch/cris/arch-v10/drivers/Kconfig963
-rw-r--r--arch/cris/arch-v10/drivers/Makefile12
-rw-r--r--arch/cris/arch-v10/drivers/axisflashmap.c541
-rw-r--r--arch/cris/arch-v10/drivers/ds1302.c602
-rw-r--r--arch/cris/arch-v10/drivers/eeprom.c945
-rw-r--r--arch/cris/arch-v10/drivers/gpio.c944
-rw-r--r--arch/cris/arch-v10/drivers/i2c.c730
-rw-r--r--arch/cris/arch-v10/drivers/i2c.h18
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c313
-rw-r--r--arch/cris/arch-v10/kernel/Makefile17
-rw-r--r--arch/cris/arch-v10/kernel/asm-offsets.c47
-rw-r--r--arch/cris/arch-v10/kernel/crisksyms.c17
-rw-r--r--arch/cris/arch-v10/kernel/debugport.c531
-rw-r--r--arch/cris/arch-v10/kernel/entry.S1132
-rw-r--r--arch/cris/arch-v10/kernel/fasttimer.c977
-rw-r--r--arch/cris/arch-v10/kernel/head.S882
-rw-r--r--arch/cris/arch-v10/kernel/irq.c204
-rw-r--r--arch/cris/arch-v10/kernel/kgdb.c1568
-rw-r--r--arch/cris/arch-v10/kernel/process.c270
-rw-r--r--arch/cris/arch-v10/kernel/ptrace.c314
-rw-r--r--arch/cris/arch-v10/kernel/setup.c103
-rw-r--r--arch/cris/arch-v10/kernel/shadows.c36
-rw-r--r--arch/cris/arch-v10/kernel/signal.c580
-rw-r--r--arch/cris/arch-v10/kernel/time.c369
-rw-r--r--arch/cris/arch-v10/kernel/traps.c132
-rw-r--r--arch/cris/arch-v10/lib/Makefile9
-rw-r--r--arch/cris/arch-v10/lib/checksum.S124
-rw-r--r--arch/cris/arch-v10/lib/checksumcopy.S132
-rw-r--r--arch/cris/arch-v10/lib/csumcpfruser.S64
-rw-r--r--arch/cris/arch-v10/lib/dmacopy.c43
-rw-r--r--arch/cris/arch-v10/lib/dram_init.S205
-rw-r--r--arch/cris/arch-v10/lib/hw_settings.S62
-rw-r--r--arch/cris/arch-v10/lib/memset.c252
-rw-r--r--arch/cris/arch-v10/lib/old_checksum.c85
-rw-r--r--arch/cris/arch-v10/lib/string.c225
-rw-r--r--arch/cris/arch-v10/lib/usercopy.c523
-rw-r--r--arch/cris/arch-v10/mm/Makefile6
-rw-r--r--arch/cris/arch-v10/mm/fault.c117
-rw-r--r--arch/cris/arch-v10/mm/init.c264
-rw-r--r--arch/cris/arch-v10/mm/tlb.c248
-rw-r--r--arch/cris/arch-v10/output_arch.ld2
-rw-r--r--arch/cris/arch-v10/vmlinux.lds.S120
-rw-r--r--arch/cris/defconfig591
-rw-r--r--arch/cris/kernel/Makefile15
-rw-r--r--arch/cris/kernel/crisksyms.c103
-rw-r--r--arch/cris/kernel/irq.c297
-rw-r--r--arch/cris/kernel/module.c121
-rw-r--r--arch/cris/kernel/process.c280
-rw-r--r--arch/cris/kernel/ptrace.c119
-rw-r--r--arch/cris/kernel/semaphore.c130
-rw-r--r--arch/cris/kernel/setup.c193
-rw-r--r--arch/cris/kernel/sys_cris.c174
-rw-r--r--arch/cris/kernel/time.c232
-rw-r--r--arch/cris/kernel/traps.c144
-rw-r--r--arch/cris/mm/Makefile6
-rw-r--r--arch/cris/mm/fault.c387
-rw-r--r--arch/cris/mm/init.c225
-rw-r--r--arch/cris/mm/ioremap.c146
-rw-r--r--arch/cris/mm/tlb.c126
77 files changed, 20877 insertions, 0 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
new file mode 100644
index 00000000000..4332ca348d5
--- /dev/null
+++ b/arch/cris/Kconfig
@@ -0,0 +1,180 @@
+#
+# For a description of the syntax of this configuration file,
+# see the Configure script.
+#
+
+mainmenu "Linux/CRIS Kernel Configuration"
+
+config MMU
+ bool
+ default y
+
+config UID16
+ bool
+ default y
+
+config RWSEM_GENERIC_SPINLOCK
+ bool
+ default y
+
+config RWSEM_XCHGADD_ALGORITHM
+ bool
+
+config GENERIC_CALIBRATE_DELAY
+ bool
+ default y
+
+config CRIS
+ bool
+ default y
+
+source "init/Kconfig"
+
+menu "General setup"
+
+source "fs/Kconfig.binfmt"
+
+config ETRAX_CMDLINE
+ string "Kernel command line"
+ default "root=/dev/mtdblock3"
+ help
+ Pass additional commands to the kernel.
+
+config ETRAX_WATCHDOG
+ bool "Enable ETRAX watchdog"
+ help
+ Enable the built-in watchdog timer support on ETRAX based embedded
+ network computers.
+
+config ETRAX_WATCHDOG_NICE_DOGGY
+ bool "Disable watchdog during Oops printouts"
+ depends on ETRAX_WATCHDOG
+ help
+ By enabling this you make sure that the watchdog does not bite while
+ printing oopses. Recommended for development systems but not for
+ production releases.
+
+config ETRAX_FAST_TIMER
+ bool "Enable ETRAX fast timer API"
+ help
+ This options enables the API to a fast timer implementation using
+ timer1 to get sub jiffie resolution timers (primarily one-shot
+ timers).
+ This is needed if CONFIG_ETRAX_SERIAL_FAST_TIMER is enabled.
+
+config PREEMPT
+ bool "Preemptible Kernel"
+ help
+ This option reduces the latency of the kernel when reacting to
+ real-time or interactive events by allowing a low priority process to
+ be preempted even if it is in kernel mode executing a system call.
+ This allows applications to run more reliably even when the system is
+ under load.
+
+ Say Y here if you are building a kernel for a desktop, embedded
+ or real-time system. Say N if you are unsure.
+
+endmenu
+
+menu "Hardware setup"
+
+choice
+ prompt "Processor type"
+ default ETRAX100LX
+
+config ETRAX100LX
+ bool "ETRAX-100LX-v1"
+ help
+ Support version 1 of the ETRAX 100LX.
+
+config ETRAX100LX_V2
+ bool "ETRAX-100LX-v2"
+ help
+ Support version 2 of the ETRAX 100LX.
+
+config SVINTO_SIM
+ bool "ETRAX-100LX-for-xsim-simulator"
+ help
+ Support the xsim ETRAX Simulator.
+
+endchoice
+
+config ETRAX_ARCH_V10
+ bool
+ default y if ETRAX100LX || ETRAX100LX_V2
+ default n if !(ETRAX100LX || ETRAX100LX_V2)
+
+config ETRAX_DRAM_SIZE
+ int "DRAM size (dec, in MB)"
+ default "8"
+ help
+ Size of DRAM (decimal in MB) typically 2, 8 or 16.
+
+config ETRAX_FLASH_BUSWIDTH
+ int "Buswidth of flash in bytes"
+ default "2"
+ help
+ Width in bytes of the Flash bus (1, 2 or 4). Is usually 2.
+
+source arch/cris/arch-v10/Kconfig
+
+endmenu
+
+# bring in ETRAX built-in drivers
+menu "Drivers for built-in interfaces"
+source arch/cris/arch-v10/drivers/Kconfig
+
+endmenu
+
+source "drivers/base/Kconfig"
+
+# standard linux drivers
+source "drivers/mtd/Kconfig"
+
+source "drivers/parport/Kconfig"
+
+source "drivers/pnp/Kconfig"
+
+source "drivers/block/Kconfig"
+
+source "drivers/md/Kconfig"
+
+source "drivers/ide/Kconfig"
+
+source "drivers/scsi/Kconfig"
+
+source "drivers/ieee1394/Kconfig"
+
+source "drivers/message/i2o/Kconfig"
+
+source "net/Kconfig"
+
+source "drivers/isdn/Kconfig"
+
+source "drivers/telephony/Kconfig"
+
+source "drivers/cdrom/Kconfig"
+
+#
+# input before char - char/joystick depends on it. As does USB.
+#
+source "drivers/input/Kconfig"
+
+source "drivers/char/Kconfig"
+
+#source drivers/misc/Config.in
+source "drivers/media/Kconfig"
+
+source "fs/Kconfig"
+
+source "sound/Kconfig"
+
+source "drivers/usb/Kconfig"
+
+source "arch/cris/Kconfig.debug"
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
diff --git a/arch/cris/Kconfig.debug b/arch/cris/Kconfig.debug
new file mode 100644
index 00000000000..f42918bf22a
--- /dev/null
+++ b/arch/cris/Kconfig.debug
@@ -0,0 +1,41 @@
+menu "Kernel hacking"
+
+#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
+config PROFILING
+ bool "Kernel profiling support"
+
+config SYSTEM_PROFILER
+ bool "System profiling support"
+
+config ETRAX_KGDB
+ bool "Use kernel GDB debugger"
+ ---help---
+ The CRIS version of gdb can be used to remotely debug a running
+ Linux kernel via the serial debug port. Provided you have gdb-cris
+ installed, run gdb-cris vmlinux, then type
+
+ (gdb) set remotebaud 115200 <- kgdb uses 115200 as default
+ (gdb) target remote /dev/ttyS0 <- maybe you use another port
+
+ This should connect you to your booted kernel (or boot it now if you
+ didn't before). The kernel halts when it boots, waiting for gdb if
+ this option is turned on!
+
+
+config DEBUG_INFO
+ bool "Compile the kernel with debug info"
+ help
+ If you say Y here the resulting kernel image will include
+ debugging info resulting in a larger kernel image.
+ Say Y here only if you plan to use gdb to debug the kernel.
+ If you don't debug the kernel, you can say N.
+
+config FRAME_POINTER
+ bool "Compile the kernel with frame pointers"
+ help
+ If you say Y here the resulting kernel image will be slightly larger
+ and slower, but it will give very useful debugging information.
+ If you don't debug the kernel, you can say N, but we may not be able
+ to solve problems without frame pointers.
+
+endmenu
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
new file mode 100644
index 00000000000..9d28fa8563c
--- /dev/null
+++ b/arch/cris/Makefile
@@ -0,0 +1,112 @@
+# $Id: Makefile,v 1.23 2004/10/19 13:07:34 starvik Exp $
+# cris/Makefile
+#
+# This file is included by the global makefile so that you can add your own
+# architecture-specific flags and dependencies. Remember to do have actions
+# for "archclean" and "archdep" for cleaning up and making dependencies for
+# this architecture
+#
+# 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.
+
+# A bug in ld prevents us from having a (constant-value) symbol in a
+# "ORIGIN =" or "LENGTH =" expression.
+
+arch-y := v10
+arch-$(CONFIG_ETRAX_ARCH_V10) := v10
+
+# No config avaiable for make clean etc
+ifneq ($(arch-y),)
+SARCH := arch-$(arch-y)
+else
+SARCH :=
+endif
+
+LD = $(CROSS_COMPILE)ld -mcrislinux
+
+OBJCOPYFLAGS := -O binary -R .note -R .comment -S
+
+CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
+AFLAGS += -mlinux
+
+CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe
+
+ifdef CONFIG_FRAME_POINTER
+CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g
+CFLAGS += -fno-omit-frame-pointer
+endif
+
+head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o
+
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)
+
+core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
+core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
+drivers-y += arch/$(ARCH)/$(SARCH)/drivers/
+libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC)
+
+vmlinux.bin: vmlinux
+ $(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux.bin
+
+timage: vmlinux.bin
+ cat vmlinux.bin cramfs.img >timage
+
+simimage: timage
+ cp vmlinux.bin simvmlinux.bin
+
+# the following will remake timage without compiling the kernel
+# it does of course require that all object files exist...
+
+cramfs:
+## cramfs - Creates a cramfs image
+ mkcramfs -b 8192 -m romfs_meta.txt root cramfs.img
+ cat vmlinux.bin cramfs.img >timage
+
+clinux: vmlinux.bin decompress.bin rescue.bin
+
+decompress.bin: FORCE
+ @make -C arch/$(ARCH)/boot/compressed decompress.bin
+
+rescue.bin: FORCE
+ @make -C arch/$(ARCH)/boot/rescue rescue.bin
+
+zImage: vmlinux.bin rescue.bin
+## zImage - Compressed kernel (gzip)
+ @make -C arch/$(ARCH)/boot/ zImage
+
+compressed: zImage
+
+archmrproper:
+archclean:
+ $(Q)$(MAKE) $(clean)=arch/$(ARCH)/boot
+ rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img
+ rm -rf $(LD_SCRIPT).tmp
+
+prepare: arch/$(ARCH)/.links include/asm-$(ARCH)/.arch \
+ include/asm-$(ARCH)/$(SARCH)/offset.h
+
+# Create some links to make all tools happy
+arch/$(ARCH)/.links:
+ @rm -rf arch/$(ARCH)/drivers
+ @ln -sfn $(SARCH)/drivers arch/$(ARCH)/drivers
+ @rm -rf arch/$(ARCH)/boot
+ @ln -sfn $(SARCH)/boot arch/$(ARCH)/boot
+ @rm -rf arch/$(ARCH)/lib
+ @ln -sfn $(SARCH)/lib arch/$(ARCH)/lib
+ @ln -sfn $(SARCH) arch/$(ARCH)/arch
+ @ln -sfn ../$(SARCH)/vmlinux.lds.S arch/$(ARCH)/kernel/vmlinux.lds.S
+ @touch $@
+
+# Create link to sub arch includes
+include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h)
+ @echo ' Making asm-$(ARCH)/arch -> asm-$(ARCH)/$(SARCH) symlink'
+ @rm -f include/asm-$(ARCH)/arch
+ @ln -sf $(SARCH) include/asm-$(ARCH)/arch
+ @touch $@
+
+arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
+ include/config/MARKER
+
+include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
+ $(call filechk,gen-asm-offsets)
diff --git a/arch/cris/arch-v10/Kconfig b/arch/cris/arch-v10/Kconfig
new file mode 100644
index 00000000000..2ca64cc40c6
--- /dev/null
+++ b/arch/cris/arch-v10/Kconfig
@@ -0,0 +1,422 @@
+# ETRAX 100LX v1 has a MMU "feature" requiring a low mapping
+config CRIS_LOW_MAP
+ bool
+ depends on ETRAX_ARCH_V10 && ETRAX100LX
+ default y
+
+config ETRAX_DRAM_VIRTUAL_BASE
+ hex
+ depends on ETRAX_ARCH_V10
+ default "c0000000" if !ETRAX100LX
+ default "60000000" if ETRAX100LX
+
+choice
+ prompt "Product LED port"
+ depends on ETRAX_ARCH_V10
+ default ETRAX_PA_LEDS
+
+config ETRAX_PA_LEDS
+ bool "Port-PA-LEDs"
+ help
+ The ETRAX network driver is responsible for flashing LED's when
+ packets arrive and are sent. It uses macros defined in
+ <file:include/asm-cris/io.h>, and those macros are defined after what
+ YOU choose in this option. The actual bits used are configured
+ separately. Select this if the LEDs are on port PA. Some products
+ put the leds on PB or a memory-mapped latch (CSP0) instead.
+
+config ETRAX_PB_LEDS
+ bool "Port-PB-LEDs"
+ help
+ The ETRAX network driver is responsible for flashing LED's when
+ packets arrive and are sent. It uses macros defined in
+ <file:include/asm-cris/io.h>, and those macros are defined after what
+ YOU choose in this option. The actual bits used are configured
+ separately. Select this if the LEDs are on port PB. Some products
+ put the leds on PA or a memory-mapped latch (CSP0) instead.
+
+config ETRAX_CSP0_LEDS
+ bool "Port-CSP0-LEDs"
+ help
+ The ETRAX network driver is responsible for flashing LED's when
+ packets arrive and are sent. It uses macros defined in
+ <file:include/asm-cris/io.h>, and those macros are defined after what
+ YOU choose in this option. The actual bits used are configured
+ separately. Select this if the LEDs are on a memory-mapped latch
+ using chip select CSP0, this is mapped at 0x90000000.
+ Some products put the leds on PA or PB instead.
+
+config ETRAX_NO_LEDS
+ bool "None"
+ help
+ Select this option if you don't have any LED at all.
+
+endchoice
+
+config ETRAX_LED1G
+ int "First green LED bit"
+ depends on ETRAX_ARCH_V10 && !ETRAX_NO_LEDS
+ default "2"
+ help
+ Bit to use for the first green LED.
+ Most Axis products use bit 2 here.
+
+config ETRAX_LED1R
+ int "First red LED bit"
+ depends on ETRAX_ARCH_V10 && !ETRAX_NO_LEDS
+ default "3"
+ help
+ Bit to use for the first red LED.
+ Most Axis products use bit 3 here.
+ For products with only one controllable LED,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED2G
+ int "Second green LED bit"
+ depends on ETRAX_ARCH_V10 && !ETRAX_NO_LEDS
+ default "4"
+ help
+ Bit to use for the second green LED. The "Active" LED.
+ Most Axis products use bit 4 here.
+ For products with only one controllable LED,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED2R
+ int "Second red LED bit"
+ depends on ETRAX_ARCH_V10 && !ETRAX_NO_LEDS
+ default "5"
+ help
+ Bit to use for the second red LED.
+ Most Axis products use bit 5 here.
+ For products with only one controllable LED,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED3G
+ int "Third green LED bit"
+ depends on ETRAX_ARCH_V10 && !ETRAX_NO_LEDS
+ default "2"
+ help
+ Bit to use for the third green LED. The "Drive" LED.
+ For products with only one or two controllable LEDs,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED3R
+ int "Third red LED bit"
+ depends on ETRAX_ARCH_V10 && !ETRAX_NO_LEDS
+ default "2"
+ help
+ Bit to use for the third red LED.
+ For products with only one or two controllable LEDs,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED4R
+ int "Fourth red LED bit"
+ depends on ETRAX_CSP0_LEDS
+ default "2"
+ help
+ Bit to use for the fourth red LED.
+ For products with only one or two controllable LEDs,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED4G
+ int "Fourth green LED bit"
+ depends on ETRAX_CSP0_LEDS
+ default "2"
+ help
+ Bit to use for the fourth green LED.
+ For products with only one or two controllable LEDs,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED5R
+ int "Fifth red LED bit"
+ depends on ETRAX_CSP0_LEDS
+ default "2"
+ help
+ Bit to use for the fifth red LED.
+ For products with only one or two controllable LEDs,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED5G
+ int "Fifth green LED bit"
+ depends on ETRAX_CSP0_LEDS
+ default "2"
+ help
+ Bit to use for the fifth green LED.
+ For products with only one or two controllable LEDs,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED6R
+ int "Sixth red LED bit"
+ depends on ETRAX_CSP0_LEDS
+ default "2"
+ help
+ Bit to use for the sixth red LED.
+ For products with only one or two controllable LEDs,
+ set this to same as CONFIG_ETRAX_LED1G (normally 2).
+
+config ETRAX_LED6G
+ int "Sixth green LED bit"
+ depends on ETRAX_CSP0_LEDS