Commit 0cf975e1 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'cris' of git://www.jni.nu/cris

* 'cris' of git://www.jni.nu/cris: (158 commits)
  CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific.
  CRIS v32: Change drivers/i2c.c locking.
  CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.
  CRIS: Add new timerfd syscall entries.
  MAINTAINERS: Add my information for the CRIS port.
  CRIS v32: Correct spelling of bandwidth in function name.
  CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.
  CRIS v10: Cleanup of drivers/gpio.c
  CRIS v10: drivers/net/cris/eth_v10.c rename LED defines to CRIS_LED to avoid name clash.
  CRIS: Make io_pwm_set_period members unsigned in etraxgpio.h
  CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.
  CRIS: Drop regs parameter from call to profile_tick in kernel/time.c
  CRIS v32: Fix minor formatting issue in mach-a3/io.c
  CRIS v32: Initialize GIO even if we're rambooting in kernel/head.S
  CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory.
  CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h
  CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory.
  CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.h
  CRIS v32: Move register map header to machine dependent directory.
  CRIS v32: Let compiler know that memory is clobbered after a break op.
  ...
parents 03054de1 bc10ac3f
...@@ -1173,6 +1173,8 @@ S: Orphan ...@@ -1173,6 +1173,8 @@ S: Orphan
CRIS PORT CRIS PORT
P: Mikael Starvik P: Mikael Starvik
M: starvik@axis.com M: starvik@axis.com
P: Jesper Nilsson
M: jesper.nilsson@axis.com
L: dev-etrax@axis.com L: dev-etrax@axis.com
W: http://developer.axis.com W: http://developer.axis.com
S: Maintained S: Maintained
......
This diff is collapsed.
# $Id: Makefile,v 1.28 2005/03/17 10:44:37 larsv Exp $ #
# cris/Makefile # cris/Makefile
# #
# This file is included by the global makefile so that you can add your own # This file is included by the global makefile so that you can add your own
...@@ -10,28 +10,36 @@ ...@@ -10,28 +10,36 @@
# License. See the file "COPYING" in the main directory of this archive # License. See the file "COPYING" in the main directory of this archive
# for more details. # 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-y := v10
arch-$(CONFIG_ETRAX_ARCH_V10) := v10 arch-$(CONFIG_ETRAX_ARCH_V10) := v10
arch-$(CONFIG_ETRAX_ARCH_V32) := v32 arch-$(CONFIG_ETRAX_ARCH_V32) := v32
# No config avaiable for make clean etc # No config available for make clean etc
mach-y := fs
mach-$(CONFIG_CRIS_MACH_ARTPEC3) := a3
mach-$(CONFIG_ETRAXFS) := fs
ifneq ($(arch-y),) ifneq ($(arch-y),)
SARCH := arch-$(arch-y) SARCH := arch-$(arch-y)
else else
SARCH := SARCH :=
endif endif
ifneq ($(mach-y),)
MACH := mach-$(mach-y)
else
MACH :=
endif
LD = $(CROSS_COMPILE)ld -mcrislinux LD = $(CROSS_COMPILE)ld -mcrislinux
OBJCOPYFLAGS := -O binary -R .note -R .comment -S OBJCOPYFLAGS := -O binary -R .note -R .comment -S
CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
KBUILD_AFLAGS += -mlinux
KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe KBUILD_AFLAGS += -mlinux -march=$(arch-y) -Iinclude/asm/arch/mach -Iinclude/asm/arch
KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe -Iinclude/asm/arch/mach -Iinclude/asm/arch
ifdef CONFIG_FRAME_POINTER ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
...@@ -44,6 +52,9 @@ LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) ...@@ -44,6 +52,9 @@ LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
ifdef CONFIG_ETRAX_ARCH_V32
core-y += arch/$(ARCH)/$(SARCH)/$(MACH)/
endif
drivers-y += arch/$(ARCH)/$(SARCH)/drivers/ drivers-y += arch/$(ARCH)/$(SARCH)/drivers/
libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC) libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC)
...@@ -52,79 +63,69 @@ SRC_ARCH = $(srctree)/arch/$(ARCH) ...@@ -52,79 +63,69 @@ SRC_ARCH = $(srctree)/arch/$(ARCH)
# cris object files path # cris object files path
OBJ_ARCH = $(objtree)/arch/$(ARCH) OBJ_ARCH = $(objtree)/arch/$(ARCH)
target_boot_arch_dir = $(OBJ_ARCH)/$(SARCH)/boot boot := arch/$(ARCH)/boot
target_boot_dir = $(OBJ_ARCH)/boot MACHINE := arch/$(ARCH)/$(SARCH)
src_boot_dir = $(SRC_ARCH)/boot
target_compressed_dir = $(OBJ_ARCH)/boot/compressed
src_compressed_dir = $(SRC_ARCH)/boot/compressed
target_rescue_dir = $(OBJ_ARCH)/boot/rescue
src_rescue_dir = $(SRC_ARCH)/boot/rescue
export target_boot_arch_dir target_boot_dir src_boot_dir target_compressed_dir src_compressed_dir target_rescue_dir src_rescue_dir
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 all: zImage
decompress.bin: $(target_boot_dir) zImage Image: vmlinux
@$(MAKE) -f $(src_compressed_dir)/Makefile $(target_compressed_dir)/decompress.bin $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
$(target_rescue_dir)/rescue.bin: $(target_boot_dir) archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch FORCE
@$(MAKE) -f $(src_rescue_dir)/Makefile $(target_rescue_dir)/rescue.bin
zImage: $(target_boot_dir) vmlinux.bin $(target_rescue_dir)/rescue.bin
## zImage - Compressed kernel (gzip)
@$(MAKE) -f $(src_boot_dir)/Makefile zImage
$(target_boot_dir): $(target_boot_arch_dir)
ln -sfn $< $@
$(target_boot_arch_dir):
mkdir -p $@
compressed: zImage
archmrproper:
archclean:
@if [ -d arch/$(ARCH)/boot ]; then \
$(MAKE) $(clean)=arch/$(ARCH)/boot ; \
fi
rm -f timage vmlinux.bin decompress.bin rescue.bin cramfs.img
rm -rf $(LD_SCRIPT).tmp
archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch
# Create some links to make all tools happy # Create some links to make all tools happy
$(SRC_ARCH)/.links: $(SRC_ARCH)/.links:
@rm -rf $(SRC_ARCH)/drivers @rm -rf $(SRC_ARCH)/drivers
@ln -sfn $(SRC_ARCH)/$(SARCH)/drivers $(SRC_ARCH)/drivers @ln -sfn $(SARCH)/drivers $(SRC_ARCH)/drivers
@rm -rf $(SRC_ARCH)/boot @rm -rf $(SRC_ARCH)/boot
@ln -sfn $(SRC_ARCH)/$(SARCH)/boot $(SRC_ARCH)/boot @ln -sfn $(SARCH)/boot $(SRC_ARCH)/boot
@rm -rf $(SRC_ARCH)/lib @rm -rf $(SRC_ARCH)/lib
@ln -sfn $(SRC_ARCH)/$(SARCH)/lib $(SRC_ARCH)/lib @ln -sfn $(SARCH)/lib $(SRC_ARCH)/lib
@ln -sfn $(SRC_ARCH)/$(SARCH) $(SRC_ARCH)/arch @rm -f $(SRC_ARCH)/arch/mach
@ln -sfn $(SRC_ARCH)/$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S @rm -rf $(SRC_ARCH)/arch
@ln -sfn $(SRC_ARCH)/$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c @ln -sfn $(SARCH) $(SRC_ARCH)/arch
ifdef CONFIG_ETRAX_ARCH_V32
@ln -sfn ../$(SARCH)/$(MACH) $(SRC_ARCH)/arch/mach
endif
@rm -rf $(SRC_ARCH)/kernel/vmlinux.lds.S
@ln -sfn ../$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S
@rm -rf $(SRC_ARCH)/kernel/asm-offsets.c
@ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c
@touch $@ @touch $@
# Create link to sub arch includes # Create link to sub arch includes
$(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h) $(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h)
@echo ' Making $(srctree)/include/asm-$(ARCH)/arch -> $(srctree)/include/asm-$(ARCH)/$(SARCH) symlink' @echo ' SYMLINK include/asm-$(ARCH)/arch -> include/asm-$(ARCH)/$(SARCH)'
@rm -f include/asm-$(ARCH)/arch @rm -f $(srctree)/include/asm-$(ARCH)/arch/mach
@ln -sf $(srctree)/include/asm-$(ARCH)/$(SARCH) $(srctree)/include/asm-$(ARCH)/arch @rm -f $(srctree)/include/asm-$(ARCH)/arch
@ln -sf $(SARCH) $(srctree)/include/asm-$(ARCH)/arch
ifdef CONFIG_ETRAX_ARCH_V32
@ln -sf $(MACH) $(srctree)/include/asm-$(ARCH)/arch/mach
endif
@touch $@ @touch $@
archclean:
$(Q)if [ -e arch/$(ARCH)/boot ]; then \
$(MAKE) $(clean)=arch/$(ARCH)/boot; \
fi
CLEAN_FILES += \
$(MACHINE)/boot/zImage \
$(MACHINE)/boot/compressed/decompress.bin \
$(MACHINE)/boot/compressed/piggy.gz \
$(MACHINE)/boot/rescue/rescue.bin \
$(SRC_ARCH)/.links \
$(srctree)/include/asm-$(ARCH)/.arch
MRPROPER_FILES += \
$(SRC_ARCH)/drivers \
$(SRC_ARCH)/boot \
$(SRC_ARCH)/lib \
$(SRC_ARCH)/arch \
$(SRC_ARCH)/kernel/vmlinux.lds.S \
$(SRC_ARCH)/kernel/asm-offsets.c
define archhelp
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
echo '* Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
endef
if ETRAX_ARCH_V10 if ETRAX_ARCH_V10
menu "CRIS v10 options"
# ETRAX 100LX v1 has a MMU "feature" requiring a low mapping # ETRAX 100LX v1 has a MMU "feature" requiring a low mapping
config CRIS_LOW_MAP config CRIS_LOW_MAP
bool bool
...@@ -228,69 +230,6 @@ config ETRAX_LED12R ...@@ -228,69 +230,6 @@ config ETRAX_LED12R
For products with only one or two controllable LEDs, For products with only one or two controllable LEDs,
set this to same as CONFIG_ETRAX_LED1G (normally 2). set this to same as CONFIG_ETRAX_LED1G (normally 2).
choice
prompt "Product debug-port"
depends on ETRAX_ARCH_V10
default ETRAX_DEBUG_PORT0
config ETRAX_DEBUG_PORT0
bool "Serial-0"
help
Choose a serial port for the ETRAX debug console. Default to
port 0.
config ETRAX_DEBUG_PORT1
bool "Serial-1"
help
Use serial port 1 for the console.
config ETRAX_DEBUG_PORT2
bool "Serial-2"
help
Use serial port 2 for the console.
config ETRAX_DEBUG_PORT3
bool "Serial-3"
help
Use serial port 3 for the console.
config ETRAX_DEBUG_PORT_NULL
bool "disabled"
help
Disable serial-port debugging.
endchoice
choice
prompt "Kernel GDB port"
depends on ETRAX_KGDB
default ETRAX_KGDB_PORT0
help
Choose a serial port for kernel debugging. NOTE: This port should
not be enabled under Drivers for built-in interfaces (as it has its
own initialization code) and should not be the same as the debug port.
config ETRAX_KGDB_PORT0
bool "Serial-0"
help
Use serial port 0 for kernel debugging.
config ETRAX_KGDB_PORT1
bool "Serial-1"
help
Use serial port 1 for kernel debugging.
config ETRAX_KGDB_PORT2
bool "Serial-2"
help
Use serial port 2 for kernel debugging.
config ETRAX_KGDB_PORT3
bool "Serial-3"
help
Use serial port 3 for kernel debugging.
endchoice
choice choice
prompt "Product rescue-port" prompt "Product rescue-port"
...@@ -454,4 +393,6 @@ config ETRAX_POWERBUTTON_BIT ...@@ -454,4 +393,6 @@ config ETRAX_POWERBUTTON_BIT
help help
Configure where power button is connected. Configure where power button is connected.
endmenu
endif endif
# #
# arch/cris/boot/Makefile # arch/cris/arch-v10/boot/Makefile
# #
target = $(target_boot_dir)
src = $(src_boot_dir)
zImage: compressed/vmlinuz OBJCOPY = objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss
compressed/vmlinuz: subdir- := compressed rescue
@$(MAKE) -f $(src)/compressed/Makefile $(target_compressed_dir)/vmlinuz targets := Image
clean: $(obj)/Image: vmlinux FORCE
@$(MAKE) -f $(src)/compressed/Makefile clean $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
$(obj)/compressed/vmlinux: $(obj)/Image FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
$(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
$(obj)/zImage: $(obj)/compressed/vmlinux
@cp $< $@
@echo ' Kernel: $@ is ready'
# #
# create a compressed vmlinuz image from the binary vmlinux.bin file # arch/cris/arch-v10/boot/compressed/Makefile
# #
target = $(target_compressed_dir)
src = $(src_compressed_dir)
CC = gcc-cris -melf $(LINUXINCLUDE) CC = gcc-cris -melf $(LINUXINCLUDE)
CFLAGS = -O2 ccflags-y += -O2
LD = ld-cris LD = ld-cris
ldflags-y += -T $(obj)/decompress.ld
OBJECTS = $(obj)/head.o $(obj)/misc.o
OBJCOPY = objcopy-cris OBJCOPY = objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss OBJCOPYFLAGS = -O binary --remove-section=.bss
OBJECTS = $(target)/head.o $(target)/misc.o
# files to compress quiet_cmd_image = BUILD $@
SYSTEM = $(objtree)/vmlinux.bin cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
all: $(target_compressed_dir)/vmlinuz targets := vmlinux piggy.gz decompress.o decompress.bin
$(target)/decompress.bin: $(OBJECTS) $(obj)/decompress.o: $(OBJECTS) FORCE
$(LD) -T $(src)/decompress.ld -o $(target)/decompress.o $(OBJECTS) $(call if_changed,ld)
$(OBJCOPY) $(OBJCOPYFLAGS) $(target)/decompress.o $(target)/decompress.bin
# Create vmlinuz image in top-level build directory $(obj)/decompress.bin: $(obj)/decompress.o FORCE
$(target_compressed_dir)/vmlinuz: $(target) piggy.img $(target)/decompress.bin $(call if_changed,objcopy)
@echo " COMPR vmlinux.bin --> vmlinuz"
@cat $(target)/decompress.bin piggy.img > $(target_compressed_dir)/vmlinuz
@rm -f piggy.img
$(target)/head.o: $(src)/head.S $(obj)/head.o: $(obj)/head.S .config
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@ @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
$(target)/misc.o: $(src)/misc.c $(obj)/misc.o: $(obj)/misc.c .config
$(CC) -D__KERNEL__ -c $< -o $@ @$(CC) -D__KERNEL__ -c $< -o $@
# gzip the kernel image $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
$(call if_changed,image)
piggy.img: $(SYSTEM) $(obj)/piggy.gz: $(obj)/../Image FORCE
@cat $(SYSTEM) | gzip -f -9 > piggy.img $(call if_changed,gzip)
$(target):
mkdir -p $(target)
clean:
rm -f piggy.img $(objtree)/vmlinuz
/* /*
* misc.c * misc.c
* *
* $Id: misc.c,v 1.6 2003/10/27 08:04:31 starvik Exp $
*
* This is a collection of several routines from gzip-1.0.3 * This is a collection of several routines from gzip-1.0.3
* adapted for Linux. * adapted for Linux.
* *
......
# #
# Makefile for rescue code # Makefile for rescue (bootstrap) code
# #
target = $(target_rescue_dir)
src = $(src_rescue_dir)
CC = gcc-cris -mlinux $(LINUXINCLUDE) CC = gcc-cris -mlinux $(LINUXINCLUDE)
CFLAGS = -O2 ccflags-y += -O2
asflags-y += -traditional
LD = gcc-cris -mlinux -nostdlib LD = gcc-cris -mlinux -nostdlib
ldflags-y += -T $(obj)/rescue.ld
OBJCOPY = objcopy-cris OBJCOPY = objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss OBJCOPYFLAGS = -O binary --remove-section=.bss
obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
OBJECT := $(obj)/head.o
all: $(target)/rescue.bin $(target)/testrescue.bin $(target)/kimagerescue.bin targets := rescue.o rescue.bin
$(target)/rescue.bin: $(target) $(target)/head.o $(obj)/rescue.o: $(OBJECT) FORCE
$(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o $(call if_changed,ld)
$(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin
# Place a copy in top-level build directory
cp -p $(target)/rescue.bin $(objtree)
$(target)/testrescue.bin: $(target) $(target)/testrescue.o $(obj)/rescue.bin: $(obj)/rescue.o FORCE
$(OBJCOPY) $(OBJCOPYFLAGS) $(target)/testrescue.o tr.bin $(call if_changed,objcopy)
cp -p $(obj)/rescue.bin $(objtree)
$(obj)/testrescue.bin: $(obj)/testrescue.o
$(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/testrescue.o tr.bin
# Pad it to 784 bytes # Pad it to 784 bytes
dd if=/dev/zero of=tmp2423 bs=1 count=784 dd if=/dev/zero of=tmp2423 bs=1 count=784
cat tr.bin tmp2423 >testrescue_tmp.bin cat tr.bin tmp2423 >testrescue_tmp.bin
dd if=testrescue_tmp.bin of=$(target)/testrescue.bin bs=1 count=784 dd if=testrescue_tmp.bin of=$(obj)/testrescue.bin bs=1 count=784
rm tr.bin tmp2423 testrescue_tmp.bin rm tr.bin tmp2423 testrescue_tmp.bin
$(target)/kimagerescue.bin: $(target) $(target)/kimagerescue.o $(obj)/kimagerescue.bin: $(obj)/kimagerescue.o
$(OBJCOPY) $(OBJCOPYFLAGS) $(target)/kimagerescue.o ktr.bin $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/kimagerescue.o ktr.bin
# Pad it to 784 bytes, that's what the rescue loader expects # Pad it to 784 bytes, that's what the rescue loader expects
dd if=/dev/zero of=tmp2423 bs=1 count=784 dd if=/dev/zero of=tmp2423 bs=1 count=784
cat ktr.bin tmp2423 >kimagerescue_tmp.bin cat ktr.bin tmp2423 >kimagerescue_tmp.bin
dd if=kimagerescue_tmp.bin of=$(target)/kimagerescue.bin bs=1 count=784 dd if=kimagerescue_tmp.bin of=$(obj)/kimagerescue.bin bs=1 count=784
rm ktr.bin tmp2423 kimagerescue_tmp.bin rm ktr.bin tmp2423 kimagerescue_tmp.bin
$(target):
mkdir -p $(target)
$(target)/head.o: $(src)/head.S
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
$(target)/testrescue.o: $(src)/testrescue.S
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
$(target)/kimagerescue.o: $(src)/kimagerescue.S
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
clean:
rm -f $(target)/*.o $(target)/*.bin
fastdep:
modules:
modules-install:
/* $Id: head.S,v 1.7 2005/03/07 12:11:06 starvik Exp $ /*
*
* Rescue code, made to reside at the beginning of the * Rescue code, made to reside at the beginning of the
* flash-memory. when it starts, it checks a partition * flash-memory. when it starts, it checks a partition
* table at the first sector after the rescue sector. * table at the first sector after the rescue sector.
...@@ -60,9 +59,11 @@ ...@@ -60,9 +59,11 @@
* During the wait for serial input, the status LED will flash so the * During the wait for serial input, the status LED will flash so the
* user knows something went wrong. * user knows something went wrong.
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003 Axis Communications AB * Copyright (C) 1999-2007 Axis Communications AB
*/ */
#ifdef CONFIG_ETRAX_AXISFLASHMAP
#define ASSEMBLER_MACROS_ONLY #define ASSEMBLER_MACROS_ONLY
#include <asm/arch/sv_addr_ag.h> #include <asm/arch/sv_addr_ag.h>
...@@ -73,11 +74,12 @@ ...@@ -73,11 +74,12 @@
#define PTABLE_MAGIC 0xbeef #define PTABLE_MAGIC 0xbeef
;; The normal Etrax100 on-chip boot ROM does serial boot at 0x380000f0. ;; The normal Etrax100 on-chip boot ROM does serial boot at 0x380000f0.
;; That is not where we put our downloaded serial boot-code. The length is ;; That is not where we put our downloaded serial boot-code.
;; enough for downloading code that loads the rest of itself (after ;; The length is enough for downloading code that loads the rest
;; having setup the DRAM etc). It is the same length as the on-chip ;; of itself (after having setup the DRAM etc).
;; ROM loads, so the same host loader can be used to load a rescued ;; It is the same length as the on-chip ROM loads, so the same
;; product as well as one booted through the Etrax serial boot code. ;; host loader can be used to load a rescued product as well as
;; one booted through the Etrax serial boot code.
#define CODE_START 0x40000000 #define CODE_START 0x40000000
#define CODE_LENGTH 784 #define CODE_LENGTH 784
...@@ -118,7 +120,7 @@ ...@@ -118,7 +120,7 @@
;; This is the entry point of the rescue code ;; This is the entry point of the rescue code
;; 0x80000000 if loaded in flash (as it should be) ;; 0x80000000 if loaded in flash (as it should be)
;; since etrax actually starts at address 2 when booting from flash, we ;; Since etrax actually starts at address 2 when booting from flash, we
;; put a nop (2 bytes) here first so we dont accidentally skip the di ;; put a nop (2 bytes) here first so we dont accidentally skip the di
nop nop
...@@ -128,10 +130,11 @@ ...@@ -128,10 +130,11 @@
in_cache: in_cache:
;; first put a jump test to give a possibility of upgrading the rescue code ;; First put a jump test to give a possibility of upgrading the
;; without erasing/reflashing the sector. we put a longword of -1 here and if ;; rescue code without erasing/reflashing the sector.
;; it is not -1, we jump using the value as jump target. since we can always ;; We put a longword of -1 here and if it is not -1, we jump using
;; change 1's to 0's without erasing the sector, it is possible to add new ;; the value as jump target. Since we can always change 1's to 0's
;; without erasing the sector, it is possible to add new
;; code after this and altering the jumptarget in an upgrade. ;; code after this and altering the jumptarget in an upgrade.
jtcd: move.d [jumptarget], $r0 jtcd: move.d [jumptarget], $r0
...@@ -214,7 +217,6 @@ bosse: move.d [$r3+], $r5 ; checksum ...@@ -214,7 +217,6 @@ bosse: move.d [$r3+], $r5 ; checksum
nop nop
move.d $r1, $r7 ; remember boot partition offset move.d $r1, $r7 ; remember boot partition offset
1: 1:
add.d PTABLE_START, $r1 add.d PTABLE_START, $r1
jsr checksum ; checksum the partition jsr checksum ; checksum the partition
...@@ -302,7 +304,8 @@ wait_ser: ...@@ -302,7 +304,8 @@ wait_ser:
;; jump into downloaded code ;; jump into downloaded code
move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is initialized move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is
; initialized
jump CODE_START jump CODE_START
flash_ok: flash_ok:
...@@ -313,7 +316,8 @@ flash_ok: ...@@ -313,7 +316,8 @@ flash_ok:
nop nop
move.d PTABLE_START, $r7; otherwise use the ptable start move.d PTABLE_START, $r7; otherwise use the ptable start
1: 1:
move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is initialized move.d RAM_INIT_MAGIC, $r8 ; Tell next product that DRAM is
; initialized
jump $r7 ; boot! jump $r7 ; boot!
...@@ -327,7 +331,8 @@ checksum: ...@@ -327,7 +331,8 @@ checksum:
moveq 0, $r0 moveq 0, $r0
moveq CONFIG_ETRAX_FLASH1_SIZE, $r6 moveq CONFIG_ETRAX_FLASH1_SIZE, $r6
;; If the first physical flash memory is exceeded wrap to the second one. ;; If the first physical flash memory is exceeded wrap to the
;; second one
btstq 26, $r1 ; Are we addressing first flash? btstq 26, $r1 ; Are we addressing first flash?
bpl 1f bpl 1f
nop nop
...@@ -351,3 +356,5 @@ checksum: ...@@ -351,3 +356,5 @@ checksum:
3: move.d MEM_CSE1_START, $r1 ; wrap to second flash 3: move.d MEM_CSE1_START, $r1 ; wrap to second flash
ba 2b ba 2b
nop nop
#endif
/* $Id: kimagerescue.S,v 1.1 2001/12/17 13:59:27 bjornw Exp $ /*
*
* Rescue code to be prepended on a kimage and copied to the * Rescue code to be prepended on a kimage and copied to the
* rescue serial port. * rescue serial port.
* This is called from the rescue code, it will copy received data to * This is called from the rescue code, it will copy received data to
...@@ -7,7 +6,7 @@ ...@@ -7,7 +6,7 @@
*/ */
#define ASSEMBLER_MACROS_ONLY #define ASSEMBLER_MACROS_ONLY
#include <asm/sv_addr_ag.h> #include <asm/arch/sv_addr_ag.h>
#define CODE_START 0x40004000 #define CODE_START 0x40004000
#define CODE_LENGTH 784 #define CODE_LENGTH 784
...@@ -81,7 +80,8 @@ ...@@ -81,7 +80,8 @@
move.d $r0, [SERXOFF] move.d $r0, [SERXOFF]
move.b 0x99, $r0 move.b 0x99, $r0
move.b $r0, [SERBAUD] ; 115.2kbaud for both transmit and receive move.b $r0, [SERBAUD] ; 115.2kbaud for both transmit
; and receive
move.b 0x40, $r0 ; rec enable move.b 0x40, $r0 ; rec enable
move.b $r0, [SERRECC] move.b $r0, [SERRECC]
......
/* $Id: testrescue.S,v 1.1 2001/12/17 13:59:27 bjornw Exp $ /*
*
* Simple testcode to download by the rescue block. * Simple testcode to download by the rescue block.
* Just lits some LEDs to show it was downloaded correctly. * Just lights some LEDs to show it was downloaded correctly.
* *
* Copyright (C) 1999 Axis Communications AB * Copyright (C) 1999 Axis Communications AB
*/ */
#define ASSEMBLER_MACROS_ONLY #define ASSEMBLER_MACROS_ONLY
#include <asm/sv_addr_ag.h> #include <asm/arch/sv_addr_ag.h>
.text .text
...@@ -23,4 +22,3 @@ endless: ...@@ -23,4 +22,3 @@ endless:
ba endless ba endless
nop nop
...@@ -9,37 +9,6 @@ config ETRAX_ETHERNET ...@@ -9,37 +9,6 @@ config ETRAX_ETHERNET
This option enables the ETRAX 100LX built-in 10/100Mbit Ethernet This option enables the ETRAX 100LX built-in 10/100Mbit Ethernet
controller. controller.
choice
prompt "Network LED behavior"
depends on ETRAX_ETHERNET
default ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY
config ETRAX_NETWORK_LED_ON_WHEN_LINK
bool "LED_on_when_link"
help
Selecting LED_on_when_link will light the LED when there is a
connection and will flash off when there is activity.
Selecting LED_on_when_activity will light the LED only when
there is activity.
This setting will also affect the behaviour of other activity LEDs
e.g. Bluetooth.
config ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY
bool "LED_on_when_activity"
help
Selecting LED_on_when_link will light the LED when there is a
connection and will flash off when there is activity.
Selecting LED_on_when_activity will light the LED only when
there is activity.
This setting will also affect the behaviour of other activity LEDs
e.g. Bluetooth.
endchoice
config ETRAX_SERIAL config ETRAX_SERIAL
bool "Serial-port support" bool "Serial-port support"
depends on ETRAX_ARCH_V10 depends on ETRAX_ARCH_V10
...@@ -83,32 +52,6 @@ config ETRAX_SERIAL_PORT0 ...@@ -83,32 +52,6 @@ config ETRAX_SERIAL_PORT0
Normally you want this on, unless you use external DMA 1 that uses Normally you want this on, unless you use external DMA 1 that uses
the same DMA channels. the same DMA channels.
choice
prompt "Ser0 DMA out assignment"
depends on ETRAX_SERIAL_PORT0
default ETRAX_SERIAL_PORT0_DMA6_OUT
config ETRAX_SERIAL_PORT0_NO_DMA_OUT
bool "No DMA out"
config ETRAX_SERIAL_PORT0_DMA6_OUT
bool "DMA 6"
endchoice
choice
prompt "Ser0 DMA in assignment"
depends on ETRAX_SERIAL_PORT0
default ETRAX_SERIAL_PORT0_DMA7_IN
config ETRAX_SERIAL_PORT0_NO_DMA_IN
bool "No DMA in"
config ETRAX_SERIAL_PORT0_DMA7_IN
bool "DMA 7"
endchoice
choice choice
prompt "Ser0 DTR, RI, DSR and CD assignment" prompt "Ser0 DTR, RI, DSR and CD assignment"
depends on ETRAX_SERIAL_PORT0 depends on ETRAX_SERIAL_PORT0
...@@ -197,32 +140,6 @@ config ETRAX_SERIAL_PORT1 ...@@ -197,32 +140,6 @@ config ETRAX_SERIAL_PORT1
help help
Enables the ETRAX 100 serial driver for ser1 (ttyS1). Enables the ETRAX 100 serial driver for ser1 (ttyS1).
choice
prompt "Ser1 DMA out assignment"
depends on ETRAX_SERIAL_PORT1
default ETRAX_SERIAL_PORT1_DMA8_OUT
config ETRAX_SERIAL_PORT1_NO_DMA_OUT
bool "No DMA out"
config ETRAX_SERIAL_PORT1_DMA8_OUT
bool "DMA 8"
endchoice
choice
prompt "Ser1 DMA in assignment"
depends on ETRAX_SERIAL_PORT1
default ETRAX_SERIAL_PORT1_DMA9_IN
config ETRAX_SERIAL_PORT1_NO_DMA_IN
bool "No DMA in"
config ETRAX_SERIAL_PORT1_DMA9_IN
bool "DMA 9"
endchoice
choice choice
prompt "Ser1 DTR, RI, DSR and CD assignment" prompt "Ser1 DTR, RI, DSR and CD assignment"
depends on ETRAX_SERIAL_PORT1 depends on ETRAX_SERIAL_PORT1
...@@ -314,32 +231,6 @@ config ETRAX_SERIAL_PORT2 ...@@ -314,32 +231,6 @@ config ETRAX_SERIAL_PORT2
help help
Enables the ETRAX 100 serial driver for ser2 (ttyS2). Enables the ETRAX 100 serial driver for ser2 (ttyS2).
choice
prompt "Ser2 DMA out assignment"
depends on ETRAX_SERIAL_PORT2
default ETRAX_SERIAL_PORT2_DMA2_OUT
config ETRAX_SERIAL_PORT2_NO_DMA_OUT
bool "No DMA out"
config ETRAX_SERIAL_PORT2_DMA2_OUT
bool "DMA 2"
endchoice
choice
prompt "Ser2 DMA in assignment"
depends on ETRAX_SERIAL_PORT2
default ETRAX_SERIAL_PORT2_DMA3_IN
config ETRAX_SERIAL_PORT2_NO_DMA_IN
bool "No DMA in"
config ETRAX_SERIAL_PORT2_DMA3_IN
bool "DMA 3"
endchoice
choice choice
prompt "Ser2 DTR, RI, DSR and CD assignment" prompt "Ser2 DTR, RI, DSR and CD assignment"
depends on ETRAX_SERIAL_PORT2 depends on ETRAX_SERIAL_PORT2
...@@ -428,32 +319,6 @@ config ETRAX_SERIAL_PORT3 ...@@ -428,32 +319,6 @@ config ETRAX_SERIAL_PORT3
help help
Enables the ETRAX 100 serial driver for ser3 (ttyS3). Enables the ETRAX 100 serial driver for ser3 (ttyS3).
choice
prompt "Ser3 DMA out assignment"
depends on ETRAX_SERIAL_PORT3
default ETRAX_SERIAL_PORT3_DMA4_OUT
config ETRAX_SERIAL_PORT3_NO_DMA_OUT
bool "No DMA out"
config ETRAX_SERIAL_PORT3_DMA4_OUT
bool "DMA 4"
endchoice
choice
prompt "Ser3 DMA in assignment"
depends on ETRAX_SERIAL_PORT3
default ETRAX_SERIAL_PORT3_DMA5_IN
config ETRAX_SERIAL_PORT3_NO_DMA_IN
bool "No DMA in"
config ETRAX_SERIAL_PORT3_DMA5_IN
bool "DMA 5"
endchoice
choice choice
prompt "Ser3 DTR, RI, DSR and CD assignment" prompt "Ser3 DTR, RI, DSR and CD assignment"
depends on ETRAX_SERIAL_PORT3 depends on ETRAX_SERIAL_PORT3
...@@ -563,21 +428,6 @@ config ETRAX_USB_HOST_PORT2 ...@@ -563,21 +428,6 @@ config ETRAX_USB_HOST_PORT2
depends on ETRAX_USB_HOST depends on ETRAX_USB_HOST
default n default n
config ETRAX_AXISFLASHMAP
bool "Axis flash-map support"
depends on ETRAX_ARCH_V10
select MTD
select MTD_CFI
select MTD_CFI_AMDSTD
select MTD_CHAR
select MTD_BLOCK
select MTD_PARTITIONS
select MTD_CONCAT
select MTD_COMPLEX_MAPPINGS
help
This option enables MTD mapping of flash devices. Needed to use
flash memories. If unsure, say Y.
config ETRAX_PTABLE_SECTOR config ETRAX_PTABLE_SECTOR
int "Byte-offset of partition table sector" int "Byte-offset of partition table sector"
depends on ETRAX_AXISFLASHMAP depends on ETRAX_AXISFLASHMAP
...@@ -731,37 +581,6 @@ config ETRAX_PB_CHANGEABLE_BITS ...@@ -731,37 +581,6 @@ config ETRAX_PB_CHANGEABLE_BITS
Bit set = changeable. Bit set = changeable.
You probably want 00 here. You probably want 00 here.
config ETRAX_RTC
bool "Real Time Clock support"
depends on ETRAX_ARCH_V10
help
Enables drivers for the Real-Time Clock battery-backed chips on
some products. The kernel reads the time when booting, and
the date can be set using ioctl(fd, RTC_SET_TIME, &rt) with rt a
rtc_time struct (see <file:include/asm-cris/rtc.h>) on the /dev/rtc
device, major 121. You can check the time with cat /proc/rtc, but
normal time reading should be done using libc function time and
friends.
choice
prompt "RTC chip"
depends on ETRAX_RTC
default ETRAX_DS1302
config ETRAX_DS1302
bool "DS1302"
help
Enables the driver for the DS1302 Real-Time Clock battery-backed
chip on some products.
config ETRAX_PCF8563
bool "PCF8563"
help
Enables the driver for the PCF8563 Real-Time Clock battery-backed
chip on some products.
endchoice
config ETRAX_DS1302_RST_ON_GENERIC_PORT config ETRAX_DS1302_RST_ON_GENERIC_PORT
bool "DS1302 RST on Generic Port" bool "DS1302 RST on Generic Port"
depends on ETRAX_DS1302 depends on ETRAX_DS1302
......
...@@ -8,5 +8,5 @@ obj-$(CONFIG_ETRAX_I2C_EEPROM) += eeprom.o ...@@ -8,5 +8,5 @@ obj-$(CONFIG_ETRAX_I2C_EEPROM) += eeprom.o
obj-$(CONFIG_ETRAX_GPIO) += gpio.o obj-$(CONFIG_ETRAX_GPIO) += gpio.o
obj-$(CONFIG_ETRAX_DS1302) += ds1302.o obj-$(CONFIG_ETRAX_DS1302) += ds1302.o
obj-$(CONFIG_ETRAX_PCF8563) += pcf8563.o obj-$(CONFIG_ETRAX_PCF8563) += pcf8563.o
obj-$(CONFIG_ETRAX_SYNCHRONOUS_SERIAL) += sync_serial.o
...@@ -10,129 +10,6 @@ ...@@ -10,129 +10,6 @@
* tells us what other partitions to define. If there isn't, we use a default * tells us what other partitions to define. If there isn't, we use a default
* partition split defined below. * partition split defined below.
* *
* $Log: axisflashmap.c,v $
* Revision 1.11 2004/11/15 10:27:14 starvik
* Corrected typo (Thanks to Milton Miller <miltonm@bga.com>).
*
* Revision 1.10 2004/08/16 12:37:22 starvik
* Merge of Linux 2.6.8
*
* Revision 1.8 2004/05/14 07:58:03 starvik
* Merge of changes from 2.4
*
* Revision 1.6 2003/07/04 08:27:37 starvik
* Merge of Linux 2.5.74
*
* Revision 1.5 2002/12/11 13:13:57 starvik
* Added arch/ to v10 specific includes
* Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer)
*
* Revision 1.4 2002/11/20 11:56:10 starvik
* Merge of Linux 2.5.48
*
* Revision 1.3 2002/11/13 14:54:13 starvik
* Copied from linux 2.4
*
* Revision 1.28 2002/10/01 08:08:43 jonashg
* The first partition ends at the start of the partition table.
*
* Revision 1.27 2002/08/21 09:23:13 jonashg
* Speling.
*
* Revision 1.26 2002/08/21 08:35:20 jonashg
* Cosmetic change to printouts.
*
* Revision 1.25 2002/08/21 08:15:42 jonashg
* Made it compile even without CONFIG_MTD_CONCAT defined.
*
* Revision 1.24 2002/08/20 13:12:35 jonashg
* * New approach to probing. Probe cse0 and cse1 separately and (mtd)concat
* the results.
* * Removed compile time tests concerning how the mtdram driver has been
* configured. The user will know about the misconfiguration at runtime
* instead. (The old approach made it impossible to use mtdram for anything
* else than RAM boot).
*
* Revision 1.23 2002/05/13 12:12:28 johana
* Allow compile without CONFIG_MTD_MTDRAM but warn at compiletime and
* be informative at runtime.
*
* Revision 1.22 2002/05/13 10:24:44 johana
* Added #if checks on MTDRAM CONFIG
*
* Revision 1.21 2002/05/06 16:05:20 johana
* Removed debug printout.
*
* Revision 1.20 2002/05/06 16:03:00 johana
* No more cramfs as root hack in generic code.
* It's handled by axisflashmap using mtdram.
*
* Revision 1.19 2002/03/15 17:10:28 bjornw
* Changed comment about cached access since we changed this before
*
* Revision 1.18 2002/03/05 17:06:15 jonashg
* Try amd_flash probe before cfi_probe since amd_flash driver can handle two
* (or more) flash chips of different model and the cfi driver cannot.
*
* Revision 1.17 2001/11/12 19:42:38 pkj
* Fixed compiler warnings.
*
* Revision 1.16 2001/11/08 11:18:58 jonashg
* Always read from uncached address to avoid problems with flushing
* cachelines after write and MTD-erase. No performance loss have been
* seen yet.
*
* Revision 1.15 2001/10/19 12:41:04 jonashg
* Name of probe has changed in MTD.
*
* Revision 1.14 2001/09/21 07:14:10 jonashg
* Made root filesystem (cramfs) use mtdblock driver when booting from flash.
*
* Revision 1.13 2001/08/15 13:57:35 jonashg
* Entire MTD updated to the linux 2.4.7 version.
*
* Revision 1.12 2001/06/11 09:50:30 jonashg
* Oops, 2MB is 0x200000 bytes.
*
* Revision 1.11 2001/06/08 11:39:44 jonashg
* Changed sizes and offsets in axis_default_partitions to use
* CONFIG_ETRAX_PTABLE_SECTOR.
*
* Revision 1.10 2001/05/29 09:42:03 jonashg
* Use macro for end marker length instead of sizeof.
*
* Revision 1.9 2001/05/29 08:52:52 jonashg
* Gave names to the magic fours (size of the ptable end marker).
*
* Revision 1.8 2001/05/28 15:36:20 jonashg
* * Removed old comment about ptable location in flash (it's a CONFIG_ option).
* * Variable ptable was initialized twice to the same value.
*
* Revision 1.7 2001/04/05 13:41:46 markusl
* Updated according to review remarks
*
* Revision 1.6 2001/03/07 09:21:21 bjornw
* No need to waste .data
*
* Revision 1.5 2001/03/06 16:27:01 jonashg
* Probe the entire flash area for flash devices.
*
* Revision 1.4 2001/02/23 12:47:15 bjornw
* Uncached flash in LOW_MAP moved from 0xe to 0x8
*
* Revision 1.3 2001/02/16 12:11:45 jonashg
* MTD driver amd_flash is now included in MTD CVS repository.
* (It's now in drivers/mtd).
*
* Revision 1.2 2001/02/09 11:12:22 jonashg
* Support for AMD compatible non-CFI flash chips.
* Only tested with Toshiba TC58FVT160 so far.
*
* Revision 1.1 2001/01/12 17:01:18 bjornw
* * Added axisflashmap.c, a physical mapping for MTD that reads and understands
* Axis partition-table format.
*
*
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -300,6 +177,15 @@ static struct mtd_partition axis_partitions[MAX_PARTITIONS] = { ...@@ -300,6 +177,15 @@ static struct mtd_partition axis_partitions[MAX_PARTITIONS] = {
}, },
}; };
#ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE
/* Main flash device */
static struct mtd_partition main_partition = {
.name = "main",
.size = 0,
.offset = 0
};
#endif
/* /*
* Probe a chip select for AMD-compatible (JEDEC) or CFI-compatible flash * Probe a chip select for AMD-compatible (JEDEC) or CFI-compatible flash
* chips in that order (because the amd_flash-driver is faster). * chips in that order (because the amd_flash-driver is faster).
...@@ -316,9 +202,8 @@ static struct mtd_info *probe_cs(struct map_info *map_cs) ...@@ -316,9 +202,8 @@ static struct mtd_info *probe_cs(struct map_info *map_cs)
mtd_cs = do_map_probe("cfi_probe", map_cs); mtd_cs = do_map_probe("cfi_probe", map_cs);
#endif #endif
#ifdef CONFIG_MTD_JEDECPROBE #ifdef CONFIG_MTD_JEDECPROBE
if (!mtd_cs) { if (!mtd_cs)
mtd_cs = do_map_probe("jedec_probe", map_cs); mtd_cs = do_map_probe("jedec_probe", map_cs);
}
#endif #endif
return mtd_cs; return mtd_cs;
...@@ -395,7 +280,7 @@ static int __init init_axis_flash(void) ...@@ -395,7 +280,7 @@ static int __init init_axis_flash(void)
struct partitiontable_head *ptable_head = NULL; struct partitiontable_head *ptable_head = NULL;
struct partitiontable_entry *ptable; struct partitiontable_entry *ptable;
int use_default_ptable = 1; /* Until proven otherwise. */ int use_default_ptable = 1; /* Until proven otherwise. */
const char *pmsg = " /dev/flash%d at 0x%08x, size 0x%08x\n"; const char pmsg[] = " /dev/flash%d at 0x%08x, size 0x%08x\n";
if (!(mymtd = flash_probe())) { if (!(mymtd = flash_probe())) {
/* There's no reason to use this module if no flash chip can /* There's no reason to use this module if no flash chip can
...@@ -490,6 +375,16 @@ static int __init init_axis_flash(void) ...@@ -490,6 +375,16 @@ static int __init init_axis_flash(void)
pidx++; pidx++;
} }
#ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE
if (mymtd) {
main_partition.size = mymtd->size;
err = add_mtd_partitions(mymtd, &main_partition, 1);
if (err)
panic("axisflashmap: Could not initialize "
"partition for whole main mtd device!\n");
}
#endif
if (mymtd) { if (mymtd) {
if (use_default_ptable) { if (use_default_ptable) {
printk(KERN_INFO " Using default partition table.\n"); printk(KERN_INFO " Using default partition table.\n");
...@@ -499,10 +394,9 @@ static int __init init_axis_flash(void) ...@@ -499,10 +394,9 @@ static int __init init_axis_flash(void)
err = add_mtd_partitions(mymtd, axis_partitions, pidx); err = add_mtd_partitions(mymtd, axis_partitions, pidx);
} }
if (err) { if (err)
panic("axisflashmap could not add MTD partitions!\n"); panic("axisflashmap could not add MTD partitions!\n");
} }
}
if (!romfs_in_flash) { if (!romfs_in_flash) {
/* Create an RAM device for the root partition (romfs). */ /* Create an RAM device for the root partition (romfs). */
...@@ -515,25 +409,24 @@ static int __init init_axis_flash(void) ...@@ -515,25 +409,24 @@ static int __init init_axis_flash(void)
#else #else
struct mtd_info *mtd_ram; struct mtd_info *mtd_ram;
mtd_ram = kmalloc(sizeof(struct mtd_info), mtd_ram = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
GFP_KERNEL); if (!mtd_ram)
if (!mtd_ram) {
panic("axisflashmap couldn't allocate memory for " panic("axisflashmap couldn't allocate memory for "
"mtd_info!\n"); "mtd_info!\n");
}
printk(KERN_INFO " Adding RAM partition for romfs image:\n"); printk(KERN_INFO " Adding RAM partition for romfs image:\n");
printk(pmsg, pidx, romfs_start, romfs_length); printk(pmsg, pidx, (unsigned)romfs_start,
(unsigned)romfs_length);
err = mtdram_init_device(mtd_ram, (void*)romfs_start,
romfs_length, "romfs"); err = mtdram_init_device(mtd_ram,
if (err) { (void *)romfs_start,
romfs_length,
"romfs");
if (err)
panic("axisflashmap could not initialize MTD RAM " panic("axisflashmap could not initialize MTD RAM "
"device!\n"); "device!\n");
}
#endif #endif
} }
return err; return err;
} }
......
...@@ -333,7 +333,7 @@ rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -333,7 +333,7 @@ rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
ds1302_writereg(RTC_TRICKLECHARGER, tcs_val); ds1302_writereg(RTC_TRICKLECHARGER, tcs_val);
return 0; return 0;
} }
case RTC_VLOW_RD: case RTC_VL_READ:
{ {
/* TODO: /* TODO:
* Implement voltage low detection support * Implement voltage low detection support
...@@ -342,7 +342,7 @@ rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -342,7 +342,7 @@ rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
" is not supported\n"); " is not supported\n");
return 0; return 0;
} }
case RTC_VLOW_SET: case RTC_VL_CLR:
{ {
/* TODO: /* TODO:
* Nothing to do since Voltage Low detection is not supported * Nothing to do since Voltage Low detection is not supported
......
...@@ -19,77 +19,6 @@ ...@@ -19,77 +19,6 @@
*! Sep 03 1999 Edgar Iglesias Added bail-out stuff if we get interrupted *! Sep 03 1999 Edgar Iglesias Added bail-out stuff if we get interrupted
*! in the spin-lock. *! in the spin-lock.
*! *!
*! $Log: eeprom.c,v $
*! Revision 1.12 2005/06/19 17:06:46 starvik
*! Merge of Linux 2.6.12.
*!
*! Revision 1.11 2005/01/26 07:14:46 starvik
*! Applied diff from kernel janitors (Nish Aravamudan).
*!
*! Revision 1.10 2003/09/11 07:29:48 starvik
*! Merge of Linux 2.6.0-test5
*!
*! Revision 1.9 2003/07/04 08:27:37 starvik
*! Merge of Linux 2.5.74
*!
*! Revision 1.8 2003/04/09 05:20:47 starvik
*! Merge of Linux 2.5.67
*!
*! Revision 1.6 2003/02/10 07:19:28 starvik
*! Removed misplaced ;
*!
*! Revision 1.5 2002/12/11 13:13:57 starvik
*! Added arch/ to v10 specific includes
*! Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer)
*!
*! Revision 1.4 2002/11/20 11:56:10 starvik
*! Merge of Linux 2.5.48
*!
*! Revision 1.3 2002/11/18 13:16:06 starvik
*! Linux 2.5 port of latest 2.4 drivers
*!
*! Revision 1.8 2001/06/15 13:24:29 jonashg
*! * Added verification of pointers from userspace in read and write.
*! * Made busy counter volatile.
*! * Added define for initial write delay.
*! * Removed warnings by using loff_t instead of unsigned long.
*!
*! Revision 1.7 2001/06/14 15:26:54 jonashg
*! Removed test because condition is always true.
*!
*! Revision 1.6 2001/06/14 15:18:20 jonashg
*! Kb -> kB (makes quite a difference if you don't know if you have 2k or 16k).
*!
*! Revision 1.5 2001/06/14 14:39:51 jonashg
*! Forgot to use name when registering the driver.
*!
*! Revision 1.4 2001/06/14 14:35:47 jonashg
*! * Gave driver a name and used it in printk's.
*! * Cleanup.
*!
*! Revision 1.3 2001/03/19 16:04:46 markusl
*! Fixed init of fops struct
*!
*! Revision 1.2 2001/03/19 10:35:07 markusl
*! 2.4 port of eeprom driver
*!
*! Revision 1.8 2000/05/18 10:42:25 edgar
*! Make sure to end write cycle on _every_ write
*!
*! Revision 1.7 2000/01/17 17:41:01 johana
*! Adjusted probing and return -ENOSPC when writing outside EEPROM
*!
*! Revision 1.6 2000/01/17 15:50:36 johana
*! Added adaptive timing adjustments and fixed autoprobing for 2k and 16k(?)
*! EEPROMs
*!
*! Revision 1.5 1999/09/03 15:07:37 edgar
*! Added bail-out check to the spinlock
*!
*! Revision 1.4 1999/09/03 12:11:17 bjornw
*! Proper atomicity (need to use spinlocks, not if's). users -> busy.
*!
*!
*! (c) 1999 Axis Communications AB, Lund, Sweden *! (c) 1999 Axis Communications AB, Lund, Sweden
*!*****************************************************************************/ *!*****************************************************************************/
...@@ -106,7 +35,7 @@ ...@@ -106,7 +35,7 @@
#define D(x) #define D(x)
/* If we should use adaptive timing or not: */ /* If we should use adaptive timing or not: */
//#define EEPROM_ADAPTIVE_TIMING /* #define EEPROM_ADAPTIVE_TIMING */
#define EEPROM_MAJOR_NR 122 /* use a LOCAL/EXPERIMENTAL major for now */ #define EEPROM_MAJOR_NR 122 /* use a LOCAL/EXPERIMENTAL major for now */
#define EEPROM_MINOR_NR 0 #define EEPROM_MINOR_NR 0
......
This diff is collapsed.
...@@ -6,85 +6,9 @@ ...@@ -6,85 +6,9 @@
*! kernel modules (i2c_writereg/readreg) and from userspace using *! kernel modules (i2c_writereg/readreg) and from userspace using
*! ioctl()'s *! ioctl()'s
*! *!
*! Nov 30 1998 Torbjorn Eliasson Initial version. *! (C) Copyright 1999-2007 Axis Communications AB, LUND, SWEDEN
*! Bjorn Wesen Elinux kernel version.
*! Jan 14 2000 Johan Adolfsson Fixed PB shadow register stuff -
*! don't use PB_I2C if DS1302 uses same bits,
*! use PB.
*! $Log: i2c.c,v $
*! Revision 1.13 2005/03/07 13:13:07 starvik
*! Added spinlocks to protect states etc
*!
*! Revision 1.12 2005/01/05 06:11:22 starvik
*! No need to do local_irq_disable after local_irq_save.
*!
*! Revision 1.11 2004/12/13 12:21:52 starvik
*! Added I/O and DMA allocators from Linux 2.4
*!
*! Revision 1.9 2004/08/24 06:49:14 starvik
*! Whitespace cleanup
*!
*! Revision 1.8 2004/06/08 08:48:26 starvik
*! Removed unused code
*!
*! Revision 1.7 2004/05/28 09:26:59 starvik
*! Modified I2C initialization to work in 2.6.
*!
*! Revision 1.6 2004/05/14 07:58:03 starvik
*! Merge of changes from 2.4
*!
*! Revision 1.4 2002/12/11 13:13:57 starvik
*! Added arch/ to v10 specific includes
*! Added fix from Linux 2.4 in serial.c (flush_to_flip_buffer)
*!
*! Revision 1.3 2002/11/20 11:56:11 starvik
*! Merge of Linux 2.5.48
*!
*! Revision 1.2 2002/11/18 13:16:06 starvik
*! Linux 2.5 port of latest 2.4 drivers
*!
*! Revision 1.9 2002/10/31 15:32:26 starvik
*! Update Port B register and shadow even when running with hardware support
*! to avoid glitches when reading bits
*! Never set direction to out in i2c_inbyte
*! Removed incorrect clock toggling at end of i2c_inbyte
*!
*! Revision 1.8 2002/08/13 06:31:53 starvik
*! Made SDA and SCL line configurable
*! Modified i2c_inbyte to work with PCF8563
*!
*! Revision 1.7 2001/04/04 13:11:36 markusl
*! Updated according to review remarks
*!
*! Revision 1.6 2001/03/19 12:43:00 markusl
*! Made some symbols unstatic (used by the eeprom driver)
*!
*! Revision 1.5 2001/02/27 13:52:48 bjornw
*! malloc.h -> slab.h
*!
*! Revision 1.4 2001/02/15 07:17:40 starvik
*! Corrected usage if port_pb_i2c_shadow
*!
*! Revision 1.3 2001/01/26 17:55:13 bjornw
*! * Made I2C_USES_PB_NOT_PB_I2C a CONFIG option instead of assigning it
*! magically. Config.in needs to set it for the options that need it, like
*! Dallas 1302 support. Actually, it should be default since it screws up
*! the PB bits even if you don't use I2C..
*! * Include linux/config.h to get the above
*!
*! Revision 1.2 2001/01/18 15:49:30 bjornw
*! 2.4 port of I2C including some cleanups (untested of course)
*!
*! Revision 1.1 2001/01/18 15:35:25 bjornw
*! Verbatim copy of the Etrax i2c driver, 2.0 elinux version
*!
*!
*! ---------------------------------------------------------------------------
*!
*! (C) Copyright 1999-2002 Axis Communications AB, LUND, SWEDEN
*! *!
*!***************************************************************************/ *!***************************************************************************/
/* $Id: i2c.c,v 1.13 2005/03/07 13:13:07 starvik Exp $ */
/****************** INCLUDE FILES SECTION ***********************************/ /****************** INCLUDE FILES SECTION ***********************************/
...@@ -622,7 +546,7 @@ i2c_readreg(unsigned char theSlave, unsigned char theReg) ...@@ -622,7 +546,7 @@ i2c_readreg(unsigned char theSlave, unsigned char theReg)
* last received byte needs to be nacked * last received byte needs to be nacked
* instead of acked * instead of acked
*/ */
i2c_sendack(); i2c_sendnack();
/* /*
* end sequence * end sequence
*/ */
...@@ -708,6 +632,7 @@ i2c_init(void) ...@@ -708,6 +632,7 @@ i2c_init(void)
if (!first) { if (!first) {
return res; return res;
} }
first = 0;
/* Setup and enable the Port B I2C interface */ /* Setup and enable the Port B I2C interface */
......
This diff is collapsed.
This diff is collapsed.
/* Serialport functions for debugging /* Serialport functions for debugging
* *
* Copyright (c) 2000 Axis Communications AB * Copyright (c) 2000-2007 Axis Communications AB
* *
* Authors: Bjorn Wesen * Authors: Bjorn Wesen
* *
...@@ -11,96 +11,6 @@ ...@@ -11,96 +11,6 @@
* enableDebugIRQ() * enableDebugIRQ()
* init_etrax_debug() * init_etrax_debug()
* *
* $Log: debugport.c,v $
* Revision 1.27 2005/06/10 10:34:14 starvik
* Real console support
*
* Revision 1.26 2005/06/07 07:06:07 starvik
* Added LF->CR translation to make ETRAX customers happy.
*
* Revision 1.25 2005/03/08 08:56:47 mikaelam
* Do only set index as port->index if port is defined, otherwise use the index from the command line
*
* Revision 1.24 2005/01/19 10:26:33 mikaelam
* Return the cris serial driver in console device driver callback function
*
* Revision 1.23 2005/01/14 10:12:17 starvik
* KGDB on separate port.
* Console fixes from 2.4.
*
* Revision 1.22 2005/01/11 16:06:13 starvik
* typo
*
* Revision 1.21 2005/01/11 13:49:14 starvik
* Added raw_printk to be used where we don't trust the console.
*
* Revision 1.20 2004/12/27 11:18:32 starvik
* Merge of Linux 2.6.10 (not functional yet).
*
* Revision 1.19 2004/10/21 07:26:16 starvik
* Made it possible to specify console settings on kernel command line.
*
* Revision 1.18 2004/10/19 13:07:37 starvik
* Merge of Linux 2.6.9
*
* Revision 1.17 2004/09/29 10:33:46 starvik
* Resolved a dealock when printing debug from kernel.
*
* Revision 1.16 2004/08/24 06:12:19 starvik
* Whitespace cleanup
*
* Revision 1.15 2004/08/16 12:37:19 starvik
* Merge of Linux 2.6.8
*
* Revision 1.14 2004/05/17 13:11:29 starvik
* Disable DMA until real serial driver is up
*
* Revision 1.13 2004/05/14 07:58:01 starvik
* Merge of changes from 2.4
*
* Revision 1.12 2003/09/11 07:29:49 starvik
* Merge of Linux 2.6.0-test5
*
* Revision 1.11 2003/07/07 09:53:36 starvik
* Revert all the 2.5.74 merge changes to make the console work again
*
* Revision 1.9 2003/02/17 17:07:23 starvik
* Solved the problem with corrupted debug output (from Linux 2.4)
* * Wait until DMA, FIFO and pipe is empty before and after transmissions
* * Buffer data until a FIFO flush can be triggered.
*
* Revision 1.8 2003/01/22 06:48:36 starvik
* Fixed warnings issued by GCC 3.2.1
*
* Revision 1.7 2002/12/12 08:26:32 starvik
* Don't use C-comments inside CVS comments
*
* Revision 1.6 2002/12/11 15:42:02 starvik
* Extracted v10 (ETRAX 100LX) specific stuff from arch/cris/kernel/
*
* Revision 1.5 2002/11/20 06:58:03 starvik
* Compiles with kgdb
*
* Revision 1.4 2002/11/19 14:35:24 starvik
* Changes from linux 2.4
* Changed struct initializer syntax to the currently preferred notation
*
* Revision 1.3 2002/11/06 09:47:03 starvik
* Modified for new interrupt macros
*
* Revision 1.2 2002/01/21 15:21:50 bjornw
* Update for kdev_t changes
*
* Revision 1.6 2001/04/17 13:58:39 orjanf
* * Renamed CONFIG_KGDB to CONFIG_ETRAX_KGDB.
*
* Revision 1.5 2001/03/26 14:22:05 bjornw
* Namechange of some config options
*
* Revision 1.4 2000/10/06 12:37:26 bjornw
* Use physical addresses when talking to DMA
*
*
*/ */
#include <linux/console.h> #include <linux/console.h>
...@@ -112,6 +22,8 @@ ...@@ -112,6 +22,8 @@
#include <asm/arch/svinto.h> #include <asm/arch/svinto.h>
#include <asm/io.h> /* Get SIMCOUT. */ #include <asm/io.h> /* Get SIMCOUT. */
extern void reset_watchdog(void);
struct dbg_port struct dbg_port
{ {
unsigned int index; unsigned int index;
...@@ -188,7 +100,9 @@ struct dbg_port ports[]= ...@@ -188,7 +100,9 @@ struct dbg_port ports[]=
} }
}; };
#ifdef CONFIG_ETRAX_SERIAL
extern struct tty_driver *serial_driver; extern struct tty_driver *serial_driver;
#endif
struct dbg_port* port = struct dbg_port* port =
#if defined(CONFIG_ETRAX_DEBUG_PORT0) #if defined(CONFIG_ETRAX_DEBUG_PORT0)
...@@ -368,11 +282,12 @@ console_write_direct(struct console *co, const char *buf, unsigned int len) ...@@ -368,11 +282,12 @@ console_write_direct(struct console *co, const char *buf, unsigned int len)
{ {
int i; int i;
unsigned long flags; unsigned long flags;
local_irq_save(flags);
if (!port) if (!port)
return; return;
local_irq_save(flags);
/* Send data */ /* Send data */
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
/* LF -> CRLF */ /* LF -> CRLF */
...@@ -386,26 +301,16 @@ console_write_direct(struct console *co, const char *buf, unsigned int len) ...@@ -386,26 +301,16 @@ console_write_direct(struct console *co, const char *buf, unsigned int len)
; ;
*port->write = buf[i]; *port->write = buf[i];
} }
local_irq_restore(flags);
}
int raw_printk(const char *fmt, ...) /*
{ * Feed the watchdog, otherwise it will reset the chip during boot.
static char buf[1024]; * The time to send an ordinary boot message line (10-90 chars)
int printed_len; * varies between 1-8ms at 115200. What makes up for the additional
static int first = 1; * 90ms that allows the watchdog to bite?
if (first) { */
/* Force reinitialization of the port to get manual mode. */ reset_watchdog();
port->started = 0;
start_port(port); local_irq_restore(flags);
first = 0;
}
va_list args;
va_start(args, fmt);
printed_len = vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
console_write_direct(NULL, buf, strlen(buf));
return printed_len;
} }
static void static void
...@@ -500,6 +405,7 @@ console_setup(struct console *co, char *options) ...@@ -500,6 +405,7 @@ console_setup(struct console *co, char *options)
return 0; return 0;
} }
/* This is a dummy serial device that throws away anything written to it. /* This is a dummy serial device that throws away anything written to it.
* This is used when no debug output is wanted. * This is used when no debug output is wanted.
*/ */
...@@ -555,7 +461,13 @@ etrax_console_device(struct console* co, int *index) ...@@ -555,7 +461,13 @@ etrax_console_device(struct console* co, int *index)
{ {
if (port) if (port)
*index = port->index; *index = port->index;
else
*index = 0;
#ifdef CONFIG_ETRAX_SERIAL
return port ? serial_driver : &dummy_driver; return port ? serial_driver : &dummy_driver;
#else
return &dummy_driver;
#endif
} }
static struct console sercons = { static struct console sercons = {
......
/* Wrapper for DMA channel allocator that updates DMA client muxing. /* Wrapper for DMA channel allocator that updates DMA client muxing.
* Copyright 2004, Axis Communications AB * Copyright 2004-2007, Axis Communications AB
* $Id: dma.c,v 1.1 2004/12/13 12:21:51 starvik Exp $
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
......
/* $Id: entry.S,v 1.28 2005/06/20 05:06:30 starvik Exp $ /*
*
* linux/arch/cris/entry.S * linux/arch/cris/entry.S
* *
* Copyright (C) 2000, 2001, 2002 Axis Communications AB * Copyright (C) 2000, 2001, 2002 Axis Communications AB
* *
* Authors: Bjorn Wesen (bjornw@axis.com) * Authors: Bjorn Wesen (bjornw@axis.com)
*
* $Log: entry.S,v $
* Revision 1.28 2005/06/20 05:06:30 starvik
* Remove unnecessary diff to kernel.org tree
*
* Revision 1.27 2005/03/04 08:16:16 starvik
* Merge of Linux 2.6.11.
*
* Revision 1.26 2005/01/11 13:49:47 starvik
* Added NMI handler.
*
* Revision 1.25 2004/12/27 11:18:32 starvik
* Merge of Linux 2.6.10 (not functional yet).
*
* Revision 1.24 2004/12/22 10:41:23 starvik
* Updates to make v10 compile with the latest SMP aware generic code (even
* though v10 will never have SMP).
*
* Revision 1.23 2004/10/19 13:07:37 starvik
* Merge of Linux 2.6.9
*
* Revision 1.22 2004/06/21 10:29:55 starvik
* Merge of Linux 2.6.7
*
* Revision 1.21 2004/06/09 05:30:27 starvik
* Clean up multiple interrupt handling.
* Prevent interrupts from interrupting each other.
* Handle all active interrupts.
*
* Revision 1.20 2004/06/08 08:55:32 starvik
* Removed unused code
*
* Revision 1.19 2004/06/04 11:56:15 starvik
* Implemented page table lookup for refills in assembler for improved performance.
*
* Revision 1.18 2004/05/11 12:28:25 starvik
* Merge of Linux 2.6.6
*
* Revision 1.17 2003/09/11 07:29:49 starvik
* Merge of Linux 2.6.0-test5
*
* Revision 1.16 2003/07/04 08:27:41 starvik
* Merge of Linux 2.5.74
*
* Revision 1.15 2003/04/09 07:32:55 starvik
* resume should return task_struct, not thread_info
*
* Revision 1.14 2003/04/09 05:20:44 starvik
* Merge of Linux 2.5.67
*
* Revision 1.13 2002/12/11 15:42:02 starvik
* Extracted v10 (ETRAX 100LX) specific stuff from arch/cris/kernel/*.c
*
* Revision 1.12 2002/12/10 09:00:10 starvik
* Merge of Linux 2.5.51
*
* Revision 1.11 2002/12/05 07:53:10 starvik
* Corrected constants used with btstq
*
* Revision 1.10 2002/11/27 08:45:10 starvik
* pid is in task_struct, not thread_info
*
* Revision 1.9 2002/11/26 09:52:05 starvik
* Added preemptive kernel scheduling (if CONFIG_PREEMPT)
*
* Revision 1.8 2002/11/20 11:56:11 starvik
* Merge of Linux 2.5.48
*
* Revision 1.7 2002/11/18 13:02:42 starvik
* Added fourth parameter to do_notify_resume
* Minor cleanup
*
* Revision 1.6 2002/11/11 10:37:50 starvik
* Use new asm-offset defines
* Modified for new location of current->work etc
* Removed SYMBOL_NAME from syscalls
* Added some new syscalls
*
* Revision 1.5 2002/11/05 06:45:11 starvik
* Merge of Linux 2.5.45
*
* Revision 1.4 2002/02/05 15:41:31 bjornw
* Rewritten to conform better to current 2.5 code (similar to arch/i386)
*
* Revision 1.3 2002/01/21 15:22:20 bjornw
* NICE_DOGGY fix from 2.4 arch/cris
*
* Revision 1.37 2001/12/07 17:03:55 bjornw
* Call a c-hook called watchdog_bite_hook instead of show_registers directly
*
* Revision 1.36 2001/11/22 13:36:36 bjornw
* * In ret_from_intr, check regs->dccr for usermode reentrance instead of
* DCCR explicitly (because the latter might not reflect current reality)
* * In mmu_bus_fault, set $r9 _after_ calling the C-code instead of before
* since $r9 is call-clobbered and is potentially needed afterwards
*
* Revision 1.35 2001/10/30 17:10:15 bjornw
* Add some syscalls
*
* Revision 1.34 2001/10/01 14:45:03 bjornw
* Removed underscores and added register prefixes
*
* Revision 1.33 2001/08/21 13:48:01 jonashg
* Added fix by HP to avoid oops when doing a hard_reset_now.
*
* Revision 1.32 2001/08/14 04:32:02 hp
* In _resume, add comment why R9 is saved; don't sound like it's call-saved.
*
* Revision 1.31 2001/07/25 16:07:42 bjornw
* softirq_active/mask -> softirq_pending only
*
* Revision 1.30 2001/07/05 01:03:32 hp
* - include asm/errno.h to get ENOSYS.
* - Use ENOSYS, not local constant LENOSYS; tweak comments.
* - Explain why .include, not #include is used.
* - Make oops-register-dump if watchdog bits and it's not expected.
* - Don't jsr, use jump _hard_reset_now, and skip spurious nop.
* - Use correct section attribute for section .rodata.
* - Adjust sys_ni_syscall fill number.
*
* Revision 1.29 2001/06/25 14:07:00 hp
* Fix review comment.
* * head.S: Use IO_STATE, IO_FIELD and IO_MASK constructs instead of
* magic numbers. Add comment that -traditional must not be used.
* * entry.S (SYMBOL_NAME): Change redefinition to use ## concatenation.
* Correct and update comment.
* * Makefile (.S.o): Don't use -traditional. Add comment why the
* toplevel rule can't be used (now that there's a reason).
*
* Revision 1.28 2001/06/21 02:00:40 hp
* * entry.S: Include asm/unistd.h.
* (_sys_call_table): Use section .rodata, not .data.
* (_kernel_thread): Move from...
* * process.c: ... here.
* * entryoffsets.c (VAL): Break out from...
* (OF): Use VAL.
* (LCLONE_VM): New asmified value from CLONE_VM.
*
* Revision 1.27 2001/05/29 11:25:27 markusl
* In case of "spurious_interrupt", do hard_reset instead of hanging system in a loop...
*
* Revision 1.26 2001/05/15 15:46:03 bjornw
* Include config.h now that we use some CONFIG_ options
*
* Revision 1.25 2001/05/15 05:38:47 hp
* Tweaked code in _ret_from_sys_call
*
* Revision 1.24 2001/05/15 05:27:49 hp
* Save r9 in r1 over function call rather than on stack.
*
* Revision 1.23 2001/05/15 05:10:00 hp
* Generate entry.S structure offsets from C
*
* Revision 1.22 2001/04/17 13:58:39 orjanf
* * Renamed CONFIG_KGDB to CONFIG_ETRAX_KGDB.
*
* Revision 1.21 2001/04/17 11:33:29 orjanf
* Updated according to review:
* * Included asm/sv_addr_ag.h to get macro for internal register.
* * Corrected comment regarding system call argument passing.
* * Removed comment about instruction being in a delay slot.
* * Added comment about SYMBOL_NAME macro.
*
* Revision 1.20 2001/04/12 08:51:07 hp
* - Add entry for sys_fcntl64. In fact copy last piece from i386 including ...
* - .rept to fill table to safe state with sys_ni_syscall.
*
* Revision 1.19 2001/04/04 09:43:32 orjanf
* * Moved do_sigtrap from traps.c to entry.S.
* * LTASK_PID need not be global anymore.
*
* Revision 1.18 2001/03/26 09:25:02 markusl
* Updated after review, should now handle USB interrupts correctly.
*
* Revision 1.17 2001/03/21 16:12:55 bjornw
* * Always make room for the cpu status record in the frame, in order to
* use the same framelength and layout for both mmu busfaults and normal
* irqs. No need to check for the explicit CRIS_FRAME_FIXUP type anymore.
* * Fixed bug with using addq for popping the stack in the epilogue - it
* destroyed the flag register. Use instructions that don't affect the
* flag register instead.
* * Removed write to R_PORT_PA_DATA during spurious_interrupt
*
* Revision 1.16 2001/03/20 19:43:02 bjornw
* * Get rid of esp0 setting
* * Give a 7th argument to a systemcall - the stackframe
*
* Revision 1.15 2001/03/05 13:14:30 bjornw
* Spelling fix
*
* Revision 1.14 2001/02/23 08:36:36 perf
* New ABI; syscallnr=r9, arg5=mof, arg6=srp.
* Corrected tracesys call check.
*
* Revision 1.13 2001/02/15 08:40:55 perf
* H-P by way of perf;
* - (_system_call): Don't read system call function address into r1.
* - (RBFExit): There is no such thing as a null pop. Adjust sp by addq.
* - (_system_call): Don't use r10 and don't save and restore it.
* - (THREAD_ESP0): New constant.
* - (_system_call): Inline set_esp0.
*
* Revision 1.12 2001/01/31 17:56:25 orjanf
* Added definition of LTASK_PID and made it global.
*
* Revision 1.11 2001/01/10 21:13:29 bjornw
* SYMBOL_NAME is defined incorrectly for the compiler options we currently use
*
* Revision 1.10 2000/12/18 23:47:56 bjornw
* * Added syscall trace support (ptrace), completely untested of course
* * Removed redundant check for NULL entries in syscall_table
*
* Revision 1.9 2000/11/21 16:40:51 bjornw
* * New frame type used when an SBFS frame needs to be popped without
* actually restarting the instruction
* * Enable interrupts in signal_return (they did so in x86, I hope it's a good
* idea)
*
* Revision 1.8 2000/11/17 16:53:35 bjornw
* Added detection of frame-type in Rexit, so that mmu_bus_fault can
* use ret_from_intr in the return-path to check for signals (like SEGV)
* and other foul things that might have occurred during the fault.
*
* Revision 1.7 2000/10/06 15:04:28 bjornw
* Include mof in register savings
*
* Revision 1.6 2000/09/12 16:02:44 bjornw
* Linux-2.4.0-test7 derived updates
*
* Revision 1.5 2000/08/17 15:35:15 bjornw
* 2.4.0-test6 changed local_irq_count and friends API
*
* Revision 1.4 2000/08/02 13:59:30 bjornw
* Removed olduname and uname from the syscall list
*
* Revision 1.3 2000/07/31 13:32:58 bjornw
* * Export ret_from_intr
* * _resume updated (prev/last tjohejsan)
* * timer_interrupt obsolete
* * SIGSEGV detection in mmu_bus_fault temporarily disabled
*
*
*/ */
/* /*
...@@ -1167,9 +924,11 @@ sys_call_table: ...@@ -1167,9 +924,11 @@ sys_call_table:
.long sys_epoll_pwait .long sys_epoll_pwait
.long sys_utimensat /* 320 */ .long sys_utimensat /* 320 */
.long sys_signalfd .long sys_signalfd
.long sys_ni_syscall .long sys_timerfd_create
.long sys_eventfd .long sys_eventfd
.long sys_fallocate .long sys_fallocate
.long sys_timerfd_settime /* 325 */
.long sys_timerfd_gettime
/* /*
* NOTE!! This doesn't have to be exact - we just have * NOTE!! This doesn't have to be exact - we just have
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment