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

* 'cris_move' of git://www.jni.nu/cris:
[CRIS] Move header files from include to arch/cris/include.
[CRISv32] Remove warning in io.h

+3180 -4802
+9 -17
arch/cris/Makefile
··· 23 23 24 24 ifneq ($(arch-y),) 25 25 SARCH := arch-$(arch-y) 26 + inc := -Iarch/cris/include/arch-$(arch-y) -Iarch/cris/include/arch-$(arch-y)/arch 26 27 else 27 28 SARCH := 29 + inc := 28 30 endif 29 31 30 32 ifneq ($(mach-y),) 31 33 MACH := mach-$(mach-y) 34 + inc += -Iarch/cris/include/$(SARCH)/$(MACH)/ 35 + inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach 32 36 else 33 37 MACH := 34 38 endif ··· 43 39 44 40 CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) 45 41 46 - KBUILD_AFLAGS += -mlinux -march=$(arch-y) -Iinclude/asm/arch/mach -Iinclude/asm/arch 47 - 48 - KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe -Iinclude/asm/arch/mach -Iinclude/asm/arch 42 + KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) 43 + KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) 44 + KBUILD_CPPFLAGS += $(inc) 49 45 50 46 ifdef CONFIG_FRAME_POINTER 51 47 KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g ··· 77 73 zImage Image: vmlinux 78 74 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ 79 75 80 - archprepare: $(SRC_ARCH)/.links $(srctree)/include/asm-$(ARCH)/.arch FORCE 76 + archprepare: $(SRC_ARCH)/.links FORCE 81 77 82 78 # Create some links to make all tools happy 83 79 $(SRC_ARCH)/.links: ··· 99 95 @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c 100 96 @touch $@ 101 97 102 - # Create link to sub arch includes 103 - $(srctree)/include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h) 104 - @echo ' SYMLINK include/asm-$(ARCH)/arch -> include/asm-$(ARCH)/$(SARCH)' 105 - @rm -f $(srctree)/include/asm-$(ARCH)/arch/mach 106 - @rm -f $(srctree)/include/asm-$(ARCH)/arch 107 - @ln -sf $(SARCH) $(srctree)/include/asm-$(ARCH)/arch 108 - ifdef CONFIG_ETRAX_ARCH_V32 109 - @ln -sf $(MACH) $(srctree)/include/asm-$(ARCH)/arch/mach 110 - endif 111 - @touch $@ 112 - 113 98 archclean: 114 99 $(Q)if [ -e arch/$(ARCH)/boot ]; then \ 115 100 $(MAKE) $(clean)=arch/$(ARCH)/boot; \ ··· 109 116 $(MACHINE)/boot/compressed/decompress.bin \ 110 117 $(MACHINE)/boot/compressed/piggy.gz \ 111 118 $(MACHINE)/boot/rescue/rescue.bin \ 112 - $(SRC_ARCH)/.links \ 113 - $(srctree)/include/asm-$(ARCH)/.arch 119 + $(SRC_ARCH)/.links 114 120 115 121 MRPROPER_FILES += \ 116 122 $(SRC_ARCH)/drivers \
+2
arch/cris/arch-v10/boot/.gitignore
··· 1 + Image 2 + zImage
+1 -1
arch/cris/arch-v10/boot/compressed/head.S
··· 9 9 */ 10 10 11 11 #define ASSEMBLER_MACROS_ONLY 12 - #include <asm/arch/sv_addr_ag.h> 12 + #include <arch/sv_addr_ag.h> 13 13 14 14 #define RAM_INIT_MAGIC 0x56902387 15 15 #define COMMAND_LINE_MAGIC 0x87109563
+1 -1
arch/cris/arch-v10/boot/compressed/misc.c
··· 20 20 21 21 22 22 #include <linux/types.h> 23 - #include <asm/arch/svinto.h> 23 + #include <arch/svinto.h> 24 24 25 25 /* 26 26 * gzip declarations
+1 -1
arch/cris/arch-v10/boot/rescue/head.S
··· 65 65 #ifdef CONFIG_ETRAX_AXISFLASHMAP 66 66 67 67 #define ASSEMBLER_MACROS_ONLY 68 - #include <asm/arch/sv_addr_ag.h> 68 + #include <arch/sv_addr_ag.h> 69 69 70 70 ;; The partitiontable is looked for at the first sector after the boot 71 71 ;; sector. Sector size is 65536 bytes in all flashes we use.
+1 -1
arch/cris/arch-v10/boot/rescue/kimagerescue.S
··· 6 6 */ 7 7 8 8 #define ASSEMBLER_MACROS_ONLY 9 - #include <asm/arch/sv_addr_ag.h> 9 + #include <arch/sv_addr_ag.h> 10 10 11 11 #define CODE_START 0x40004000 12 12 #define CODE_LENGTH 784
+1 -1
arch/cris/arch-v10/boot/rescue/testrescue.S
··· 6 6 */ 7 7 8 8 #define ASSEMBLER_MACROS_ONLY 9 - #include <asm/arch/sv_addr_ag.h> 9 + #include <arch/sv_addr_ag.h> 10 10 11 11 .text 12 12
+1 -1
arch/cris/arch-v10/drivers/axisflashmap.c
··· 26 26 27 27 #include <asm/axisflashmap.h> 28 28 #include <asm/mmu.h> 29 - #include <asm/arch/sv_addr_ag.h> 29 + #include <arch/sv_addr_ag.h> 30 30 31 31 #ifdef CONFIG_CRIS_LOW_MAP 32 32 #define FLASH_UNCACHED_ADDR KSEG_8
+2 -2
arch/cris/arch-v10/drivers/ds1302.c
··· 24 24 25 25 #include <asm/uaccess.h> 26 26 #include <asm/system.h> 27 - #include <asm/arch/svinto.h> 27 + #include <arch/svinto.h> 28 28 #include <asm/io.h> 29 29 #include <asm/rtc.h> 30 - #include <asm/arch/io_interface_mux.h> 30 + #include <arch/io_interface_mux.h> 31 31 32 32 #include "i2c.h" 33 33
+2 -2
arch/cris/arch-v10/drivers/gpio.c
··· 23 23 #include <linux/interrupt.h> 24 24 25 25 #include <asm/etraxgpio.h> 26 - #include <asm/arch/svinto.h> 26 + #include <arch/svinto.h> 27 27 #include <asm/io.h> 28 28 #include <asm/system.h> 29 29 #include <asm/irq.h> 30 - #include <asm/arch/io_interface_mux.h> 30 + #include <arch/io_interface_mux.h> 31 31 32 32 #define GPIO_MAJOR 120 /* experimental MAJOR number */ 33 33
+2 -2
arch/cris/arch-v10/drivers/i2c.c
··· 25 25 #include <asm/etraxi2c.h> 26 26 27 27 #include <asm/system.h> 28 - #include <asm/arch/svinto.h> 28 + #include <arch/svinto.h> 29 29 #include <asm/io.h> 30 30 #include <asm/delay.h> 31 - #include <asm/arch/io_interface_mux.h> 31 + #include <arch/io_interface_mux.h> 32 32 33 33 #include "i2c.h" 34 34
+2 -2
arch/cris/arch-v10/drivers/sync_serial.c
··· 26 26 #include <asm/irq.h> 27 27 #include <asm/dma.h> 28 28 #include <asm/io.h> 29 - #include <asm/arch/svinto.h> 29 + #include <arch/svinto.h> 30 30 #include <asm/uaccess.h> 31 31 #include <asm/system.h> 32 32 #include <asm/sync_serial.h> 33 - #include <asm/arch/io_interface_mux.h> 33 + #include <arch/io_interface_mux.h> 34 34 35 35 /* The receiver is a bit tricky beacuse of the continuous stream of data.*/ 36 36 /* */
+1 -1
arch/cris/arch-v10/kernel/crisksyms.c
··· 1 1 #include <linux/module.h> 2 2 #include <asm/io.h> 3 - #include <asm/arch/svinto.h> 3 + #include <arch/svinto.h> 4 4 5 5 /* Export shadow registers for the CPU I/O pins */ 6 6 EXPORT_SYMBOL(genconfig_shadow);
+1 -1
arch/cris/arch-v10/kernel/debugport.c
··· 19 19 #include <linux/delay.h> 20 20 #include <linux/tty.h> 21 21 #include <asm/system.h> 22 - #include <asm/arch/svinto.h> 22 + #include <arch/svinto.h> 23 23 #include <asm/io.h> /* Get SIMCOUT. */ 24 24 25 25 extern void reset_watchdog(void);
+1 -1
arch/cris/arch-v10/kernel/dma.c
··· 7 7 #include <linux/errno.h> 8 8 9 9 #include <asm/dma.h> 10 - #include <asm/arch/svinto.h> 10 + #include <arch/svinto.h> 11 11 12 12 /* Macro to access ETRAX 100 registers */ 13 13 #define SETS(var, reg, field, val) var = (var & ~IO_MASK_(reg##_, field##_)) | \
+1 -1
arch/cris/arch-v10/kernel/entry.S
··· 23 23 #include <linux/linkage.h> 24 24 #include <linux/sys.h> 25 25 #include <asm/unistd.h> 26 - #include <asm/arch/sv_addr_ag.h> 26 + #include <arch/sv_addr_ag.h> 27 27 #include <asm/errno.h> 28 28 #include <asm/thread_info.h> 29 29 #include <asm/asm-offsets.h>
+1 -1
arch/cris/arch-v10/kernel/fasttimer.c
··· 24 24 #include <asm/rtc.h> 25 25 26 26 27 - #include <asm/arch/svinto.h> 27 + #include <arch/svinto.h> 28 28 #include <asm/fasttimer.h> 29 29 #include <linux/proc_fs.h> 30 30
+1 -1
arch/cris/arch-v10/kernel/head.S
··· 10 10 #define ASSEMBLER_MACROS_ONLY 11 11 /* The IO_* macros use the ## token concatenation operator, so 12 12 -traditional must not be used when assembling this file. */ 13 - #include <asm/arch/sv_addr_ag.h> 13 + #include <arch/sv_addr_ag.h> 14 14 15 15 #define CRAMFS_MAGIC 0x28cd3d45 16 16 #define RAM_INIT_MAGIC 0x56902387
+2 -2
arch/cris/arch-v10/kernel/io_interface_mux.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/init.h> 13 13 14 - #include <asm/arch/svinto.h> 14 + #include <arch/svinto.h> 15 15 #include <asm/io.h> 16 - #include <asm/arch/io_interface_mux.h> 16 + #include <arch/io_interface_mux.h> 17 17 18 18 19 19 #define DBG(s)
+1 -1
arch/cris/arch-v10/kernel/kgdb.c
··· 176 176 #include <asm/setup.h> 177 177 #include <asm/ptrace.h> 178 178 179 - #include <asm/arch/svinto.h> 179 + #include <arch/svinto.h> 180 180 #include <asm/irq.h> 181 181 182 182 static int kgdb_started = 0;
+1 -1
arch/cris/arch-v10/kernel/process.c
··· 14 14 #include <linux/err.h> 15 15 #include <linux/fs.h> 16 16 #include <linux/slab.h> 17 - #include <asm/arch/svinto.h> 17 + #include <arch/svinto.h> 18 18 #include <linux/init.h> 19 19 20 20 #ifdef CONFIG_ETRAX_GPIO
+1 -1
arch/cris/arch-v10/kernel/time.c
··· 14 14 #include <linux/sched.h> 15 15 #include <linux/init.h> 16 16 #include <linux/mm.h> 17 - #include <asm/arch/svinto.h> 17 + #include <arch/svinto.h> 18 18 #include <asm/types.h> 19 19 #include <asm/signal.h> 20 20 #include <asm/io.h>
+1 -1
arch/cris/arch-v10/kernel/traps.c
··· 10 10 11 11 #include <linux/ptrace.h> 12 12 #include <asm/uaccess.h> 13 - #include <asm/arch/sv_addr_ag.h> 13 + #include <arch/sv_addr_ag.h> 14 14 15 15 void 16 16 show_registers(struct pt_regs *regs)
+1 -1
arch/cris/arch-v10/mm/fault.c
··· 13 13 #include <linux/mm.h> 14 14 #include <asm/uaccess.h> 15 15 #include <asm/pgtable.h> 16 - #include <asm/arch/svinto.h> 16 + #include <arch/svinto.h> 17 17 #include <asm/mmu_context.h> 18 18 19 19 /* debug of low-level TLB reload */
+1 -1
arch/cris/arch-v10/mm/init.c
··· 12 12 #include <asm/mmu.h> 13 13 #include <asm/io.h> 14 14 #include <asm/mmu_context.h> 15 - #include <asm/arch/svinto.h> 15 + #include <arch/svinto.h> 16 16 17 17 extern void tlb_init(void); 18 18
+1 -1
arch/cris/arch-v10/mm/tlb.c
··· 12 12 13 13 #include <asm/tlb.h> 14 14 #include <asm/mmu_context.h> 15 - #include <asm/arch/svinto.h> 15 + #include <arch/svinto.h> 16 16 17 17 #define D(x) 18 18
+2 -2
arch/cris/arch-v32/boot/compressed/head.S
··· 7 7 8 8 #define ASSEMBLER_MACROS_ONLY 9 9 #include <hwregs/asm/reg_map_asm.h> 10 - #include <asm/arch/mach/startup.inc> 10 + #include <mach/startup.inc> 11 11 12 12 #define RAM_INIT_MAGIC 0x56902387 13 13 #define COMMAND_LINE_MAGIC 0x87109563 ··· 17 17 .globl input_data 18 18 19 19 .text 20 - start: 20 + _start: 21 21 di 22 22 23 23 ;; Start clocks for used blocks.
+1 -1
arch/cris/arch-v32/drivers/mach-a3/gpio.c
··· 33 33 #include <asm/io.h> 34 34 #include <asm/system.h> 35 35 #include <asm/irq.h> 36 - #include <asm/arch/mach/pinmux.h> 36 + #include <mach/pinmux.h> 37 37 38 38 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO 39 39 #include "../i2c.h"
+1 -1
arch/cris/arch-v32/drivers/mach-a3/nandflash.c
··· 18 18 #include <linux/mtd/mtd.h> 19 19 #include <linux/mtd/nand.h> 20 20 #include <linux/mtd/partitions.h> 21 - #include <asm/arch/memmap.h> 21 + #include <arch/memmap.h> 22 22 #include <hwregs/reg_map.h> 23 23 #include <hwregs/reg_rdwr.h> 24 24 #include <hwregs/pio_defs.h>
+1 -1
arch/cris/arch-v32/drivers/mach-fs/nandflash.c
··· 18 18 #include <linux/mtd/mtd.h> 19 19 #include <linux/mtd/nand.h> 20 20 #include <linux/mtd/partitions.h> 21 - #include <asm/arch/memmap.h> 21 + #include <arch/memmap.h> 22 22 #include <hwregs/reg_map.h> 23 23 #include <hwregs/reg_rdwr.h> 24 24 #include <hwregs/gio_defs.h>
+1 -1
arch/cris/arch-v32/drivers/pci/bios.c
··· 1 1 #include <linux/pci.h> 2 2 #include <linux/kernel.h> 3 - #include <asm/arch/hwregs/intr_vect.h> 3 + #include <arch/hwregs/intr_vect.h> 4 4 5 5 void __devinit pcibios_fixup_bus(struct pci_bus *b) 6 6 {
+2 -2
arch/cris/arch-v32/kernel/cache.c
··· 1 1 #include <linux/module.h> 2 2 #include <asm/io.h> 3 - #include <asm/arch/cache.h> 4 - #include <asm/arch/hwregs/dma.h> 3 + #include <arch/cache.h> 4 + #include <arch/hwregs/dma.h> 5 5 6 6 /* This file is used to workaround a cache bug, Guinness TR 106. */ 7 7
+4 -4
arch/cris/arch-v32/kernel/crisksyms.c
··· 1 1 #include <linux/module.h> 2 2 #include <linux/irq.h> 3 - #include <asm/arch/dma.h> 4 - #include <asm/arch/intmem.h> 5 - #include <asm/arch/mach/pinmux.h> 6 - #include <asm/arch/io.h> 3 + #include <arch/dma.h> 4 + #include <arch/intmem.h> 5 + #include <mach/pinmux.h> 6 + #include <arch/io.h> 7 7 8 8 /* Functions for allocating DMA channels */ 9 9 EXPORT_SYMBOL(crisv32_request_dma);
+1 -1
arch/cris/arch-v32/kernel/debugport.c
··· 9 9 #include <hwregs/reg_map.h> 10 10 #include <hwregs/ser_defs.h> 11 11 #include <hwregs/dma_defs.h> 12 - #include <asm/arch/mach/pinmux.h> 12 + #include <mach/pinmux.h> 13 13 14 14 struct dbg_port 15 15 {
+2 -2
arch/cris/arch-v32/kernel/entry.S
··· 24 24 #include <asm/thread_info.h> 25 25 #include <asm/asm-offsets.h> 26 26 27 - #include <asm/arch/hwregs/asm/reg_map_asm.h> 28 - #include <asm/arch/hwregs/asm/intr_vect_defs_asm.h> 27 + #include <hwregs/asm/reg_map_asm.h> 28 + #include <hwregs/asm/intr_vect_defs_asm.h> 29 29 30 30 ;; Exported functions. 31 31 .globl system_call
+2 -2
arch/cris/arch-v32/kernel/head.S
··· 11 11 * -traditional must not be used when assembling this file. 12 12 */ 13 13 #include <hwregs/reg_rdwr.h> 14 - #include <asm/arch/memmap.h> 14 + #include <arch/memmap.h> 15 15 #include <hwregs/intr_vect.h> 16 16 #include <hwregs/asm/mmu_defs_asm.h> 17 17 #include <hwregs/asm/reg_map_asm.h> 18 - #include <asm/arch/mach/startup.inc> 18 + #include <mach/startup.inc> 19 19 20 20 #define CRAMFS_MAGIC 0x28cd3d45 21 21 #define JHEAD_MAGIC 0x1FF528A6
+4 -4
arch/cris/arch-v32/kernel/kgdb.c
··· 174 174 #include <asm/ptrace.h> 175 175 176 176 #include <asm/irq.h> 177 - #include <asm/arch/hwregs/reg_map.h> 178 - #include <asm/arch/hwregs/reg_rdwr.h> 179 - #include <asm/arch/hwregs/intr_vect_defs.h> 180 - #include <asm/arch/hwregs/ser_defs.h> 177 + #include <arch/hwregs/reg_map.h> 178 + #include <arch/hwregs/reg_rdwr.h> 179 + #include <arch/hwregs/intr_vect_defs.h> 180 + #include <arch/hwregs/ser_defs.h> 181 181 182 182 /* From entry.S. */ 183 183 extern void gdb_handle_exception(void);
+1 -1
arch/cris/arch-v32/kernel/kgdb_asm.S
··· 5 5 * port exceptions for kernel debugging purposes. 6 6 */ 7 7 8 - #include <asm/arch/hwregs/intr_vect.h> 8 + #include <arch/hwregs/intr_vect.h> 9 9 10 10 ;; Exported functions. 11 11 .globl kgdb_handle_exception
+4 -4
arch/cris/arch-v32/kernel/pinmux.c
··· 11 11 #include <linux/kernel.h> 12 12 #include <linux/string.h> 13 13 #include <linux/spinlock.h> 14 - #include <asm/arch/hwregs/reg_map.h> 15 - #include <asm/arch/hwregs/reg_rdwr.h> 16 - #include <asm/arch/pinmux.h> 17 - #include <asm/arch/hwregs/pinmux_defs.h> 14 + #include <arch/hwregs/reg_map.h> 15 + #include <arch/hwregs/reg_rdwr.h> 16 + #include <arch/pinmux.h> 17 + #include <arch/hwregs/pinmux_defs.h> 18 18 19 19 #undef DEBUG 20 20
+1 -1
arch/cris/arch-v32/kernel/ptrace.c
··· 17 17 #include <asm/pgtable.h> 18 18 #include <asm/system.h> 19 19 #include <asm/processor.h> 20 - #include <asm/arch/hwregs/supp_reg.h> 20 + #include <arch/hwregs/supp_reg.h> 21 21 22 22 /* 23 23 * Determines which bits in CCS the user has access to.
+2 -2
arch/cris/arch-v32/kernel/signal.c
··· 18 18 #include <asm/processor.h> 19 19 #include <asm/ucontext.h> 20 20 #include <asm/uaccess.h> 21 - #include <asm/arch/ptrace.h> 22 - #include <asm/arch/hwregs/cpu_vect.h> 21 + #include <arch/ptrace.h> 22 + #include <arch/hwregs/cpu_vect.h> 23 23 24 24 extern unsigned long cris_signal_return_page; 25 25
+5 -5
arch/cris/arch-v32/lib/nand_init.S
··· 22 22 ## 23 23 ##============================================================================= 24 24 25 - #include <asm/arch/hwregs/asm/reg_map_asm.h> 26 - #include <asm/arch/hwregs/asm/gio_defs_asm.h> 27 - #include <asm/arch/hwregs/asm/pinmux_defs_asm.h> 28 - #include <asm/arch/hwregs/asm/bif_core_defs_asm.h> 29 - #include <asm/arch/hwregs/asm/config_defs_asm.h> 25 + #include <arch/hwregs/asm/reg_map_asm.h> 26 + #include <arch/hwregs/asm/gio_defs_asm.h> 27 + #include <arch/hwregs/asm/pinmux_defs_asm.h> 28 + #include <arch/hwregs/asm/bif_core_defs_asm.h> 29 + #include <arch/hwregs/asm/config_defs_asm.h> 30 30 31 31 ;; There are 8-bit NAND flashes and 16-bit NAND flashes. 32 32 ;; We need to treat them slightly different.
+1 -1
arch/cris/arch-v32/mach-a3/dma.c
··· 2 2 3 3 #include <linux/kernel.h> 4 4 #include <linux/spinlock.h> 5 - #include <asm/arch/mach/dma.h> 5 + #include <mach/dma.h> 6 6 #include <hwregs/reg_map.h> 7 7 #include <hwregs/reg_rdwr.h> 8 8 #include <hwregs/marb_defs.h>
+1 -1
arch/cris/arch-v32/mach-a3/io.c
··· 12 12 #include <linux/kernel.h> 13 13 #include <linux/module.h> 14 14 #include <asm/io.h> 15 - #include <asm/arch/mach/pinmux.h> 15 + #include <mach/pinmux.h> 16 16 #include <hwregs/gio_defs.h> 17 17 18 18 struct crisv32_ioport crisv32_ioports[] = {
+3 -3
arch/cris/arch-v32/mach-fs/cpufreq.c
··· 2 2 #include <linux/module.h> 3 3 #include <linux/cpufreq.h> 4 4 #include <hwregs/reg_map.h> 5 - #include <asm/arch/hwregs/reg_rdwr.h> 6 - #include <asm/arch/hwregs/config_defs.h> 7 - #include <asm/arch/hwregs/bif_core_defs.h> 5 + #include <arch/hwregs/reg_rdwr.h> 6 + #include <arch/hwregs/config_defs.h> 7 + #include <arch/hwregs/bif_core_defs.h> 8 8 9 9 static int 10 10 cris_sdram_freq_notifier(struct notifier_block *nb, unsigned long val,
+1 -1
arch/cris/arch-v32/mach-fs/dma.c
··· 10 10 #include <hwregs/strmux_defs.h> 11 11 #include <linux/errno.h> 12 12 #include <asm/system.h> 13 - #include <asm/arch/mach/arbiter.h> 13 + #include <mach/arbiter.h> 14 14 15 15 static char used_dma_channels[MAX_DMA_CHANNELS]; 16 16 static const char *used_dma_channels_users[MAX_DMA_CHANNELS];
+2 -2
arch/cris/arch-v32/mach-fs/io.c
··· 12 12 #include <linux/kernel.h> 13 13 #include <linux/module.h> 14 14 #include <asm/io.h> 15 - #include <asm/arch/pinmux.h> 16 - #include <asm/arch/hwregs/gio_defs.h> 15 + #include <mach/pinmux.h> 16 + #include <hwregs/gio_defs.h> 17 17 18 18 #ifndef DEBUG 19 19 #define DEBUG(x)
+2 -2
arch/cris/arch-v32/mach-fs/vcs_hook.c
··· 5 5 6 6 #include "vcs_hook.h" 7 7 #include <stdarg.h> 8 - #include <asm/arch-v32/hwregs/reg_map.h> 9 - #include <asm/arch-v32/hwregs/intr_vect_defs.h> 8 + #include <arch-v32/hwregs/reg_map.h> 9 + #include <arch-v32/hwregs/intr_vect_defs.h> 10 10 11 11 #define HOOK_TRIG_ADDR 0xb7000000 /* hook cvlog model reg address */ 12 12 #define HOOK_MEM_BASE_ADDR 0xa0000000 /* csp4 (shared mem) base addr */
+2 -2
arch/cris/arch-v32/mm/init.c
··· 16 16 #include <asm/mmu.h> 17 17 #include <asm/io.h> 18 18 #include <asm/mmu_context.h> 19 - #include <asm/arch/hwregs/asm/mmu_defs_asm.h> 20 - #include <asm/arch/hwregs/supp_reg.h> 19 + #include <arch/hwregs/asm/mmu_defs_asm.h> 20 + #include <arch/hwregs/supp_reg.h> 21 21 22 22 extern void tlb_init(void); 23 23
+2 -2
arch/cris/arch-v32/mm/tlb.c
··· 9 9 10 10 #include <asm/tlb.h> 11 11 #include <asm/mmu_context.h> 12 - #include <asm/arch/hwregs/asm/mmu_defs_asm.h> 13 - #include <asm/arch/hwregs/supp_reg.h> 12 + #include <arch/hwregs/asm/mmu_defs_asm.h> 13 + #include <arch/hwregs/supp_reg.h> 14 14 15 15 #define UPDATE_TLB_SEL_IDX(val) \ 16 16 do { \
+199
arch/cris/include/arch-v10/arch/io.h
··· 1 + #ifndef _ASM_ARCH_CRIS_IO_H 2 + #define _ASM_ARCH_CRIS_IO_H 3 + 4 + #include <arch/svinto.h> 5 + 6 + /* Etrax shadow registers - which live in arch/cris/kernel/shadows.c */ 7 + 8 + extern unsigned long gen_config_ii_shadow; 9 + extern unsigned long port_g_data_shadow; 10 + extern unsigned char port_pa_dir_shadow; 11 + extern unsigned char port_pa_data_shadow; 12 + extern unsigned char port_pb_i2c_shadow; 13 + extern unsigned char port_pb_config_shadow; 14 + extern unsigned char port_pb_dir_shadow; 15 + extern unsigned char port_pb_data_shadow; 16 + extern unsigned long r_timer_ctrl_shadow; 17 + 18 + extern unsigned long port_cse1_shadow; 19 + extern unsigned long port_csp0_shadow; 20 + extern unsigned long port_csp4_shadow; 21 + 22 + extern volatile unsigned long *port_cse1_addr; 23 + extern volatile unsigned long *port_csp0_addr; 24 + extern volatile unsigned long *port_csp4_addr; 25 + 26 + /* macro for setting regs through a shadow - 27 + * r = register name (like R_PORT_PA_DATA) 28 + * s = shadow name (like port_pa_data_shadow) 29 + * b = bit number 30 + * v = value (0 or 1) 31 + */ 32 + 33 + #define REG_SHADOW_SET(r,s,b,v) *r = s = (s & ~(1 << (b))) | ((v) << (b)) 34 + 35 + /* The LED's on various Etrax-based products are set differently. */ 36 + 37 + #if defined(CONFIG_ETRAX_NO_LEDS) || defined(CONFIG_SVINTO_SIM) 38 + #undef CONFIG_ETRAX_PA_LEDS 39 + #undef CONFIG_ETRAX_PB_LEDS 40 + #undef CONFIG_ETRAX_CSP0_LEDS 41 + #define CRIS_LED_NETWORK_SET_G(x) 42 + #define CRIS_LED_NETWORK_SET_R(x) 43 + #define CRIS_LED_ACTIVE_SET_G(x) 44 + #define CRIS_LED_ACTIVE_SET_R(x) 45 + #define CRIS_LED_DISK_WRITE(x) 46 + #define CRIS_LED_DISK_READ(x) 47 + #endif 48 + 49 + #if !defined(CONFIG_ETRAX_CSP0_LEDS) 50 + #define CRIS_LED_BIT_SET(x) 51 + #define CRIS_LED_BIT_CLR(x) 52 + #endif 53 + 54 + #define CRIS_LED_OFF 0x00 55 + #define CRIS_LED_GREEN 0x01 56 + #define CRIS_LED_RED 0x02 57 + #define CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_LED_RED) 58 + 59 + #if defined(CONFIG_ETRAX_NO_LEDS) 60 + #define CRIS_LED_NETWORK_SET(x) 61 + #else 62 + #if CONFIG_ETRAX_LED1G == CONFIG_ETRAX_LED1R 63 + #define CRIS_LED_NETWORK_SET(x) \ 64 + do { \ 65 + CRIS_LED_NETWORK_SET_G((x) & CRIS_LED_GREEN); \ 66 + } while (0) 67 + #else 68 + #define CRIS_LED_NETWORK_SET(x) \ 69 + do { \ 70 + CRIS_LED_NETWORK_SET_G((x) & CRIS_LED_GREEN); \ 71 + CRIS_LED_NETWORK_SET_R((x) & CRIS_LED_RED); \ 72 + } while (0) 73 + #endif 74 + #if CONFIG_ETRAX_LED2G == CONFIG_ETRAX_LED2R 75 + #define CRIS_LED_ACTIVE_SET(x) \ 76 + do { \ 77 + CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \ 78 + } while (0) 79 + #else 80 + #define CRIS_LED_ACTIVE_SET(x) \ 81 + do { \ 82 + CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \ 83 + CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \ 84 + } while (0) 85 + #endif 86 + #endif 87 + 88 + #ifdef CONFIG_ETRAX_PA_LEDS 89 + #define CRIS_LED_NETWORK_SET_G(x) \ 90 + REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1G, !(x)) 91 + #define CRIS_LED_NETWORK_SET_R(x) \ 92 + REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1R, !(x)) 93 + #define CRIS_LED_ACTIVE_SET_G(x) \ 94 + REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2G, !(x)) 95 + #define CRIS_LED_ACTIVE_SET_R(x) \ 96 + REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2R, !(x)) 97 + #define CRIS_LED_DISK_WRITE(x) \ 98 + do{\ 99 + REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3G, !(x));\ 100 + REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3R, !(x));\ 101 + }while(0) 102 + #define CRIS_LED_DISK_READ(x) \ 103 + REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, \ 104 + CONFIG_ETRAX_LED3G, !(x)) 105 + #endif 106 + 107 + #ifdef CONFIG_ETRAX_PB_LEDS 108 + #define CRIS_LED_NETWORK_SET_G(x) \ 109 + REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1G, !(x)) 110 + #define CRIS_LED_NETWORK_SET_R(x) \ 111 + REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1R, !(x)) 112 + #define CRIS_LED_ACTIVE_SET_G(x) \ 113 + REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2G, !(x)) 114 + #define CRIS_LED_ACTIVE_SET_R(x) \ 115 + REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2R, !(x)) 116 + #define CRIS_LED_DISK_WRITE(x) \ 117 + do{\ 118 + REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3G, !(x));\ 119 + REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3R, !(x));\ 120 + }while(0) 121 + #define CRIS_LED_DISK_READ(x) \ 122 + REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, \ 123 + CONFIG_ETRAX_LED3G, !(x)) 124 + #endif 125 + 126 + #ifdef CONFIG_ETRAX_CSP0_LEDS 127 + #define CONFIGURABLE_LEDS\ 128 + ((1 << CONFIG_ETRAX_LED1G ) | (1 << CONFIG_ETRAX_LED1R ) |\ 129 + (1 << CONFIG_ETRAX_LED2G ) | (1 << CONFIG_ETRAX_LED2R ) |\ 130 + (1 << CONFIG_ETRAX_LED3G ) | (1 << CONFIG_ETRAX_LED3R ) |\ 131 + (1 << CONFIG_ETRAX_LED4G ) | (1 << CONFIG_ETRAX_LED4R ) |\ 132 + (1 << CONFIG_ETRAX_LED5G ) | (1 << CONFIG_ETRAX_LED5R ) |\ 133 + (1 << CONFIG_ETRAX_LED6G ) | (1 << CONFIG_ETRAX_LED6R ) |\ 134 + (1 << CONFIG_ETRAX_LED7G ) | (1 << CONFIG_ETRAX_LED7R ) |\ 135 + (1 << CONFIG_ETRAX_LED8Y ) | (1 << CONFIG_ETRAX_LED9Y ) |\ 136 + (1 << CONFIG_ETRAX_LED10Y ) |(1 << CONFIG_ETRAX_LED11Y )|\ 137 + (1 << CONFIG_ETRAX_LED12R )) 138 + 139 + #define CRIS_LED_NETWORK_SET_G(x) \ 140 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1G, !(x)) 141 + #define CRIS_LED_NETWORK_SET_R(x) \ 142 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1R, !(x)) 143 + #define CRIS_LED_ACTIVE_SET_G(x) \ 144 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2G, !(x)) 145 + #define CRIS_LED_ACTIVE_SET_R(x) \ 146 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2R, !(x)) 147 + #define CRIS_LED_DISK_WRITE(x) \ 148 + do{\ 149 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x));\ 150 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3R, !(x));\ 151 + }while(0) 152 + #define CRIS_LED_DISK_READ(x) \ 153 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x)) 154 + #define CRIS_LED_BIT_SET(x)\ 155 + do{\ 156 + if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\ 157 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 1);\ 158 + }while(0) 159 + #define CRIS_LED_BIT_CLR(x)\ 160 + do{\ 161 + if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\ 162 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 0);\ 163 + }while(0) 164 + #endif 165 + 166 + # 167 + #ifdef CONFIG_ETRAX_SOFT_SHUTDOWN 168 + #define SOFT_SHUTDOWN() \ 169 + REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_SHUTDOWN_BIT, 1) 170 + #else 171 + #define SOFT_SHUTDOWN() 172 + #endif 173 + 174 + /* Console I/O for simulated etrax100. Use #ifdef so erroneous 175 + use will be evident. */ 176 + #ifdef CONFIG_SVINTO_SIM 177 + /* Let's use the ucsim interface since it lets us do write(2, ...) */ 178 + #define SIMCOUT(s,len) \ 179 + asm ("moveq 4,$r9 \n\t" \ 180 + "moveq 2,$r10 \n\t" \ 181 + "move.d %0,$r11 \n\t" \ 182 + "move.d %1,$r12 \n\t" \ 183 + "push $irp \n\t" \ 184 + "move 0f,$irp \n\t" \ 185 + "jump -6809 \n" \ 186 + "0: \n\t" \ 187 + "pop $irp" \ 188 + : : "rm" (s), "rm" (len) : "r9","r10","r11","r12","memory") 189 + #define TRACE_ON() __extension__ \ 190 + ({ int _Foofoo; __asm__ volatile ("bmod [%0],%0" : "=r" (_Foofoo) : "0" \ 191 + (255)); _Foofoo; }) 192 + 193 + #define TRACE_OFF() do { __asm__ volatile ("bmod [%0],%0" :: "r" (254)); } while (0) 194 + #define SIM_END() do { __asm__ volatile ("bmod [%0],%0" :: "r" (28)); } while (0) 195 + #define CRIS_CYCLES() __extension__ \ 196 + ({ unsigned long c; asm ("bmod [%1],%0" : "=r" (c) : "r" (27)); c;}) 197 + #endif /* ! defined CONFIG_SVINTO_SIM */ 198 + 199 + #endif
+160
arch/cris/include/arch-v10/arch/irq.h
··· 1 + /* 2 + * Interrupt handling assembler and defines for Linux/CRISv10 3 + */ 4 + 5 + #ifndef _ASM_ARCH_IRQ_H 6 + #define _ASM_ARCH_IRQ_H 7 + 8 + #include <arch/sv_addr_ag.h> 9 + 10 + #define NR_IRQS 32 11 + 12 + /* The first vector number used for IRQs in v10 is really 0x20 */ 13 + /* but all the code and constants are offseted to make 0 the first */ 14 + #define FIRST_IRQ 0 15 + 16 + #define SOME_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, some) /* 0 ? */ 17 + #define NMI_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, nmi) /* 1 */ 18 + #define TIMER0_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, timer0) /* 2 */ 19 + #define TIMER1_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, timer1) /* 3 */ 20 + /* mio, ata, par0, scsi0 on 4 */ 21 + /* par1, scsi1 on 5 */ 22 + #define NETWORK_STATUS_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, network) /* 6 */ 23 + 24 + #define SERIAL_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, serial) /* 8 */ 25 + #define PA_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, pa) /* 11 */ 26 + /* extdma0 and extdma1 is at irq 12 and 13 and/or same as dma5 and dma6 ? */ 27 + #define EXTDMA0_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, ext_dma0) 28 + #define EXTDMA1_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, ext_dma1) 29 + 30 + /* dma0-9 is irq 16..25 */ 31 + /* 16,17: network */ 32 + #define DMA0_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma0) 33 + #define DMA1_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma1) 34 + #define NETWORK_DMA_TX_IRQ_NBR DMA0_TX_IRQ_NBR 35 + #define NETWORK_DMA_RX_IRQ_NBR DMA1_RX_IRQ_NBR 36 + 37 + /* 18,19: dma2 and dma3 shared by par0, scsi0, ser2 and ata */ 38 + #define DMA2_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma2) 39 + #define DMA3_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma3) 40 + #define SER2_DMA_TX_IRQ_NBR DMA2_TX_IRQ_NBR 41 + #define SER2_DMA_RX_IRQ_NBR DMA3_RX_IRQ_NBR 42 + 43 + /* 20,21: dma4 and dma5 shared by par1, scsi1, ser3 and extdma0 */ 44 + #define DMA4_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma4) 45 + #define DMA5_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma5) 46 + #define SER3_DMA_TX_IRQ_NBR DMA4_TX_IRQ_NBR 47 + #define SER3_DMA_RX_IRQ_NBR DMA5_RX_IRQ_NBR 48 + 49 + /* 22,23: dma6 and dma7 shared by ser0, extdma1 and mem2mem */ 50 + #define DMA6_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma6) 51 + #define DMA7_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma7) 52 + #define SER0_DMA_TX_IRQ_NBR DMA6_TX_IRQ_NBR 53 + #define SER0_DMA_RX_IRQ_NBR DMA7_RX_IRQ_NBR 54 + #define MEM2MEM_DMA_TX_IRQ_NBR DMA6_TX_IRQ_NBR 55 + #define MEM2MEM_DMA_RX_IRQ_NBR DMA7_RX_IRQ_NBR 56 + 57 + /* 24,25: dma8 and dma9 shared by ser1 and usb */ 58 + #define DMA8_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma8) 59 + #define DMA9_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma9) 60 + #define SER1_DMA_TX_IRQ_NBR DMA8_TX_IRQ_NBR 61 + #define SER1_DMA_RX_IRQ_NBR DMA9_RX_IRQ_NBR 62 + #define USB_DMA_TX_IRQ_NBR DMA8_TX_IRQ_NBR 63 + #define USB_DMA_RX_IRQ_NBR DMA9_RX_IRQ_NBR 64 + 65 + /* usb: controller at irq 31 + uses DMA8 and DMA9 */ 66 + #define USB_HC_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, usb) 67 + 68 + /* our fine, global, etrax irq vector! the pointer lives in the head.S file. */ 69 + 70 + typedef void (*irqvectptr)(void); 71 + 72 + struct etrax_interrupt_vector { 73 + irqvectptr v[256]; 74 + }; 75 + 76 + extern struct etrax_interrupt_vector *etrax_irv; 77 + void set_int_vector(int n, irqvectptr addr); 78 + void set_break_vector(int n, irqvectptr addr); 79 + 80 + #define __STR(x) #x 81 + #define STR(x) __STR(x) 82 + 83 + /* SAVE_ALL saves registers so they match pt_regs */ 84 + 85 + #define SAVE_ALL \ 86 + "move $irp,[$sp=$sp-16]\n\t" /* push instruction pointer and fake SBFS struct */ \ 87 + "push $srp\n\t" /* push subroutine return pointer */ \ 88 + "push $dccr\n\t" /* push condition codes */ \ 89 + "push $mof\n\t" /* push multiply overflow reg */ \ 90 + "di\n\t" /* need to disable irq's at this point */\ 91 + "subq 14*4,$sp\n\t" /* make room for r0-r13 */ \ 92 + "movem $r13,[$sp]\n\t" /* push the r0-r13 registers */ \ 93 + "push $r10\n\t" /* push orig_r10 */ \ 94 + "clear.d [$sp=$sp-4]\n\t" /* frametype - this is a normal stackframe */ 95 + 96 + /* BLOCK_IRQ and UNBLOCK_IRQ do the same as mask_irq and unmask_irq */ 97 + 98 + #define BLOCK_IRQ(mask,nr) \ 99 + "move.d " #mask ",$r0\n\t" \ 100 + "move.d $r0,[0xb00000d8]\n\t" 101 + 102 + #define UNBLOCK_IRQ(mask) \ 103 + "move.d " #mask ",$r0\n\t" \ 104 + "move.d $r0,[0xb00000dc]\n\t" 105 + 106 + #define IRQ_NAME2(nr) nr##_interrupt(void) 107 + #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr) 108 + #define sIRQ_NAME(nr) IRQ_NAME2(sIRQ##nr) 109 + #define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr) 110 + 111 + /* the asm IRQ handler makes sure the causing IRQ is blocked, then it calls 112 + * do_IRQ (with irq disabled still). after that it unblocks and jumps to 113 + * ret_from_intr (entry.S) 114 + * 115 + * The reason the IRQ is blocked is to allow an sti() before the handler which 116 + * will acknowledge the interrupt is run. 117 + */ 118 + 119 + #define BUILD_IRQ(nr,mask) \ 120 + void IRQ_NAME(nr); \ 121 + __asm__ ( \ 122 + ".text\n\t" \ 123 + "IRQ" #nr "_interrupt:\n\t" \ 124 + SAVE_ALL \ 125 + BLOCK_IRQ(mask,nr) /* this must be done to prevent irq loops when we ei later */ \ 126 + "moveq "#nr",$r10\n\t" \ 127 + "move.d $sp,$r11\n\t" \ 128 + "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \ 129 + UNBLOCK_IRQ(mask) \ 130 + "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \ 131 + "jump ret_from_intr\n\t"); 132 + 133 + /* This is subtle. The timer interrupt is crucial and it should not be disabled for 134 + * too long. However, if it had been a normal interrupt as per BUILD_IRQ, it would 135 + * have been BLOCK'ed, and then softirq's are run before we return here to UNBLOCK. 136 + * If the softirq's take too much time to run, the timer irq won't run and the 137 + * watchdog will kill us. 138 + * 139 + * Furthermore, if a lot of other irq's occur before we return here, the multiple_irq 140 + * handler is run and it prioritizes the timer interrupt. However if we had BLOCK'ed 141 + * it here, we would not get the multiple_irq at all. 142 + * 143 + * The non-blocking here is based on the knowledge that the timer interrupt is 144 + * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not 145 + * be an sti() before the timer irq handler is run to acknowledge the interrupt. 146 + */ 147 + 148 + #define BUILD_TIMER_IRQ(nr,mask) \ 149 + void IRQ_NAME(nr); \ 150 + __asm__ ( \ 151 + ".text\n\t" \ 152 + "IRQ" #nr "_interrupt:\n\t" \ 153 + SAVE_ALL \ 154 + "moveq "#nr",$r10\n\t" \ 155 + "move.d $sp,$r11\n\t" \ 156 + "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \ 157 + "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \ 158 + "jump ret_from_intr\n\t"); 159 + 160 + #endif
+19
arch/cris/include/arch-v32/arch/cache.h
··· 1 + #ifndef _ASM_CRIS_ARCH_CACHE_H 2 + #define _ASM_CRIS_ARCH_CACHE_H 3 + 4 + #include <arch/hwregs/dma.h> 5 + 6 + /* A cache-line is 32 bytes. */ 7 + #define L1_CACHE_BYTES 32 8 + #define L1_CACHE_SHIFT 5 9 + 10 + void flush_dma_list(dma_descr_data *descr); 11 + void flush_dma_descr(dma_descr_data *descr, int flush_buf); 12 + 13 + #define flush_dma_context(c) \ 14 + flush_dma_list(phys_to_virt((c)->saved_data)); 15 + 16 + void cris_flush_cache_range(void *buf, unsigned long len); 17 + void cris_flush_cache(void); 18 + 19 + #endif /* _ASM_CRIS_ARCH_CACHE_H */
+272
arch/cris/include/arch-v32/arch/cryptocop.h
··· 1 + /* 2 + * The device /dev/cryptocop is accessible using this driver using 3 + * CRYPTOCOP_MAJOR (254) and minor number 0. 4 + */ 5 + 6 + #ifndef CRYPTOCOP_H 7 + #define CRYPTOCOP_H 8 + 9 + #include <linux/uio.h> 10 + 11 + 12 + #define CRYPTOCOP_SESSION_ID_NONE (0) 13 + 14 + typedef unsigned long long int cryptocop_session_id; 15 + 16 + /* cryptocop ioctls */ 17 + #define ETRAXCRYPTOCOP_IOCTYPE (250) 18 + 19 + #define CRYPTOCOP_IO_CREATE_SESSION _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 1, struct strcop_session_op) 20 + #define CRYPTOCOP_IO_CLOSE_SESSION _IOW(ETRAXCRYPTOCOP_IOCTYPE, 2, struct strcop_session_op) 21 + #define CRYPTOCOP_IO_PROCESS_OP _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 3, struct strcop_crypto_op) 22 + #define CRYPTOCOP_IO_MAXNR (3) 23 + 24 + typedef enum { 25 + cryptocop_cipher_des = 0, 26 + cryptocop_cipher_3des = 1, 27 + cryptocop_cipher_aes = 2, 28 + cryptocop_cipher_m2m = 3, /* mem2mem is essentially a NULL cipher with blocklength=1 */ 29 + cryptocop_cipher_none 30 + } cryptocop_cipher_type; 31 + 32 + typedef enum { 33 + cryptocop_digest_sha1 = 0, 34 + cryptocop_digest_md5 = 1, 35 + cryptocop_digest_none 36 + } cryptocop_digest_type; 37 + 38 + typedef enum { 39 + cryptocop_csum_le = 0, 40 + cryptocop_csum_be = 1, 41 + cryptocop_csum_none 42 + } cryptocop_csum_type; 43 + 44 + typedef enum { 45 + cryptocop_cipher_mode_ecb = 0, 46 + cryptocop_cipher_mode_cbc, 47 + cryptocop_cipher_mode_none 48 + } cryptocop_cipher_mode; 49 + 50 + typedef enum { 51 + cryptocop_3des_eee = 0, 52 + cryptocop_3des_eed = 1, 53 + cryptocop_3des_ede = 2, 54 + cryptocop_3des_edd = 3, 55 + cryptocop_3des_dee = 4, 56 + cryptocop_3des_ded = 5, 57 + cryptocop_3des_dde = 6, 58 + cryptocop_3des_ddd = 7 59 + } cryptocop_3des_mode; 60 + 61 + /* Usermode accessible (ioctl) operations. */ 62 + struct strcop_session_op{ 63 + cryptocop_session_id ses_id; 64 + 65 + cryptocop_cipher_type cipher; /* AES, DES, 3DES, m2m, none */ 66 + 67 + cryptocop_cipher_mode cmode; /* ECB, CBC, none */ 68 + cryptocop_3des_mode des3_mode; 69 + 70 + cryptocop_digest_type digest; /* MD5, SHA1, none */ 71 + 72 + cryptocop_csum_type csum; /* BE, LE, none */ 73 + 74 + unsigned char *key; 75 + size_t keylen; 76 + }; 77 + 78 + #define CRYPTOCOP_CSUM_LENGTH (2) 79 + #define CRYPTOCOP_MAX_DIGEST_LENGTH (20) /* SHA-1 20, MD5 16 */ 80 + #define CRYPTOCOP_MAX_IV_LENGTH (16) /* (3)DES==8, AES == 16 */ 81 + #define CRYPTOCOP_MAX_KEY_LENGTH (32) 82 + 83 + struct strcop_crypto_op{ 84 + cryptocop_session_id ses_id; 85 + 86 + /* Indata. */ 87 + unsigned char *indata; 88 + size_t inlen; /* Total indata length. */ 89 + 90 + /* Cipher configuration. */ 91 + unsigned char do_cipher:1; 92 + unsigned char decrypt:1; /* 1 == decrypt, 0 == encrypt */ 93 + unsigned char cipher_explicit:1; 94 + size_t cipher_start; 95 + size_t cipher_len; 96 + /* cipher_iv is used if do_cipher and cipher_explicit and the cipher 97 + mode is CBC. The length is controlled by the type of cipher, 98 + e.g. DES/3DES 8 octets and AES 16 octets. */ 99 + unsigned char cipher_iv[CRYPTOCOP_MAX_IV_LENGTH]; 100 + /* Outdata. */ 101 + unsigned char *cipher_outdata; 102 + size_t cipher_outlen; 103 + 104 + /* digest configuration. */ 105 + unsigned char do_digest:1; 106 + size_t digest_start; 107 + size_t digest_len; 108 + /* Outdata. The actual length is determined by the type of the digest. */ 109 + unsigned char digest[CRYPTOCOP_MAX_DIGEST_LENGTH]; 110 + 111 + /* Checksum configuration. */ 112 + unsigned char do_csum:1; 113 + size_t csum_start; 114 + size_t csum_len; 115 + /* Outdata. */ 116 + unsigned char csum[CRYPTOCOP_CSUM_LENGTH]; 117 + }; 118 + 119 + 120 + 121 + #ifdef __KERNEL__ 122 + 123 + /********** The API to use from inside the kernel. ************/ 124 + 125 + #include <arch/hwregs/dma.h> 126 + 127 + typedef enum { 128 + cryptocop_alg_csum = 0, 129 + cryptocop_alg_mem2mem, 130 + cryptocop_alg_md5, 131 + cryptocop_alg_sha1, 132 + cryptocop_alg_des, 133 + cryptocop_alg_3des, 134 + cryptocop_alg_aes, 135 + cryptocop_no_alg, 136 + } cryptocop_algorithm; 137 + 138 + typedef u8 cryptocop_tfrm_id; 139 + 140 + 141 + struct cryptocop_operation; 142 + 143 + typedef void (cryptocop_callback)(struct cryptocop_operation*, void*); 144 + 145 + struct cryptocop_transform_init { 146 + cryptocop_algorithm alg; 147 + /* Keydata for ciphers. */ 148 + unsigned char key[CRYPTOCOP_MAX_KEY_LENGTH]; 149 + unsigned int keylen; 150 + cryptocop_cipher_mode cipher_mode; 151 + cryptocop_3des_mode tdes_mode; 152 + cryptocop_csum_type csum_mode; /* cryptocop_csum_none is not allowed when alg==cryptocop_alg_csum */ 153 + 154 + cryptocop_tfrm_id tid; /* Locally unique in session; assigned by user, checked by driver. */ 155 + struct cryptocop_transform_init *next; 156 + }; 157 + 158 + 159 + typedef enum { 160 + cryptocop_source_dma = 0, 161 + cryptocop_source_des, 162 + cryptocop_source_3des, 163 + cryptocop_source_aes, 164 + cryptocop_source_md5, 165 + cryptocop_source_sha1, 166 + cryptocop_source_csum, 167 + cryptocop_source_none, 168 + } cryptocop_source; 169 + 170 + 171 + struct cryptocop_desc_cfg { 172 + cryptocop_tfrm_id tid; 173 + cryptocop_source src; 174 + unsigned int last:1; /* Last use of this transform in the operation. Will push outdata when encountered. */ 175 + struct cryptocop_desc_cfg *next; 176 + }; 177 + 178 + struct cryptocop_desc { 179 + size_t length; 180 + struct cryptocop_desc_cfg *cfg; 181 + struct cryptocop_desc *next; 182 + }; 183 + 184 + 185 + /* Flags for cryptocop_tfrm_cfg */ 186 + #define CRYPTOCOP_NO_FLAG (0x00) 187 + #define CRYPTOCOP_ENCRYPT (0x01) 188 + #define CRYPTOCOP_DECRYPT (0x02) 189 + #define CRYPTOCOP_EXPLICIT_IV (0x04) 190 + 191 + struct cryptocop_tfrm_cfg { 192 + cryptocop_tfrm_id tid; 193 + 194 + unsigned int flags; /* DECRYPT, ENCRYPT, EXPLICIT_IV */ 195 + 196 + /* CBC initialisation vector for cihers. */ 197 + u8 iv[CRYPTOCOP_MAX_IV_LENGTH]; 198 + 199 + /* The position in output where to write the transform output. The order 200 + in which the driver writes the output is unspecified, hence if several 201 + transforms write on the same positions in the output the result is 202 + unspecified. */ 203 + size_t inject_ix; 204 + 205 + struct cryptocop_tfrm_cfg *next; 206 + }; 207 + 208 + 209 + 210 + struct cryptocop_dma_list_operation{ 211 + /* The consumer can provide DMA lists to send to the co-processor. 'use_dmalists' in 212 + struct cryptocop_operation must be set for the driver to use them. outlist, 213 + out_data_buf, inlist and in_data_buf must all be physical addresses since they will 214 + be loaded to DMA . */ 215 + dma_descr_data *outlist; /* Out from memory to the co-processor. */ 216 + char *out_data_buf; 217 + dma_descr_data *inlist; /* In from the co-processor to memory. */ 218 + char *in_data_buf; 219 + 220 + cryptocop_3des_mode tdes_mode; 221 + cryptocop_csum_type csum_mode; 222 + }; 223 + 224 + 225 + struct cryptocop_tfrm_operation{ 226 + /* Operation configuration, if not 'use_dmalists' is set. */ 227 + struct cryptocop_tfrm_cfg *tfrm_cfg; 228 + struct cryptocop_desc *desc; 229 + 230 + struct iovec *indata; 231 + size_t incount; 232 + size_t inlen; /* Total inlength. */ 233 + 234 + struct iovec *outdata; 235 + size_t outcount; 236 + size_t outlen; /* Total outlength. */ 237 + }; 238 + 239 + 240 + struct cryptocop_operation { 241 + cryptocop_callback *cb; 242 + void *cb_data; 243 + 244 + cryptocop_session_id sid; 245 + 246 + /* The status of the operation when returned to consumer. */ 247 + int operation_status; /* 0, -EAGAIN */ 248 + 249 + /* Flags */ 250 + unsigned int use_dmalists:1; /* Use outlist and inlist instead of the desc/tfrm_cfg configuration. */ 251 + unsigned int in_interrupt:1; /* Set if inserting job from interrupt context. */ 252 + unsigned int fast_callback:1; /* Set if fast callback wanted, i.e. from interrupt context. */ 253 + 254 + union{ 255 + struct cryptocop_dma_list_operation list_op; 256 + struct cryptocop_tfrm_operation tfrm_op; 257 + }; 258 + }; 259 + 260 + 261 + int cryptocop_new_session(cryptocop_session_id *sid, struct cryptocop_transform_init *tinit, int alloc_flag); 262 + int cryptocop_free_session(cryptocop_session_id sid); 263 + 264 + int cryptocop_job_queue_insert_csum(struct cryptocop_operation *operation); 265 + 266 + int cryptocop_job_queue_insert_crypto(struct cryptocop_operation *operation); 267 + 268 + int cryptocop_job_queue_insert_user_job(struct cryptocop_operation *operation); 269 + 270 + #endif /* __KERNEL__ */ 271 + 272 + #endif /* CRYPTOCOP_H */
+136
arch/cris/include/arch-v32/arch/io.h
··· 1 + #ifndef _ASM_ARCH_CRIS_IO_H 2 + #define _ASM_ARCH_CRIS_IO_H 3 + 4 + #include <linux/spinlock.h> 5 + #include <hwregs/reg_map.h> 6 + #include <hwregs/reg_rdwr.h> 7 + #include <hwregs/gio_defs.h> 8 + 9 + enum crisv32_io_dir 10 + { 11 + crisv32_io_dir_in = 0, 12 + crisv32_io_dir_out = 1 13 + }; 14 + 15 + struct crisv32_ioport 16 + { 17 + volatile unsigned long *oe; 18 + volatile unsigned long *data; 19 + volatile unsigned long *data_in; 20 + unsigned int pin_count; 21 + spinlock_t lock; 22 + }; 23 + 24 + struct crisv32_iopin 25 + { 26 + struct crisv32_ioport* port; 27 + int bit; 28 + }; 29 + 30 + extern struct crisv32_ioport crisv32_ioports[]; 31 + 32 + extern struct crisv32_iopin crisv32_led1_green; 33 + extern struct crisv32_iopin crisv32_led1_red; 34 + extern struct crisv32_iopin crisv32_led2_green; 35 + extern struct crisv32_iopin crisv32_led2_red; 36 + extern struct crisv32_iopin crisv32_led3_green; 37 + extern struct crisv32_iopin crisv32_led3_red; 38 + 39 + extern struct crisv32_iopin crisv32_led_net0_green; 40 + extern struct crisv32_iopin crisv32_led_net0_red; 41 + extern struct crisv32_iopin crisv32_led_net1_green; 42 + extern struct crisv32_iopin crisv32_led_net1_red; 43 + 44 + static inline void crisv32_io_set(struct crisv32_iopin *iopin, int val) 45 + { 46 + unsigned long flags; 47 + spin_lock_irqsave(&iopin->port->lock, flags); 48 + 49 + if (val) 50 + *iopin->port->data |= iopin->bit; 51 + else 52 + *iopin->port->data &= ~iopin->bit; 53 + 54 + spin_unlock_irqrestore(&iopin->port->lock, flags); 55 + } 56 + 57 + static inline void crisv32_io_set_dir(struct crisv32_iopin* iopin, 58 + enum crisv32_io_dir dir) 59 + { 60 + unsigned long flags; 61 + spin_lock_irqsave(&iopin->port->lock, flags); 62 + 63 + if (dir == crisv32_io_dir_in) 64 + *iopin->port->oe &= ~iopin->bit; 65 + else 66 + *iopin->port->oe |= iopin->bit; 67 + 68 + spin_unlock_irqrestore(&iopin->port->lock, flags); 69 + } 70 + 71 + static inline int crisv32_io_rd(struct crisv32_iopin* iopin) 72 + { 73 + return ((*iopin->port->data_in & iopin->bit) ? 1 : 0); 74 + } 75 + 76 + int crisv32_io_get(struct crisv32_iopin* iopin, 77 + unsigned int port, unsigned int pin); 78 + int crisv32_io_get_name(struct crisv32_iopin* iopin, 79 + const char *name); 80 + 81 + #define CRIS_LED_OFF 0x00 82 + #define CRIS_LED_GREEN 0x01 83 + #define CRIS_LED_RED 0x02 84 + #define CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_LED_RED) 85 + 86 + #if (defined(CONFIG_ETRAX_NBR_LED_GRP_ONE) || defined(CONFIG_ETRAX_NBR_LED_GRP_TWO)) 87 + #define CRIS_LED_NETWORK_GRP0_SET(x) \ 88 + do { \ 89 + CRIS_LED_NETWORK_GRP0_SET_G((x) & CRIS_LED_GREEN); \ 90 + CRIS_LED_NETWORK_GRP0_SET_R((x) & CRIS_LED_RED); \ 91 + } while (0) 92 + #else 93 + #define CRIS_LED_NETWORK_GRP0_SET(x) while (0) {} 94 + #endif 95 + 96 + #define CRIS_LED_NETWORK_GRP0_SET_G(x) \ 97 + crisv32_io_set(&crisv32_led_net0_green, !(x)); 98 + 99 + #define CRIS_LED_NETWORK_GRP0_SET_R(x) \ 100 + crisv32_io_set(&crisv32_led_net0_red, !(x)); 101 + 102 + #if defined(CONFIG_ETRAX_NBR_LED_GRP_TWO) 103 + #define CRIS_LED_NETWORK_GRP1_SET(x) \ 104 + do { \ 105 + CRIS_LED_NETWORK_GRP1_SET_G((x) & CRIS_LED_GREEN); \ 106 + CRIS_LED_NETWORK_GRP1_SET_R((x) & CRIS_LED_RED); \ 107 + } while (0) 108 + #else 109 + #define CRIS_LED_NETWORK_GRP1_SET(x) while (0) {} 110 + #endif 111 + 112 + #define CRIS_LED_NETWORK_GRP1_SET_G(x) \ 113 + crisv32_io_set(&crisv32_led_net1_green, !(x)); 114 + 115 + #define CRIS_LED_NETWORK_GRP1_SET_R(x) \ 116 + crisv32_io_set(&crisv32_led_net1_red, !(x)); 117 + 118 + #define CRIS_LED_ACTIVE_SET(x) \ 119 + do { \ 120 + CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \ 121 + CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \ 122 + } while (0) 123 + 124 + #define CRIS_LED_ACTIVE_SET_G(x) \ 125 + crisv32_io_set(&crisv32_led2_green, !(x)); 126 + #define CRIS_LED_ACTIVE_SET_R(x) \ 127 + crisv32_io_set(&crisv32_led2_red, !(x)); 128 + #define CRIS_LED_DISK_WRITE(x) \ 129 + do{\ 130 + crisv32_io_set(&crisv32_led3_green, !(x)); \ 131 + crisv32_io_set(&crisv32_led3_red, !(x)); \ 132 + }while(0) 133 + #define CRIS_LED_DISK_READ(x) \ 134 + crisv32_io_set(&crisv32_led3_green, !(x)); 135 + 136 + #endif
+164
arch/cris/include/asm/atomic.h
··· 1 + /* $Id: atomic.h,v 1.3 2001/07/25 16:15:19 bjornw Exp $ */ 2 + 3 + #ifndef __ASM_CRIS_ATOMIC__ 4 + #define __ASM_CRIS_ATOMIC__ 5 + 6 + #include <linux/compiler.h> 7 + 8 + #include <asm/system.h> 9 + #include <arch/atomic.h> 10 + 11 + /* 12 + * Atomic operations that C can't guarantee us. Useful for 13 + * resource counting etc.. 14 + */ 15 + 16 + typedef struct { volatile int counter; } atomic_t; 17 + 18 + #define ATOMIC_INIT(i) { (i) } 19 + 20 + #define atomic_read(v) ((v)->counter) 21 + #define atomic_set(v,i) (((v)->counter) = (i)) 22 + 23 + /* These should be written in asm but we do it in C for now. */ 24 + 25 + static inline void atomic_add(int i, volatile atomic_t *v) 26 + { 27 + unsigned long flags; 28 + cris_atomic_save(v, flags); 29 + v->counter += i; 30 + cris_atomic_restore(v, flags); 31 + } 32 + 33 + static inline void atomic_sub(int i, volatile atomic_t *v) 34 + { 35 + unsigned long flags; 36 + cris_atomic_save(v, flags); 37 + v->counter -= i; 38 + cris_atomic_restore(v, flags); 39 + } 40 + 41 + static inline int atomic_add_return(int i, volatile atomic_t *v) 42 + { 43 + unsigned long flags; 44 + int retval; 45 + cris_atomic_save(v, flags); 46 + retval = (v->counter += i); 47 + cris_atomic_restore(v, flags); 48 + return retval; 49 + } 50 + 51 + #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) 52 + 53 + static inline int atomic_sub_return(int i, volatile atomic_t *v) 54 + { 55 + unsigned long flags; 56 + int retval; 57 + cris_atomic_save(v, flags); 58 + retval = (v->counter -= i); 59 + cris_atomic_restore(v, flags); 60 + return retval; 61 + } 62 + 63 + static inline int atomic_sub_and_test(int i, volatile atomic_t *v) 64 + { 65 + int retval; 66 + unsigned long flags; 67 + cris_atomic_save(v, flags); 68 + retval = (v->counter -= i) == 0; 69 + cris_atomic_restore(v, flags); 70 + return retval; 71 + } 72 + 73 + static inline void atomic_inc(volatile atomic_t *v) 74 + { 75 + unsigned long flags; 76 + cris_atomic_save(v, flags); 77 + (v->counter)++; 78 + cris_atomic_restore(v, flags); 79 + } 80 + 81 + static inline void atomic_dec(volatile atomic_t *v) 82 + { 83 + unsigned long flags; 84 + cris_atomic_save(v, flags); 85 + (v->counter)--; 86 + cris_atomic_restore(v, flags); 87 + } 88 + 89 + static inline int atomic_inc_return(volatile atomic_t *v) 90 + { 91 + unsigned long flags; 92 + int retval; 93 + cris_atomic_save(v, flags); 94 + retval = ++(v->counter); 95 + cris_atomic_restore(v, flags); 96 + return retval; 97 + } 98 + 99 + static inline int atomic_dec_return(volatile atomic_t *v) 100 + { 101 + unsigned long flags; 102 + int retval; 103 + cris_atomic_save(v, flags); 104 + retval = --(v->counter); 105 + cris_atomic_restore(v, flags); 106 + return retval; 107 + } 108 + static inline int atomic_dec_and_test(volatile atomic_t *v) 109 + { 110 + int retval; 111 + unsigned long flags; 112 + cris_atomic_save(v, flags); 113 + retval = --(v->counter) == 0; 114 + cris_atomic_restore(v, flags); 115 + return retval; 116 + } 117 + 118 + static inline int atomic_inc_and_test(volatile atomic_t *v) 119 + { 120 + int retval; 121 + unsigned long flags; 122 + cris_atomic_save(v, flags); 123 + retval = ++(v->counter) == 0; 124 + cris_atomic_restore(v, flags); 125 + return retval; 126 + } 127 + 128 + static inline int atomic_cmpxchg(atomic_t *v, int old, int new) 129 + { 130 + int ret; 131 + unsigned long flags; 132 + 133 + cris_atomic_save(v, flags); 134 + ret = v->counter; 135 + if (likely(ret == old)) 136 + v->counter = new; 137 + cris_atomic_restore(v, flags); 138 + return ret; 139 + } 140 + 141 + #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 142 + 143 + static inline int atomic_add_unless(atomic_t *v, int a, int u) 144 + { 145 + int ret; 146 + unsigned long flags; 147 + 148 + cris_atomic_save(v, flags); 149 + ret = v->counter; 150 + if (ret != u) 151 + v->counter += a; 152 + cris_atomic_restore(v, flags); 153 + return ret != u; 154 + } 155 + #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 156 + 157 + /* Atomic operations are already serializing */ 158 + #define smp_mb__before_atomic_dec() barrier() 159 + #define smp_mb__after_atomic_dec() barrier() 160 + #define smp_mb__before_atomic_inc() barrier() 161 + #define smp_mb__after_atomic_inc() barrier() 162 + 163 + #include <asm-generic/atomic.h> 164 + #endif
+166
arch/cris/include/asm/bitops.h
··· 1 + /* asm/bitops.h for Linux/CRIS 2 + * 3 + * TODO: asm versions if speed is needed 4 + * 5 + * All bit operations return 0 if the bit was cleared before the 6 + * operation and != 0 if it was not. 7 + * 8 + * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). 9 + */ 10 + 11 + #ifndef _CRIS_BITOPS_H 12 + #define _CRIS_BITOPS_H 13 + 14 + /* Currently this is unsuitable for consumption outside the kernel. */ 15 + #ifdef __KERNEL__ 16 + 17 + #ifndef _LINUX_BITOPS_H 18 + #error only <linux/bitops.h> can be included directly 19 + #endif 20 + 21 + #include <arch/bitops.h> 22 + #include <asm/system.h> 23 + #include <asm/atomic.h> 24 + #include <linux/compiler.h> 25 + 26 + /* 27 + * set_bit - Atomically set a bit in memory 28 + * @nr: the bit to set 29 + * @addr: the address to start counting from 30 + * 31 + * This function is atomic and may not be reordered. See __set_bit() 32 + * if you do not require the atomic guarantees. 33 + * Note that @nr may be almost arbitrarily large; this function is not 34 + * restricted to acting on a single-word quantity. 35 + */ 36 + 37 + #define set_bit(nr, addr) (void)test_and_set_bit(nr, addr) 38 + 39 + /* 40 + * clear_bit - Clears a bit in memory 41 + * @nr: Bit to clear 42 + * @addr: Address to start counting from 43 + * 44 + * clear_bit() is atomic and may not be reordered. However, it does 45 + * not contain a memory barrier, so if it is used for locking purposes, 46 + * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() 47 + * in order to ensure changes are visible on other processors. 48 + */ 49 + 50 + #define clear_bit(nr, addr) (void)test_and_clear_bit(nr, addr) 51 + 52 + /* 53 + * change_bit - Toggle a bit in memory 54 + * @nr: Bit to change 55 + * @addr: Address to start counting from 56 + * 57 + * change_bit() is atomic and may not be reordered. 58 + * Note that @nr may be almost arbitrarily large; this function is not 59 + * restricted to acting on a single-word quantity. 60 + */ 61 + 62 + #define change_bit(nr, addr) (void)test_and_change_bit(nr, addr) 63 + 64 + /** 65 + * test_and_set_bit - Set a bit and return its old value 66 + * @nr: Bit to set 67 + * @addr: Address to count from 68 + * 69 + * This operation is atomic and cannot be reordered. 70 + * It also implies a memory barrier. 71 + */ 72 + 73 + static inline int test_and_set_bit(int nr, volatile unsigned long *addr) 74 + { 75 + unsigned int mask, retval; 76 + unsigned long flags; 77 + unsigned int *adr = (unsigned int *)addr; 78 + 79 + adr += nr >> 5; 80 + mask = 1 << (nr & 0x1f); 81 + cris_atomic_save(addr, flags); 82 + retval = (mask & *adr) != 0; 83 + *adr |= mask; 84 + cris_atomic_restore(addr, flags); 85 + return retval; 86 + } 87 + 88 + /* 89 + * clear_bit() doesn't provide any barrier for the compiler. 90 + */ 91 + #define smp_mb__before_clear_bit() barrier() 92 + #define smp_mb__after_clear_bit() barrier() 93 + 94 + /** 95 + * test_and_clear_bit - Clear a bit and return its old value 96 + * @nr: Bit to clear 97 + * @addr: Address to count from 98 + * 99 + * This operation is atomic and cannot be reordered. 100 + * It also implies a memory barrier. 101 + */ 102 + 103 + static inline int test_and_clear_bit(int nr, volatile unsigned long *addr) 104 + { 105 + unsigned int mask, retval; 106 + unsigned long flags; 107 + unsigned int *adr = (unsigned int *)addr; 108 + 109 + adr += nr >> 5; 110 + mask = 1 << (nr & 0x1f); 111 + cris_atomic_save(addr, flags); 112 + retval = (mask & *adr) != 0; 113 + *adr &= ~mask; 114 + cris_atomic_restore(addr, flags); 115 + return retval; 116 + } 117 + 118 + /** 119 + * test_and_change_bit - Change a bit and return its old value 120 + * @nr: Bit to change 121 + * @addr: Address to count from 122 + * 123 + * This operation is atomic and cannot be reordered. 124 + * It also implies a memory barrier. 125 + */ 126 + 127 + static inline int test_and_change_bit(int nr, volatile unsigned long *addr) 128 + { 129 + unsigned int mask, retval; 130 + unsigned long flags; 131 + unsigned int *adr = (unsigned int *)addr; 132 + adr += nr >> 5; 133 + mask = 1 << (nr & 0x1f); 134 + cris_atomic_save(addr, flags); 135 + retval = (mask & *adr) != 0; 136 + *adr ^= mask; 137 + cris_atomic_restore(addr, flags); 138 + return retval; 139 + } 140 + 141 + #include <asm-generic/bitops/non-atomic.h> 142 + 143 + /* 144 + * Since we define it "external", it collides with the built-in 145 + * definition, which doesn't have the same semantics. We don't want to 146 + * use -fno-builtin, so just hide the name ffs. 147 + */ 148 + #define ffs kernel_ffs 149 + 150 + #include <asm-generic/bitops/fls.h> 151 + #include <asm-generic/bitops/fls64.h> 152 + #include <asm-generic/bitops/hweight.h> 153 + #include <asm-generic/bitops/find.h> 154 + #include <asm-generic/bitops/lock.h> 155 + 156 + #include <asm-generic/bitops/ext2-non-atomic.h> 157 + 158 + #define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a) 159 + #define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a) 160 + 161 + #include <asm-generic/bitops/minix.h> 162 + #include <asm-generic/bitops/sched.h> 163 + 164 + #endif /* __KERNEL__ */ 165 + 166 + #endif /* _CRIS_BITOPS_H */
+4
arch/cris/include/asm/bug.h
··· 1 + #ifndef _CRIS_BUG_H 2 + #define _CRIS_BUG_H 3 + #include <arch/bug.h> 4 + #endif
+27
arch/cris/include/asm/byteorder.h
··· 1 + #ifndef _CRIS_BYTEORDER_H 2 + #define _CRIS_BYTEORDER_H 3 + 4 + #ifdef __GNUC__ 5 + 6 + #ifdef __KERNEL__ 7 + #include <arch/byteorder.h> 8 + 9 + /* defines are necessary because the other files detect the presence 10 + * of a defined __arch_swab32, not an inline 11 + */ 12 + #define __arch__swab32(x) ___arch__swab32(x) 13 + #define __arch__swab16(x) ___arch__swab16(x) 14 + #endif /* __KERNEL__ */ 15 + 16 + #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 17 + # define __BYTEORDER_HAS_U64__ 18 + # define __SWAB_64_THRU_32__ 19 + #endif 20 + 21 + #endif /* __GNUC__ */ 22 + 23 + #include <linux/byteorder/little_endian.h> 24 + 25 + #endif 26 + 27 +
+6
arch/cris/include/asm/cache.h
··· 1 + #ifndef _ASM_CACHE_H 2 + #define _ASM_CACHE_H 3 + 4 + #include <arch/cache.h> 5 + 6 + #endif /* _ASM_CACHE_H */
+83
arch/cris/include/asm/checksum.h
··· 1 + /* TODO: csum_tcpudp_magic could be speeded up, and csum_fold as well */ 2 + 3 + #ifndef _CRIS_CHECKSUM_H 4 + #define _CRIS_CHECKSUM_H 5 + 6 + #include <arch/checksum.h> 7 + 8 + /* 9 + * computes the checksum of a memory block at buff, length len, 10 + * and adds in "sum" (32-bit) 11 + * 12 + * returns a 32-bit number suitable for feeding into itself 13 + * or csum_tcpudp_magic 14 + * 15 + * this function must be called with even lengths, except 16 + * for the last fragment, which may be odd 17 + * 18 + * it's best to have buff aligned on a 32-bit boundary 19 + */ 20 + __wsum csum_partial(const void *buff, int len, __wsum sum); 21 + 22 + /* 23 + * the same as csum_partial, but copies from src while it 24 + * checksums 25 + * 26 + * here even more important to align src and dst on a 32-bit (or even 27 + * better 64-bit) boundary 28 + */ 29 + 30 + __wsum csum_partial_copy_nocheck(const void *src, void *dst, 31 + int len, __wsum sum); 32 + 33 + /* 34 + * Fold a partial checksum into a word 35 + */ 36 + 37 + static inline __sum16 csum_fold(__wsum csum) 38 + { 39 + u32 sum = (__force u32)csum; 40 + sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ 41 + sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ 42 + return (__force __sum16)~sum; 43 + } 44 + 45 + extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, 46 + int len, __wsum sum, 47 + int *errptr); 48 + 49 + /* 50 + * This is a version of ip_compute_csum() optimized for IP headers, 51 + * which always checksum on 4 octet boundaries. 52 + * 53 + */ 54 + 55 + static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) 56 + { 57 + return csum_fold(csum_partial(iph, ihl * 4, 0)); 58 + } 59 + 60 + /* 61 + * computes the checksum of the TCP/UDP pseudo-header 62 + * returns a 16-bit checksum, already complemented 63 + */ 64 + 65 + static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, 66 + unsigned short len, 67 + unsigned short proto, 68 + __wsum sum) 69 + { 70 + return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); 71 + } 72 + 73 + /* 74 + * this routine is used for miscellaneous IP-like checksums, mainly 75 + * in icmp.c 76 + */ 77 + 78 + static inline __sum16 ip_compute_csum(const void *buff, int len) 79 + { 80 + return csum_fold (csum_partial(buff, len, 0)); 81 + } 82 + 83 + #endif
+27
arch/cris/include/asm/delay.h
··· 1 + #ifndef _CRIS_DELAY_H 2 + #define _CRIS_DELAY_H 3 + 4 + /* 5 + * Copyright (C) 1998-2002 Axis Communications AB 6 + * 7 + * Delay routines, using a pre-computed "loops_per_second" value. 8 + */ 9 + 10 + #include <arch/delay.h> 11 + 12 + /* Use only for very small delays ( < 1 msec). */ 13 + 14 + extern unsigned long loops_per_usec; /* arch/cris/mm/init.c */ 15 + 16 + /* May be defined by arch/delay.h. */ 17 + #ifndef udelay 18 + static inline void udelay(unsigned long usecs) 19 + { 20 + __delay(usecs * loops_per_usec); 21 + } 22 + #endif 23 + 24 + #endif /* defined(_CRIS_DELAY_H) */ 25 + 26 + 27 +
+21
arch/cris/include/asm/dma.h
··· 1 + /* $Id: dma.h,v 1.2 2001/05/09 12:17:42 johana Exp $ */ 2 + 3 + #ifndef _ASM_DMA_H 4 + #define _ASM_DMA_H 5 + 6 + #include <arch/dma.h> 7 + 8 + /* it's useless on the Etrax, but unfortunately needed by the new 9 + bootmem allocator (but this should do it for this) */ 10 + 11 + #define MAX_DMA_ADDRESS PAGE_OFFSET 12 + 13 + /* From PCI */ 14 + 15 + #ifdef CONFIG_PCI 16 + extern int isa_dma_bridge_buggy; 17 + #else 18 + #define isa_dma_bridge_buggy (0) 19 + #endif 20 + 21 + #endif /* _ASM_DMA_H */
+93
arch/cris/include/asm/elf.h
··· 1 + #ifndef __ASMCRIS_ELF_H 2 + #define __ASMCRIS_ELF_H 3 + 4 + /* 5 + * ELF register definitions.. 6 + */ 7 + 8 + #include <asm/user.h> 9 + 10 + #define R_CRIS_NONE 0 11 + #define R_CRIS_8 1 12 + #define R_CRIS_16 2 13 + #define R_CRIS_32 3 14 + #define R_CRIS_8_PCREL 4 15 + #define R_CRIS_16_PCREL 5 16 + #define R_CRIS_32_PCREL 6 17 + #define R_CRIS_GNU_VTINHERIT 7 18 + #define R_CRIS_GNU_VTENTRY 8 19 + #define R_CRIS_COPY 9 20 + #define R_CRIS_GLOB_DAT 10 21 + #define R_CRIS_JUMP_SLOT 11 22 + #define R_CRIS_RELATIVE 12 23 + #define R_CRIS_16_GOT 13 24 + #define R_CRIS_32_GOT 14 25 + #define R_CRIS_16_GOTPLT 15 26 + #define R_CRIS_32_GOTPLT 16 27 + #define R_CRIS_32_GOTREL 17 28 + #define R_CRIS_32_PLT_GOTREL 18 29 + #define R_CRIS_32_PLT_PCREL 19 30 + 31 + typedef unsigned long elf_greg_t; 32 + 33 + /* Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is 34 + thus exposed to user-space. */ 35 + #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) 36 + typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 37 + 38 + /* A placeholder; CRIS does not have any fp regs. */ 39 + typedef unsigned long elf_fpregset_t; 40 + 41 + /* 42 + * These are used to set parameters in the core dumps. 43 + */ 44 + #define ELF_CLASS ELFCLASS32 45 + #define ELF_DATA ELFDATA2LSB 46 + #define ELF_ARCH EM_CRIS 47 + 48 + #include <arch/elf.h> 49 + 50 + /* The master for these definitions is {binutils}/include/elf/cris.h: */ 51 + /* User symbols in this file have a leading underscore. */ 52 + #define EF_CRIS_UNDERSCORE 0x00000001 53 + 54 + /* This is a mask for different incompatible machine variants. */ 55 + #define EF_CRIS_VARIANT_MASK 0x0000000e 56 + 57 + /* Variant 0; may contain v0..10 object. */ 58 + #define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000 59 + 60 + /* Variant 1; contains v32 object. */ 61 + #define EF_CRIS_VARIANT_V32 0x00000002 62 + 63 + /* Variant 2; contains object compatible with v32 and v10. */ 64 + #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 65 + /* End of excerpt from {binutils}/include/elf/cris.h. */ 66 + 67 + #define USE_ELF_CORE_DUMP 68 + 69 + #define ELF_EXEC_PAGESIZE 8192 70 + 71 + /* This is the location that an ET_DYN program is loaded if exec'ed. Typical 72 + use of this is to invoke "./ld.so someprog" to test out a new version of 73 + the loader. We need to make sure that it is out of the way of the program 74 + that it will "exec", and that there is sufficient room for the brk. */ 75 + 76 + #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) 77 + 78 + /* This yields a mask that user programs can use to figure out what 79 + instruction set this CPU supports. This could be done in user space, 80 + but it's not easy, and we've already done it here. */ 81 + 82 + #define ELF_HWCAP (0) 83 + 84 + /* This yields a string that ld.so will use to load implementation 85 + specific libraries for optimization. This is more specific in 86 + intent than poking at uname or /proc/cpuinfo. 87 + */ 88 + 89 + #define ELF_PLATFORM (NULL) 90 + 91 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 92 + 93 + #endif
+154
arch/cris/include/asm/io.h
··· 1 + #ifndef _ASM_CRIS_IO_H 2 + #define _ASM_CRIS_IO_H 3 + 4 + #include <asm/page.h> /* for __va, __pa */ 5 + #include <arch/io.h> 6 + #include <linux/kernel.h> 7 + 8 + struct cris_io_operations 9 + { 10 + u32 (*read_mem)(void *addr, int size); 11 + void (*write_mem)(u32 val, int size, void *addr); 12 + u32 (*read_io)(u32 port, void *addr, int size, int count); 13 + void (*write_io)(u32 port, void *addr, int size, int count); 14 + }; 15 + 16 + #ifdef CONFIG_PCI 17 + extern struct cris_io_operations *cris_iops; 18 + #else 19 + #define cris_iops ((struct cris_io_operations*)NULL) 20 + #endif 21 + 22 + /* 23 + * Change virtual addresses to physical addresses and vv. 24 + */ 25 + 26 + static inline unsigned long virt_to_phys(volatile void * address) 27 + { 28 + return __pa(address); 29 + } 30 + 31 + static inline void * phys_to_virt(unsigned long address) 32 + { 33 + return __va(address); 34 + } 35 + 36 + extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); 37 + extern void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgprot_t prot); 38 + 39 + static inline void __iomem * ioremap (unsigned long offset, unsigned long size) 40 + { 41 + return __ioremap(offset, size, 0); 42 + } 43 + 44 + extern void iounmap(volatile void * __iomem addr); 45 + 46 + extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size); 47 + 48 + /* 49 + * IO bus memory addresses are also 1:1 with the physical address 50 + */ 51 + #define virt_to_bus virt_to_phys 52 + #define bus_to_virt phys_to_virt 53 + 54 + /* 55 + * readX/writeX() are used to access memory mapped devices. On some 56 + * architectures the memory mapped IO stuff needs to be accessed 57 + * differently. On the CRIS architecture, we just read/write the 58 + * memory location directly. 59 + */ 60 + #ifdef CONFIG_PCI 61 + #define PCI_SPACE(x) ((((unsigned)(x)) & 0x10000000) == 0x10000000) 62 + #else 63 + #define PCI_SPACE(x) 0 64 + #endif 65 + static inline unsigned char readb(const volatile void __iomem *addr) 66 + { 67 + if (PCI_SPACE(addr) && cris_iops) 68 + return cris_iops->read_mem((void*)addr, 1); 69 + else 70 + return *(volatile unsigned char __force *) addr; 71 + } 72 + static inline unsigned short readw(const volatile void __iomem *addr) 73 + { 74 + if (PCI_SPACE(addr) && cris_iops) 75 + return cris_iops->read_mem((void*)addr, 2); 76 + else 77 + return *(volatile unsigned short __force *) addr; 78 + } 79 + static inline unsigned int readl(const volatile void __iomem *addr) 80 + { 81 + if (PCI_SPACE(addr) && cris_iops) 82 + return cris_iops->read_mem((void*)addr, 4); 83 + else 84 + return *(volatile unsigned int __force *) addr; 85 + } 86 + #define readb_relaxed(addr) readb(addr) 87 + #define readw_relaxed(addr) readw(addr) 88 + #define readl_relaxed(addr) readl(addr) 89 + #define __raw_readb readb 90 + #define __raw_readw readw 91 + #define __raw_readl readl 92 + 93 + static inline void writeb(unsigned char b, volatile void __iomem *addr) 94 + { 95 + if (PCI_SPACE(addr) && cris_iops) 96 + cris_iops->write_mem(b, 1, (void*)addr); 97 + else 98 + *(volatile unsigned char __force *) addr = b; 99 + } 100 + static inline void writew(unsigned short b, volatile void __iomem *addr) 101 + { 102 + if (PCI_SPACE(addr) && cris_iops) 103 + cris_iops->write_mem(b, 2, (void*)addr); 104 + else 105 + *(volatile unsigned short __force *) addr = b; 106 + } 107 + static inline void writel(unsigned int b, volatile void __iomem *addr) 108 + { 109 + if (PCI_SPACE(addr) && cris_iops) 110 + cris_iops->write_mem(b, 4, (void*)addr); 111 + else 112 + *(volatile unsigned int __force *) addr = b; 113 + } 114 + #define __raw_writeb writeb 115 + #define __raw_writew writew 116 + #define __raw_writel writel 117 + 118 + #define mmiowb() 119 + 120 + #define memset_io(a,b,c) memset((void *)(a),(b),(c)) 121 + #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) 122 + #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) 123 + 124 + 125 + /* I/O port access. Normally there is no I/O space on CRIS but when 126 + * Cardbus/PCI is enabled the request is passed through the bridge. 127 + */ 128 + 129 + #define IO_SPACE_LIMIT 0xffff 130 + #define inb(port) (cris_iops ? cris_iops->read_io(port,NULL,1,1) : 0) 131 + #define inw(port) (cris_iops ? cris_iops->read_io(port,NULL,2,1) : 0) 132 + #define inl(port) (cris_iops ? cris_iops->read_io(port,NULL,4,1) : 0) 133 + #define insb(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0) 134 + #define insw(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0) 135 + #define insl(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0) 136 + #define outb(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1) 137 + #define outw(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1) 138 + #define outl(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1) 139 + #define outsb(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count) 140 + #define outsw(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count) 141 + #define outsl(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count) 142 + 143 + /* 144 + * Convert a physical pointer to a virtual kernel pointer for /dev/mem 145 + * access 146 + */ 147 + #define xlate_dev_mem_ptr(p) __va(p) 148 + 149 + /* 150 + * Convert a virtual cached pointer to an uncached pointer 151 + */ 152 + #define xlate_dev_kmem_ptr(p) p 153 + 154 + #endif
+13
arch/cris/include/asm/irq.h
··· 1 + #ifndef _ASM_IRQ_H 2 + #define _ASM_IRQ_H 3 + 4 + #include <arch/irq.h> 5 + 6 + static inline int irq_canonicalize(int irq) 7 + { 8 + return irq; 9 + } 10 + 11 + #endif /* _ASM_IRQ_H */ 12 + 13 +
+10
arch/cris/include/asm/mmu.h
··· 1 + /* 2 + * CRIS MMU constants and PTE layout 3 + */ 4 + 5 + #ifndef _CRIS_MMU_H 6 + #define _CRIS_MMU_H 7 + 8 + #include <arch/mmu.h> 9 + 10 + #endif
+74
arch/cris/include/asm/page.h
··· 1 + #ifndef _CRIS_PAGE_H 2 + #define _CRIS_PAGE_H 3 + 4 + #include <arch/page.h> 5 + #include <linux/const.h> 6 + 7 + /* PAGE_SHIFT determines the page size */ 8 + #define PAGE_SHIFT 13 9 + #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 10 + #define PAGE_MASK (~(PAGE_SIZE-1)) 11 + 12 + #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) 13 + #define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) 14 + 15 + #define clear_user_page(page, vaddr, pg) clear_page(page) 16 + #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) 17 + 18 + #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \ 19 + alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) 20 + #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE 21 + 22 + /* 23 + * These are used to make use of C type-checking.. 24 + */ 25 + #ifndef __ASSEMBLY__ 26 + typedef struct { unsigned long pte; } pte_t; 27 + typedef struct { unsigned long pgd; } pgd_t; 28 + typedef struct { unsigned long pgprot; } pgprot_t; 29 + typedef struct page *pgtable_t; 30 + #endif 31 + 32 + #define pte_val(x) ((x).pte) 33 + #define pgd_val(x) ((x).pgd) 34 + #define pgprot_val(x) ((x).pgprot) 35 + 36 + #define __pte(x) ((pte_t) { (x) } ) 37 + #define __pgd(x) ((pgd_t) { (x) } ) 38 + #define __pgprot(x) ((pgprot_t) { (x) } ) 39 + 40 + /* On CRIS the PFN numbers doesn't start at 0 so we have to compensate */ 41 + /* for that before indexing into the page table starting at mem_map */ 42 + #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) 43 + #define pfn_valid(pfn) (((pfn) - (PAGE_OFFSET >> PAGE_SHIFT)) < max_mapnr) 44 + 45 + /* to index into the page map. our pages all start at physical addr PAGE_OFFSET so 46 + * we can let the map start there. notice that we subtract PAGE_OFFSET because 47 + * we start our mem_map there - in other ports they map mem_map physically and 48 + * use __pa instead. in our system both the physical and virtual address of DRAM 49 + * is too high to let mem_map start at 0, so we do it this way instead (similar 50 + * to arm and m68k I think) 51 + */ 52 + 53 + #define virt_to_page(kaddr) (mem_map + (((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT)) 54 + #define VALID_PAGE(page) (((page) - mem_map) < max_mapnr) 55 + #define virt_addr_valid(kaddr) pfn_valid((unsigned)(kaddr) >> PAGE_SHIFT) 56 + 57 + /* convert a page (based on mem_map and forward) to a physical address 58 + * do this by figuring out the virtual address and then use __pa 59 + */ 60 + 61 + #define page_to_phys(page) __pa((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) 62 + 63 + #ifndef __ASSEMBLY__ 64 + 65 + #endif /* __ASSEMBLY__ */ 66 + 67 + #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 68 + VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 69 + 70 + #include <asm-generic/memory_model.h> 71 + #include <asm-generic/page.h> 72 + 73 + #endif /* _CRIS_PAGE_H */ 74 +
+299
arch/cris/include/asm/pgtable.h
··· 1 + /* 2 + * CRIS pgtable.h - macros and functions to manipulate page tables. 3 + */ 4 + 5 + #ifndef _CRIS_PGTABLE_H 6 + #define _CRIS_PGTABLE_H 7 + 8 + #include <asm/page.h> 9 + #include <asm-generic/pgtable-nopmd.h> 10 + 11 + #ifndef __ASSEMBLY__ 12 + #include <linux/sched.h> 13 + #include <asm/mmu.h> 14 + #endif 15 + #include <arch/pgtable.h> 16 + 17 + /* 18 + * The Linux memory management assumes a three-level page table setup. On 19 + * CRIS, we use that, but "fold" the mid level into the top-level page 20 + * table. Since the MMU TLB is software loaded through an interrupt, it 21 + * supports any page table structure, so we could have used a three-level 22 + * setup, but for the amounts of memory we normally use, a two-level is 23 + * probably more efficient. 24 + * 25 + * This file contains the functions and defines necessary to modify and use 26 + * the CRIS page table tree. 27 + */ 28 + #ifndef __ASSEMBLY__ 29 + extern void paging_init(void); 30 + #endif 31 + 32 + /* Certain architectures need to do special things when pte's 33 + * within a page table are directly modified. Thus, the following 34 + * hook is made available. 35 + */ 36 + #define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval)) 37 + #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 38 + 39 + /* 40 + * (pmds are folded into pgds so this doesn't get actually called, 41 + * but the define is needed for a generic inline function.) 42 + */ 43 + #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) 44 + #define set_pgu(pudptr, pudval) (*(pudptr) = pudval) 45 + 46 + /* PGDIR_SHIFT determines the size of the area a second-level page table can 47 + * map. It is equal to the page size times the number of PTE's that fit in 48 + * a PMD page. A PTE is 4-bytes in CRIS. Hence the following number. 49 + */ 50 + 51 + #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-2)) 52 + #define PGDIR_SIZE (1UL << PGDIR_SHIFT) 53 + #define PGDIR_MASK (~(PGDIR_SIZE-1)) 54 + 55 + /* 56 + * entries per page directory level: we use a two-level, so 57 + * we don't really have any PMD directory physically. 58 + * pointers are 4 bytes so we can use the page size and 59 + * divide it by 4 (shift by 2). 60 + */ 61 + #define PTRS_PER_PTE (1UL << (PAGE_SHIFT-2)) 62 + #define PTRS_PER_PGD (1UL << (PAGE_SHIFT-2)) 63 + 64 + /* calculate how many PGD entries a user-level program can use 65 + * the first mappable virtual address is 0 66 + * (TASK_SIZE is the maximum virtual address space) 67 + */ 68 + 69 + #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 70 + #define FIRST_USER_ADDRESS 0 71 + 72 + /* zero page used for uninitialized stuff */ 73 + #ifndef __ASSEMBLY__ 74 + extern unsigned long empty_zero_page; 75 + #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) 76 + #endif 77 + 78 + /* number of bits that fit into a memory pointer */ 79 + #define BITS_PER_PTR (8*sizeof(unsigned long)) 80 + 81 + /* to align the pointer to a pointer address */ 82 + #define PTR_MASK (~(sizeof(void*)-1)) 83 + 84 + /* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */ 85 + /* 64-bit machines, beware! SRB. */ 86 + #define SIZEOF_PTR_LOG2 2 87 + 88 + /* to find an entry in a page-table */ 89 + #define PAGE_PTR(address) \ 90 + ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) 91 + 92 + /* to set the page-dir */ 93 + #define SET_PAGE_DIR(tsk,pgdir) 94 + 95 + #define pte_none(x) (!pte_val(x)) 96 + #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) 97 + #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) 98 + 99 + #define pmd_none(x) (!pmd_val(x)) 100 + /* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad 101 + * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. 102 + */ 103 + #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE) 104 + #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) 105 + #define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0) 106 + 107 + #ifndef __ASSEMBLY__ 108 + 109 + /* 110 + * The following only work if pte_present() is true. 111 + * Undefined behaviour if not.. 112 + */ 113 + 114 + static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } 115 + static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; } 116 + static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } 117 + static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } 118 + static inline int pte_special(pte_t pte) { return 0; } 119 + 120 + static inline pte_t pte_wrprotect(pte_t pte) 121 + { 122 + pte_val(pte) &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); 123 + return pte; 124 + } 125 + 126 + static inline pte_t pte_mkclean(pte_t pte) 127 + { 128 + pte_val(pte) &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); 129 + return pte; 130 + } 131 + 132 + static inline pte_t pte_mkold(pte_t pte) 133 + { 134 + pte_val(pte) &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ); 135 + return pte; 136 + } 137 + 138 + static inline pte_t pte_mkwrite(pte_t pte) 139 + { 140 + pte_val(pte) |= _PAGE_WRITE; 141 + if (pte_val(pte) & _PAGE_MODIFIED) 142 + pte_val(pte) |= _PAGE_SILENT_WRITE; 143 + return pte; 144 + } 145 + 146 + static inline pte_t pte_mkdirty(pte_t pte) 147 + { 148 + pte_val(pte) |= _PAGE_MODIFIED; 149 + if (pte_val(pte) & _PAGE_WRITE) 150 + pte_val(pte) |= _PAGE_SILENT_WRITE; 151 + return pte; 152 + } 153 + 154 + static inline pte_t pte_mkyoung(pte_t pte) 155 + { 156 + pte_val(pte) |= _PAGE_ACCESSED; 157 + if (pte_val(pte) & _PAGE_READ) 158 + { 159 + pte_val(pte) |= _PAGE_SILENT_READ; 160 + if ((pte_val(pte) & (_PAGE_WRITE | _PAGE_MODIFIED)) == 161 + (_PAGE_WRITE | _PAGE_MODIFIED)) 162 + pte_val(pte) |= _PAGE_SILENT_WRITE; 163 + } 164 + return pte; 165 + } 166 + static inline pte_t pte_mkspecial(pte_t pte) { return pte; } 167 + 168 + /* 169 + * Conversion functions: convert a page and protection to a page entry, 170 + * and a page entry and page directory to the page they refer to. 171 + */ 172 + 173 + /* What actually goes as arguments to the various functions is less than 174 + * obvious, but a rule of thumb is that struct page's goes as struct page *, 175 + * really physical DRAM addresses are unsigned long's, and DRAM "virtual" 176 + * addresses (the 0xc0xxxxxx's) goes as void *'s. 177 + */ 178 + 179 + static inline pte_t __mk_pte(void * page, pgprot_t pgprot) 180 + { 181 + pte_t pte; 182 + /* the PTE needs a physical address */ 183 + pte_val(pte) = __pa(page) | pgprot_val(pgprot); 184 + return pte; 185 + } 186 + 187 + #define mk_pte(page, pgprot) __mk_pte(page_address(page), (pgprot)) 188 + 189 + #define mk_pte_phys(physpage, pgprot) \ 190 + ({ \ 191 + pte_t __pte; \ 192 + \ 193 + pte_val(__pte) = (physpage) + pgprot_val(pgprot); \ 194 + __pte; \ 195 + }) 196 + 197 + static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 198 + { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } 199 + 200 + 201 + /* pte_val refers to a page in the 0x4xxxxxxx physical DRAM interval 202 + * __pte_page(pte_val) refers to the "virtual" DRAM interval 203 + * pte_pagenr refers to the page-number counted starting from the virtual DRAM start 204 + */ 205 + 206 + static inline unsigned long __pte_page(pte_t pte) 207 + { 208 + /* the PTE contains a physical address */ 209 + return (unsigned long)__va(pte_val(pte) & PAGE_MASK); 210 + } 211 + 212 + #define pte_pagenr(pte) ((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT) 213 + 214 + /* permanent address of a page */ 215 + 216 + #define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT)) 217 + #define pte_page(pte) (mem_map+pte_pagenr(pte)) 218 + 219 + /* only the pte's themselves need to point to physical DRAM (see above) 220 + * the pagetable links are purely handled within the kernel SW and thus 221 + * don't need the __pa and __va transformations. 222 + */ 223 + 224 + static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) 225 + { pmd_val(*pmdp) = _PAGE_TABLE | (unsigned long) ptep; } 226 + 227 + #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 228 + #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) 229 + 230 + /* to find an entry in a page-table-directory. */ 231 + #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) 232 + 233 + /* to find an entry in a page-table-directory */ 234 + static inline pgd_t * pgd_offset(const struct mm_struct *mm, unsigned long address) 235 + { 236 + return mm->pgd + pgd_index(address); 237 + } 238 + 239 + /* to find an entry in a kernel page-table-directory */ 240 + #define pgd_offset_k(address) pgd_offset(&init_mm, address) 241 + 242 + /* Find an entry in the third-level page table.. */ 243 + #define __pte_offset(address) \ 244 + (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) 245 + #define pte_offset_kernel(dir, address) \ 246 + ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) 247 + #define pte_offset_map(dir, address) \ 248 + ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) 249 + #define pte_offset_map_nested(dir, address) pte_offset_map(dir, address) 250 + 251 + #define pte_unmap(pte) do { } while (0) 252 + #define pte_unmap_nested(pte) do { } while (0) 253 + #define pte_pfn(x) ((unsigned long)(__va((x).pte)) >> PAGE_SHIFT) 254 + #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 255 + 256 + #define pte_ERROR(e) \ 257 + printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), pte_val(e)) 258 + #define pgd_ERROR(e) \ 259 + printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e)) 260 + 261 + 262 + extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */ 263 + 264 + /* 265 + * CRIS doesn't have any external MMU info: the kernel page 266 + * tables contain all the necessary information. 267 + * 268 + * Actually I am not sure on what this could be used for. 269 + */ 270 + static inline void update_mmu_cache(struct vm_area_struct * vma, 271 + unsigned long address, pte_t pte) 272 + { 273 + } 274 + 275 + /* Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e)) */ 276 + /* Since the PAGE_PRESENT bit is bit 4, we can use the bits above */ 277 + 278 + #define __swp_type(x) (((x).val >> 5) & 0x7f) 279 + #define __swp_offset(x) ((x).val >> 12) 280 + #define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 5) | ((offset) << 12) }) 281 + #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 282 + #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 283 + 284 + #define kern_addr_valid(addr) (1) 285 + 286 + #include <asm-generic/pgtable.h> 287 + 288 + /* 289 + * No page table caches to initialise 290 + */ 291 + #define pgtable_cache_init() do { } while (0) 292 + 293 + #define pte_to_pgoff(x) (pte_val(x) >> 6) 294 + #define pgoff_to_pte(x) __pte(((x) << 6) | _PAGE_FILE) 295 + 296 + typedef pte_t *pte_addr_t; 297 + 298 + #endif /* __ASSEMBLY__ */ 299 + #endif /* _CRIS_PGTABLE_H */
+75
arch/cris/include/asm/processor.h
··· 1 + /* 2 + * include/asm-cris/processor.h 3 + * 4 + * Copyright (C) 2000, 2001 Axis Communications AB 5 + * 6 + * Authors: Bjorn Wesen Initial version 7 + * 8 + */ 9 + 10 + #ifndef __ASM_CRIS_PROCESSOR_H 11 + #define __ASM_CRIS_PROCESSOR_H 12 + 13 + #include <asm/system.h> 14 + #include <asm/page.h> 15 + #include <asm/ptrace.h> 16 + #include <arch/processor.h> 17 + 18 + struct task_struct; 19 + 20 + #define STACK_TOP TASK_SIZE 21 + #define STACK_TOP_MAX STACK_TOP 22 + 23 + /* This decides where the kernel will search for a free chunk of vm 24 + * space during mmap's. 25 + */ 26 + #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) 27 + 28 + /* THREAD_SIZE is the size of the task_struct/kernel_stack combo. 29 + * normally, the stack is found by doing something like p + THREAD_SIZE 30 + * in CRIS, a page is 8192 bytes, which seems like a sane size 31 + */ 32 + 33 + #define THREAD_SIZE PAGE_SIZE 34 + #define KERNEL_STACK_SIZE PAGE_SIZE 35 + 36 + /* 37 + * At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack. 38 + * This macro allows us to find those regs for a task. 39 + * Notice that subsequent pt_regs stackings, like recursive interrupts occurring while 40 + * we're in the kernel, won't affect this - only the first user->kernel transition 41 + * registers are reached by this. 42 + */ 43 + 44 + #define user_regs(thread_info) (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE)) - 1) 45 + 46 + /* 47 + * Dito but for the currently running task 48 + */ 49 + 50 + #define task_pt_regs(task) user_regs(task_thread_info(task)) 51 + #define current_regs() task_pt_regs(current) 52 + 53 + static inline void prepare_to_copy(struct task_struct *tsk) 54 + { 55 + } 56 + 57 + extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); 58 + 59 + unsigned long get_wchan(struct task_struct *p); 60 + 61 + #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) 62 + 63 + extern unsigned long thread_saved_pc(struct task_struct *tsk); 64 + 65 + /* Free all resources held by a thread. */ 66 + static inline void release_thread(struct task_struct *dead_task) 67 + { 68 + /* Nothing needs to be done. */ 69 + } 70 + 71 + #define init_stack (init_thread_union.stack) 72 + 73 + #define cpu_relax() barrier() 74 + 75 + #endif /* __ASM_CRIS_PROCESSOR_H */
+16
arch/cris/include/asm/ptrace.h
··· 1 + #ifndef _CRIS_PTRACE_H 2 + #define _CRIS_PTRACE_H 3 + 4 + #include <arch/ptrace.h> 5 + 6 + #ifdef __KERNEL__ 7 + 8 + /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ 9 + #define PTRACE_GETREGS 12 10 + #define PTRACE_SETREGS 13 11 + 12 + #define profile_pc(regs) instruction_pointer(regs) 13 + 14 + #endif /* __KERNEL__ */ 15 + 16 + #endif /* _CRIS_PTRACE_H */
+1
arch/cris/include/asm/spinlock.h
··· 1 + #include <arch/spinlock.h>
+88
arch/cris/include/asm/system.h
··· 1 + #ifndef __ASM_CRIS_SYSTEM_H 2 + #define __ASM_CRIS_SYSTEM_H 3 + 4 + #include <arch/system.h> 5 + 6 + /* the switch_to macro calls resume, an asm function in entry.S which does the actual 7 + * task switching. 8 + */ 9 + 10 + extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int); 11 + #define switch_to(prev,next,last) last = resume(prev,next, \ 12 + (int)&((struct task_struct *)0)->thread) 13 + 14 + #define barrier() __asm__ __volatile__("": : :"memory") 15 + #define mb() barrier() 16 + #define rmb() mb() 17 + #define wmb() mb() 18 + #define read_barrier_depends() do { } while(0) 19 + #define set_mb(var, value) do { var = value; mb(); } while (0) 20 + 21 + #ifdef CONFIG_SMP 22 + #define smp_mb() mb() 23 + #define smp_rmb() rmb() 24 + #define smp_wmb() wmb() 25 + #define smp_read_barrier_depends() read_barrier_depends() 26 + #else 27 + #define smp_mb() barrier() 28 + #define smp_rmb() barrier() 29 + #define smp_wmb() barrier() 30 + #define smp_read_barrier_depends() do { } while(0) 31 + #endif 32 + 33 + #define iret() 34 + 35 + /* 36 + * disable hlt during certain critical i/o operations 37 + */ 38 + #define HAVE_DISABLE_HLT 39 + void disable_hlt(void); 40 + void enable_hlt(void); 41 + 42 + static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) 43 + { 44 + /* since Etrax doesn't have any atomic xchg instructions, we need to disable 45 + irq's (if enabled) and do it with move.d's */ 46 + unsigned long flags,temp; 47 + local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ 48 + switch (size) { 49 + case 1: 50 + *((unsigned char *)&temp) = x; 51 + x = *(unsigned char *)ptr; 52 + *(unsigned char *)ptr = *((unsigned char *)&temp); 53 + break; 54 + case 2: 55 + *((unsigned short *)&temp) = x; 56 + x = *(unsigned short *)ptr; 57 + *(unsigned short *)ptr = *((unsigned short *)&temp); 58 + break; 59 + case 4: 60 + temp = x; 61 + x = *(unsigned long *)ptr; 62 + *(unsigned long *)ptr = temp; 63 + break; 64 + } 65 + local_irq_restore(flags); /* restore irq enable bit */ 66 + return x; 67 + } 68 + 69 + #include <asm-generic/cmpxchg-local.h> 70 + 71 + /* 72 + * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make 73 + * them available. 74 + */ 75 + #define cmpxchg_local(ptr, o, n) \ 76 + ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ 77 + (unsigned long)(n), sizeof(*(ptr)))) 78 + #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) 79 + 80 + #ifndef CONFIG_SMP 81 + #include <asm-generic/cmpxchg.h> 82 + #endif 83 + 84 + #define arch_align_stack(x) (x) 85 + 86 + void default_idle(void); 87 + 88 + #endif
+106
arch/cris/include/asm/thread_info.h
··· 1 + /* thread_info.h: CRIS low-level thread information 2 + * 3 + * Copyright (C) 2002 David Howells (dhowells@redhat.com) 4 + * - Incorporating suggestions made by Linus Torvalds and Dave Miller 5 + * 6 + * CRIS port by Axis Communications 7 + */ 8 + 9 + #ifndef _ASM_THREAD_INFO_H 10 + #define _ASM_THREAD_INFO_H 11 + 12 + #ifdef __KERNEL__ 13 + 14 + #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR 15 + 16 + #ifndef __ASSEMBLY__ 17 + #include <asm/types.h> 18 + #include <asm/processor.h> 19 + #include <arch/thread_info.h> 20 + #include <asm/segment.h> 21 + #endif 22 + 23 + 24 + /* 25 + * low level task data that entry.S needs immediate access to 26 + * - this struct should fit entirely inside of one cache line 27 + * - this struct shares the supervisor stack pages 28 + * - if the contents of this structure are changed, the assembly constants must also be changed 29 + */ 30 + #ifndef __ASSEMBLY__ 31 + struct thread_info { 32 + struct task_struct *task; /* main task structure */ 33 + struct exec_domain *exec_domain; /* execution domain */ 34 + unsigned long flags; /* low level flags */ 35 + __u32 cpu; /* current CPU */ 36 + int preempt_count; /* 0 => preemptable, <0 => BUG */ 37 + __u32 tls; /* TLS for this thread */ 38 + 39 + mm_segment_t addr_limit; /* thread address space: 40 + 0-0xBFFFFFFF for user-thead 41 + 0-0xFFFFFFFF for kernel-thread 42 + */ 43 + struct restart_block restart_block; 44 + __u8 supervisor_stack[0]; 45 + }; 46 + 47 + #endif 48 + 49 + #define PREEMPT_ACTIVE 0x10000000 50 + 51 + /* 52 + * macros/functions for gaining access to the thread information structure 53 + * 54 + * preempt_count needs to be 1 initially, until the scheduler is functional. 55 + */ 56 + #ifndef __ASSEMBLY__ 57 + #define INIT_THREAD_INFO(tsk) \ 58 + { \ 59 + .task = &tsk, \ 60 + .exec_domain = &default_exec_domain, \ 61 + .flags = 0, \ 62 + .cpu = 0, \ 63 + .preempt_count = 1, \ 64 + .addr_limit = KERNEL_DS, \ 65 + .restart_block = { \ 66 + .fn = do_no_restart_syscall, \ 67 + }, \ 68 + } 69 + 70 + #define init_thread_info (init_thread_union.thread_info) 71 + 72 + /* thread information allocation */ 73 + #define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) 74 + #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) 75 + 76 + #endif /* !__ASSEMBLY__ */ 77 + 78 + /* 79 + * thread information flags 80 + * - these are process state flags that various assembly files may need to access 81 + * - pending work-to-be-done flags are in LSW 82 + * - other flags in MSW 83 + */ 84 + #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 85 + #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ 86 + #define TIF_SIGPENDING 2 /* signal pending */ 87 + #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 88 + #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ 89 + #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 90 + #define TIF_MEMDIE 17 91 + #define TIF_FREEZE 18 /* is freezing for suspend */ 92 + 93 + #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 94 + #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 95 + #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 96 + #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 97 + #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 98 + #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 99 + #define _TIF_FREEZE (1<<TIF_FREEZE) 100 + 101 + #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 102 + #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ 103 + 104 + #endif /* __KERNEL__ */ 105 + 106 + #endif /* _ASM_THREAD_INFO_H */
+24
arch/cris/include/asm/timex.h
··· 1 + /* 2 + * linux/include/asm-cris/timex.h 3 + * 4 + * CRIS architecture timex specifications 5 + */ 6 + 7 + #ifndef _ASM_CRIS_TIMEX_H 8 + #define _ASM_CRIS_TIMEX_H 9 + 10 + #include <arch/timex.h> 11 + 12 + /* 13 + * We don't have a cycle-counter.. but we do not support SMP anyway where this is 14 + * used so it does not matter. 15 + */ 16 + 17 + typedef unsigned long long cycles_t; 18 + 19 + static inline cycles_t get_cycles(void) 20 + { 21 + return 0; 22 + } 23 + 24 + #endif
+19
arch/cris/include/asm/tlb.h
··· 1 + #ifndef _CRIS_TLB_H 2 + #define _CRIS_TLB_H 3 + 4 + #include <linux/pagemap.h> 5 + 6 + #include <arch/tlb.h> 7 + 8 + /* 9 + * cris doesn't need any special per-pte or 10 + * per-vma handling.. 11 + */ 12 + #define tlb_start_vma(tlb, vma) do { } while (0) 13 + #define tlb_end_vma(tlb, vma) do { } while (0) 14 + #define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0) 15 + 16 + #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) 17 + #include <asm-generic/tlb.h> 18 + 19 + #endif
+404
arch/cris/include/asm/uaccess.h
··· 1 + /* 2 + * Authors: Bjorn Wesen (bjornw@axis.com) 3 + * Hans-Peter Nilsson (hp@axis.com) 4 + */ 5 + 6 + /* Asm:s have been tweaked (within the domain of correctness) to give 7 + satisfactory results for "gcc version 2.96 20000427 (experimental)". 8 + 9 + Check regularly... 10 + 11 + Register $r9 is chosen for temporaries, being a call-clobbered register 12 + first in line to be used (notably for local blocks), not colliding with 13 + parameter registers. */ 14 + 15 + #ifndef _CRIS_UACCESS_H 16 + #define _CRIS_UACCESS_H 17 + 18 + #ifndef __ASSEMBLY__ 19 + #include <linux/sched.h> 20 + #include <linux/errno.h> 21 + #include <asm/processor.h> 22 + #include <asm/page.h> 23 + 24 + #define VERIFY_READ 0 25 + #define VERIFY_WRITE 1 26 + 27 + /* 28 + * The fs value determines whether argument validity checking should be 29 + * performed or not. If get_fs() == USER_DS, checking is performed, with 30 + * get_fs() == KERNEL_DS, checking is bypassed. 31 + * 32 + * For historical reasons, these macros are grossly misnamed. 33 + */ 34 + 35 + #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) 36 + 37 + /* addr_limit is the maximum accessible address for the task. we misuse 38 + * the KERNEL_DS and USER_DS values to both assign and compare the 39 + * addr_limit values through the equally misnamed get/set_fs macros. 40 + * (see above) 41 + */ 42 + 43 + #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) 44 + #define USER_DS MAKE_MM_SEG(TASK_SIZE) 45 + 46 + #define get_ds() (KERNEL_DS) 47 + #define get_fs() (current_thread_info()->addr_limit) 48 + #define set_fs(x) (current_thread_info()->addr_limit = (x)) 49 + 50 + #define segment_eq(a,b) ((a).seg == (b).seg) 51 + 52 + #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) 53 + #define __user_ok(addr,size) (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size))) 54 + #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) 55 + #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) 56 + 57 + #include <arch/uaccess.h> 58 + 59 + /* 60 + * The exception table consists of pairs of addresses: the first is the 61 + * address of an instruction that is allowed to fault, and the second is 62 + * the address at which the program should continue. No registers are 63 + * modified, so it is entirely up to the continuation code to figure out 64 + * what to do. 65 + * 66 + * All the routines below use bits of fixup code that are out of line 67 + * with the main instruction path. This means when everything is well, 68 + * we don't even have to jump over them. Further, they do not intrude 69 + * on our cache or tlb entries. 70 + */ 71 + 72 + struct exception_table_entry 73 + { 74 + unsigned long insn, fixup; 75 + }; 76 + 77 + /* 78 + * These are the main single-value transfer routines. They automatically 79 + * use the right size if we just have the right pointer type. 80 + * 81 + * This gets kind of ugly. We want to return _two_ values in "get_user()" 82 + * and yet we don't want to do any pointers, because that is too much 83 + * of a performance impact. Thus we have a few rather ugly macros here, 84 + * and hide all the ugliness from the user. 85 + * 86 + * The "__xxx" versions of the user access functions are versions that 87 + * do not verify the address space, that must have been done previously 88 + * with a separate "access_ok()" call (this is used when we do multiple 89 + * accesses to the same area of user memory). 90 + * 91 + * As we use the same address space for kernel and user data on 92 + * CRIS, we can just do these as direct assignments. (Of course, the 93 + * exception handling means that it's no longer "just"...) 94 + */ 95 + #define get_user(x,ptr) \ 96 + __get_user_check((x),(ptr),sizeof(*(ptr))) 97 + #define put_user(x,ptr) \ 98 + __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) 99 + 100 + #define __get_user(x,ptr) \ 101 + __get_user_nocheck((x),(ptr),sizeof(*(ptr))) 102 + #define __put_user(x,ptr) \ 103 + __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) 104 + 105 + extern long __put_user_bad(void); 106 + 107 + #define __put_user_size(x,ptr,size,retval) \ 108 + do { \ 109 + retval = 0; \ 110 + switch (size) { \ 111 + case 1: __put_user_asm(x,ptr,retval,"move.b"); break; \ 112 + case 2: __put_user_asm(x,ptr,retval,"move.w"); break; \ 113 + case 4: __put_user_asm(x,ptr,retval,"move.d"); break; \ 114 + case 8: __put_user_asm_64(x,ptr,retval); break; \ 115 + default: __put_user_bad(); \ 116 + } \ 117 + } while (0) 118 + 119 + #define __get_user_size(x,ptr,size,retval) \ 120 + do { \ 121 + retval = 0; \ 122 + switch (size) { \ 123 + case 1: __get_user_asm(x,ptr,retval,"move.b"); break; \ 124 + case 2: __get_user_asm(x,ptr,retval,"move.w"); break; \ 125 + case 4: __get_user_asm(x,ptr,retval,"move.d"); break; \ 126 + case 8: __get_user_asm_64(x,ptr,retval); break; \ 127 + default: (x) = __get_user_bad(); \ 128 + } \ 129 + } while (0) 130 + 131 + #define __put_user_nocheck(x,ptr,size) \ 132 + ({ \ 133 + long __pu_err; \ 134 + __put_user_size((x),(ptr),(size),__pu_err); \ 135 + __pu_err; \ 136 + }) 137 + 138 + #define __put_user_check(x,ptr,size) \ 139 + ({ \ 140 + long __pu_err = -EFAULT; \ 141 + __typeof__(*(ptr)) *__pu_addr = (ptr); \ 142 + if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ 143 + __put_user_size((x),__pu_addr,(size),__pu_err); \ 144 + __pu_err; \ 145 + }) 146 + 147 + struct __large_struct { unsigned long buf[100]; }; 148 + #define __m(x) (*(struct __large_struct *)(x)) 149 + 150 + 151 + 152 + #define __get_user_nocheck(x,ptr,size) \ 153 + ({ \ 154 + long __gu_err, __gu_val; \ 155 + __get_user_size(__gu_val,(ptr),(size),__gu_err); \ 156 + (x) = (__typeof__(*(ptr)))__gu_val; \ 157 + __gu_err; \ 158 + }) 159 + 160 + #define __get_user_check(x,ptr,size) \ 161 + ({ \ 162 + long __gu_err = -EFAULT, __gu_val = 0; \ 163 + const __typeof__(*(ptr)) *__gu_addr = (ptr); \ 164 + if (access_ok(VERIFY_READ,__gu_addr,size)) \ 165 + __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ 166 + (x) = (__typeof__(*(ptr)))__gu_val; \ 167 + __gu_err; \ 168 + }) 169 + 170 + extern long __get_user_bad(void); 171 + 172 + /* More complex functions. Most are inline, but some call functions that 173 + live in lib/usercopy.c */ 174 + 175 + extern unsigned long __copy_user(void __user *to, const void *from, unsigned long n); 176 + extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n); 177 + extern unsigned long __do_clear_user(void __user *to, unsigned long n); 178 + 179 + static inline unsigned long 180 + __generic_copy_to_user(void __user *to, const void *from, unsigned long n) 181 + { 182 + if (access_ok(VERIFY_WRITE, to, n)) 183 + return __copy_user(to,from,n); 184 + return n; 185 + } 186 + 187 + static inline unsigned long 188 + __generic_copy_from_user(void *to, const void __user *from, unsigned long n) 189 + { 190 + if (access_ok(VERIFY_READ, from, n)) 191 + return __copy_user_zeroing(to,from,n); 192 + return n; 193 + } 194 + 195 + static inline unsigned long 196 + __generic_clear_user(void __user *to, unsigned long n) 197 + { 198 + if (access_ok(VERIFY_WRITE, to, n)) 199 + return __do_clear_user(to,n); 200 + return n; 201 + } 202 + 203 + static inline long 204 + __strncpy_from_user(char *dst, const char __user *src, long count) 205 + { 206 + return __do_strncpy_from_user(dst, src, count); 207 + } 208 + 209 + static inline long 210 + strncpy_from_user(char *dst, const char __user *src, long count) 211 + { 212 + long res = -EFAULT; 213 + if (access_ok(VERIFY_READ, src, 1)) 214 + res = __do_strncpy_from_user(dst, src, count); 215 + return res; 216 + } 217 + 218 + 219 + /* Note that these expand awfully if made into switch constructs, so 220 + don't do that. */ 221 + 222 + static inline unsigned long 223 + __constant_copy_from_user(void *to, const void __user *from, unsigned long n) 224 + { 225 + unsigned long ret = 0; 226 + if (n == 0) 227 + ; 228 + else if (n == 1) 229 + __asm_copy_from_user_1(to, from, ret); 230 + else if (n == 2) 231 + __asm_copy_from_user_2(to, from, ret); 232 + else if (n == 3) 233 + __asm_copy_from_user_3(to, from, ret); 234 + else if (n == 4) 235 + __asm_copy_from_user_4(to, from, ret); 236 + else if (n == 5) 237 + __asm_copy_from_user_5(to, from, ret); 238 + else if (n == 6) 239 + __asm_copy_from_user_6(to, from, ret); 240 + else if (n == 7) 241 + __asm_copy_from_user_7(to, from, ret); 242 + else if (n == 8) 243 + __asm_copy_from_user_8(to, from, ret); 244 + else if (n == 9) 245 + __asm_copy_from_user_9(to, from, ret); 246 + else if (n == 10) 247 + __asm_copy_from_user_10(to, from, ret); 248 + else if (n == 11) 249 + __asm_copy_from_user_11(to, from, ret); 250 + else if (n == 12) 251 + __asm_copy_from_user_12(to, from, ret); 252 + else if (n == 13) 253 + __asm_copy_from_user_13(to, from, ret); 254 + else if (n == 14) 255 + __asm_copy_from_user_14(to, from, ret); 256 + else if (n == 15) 257 + __asm_copy_from_user_15(to, from, ret); 258 + else if (n == 16) 259 + __asm_copy_from_user_16(to, from, ret); 260 + else if (n == 20) 261 + __asm_copy_from_user_20(to, from, ret); 262 + else if (n == 24) 263 + __asm_copy_from_user_24(to, from, ret); 264 + else 265 + ret = __generic_copy_from_user(to, from, n); 266 + 267 + return ret; 268 + } 269 + 270 + /* Ditto, don't make a switch out of this. */ 271 + 272 + static inline unsigned long 273 + __constant_copy_to_user(void __user *to, const void *from, unsigned long n) 274 + { 275 + unsigned long ret = 0; 276 + if (n == 0) 277 + ; 278 + else if (n == 1) 279 + __asm_copy_to_user_1(to, from, ret); 280 + else if (n == 2) 281 + __asm_copy_to_user_2(to, from, ret); 282 + else if (n == 3) 283 + __asm_copy_to_user_3(to, from, ret); 284 + else if (n == 4) 285 + __asm_copy_to_user_4(to, from, ret); 286 + else if (n == 5) 287 + __asm_copy_to_user_5(to, from, ret); 288 + else if (n == 6) 289 + __asm_copy_to_user_6(to, from, ret); 290 + else if (n == 7) 291 + __asm_copy_to_user_7(to, from, ret); 292 + else if (n == 8) 293 + __asm_copy_to_user_8(to, from, ret); 294 + else if (n == 9) 295 + __asm_copy_to_user_9(to, from, ret); 296 + else if (n == 10) 297 + __asm_copy_to_user_10(to, from, ret); 298 + else if (n == 11) 299 + __asm_copy_to_user_11(to, from, ret); 300 + else if (n == 12) 301 + __asm_copy_to_user_12(to, from, ret); 302 + else if (n == 13) 303 + __asm_copy_to_user_13(to, from, ret); 304 + else if (n == 14) 305 + __asm_copy_to_user_14(to, from, ret); 306 + else if (n == 15) 307 + __asm_copy_to_user_15(to, from, ret); 308 + else if (n == 16) 309 + __asm_copy_to_user_16(to, from, ret); 310 + else if (n == 20) 311 + __asm_copy_to_user_20(to, from, ret); 312 + else if (n == 24) 313 + __asm_copy_to_user_24(to, from, ret); 314 + else 315 + ret = __generic_copy_to_user(to, from, n); 316 + 317 + return ret; 318 + } 319 + 320 + /* No switch, please. */ 321 + 322 + static inline unsigned long 323 + __constant_clear_user(void __user *to, unsigned long n) 324 + { 325 + unsigned long ret = 0; 326 + if (n == 0) 327 + ; 328 + else if (n == 1) 329 + __asm_clear_1(to, ret); 330 + else if (n == 2) 331 + __asm_clear_2(to, ret); 332 + else if (n == 3) 333 + __asm_clear_3(to, ret); 334 + else if (n == 4) 335 + __asm_clear_4(to, ret); 336 + else if (n == 8) 337 + __asm_clear_8(to, ret); 338 + else if (n == 12) 339 + __asm_clear_12(to, ret); 340 + else if (n == 16) 341 + __asm_clear_16(to, ret); 342 + else if (n == 20) 343 + __asm_clear_20(to, ret); 344 + else if (n == 24) 345 + __asm_clear_24(to, ret); 346 + else 347 + ret = __generic_clear_user(to, n); 348 + 349 + return ret; 350 + } 351 + 352 + 353 + #define clear_user(to, n) \ 354 + (__builtin_constant_p(n) ? \ 355 + __constant_clear_user(to, n) : \ 356 + __generic_clear_user(to, n)) 357 + 358 + #define copy_from_user(to, from, n) \ 359 + (__builtin_constant_p(n) ? \ 360 + __constant_copy_from_user(to, from, n) : \ 361 + __generic_copy_from_user(to, from, n)) 362 + 363 + #define copy_to_user(to, from, n) \ 364 + (__builtin_constant_p(n) ? \ 365 + __constant_copy_to_user(to, from, n) : \ 366 + __generic_copy_to_user(to, from, n)) 367 + 368 + /* We let the __ versions of copy_from/to_user inline, because they're often 369 + * used in fast paths and have only a small space overhead. 370 + */ 371 + 372 + static inline unsigned long 373 + __generic_copy_from_user_nocheck(void *to, const void __user *from, 374 + unsigned long n) 375 + { 376 + return __copy_user_zeroing(to,from,n); 377 + } 378 + 379 + static inline unsigned long 380 + __generic_copy_to_user_nocheck(void __user *to, const void *from, 381 + unsigned long n) 382 + { 383 + return __copy_user(to,from,n); 384 + } 385 + 386 + static inline unsigned long 387 + __generic_clear_user_nocheck(void __user *to, unsigned long n) 388 + { 389 + return __do_clear_user(to,n); 390 + } 391 + 392 + /* without checking */ 393 + 394 + #define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n)) 395 + #define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n)) 396 + #define __copy_to_user_inatomic __copy_to_user 397 + #define __copy_from_user_inatomic __copy_from_user 398 + #define __clear_user(to,n) __generic_clear_user_nocheck((to),(n)) 399 + 400 + #define strlen_user(str) strnlen_user((str), 0x7ffffffe) 401 + 402 + #endif /* __ASSEMBLY__ */ 403 + 404 + #endif /* _CRIS_UACCESS_H */
+374
arch/cris/include/asm/unistd.h
··· 1 + #ifndef _ASM_CRIS_UNISTD_H_ 2 + #define _ASM_CRIS_UNISTD_H_ 3 + 4 + /* 5 + * This file contains the system call numbers, and stub macros for libc. 6 + */ 7 + 8 + #define __NR_restart_syscall 0 9 + #define __NR_exit 1 10 + #define __NR_fork 2 11 + #define __NR_read 3 12 + #define __NR_write 4 13 + #define __NR_open 5 14 + #define __NR_close 6 15 + #define __NR_waitpid 7 16 + #define __NR_creat 8 17 + #define __NR_link 9 18 + #define __NR_unlink 10 19 + #define __NR_execve 11 20 + #define __NR_chdir 12 21 + #define __NR_time 13 22 + #define __NR_mknod 14 23 + #define __NR_chmod 15 24 + #define __NR_lchown 16 25 + #define __NR_break 17 26 + #define __NR_oldstat 18 27 + #define __NR_lseek 19 28 + #define __NR_getpid 20 29 + #define __NR_mount 21 30 + #define __NR_umount 22 31 + #define __NR_setuid 23 32 + #define __NR_getuid 24 33 + #define __NR_stime 25 34 + #define __NR_ptrace 26 35 + #define __NR_alarm 27 36 + #define __NR_oldfstat 28 37 + #define __NR_pause 29 38 + #define __NR_utime 30 39 + #define __NR_stty 31 40 + #define __NR_gtty 32 41 + #define __NR_access 33 42 + #define __NR_nice 34 43 + #define __NR_ftime 35 44 + #define __NR_sync 36 45 + #define __NR_kill 37 46 + #define __NR_rename 38 47 + #define __NR_mkdir 39 48 + #define __NR_rmdir 40 49 + #define __NR_dup 41 50 + #define __NR_pipe 42 51 + #define __NR_times 43 52 + #define __NR_prof 44 53 + #define __NR_brk 45 54 + #define __NR_setgid 46 55 + #define __NR_getgid 47 56 + #define __NR_signal 48 57 + #define __NR_geteuid 49 58 + #define __NR_getegid 50 59 + #define __NR_acct 51 60 + #define __NR_umount2 52 61 + #define __NR_lock 53 62 + #define __NR_ioctl 54 63 + #define __NR_fcntl 55 64 + #define __NR_mpx 56 65 + #define __NR_setpgid 57 66 + #define __NR_ulimit 58 67 + #define __NR_oldolduname 59 68 + #define __NR_umask 60 69 + #define __NR_chroot 61 70 + #define __NR_ustat 62 71 + #define __NR_dup2 63 72 + #define __NR_getppid 64 73 + #define __NR_getpgrp 65 74 + #define __NR_setsid 66 75 + #define __NR_sigaction 67 76 + #define __NR_sgetmask 68 77 + #define __NR_ssetmask 69 78 + #define __NR_setreuid 70 79 + #define __NR_setregid 71 80 + #define __NR_sigsuspend 72 81 + #define __NR_sigpending 73 82 + #define __NR_sethostname 74 83 + #define __NR_setrlimit 75 84 + #define __NR_getrlimit 76 85 + #define __NR_getrusage 77 86 + #define __NR_gettimeofday 78 87 + #define __NR_settimeofday 79 88 + #define __NR_getgroups 80 89 + #define __NR_setgroups 81 90 + #define __NR_select 82 91 + #define __NR_symlink 83 92 + #define __NR_oldlstat 84 93 + #define __NR_readlink 85 94 + #define __NR_uselib 86 95 + #define __NR_swapon 87 96 + #define __NR_reboot 88 97 + #define __NR_readdir 89 98 + #define __NR_mmap 90 99 + #define __NR_munmap 91 100 + #define __NR_truncate 92 101 + #define __NR_ftruncate 93 102 + #define __NR_fchmod 94 103 + #define __NR_fchown 95 104 + #define __NR_getpriority 96 105 + #define __NR_setpriority 97 106 + #define __NR_profil 98 107 + #define __NR_statfs 99 108 + #define __NR_fstatfs 100 109 + #define __NR_ioperm 101 110 + #define __NR_socketcall 102 111 + #define __NR_syslog 103 112 + #define __NR_setitimer 104 113 + #define __NR_getitimer 105 114 + #define __NR_stat 106 115 + #define __NR_lstat 107 116 + #define __NR_fstat 108 117 + #define __NR_olduname 109 118 + #define __NR_iopl 110 119 + #define __NR_vhangup 111 120 + #define __NR_idle 112 121 + #define __NR_vm86 113 122 + #define __NR_wait4 114 123 + #define __NR_swapoff 115 124 + #define __NR_sysinfo 116 125 + #define __NR_ipc 117 126 + #define __NR_fsync 118 127 + #define __NR_sigreturn 119 128 + #define __NR_clone 120 129 + #define __NR_setdomainname 121 130 + #define __NR_uname 122 131 + #define __NR_modify_ldt 123 132 + #define __NR_adjtimex 124 133 + #define __NR_mprotect 125 134 + #define __NR_sigprocmask 126 135 + #define __NR_create_module 127 136 + #define __NR_init_module 128 137 + #define __NR_delete_module 129 138 + #define __NR_get_kernel_syms 130 139 + #define __NR_quotactl 131 140 + #define __NR_getpgid 132 141 + #define __NR_fchdir 133 142 + #define __NR_bdflush 134 143 + #define __NR_sysfs 135 144 + #define __NR_personality 136 145 + #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ 146 + #define __NR_setfsuid 138 147 + #define __NR_setfsgid 139 148 + #define __NR__llseek 140 149 + #define __NR_getdents 141 150 + #define __NR__newselect 142 151 + #define __NR_flock 143 152 + #define __NR_msync 144 153 + #define __NR_readv 145 154 + #define __NR_writev 146 155 + #define __NR_getsid 147 156 + #define __NR_fdatasync 148 157 + #define __NR__sysctl 149 158 + #define __NR_mlock 150 159 + #define __NR_munlock 151 160 + #define __NR_mlockall 152 161 + #define __NR_munlockall 153 162 + #define __NR_sched_setparam 154 163 + #define __NR_sched_getparam 155 164 + #define __NR_sched_setscheduler 156 165 + #define __NR_sched_getscheduler 157 166 + #define __NR_sched_yield 158 167 + #define __NR_sched_get_priority_max 159 168 + #define __NR_sched_get_priority_min 160 169 + #define __NR_sched_rr_get_interval 161 170 + #define __NR_nanosleep 162 171 + #define __NR_mremap 163 172 + #define __NR_setresuid 164 173 + #define __NR_getresuid 165 174 + 175 + #define __NR_query_module 167 176 + #define __NR_poll 168 177 + #define __NR_nfsservctl 169 178 + #define __NR_setresgid 170 179 + #define __NR_getresgid 171 180 + #define __NR_prctl 172 181 + #define __NR_rt_sigreturn 173 182 + #define __NR_rt_sigaction 174 183 + #define __NR_rt_sigprocmask 175 184 + #define __NR_rt_sigpending 176 185 + #define __NR_rt_sigtimedwait 177 186 + #define __NR_rt_sigqueueinfo 178 187 + #define __NR_rt_sigsuspend 179 188 + #define __NR_pread64 180 189 + #define __NR_pwrite64 181 190 + #define __NR_chown 182 191 + #define __NR_getcwd 183 192 + #define __NR_capget 184 193 + #define __NR_capset 185 194 + #define __NR_sigaltstack 186 195 + #define __NR_sendfile 187 196 + #define __NR_getpmsg 188 /* some people actually want streams */ 197 + #define __NR_putpmsg 189 /* some people actually want streams */ 198 + #define __NR_vfork 190 199 + #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ 200 + #define __NR_mmap2 192 201 + #define __NR_truncate64 193 202 + #define __NR_ftruncate64 194 203 + #define __NR_stat64 195 204 + #define __NR_lstat64 196 205 + #define __NR_fstat64 197 206 + #define __NR_lchown32 198 207 + #define __NR_getuid32 199 208 + #define __NR_getgid32 200 209 + #define __NR_geteuid32 201 210 + #define __NR_getegid32 202 211 + #define __NR_setreuid32 203 212 + #define __NR_setregid32 204 213 + #define __NR_getgroups32 205 214 + #define __NR_setgroups32 206 215 + #define __NR_fchown32 207 216 + #define __NR_setresuid32 208 217 + #define __NR_getresuid32 209 218 + #define __NR_setresgid32 210 219 + #define __NR_getresgid32 211 220 + #define __NR_chown32 212 221 + #define __NR_setuid32 213 222 + #define __NR_setgid32 214 223 + #define __NR_setfsuid32 215 224 + #define __NR_setfsgid32 216 225 + #define __NR_pivot_root 217 226 + #define __NR_mincore 218 227 + #define __NR_madvise 219 228 + #define __NR_getdents64 220 229 + #define __NR_fcntl64 221 230 + /* 223 is unused */ 231 + #define __NR_gettid 224 232 + #define __NR_readahead 225 233 + #define __NR_setxattr 226 234 + #define __NR_lsetxattr 227 235 + #define __NR_fsetxattr 228 236 + #define __NR_getxattr 229 237 + #define __NR_lgetxattr 230 238 + #define __NR_fgetxattr 231 239 + #define __NR_listxattr 232 240 + #define __NR_llistxattr 233 241 + #define __NR_flistxattr 234 242 + #define __NR_removexattr 235 243 + #define __NR_lremovexattr 236 244 + #define __NR_fremovexattr 237 245 + #define __NR_tkill 238 246 + #define __NR_sendfile64 239 247 + #define __NR_futex 240 248 + #define __NR_sched_setaffinity 241 249 + #define __NR_sched_getaffinity 242 250 + #define __NR_set_thread_area 243 251 + #define __NR_get_thread_area 244 252 + #define __NR_io_setup 245 253 + #define __NR_io_destroy 246 254 + #define __NR_io_getevents 247 255 + #define __NR_io_submit 248 256 + #define __NR_io_cancel 249 257 + #define __NR_fadvise64 250 258 + /* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ 259 + #define __NR_exit_group 252 260 + #define __NR_lookup_dcookie 253 261 + #define __NR_epoll_create 254 262 + #define __NR_epoll_ctl 255 263 + #define __NR_epoll_wait 256 264 + #define __NR_remap_file_pages 257 265 + #define __NR_set_tid_address 258 266 + #define __NR_timer_create 259 267 + #define __NR_timer_settime (__NR_timer_create+1) 268 + #define __NR_timer_gettime (__NR_timer_create+2) 269 + #define __NR_timer_getoverrun (__NR_timer_create+3) 270 + #define __NR_timer_delete (__NR_timer_create+4) 271 + #define __NR_clock_settime (__NR_timer_create+5) 272 + #define __NR_clock_gettime (__NR_timer_create+6) 273 + #define __NR_clock_getres (__NR_timer_create+7) 274 + #define __NR_clock_nanosleep (__NR_timer_create+8) 275 + #define __NR_statfs64 268 276 + #define __NR_fstatfs64 269 277 + #define __NR_tgkill 270 278 + #define __NR_utimes 271 279 + #define __NR_fadvise64_64 272 280 + #define __NR_vserver 273 281 + #define __NR_mbind 274 282 + #define __NR_get_mempolicy 275 283 + #define __NR_set_mempolicy 276 284 + #define __NR_mq_open 277 285 + #define __NR_mq_unlink (__NR_mq_open+1) 286 + #define __NR_mq_timedsend (__NR_mq_open+2) 287 + #define __NR_mq_timedreceive (__NR_mq_open+3) 288 + #define __NR_mq_notify (__NR_mq_open+4) 289 + #define __NR_mq_getsetattr (__NR_mq_open+5) 290 + #define __NR_kexec_load 283 291 + #define __NR_waitid 284 292 + /* #define __NR_sys_setaltroot 285 */ 293 + #define __NR_add_key 286 294 + #define __NR_request_key 287 295 + #define __NR_keyctl 288 296 + #define __NR_ioprio_set 289 297 + #define __NR_ioprio_get 290 298 + #define __NR_inotify_init 291 299 + #define __NR_inotify_add_watch 292 300 + #define __NR_inotify_rm_watch 293 301 + #define __NR_migrate_pages 294 302 + #define __NR_openat 295 303 + #define __NR_mkdirat 296 304 + #define __NR_mknodat 297 305 + #define __NR_fchownat 298 306 + #define __NR_futimesat 299 307 + #define __NR_fstatat64 300 308 + #define __NR_unlinkat 301 309 + #define __NR_renameat 302 310 + #define __NR_linkat 303 311 + #define __NR_symlinkat 304 312 + #define __NR_readlinkat 305 313 + #define __NR_fchmodat 306 314 + #define __NR_faccessat 307 315 + #define __NR_pselect6 308 316 + #define __NR_ppoll 309 317 + #define __NR_unshare 310 318 + #define __NR_set_robust_list 311 319 + #define __NR_get_robust_list 312 320 + #define __NR_splice 313 321 + #define __NR_sync_file_range 314 322 + #define __NR_tee 315 323 + #define __NR_vmsplice 316 324 + #define __NR_move_pages 317 325 + #define __NR_getcpu 318 326 + #define __NR_epoll_pwait 319 327 + #define __NR_utimensat 320 328 + #define __NR_signalfd 321 329 + #define __NR_timerfd_create 322 330 + #define __NR_eventfd 323 331 + #define __NR_fallocate 324 332 + #define __NR_timerfd_settime 325 333 + #define __NR_timerfd_gettime 326 334 + 335 + #ifdef __KERNEL__ 336 + 337 + #define NR_syscalls 327 338 + 339 + #include <arch/unistd.h> 340 + 341 + #define __ARCH_WANT_IPC_PARSE_VERSION 342 + #define __ARCH_WANT_OLD_READDIR 343 + #define __ARCH_WANT_OLD_STAT 344 + #define __ARCH_WANT_STAT64 345 + #define __ARCH_WANT_SYS_ALARM 346 + #define __ARCH_WANT_SYS_GETHOSTNAME 347 + #define __ARCH_WANT_SYS_PAUSE 348 + #define __ARCH_WANT_SYS_SGETMASK 349 + #define __ARCH_WANT_SYS_SIGNAL 350 + #define __ARCH_WANT_SYS_TIME 351 + #define __ARCH_WANT_SYS_UTIME 352 + #define __ARCH_WANT_SYS_WAITPID 353 + #define __ARCH_WANT_SYS_SOCKETCALL 354 + #define __ARCH_WANT_SYS_FADVISE64 355 + #define __ARCH_WANT_SYS_GETPGRP 356 + #define __ARCH_WANT_SYS_LLSEEK 357 + #define __ARCH_WANT_SYS_NICE 358 + #define __ARCH_WANT_SYS_OLD_GETRLIMIT 359 + #define __ARCH_WANT_SYS_OLDUMOUNT 360 + #define __ARCH_WANT_SYS_SIGPENDING 361 + #define __ARCH_WANT_SYS_SIGPROCMASK 362 + #define __ARCH_WANT_SYS_RT_SIGACTION 363 + #define __ARCH_WANT_SYS_RT_SIGSUSPEND 364 + 365 + /* 366 + * "Conditional" syscalls 367 + * 368 + * What we want is __attribute__((weak,alias("sys_ni_syscall"))), 369 + * but it doesn't work on all toolchains, so we just do it by hand 370 + */ 371 + #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 372 + 373 + #endif /* __KERNEL__ */ 374 + #endif /* _ASM_CRIS_UNISTD_H_ */
+52
arch/cris/include/asm/user.h
··· 1 + #ifndef __ASM_CRIS_USER_H 2 + #define __ASM_CRIS_USER_H 3 + 4 + #include <linux/types.h> 5 + #include <asm/ptrace.h> 6 + #include <asm/page.h> 7 + #include <arch/user.h> 8 + 9 + /* 10 + * Core file format: The core file is written in such a way that gdb 11 + * can understand it and provide useful information to the user (under 12 + * linux we use the `trad-core' bfd). The file contents are as follows: 13 + * 14 + * upage: 1 page consisting of a user struct that tells gdb 15 + * what is present in the file. Directly after this is a 16 + * copy of the task_struct, which is currently not used by gdb, 17 + * but it may come in handy at some point. All of the registers 18 + * are stored as part of the upage. The upage should always be 19 + * only one page long. 20 + * data: The data segment follows next. We use current->end_text to 21 + * current->brk to pick up all of the user variables, plus any memory 22 + * that may have been sbrk'ed. No attempt is made to determine if a 23 + * page is demand-zero or if a page is totally unused, we just cover 24 + * the entire range. All of the addresses are rounded in such a way 25 + * that an integral number of pages is written. 26 + * stack: We need the stack information in order to get a meaningful 27 + * backtrace. We need to write the data from usp to 28 + * current->start_stack, so we round each of these in order to be able 29 + * to write an integer number of pages. 30 + */ 31 + 32 + struct user { 33 + struct user_regs_struct regs; /* entire machine state */ 34 + size_t u_tsize; /* text size (pages) */ 35 + size_t u_dsize; /* data size (pages) */ 36 + size_t u_ssize; /* stack size (pages) */ 37 + unsigned long start_code; /* text starting address */ 38 + unsigned long start_data; /* data starting address */ 39 + unsigned long start_stack; /* stack starting address */ 40 + long int signal; /* signal causing core dump */ 41 + unsigned long u_ar0; /* help gdb find registers */ 42 + unsigned long magic; /* identifies a core file */ 43 + char u_comm[32]; /* user command name */ 44 + }; 45 + 46 + #define NBPG PAGE_SIZE 47 + #define UPAGES 1 48 + #define HOST_TEXT_START_ADDR (u.start_code) 49 + #define HOST_DATA_START_ADDR (u.start_data) 50 + #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 51 + 52 + #endif /* __ASM_CRIS_USER_H */
+1 -1
arch/cris/mm/ioremap.c
··· 12 12 #include <linux/vmalloc.h> 13 13 #include <linux/io.h> 14 14 #include <asm/pgalloc.h> 15 - #include <asm/arch/memmap.h> 15 + #include <arch/memmap.h> 16 16 17 17 /* 18 18 * Generic mapping function (not visible outside):
+2 -2
drivers/net/cris/eth_v10.c
··· 32 32 #include <linux/skbuff.h> 33 33 #include <linux/ethtool.h> 34 34 35 - #include <asm/arch/svinto.h>/* DMA and register descriptions */ 35 + #include <arch/svinto.h>/* DMA and register descriptions */ 36 36 #include <asm/io.h> /* CRIS_LED_* I/O functions */ 37 37 #include <asm/irq.h> 38 38 #include <asm/dma.h> 39 39 #include <asm/system.h> 40 40 #include <asm/ethernet.h> 41 41 #include <asm/cache.h> 42 - #include <asm/arch/io_interface_mux.h> 42 + #include <arch/io_interface_mux.h> 43 43 44 44 //#define ETHDEBUG 45 45 #define D(x)
+2 -2
drivers/serial/crisv10.c
··· 34 34 #include <asm/system.h> 35 35 #include <linux/delay.h> 36 36 37 - #include <asm/arch/svinto.h> 37 + #include <arch/svinto.h> 38 38 39 39 /* non-arch dependent serial structures are in linux/serial.h */ 40 40 #include <linux/serial.h> 41 41 /* while we keep our own stuff (struct e100_serial) in a local .h file */ 42 42 #include "crisv10.h" 43 43 #include <asm/fasttimer.h> 44 - #include <asm/arch/io_interface_mux.h> 44 + #include <arch/io_interface_mux.h> 45 45 46 46 #ifdef CONFIG_ETRAX_SERIAL_FAST_TIMER 47 47 #ifndef CONFIG_ETRAX_FAST_TIMER
+1 -1
drivers/serial/crisv10.h
··· 10 10 #include <linux/circ_buf.h> 11 11 #include <asm/termios.h> 12 12 #include <asm/dma.h> 13 - #include <asm/arch/io_interface_mux.h> 13 + #include <arch/io_interface_mux.h> 14 14 15 15 /* Software state per channel */ 16 16
include/asm-cris/Kbuild arch/cris/include/asm/Kbuild
include/asm-cris/arch-v10/Kbuild arch/cris/include/arch-v10/arch/Kbuild
include/asm-cris/arch-v10/atomic.h arch/cris/include/arch-v10/arch/atomic.h
include/asm-cris/arch-v10/bitops.h arch/cris/include/arch-v10/arch/bitops.h
include/asm-cris/arch-v10/bug.h arch/cris/include/arch-v10/arch/bug.h
include/asm-cris/arch-v10/byteorder.h arch/cris/include/arch-v10/arch/byteorder.h
include/asm-cris/arch-v10/cache.h arch/cris/include/arch-v10/arch/cache.h
include/asm-cris/arch-v10/checksum.h arch/cris/include/arch-v10/arch/checksum.h
include/asm-cris/arch-v10/delay.h arch/cris/include/arch-v10/arch/delay.h
include/asm-cris/arch-v10/dma.h arch/cris/include/arch-v10/arch/dma.h
include/asm-cris/arch-v10/elf.h arch/cris/include/arch-v10/arch/elf.h
-199
include/asm-cris/arch-v10/io.h
··· 1 - #ifndef _ASM_ARCH_CRIS_IO_H 2 - #define _ASM_ARCH_CRIS_IO_H 3 - 4 - #include <asm/arch/svinto.h> 5 - 6 - /* Etrax shadow registers - which live in arch/cris/kernel/shadows.c */ 7 - 8 - extern unsigned long gen_config_ii_shadow; 9 - extern unsigned long port_g_data_shadow; 10 - extern unsigned char port_pa_dir_shadow; 11 - extern unsigned char port_pa_data_shadow; 12 - extern unsigned char port_pb_i2c_shadow; 13 - extern unsigned char port_pb_config_shadow; 14 - extern unsigned char port_pb_dir_shadow; 15 - extern unsigned char port_pb_data_shadow; 16 - extern unsigned long r_timer_ctrl_shadow; 17 - 18 - extern unsigned long port_cse1_shadow; 19 - extern unsigned long port_csp0_shadow; 20 - extern unsigned long port_csp4_shadow; 21 - 22 - extern volatile unsigned long *port_cse1_addr; 23 - extern volatile unsigned long *port_csp0_addr; 24 - extern volatile unsigned long *port_csp4_addr; 25 - 26 - /* macro for setting regs through a shadow - 27 - * r = register name (like R_PORT_PA_DATA) 28 - * s = shadow name (like port_pa_data_shadow) 29 - * b = bit number 30 - * v = value (0 or 1) 31 - */ 32 - 33 - #define REG_SHADOW_SET(r,s,b,v) *r = s = (s & ~(1 << (b))) | ((v) << (b)) 34 - 35 - /* The LED's on various Etrax-based products are set differently. */ 36 - 37 - #if defined(CONFIG_ETRAX_NO_LEDS) || defined(CONFIG_SVINTO_SIM) 38 - #undef CONFIG_ETRAX_PA_LEDS 39 - #undef CONFIG_ETRAX_PB_LEDS 40 - #undef CONFIG_ETRAX_CSP0_LEDS 41 - #define CRIS_LED_NETWORK_SET_G(x) 42 - #define CRIS_LED_NETWORK_SET_R(x) 43 - #define CRIS_LED_ACTIVE_SET_G(x) 44 - #define CRIS_LED_ACTIVE_SET_R(x) 45 - #define CRIS_LED_DISK_WRITE(x) 46 - #define CRIS_LED_DISK_READ(x) 47 - #endif 48 - 49 - #if !defined(CONFIG_ETRAX_CSP0_LEDS) 50 - #define CRIS_LED_BIT_SET(x) 51 - #define CRIS_LED_BIT_CLR(x) 52 - #endif 53 - 54 - #define CRIS_LED_OFF 0x00 55 - #define CRIS_LED_GREEN 0x01 56 - #define CRIS_LED_RED 0x02 57 - #define CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_LED_RED) 58 - 59 - #if defined(CONFIG_ETRAX_NO_LEDS) 60 - #define CRIS_LED_NETWORK_SET(x) 61 - #else 62 - #if CONFIG_ETRAX_LED1G == CONFIG_ETRAX_LED1R 63 - #define CRIS_LED_NETWORK_SET(x) \ 64 - do { \ 65 - CRIS_LED_NETWORK_SET_G((x) & CRIS_LED_GREEN); \ 66 - } while (0) 67 - #else 68 - #define CRIS_LED_NETWORK_SET(x) \ 69 - do { \ 70 - CRIS_LED_NETWORK_SET_G((x) & CRIS_LED_GREEN); \ 71 - CRIS_LED_NETWORK_SET_R((x) & CRIS_LED_RED); \ 72 - } while (0) 73 - #endif 74 - #if CONFIG_ETRAX_LED2G == CONFIG_ETRAX_LED2R 75 - #define CRIS_LED_ACTIVE_SET(x) \ 76 - do { \ 77 - CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \ 78 - } while (0) 79 - #else 80 - #define CRIS_LED_ACTIVE_SET(x) \ 81 - do { \ 82 - CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \ 83 - CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \ 84 - } while (0) 85 - #endif 86 - #endif 87 - 88 - #ifdef CONFIG_ETRAX_PA_LEDS 89 - #define CRIS_LED_NETWORK_SET_G(x) \ 90 - REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1G, !(x)) 91 - #define CRIS_LED_NETWORK_SET_R(x) \ 92 - REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED1R, !(x)) 93 - #define CRIS_LED_ACTIVE_SET_G(x) \ 94 - REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2G, !(x)) 95 - #define CRIS_LED_ACTIVE_SET_R(x) \ 96 - REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED2R, !(x)) 97 - #define CRIS_LED_DISK_WRITE(x) \ 98 - do{\ 99 - REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3G, !(x));\ 100 - REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, CONFIG_ETRAX_LED3R, !(x));\ 101 - }while(0) 102 - #define CRIS_LED_DISK_READ(x) \ 103 - REG_SHADOW_SET(R_PORT_PA_DATA, port_pa_data_shadow, \ 104 - CONFIG_ETRAX_LED3G, !(x)) 105 - #endif 106 - 107 - #ifdef CONFIG_ETRAX_PB_LEDS 108 - #define CRIS_LED_NETWORK_SET_G(x) \ 109 - REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1G, !(x)) 110 - #define CRIS_LED_NETWORK_SET_R(x) \ 111 - REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED1R, !(x)) 112 - #define CRIS_LED_ACTIVE_SET_G(x) \ 113 - REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2G, !(x)) 114 - #define CRIS_LED_ACTIVE_SET_R(x) \ 115 - REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED2R, !(x)) 116 - #define CRIS_LED_DISK_WRITE(x) \ 117 - do{\ 118 - REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3G, !(x));\ 119 - REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, CONFIG_ETRAX_LED3R, !(x));\ 120 - }while(0) 121 - #define CRIS_LED_DISK_READ(x) \ 122 - REG_SHADOW_SET(R_PORT_PB_DATA, port_pb_data_shadow, \ 123 - CONFIG_ETRAX_LED3G, !(x)) 124 - #endif 125 - 126 - #ifdef CONFIG_ETRAX_CSP0_LEDS 127 - #define CONFIGURABLE_LEDS\ 128 - ((1 << CONFIG_ETRAX_LED1G ) | (1 << CONFIG_ETRAX_LED1R ) |\ 129 - (1 << CONFIG_ETRAX_LED2G ) | (1 << CONFIG_ETRAX_LED2R ) |\ 130 - (1 << CONFIG_ETRAX_LED3G ) | (1 << CONFIG_ETRAX_LED3R ) |\ 131 - (1 << CONFIG_ETRAX_LED4G ) | (1 << CONFIG_ETRAX_LED4R ) |\ 132 - (1 << CONFIG_ETRAX_LED5G ) | (1 << CONFIG_ETRAX_LED5R ) |\ 133 - (1 << CONFIG_ETRAX_LED6G ) | (1 << CONFIG_ETRAX_LED6R ) |\ 134 - (1 << CONFIG_ETRAX_LED7G ) | (1 << CONFIG_ETRAX_LED7R ) |\ 135 - (1 << CONFIG_ETRAX_LED8Y ) | (1 << CONFIG_ETRAX_LED9Y ) |\ 136 - (1 << CONFIG_ETRAX_LED10Y ) |(1 << CONFIG_ETRAX_LED11Y )|\ 137 - (1 << CONFIG_ETRAX_LED12R )) 138 - 139 - #define CRIS_LED_NETWORK_SET_G(x) \ 140 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1G, !(x)) 141 - #define CRIS_LED_NETWORK_SET_R(x) \ 142 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED1R, !(x)) 143 - #define CRIS_LED_ACTIVE_SET_G(x) \ 144 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2G, !(x)) 145 - #define CRIS_LED_ACTIVE_SET_R(x) \ 146 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED2R, !(x)) 147 - #define CRIS_LED_DISK_WRITE(x) \ 148 - do{\ 149 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x));\ 150 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3R, !(x));\ 151 - }while(0) 152 - #define CRIS_LED_DISK_READ(x) \ 153 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_LED3G, !(x)) 154 - #define CRIS_LED_BIT_SET(x)\ 155 - do{\ 156 - if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\ 157 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 1);\ 158 - }while(0) 159 - #define CRIS_LED_BIT_CLR(x)\ 160 - do{\ 161 - if((( 1 << x) & CONFIGURABLE_LEDS) != 0)\ 162 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, x, 0);\ 163 - }while(0) 164 - #endif 165 - 166 - # 167 - #ifdef CONFIG_ETRAX_SOFT_SHUTDOWN 168 - #define SOFT_SHUTDOWN() \ 169 - REG_SHADOW_SET(port_csp0_addr, port_csp0_shadow, CONFIG_ETRAX_SHUTDOWN_BIT, 1) 170 - #else 171 - #define SOFT_SHUTDOWN() 172 - #endif 173 - 174 - /* Console I/O for simulated etrax100. Use #ifdef so erroneous 175 - use will be evident. */ 176 - #ifdef CONFIG_SVINTO_SIM 177 - /* Let's use the ucsim interface since it lets us do write(2, ...) */ 178 - #define SIMCOUT(s,len) \ 179 - asm ("moveq 4,$r9 \n\t" \ 180 - "moveq 2,$r10 \n\t" \ 181 - "move.d %0,$r11 \n\t" \ 182 - "move.d %1,$r12 \n\t" \ 183 - "push $irp \n\t" \ 184 - "move 0f,$irp \n\t" \ 185 - "jump -6809 \n" \ 186 - "0: \n\t" \ 187 - "pop $irp" \ 188 - : : "rm" (s), "rm" (len) : "r9","r10","r11","r12","memory") 189 - #define TRACE_ON() __extension__ \ 190 - ({ int _Foofoo; __asm__ volatile ("bmod [%0],%0" : "=r" (_Foofoo) : "0" \ 191 - (255)); _Foofoo; }) 192 - 193 - #define TRACE_OFF() do { __asm__ volatile ("bmod [%0],%0" :: "r" (254)); } while (0) 194 - #define SIM_END() do { __asm__ volatile ("bmod [%0],%0" :: "r" (28)); } while (0) 195 - #define CRIS_CYCLES() __extension__ \ 196 - ({ unsigned long c; asm ("bmod [%1],%0" : "=r" (c) : "r" (27)); c;}) 197 - #endif /* ! defined CONFIG_SVINTO_SIM */ 198 - 199 - #endif
include/asm-cris/arch-v10/io_interface_mux.h arch/cris/include/arch-v10/arch/io_interface_mux.h
-160
include/asm-cris/arch-v10/irq.h
··· 1 - /* 2 - * Interrupt handling assembler and defines for Linux/CRISv10 3 - */ 4 - 5 - #ifndef _ASM_ARCH_IRQ_H 6 - #define _ASM_ARCH_IRQ_H 7 - 8 - #include <asm/arch/sv_addr_ag.h> 9 - 10 - #define NR_IRQS 32 11 - 12 - /* The first vector number used for IRQs in v10 is really 0x20 */ 13 - /* but all the code and constants are offseted to make 0 the first */ 14 - #define FIRST_IRQ 0 15 - 16 - #define SOME_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, some) /* 0 ? */ 17 - #define NMI_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, nmi) /* 1 */ 18 - #define TIMER0_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, timer0) /* 2 */ 19 - #define TIMER1_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, timer1) /* 3 */ 20 - /* mio, ata, par0, scsi0 on 4 */ 21 - /* par1, scsi1 on 5 */ 22 - #define NETWORK_STATUS_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, network) /* 6 */ 23 - 24 - #define SERIAL_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, serial) /* 8 */ 25 - #define PA_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, pa) /* 11 */ 26 - /* extdma0 and extdma1 is at irq 12 and 13 and/or same as dma5 and dma6 ? */ 27 - #define EXTDMA0_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, ext_dma0) 28 - #define EXTDMA1_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, ext_dma1) 29 - 30 - /* dma0-9 is irq 16..25 */ 31 - /* 16,17: network */ 32 - #define DMA0_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma0) 33 - #define DMA1_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma1) 34 - #define NETWORK_DMA_TX_IRQ_NBR DMA0_TX_IRQ_NBR 35 - #define NETWORK_DMA_RX_IRQ_NBR DMA1_RX_IRQ_NBR 36 - 37 - /* 18,19: dma2 and dma3 shared by par0, scsi0, ser2 and ata */ 38 - #define DMA2_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma2) 39 - #define DMA3_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma3) 40 - #define SER2_DMA_TX_IRQ_NBR DMA2_TX_IRQ_NBR 41 - #define SER2_DMA_RX_IRQ_NBR DMA3_RX_IRQ_NBR 42 - 43 - /* 20,21: dma4 and dma5 shared by par1, scsi1, ser3 and extdma0 */ 44 - #define DMA4_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma4) 45 - #define DMA5_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma5) 46 - #define SER3_DMA_TX_IRQ_NBR DMA4_TX_IRQ_NBR 47 - #define SER3_DMA_RX_IRQ_NBR DMA5_RX_IRQ_NBR 48 - 49 - /* 22,23: dma6 and dma7 shared by ser0, extdma1 and mem2mem */ 50 - #define DMA6_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma6) 51 - #define DMA7_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma7) 52 - #define SER0_DMA_TX_IRQ_NBR DMA6_TX_IRQ_NBR 53 - #define SER0_DMA_RX_IRQ_NBR DMA7_RX_IRQ_NBR 54 - #define MEM2MEM_DMA_TX_IRQ_NBR DMA6_TX_IRQ_NBR 55 - #define MEM2MEM_DMA_RX_IRQ_NBR DMA7_RX_IRQ_NBR 56 - 57 - /* 24,25: dma8 and dma9 shared by ser1 and usb */ 58 - #define DMA8_TX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma8) 59 - #define DMA9_RX_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, dma9) 60 - #define SER1_DMA_TX_IRQ_NBR DMA8_TX_IRQ_NBR 61 - #define SER1_DMA_RX_IRQ_NBR DMA9_RX_IRQ_NBR 62 - #define USB_DMA_TX_IRQ_NBR DMA8_TX_IRQ_NBR 63 - #define USB_DMA_RX_IRQ_NBR DMA9_RX_IRQ_NBR 64 - 65 - /* usb: controller at irq 31 + uses DMA8 and DMA9 */ 66 - #define USB_HC_IRQ_NBR IO_BITNR(R_VECT_MASK_RD, usb) 67 - 68 - /* our fine, global, etrax irq vector! the pointer lives in the head.S file. */ 69 - 70 - typedef void (*irqvectptr)(void); 71 - 72 - struct etrax_interrupt_vector { 73 - irqvectptr v[256]; 74 - }; 75 - 76 - extern struct etrax_interrupt_vector *etrax_irv; 77 - void set_int_vector(int n, irqvectptr addr); 78 - void set_break_vector(int n, irqvectptr addr); 79 - 80 - #define __STR(x) #x 81 - #define STR(x) __STR(x) 82 - 83 - /* SAVE_ALL saves registers so they match pt_regs */ 84 - 85 - #define SAVE_ALL \ 86 - "move $irp,[$sp=$sp-16]\n\t" /* push instruction pointer and fake SBFS struct */ \ 87 - "push $srp\n\t" /* push subroutine return pointer */ \ 88 - "push $dccr\n\t" /* push condition codes */ \ 89 - "push $mof\n\t" /* push multiply overflow reg */ \ 90 - "di\n\t" /* need to disable irq's at this point */\ 91 - "subq 14*4,$sp\n\t" /* make room for r0-r13 */ \ 92 - "movem $r13,[$sp]\n\t" /* push the r0-r13 registers */ \ 93 - "push $r10\n\t" /* push orig_r10 */ \ 94 - "clear.d [$sp=$sp-4]\n\t" /* frametype - this is a normal stackframe */ 95 - 96 - /* BLOCK_IRQ and UNBLOCK_IRQ do the same as mask_irq and unmask_irq */ 97 - 98 - #define BLOCK_IRQ(mask,nr) \ 99 - "move.d " #mask ",$r0\n\t" \ 100 - "move.d $r0,[0xb00000d8]\n\t" 101 - 102 - #define UNBLOCK_IRQ(mask) \ 103 - "move.d " #mask ",$r0\n\t" \ 104 - "move.d $r0,[0xb00000dc]\n\t" 105 - 106 - #define IRQ_NAME2(nr) nr##_interrupt(void) 107 - #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr) 108 - #define sIRQ_NAME(nr) IRQ_NAME2(sIRQ##nr) 109 - #define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr) 110 - 111 - /* the asm IRQ handler makes sure the causing IRQ is blocked, then it calls 112 - * do_IRQ (with irq disabled still). after that it unblocks and jumps to 113 - * ret_from_intr (entry.S) 114 - * 115 - * The reason the IRQ is blocked is to allow an sti() before the handler which 116 - * will acknowledge the interrupt is run. 117 - */ 118 - 119 - #define BUILD_IRQ(nr,mask) \ 120 - void IRQ_NAME(nr); \ 121 - __asm__ ( \ 122 - ".text\n\t" \ 123 - "IRQ" #nr "_interrupt:\n\t" \ 124 - SAVE_ALL \ 125 - BLOCK_IRQ(mask,nr) /* this must be done to prevent irq loops when we ei later */ \ 126 - "moveq "#nr",$r10\n\t" \ 127 - "move.d $sp,$r11\n\t" \ 128 - "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \ 129 - UNBLOCK_IRQ(mask) \ 130 - "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \ 131 - "jump ret_from_intr\n\t"); 132 - 133 - /* This is subtle. The timer interrupt is crucial and it should not be disabled for 134 - * too long. However, if it had been a normal interrupt as per BUILD_IRQ, it would 135 - * have been BLOCK'ed, and then softirq's are run before we return here to UNBLOCK. 136 - * If the softirq's take too much time to run, the timer irq won't run and the 137 - * watchdog will kill us. 138 - * 139 - * Furthermore, if a lot of other irq's occur before we return here, the multiple_irq 140 - * handler is run and it prioritizes the timer interrupt. However if we had BLOCK'ed 141 - * it here, we would not get the multiple_irq at all. 142 - * 143 - * The non-blocking here is based on the knowledge that the timer interrupt is 144 - * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not 145 - * be an sti() before the timer irq handler is run to acknowledge the interrupt. 146 - */ 147 - 148 - #define BUILD_TIMER_IRQ(nr,mask) \ 149 - void IRQ_NAME(nr); \ 150 - __asm__ ( \ 151 - ".text\n\t" \ 152 - "IRQ" #nr "_interrupt:\n\t" \ 153 - SAVE_ALL \ 154 - "moveq "#nr",$r10\n\t" \ 155 - "move.d $sp,$r11\n\t" \ 156 - "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \ 157 - "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \ 158 - "jump ret_from_intr\n\t"); 159 - 160 - #endif
include/asm-cris/arch-v10/memmap.h arch/cris/include/arch-v10/arch/memmap.h
include/asm-cris/arch-v10/mmu.h arch/cris/include/arch-v10/arch/mmu.h
include/asm-cris/arch-v10/offset.h arch/cris/include/arch-v10/arch/offset.h
include/asm-cris/arch-v10/page.h arch/cris/include/arch-v10/arch/page.h
include/asm-cris/arch-v10/pgtable.h arch/cris/include/arch-v10/arch/pgtable.h
include/asm-cris/arch-v10/processor.h arch/cris/include/arch-v10/arch/processor.h
include/asm-cris/arch-v10/ptrace.h arch/cris/include/arch-v10/arch/ptrace.h
include/asm-cris/arch-v10/sv_addr.agh arch/cris/include/arch-v10/arch/sv_addr.agh
include/asm-cris/arch-v10/sv_addr_ag.h arch/cris/include/arch-v10/arch/sv_addr_ag.h
include/asm-cris/arch-v10/svinto.h arch/cris/include/arch-v10/arch/svinto.h
include/asm-cris/arch-v10/system.h arch/cris/include/arch-v10/arch/system.h
include/asm-cris/arch-v10/thread_info.h arch/cris/include/arch-v10/arch/thread_info.h
include/asm-cris/arch-v10/timex.h arch/cris/include/arch-v10/arch/timex.h
include/asm-cris/arch-v10/tlb.h arch/cris/include/arch-v10/arch/tlb.h
include/asm-cris/arch-v10/uaccess.h arch/cris/include/arch-v10/arch/uaccess.h
include/asm-cris/arch-v10/unistd.h arch/cris/include/arch-v10/arch/unistd.h
include/asm-cris/arch-v10/user.h arch/cris/include/arch-v10/arch/user.h
include/asm-cris/arch-v32/Kbuild arch/cris/include/arch-v32/arch/Kbuild
-30
include/asm-cris/arch-v32/arbiter.h
··· 1 - #ifndef _ASM_CRIS_ARCH_ARBITER_H 2 - #define _ASM_CRIS_ARCH_ARBITER_H 3 - 4 - #define EXT_REGION 0 5 - #define INT_REGION 1 6 - 7 - typedef void (watch_callback)(void); 8 - 9 - enum 10 - { 11 - arbiter_all_dmas = 0x3ff, 12 - arbiter_cpu = 0xc00, 13 - arbiter_all_clients = 0x3fff 14 - }; 15 - 16 - enum 17 - { 18 - arbiter_all_read = 0x55, 19 - arbiter_all_write = 0xaa, 20 - arbiter_all_accesses = 0xff 21 - }; 22 - 23 - int crisv32_arbiter_allocate_bandwidth(int client, int region, 24 - unsigned long bandwidth); 25 - int crisv32_arbiter_watch(unsigned long start, unsigned long size, 26 - unsigned long clients, unsigned long accesses, 27 - watch_callback* cb); 28 - int crisv32_arbiter_unwatch(int id); 29 - 30 - #endif
include/asm-cris/arch-v32/atomic.h arch/cris/include/arch-v32/arch/atomic.h
include/asm-cris/arch-v32/bitops.h arch/cris/include/arch-v32/arch/bitops.h
include/asm-cris/arch-v32/bug.h arch/cris/include/arch-v32/arch/bug.h
include/asm-cris/arch-v32/byteorder.h arch/cris/include/arch-v32/arch/byteorder.h
-19
include/asm-cris/arch-v32/cache.h
··· 1 - #ifndef _ASM_CRIS_ARCH_CACHE_H 2 - #define _ASM_CRIS_ARCH_CACHE_H 3 - 4 - #include <asm/arch/hwregs/dma.h> 5 - 6 - /* A cache-line is 32 bytes. */ 7 - #define L1_CACHE_BYTES 32 8 - #define L1_CACHE_SHIFT 5 9 - 10 - void flush_dma_list(dma_descr_data *descr); 11 - void flush_dma_descr(dma_descr_data *descr, int flush_buf); 12 - 13 - #define flush_dma_context(c) \ 14 - flush_dma_list(phys_to_virt((c)->saved_data)); 15 - 16 - void cris_flush_cache_range(void *buf, unsigned long len); 17 - void cris_flush_cache(void); 18 - 19 - #endif /* _ASM_CRIS_ARCH_CACHE_H */
include/asm-cris/arch-v32/checksum.h arch/cris/include/arch-v32/arch/checksum.h
-272
include/asm-cris/arch-v32/cryptocop.h
··· 1 - /* 2 - * The device /dev/cryptocop is accessible using this driver using 3 - * CRYPTOCOP_MAJOR (254) and minor number 0. 4 - */ 5 - 6 - #ifndef CRYPTOCOP_H 7 - #define CRYPTOCOP_H 8 - 9 - #include <linux/uio.h> 10 - 11 - 12 - #define CRYPTOCOP_SESSION_ID_NONE (0) 13 - 14 - typedef unsigned long long int cryptocop_session_id; 15 - 16 - /* cryptocop ioctls */ 17 - #define ETRAXCRYPTOCOP_IOCTYPE (250) 18 - 19 - #define CRYPTOCOP_IO_CREATE_SESSION _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 1, struct strcop_session_op) 20 - #define CRYPTOCOP_IO_CLOSE_SESSION _IOW(ETRAXCRYPTOCOP_IOCTYPE, 2, struct strcop_session_op) 21 - #define CRYPTOCOP_IO_PROCESS_OP _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 3, struct strcop_crypto_op) 22 - #define CRYPTOCOP_IO_MAXNR (3) 23 - 24 - typedef enum { 25 - cryptocop_cipher_des = 0, 26 - cryptocop_cipher_3des = 1, 27 - cryptocop_cipher_aes = 2, 28 - cryptocop_cipher_m2m = 3, /* mem2mem is essentially a NULL cipher with blocklength=1 */ 29 - cryptocop_cipher_none 30 - } cryptocop_cipher_type; 31 - 32 - typedef enum { 33 - cryptocop_digest_sha1 = 0, 34 - cryptocop_digest_md5 = 1, 35 - cryptocop_digest_none 36 - } cryptocop_digest_type; 37 - 38 - typedef enum { 39 - cryptocop_csum_le = 0, 40 - cryptocop_csum_be = 1, 41 - cryptocop_csum_none 42 - } cryptocop_csum_type; 43 - 44 - typedef enum { 45 - cryptocop_cipher_mode_ecb = 0, 46 - cryptocop_cipher_mode_cbc, 47 - cryptocop_cipher_mode_none 48 - } cryptocop_cipher_mode; 49 - 50 - typedef enum { 51 - cryptocop_3des_eee = 0, 52 - cryptocop_3des_eed = 1, 53 - cryptocop_3des_ede = 2, 54 - cryptocop_3des_edd = 3, 55 - cryptocop_3des_dee = 4, 56 - cryptocop_3des_ded = 5, 57 - cryptocop_3des_dde = 6, 58 - cryptocop_3des_ddd = 7 59 - } cryptocop_3des_mode; 60 - 61 - /* Usermode accessible (ioctl) operations. */ 62 - struct strcop_session_op{ 63 - cryptocop_session_id ses_id; 64 - 65 - cryptocop_cipher_type cipher; /* AES, DES, 3DES, m2m, none */ 66 - 67 - cryptocop_cipher_mode cmode; /* ECB, CBC, none */ 68 - cryptocop_3des_mode des3_mode; 69 - 70 - cryptocop_digest_type digest; /* MD5, SHA1, none */ 71 - 72 - cryptocop_csum_type csum; /* BE, LE, none */ 73 - 74 - unsigned char *key; 75 - size_t keylen; 76 - }; 77 - 78 - #define CRYPTOCOP_CSUM_LENGTH (2) 79 - #define CRYPTOCOP_MAX_DIGEST_LENGTH (20) /* SHA-1 20, MD5 16 */ 80 - #define CRYPTOCOP_MAX_IV_LENGTH (16) /* (3)DES==8, AES == 16 */ 81 - #define CRYPTOCOP_MAX_KEY_LENGTH (32) 82 - 83 - struct strcop_crypto_op{ 84 - cryptocop_session_id ses_id; 85 - 86 - /* Indata. */ 87 - unsigned char *indata; 88 - size_t inlen; /* Total indata length. */ 89 - 90 - /* Cipher configuration. */ 91 - unsigned char do_cipher:1; 92 - unsigned char decrypt:1; /* 1 == decrypt, 0 == encrypt */ 93 - unsigned char cipher_explicit:1; 94 - size_t cipher_start; 95 - size_t cipher_len; 96 - /* cipher_iv is used if do_cipher and cipher_explicit and the cipher 97 - mode is CBC. The length is controlled by the type of cipher, 98 - e.g. DES/3DES 8 octets and AES 16 octets. */ 99 - unsigned char cipher_iv[CRYPTOCOP_MAX_IV_LENGTH]; 100 - /* Outdata. */ 101 - unsigned char *cipher_outdata; 102 - size_t cipher_outlen; 103 - 104 - /* digest configuration. */ 105 - unsigned char do_digest:1; 106 - size_t digest_start; 107 - size_t digest_len; 108 - /* Outdata. The actual length is determined by the type of the digest. */ 109 - unsigned char digest[CRYPTOCOP_MAX_DIGEST_LENGTH]; 110 - 111 - /* Checksum configuration. */ 112 - unsigned char do_csum:1; 113 - size_t csum_start; 114 - size_t csum_len; 115 - /* Outdata. */ 116 - unsigned char csum[CRYPTOCOP_CSUM_LENGTH]; 117 - }; 118 - 119 - 120 - 121 - #ifdef __KERNEL__ 122 - 123 - /********** The API to use from inside the kernel. ************/ 124 - 125 - #include <asm/arch/hwregs/dma.h> 126 - 127 - typedef enum { 128 - cryptocop_alg_csum = 0, 129 - cryptocop_alg_mem2mem, 130 - cryptocop_alg_md5, 131 - cryptocop_alg_sha1, 132 - cryptocop_alg_des, 133 - cryptocop_alg_3des, 134 - cryptocop_alg_aes, 135 - cryptocop_no_alg, 136 - } cryptocop_algorithm; 137 - 138 - typedef u8 cryptocop_tfrm_id; 139 - 140 - 141 - struct cryptocop_operation; 142 - 143 - typedef void (cryptocop_callback)(struct cryptocop_operation*, void*); 144 - 145 - struct cryptocop_transform_init { 146 - cryptocop_algorithm alg; 147 - /* Keydata for ciphers. */ 148 - unsigned char key[CRYPTOCOP_MAX_KEY_LENGTH]; 149 - unsigned int keylen; 150 - cryptocop_cipher_mode cipher_mode; 151 - cryptocop_3des_mode tdes_mode; 152 - cryptocop_csum_type csum_mode; /* cryptocop_csum_none is not allowed when alg==cryptocop_alg_csum */ 153 - 154 - cryptocop_tfrm_id tid; /* Locally unique in session; assigned by user, checked by driver. */ 155 - struct cryptocop_transform_init *next; 156 - }; 157 - 158 - 159 - typedef enum { 160 - cryptocop_source_dma = 0, 161 - cryptocop_source_des, 162 - cryptocop_source_3des, 163 - cryptocop_source_aes, 164 - cryptocop_source_md5, 165 - cryptocop_source_sha1, 166 - cryptocop_source_csum, 167 - cryptocop_source_none, 168 - } cryptocop_source; 169 - 170 - 171 - struct cryptocop_desc_cfg { 172 - cryptocop_tfrm_id tid; 173 - cryptocop_source src; 174 - unsigned int last:1; /* Last use of this transform in the operation. Will push outdata when encountered. */ 175 - struct cryptocop_desc_cfg *next; 176 - }; 177 - 178 - struct cryptocop_desc { 179 - size_t length; 180 - struct cryptocop_desc_cfg *cfg; 181 - struct cryptocop_desc *next; 182 - }; 183 - 184 - 185 - /* Flags for cryptocop_tfrm_cfg */ 186 - #define CRYPTOCOP_NO_FLAG (0x00) 187 - #define CRYPTOCOP_ENCRYPT (0x01) 188 - #define CRYPTOCOP_DECRYPT (0x02) 189 - #define CRYPTOCOP_EXPLICIT_IV (0x04) 190 - 191 - struct cryptocop_tfrm_cfg { 192 - cryptocop_tfrm_id tid; 193 - 194 - unsigned int flags; /* DECRYPT, ENCRYPT, EXPLICIT_IV */ 195 - 196 - /* CBC initialisation vector for cihers. */ 197 - u8 iv[CRYPTOCOP_MAX_IV_LENGTH]; 198 - 199 - /* The position in output where to write the transform output. The order 200 - in which the driver writes the output is unspecified, hence if several 201 - transforms write on the same positions in the output the result is 202 - unspecified. */ 203 - size_t inject_ix; 204 - 205 - struct cryptocop_tfrm_cfg *next; 206 - }; 207 - 208 - 209 - 210 - struct cryptocop_dma_list_operation{ 211 - /* The consumer can provide DMA lists to send to the co-processor. 'use_dmalists' in 212 - struct cryptocop_operation must be set for the driver to use them. outlist, 213 - out_data_buf, inlist and in_data_buf must all be physical addresses since they will 214 - be loaded to DMA . */ 215 - dma_descr_data *outlist; /* Out from memory to the co-processor. */ 216 - char *out_data_buf; 217 - dma_descr_data *inlist; /* In from the co-processor to memory. */ 218 - char *in_data_buf; 219 - 220 - cryptocop_3des_mode tdes_mode; 221 - cryptocop_csum_type csum_mode; 222 - }; 223 - 224 - 225 - struct cryptocop_tfrm_operation{ 226 - /* Operation configuration, if not 'use_dmalists' is set. */ 227 - struct cryptocop_tfrm_cfg *tfrm_cfg; 228 - struct cryptocop_desc *desc; 229 - 230 - struct iovec *indata; 231 - size_t incount; 232 - size_t inlen; /* Total inlength. */ 233 - 234 - struct iovec *outdata; 235 - size_t outcount; 236 - size_t outlen; /* Total outlength. */ 237 - }; 238 - 239 - 240 - struct cryptocop_operation { 241 - cryptocop_callback *cb; 242 - void *cb_data; 243 - 244 - cryptocop_session_id sid; 245 - 246 - /* The status of the operation when returned to consumer. */ 247 - int operation_status; /* 0, -EAGAIN */ 248 - 249 - /* Flags */ 250 - unsigned int use_dmalists:1; /* Use outlist and inlist instead of the desc/tfrm_cfg configuration. */ 251 - unsigned int in_interrupt:1; /* Set if inserting job from interrupt context. */ 252 - unsigned int fast_callback:1; /* Set if fast callback wanted, i.e. from interrupt context. */ 253 - 254 - union{ 255 - struct cryptocop_dma_list_operation list_op; 256 - struct cryptocop_tfrm_operation tfrm_op; 257 - }; 258 - }; 259 - 260 - 261 - int cryptocop_new_session(cryptocop_session_id *sid, struct cryptocop_transform_init *tinit, int alloc_flag); 262 - int cryptocop_free_session(cryptocop_session_id sid); 263 - 264 - int cryptocop_job_queue_insert_csum(struct cryptocop_operation *operation); 265 - 266 - int cryptocop_job_queue_insert_crypto(struct cryptocop_operation *operation); 267 - 268 - int cryptocop_job_queue_insert_user_job(struct cryptocop_operation *operation); 269 - 270 - #endif /* __KERNEL__ */ 271 - 272 - #endif /* CRYPTOCOP_H */
include/asm-cris/arch-v32/delay.h arch/cris/include/arch-v32/arch/delay.h
include/asm-cris/arch-v32/dma.h arch/cris/include/arch-v32/arch/dma.h
include/asm-cris/arch-v32/elf.h arch/cris/include/arch-v32/arch/elf.h
include/asm-cris/arch-v32/hwregs/Makefile arch/cris/include/arch-v32/arch/hwregs/Makefile
include/asm-cris/arch-v32/hwregs/asm/ata_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/ata_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/bif_core_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/bif_core_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/bif_dma_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/bif_dma_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/bif_slave_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/bif_slave_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/config_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/config_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/cpu_vect.h arch/cris/include/arch-v32/arch/hwregs/asm/cpu_vect.h
include/asm-cris/arch-v32/hwregs/asm/cris_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/cris_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/cris_supp_reg.h arch/cris/include/arch-v32/arch/hwregs/asm/cris_supp_reg.h
include/asm-cris/arch-v32/hwregs/asm/dma_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/dma_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/eth_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/eth_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/gio_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/gio_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/intr_vect.h arch/cris/include/arch-v32/arch/hwregs/asm/intr_vect.h
include/asm-cris/arch-v32/hwregs/asm/intr_vect_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/intr_vect_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/irq_nmi_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/irq_nmi_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/marb_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/marb_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/mmu_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/mmu_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/mmu_supp_reg.h arch/cris/include/arch-v32/arch/hwregs/asm/mmu_supp_reg.h
-632
include/asm-cris/arch-v32/hwregs/asm/pinmux_defs_asm.h
··· 1 - #ifndef __pinmux_defs_asm_h 2 - #define __pinmux_defs_asm_h 3 - 4 - /* 5 - * This file is autogenerated from 6 - * file: ../../inst/pinmux/rtl/guinness/pinmux_regs.r 7 - * id: pinmux_regs.r,v 1.40 2005/02/09 16:22:59 perz Exp 8 - * last modfied: Mon Apr 11 16:09:11 2005 9 - * 10 - * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/pinmux_defs_asm.h ../../inst/pinmux/rtl/guinness/pinmux_regs.r 11 - * id: $Id: pinmux_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $ 12 - * Any changes here will be lost. 13 - * 14 - * -*- buffer-read-only: t -*- 15 - */ 16 - 17 - #ifndef REG_FIELD 18 - #define REG_FIELD( scope, reg, field, value ) \ 19 - REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb ) 20 - #define REG_FIELD_X_( value, shift ) ((value) << shift) 21 - #endif 22 - 23 - #ifndef REG_STATE 24 - #define REG_STATE( scope, reg, field, symbolic_value ) \ 25 - REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb ) 26 - #define REG_STATE_X_( k, shift ) (k << shift) 27 - #endif 28 - 29 - #ifndef REG_MASK 30 - #define REG_MASK( scope, reg, field ) \ 31 - REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb ) 32 - #define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb) 33 - #endif 34 - 35 - #ifndef REG_LSB 36 - #define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb 37 - #endif 38 - 39 - #ifndef REG_BIT 40 - #define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit 41 - #endif 42 - 43 - #ifndef REG_ADDR 44 - #define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset) 45 - #define REG_ADDR_X_( inst, offs ) ((inst) + offs) 46 - #endif 47 - 48 - #ifndef REG_ADDR_VECT 49 - #define REG_ADDR_VECT( scope, inst, reg, index ) \ 50 - REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \ 51 - STRIDE_##scope##_##reg ) 52 - #define REG_ADDR_VECT_X_( inst, offs, index, stride ) \ 53 - ((inst) + offs + (index) * stride) 54 - #endif 55 - 56 - /* Register rw_pa, scope pinmux, type rw */ 57 - #define reg_pinmux_rw_pa___pa0___lsb 0 58 - #define reg_pinmux_rw_pa___pa0___width 1 59 - #define reg_pinmux_rw_pa___pa0___bit 0 60 - #define reg_pinmux_rw_pa___pa1___lsb 1 61 - #define reg_pinmux_rw_pa___pa1___width 1 62 - #define reg_pinmux_rw_pa___pa1___bit 1 63 - #define reg_pinmux_rw_pa___pa2___lsb 2 64 - #define reg_pinmux_rw_pa___pa2___width 1 65 - #define reg_pinmux_rw_pa___pa2___bit 2 66 - #define reg_pinmux_rw_pa___pa3___lsb 3 67 - #define reg_pinmux_rw_pa___pa3___width 1 68 - #define reg_pinmux_rw_pa___pa3___bit 3 69 - #define reg_pinmux_rw_pa___pa4___lsb 4 70 - #define reg_pinmux_rw_pa___pa4___width 1 71 - #define reg_pinmux_rw_pa___pa4___bit 4 72 - #define reg_pinmux_rw_pa___pa5___lsb 5 73 - #define reg_pinmux_rw_pa___pa5___width 1 74 - #define reg_pinmux_rw_pa___pa5___bit 5 75 - #define reg_pinmux_rw_pa___pa6___lsb 6 76 - #define reg_pinmux_rw_pa___pa6___width 1 77 - #define reg_pinmux_rw_pa___pa6___bit 6 78 - #define reg_pinmux_rw_pa___pa7___lsb 7 79 - #define reg_pinmux_rw_pa___pa7___width 1 80 - #define reg_pinmux_rw_pa___pa7___bit 7 81 - #define reg_pinmux_rw_pa___csp2_n___lsb 8 82 - #define reg_pinmux_rw_pa___csp2_n___width 1 83 - #define reg_pinmux_rw_pa___csp2_n___bit 8 84 - #define reg_pinmux_rw_pa___csp3_n___lsb 9 85 - #define reg_pinmux_rw_pa___csp3_n___width 1 86 - #define reg_pinmux_rw_pa___csp3_n___bit 9 87 - #define reg_pinmux_rw_pa___csp5_n___lsb 10 88 - #define reg_pinmux_rw_pa___csp5_n___width 1 89 - #define reg_pinmux_rw_pa___csp5_n___bit 10 90 - #define reg_pinmux_rw_pa___csp6_n___lsb 11 91 - #define reg_pinmux_rw_pa___csp6_n___width 1 92 - #define reg_pinmux_rw_pa___csp6_n___bit 11 93 - #define reg_pinmux_rw_pa___hsh4___lsb 12 94 - #define reg_pinmux_rw_pa___hsh4___width 1 95 - #define reg_pinmux_rw_pa___hsh4___bit 12 96 - #define reg_pinmux_rw_pa___hsh5___lsb 13 97 - #define reg_pinmux_rw_pa___hsh5___width 1 98 - #define reg_pinmux_rw_pa___hsh5___bit 13 99 - #define reg_pinmux_rw_pa___hsh6___lsb 14 100 - #define reg_pinmux_rw_pa___hsh6___width 1 101 - #define reg_pinmux_rw_pa___hsh6___bit 14 102 - #define reg_pinmux_rw_pa___hsh7___lsb 15 103 - #define reg_pinmux_rw_pa___hsh7___width 1 104 - #define reg_pinmux_rw_pa___hsh7___bit 15 105 - #define reg_pinmux_rw_pa_offset 0 106 - 107 - /* Register rw_hwprot, scope pinmux, type rw */ 108 - #define reg_pinmux_rw_hwprot___ser1___lsb 0 109 - #define reg_pinmux_rw_hwprot___ser1___width 1 110 - #define reg_pinmux_rw_hwprot___ser1___bit 0 111 - #define reg_pinmux_rw_hwprot___ser2___lsb 1 112 - #define reg_pinmux_rw_hwprot___ser2___width 1 113 - #define reg_pinmux_rw_hwprot___ser2___bit 1 114 - #define reg_pinmux_rw_hwprot___ser3___lsb 2 115 - #define reg_pinmux_rw_hwprot___ser3___width 1 116 - #define reg_pinmux_rw_hwprot___ser3___bit 2 117 - #define reg_pinmux_rw_hwprot___sser0___lsb 3 118 - #define reg_pinmux_rw_hwprot___sser0___width 1 119 - #define reg_pinmux_rw_hwprot___sser0___bit 3 120 - #define reg_pinmux_rw_hwprot___sser1___lsb 4 121 - #define reg_pinmux_rw_hwprot___sser1___width 1 122 - #define reg_pinmux_rw_hwprot___sser1___bit 4 123 - #define reg_pinmux_rw_hwprot___ata0___lsb 5 124 - #define reg_pinmux_rw_hwprot___ata0___width 1 125 - #define reg_pinmux_rw_hwprot___ata0___bit 5 126 - #define reg_pinmux_rw_hwprot___ata1___lsb 6 127 - #define reg_pinmux_rw_hwprot___ata1___width 1 128 - #define reg_pinmux_rw_hwprot___ata1___bit 6 129 - #define reg_pinmux_rw_hwprot___ata2___lsb 7 130 - #define reg_pinmux_rw_hwprot___ata2___width 1 131 - #define reg_pinmux_rw_hwprot___ata2___bit 7 132 - #define reg_pinmux_rw_hwprot___ata3___lsb 8 133 - #define reg_pinmux_rw_hwprot___ata3___width 1 134 - #define reg_pinmux_rw_hwprot___ata3___bit 8 135 - #define reg_pinmux_rw_hwprot___ata___lsb 9 136 - #define reg_pinmux_rw_hwprot___ata___width 1 137 - #define reg_pinmux_rw_hwprot___ata___bit 9 138 - #define reg_pinmux_rw_hwprot___eth1___lsb 10 139 - #define reg_pinmux_rw_hwprot___eth1___width 1 140 - #define reg_pinmux_rw_hwprot___eth1___bit 10 141 - #define reg_pinmux_rw_hwprot___eth1_mgm___lsb 11 142 - #define reg_pinmux_rw_hwprot___eth1_mgm___width 1 143 - #define reg_pinmux_rw_hwprot___eth1_mgm___bit 11 144 - #define reg_pinmux_rw_hwprot___timer___lsb 12 145 - #define reg_pinmux_rw_hwprot___timer___width 1 146 - #define reg_pinmux_rw_hwprot___timer___bit 12 147 - #define reg_pinmux_rw_hwprot___p21___lsb 13 148 - #define reg_pinmux_rw_hwprot___p21___width 1 149 - #define reg_pinmux_rw_hwprot___p21___bit 13 150 - #define reg_pinmux_rw_hwprot_offset 4 151 - 152 - /* Register rw_pb_gio, scope pinmux, type rw */ 153 - #define reg_pinmux_rw_pb_gio___pb0___lsb 0 154 - #define reg_pinmux_rw_pb_gio___pb0___width 1 155 - #define reg_pinmux_rw_pb_gio___pb0___bit 0 156 - #define reg_pinmux_rw_pb_gio___pb1___lsb 1 157 - #define reg_pinmux_rw_pb_gio___pb1___width 1 158 - #define reg_pinmux_rw_pb_gio___pb1___bit 1 159 - #define reg_pinmux_rw_pb_gio___pb2___lsb 2 160 - #define reg_pinmux_rw_pb_gio___pb2___width 1 161 - #define reg_pinmux_rw_pb_gio___pb2___bit 2 162 - #define reg_pinmux_rw_pb_gio___pb3___lsb 3 163 - #define reg_pinmux_rw_pb_gio___pb3___width 1 164 - #define reg_pinmux_rw_pb_gio___pb3___bit 3 165 - #define reg_pinmux_rw_pb_gio___pb4___lsb 4 166 - #define reg_pinmux_rw_pb_gio___pb4___width 1 167 - #define reg_pinmux_rw_pb_gio___pb4___bit 4 168 - #define reg_pinmux_rw_pb_gio___pb5___lsb 5 169 - #define reg_pinmux_rw_pb_gio___pb5___width 1 170 - #define reg_pinmux_rw_pb_gio___pb5___bit 5 171 - #define reg_pinmux_rw_pb_gio___pb6___lsb 6 172 - #define reg_pinmux_rw_pb_gio___pb6___width 1 173 - #define reg_pinmux_rw_pb_gio___pb6___bit 6 174 - #define reg_pinmux_rw_pb_gio___pb7___lsb 7 175 - #define reg_pinmux_rw_pb_gio___pb7___width 1 176 - #define reg_pinmux_rw_pb_gio___pb7___bit 7 177 - #define reg_pinmux_rw_pb_gio___pb8___lsb 8 178 - #define reg_pinmux_rw_pb_gio___pb8___width 1 179 - #define reg_pinmux_rw_pb_gio___pb8___bit 8 180 - #define reg_pinmux_rw_pb_gio___pb9___lsb 9 181 - #define reg_pinmux_rw_pb_gio___pb9___width 1 182 - #define reg_pinmux_rw_pb_gio___pb9___bit 9 183 - #define reg_pinmux_rw_pb_gio___pb10___lsb 10 184 - #define reg_pinmux_rw_pb_gio___pb10___width 1 185 - #define reg_pinmux_rw_pb_gio___pb10___bit 10 186 - #define reg_pinmux_rw_pb_gio___pb11___lsb 11 187 - #define reg_pinmux_rw_pb_gio___pb11___width 1 188 - #define reg_pinmux_rw_pb_gio___pb11___bit 11 189 - #define reg_pinmux_rw_pb_gio___pb12___lsb 12 190 - #define reg_pinmux_rw_pb_gio___pb12___width 1 191 - #define reg_pinmux_rw_pb_gio___pb12___bit 12 192 - #define reg_pinmux_rw_pb_gio___pb13___lsb 13 193 - #define reg_pinmux_rw_pb_gio___pb13___width 1 194 - #define reg_pinmux_rw_pb_gio___pb13___bit 13 195 - #define reg_pinmux_rw_pb_gio___pb14___lsb 14 196 - #define reg_pinmux_rw_pb_gio___pb14___width 1 197 - #define reg_pinmux_rw_pb_gio___pb14___bit 14 198 - #define reg_pinmux_rw_pb_gio___pb15___lsb 15 199 - #define reg_pinmux_rw_pb_gio___pb15___width 1 200 - #define reg_pinmux_rw_pb_gio___pb15___bit 15 201 - #define reg_pinmux_rw_pb_gio___pb16___lsb 16 202 - #define reg_pinmux_rw_pb_gio___pb16___width 1 203 - #define reg_pinmux_rw_pb_gio___pb16___bit 16 204 - #define reg_pinmux_rw_pb_gio___pb17___lsb 17 205 - #define reg_pinmux_rw_pb_gio___pb17___width 1 206 - #define reg_pinmux_rw_pb_gio___pb17___bit 17 207 - #define reg_pinmux_rw_pb_gio_offset 8 208 - 209 - /* Register rw_pb_iop, scope pinmux, type rw */ 210 - #define reg_pinmux_rw_pb_iop___pb0___lsb 0 211 - #define reg_pinmux_rw_pb_iop___pb0___width 1 212 - #define reg_pinmux_rw_pb_iop___pb0___bit 0 213 - #define reg_pinmux_rw_pb_iop___pb1___lsb 1 214 - #define reg_pinmux_rw_pb_iop___pb1___width 1 215 - #define reg_pinmux_rw_pb_iop___pb1___bit 1 216 - #define reg_pinmux_rw_pb_iop___pb2___lsb 2 217 - #define reg_pinmux_rw_pb_iop___pb2___width 1 218 - #define reg_pinmux_rw_pb_iop___pb2___bit 2 219 - #define reg_pinmux_rw_pb_iop___pb3___lsb 3 220 - #define reg_pinmux_rw_pb_iop___pb3___width 1 221 - #define reg_pinmux_rw_pb_iop___pb3___bit 3 222 - #define reg_pinmux_rw_pb_iop___pb4___lsb 4 223 - #define reg_pinmux_rw_pb_iop___pb4___width 1 224 - #define reg_pinmux_rw_pb_iop___pb4___bit 4 225 - #define reg_pinmux_rw_pb_iop___pb5___lsb 5 226 - #define reg_pinmux_rw_pb_iop___pb5___width 1 227 - #define reg_pinmux_rw_pb_iop___pb5___bit 5 228 - #define reg_pinmux_rw_pb_iop___pb6___lsb 6 229 - #define reg_pinmux_rw_pb_iop___pb6___width 1 230 - #define reg_pinmux_rw_pb_iop___pb6___bit 6 231 - #define reg_pinmux_rw_pb_iop___pb7___lsb 7 232 - #define reg_pinmux_rw_pb_iop___pb7___width 1 233 - #define reg_pinmux_rw_pb_iop___pb7___bit 7 234 - #define reg_pinmux_rw_pb_iop___pb8___lsb 8 235 - #define reg_pinmux_rw_pb_iop___pb8___width 1 236 - #define reg_pinmux_rw_pb_iop___pb8___bit 8 237 - #define reg_pinmux_rw_pb_iop___pb9___lsb 9 238 - #define reg_pinmux_rw_pb_iop___pb9___width 1 239 - #define reg_pinmux_rw_pb_iop___pb9___bit 9 240 - #define reg_pinmux_rw_pb_iop___pb10___lsb 10 241 - #define reg_pinmux_rw_pb_iop___pb10___width 1 242 - #define reg_pinmux_rw_pb_iop___pb10___bit 10 243 - #define reg_pinmux_rw_pb_iop___pb11___lsb 11 244 - #define reg_pinmux_rw_pb_iop___pb11___width 1 245 - #define reg_pinmux_rw_pb_iop___pb11___bit 11 246 - #define reg_pinmux_rw_pb_iop___pb12___lsb 12 247 - #define reg_pinmux_rw_pb_iop___pb12___width 1 248 - #define reg_pinmux_rw_pb_iop___pb12___bit 12 249 - #define reg_pinmux_rw_pb_iop___pb13___lsb 13 250 - #define reg_pinmux_rw_pb_iop___pb13___width 1 251 - #define reg_pinmux_rw_pb_iop___pb13___bit 13 252 - #define reg_pinmux_rw_pb_iop___pb14___lsb 14 253 - #define reg_pinmux_rw_pb_iop___pb14___width 1 254 - #define reg_pinmux_rw_pb_iop___pb14___bit 14 255 - #define reg_pinmux_rw_pb_iop___pb15___lsb 15 256 - #define reg_pinmux_rw_pb_iop___pb15___width 1 257 - #define reg_pinmux_rw_pb_iop___pb15___bit 15 258 - #define reg_pinmux_rw_pb_iop___pb16___lsb 16 259 - #define reg_pinmux_rw_pb_iop___pb16___width 1 260 - #define reg_pinmux_rw_pb_iop___pb16___bit 16 261 - #define reg_pinmux_rw_pb_iop___pb17___lsb 17 262 - #define reg_pinmux_rw_pb_iop___pb17___width 1 263 - #define reg_pinmux_rw_pb_iop___pb17___bit 17 264 - #define reg_pinmux_rw_pb_iop_offset 12 265 - 266 - /* Register rw_pc_gio, scope pinmux, type rw */ 267 - #define reg_pinmux_rw_pc_gio___pc0___lsb 0 268 - #define reg_pinmux_rw_pc_gio___pc0___width 1 269 - #define reg_pinmux_rw_pc_gio___pc0___bit 0 270 - #define reg_pinmux_rw_pc_gio___pc1___lsb 1 271 - #define reg_pinmux_rw_pc_gio___pc1___width 1 272 - #define reg_pinmux_rw_pc_gio___pc1___bit 1 273 - #define reg_pinmux_rw_pc_gio___pc2___lsb 2 274 - #define reg_pinmux_rw_pc_gio___pc2___width 1 275 - #define reg_pinmux_rw_pc_gio___pc2___bit 2 276 - #define reg_pinmux_rw_pc_gio___pc3___lsb 3 277 - #define reg_pinmux_rw_pc_gio___pc3___width 1 278 - #define reg_pinmux_rw_pc_gio___pc3___bit 3 279 - #define reg_pinmux_rw_pc_gio___pc4___lsb 4 280 - #define reg_pinmux_rw_pc_gio___pc4___width 1 281 - #define reg_pinmux_rw_pc_gio___pc4___bit 4 282 - #define reg_pinmux_rw_pc_gio___pc5___lsb 5 283 - #define reg_pinmux_rw_pc_gio___pc5___width 1 284 - #define reg_pinmux_rw_pc_gio___pc5___bit 5 285 - #define reg_pinmux_rw_pc_gio___pc6___lsb 6 286 - #define reg_pinmux_rw_pc_gio___pc6___width 1 287 - #define reg_pinmux_rw_pc_gio___pc6___bit 6 288 - #define reg_pinmux_rw_pc_gio___pc7___lsb 7 289 - #define reg_pinmux_rw_pc_gio___pc7___width 1 290 - #define reg_pinmux_rw_pc_gio___pc7___bit 7 291 - #define reg_pinmux_rw_pc_gio___pc8___lsb 8 292 - #define reg_pinmux_rw_pc_gio___pc8___width 1 293 - #define reg_pinmux_rw_pc_gio___pc8___bit 8 294 - #define reg_pinmux_rw_pc_gio___pc9___lsb 9 295 - #define reg_pinmux_rw_pc_gio___pc9___width 1 296 - #define reg_pinmux_rw_pc_gio___pc9___bit 9 297 - #define reg_pinmux_rw_pc_gio___pc10___lsb 10 298 - #define reg_pinmux_rw_pc_gio___pc10___width 1 299 - #define reg_pinmux_rw_pc_gio___pc10___bit 10 300 - #define reg_pinmux_rw_pc_gio___pc11___lsb 11 301 - #define reg_pinmux_rw_pc_gio___pc11___width 1 302 - #define reg_pinmux_rw_pc_gio___pc11___bit 11 303 - #define reg_pinmux_rw_pc_gio___pc12___lsb 12 304 - #define reg_pinmux_rw_pc_gio___pc12___width 1 305 - #define reg_pinmux_rw_pc_gio___pc12___bit 12 306 - #define reg_pinmux_rw_pc_gio___pc13___lsb 13 307 - #define reg_pinmux_rw_pc_gio___pc13___width 1 308 - #define reg_pinmux_rw_pc_gio___pc13___bit 13 309 - #define reg_pinmux_rw_pc_gio___pc14___lsb 14 310 - #define reg_pinmux_rw_pc_gio___pc14___width 1 311 - #define reg_pinmux_rw_pc_gio___pc14___bit 14 312 - #define reg_pinmux_rw_pc_gio___pc15___lsb 15 313 - #define reg_pinmux_rw_pc_gio___pc15___width 1 314 - #define reg_pinmux_rw_pc_gio___pc15___bit 15 315 - #define reg_pinmux_rw_pc_gio___pc16___lsb 16 316 - #define reg_pinmux_rw_pc_gio___pc16___width 1 317 - #define reg_pinmux_rw_pc_gio___pc16___bit 16 318 - #define reg_pinmux_rw_pc_gio___pc17___lsb 17 319 - #define reg_pinmux_rw_pc_gio___pc17___width 1 320 - #define reg_pinmux_rw_pc_gio___pc17___bit 17 321 - #define reg_pinmux_rw_pc_gio_offset 16 322 - 323 - /* Register rw_pc_iop, scope pinmux, type rw */ 324 - #define reg_pinmux_rw_pc_iop___pc0___lsb 0 325 - #define reg_pinmux_rw_pc_iop___pc0___width 1 326 - #define reg_pinmux_rw_pc_iop___pc0___bit 0 327 - #define reg_pinmux_rw_pc_iop___pc1___lsb 1 328 - #define reg_pinmux_rw_pc_iop___pc1___width 1 329 - #define reg_pinmux_rw_pc_iop___pc1___bit 1 330 - #define reg_pinmux_rw_pc_iop___pc2___lsb 2 331 - #define reg_pinmux_rw_pc_iop___pc2___width 1 332 - #define reg_pinmux_rw_pc_iop___pc2___bit 2 333 - #define reg_pinmux_rw_pc_iop___pc3___lsb 3 334 - #define reg_pinmux_rw_pc_iop___pc3___width 1 335 - #define reg_pinmux_rw_pc_iop___pc3___bit 3 336 - #define reg_pinmux_rw_pc_iop___pc4___lsb 4 337 - #define reg_pinmux_rw_pc_iop___pc4___width 1 338 - #define reg_pinmux_rw_pc_iop___pc4___bit 4 339 - #define reg_pinmux_rw_pc_iop___pc5___lsb 5 340 - #define reg_pinmux_rw_pc_iop___pc5___width 1 341 - #define reg_pinmux_rw_pc_iop___pc5___bit 5 342 - #define reg_pinmux_rw_pc_iop___pc6___lsb 6 343 - #define reg_pinmux_rw_pc_iop___pc6___width 1 344 - #define reg_pinmux_rw_pc_iop___pc6___bit 6 345 - #define reg_pinmux_rw_pc_iop___pc7___lsb 7 346 - #define reg_pinmux_rw_pc_iop___pc7___width 1 347 - #define reg_pinmux_rw_pc_iop___pc7___bit 7 348 - #define reg_pinmux_rw_pc_iop___pc8___lsb 8 349 - #define reg_pinmux_rw_pc_iop___pc8___width 1 350 - #define reg_pinmux_rw_pc_iop___pc8___bit 8 351 - #define reg_pinmux_rw_pc_iop___pc9___lsb 9 352 - #define reg_pinmux_rw_pc_iop___pc9___width 1 353 - #define reg_pinmux_rw_pc_iop___pc9___bit 9 354 - #define reg_pinmux_rw_pc_iop___pc10___lsb 10 355 - #define reg_pinmux_rw_pc_iop___pc10___width 1 356 - #define reg_pinmux_rw_pc_iop___pc10___bit 10 357 - #define reg_pinmux_rw_pc_iop___pc11___lsb 11 358 - #define reg_pinmux_rw_pc_iop___pc11___width 1 359 - #define reg_pinmux_rw_pc_iop___pc11___bit 11 360 - #define reg_pinmux_rw_pc_iop___pc12___lsb 12 361 - #define reg_pinmux_rw_pc_iop___pc12___width 1 362 - #define reg_pinmux_rw_pc_iop___pc12___bit 12 363 - #define reg_pinmux_rw_pc_iop___pc13___lsb 13 364 - #define reg_pinmux_rw_pc_iop___pc13___width 1 365 - #define reg_pinmux_rw_pc_iop___pc13___bit 13 366 - #define reg_pinmux_rw_pc_iop___pc14___lsb 14 367 - #define reg_pinmux_rw_pc_iop___pc14___width 1 368 - #define reg_pinmux_rw_pc_iop___pc14___bit 14 369 - #define reg_pinmux_rw_pc_iop___pc15___lsb 15 370 - #define reg_pinmux_rw_pc_iop___pc15___width 1 371 - #define reg_pinmux_rw_pc_iop___pc15___bit 15 372 - #define reg_pinmux_rw_pc_iop___pc16___lsb 16 373 - #define reg_pinmux_rw_pc_iop___pc16___width 1 374 - #define reg_pinmux_rw_pc_iop___pc16___bit 16 375 - #define reg_pinmux_rw_pc_iop___pc17___lsb 17 376 - #define reg_pinmux_rw_pc_iop___pc17___width 1 377 - #define reg_pinmux_rw_pc_iop___pc17___bit 17 378 - #define reg_pinmux_rw_pc_iop_offset 20 379 - 380 - /* Register rw_pd_gio, scope pinmux, type rw */ 381 - #define reg_pinmux_rw_pd_gio___pd0___lsb 0 382 - #define reg_pinmux_rw_pd_gio___pd0___width 1 383 - #define reg_pinmux_rw_pd_gio___pd0___bit 0 384 - #define reg_pinmux_rw_pd_gio___pd1___lsb 1 385 - #define reg_pinmux_rw_pd_gio___pd1___width 1 386 - #define reg_pinmux_rw_pd_gio___pd1___bit 1 387 - #define reg_pinmux_rw_pd_gio___pd2___lsb 2 388 - #define reg_pinmux_rw_pd_gio___pd2___width 1 389 - #define reg_pinmux_rw_pd_gio___pd2___bit 2 390 - #define reg_pinmux_rw_pd_gio___pd3___lsb 3 391 - #define reg_pinmux_rw_pd_gio___pd3___width 1 392 - #define reg_pinmux_rw_pd_gio___pd3___bit 3 393 - #define reg_pinmux_rw_pd_gio___pd4___lsb 4 394 - #define reg_pinmux_rw_pd_gio___pd4___width 1 395 - #define reg_pinmux_rw_pd_gio___pd4___bit 4 396 - #define reg_pinmux_rw_pd_gio___pd5___lsb 5 397 - #define reg_pinmux_rw_pd_gio___pd5___width 1 398 - #define reg_pinmux_rw_pd_gio___pd5___bit 5 399 - #define reg_pinmux_rw_pd_gio___pd6___lsb 6 400 - #define reg_pinmux_rw_pd_gio___pd6___width 1 401 - #define reg_pinmux_rw_pd_gio___pd6___bit 6 402 - #define reg_pinmux_rw_pd_gio___pd7___lsb 7 403 - #define reg_pinmux_rw_pd_gio___pd7___width 1 404 - #define reg_pinmux_rw_pd_gio___pd7___bit 7 405 - #define reg_pinmux_rw_pd_gio___pd8___lsb 8 406 - #define reg_pinmux_rw_pd_gio___pd8___width 1 407 - #define reg_pinmux_rw_pd_gio___pd8___bit 8 408 - #define reg_pinmux_rw_pd_gio___pd9___lsb 9 409 - #define reg_pinmux_rw_pd_gio___pd9___width 1 410 - #define reg_pinmux_rw_pd_gio___pd9___bit 9 411 - #define reg_pinmux_rw_pd_gio___pd10___lsb 10 412 - #define reg_pinmux_rw_pd_gio___pd10___width 1 413 - #define reg_pinmux_rw_pd_gio___pd10___bit 10 414 - #define reg_pinmux_rw_pd_gio___pd11___lsb 11 415 - #define reg_pinmux_rw_pd_gio___pd11___width 1 416 - #define reg_pinmux_rw_pd_gio___pd11___bit 11 417 - #define reg_pinmux_rw_pd_gio___pd12___lsb 12 418 - #define reg_pinmux_rw_pd_gio___pd12___width 1 419 - #define reg_pinmux_rw_pd_gio___pd12___bit 12 420 - #define reg_pinmux_rw_pd_gio___pd13___lsb 13 421 - #define reg_pinmux_rw_pd_gio___pd13___width 1 422 - #define reg_pinmux_rw_pd_gio___pd13___bit 13 423 - #define reg_pinmux_rw_pd_gio___pd14___lsb 14 424 - #define reg_pinmux_rw_pd_gio___pd14___width 1 425 - #define reg_pinmux_rw_pd_gio___pd14___bit 14 426 - #define reg_pinmux_rw_pd_gio___pd15___lsb 15 427 - #define reg_pinmux_rw_pd_gio___pd15___width 1 428 - #define reg_pinmux_rw_pd_gio___pd15___bit 15 429 - #define reg_pinmux_rw_pd_gio___pd16___lsb 16 430 - #define reg_pinmux_rw_pd_gio___pd16___width 1 431 - #define reg_pinmux_rw_pd_gio___pd16___bit 16 432 - #define reg_pinmux_rw_pd_gio___pd17___lsb 17 433 - #define reg_pinmux_rw_pd_gio___pd17___width 1 434 - #define reg_pinmux_rw_pd_gio___pd17___bit 17 435 - #define reg_pinmux_rw_pd_gio_offset 24 436 - 437 - /* Register rw_pd_iop, scope pinmux, type rw */ 438 - #define reg_pinmux_rw_pd_iop___pd0___lsb 0 439 - #define reg_pinmux_rw_pd_iop___pd0___width 1 440 - #define reg_pinmux_rw_pd_iop___pd0___bit 0 441 - #define reg_pinmux_rw_pd_iop___pd1___lsb 1 442 - #define reg_pinmux_rw_pd_iop___pd1___width 1 443 - #define reg_pinmux_rw_pd_iop___pd1___bit 1 444 - #define reg_pinmux_rw_pd_iop___pd2___lsb 2 445 - #define reg_pinmux_rw_pd_iop___pd2___width 1 446 - #define reg_pinmux_rw_pd_iop___pd2___bit 2 447 - #define reg_pinmux_rw_pd_iop___pd3___lsb 3 448 - #define reg_pinmux_rw_pd_iop___pd3___width 1 449 - #define reg_pinmux_rw_pd_iop___pd3___bit 3 450 - #define reg_pinmux_rw_pd_iop___pd4___lsb 4 451 - #define reg_pinmux_rw_pd_iop___pd4___width 1 452 - #define reg_pinmux_rw_pd_iop___pd4___bit 4 453 - #define reg_pinmux_rw_pd_iop___pd5___lsb 5 454 - #define reg_pinmux_rw_pd_iop___pd5___width 1 455 - #define reg_pinmux_rw_pd_iop___pd5___bit 5 456 - #define reg_pinmux_rw_pd_iop___pd6___lsb 6 457 - #define reg_pinmux_rw_pd_iop___pd6___width 1 458 - #define reg_pinmux_rw_pd_iop___pd6___bit 6 459 - #define reg_pinmux_rw_pd_iop___pd7___lsb 7 460 - #define reg_pinmux_rw_pd_iop___pd7___width 1 461 - #define reg_pinmux_rw_pd_iop___pd7___bit 7 462 - #define reg_pinmux_rw_pd_iop___pd8___lsb 8 463 - #define reg_pinmux_rw_pd_iop___pd8___width 1 464 - #define reg_pinmux_rw_pd_iop___pd8___bit 8 465 - #define reg_pinmux_rw_pd_iop___pd9___lsb 9 466 - #define reg_pinmux_rw_pd_iop___pd9___width 1 467 - #define reg_pinmux_rw_pd_iop___pd9___bit 9 468 - #define reg_pinmux_rw_pd_iop___pd10___lsb 10 469 - #define reg_pinmux_rw_pd_iop___pd10___width 1 470 - #define reg_pinmux_rw_pd_iop___pd10___bit 10 471 - #define reg_pinmux_rw_pd_iop___pd11___lsb 11 472 - #define reg_pinmux_rw_pd_iop___pd11___width 1 473 - #define reg_pinmux_rw_pd_iop___pd11___bit 11 474 - #define reg_pinmux_rw_pd_iop___pd12___lsb 12 475 - #define reg_pinmux_rw_pd_iop___pd12___width 1 476 - #define reg_pinmux_rw_pd_iop___pd12___bit 12 477 - #define reg_pinmux_rw_pd_iop___pd13___lsb 13 478 - #define reg_pinmux_rw_pd_iop___pd13___width 1 479 - #define reg_pinmux_rw_pd_iop___pd13___bit 13 480 - #define reg_pinmux_rw_pd_iop___pd14___lsb 14 481 - #define reg_pinmux_rw_pd_iop___pd14___width 1 482 - #define reg_pinmux_rw_pd_iop___pd14___bit 14 483 - #define reg_pinmux_rw_pd_iop___pd15___lsb 15 484 - #define reg_pinmux_rw_pd_iop___pd15___width 1 485 - #define reg_pinmux_rw_pd_iop___pd15___bit 15 486 - #define reg_pinmux_rw_pd_iop___pd16___lsb 16 487 - #define reg_pinmux_rw_pd_iop___pd16___width 1 488 - #define reg_pinmux_rw_pd_iop___pd16___bit 16 489 - #define reg_pinmux_rw_pd_iop___pd17___lsb 17 490 - #define reg_pinmux_rw_pd_iop___pd17___width 1 491 - #define reg_pinmux_rw_pd_iop___pd17___bit 17 492 - #define reg_pinmux_rw_pd_iop_offset 28 493 - 494 - /* Register rw_pe_gio, scope pinmux, type rw */ 495 - #define reg_pinmux_rw_pe_gio___pe0___lsb 0 496 - #define reg_pinmux_rw_pe_gio___pe0___width 1 497 - #define reg_pinmux_rw_pe_gio___pe0___bit 0 498 - #define reg_pinmux_rw_pe_gio___pe1___lsb 1 499 - #define reg_pinmux_rw_pe_gio___pe1___width 1 500 - #define reg_pinmux_rw_pe_gio___pe1___bit 1 501 - #define reg_pinmux_rw_pe_gio___pe2___lsb 2 502 - #define reg_pinmux_rw_pe_gio___pe2___width 1 503 - #define reg_pinmux_rw_pe_gio___pe2___bit 2 504 - #define reg_pinmux_rw_pe_gio___pe3___lsb 3 505 - #define reg_pinmux_rw_pe_gio___pe3___width 1 506 - #define reg_pinmux_rw_pe_gio___pe3___bit 3 507 - #define reg_pinmux_rw_pe_gio___pe4___lsb 4 508 - #define reg_pinmux_rw_pe_gio___pe4___width 1 509 - #define reg_pinmux_rw_pe_gio___pe4___bit 4 510 - #define reg_pinmux_rw_pe_gio___pe5___lsb 5 511 - #define reg_pinmux_rw_pe_gio___pe5___width 1 512 - #define reg_pinmux_rw_pe_gio___pe5___bit 5 513 - #define reg_pinmux_rw_pe_gio___pe6___lsb 6 514 - #define reg_pinmux_rw_pe_gio___pe6___width 1 515 - #define reg_pinmux_rw_pe_gio___pe6___bit 6 516 - #define reg_pinmux_rw_pe_gio___pe7___lsb 7 517 - #define reg_pinmux_rw_pe_gio___pe7___width 1 518 - #define reg_pinmux_rw_pe_gio___pe7___bit 7 519 - #define reg_pinmux_rw_pe_gio___pe8___lsb 8 520 - #define reg_pinmux_rw_pe_gio___pe8___width 1 521 - #define reg_pinmux_rw_pe_gio___pe8___bit 8 522 - #define reg_pinmux_rw_pe_gio___pe9___lsb 9 523 - #define reg_pinmux_rw_pe_gio___pe9___width 1 524 - #define reg_pinmux_rw_pe_gio___pe9___bit 9 525 - #define reg_pinmux_rw_pe_gio___pe10___lsb 10 526 - #define reg_pinmux_rw_pe_gio___pe10___width 1 527 - #define reg_pinmux_rw_pe_gio___pe10___bit 10 528 - #define reg_pinmux_rw_pe_gio___pe11___lsb 11 529 - #define reg_pinmux_rw_pe_gio___pe11___width 1 530 - #define reg_pinmux_rw_pe_gio___pe11___bit 11 531 - #define reg_pinmux_rw_pe_gio___pe12___lsb 12 532 - #define reg_pinmux_rw_pe_gio___pe12___width 1 533 - #define reg_pinmux_rw_pe_gio___pe12___bit 12 534 - #define reg_pinmux_rw_pe_gio___pe13___lsb 13 535 - #define reg_pinmux_rw_pe_gio___pe13___width 1 536 - #define reg_pinmux_rw_pe_gio___pe13___bit 13 537 - #define reg_pinmux_rw_pe_gio___pe14___lsb 14 538 - #define reg_pinmux_rw_pe_gio___pe14___width 1 539 - #define reg_pinmux_rw_pe_gio___pe14___bit 14 540 - #define reg_pinmux_rw_pe_gio___pe15___lsb 15 541 - #define reg_pinmux_rw_pe_gio___pe15___width 1 542 - #define reg_pinmux_rw_pe_gio___pe15___bit 15 543 - #define reg_pinmux_rw_pe_gio___pe16___lsb 16 544 - #define reg_pinmux_rw_pe_gio___pe16___width 1 545 - #define reg_pinmux_rw_pe_gio___pe16___bit 16 546 - #define reg_pinmux_rw_pe_gio___pe17___lsb 17 547 - #define reg_pinmux_rw_pe_gio___pe17___width 1 548 - #define reg_pinmux_rw_pe_gio___pe17___bit 17 549 - #define reg_pinmux_rw_pe_gio_offset 32 550 - 551 - /* Register rw_pe_iop, scope pinmux, type rw */ 552 - #define reg_pinmux_rw_pe_iop___pe0___lsb 0 553 - #define reg_pinmux_rw_pe_iop___pe0___width 1 554 - #define reg_pinmux_rw_pe_iop___pe0___bit 0 555 - #define reg_pinmux_rw_pe_iop___pe1___lsb 1 556 - #define reg_pinmux_rw_pe_iop___pe1___width 1 557 - #define reg_pinmux_rw_pe_iop___pe1___bit 1 558 - #define reg_pinmux_rw_pe_iop___pe2___lsb 2 559 - #define reg_pinmux_rw_pe_iop___pe2___width 1 560 - #define reg_pinmux_rw_pe_iop___pe2___bit 2 561 - #define reg_pinmux_rw_pe_iop___pe3___lsb 3 562 - #define reg_pinmux_rw_pe_iop___pe3___width 1 563 - #define reg_pinmux_rw_pe_iop___pe3___bit 3 564 - #define reg_pinmux_rw_pe_iop___pe4___lsb 4 565 - #define reg_pinmux_rw_pe_iop___pe4___width 1 566 - #define reg_pinmux_rw_pe_iop___pe4___bit 4 567 - #define reg_pinmux_rw_pe_iop___pe5___lsb 5 568 - #define reg_pinmux_rw_pe_iop___pe5___width 1 569 - #define reg_pinmux_rw_pe_iop___pe5___bit 5 570 - #define reg_pinmux_rw_pe_iop___pe6___lsb 6 571 - #define reg_pinmux_rw_pe_iop___pe6___width 1 572 - #define reg_pinmux_rw_pe_iop___pe6___bit 6 573 - #define reg_pinmux_rw_pe_iop___pe7___lsb 7 574 - #define reg_pinmux_rw_pe_iop___pe7___width 1 575 - #define reg_pinmux_rw_pe_iop___pe7___bit 7 576 - #define reg_pinmux_rw_pe_iop___pe8___lsb 8 577 - #define reg_pinmux_rw_pe_iop___pe8___width 1 578 - #define reg_pinmux_rw_pe_iop___pe8___bit 8 579 - #define reg_pinmux_rw_pe_iop___pe9___lsb 9 580 - #define reg_pinmux_rw_pe_iop___pe9___width 1 581 - #define reg_pinmux_rw_pe_iop___pe9___bit 9 582 - #define reg_pinmux_rw_pe_iop___pe10___lsb 10 583 - #define reg_pinmux_rw_pe_iop___pe10___width 1 584 - #define reg_pinmux_rw_pe_iop___pe10___bit 10 585 - #define reg_pinmux_rw_pe_iop___pe11___lsb 11 586 - #define reg_pinmux_rw_pe_iop___pe11___width 1 587 - #define reg_pinmux_rw_pe_iop___pe11___bit 11 588 - #define reg_pinmux_rw_pe_iop___pe12___lsb 12 589 - #define reg_pinmux_rw_pe_iop___pe12___width 1 590 - #define reg_pinmux_rw_pe_iop___pe12___bit 12 591 - #define reg_pinmux_rw_pe_iop___pe13___lsb 13 592 - #define reg_pinmux_rw_pe_iop___pe13___width 1 593 - #define reg_pinmux_rw_pe_iop___pe13___bit 13 594 - #define reg_pinmux_rw_pe_iop___pe14___lsb 14 595 - #define reg_pinmux_rw_pe_iop___pe14___width 1 596 - #define reg_pinmux_rw_pe_iop___pe14___bit 14 597 - #define reg_pinmux_rw_pe_iop___pe15___lsb 15 598 - #define reg_pinmux_rw_pe_iop___pe15___width 1 599 - #define reg_pinmux_rw_pe_iop___pe15___bit 15 600 - #define reg_pinmux_rw_pe_iop___pe16___lsb 16 601 - #define reg_pinmux_rw_pe_iop___pe16___width 1 602 - #define reg_pinmux_rw_pe_iop___pe16___bit 16 603 - #define reg_pinmux_rw_pe_iop___pe17___lsb 17 604 - #define reg_pinmux_rw_pe_iop___pe17___width 1 605 - #define reg_pinmux_rw_pe_iop___pe17___bit 17 606 - #define reg_pinmux_rw_pe_iop_offset 36 607 - 608 - /* Register rw_usb_phy, scope pinmux, type rw */ 609 - #define reg_pinmux_rw_usb_phy___en_usb0___lsb 0 610 - #define reg_pinmux_rw_usb_phy___en_usb0___width 1 611 - #define reg_pinmux_rw_usb_phy___en_usb0___bit 0 612 - #define reg_pinmux_rw_usb_phy___en_usb1___lsb 1 613 - #define reg_pinmux_rw_usb_phy___en_usb1___width 1 614 - #define reg_pinmux_rw_usb_phy___en_usb1___bit 1 615 - #define reg_pinmux_rw_usb_phy_offset 40 616 - 617 - 618 - /* Constants */ 619 - #define regk_pinmux_no 0x00000000 620 - #define regk_pinmux_rw_hwprot_default 0x00000000 621 - #define regk_pinmux_rw_pa_default 0x00000000 622 - #define regk_pinmux_rw_pb_gio_default 0x00000000 623 - #define regk_pinmux_rw_pb_iop_default 0x00000000 624 - #define regk_pinmux_rw_pc_gio_default 0x00000000 625 - #define regk_pinmux_rw_pc_iop_default 0x00000000 626 - #define regk_pinmux_rw_pd_gio_default 0x00000000 627 - #define regk_pinmux_rw_pd_iop_default 0x00000000 628 - #define regk_pinmux_rw_pe_gio_default 0x00000000 629 - #define regk_pinmux_rw_pe_iop_default 0x00000000 630 - #define regk_pinmux_rw_usb_phy_default 0x00000000 631 - #define regk_pinmux_yes 0x00000001 632 - #endif /* __pinmux_defs_asm_h */
-96
include/asm-cris/arch-v32/hwregs/asm/reg_map_asm.h
··· 1 - #ifndef __reg_map_h 2 - #define __reg_map_h 3 - 4 - /* 5 - * This file is autogenerated from 6 - * file: ../../mod/fakereg.rmap 7 - * id: fakereg.rmap,v 1.3 2004/02/11 19:53:22 ronny Exp 8 - * last modified: Wed Feb 11 20:53:25 2004 9 - * file: ../../rtl/global.rmap 10 - * id: global.rmap,v 1.3 2003/08/18 15:08:23 mikaeln Exp 11 - * last modified: Mon Aug 18 17:08:23 2003 12 - * file: ../../mod/modreg.rmap 13 - * id: modreg.rmap,v 1.31 2004/02/20 15:40:04 stefans Exp 14 - * last modified: Fri Feb 20 16:40:04 2004 15 - * 16 - * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/reg_map_asm.h -base 0xb0000000 ../../rtl/global.rmap ../../mod/modreg.rmap ../../inst/memarb/rtl/guinness/marb_top.r ../../mod/fakereg.rmap 17 - * id: $Id: reg_map_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $ 18 - * Any changes here will be lost. 19 - * 20 - * -*- buffer-read-only: t -*- 21 - */ 22 - #define regi_artpec_mod 0xb7044000 23 - #define regi_ata 0xb0032000 24 - #define regi_ata_mod 0xb7006000 25 - #define regi_barber 0xb701a000 26 - #define regi_bif_core 0xb0014000 27 - #define regi_bif_dma 0xb0016000 28 - #define regi_bif_slave 0xb0018000 29 - #define regi_bif_slave_ext 0xac000000 30 - #define regi_bus_master 0xb703c000 31 - #define regi_config 0xb003c000 32 - #define regi_dma0 0xb0000000 33 - #define regi_dma1 0xb0002000 34 - #define regi_dma2 0xb0004000 35 - #define regi_dma3 0xb0006000 36 - #define regi_dma4 0xb0008000 37 - #define regi_dma5 0xb000a000 38 - #define regi_dma6 0xb000c000 39 - #define regi_dma7 0xb000e000 40 - #define regi_dma8 0xb0010000 41 - #define regi_dma9 0xb0012000 42 - #define regi_eth0 0xb0034000 43 - #define regi_eth1 0xb0036000 44 - #define regi_eth_mod 0xb7004000 45 - #define regi_eth_mod1 0xb701c000 46 - #define regi_eth_strmod 0xb7008000 47 - #define regi_eth_strmod1 0xb7032000 48 - #define regi_ext_dma 0xb703a000 49 - #define regi_ext_mem 0xb7046000 50 - #define regi_gen_io 0xb7016000 51 - #define regi_gio 0xb001a000 52 - #define regi_hook 0xb7000000 53 - #define regi_iop 0xb0020000 54 - #define regi_irq 0xb001c000 55 - #define regi_irq_nmi 0xb701e000 56 - #define regi_marb 0xb003e000 57 - #define regi_marb_bp0 0xb003e240 58 - #define regi_marb_bp1 0xb003e280 59 - #define regi_marb_bp2 0xb003e2c0 60 - #define regi_marb_bp3 0xb003e300 61 - #define regi_nand_mod 0xb7014000 62 - #define regi_p21 0xb002e000 63 - #define regi_p21_mod 0xb7042000 64 - #define regi_pci_mod 0xb7010000 65 - #define regi_pin_test 0xb7018000 66 - #define regi_pinmux 0xb0038000 67 - #define regi_sdram_chk 0xb703e000 68 - #define regi_sdram_mod 0xb7012000 69 - #define regi_ser0 0xb0026000 70 - #define regi_ser1 0xb0028000 71 - #define regi_ser2 0xb002a000 72 - #define regi_ser3 0xb002c000 73 - #define regi_ser_mod0 0xb7020000 74 - #define regi_ser_mod1 0xb7022000 75 - #define regi_ser_mod2 0xb7024000 76 - #define regi_ser_mod3 0xb7026000 77 - #define regi_smif_stat 0xb700e000 78 - #define regi_sser0 0xb0022000 79 - #define regi_sser1 0xb0024000 80 - #define regi_sser_mod0 0xb700a000 81 - #define regi_sser_mod1 0xb700c000 82 - #define regi_strcop 0xb0030000 83 - #define regi_strmux 0xb003a000 84 - #define regi_strmux_tst 0xb7040000 85 - #define regi_tap 0xb7002000 86 - #define regi_timer 0xb001e000 87 - #define regi_timer_mod 0xb7034000 88 - #define regi_trace 0xb0040000 89 - #define regi_usb0 0xb7028000 90 - #define regi_usb1 0xb702a000 91 - #define regi_usb2 0xb702c000 92 - #define regi_usb3 0xb702e000 93 - #define regi_usb_dev 0xb7030000 94 - #define regi_utmi_mod0 0xb7036000 95 - #define regi_utmi_mod1 0xb7038000 96 - #endif /* __reg_map_h */
include/asm-cris/arch-v32/hwregs/asm/rt_trace_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/rt_trace_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/ser_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/ser_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/sser_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/sser_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/strcop_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/strcop_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/strmux_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/strmux_defs_asm.h
include/asm-cris/arch-v32/hwregs/asm/timer_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/asm/timer_defs_asm.h
include/asm-cris/arch-v32/hwregs/ata_defs.h arch/cris/include/arch-v32/arch/hwregs/ata_defs.h
include/asm-cris/arch-v32/hwregs/bif_core_defs.h arch/cris/include/arch-v32/arch/hwregs/bif_core_defs.h
include/asm-cris/arch-v32/hwregs/bif_dma_defs.h arch/cris/include/arch-v32/arch/hwregs/bif_dma_defs.h
include/asm-cris/arch-v32/hwregs/bif_slave_defs.h arch/cris/include/arch-v32/arch/hwregs/bif_slave_defs.h
include/asm-cris/arch-v32/hwregs/config_defs.h arch/cris/include/arch-v32/arch/hwregs/config_defs.h
include/asm-cris/arch-v32/hwregs/cpu_vect.h arch/cris/include/arch-v32/arch/hwregs/cpu_vect.h
include/asm-cris/arch-v32/hwregs/dma.h arch/cris/include/arch-v32/arch/hwregs/dma.h
include/asm-cris/arch-v32/hwregs/dma_defs.h arch/cris/include/arch-v32/arch/hwregs/dma_defs.h
include/asm-cris/arch-v32/hwregs/eth_defs.h arch/cris/include/arch-v32/arch/hwregs/eth_defs.h
include/asm-cris/arch-v32/hwregs/extmem_defs.h arch/cris/include/arch-v32/arch/hwregs/extmem_defs.h
-295
include/asm-cris/arch-v32/hwregs/gio_defs.h
··· 1 - #ifndef __gio_defs_h 2 - #define __gio_defs_h 3 - 4 - /* 5 - * This file is autogenerated from 6 - * file: ../../inst/gio/rtl/gio_regs.r 7 - * id: gio_regs.r,v 1.5 2005/02/04 09:43:21 perz Exp 8 - * last modfied: Mon Apr 11 16:07:47 2005 9 - * 10 - * by /n/asic/design/tools/rdesc/src/rdes2c --outfile gio_defs.h ../../inst/gio/rtl/gio_regs.r 11 - * id: $Id: gio_defs.h,v 1.6 2005/04/24 18:30:58 starvik Exp $ 12 - * Any changes here will be lost. 13 - * 14 - * -*- buffer-read-only: t -*- 15 - */ 16 - /* Main access macros */ 17 - #ifndef REG_RD 18 - #define REG_RD( scope, inst, reg ) \ 19 - REG_READ( reg_##scope##_##reg, \ 20 - (inst) + REG_RD_ADDR_##scope##_##reg ) 21 - #endif 22 - 23 - #ifndef REG_WR 24 - #define REG_WR( scope, inst, reg, val ) \ 25 - REG_WRITE( reg_##scope##_##reg, \ 26 - (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) 27 - #endif 28 - 29 - #ifndef REG_RD_VECT 30 - #define REG_RD_VECT( scope, inst, reg, index ) \ 31 - REG_READ( reg_##scope##_##reg, \ 32 - (inst) + REG_RD_ADDR_##scope##_##reg + \ 33 - (index) * STRIDE_##scope##_##reg ) 34 - #endif 35 - 36 - #ifndef REG_WR_VECT 37 - #define REG_WR_VECT( scope, inst, reg, index, val ) \ 38 - REG_WRITE( reg_##scope##_##reg, \ 39 - (inst) + REG_WR_ADDR_##scope##_##reg + \ 40 - (index) * STRIDE_##scope##_##reg, (val) ) 41 - #endif 42 - 43 - #ifndef REG_RD_INT 44 - #define REG_RD_INT( scope, inst, reg ) \ 45 - REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg ) 46 - #endif 47 - 48 - #ifndef REG_WR_INT 49 - #define REG_WR_INT( scope, inst, reg, val ) \ 50 - REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) 51 - #endif 52 - 53 - #ifndef REG_RD_INT_VECT 54 - #define REG_RD_INT_VECT( scope, inst, reg, index ) \ 55 - REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \ 56 - (index) * STRIDE_##scope##_##reg ) 57 - #endif 58 - 59 - #ifndef REG_WR_INT_VECT 60 - #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \ 61 - REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \ 62 - (index) * STRIDE_##scope##_##reg, (val) ) 63 - #endif 64 - 65 - #ifndef REG_TYPE_CONV 66 - #define REG_TYPE_CONV( type, orgtype, val ) \ 67 - ( { union { orgtype o; type n; } r; r.o = val; r.n; } ) 68 - #endif 69 - 70 - #ifndef reg_page_size 71 - #define reg_page_size 8192 72 - #endif 73 - 74 - #ifndef REG_ADDR 75 - #define REG_ADDR( scope, inst, reg ) \ 76 - ( (inst) + REG_RD_ADDR_##scope##_##reg ) 77 - #endif 78 - 79 - #ifndef REG_ADDR_VECT 80 - #define REG_ADDR_VECT( scope, inst, reg, index ) \ 81 - ( (inst) + REG_RD_ADDR_##scope##_##reg + \ 82 - (index) * STRIDE_##scope##_##reg ) 83 - #endif 84 - 85 - /* C-code for register scope gio */ 86 - 87 - /* Register rw_pa_dout, scope gio, type rw */ 88 - typedef struct { 89 - unsigned int data : 8; 90 - unsigned int dummy1 : 24; 91 - } reg_gio_rw_pa_dout; 92 - #define REG_RD_ADDR_gio_rw_pa_dout 0 93 - #define REG_WR_ADDR_gio_rw_pa_dout 0 94 - 95 - /* Register r_pa_din, scope gio, type r */ 96 - typedef struct { 97 - unsigned int data : 8; 98 - unsigned int dummy1 : 24; 99 - } reg_gio_r_pa_din; 100 - #define REG_RD_ADDR_gio_r_pa_din 4 101 - 102 - /* Register rw_pa_oe, scope gio, type rw */ 103 - typedef struct { 104 - unsigned int oe : 8; 105 - unsigned int dummy1 : 24; 106 - } reg_gio_rw_pa_oe; 107 - #define REG_RD_ADDR_gio_rw_pa_oe 8 108 - #define REG_WR_ADDR_gio_rw_pa_oe 8 109 - 110 - /* Register rw_intr_cfg, scope gio, type rw */ 111 - typedef struct { 112 - unsigned int pa0 : 3; 113 - unsigned int pa1 : 3; 114 - unsigned int pa2 : 3; 115 - unsigned int pa3 : 3; 116 - unsigned int pa4 : 3; 117 - unsigned int pa5 : 3; 118 - unsigned int pa6 : 3; 119 - unsigned int pa7 : 3; 120 - unsigned int dummy1 : 8; 121 - } reg_gio_rw_intr_cfg; 122 - #define REG_RD_ADDR_gio_rw_intr_cfg 12 123 - #define REG_WR_ADDR_gio_rw_intr_cfg 12 124 - 125 - /* Register rw_intr_mask, scope gio, type rw */ 126 - typedef struct { 127 - unsigned int pa0 : 1; 128 - unsigned int pa1 : 1; 129 - unsigned int pa2 : 1; 130 - unsigned int pa3 : 1; 131 - unsigned int pa4 : 1; 132 - unsigned int pa5 : 1; 133 - unsigned int pa6 : 1; 134 - unsigned int pa7 : 1; 135 - unsigned int dummy1 : 24; 136 - } reg_gio_rw_intr_mask; 137 - #define REG_RD_ADDR_gio_rw_intr_mask 16 138 - #define REG_WR_ADDR_gio_rw_intr_mask 16 139 - 140 - /* Register rw_ack_intr, scope gio, type rw */ 141 - typedef struct { 142 - unsigned int pa0 : 1; 143 - unsigned int pa1 : 1; 144 - unsigned int pa2 : 1; 145 - unsigned int pa3 : 1; 146 - unsigned int pa4 : 1; 147 - unsigned int pa5 : 1; 148 - unsigned int pa6 : 1; 149 - unsigned int pa7 : 1; 150 - unsigned int dummy1 : 24; 151 - } reg_gio_rw_ack_intr; 152 - #define REG_RD_ADDR_gio_rw_ack_intr 20 153 - #define REG_WR_ADDR_gio_rw_ack_intr 20 154 - 155 - /* Register r_intr, scope gio, type r */ 156 - typedef struct { 157 - unsigned int pa0 : 1; 158 - unsigned int pa1 : 1; 159 - unsigned int pa2 : 1; 160 - unsigned int pa3 : 1; 161 - unsigned int pa4 : 1; 162 - unsigned int pa5 : 1; 163 - unsigned int pa6 : 1; 164 - unsigned int pa7 : 1; 165 - unsigned int dummy1 : 24; 166 - } reg_gio_r_intr; 167 - #define REG_RD_ADDR_gio_r_intr 24 168 - 169 - /* Register r_masked_intr, scope gio, type r */ 170 - typedef struct { 171 - unsigned int pa0 : 1; 172 - unsigned int pa1 : 1; 173 - unsigned int pa2 : 1; 174 - unsigned int pa3 : 1; 175 - unsigned int pa4 : 1; 176 - unsigned int pa5 : 1; 177 - unsigned int pa6 : 1; 178 - unsigned int pa7 : 1; 179 - unsigned int dummy1 : 24; 180 - } reg_gio_r_masked_intr; 181 - #define REG_RD_ADDR_gio_r_masked_intr 28 182 - 183 - /* Register rw_pb_dout, scope gio, type rw */ 184 - typedef struct { 185 - unsigned int data : 18; 186 - unsigned int dummy1 : 14; 187 - } reg_gio_rw_pb_dout; 188 - #define REG_RD_ADDR_gio_rw_pb_dout 32 189 - #define REG_WR_ADDR_gio_rw_pb_dout 32 190 - 191 - /* Register r_pb_din, scope gio, type r */ 192 - typedef struct { 193 - unsigned int data : 18; 194 - unsigned int dummy1 : 14; 195 - } reg_gio_r_pb_din; 196 - #define REG_RD_ADDR_gio_r_pb_din 36 197 - 198 - /* Register rw_pb_oe, scope gio, type rw */ 199 - typedef struct { 200 - unsigned int oe : 18; 201 - unsigned int dummy1 : 14; 202 - } reg_gio_rw_pb_oe; 203 - #define REG_RD_ADDR_gio_rw_pb_oe 40 204 - #define REG_WR_ADDR_gio_rw_pb_oe 40 205 - 206 - /* Register rw_pc_dout, scope gio, type rw */ 207 - typedef struct { 208 - unsigned int data : 18; 209 - unsigned int dummy1 : 14; 210 - } reg_gio_rw_pc_dout; 211 - #define REG_RD_ADDR_gio_rw_pc_dout 48 212 - #define REG_WR_ADDR_gio_rw_pc_dout 48 213 - 214 - /* Register r_pc_din, scope gio, type r */ 215 - typedef struct { 216 - unsigned int data : 18; 217 - unsigned int dummy1 : 14; 218 - } reg_gio_r_pc_din; 219 - #define REG_RD_ADDR_gio_r_pc_din 52 220 - 221 - /* Register rw_pc_oe, scope gio, type rw */ 222 - typedef struct { 223 - unsigned int oe : 18; 224 - unsigned int dummy1 : 14; 225 - } reg_gio_rw_pc_oe; 226 - #define REG_RD_ADDR_gio_rw_pc_oe 56 227 - #define REG_WR_ADDR_gio_rw_pc_oe 56 228 - 229 - /* Register rw_pd_dout, scope gio, type rw */ 230 - typedef struct { 231 - unsigned int data : 18; 232 - unsigned int dummy1 : 14; 233 - } reg_gio_rw_pd_dout; 234 - #define REG_RD_ADDR_gio_rw_pd_dout 64 235 - #define REG_WR_ADDR_gio_rw_pd_dout 64 236 - 237 - /* Register r_pd_din, scope gio, type r */ 238 - typedef struct { 239 - unsigned int data : 18; 240 - unsigned int dummy1 : 14; 241 - } reg_gio_r_pd_din; 242 - #define REG_RD_ADDR_gio_r_pd_din 68 243 - 244 - /* Register rw_pd_oe, scope gio, type rw */ 245 - typedef struct { 246 - unsigned int oe : 18; 247 - unsigned int dummy1 : 14; 248 - } reg_gio_rw_pd_oe; 249 - #define REG_RD_ADDR_gio_rw_pd_oe 72 250 - #define REG_WR_ADDR_gio_rw_pd_oe 72 251 - 252 - /* Register rw_pe_dout, scope gio, type rw */ 253 - typedef struct { 254 - unsigned int data : 18; 255 - unsigned int dummy1 : 14; 256 - } reg_gio_rw_pe_dout; 257 - #define REG_RD_ADDR_gio_rw_pe_dout 80 258 - #define REG_WR_ADDR_gio_rw_pe_dout 80 259 - 260 - /* Register r_pe_din, scope gio, type r */ 261 - typedef struct { 262 - unsigned int data : 18; 263 - unsigned int dummy1 : 14; 264 - } reg_gio_r_pe_din; 265 - #define REG_RD_ADDR_gio_r_pe_din 84 266 - 267 - /* Register rw_pe_oe, scope gio, type rw */ 268 - typedef struct { 269 - unsigned int oe : 18; 270 - unsigned int dummy1 : 14; 271 - } reg_gio_rw_pe_oe; 272 - #define REG_RD_ADDR_gio_rw_pe_oe 88 273 - #define REG_WR_ADDR_gio_rw_pe_oe 88 274 - 275 - 276 - /* Constants */ 277 - enum { 278 - regk_gio_anyedge = 0x00000007, 279 - regk_gio_hi = 0x00000001, 280 - regk_gio_lo = 0x00000002, 281 - regk_gio_negedge = 0x00000006, 282 - regk_gio_no = 0x00000000, 283 - regk_gio_off = 0x00000000, 284 - regk_gio_posedge = 0x00000005, 285 - regk_gio_rw_intr_cfg_default = 0x00000000, 286 - regk_gio_rw_intr_mask_default = 0x00000000, 287 - regk_gio_rw_pa_oe_default = 0x00000000, 288 - regk_gio_rw_pb_oe_default = 0x00000000, 289 - regk_gio_rw_pc_oe_default = 0x00000000, 290 - regk_gio_rw_pd_oe_default = 0x00000000, 291 - regk_gio_rw_pe_oe_default = 0x00000000, 292 - regk_gio_set = 0x00000003, 293 - regk_gio_yes = 0x00000001 294 - }; 295 - #endif /* __gio_defs_h */
-39
include/asm-cris/arch-v32/hwregs/intr_vect.h
··· 1 - /* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version 2 - from ../../inst/intr_vect/rtl/guinness/ivmask.config.r 3 - version . */ 4 - 5 - #ifndef _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R 6 - #define _______INST_INTR_VECT_RTL_GUINNESS_IVMASK_CONFIG_R 7 - #define MEMARB_INTR_VECT 0x31 8 - #define GEN_IO_INTR_VECT 0x32 9 - #define IOP0_INTR_VECT 0x33 10 - #define IOP1_INTR_VECT 0x34 11 - #define IOP2_INTR_VECT 0x35 12 - #define IOP3_INTR_VECT 0x36 13 - #define DMA0_INTR_VECT 0x37 14 - #define DMA1_INTR_VECT 0x38 15 - #define DMA2_INTR_VECT 0x39 16 - #define DMA3_INTR_VECT 0x3a 17 - #define DMA4_INTR_VECT 0x3b 18 - #define DMA5_INTR_VECT 0x3c 19 - #define DMA6_INTR_VECT 0x3d 20 - #define DMA7_INTR_VECT 0x3e 21 - #define DMA8_INTR_VECT 0x3f 22 - #define DMA9_INTR_VECT 0x40 23 - #define ATA_INTR_VECT 0x41 24 - #define SSER0_INTR_VECT 0x42 25 - #define SSER1_INTR_VECT 0x43 26 - #define SER0_INTR_VECT 0x44 27 - #define SER1_INTR_VECT 0x45 28 - #define SER2_INTR_VECT 0x46 29 - #define SER3_INTR_VECT 0x47 30 - #define P21_INTR_VECT 0x48 31 - #define ETH0_INTR_VECT 0x49 32 - #define ETH1_INTR_VECT 0x4a 33 - #define TIMER_INTR_VECT 0x4b 34 - #define BIF_ARB_INTR_VECT 0x4c 35 - #define BIF_DMA_INTR_VECT 0x4d 36 - #define EXT_INTR_VECT 0x4e 37 - #define IPI_INTR_VECT 0x4f 38 - 39 - #endif
include/asm-cris/arch-v32/hwregs/iop/Makefile arch/cris/include/arch-v32/arch/hwregs/iop/Makefile
include/asm-cris/arch-v32/hwregs/iop/asm/iop_crc_par_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_crc_par_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_in_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_dmc_in_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_dmc_out_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_dmc_out_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_in_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_out_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_mpu_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_mpu_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_reg_space_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_reg_space_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_in_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sap_in_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_sap_out_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sap_out_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_in_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_scrc_in_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_scrc_out_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_scrc_out_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_spu_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_spu_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cfg_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_cpu_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_mpu_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_sw_spu_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_spu_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_timer_grp_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_timer_grp_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_trigger_grp_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_trigger_grp_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/asm/iop_version_defs_asm.h arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_version_defs_asm.h
include/asm-cris/arch-v32/hwregs/iop/iop_crc_par_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_crc_par_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_dmc_in_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_dmc_in_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_dmc_out_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_dmc_out_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_in_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_fifo_in_extra_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_in_extra_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_out_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_fifo_out_extra_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_out_extra_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_mpu_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_mpu_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_mpu_macros.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_mpu_macros.h
include/asm-cris/arch-v32/hwregs/iop/iop_reg_space.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_reg_space.h
include/asm-cris/arch-v32/hwregs/iop/iop_sap_in_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_sap_in_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_sap_out_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_sap_out_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_scrc_in_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_scrc_in_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_scrc_out_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_scrc_out_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_spu_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_spu_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_sw_cfg_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_cfg_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_sw_cpu_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_cpu_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_sw_mpu_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_mpu_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_sw_spu_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_spu_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_timer_grp_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_timer_grp_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_trigger_grp_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_trigger_grp_defs.h
include/asm-cris/arch-v32/hwregs/iop/iop_version_defs.h arch/cris/include/arch-v32/arch/hwregs/iop/iop_version_defs.h
include/asm-cris/arch-v32/hwregs/irq_nmi_defs.h arch/cris/include/arch-v32/arch/hwregs/irq_nmi_defs.h
include/asm-cris/arch-v32/hwregs/marb_bp_defs.h arch/cris/include/arch-v32/arch/hwregs/marb_bp_defs.h
include/asm-cris/arch-v32/hwregs/marb_defs.h arch/cris/include/arch-v32/arch/hwregs/marb_defs.h
-357
include/asm-cris/arch-v32/hwregs/pinmux_defs.h
··· 1 - #ifndef __pinmux_defs_h 2 - #define __pinmux_defs_h 3 - 4 - /* 5 - * This file is autogenerated from 6 - * file: ../../inst/pinmux/rtl/guinness/pinmux_regs.r 7 - * id: pinmux_regs.r,v 1.40 2005/02/09 16:22:59 perz Exp 8 - * last modfied: Mon Apr 11 16:09:11 2005 9 - * 10 - * by /n/asic/design/tools/rdesc/src/rdes2c --outfile pinmux_defs.h ../../inst/pinmux/rtl/guinness/pinmux_regs.r 11 - * id: $Id: pinmux_defs.h,v 1.3 2005/04/24 18:30:58 starvik Exp $ 12 - * Any changes here will be lost. 13 - * 14 - * -*- buffer-read-only: t -*- 15 - */ 16 - /* Main access macros */ 17 - #ifndef REG_RD 18 - #define REG_RD( scope, inst, reg ) \ 19 - REG_READ( reg_##scope##_##reg, \ 20 - (inst) + REG_RD_ADDR_##scope##_##reg ) 21 - #endif 22 - 23 - #ifndef REG_WR 24 - #define REG_WR( scope, inst, reg, val ) \ 25 - REG_WRITE( reg_##scope##_##reg, \ 26 - (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) 27 - #endif 28 - 29 - #ifndef REG_RD_VECT 30 - #define REG_RD_VECT( scope, inst, reg, index ) \ 31 - REG_READ( reg_##scope##_##reg, \ 32 - (inst) + REG_RD_ADDR_##scope##_##reg + \ 33 - (index) * STRIDE_##scope##_##reg ) 34 - #endif 35 - 36 - #ifndef REG_WR_VECT 37 - #define REG_WR_VECT( scope, inst, reg, index, val ) \ 38 - REG_WRITE( reg_##scope##_##reg, \ 39 - (inst) + REG_WR_ADDR_##scope##_##reg + \ 40 - (index) * STRIDE_##scope##_##reg, (val) ) 41 - #endif 42 - 43 - #ifndef REG_RD_INT 44 - #define REG_RD_INT( scope, inst, reg ) \ 45 - REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg ) 46 - #endif 47 - 48 - #ifndef REG_WR_INT 49 - #define REG_WR_INT( scope, inst, reg, val ) \ 50 - REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) 51 - #endif 52 - 53 - #ifndef REG_RD_INT_VECT 54 - #define REG_RD_INT_VECT( scope, inst, reg, index ) \ 55 - REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \ 56 - (index) * STRIDE_##scope##_##reg ) 57 - #endif 58 - 59 - #ifndef REG_WR_INT_VECT 60 - #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \ 61 - REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \ 62 - (index) * STRIDE_##scope##_##reg, (val) ) 63 - #endif 64 - 65 - #ifndef REG_TYPE_CONV 66 - #define REG_TYPE_CONV( type, orgtype, val ) \ 67 - ( { union { orgtype o; type n; } r; r.o = val; r.n; } ) 68 - #endif 69 - 70 - #ifndef reg_page_size 71 - #define reg_page_size 8192 72 - #endif 73 - 74 - #ifndef REG_ADDR 75 - #define REG_ADDR( scope, inst, reg ) \ 76 - ( (inst) + REG_RD_ADDR_##scope##_##reg ) 77 - #endif 78 - 79 - #ifndef REG_ADDR_VECT 80 - #define REG_ADDR_VECT( scope, inst, reg, index ) \ 81 - ( (inst) + REG_RD_ADDR_##scope##_##reg + \ 82 - (index) * STRIDE_##scope##_##reg ) 83 - #endif 84 - 85 - /* C-code for register scope pinmux */ 86 - 87 - /* Register rw_pa, scope pinmux, type rw */ 88 - typedef struct { 89 - unsigned int pa0 : 1; 90 - unsigned int pa1 : 1; 91 - unsigned int pa2 : 1; 92 - unsigned int pa3 : 1; 93 - unsigned int pa4 : 1; 94 - unsigned int pa5 : 1; 95 - unsigned int pa6 : 1; 96 - unsigned int pa7 : 1; 97 - unsigned int csp2_n : 1; 98 - unsigned int csp3_n : 1; 99 - unsigned int csp5_n : 1; 100 - unsigned int csp6_n : 1; 101 - unsigned int hsh4 : 1; 102 - unsigned int hsh5 : 1; 103 - unsigned int hsh6 : 1; 104 - unsigned int hsh7 : 1; 105 - unsigned int dummy1 : 16; 106 - } reg_pinmux_rw_pa; 107 - #define REG_RD_ADDR_pinmux_rw_pa 0 108 - #define REG_WR_ADDR_pinmux_rw_pa 0 109 - 110 - /* Register rw_hwprot, scope pinmux, type rw */ 111 - typedef struct { 112 - unsigned int ser1 : 1; 113 - unsigned int ser2 : 1; 114 - unsigned int ser3 : 1; 115 - unsigned int sser0 : 1; 116 - unsigned int sser1 : 1; 117 - unsigned int ata0 : 1; 118 - unsigned int ata1 : 1; 119 - unsigned int ata2 : 1; 120 - unsigned int ata3 : 1; 121 - unsigned int ata : 1; 122 - unsigned int eth1 : 1; 123 - unsigned int eth1_mgm : 1; 124 - unsigned int timer : 1; 125 - unsigned int p21 : 1; 126 - unsigned int dummy1 : 18; 127 - } reg_pinmux_rw_hwprot; 128 - #define REG_RD_ADDR_pinmux_rw_hwprot 4 129 - #define REG_WR_ADDR_pinmux_rw_hwprot 4 130 - 131 - /* Register rw_pb_gio, scope pinmux, type rw */ 132 - typedef struct { 133 - unsigned int pb0 : 1; 134 - unsigned int pb1 : 1; 135 - unsigned int pb2 : 1; 136 - unsigned int pb3 : 1; 137 - unsigned int pb4 : 1; 138 - unsigned int pb5 : 1; 139 - unsigned int pb6 : 1; 140 - unsigned int pb7 : 1; 141 - unsigned int pb8 : 1; 142 - unsigned int pb9 : 1; 143 - unsigned int pb10 : 1; 144 - unsigned int pb11 : 1; 145 - unsigned int pb12 : 1; 146 - unsigned int pb13 : 1; 147 - unsigned int pb14 : 1; 148 - unsigned int pb15 : 1; 149 - unsigned int pb16 : 1; 150 - unsigned int pb17 : 1; 151 - unsigned int dummy1 : 14; 152 - } reg_pinmux_rw_pb_gio; 153 - #define REG_RD_ADDR_pinmux_rw_pb_gio 8 154 - #define REG_WR_ADDR_pinmux_rw_pb_gio 8 155 - 156 - /* Register rw_pb_iop, scope pinmux, type rw */ 157 - typedef struct { 158 - unsigned int pb0 : 1; 159 - unsigned int pb1 : 1; 160 - unsigned int pb2 : 1; 161 - unsigned int pb3 : 1; 162 - unsigned int pb4 : 1; 163 - unsigned int pb5 : 1; 164 - unsigned int pb6 : 1; 165 - unsigned int pb7 : 1; 166 - unsigned int pb8 : 1; 167 - unsigned int pb9 : 1; 168 - unsigned int pb10 : 1; 169 - unsigned int pb11 : 1; 170 - unsigned int pb12 : 1; 171 - unsigned int pb13 : 1; 172 - unsigned int pb14 : 1; 173 - unsigned int pb15 : 1; 174 - unsigned int pb16 : 1; 175 - unsigned int pb17 : 1; 176 - unsigned int dummy1 : 14; 177 - } reg_pinmux_rw_pb_iop; 178 - #define REG_RD_ADDR_pinmux_rw_pb_iop 12 179 - #define REG_WR_ADDR_pinmux_rw_pb_iop 12 180 - 181 - /* Register rw_pc_gio, scope pinmux, type rw */ 182 - typedef struct { 183 - unsigned int pc0 : 1; 184 - unsigned int pc1 : 1; 185 - unsigned int pc2 : 1; 186 - unsigned int pc3 : 1; 187 - unsigned int pc4 : 1; 188 - unsigned int pc5 : 1; 189 - unsigned int pc6 : 1; 190 - unsigned int pc7 : 1; 191 - unsigned int pc8 : 1; 192 - unsigned int pc9 : 1; 193 - unsigned int pc10 : 1; 194 - unsigned int pc11 : 1; 195 - unsigned int pc12 : 1; 196 - unsigned int pc13 : 1; 197 - unsigned int pc14 : 1; 198 - unsigned int pc15 : 1; 199 - unsigned int pc16 : 1; 200 - unsigned int pc17 : 1; 201 - unsigned int dummy1 : 14; 202 - } reg_pinmux_rw_pc_gio; 203 - #define REG_RD_ADDR_pinmux_rw_pc_gio 16 204 - #define REG_WR_ADDR_pinmux_rw_pc_gio 16 205 - 206 - /* Register rw_pc_iop, scope pinmux, type rw */ 207 - typedef struct { 208 - unsigned int pc0 : 1; 209 - unsigned int pc1 : 1; 210 - unsigned int pc2 : 1; 211 - unsigned int pc3 : 1; 212 - unsigned int pc4 : 1; 213 - unsigned int pc5 : 1; 214 - unsigned int pc6 : 1; 215 - unsigned int pc7 : 1; 216 - unsigned int pc8 : 1; 217 - unsigned int pc9 : 1; 218 - unsigned int pc10 : 1; 219 - unsigned int pc11 : 1; 220 - unsigned int pc12 : 1; 221 - unsigned int pc13 : 1; 222 - unsigned int pc14 : 1; 223 - unsigned int pc15 : 1; 224 - unsigned int pc16 : 1; 225 - unsigned int pc17 : 1; 226 - unsigned int dummy1 : 14; 227 - } reg_pinmux_rw_pc_iop; 228 - #define REG_RD_ADDR_pinmux_rw_pc_iop 20 229 - #define REG_WR_ADDR_pinmux_rw_pc_iop 20 230 - 231 - /* Register rw_pd_gio, scope pinmux, type rw */ 232 - typedef struct { 233 - unsigned int pd0 : 1; 234 - unsigned int pd1 : 1; 235 - unsigned int pd2 : 1; 236 - unsigned int pd3 : 1; 237 - unsigned int pd4 : 1; 238 - unsigned int pd5 : 1; 239 - unsigned int pd6 : 1; 240 - unsigned int pd7 : 1; 241 - unsigned int pd8 : 1; 242 - unsigned int pd9 : 1; 243 - unsigned int pd10 : 1; 244 - unsigned int pd11 : 1; 245 - unsigned int pd12 : 1; 246 - unsigned int pd13 : 1; 247 - unsigned int pd14 : 1; 248 - unsigned int pd15 : 1; 249 - unsigned int pd16 : 1; 250 - unsigned int pd17 : 1; 251 - unsigned int dummy1 : 14; 252 - } reg_pinmux_rw_pd_gio; 253 - #define REG_RD_ADDR_pinmux_rw_pd_gio 24 254 - #define REG_WR_ADDR_pinmux_rw_pd_gio 24 255 - 256 - /* Register rw_pd_iop, scope pinmux, type rw */ 257 - typedef struct { 258 - unsigned int pd0 : 1; 259 - unsigned int pd1 : 1; 260 - unsigned int pd2 : 1; 261 - unsigned int pd3 : 1; 262 - unsigned int pd4 : 1; 263 - unsigned int pd5 : 1; 264 - unsigned int pd6 : 1; 265 - unsigned int pd7 : 1; 266 - unsigned int pd8 : 1; 267 - unsigned int pd9 : 1; 268 - unsigned int pd10 : 1; 269 - unsigned int pd11 : 1; 270 - unsigned int pd12 : 1; 271 - unsigned int pd13 : 1; 272 - unsigned int pd14 : 1; 273 - unsigned int pd15 : 1; 274 - unsigned int pd16 : 1; 275 - unsigned int pd17 : 1; 276 - unsigned int dummy1 : 14; 277 - } reg_pinmux_rw_pd_iop; 278 - #define REG_RD_ADDR_pinmux_rw_pd_iop 28 279 - #define REG_WR_ADDR_pinmux_rw_pd_iop 28 280 - 281 - /* Register rw_pe_gio, scope pinmux, type rw */ 282 - typedef struct { 283 - unsigned int pe0 : 1; 284 - unsigned int pe1 : 1; 285 - unsigned int pe2 : 1; 286 - unsigned int pe3 : 1; 287 - unsigned int pe4 : 1; 288 - unsigned int pe5 : 1; 289 - unsigned int pe6 : 1; 290 - unsigned int pe7 : 1; 291 - unsigned int pe8 : 1; 292 - unsigned int pe9 : 1; 293 - unsigned int pe10 : 1; 294 - unsigned int pe11 : 1; 295 - unsigned int pe12 : 1; 296 - unsigned int pe13 : 1; 297 - unsigned int pe14 : 1; 298 - unsigned int pe15 : 1; 299 - unsigned int pe16 : 1; 300 - unsigned int pe17 : 1; 301 - unsigned int dummy1 : 14; 302 - } reg_pinmux_rw_pe_gio; 303 - #define REG_RD_ADDR_pinmux_rw_pe_gio 32 304 - #define REG_WR_ADDR_pinmux_rw_pe_gio 32 305 - 306 - /* Register rw_pe_iop, scope pinmux, type rw */ 307 - typedef struct { 308 - unsigned int pe0 : 1; 309 - unsigned int pe1 : 1; 310 - unsigned int pe2 : 1; 311 - unsigned int pe3 : 1; 312 - unsigned int pe4 : 1; 313 - unsigned int pe5 : 1; 314 - unsigned int pe6 : 1; 315 - unsigned int pe7 : 1; 316 - unsigned int pe8 : 1; 317 - unsigned int pe9 : 1; 318 - unsigned int pe10 : 1; 319 - unsigned int pe11 : 1; 320 - unsigned int pe12 : 1; 321 - unsigned int pe13 : 1; 322 - unsigned int pe14 : 1; 323 - unsigned int pe15 : 1; 324 - unsigned int pe16 : 1; 325 - unsigned int pe17 : 1; 326 - unsigned int dummy1 : 14; 327 - } reg_pinmux_rw_pe_iop; 328 - #define REG_RD_ADDR_pinmux_rw_pe_iop 36 329 - #define REG_WR_ADDR_pinmux_rw_pe_iop 36 330 - 331 - /* Register rw_usb_phy, scope pinmux, type rw */ 332 - typedef struct { 333 - unsigned int en_usb0 : 1; 334 - unsigned int en_usb1 : 1; 335 - unsigned int dummy1 : 30; 336 - } reg_pinmux_rw_usb_phy; 337 - #define REG_RD_ADDR_pinmux_rw_usb_phy 40 338 - #define REG_WR_ADDR_pinmux_rw_usb_phy 40 339 - 340 - 341 - /* Constants */ 342 - enum { 343 - regk_pinmux_no = 0x00000000, 344 - regk_pinmux_rw_hwprot_default = 0x00000000, 345 - regk_pinmux_rw_pa_default = 0x00000000, 346 - regk_pinmux_rw_pb_gio_default = 0x00000000, 347 - regk_pinmux_rw_pb_iop_default = 0x00000000, 348 - regk_pinmux_rw_pc_gio_default = 0x00000000, 349 - regk_pinmux_rw_pc_iop_default = 0x00000000, 350 - regk_pinmux_rw_pd_gio_default = 0x00000000, 351 - regk_pinmux_rw_pd_iop_default = 0x00000000, 352 - regk_pinmux_rw_pe_gio_default = 0x00000000, 353 - regk_pinmux_rw_pe_iop_default = 0x00000000, 354 - regk_pinmux_rw_usb_phy_default = 0x00000000, 355 - regk_pinmux_yes = 0x00000001 356 - }; 357 - #endif /* __pinmux_defs_h */
include/asm-cris/arch-v32/hwregs/reg_rdwr.h arch/cris/include/arch-v32/arch/hwregs/reg_rdwr.h
include/asm-cris/arch-v32/hwregs/rt_trace_defs.h arch/cris/include/arch-v32/arch/hwregs/rt_trace_defs.h
include/asm-cris/arch-v32/hwregs/ser_defs.h arch/cris/include/arch-v32/arch/hwregs/ser_defs.h
include/asm-cris/arch-v32/hwregs/sser_defs.h arch/cris/include/arch-v32/arch/hwregs/sser_defs.h
include/asm-cris/arch-v32/hwregs/strcop.h arch/cris/include/arch-v32/arch/hwregs/strcop.h
include/asm-cris/arch-v32/hwregs/strcop_defs.h arch/cris/include/arch-v32/arch/hwregs/strcop_defs.h
-127
include/asm-cris/arch-v32/hwregs/strmux_defs.h
··· 1 - #ifndef __strmux_defs_h 2 - #define __strmux_defs_h 3 - 4 - /* 5 - * This file is autogenerated from 6 - * file: ../../inst/strmux/rtl/guinness/strmux_regs.r 7 - * id: strmux_regs.r,v 1.10 2005/02/10 10:10:46 perz Exp 8 - * last modfied: Mon Apr 11 16:09:43 2005 9 - * 10 - * by /n/asic/design/tools/rdesc/src/rdes2c --outfile strmux_defs.h ../../inst/strmux/rtl/guinness/strmux_regs.r 11 - * id: $Id: strmux_defs.h,v 1.5 2005/04/24 18:30:58 starvik Exp $ 12 - * Any changes here will be lost. 13 - * 14 - * -*- buffer-read-only: t -*- 15 - */ 16 - /* Main access macros */ 17 - #ifndef REG_RD 18 - #define REG_RD( scope, inst, reg ) \ 19 - REG_READ( reg_##scope##_##reg, \ 20 - (inst) + REG_RD_ADDR_##scope##_##reg ) 21 - #endif 22 - 23 - #ifndef REG_WR 24 - #define REG_WR( scope, inst, reg, val ) \ 25 - REG_WRITE( reg_##scope##_##reg, \ 26 - (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) 27 - #endif 28 - 29 - #ifndef REG_RD_VECT 30 - #define REG_RD_VECT( scope, inst, reg, index ) \ 31 - REG_READ( reg_##scope##_##reg, \ 32 - (inst) + REG_RD_ADDR_##scope##_##reg + \ 33 - (index) * STRIDE_##scope##_##reg ) 34 - #endif 35 - 36 - #ifndef REG_WR_VECT 37 - #define REG_WR_VECT( scope, inst, reg, index, val ) \ 38 - REG_WRITE( reg_##scope##_##reg, \ 39 - (inst) + REG_WR_ADDR_##scope##_##reg + \ 40 - (index) * STRIDE_##scope##_##reg, (val) ) 41 - #endif 42 - 43 - #ifndef REG_RD_INT 44 - #define REG_RD_INT( scope, inst, reg ) \ 45 - REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg ) 46 - #endif 47 - 48 - #ifndef REG_WR_INT 49 - #define REG_WR_INT( scope, inst, reg, val ) \ 50 - REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) 51 - #endif 52 - 53 - #ifndef REG_RD_INT_VECT 54 - #define REG_RD_INT_VECT( scope, inst, reg, index ) \ 55 - REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \ 56 - (index) * STRIDE_##scope##_##reg ) 57 - #endif 58 - 59 - #ifndef REG_WR_INT_VECT 60 - #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \ 61 - REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \ 62 - (index) * STRIDE_##scope##_##reg, (val) ) 63 - #endif 64 - 65 - #ifndef REG_TYPE_CONV 66 - #define REG_TYPE_CONV( type, orgtype, val ) \ 67 - ( { union { orgtype o; type n; } r; r.o = val; r.n; } ) 68 - #endif 69 - 70 - #ifndef reg_page_size 71 - #define reg_page_size 8192 72 - #endif 73 - 74 - #ifndef REG_ADDR 75 - #define REG_ADDR( scope, inst, reg ) \ 76 - ( (inst) + REG_RD_ADDR_##scope##_##reg ) 77 - #endif 78 - 79 - #ifndef REG_ADDR_VECT 80 - #define REG_ADDR_VECT( scope, inst, reg, index ) \ 81 - ( (inst) + REG_RD_ADDR_##scope##_##reg + \ 82 - (index) * STRIDE_##scope##_##reg ) 83 - #endif 84 - 85 - /* C-code for register scope strmux */ 86 - 87 - /* Register rw_cfg, scope strmux, type rw */ 88 - typedef struct { 89 - unsigned int dma0 : 3; 90 - unsigned int dma1 : 3; 91 - unsigned int dma2 : 3; 92 - unsigned int dma3 : 3; 93 - unsigned int dma4 : 3; 94 - unsigned int dma5 : 3; 95 - unsigned int dma6 : 3; 96 - unsigned int dma7 : 3; 97 - unsigned int dma8 : 3; 98 - unsigned int dma9 : 3; 99 - unsigned int dummy1 : 2; 100 - } reg_strmux_rw_cfg; 101 - #define REG_RD_ADDR_strmux_rw_cfg 0 102 - #define REG_WR_ADDR_strmux_rw_cfg 0 103 - 104 - 105 - /* Constants */ 106 - enum { 107 - regk_strmux_ata = 0x00000003, 108 - regk_strmux_eth0 = 0x00000001, 109 - regk_strmux_eth1 = 0x00000004, 110 - regk_strmux_ext0 = 0x00000001, 111 - regk_strmux_ext1 = 0x00000001, 112 - regk_strmux_ext2 = 0x00000001, 113 - regk_strmux_ext3 = 0x00000001, 114 - regk_strmux_iop0 = 0x00000002, 115 - regk_strmux_iop1 = 0x00000001, 116 - regk_strmux_off = 0x00000000, 117 - regk_strmux_p21 = 0x00000004, 118 - regk_strmux_rw_cfg_default = 0x00000000, 119 - regk_strmux_ser0 = 0x00000002, 120 - regk_strmux_ser1 = 0x00000002, 121 - regk_strmux_ser2 = 0x00000004, 122 - regk_strmux_ser3 = 0x00000003, 123 - regk_strmux_sser0 = 0x00000003, 124 - regk_strmux_sser1 = 0x00000003, 125 - regk_strmux_strcop = 0x00000002 126 - }; 127 - #endif /* __strmux_defs_h */
include/asm-cris/arch-v32/hwregs/supp_reg.h arch/cris/include/arch-v32/arch/hwregs/supp_reg.h
include/asm-cris/arch-v32/intmem.h arch/cris/include/arch-v32/arch/intmem.h
-136
include/asm-cris/arch-v32/io.h
··· 1 - #ifndef _ASM_ARCH_CRIS_IO_H 2 - #define _ASM_ARCH_CRIS_IO_H 3 - 4 - #include <linux/spinlock.h> 5 - #include <hwregs/reg_map.h> 6 - #include <hwregs/reg_rdwr.h> 7 - #include <hwregs/gio_defs.h> 8 - 9 - enum crisv32_io_dir 10 - { 11 - crisv32_io_dir_in = 0, 12 - crisv32_io_dir_out = 1 13 - }; 14 - 15 - struct crisv32_ioport 16 - { 17 - volatile unsigned long *oe; 18 - volatile unsigned long *data; 19 - volatile unsigned long *data_in; 20 - unsigned int pin_count; 21 - spinlock_t lock; 22 - }; 23 - 24 - struct crisv32_iopin 25 - { 26 - struct crisv32_ioport* port; 27 - int bit; 28 - }; 29 - 30 - extern struct crisv32_ioport crisv32_ioports[]; 31 - 32 - extern struct crisv32_iopin crisv32_led1_green; 33 - extern struct crisv32_iopin crisv32_led1_red; 34 - extern struct crisv32_iopin crisv32_led2_green; 35 - extern struct crisv32_iopin crisv32_led2_red; 36 - extern struct crisv32_iopin crisv32_led3_green; 37 - extern struct crisv32_iopin crisv32_led3_red; 38 - 39 - extern struct crisv32_iopin crisv32_led_net0_green; 40 - extern struct crisv32_iopin crisv32_led_net0_red; 41 - extern struct crisv32_iopin crisv32_led_net1_green; 42 - extern struct crisv32_iopin crisv32_led_net1_red; 43 - 44 - static inline void crisv32_io_set(struct crisv32_iopin *iopin, int val) 45 - { 46 - long flags; 47 - spin_lock_irqsave(&iopin->port->lock, flags); 48 - 49 - if (val) 50 - *iopin->port->data |= iopin->bit; 51 - else 52 - *iopin->port->data &= ~iopin->bit; 53 - 54 - spin_unlock_irqrestore(&iopin->port->lock, flags); 55 - } 56 - 57 - static inline void crisv32_io_set_dir(struct crisv32_iopin* iopin, 58 - enum crisv32_io_dir dir) 59 - { 60 - long flags; 61 - spin_lock_irqsave(&iopin->port->lock, flags); 62 - 63 - if (dir == crisv32_io_dir_in) 64 - *iopin->port->oe &= ~iopin->bit; 65 - else 66 - *iopin->port->oe |= iopin->bit; 67 - 68 - spin_unlock_irqrestore(&iopin->port->lock, flags); 69 - } 70 - 71 - static inline int crisv32_io_rd(struct crisv32_iopin* iopin) 72 - { 73 - return ((*iopin->port->data_in & iopin->bit) ? 1 : 0); 74 - } 75 - 76 - int crisv32_io_get(struct crisv32_iopin* iopin, 77 - unsigned int port, unsigned int pin); 78 - int crisv32_io_get_name(struct crisv32_iopin* iopin, 79 - const char *name); 80 - 81 - #define CRIS_LED_OFF 0x00 82 - #define CRIS_LED_GREEN 0x01 83 - #define CRIS_LED_RED 0x02 84 - #define CRIS_LED_ORANGE (CRIS_LED_GREEN | CRIS_LED_RED) 85 - 86 - #if (defined(CONFIG_ETRAX_NBR_LED_GRP_ONE) || defined(CONFIG_ETRAX_NBR_LED_GRP_TWO)) 87 - #define CRIS_LED_NETWORK_GRP0_SET(x) \ 88 - do { \ 89 - CRIS_LED_NETWORK_GRP0_SET_G((x) & CRIS_LED_GREEN); \ 90 - CRIS_LED_NETWORK_GRP0_SET_R((x) & CRIS_LED_RED); \ 91 - } while (0) 92 - #else 93 - #define CRIS_LED_NETWORK_GRP0_SET(x) while (0) {} 94 - #endif 95 - 96 - #define CRIS_LED_NETWORK_GRP0_SET_G(x) \ 97 - crisv32_io_set(&crisv32_led_net0_green, !(x)); 98 - 99 - #define CRIS_LED_NETWORK_GRP0_SET_R(x) \ 100 - crisv32_io_set(&crisv32_led_net0_red, !(x)); 101 - 102 - #if defined(CONFIG_ETRAX_NBR_LED_GRP_TWO) 103 - #define CRIS_LED_NETWORK_GRP1_SET(x) \ 104 - do { \ 105 - CRIS_LED_NETWORK_GRP1_SET_G((x) & CRIS_LED_GREEN); \ 106 - CRIS_LED_NETWORK_GRP1_SET_R((x) & CRIS_LED_RED); \ 107 - } while (0) 108 - #else 109 - #define CRIS_LED_NETWORK_GRP1_SET(x) while (0) {} 110 - #endif 111 - 112 - #define CRIS_LED_NETWORK_GRP1_SET_G(x) \ 113 - crisv32_io_set(&crisv32_led_net1_green, !(x)); 114 - 115 - #define CRIS_LED_NETWORK_GRP1_SET_R(x) \ 116 - crisv32_io_set(&crisv32_led_net1_red, !(x)); 117 - 118 - #define CRIS_LED_ACTIVE_SET(x) \ 119 - do { \ 120 - CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \ 121 - CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \ 122 - } while (0) 123 - 124 - #define CRIS_LED_ACTIVE_SET_G(x) \ 125 - crisv32_io_set(&crisv32_led2_green, !(x)); 126 - #define CRIS_LED_ACTIVE_SET_R(x) \ 127 - crisv32_io_set(&crisv32_led2_red, !(x)); 128 - #define CRIS_LED_DISK_WRITE(x) \ 129 - do{\ 130 - crisv32_io_set(&crisv32_led3_green, !(x)); \ 131 - crisv32_io_set(&crisv32_led3_red, !(x)); \ 132 - }while(0) 133 - #define CRIS_LED_DISK_READ(x) \ 134 - crisv32_io_set(&crisv32_led3_green, !(x)); 135 - 136 - #endif
include/asm-cris/arch-v32/irq.h arch/cris/include/arch-v32/arch/irq.h
include/asm-cris/arch-v32/mach-a3/arbiter.h arch/cris/include/arch-v32/mach-a3/mach/arbiter.h
include/asm-cris/arch-v32/mach-a3/dma.h arch/cris/include/arch-v32/mach-a3/mach/dma.h
include/asm-cris/arch-v32/mach-a3/hwregs/asm/clkgen_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/clkgen_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/asm/ddr2_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/ddr2_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/asm/gio_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/gio_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/asm/pinmux_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/pinmux_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/asm/pio_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/pio_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/asm/reg_map_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/reg_map_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/asm/timer_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/timer_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/clkgen_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/clkgen_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/ddr2_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/ddr2_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/gio_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/gio_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/intr_vect.h
include/asm-cris/arch-v32/mach-a3/hwregs/intr_vect_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/intr_vect_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_reg_space_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_reg_space_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_in_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sap_in_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sap_out_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sap_out_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cfg_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_cpu_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_mpu_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_sw_spu_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_spu_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/asm/iop_version_defs_asm.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_version_defs_asm.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_reg_space.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_reg_space.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_in_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sap_in_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sap_out_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sap_out_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cfg_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cfg_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_cpu_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cpu_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_mpu_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_mpu_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_sw_spu_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_spu_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/iop/iop_version_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_version_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/l2cache_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/l2cache_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/marb_bar_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/marb_bar_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/marb_foo_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/marb_foo_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/pinmux_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/pinmux_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/pio_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/pio_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/reg_map.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/reg_map.h
include/asm-cris/arch-v32/mach-a3/hwregs/strmux_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/strmux_defs.h
include/asm-cris/arch-v32/mach-a3/hwregs/timer_defs.h arch/cris/include/arch-v32/mach-a3/mach/hwregs/timer_defs.h
include/asm-cris/arch-v32/mach-a3/memmap.h arch/cris/include/arch-v32/mach-a3/mach/memmap.h
include/asm-cris/arch-v32/mach-a3/pinmux.h arch/cris/include/arch-v32/mach-a3/mach/pinmux.h
include/asm-cris/arch-v32/mach-a3/startup.inc arch/cris/include/arch-v32/mach-a3/mach/startup.inc
include/asm-cris/arch-v32/mach-fs/arbiter.h arch/cris/include/arch-v32/mach-fs/mach/arbiter.h
include/asm-cris/arch-v32/mach-fs/hwregs/asm/bif_core_defs_asm.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/bif_core_defs_asm.h
include/asm-cris/arch-v32/mach-fs/hwregs/asm/config_defs_asm.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/config_defs_asm.h
include/asm-cris/arch-v32/mach-fs/hwregs/asm/gio_defs_asm.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/gio_defs_asm.h
include/asm-cris/arch-v32/mach-fs/hwregs/asm/pinmux_defs_asm.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/pinmux_defs_asm.h
include/asm-cris/arch-v32/mach-fs/hwregs/asm/reg_map_asm.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/reg_map_asm.h
include/asm-cris/arch-v32/mach-fs/hwregs/asm/timer_defs_asm.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/timer_defs_asm.h
include/asm-cris/arch-v32/mach-fs/hwregs/bif_core_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_core_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/bif_dma_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_dma_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/bif_slave_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_slave_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/config_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/config_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/gio_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/gio_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/intr_vect.h
include/asm-cris/arch-v32/mach-fs/hwregs/intr_vect_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/intr_vect_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/marb_bp_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/marb_bp_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/marb_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/marb_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/pinmux_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/pinmux_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/reg_map.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/reg_map.h
include/asm-cris/arch-v32/mach-fs/hwregs/strmux_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/strmux_defs.h
include/asm-cris/arch-v32/mach-fs/hwregs/timer_defs.h arch/cris/include/arch-v32/mach-fs/mach/hwregs/timer_defs.h
include/asm-cris/arch-v32/mach-fs/pinmux.h arch/cris/include/arch-v32/mach-fs/mach/pinmux.h
include/asm-cris/arch-v32/mach-fs/startup.inc arch/cris/include/arch-v32/mach-fs/mach/startup.inc
include/asm-cris/arch-v32/memmap.h arch/cris/include/arch-v32/arch/memmap.h
include/asm-cris/arch-v32/mmu.h arch/cris/include/arch-v32/arch/mmu.h
include/asm-cris/arch-v32/offset.h arch/cris/include/arch-v32/arch/offset.h
include/asm-cris/arch-v32/page.h arch/cris/include/arch-v32/arch/page.h
include/asm-cris/arch-v32/pgtable.h arch/cris/include/arch-v32/arch/pgtable.h
-40
include/asm-cris/arch-v32/pinmux.h
··· 1 - #ifndef _ASM_CRIS_ARCH_PINMUX_H 2 - #define _ASM_CRIS_ARCH_PINMUX_H 3 - 4 - #define PORT_B 0 5 - #define PORT_C 1 6 - #define PORT_D 2 7 - #define PORT_E 3 8 - 9 - enum pin_mode 10 - { 11 - pinmux_none = 0, 12 - pinmux_fixed, 13 - pinmux_gpio, 14 - pinmux_iop 15 - }; 16 - 17 - enum fixed_function 18 - { 19 - pinmux_ser1, 20 - pinmux_ser2, 21 - pinmux_ser3, 22 - pinmux_sser0, 23 - pinmux_sser1, 24 - pinmux_ata0, 25 - pinmux_ata1, 26 - pinmux_ata2, 27 - pinmux_ata3, 28 - pinmux_ata, 29 - pinmux_eth1, 30 - pinmux_timer 31 - }; 32 - 33 - int crisv32_pinmux_init(void); 34 - int crisv32_pinmux_alloc(int port, int first_pin, int last_pin, enum pin_mode); 35 - int crisv32_pinmux_alloc_fixed(enum fixed_function function); 36 - int crisv32_pinmux_dealloc(int port, int first_pin, int last_pin); 37 - int crisv32_pinmux_dealloc_fixed(enum fixed_function function); 38 - void crisv32_pinmux_dump(void); 39 - 40 - #endif
include/asm-cris/arch-v32/processor.h arch/cris/include/arch-v32/arch/processor.h
include/asm-cris/arch-v32/ptrace.h arch/cris/include/arch-v32/arch/ptrace.h
include/asm-cris/arch-v32/spinlock.h arch/cris/include/arch-v32/arch/spinlock.h
include/asm-cris/arch-v32/system.h arch/cris/include/arch-v32/arch/system.h
include/asm-cris/arch-v32/thread_info.h arch/cris/include/arch-v32/arch/thread_info.h
include/asm-cris/arch-v32/timex.h arch/cris/include/arch-v32/arch/timex.h
include/asm-cris/arch-v32/tlb.h arch/cris/include/arch-v32/arch/tlb.h
include/asm-cris/arch-v32/uaccess.h arch/cris/include/arch-v32/arch/uaccess.h
include/asm-cris/arch-v32/unistd.h arch/cris/include/arch-v32/arch/unistd.h
include/asm-cris/arch-v32/user.h arch/cris/include/arch-v32/arch/user.h
-164
include/asm-cris/atomic.h
··· 1 - /* $Id: atomic.h,v 1.3 2001/07/25 16:15:19 bjornw Exp $ */ 2 - 3 - #ifndef __ASM_CRIS_ATOMIC__ 4 - #define __ASM_CRIS_ATOMIC__ 5 - 6 - #include <linux/compiler.h> 7 - 8 - #include <asm/system.h> 9 - #include <asm/arch/atomic.h> 10 - 11 - /* 12 - * Atomic operations that C can't guarantee us. Useful for 13 - * resource counting etc.. 14 - */ 15 - 16 - typedef struct { volatile int counter; } atomic_t; 17 - 18 - #define ATOMIC_INIT(i) { (i) } 19 - 20 - #define atomic_read(v) ((v)->counter) 21 - #define atomic_set(v,i) (((v)->counter) = (i)) 22 - 23 - /* These should be written in asm but we do it in C for now. */ 24 - 25 - static inline void atomic_add(int i, volatile atomic_t *v) 26 - { 27 - unsigned long flags; 28 - cris_atomic_save(v, flags); 29 - v->counter += i; 30 - cris_atomic_restore(v, flags); 31 - } 32 - 33 - static inline void atomic_sub(int i, volatile atomic_t *v) 34 - { 35 - unsigned long flags; 36 - cris_atomic_save(v, flags); 37 - v->counter -= i; 38 - cris_atomic_restore(v, flags); 39 - } 40 - 41 - static inline int atomic_add_return(int i, volatile atomic_t *v) 42 - { 43 - unsigned long flags; 44 - int retval; 45 - cris_atomic_save(v, flags); 46 - retval = (v->counter += i); 47 - cris_atomic_restore(v, flags); 48 - return retval; 49 - } 50 - 51 - #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) 52 - 53 - static inline int atomic_sub_return(int i, volatile atomic_t *v) 54 - { 55 - unsigned long flags; 56 - int retval; 57 - cris_atomic_save(v, flags); 58 - retval = (v->counter -= i); 59 - cris_atomic_restore(v, flags); 60 - return retval; 61 - } 62 - 63 - static inline int atomic_sub_and_test(int i, volatile atomic_t *v) 64 - { 65 - int retval; 66 - unsigned long flags; 67 - cris_atomic_save(v, flags); 68 - retval = (v->counter -= i) == 0; 69 - cris_atomic_restore(v, flags); 70 - return retval; 71 - } 72 - 73 - static inline void atomic_inc(volatile atomic_t *v) 74 - { 75 - unsigned long flags; 76 - cris_atomic_save(v, flags); 77 - (v->counter)++; 78 - cris_atomic_restore(v, flags); 79 - } 80 - 81 - static inline void atomic_dec(volatile atomic_t *v) 82 - { 83 - unsigned long flags; 84 - cris_atomic_save(v, flags); 85 - (v->counter)--; 86 - cris_atomic_restore(v, flags); 87 - } 88 - 89 - static inline int atomic_inc_return(volatile atomic_t *v) 90 - { 91 - unsigned long flags; 92 - int retval; 93 - cris_atomic_save(v, flags); 94 - retval = ++(v->counter); 95 - cris_atomic_restore(v, flags); 96 - return retval; 97 - } 98 - 99 - static inline int atomic_dec_return(volatile atomic_t *v) 100 - { 101 - unsigned long flags; 102 - int retval; 103 - cris_atomic_save(v, flags); 104 - retval = --(v->counter); 105 - cris_atomic_restore(v, flags); 106 - return retval; 107 - } 108 - static inline int atomic_dec_and_test(volatile atomic_t *v) 109 - { 110 - int retval; 111 - unsigned long flags; 112 - cris_atomic_save(v, flags); 113 - retval = --(v->counter) == 0; 114 - cris_atomic_restore(v, flags); 115 - return retval; 116 - } 117 - 118 - static inline int atomic_inc_and_test(volatile atomic_t *v) 119 - { 120 - int retval; 121 - unsigned long flags; 122 - cris_atomic_save(v, flags); 123 - retval = ++(v->counter) == 0; 124 - cris_atomic_restore(v, flags); 125 - return retval; 126 - } 127 - 128 - static inline int atomic_cmpxchg(atomic_t *v, int old, int new) 129 - { 130 - int ret; 131 - unsigned long flags; 132 - 133 - cris_atomic_save(v, flags); 134 - ret = v->counter; 135 - if (likely(ret == old)) 136 - v->counter = new; 137 - cris_atomic_restore(v, flags); 138 - return ret; 139 - } 140 - 141 - #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 142 - 143 - static inline int atomic_add_unless(atomic_t *v, int a, int u) 144 - { 145 - int ret; 146 - unsigned long flags; 147 - 148 - cris_atomic_save(v, flags); 149 - ret = v->counter; 150 - if (ret != u) 151 - v->counter += a; 152 - cris_atomic_restore(v, flags); 153 - return ret != u; 154 - } 155 - #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 156 - 157 - /* Atomic operations are already serializing */ 158 - #define smp_mb__before_atomic_dec() barrier() 159 - #define smp_mb__after_atomic_dec() barrier() 160 - #define smp_mb__before_atomic_inc() barrier() 161 - #define smp_mb__after_atomic_inc() barrier() 162 - 163 - #include <asm-generic/atomic.h> 164 - #endif
include/asm-cris/auxvec.h arch/cris/include/asm/auxvec.h
include/asm-cris/axisflashmap.h arch/cris/include/asm/axisflashmap.h
-166
include/asm-cris/bitops.h
··· 1 - /* asm/bitops.h for Linux/CRIS 2 - * 3 - * TODO: asm versions if speed is needed 4 - * 5 - * All bit operations return 0 if the bit was cleared before the 6 - * operation and != 0 if it was not. 7 - * 8 - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). 9 - */ 10 - 11 - #ifndef _CRIS_BITOPS_H 12 - #define _CRIS_BITOPS_H 13 - 14 - /* Currently this is unsuitable for consumption outside the kernel. */ 15 - #ifdef __KERNEL__ 16 - 17 - #ifndef _LINUX_BITOPS_H 18 - #error only <linux/bitops.h> can be included directly 19 - #endif 20 - 21 - #include <asm/arch/bitops.h> 22 - #include <asm/system.h> 23 - #include <asm/atomic.h> 24 - #include <linux/compiler.h> 25 - 26 - /* 27 - * set_bit - Atomically set a bit in memory 28 - * @nr: the bit to set 29 - * @addr: the address to start counting from 30 - * 31 - * This function is atomic and may not be reordered. See __set_bit() 32 - * if you do not require the atomic guarantees. 33 - * Note that @nr may be almost arbitrarily large; this function is not 34 - * restricted to acting on a single-word quantity. 35 - */ 36 - 37 - #define set_bit(nr, addr) (void)test_and_set_bit(nr, addr) 38 - 39 - /* 40 - * clear_bit - Clears a bit in memory 41 - * @nr: Bit to clear 42 - * @addr: Address to start counting from 43 - * 44 - * clear_bit() is atomic and may not be reordered. However, it does 45 - * not contain a memory barrier, so if it is used for locking purposes, 46 - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() 47 - * in order to ensure changes are visible on other processors. 48 - */ 49 - 50 - #define clear_bit(nr, addr) (void)test_and_clear_bit(nr, addr) 51 - 52 - /* 53 - * change_bit - Toggle a bit in memory 54 - * @nr: Bit to change 55 - * @addr: Address to start counting from 56 - * 57 - * change_bit() is atomic and may not be reordered. 58 - * Note that @nr may be almost arbitrarily large; this function is not 59 - * restricted to acting on a single-word quantity. 60 - */ 61 - 62 - #define change_bit(nr, addr) (void)test_and_change_bit(nr, addr) 63 - 64 - /** 65 - * test_and_set_bit - Set a bit and return its old value 66 - * @nr: Bit to set 67 - * @addr: Address to count from 68 - * 69 - * This operation is atomic and cannot be reordered. 70 - * It also implies a memory barrier. 71 - */ 72 - 73 - static inline int test_and_set_bit(int nr, volatile unsigned long *addr) 74 - { 75 - unsigned int mask, retval; 76 - unsigned long flags; 77 - unsigned int *adr = (unsigned int *)addr; 78 - 79 - adr += nr >> 5; 80 - mask = 1 << (nr & 0x1f); 81 - cris_atomic_save(addr, flags); 82 - retval = (mask & *adr) != 0; 83 - *adr |= mask; 84 - cris_atomic_restore(addr, flags); 85 - return retval; 86 - } 87 - 88 - /* 89 - * clear_bit() doesn't provide any barrier for the compiler. 90 - */ 91 - #define smp_mb__before_clear_bit() barrier() 92 - #define smp_mb__after_clear_bit() barrier() 93 - 94 - /** 95 - * test_and_clear_bit - Clear a bit and return its old value 96 - * @nr: Bit to clear 97 - * @addr: Address to count from 98 - * 99 - * This operation is atomic and cannot be reordered. 100 - * It also implies a memory barrier. 101 - */ 102 - 103 - static inline int test_and_clear_bit(int nr, volatile unsigned long *addr) 104 - { 105 - unsigned int mask, retval; 106 - unsigned long flags; 107 - unsigned int *adr = (unsigned int *)addr; 108 - 109 - adr += nr >> 5; 110 - mask = 1 << (nr & 0x1f); 111 - cris_atomic_save(addr, flags); 112 - retval = (mask & *adr) != 0; 113 - *adr &= ~mask; 114 - cris_atomic_restore(addr, flags); 115 - return retval; 116 - } 117 - 118 - /** 119 - * test_and_change_bit - Change a bit and return its old value 120 - * @nr: Bit to change 121 - * @addr: Address to count from 122 - * 123 - * This operation is atomic and cannot be reordered. 124 - * It also implies a memory barrier. 125 - */ 126 - 127 - static inline int test_and_change_bit(int nr, volatile unsigned long *addr) 128 - { 129 - unsigned int mask, retval; 130 - unsigned long flags; 131 - unsigned int *adr = (unsigned int *)addr; 132 - adr += nr >> 5; 133 - mask = 1 << (nr & 0x1f); 134 - cris_atomic_save(addr, flags); 135 - retval = (mask & *adr) != 0; 136 - *adr ^= mask; 137 - cris_atomic_restore(addr, flags); 138 - return retval; 139 - } 140 - 141 - #include <asm-generic/bitops/non-atomic.h> 142 - 143 - /* 144 - * Since we define it "external", it collides with the built-in 145 - * definition, which doesn't have the same semantics. We don't want to 146 - * use -fno-builtin, so just hide the name ffs. 147 - */ 148 - #define ffs kernel_ffs 149 - 150 - #include <asm-generic/bitops/fls.h> 151 - #include <asm-generic/bitops/fls64.h> 152 - #include <asm-generic/bitops/hweight.h> 153 - #include <asm-generic/bitops/find.h> 154 - #include <asm-generic/bitops/lock.h> 155 - 156 - #include <asm-generic/bitops/ext2-non-atomic.h> 157 - 158 - #define ext2_set_bit_atomic(l,n,a) test_and_set_bit(n,a) 159 - #define ext2_clear_bit_atomic(l,n,a) test_and_clear_bit(n,a) 160 - 161 - #include <asm-generic/bitops/minix.h> 162 - #include <asm-generic/bitops/sched.h> 163 - 164 - #endif /* __KERNEL__ */ 165 - 166 - #endif /* _CRIS_BITOPS_H */
-4
include/asm-cris/bug.h
··· 1 - #ifndef _CRIS_BUG_H 2 - #define _CRIS_BUG_H 3 - #include <asm/arch/bug.h> 4 - #endif
include/asm-cris/bugs.h arch/cris/include/asm/bugs.h
-27
include/asm-cris/byteorder.h
··· 1 - #ifndef _CRIS_BYTEORDER_H 2 - #define _CRIS_BYTEORDER_H 3 - 4 - #ifdef __GNUC__ 5 - 6 - #ifdef __KERNEL__ 7 - #include <asm/arch/byteorder.h> 8 - 9 - /* defines are necessary because the other files detect the presence 10 - * of a defined __arch_swab32, not an inline 11 - */ 12 - #define __arch__swab32(x) ___arch__swab32(x) 13 - #define __arch__swab16(x) ___arch__swab16(x) 14 - #endif /* __KERNEL__ */ 15 - 16 - #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 17 - # define __BYTEORDER_HAS_U64__ 18 - # define __SWAB_64_THRU_32__ 19 - #endif 20 - 21 - #endif /* __GNUC__ */ 22 - 23 - #include <linux/byteorder/little_endian.h> 24 - 25 - #endif 26 - 27 -
-6
include/asm-cris/cache.h
··· 1 - #ifndef _ASM_CACHE_H 2 - #define _ASM_CACHE_H 3 - 4 - #include <asm/arch/cache.h> 5 - 6 - #endif /* _ASM_CACHE_H */
include/asm-cris/cacheflush.h arch/cris/include/asm/cacheflush.h
-83
include/asm-cris/checksum.h
··· 1 - /* TODO: csum_tcpudp_magic could be speeded up, and csum_fold as well */ 2 - 3 - #ifndef _CRIS_CHECKSUM_H 4 - #define _CRIS_CHECKSUM_H 5 - 6 - #include <asm/arch/checksum.h> 7 - 8 - /* 9 - * computes the checksum of a memory block at buff, length len, 10 - * and adds in "sum" (32-bit) 11 - * 12 - * returns a 32-bit number suitable for feeding into itself 13 - * or csum_tcpudp_magic 14 - * 15 - * this function must be called with even lengths, except 16 - * for the last fragment, which may be odd 17 - * 18 - * it's best to have buff aligned on a 32-bit boundary 19 - */ 20 - __wsum csum_partial(const void *buff, int len, __wsum sum); 21 - 22 - /* 23 - * the same as csum_partial, but copies from src while it 24 - * checksums 25 - * 26 - * here even more important to align src and dst on a 32-bit (or even 27 - * better 64-bit) boundary 28 - */ 29 - 30 - __wsum csum_partial_copy_nocheck(const void *src, void *dst, 31 - int len, __wsum sum); 32 - 33 - /* 34 - * Fold a partial checksum into a word 35 - */ 36 - 37 - static inline __sum16 csum_fold(__wsum csum) 38 - { 39 - u32 sum = (__force u32)csum; 40 - sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ 41 - sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ 42 - return (__force __sum16)~sum; 43 - } 44 - 45 - extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, 46 - int len, __wsum sum, 47 - int *errptr); 48 - 49 - /* 50 - * This is a version of ip_compute_csum() optimized for IP headers, 51 - * which always checksum on 4 octet boundaries. 52 - * 53 - */ 54 - 55 - static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) 56 - { 57 - return csum_fold(csum_partial(iph, ihl * 4, 0)); 58 - } 59 - 60 - /* 61 - * computes the checksum of the TCP/UDP pseudo-header 62 - * returns a 16-bit checksum, already complemented 63 - */ 64 - 65 - static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, 66 - unsigned short len, 67 - unsigned short proto, 68 - __wsum sum) 69 - { 70 - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); 71 - } 72 - 73 - /* 74 - * this routine is used for miscellaneous IP-like checksums, mainly 75 - * in icmp.c 76 - */ 77 - 78 - static inline __sum16 ip_compute_csum(const void *buff, int len) 79 - { 80 - return csum_fold (csum_partial(buff, len, 0)); 81 - } 82 - 83 - #endif
include/asm-cris/cputime.h arch/cris/include/asm/cputime.h
include/asm-cris/current.h arch/cris/include/asm/current.h
-27
include/asm-cris/delay.h
··· 1 - #ifndef _CRIS_DELAY_H 2 - #define _CRIS_DELAY_H 3 - 4 - /* 5 - * Copyright (C) 1998-2002 Axis Communications AB 6 - * 7 - * Delay routines, using a pre-computed "loops_per_second" value. 8 - */ 9 - 10 - #include <asm/arch/delay.h> 11 - 12 - /* Use only for very small delays ( < 1 msec). */ 13 - 14 - extern unsigned long loops_per_usec; /* arch/cris/mm/init.c */ 15 - 16 - /* May be defined by arch/delay.h. */ 17 - #ifndef udelay 18 - static inline void udelay(unsigned long usecs) 19 - { 20 - __delay(usecs * loops_per_usec); 21 - } 22 - #endif 23 - 24 - #endif /* defined(_CRIS_DELAY_H) */ 25 - 26 - 27 -
include/asm-cris/device.h arch/cris/include/asm/device.h
include/asm-cris/div64.h arch/cris/include/asm/div64.h
include/asm-cris/dma-mapping.h arch/cris/include/asm/dma-mapping.h
-21
include/asm-cris/dma.h
··· 1 - /* $Id: dma.h,v 1.2 2001/05/09 12:17:42 johana Exp $ */ 2 - 3 - #ifndef _ASM_DMA_H 4 - #define _ASM_DMA_H 5 - 6 - #include <asm/arch/dma.h> 7 - 8 - /* it's useless on the Etrax, but unfortunately needed by the new 9 - bootmem allocator (but this should do it for this) */ 10 - 11 - #define MAX_DMA_ADDRESS PAGE_OFFSET 12 - 13 - /* From PCI */ 14 - 15 - #ifdef CONFIG_PCI 16 - extern int isa_dma_bridge_buggy; 17 - #else 18 - #define isa_dma_bridge_buggy (0) 19 - #endif 20 - 21 - #endif /* _ASM_DMA_H */
-93
include/asm-cris/elf.h
··· 1 - #ifndef __ASMCRIS_ELF_H 2 - #define __ASMCRIS_ELF_H 3 - 4 - /* 5 - * ELF register definitions.. 6 - */ 7 - 8 - #include <asm/user.h> 9 - 10 - #define R_CRIS_NONE 0 11 - #define R_CRIS_8 1 12 - #define R_CRIS_16 2 13 - #define R_CRIS_32 3 14 - #define R_CRIS_8_PCREL 4 15 - #define R_CRIS_16_PCREL 5 16 - #define R_CRIS_32_PCREL 6 17 - #define R_CRIS_GNU_VTINHERIT 7 18 - #define R_CRIS_GNU_VTENTRY 8 19 - #define R_CRIS_COPY 9 20 - #define R_CRIS_GLOB_DAT 10 21 - #define R_CRIS_JUMP_SLOT 11 22 - #define R_CRIS_RELATIVE 12 23 - #define R_CRIS_16_GOT 13 24 - #define R_CRIS_32_GOT 14 25 - #define R_CRIS_16_GOTPLT 15 26 - #define R_CRIS_32_GOTPLT 16 27 - #define R_CRIS_32_GOTREL 17 28 - #define R_CRIS_32_PLT_GOTREL 18 29 - #define R_CRIS_32_PLT_PCREL 19 30 - 31 - typedef unsigned long elf_greg_t; 32 - 33 - /* Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is 34 - thus exposed to user-space. */ 35 - #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) 36 - typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 37 - 38 - /* A placeholder; CRIS does not have any fp regs. */ 39 - typedef unsigned long elf_fpregset_t; 40 - 41 - /* 42 - * These are used to set parameters in the core dumps. 43 - */ 44 - #define ELF_CLASS ELFCLASS32 45 - #define ELF_DATA ELFDATA2LSB 46 - #define ELF_ARCH EM_CRIS 47 - 48 - #include <asm/arch/elf.h> 49 - 50 - /* The master for these definitions is {binutils}/include/elf/cris.h: */ 51 - /* User symbols in this file have a leading underscore. */ 52 - #define EF_CRIS_UNDERSCORE 0x00000001 53 - 54 - /* This is a mask for different incompatible machine variants. */ 55 - #define EF_CRIS_VARIANT_MASK 0x0000000e 56 - 57 - /* Variant 0; may contain v0..10 object. */ 58 - #define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000 59 - 60 - /* Variant 1; contains v32 object. */ 61 - #define EF_CRIS_VARIANT_V32 0x00000002 62 - 63 - /* Variant 2; contains object compatible with v32 and v10. */ 64 - #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 65 - /* End of excerpt from {binutils}/include/elf/cris.h. */ 66 - 67 - #define USE_ELF_CORE_DUMP 68 - 69 - #define ELF_EXEC_PAGESIZE 8192 70 - 71 - /* This is the location that an ET_DYN program is loaded if exec'ed. Typical 72 - use of this is to invoke "./ld.so someprog" to test out a new version of 73 - the loader. We need to make sure that it is out of the way of the program 74 - that it will "exec", and that there is sufficient room for the brk. */ 75 - 76 - #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) 77 - 78 - /* This yields a mask that user programs can use to figure out what 79 - instruction set this CPU supports. This could be done in user space, 80 - but it's not easy, and we've already done it here. */ 81 - 82 - #define ELF_HWCAP (0) 83 - 84 - /* This yields a string that ld.so will use to load implementation 85 - specific libraries for optimization. This is more specific in 86 - intent than poking at uname or /proc/cpuinfo. 87 - */ 88 - 89 - #define ELF_PLATFORM (NULL) 90 - 91 - #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 92 - 93 - #endif
include/asm-cris/emergency-restart.h arch/cris/include/asm/emergency-restart.h
include/asm-cris/errno.h arch/cris/include/asm/errno.h
include/asm-cris/eshlibld.h arch/cris/include/asm/eshlibld.h
include/asm-cris/ethernet.h arch/cris/include/asm/ethernet.h
include/asm-cris/etraxgpio.h arch/cris/include/asm/etraxgpio.h
include/asm-cris/etraxi2c.h arch/cris/include/asm/etraxi2c.h
include/asm-cris/fasttimer.h arch/cris/include/asm/fasttimer.h
include/asm-cris/fb.h arch/cris/include/asm/fb.h
include/asm-cris/fcntl.h arch/cris/include/asm/fcntl.h
include/asm-cris/futex.h arch/cris/include/asm/futex.h
include/asm-cris/hardirq.h arch/cris/include/asm/hardirq.h
include/asm-cris/hw_irq.h arch/cris/include/asm/hw_irq.h
-154
include/asm-cris/io.h
··· 1 - #ifndef _ASM_CRIS_IO_H 2 - #define _ASM_CRIS_IO_H 3 - 4 - #include <asm/page.h> /* for __va, __pa */ 5 - #include <asm/arch/io.h> 6 - #include <linux/kernel.h> 7 - 8 - struct cris_io_operations 9 - { 10 - u32 (*read_mem)(void *addr, int size); 11 - void (*write_mem)(u32 val, int size, void *addr); 12 - u32 (*read_io)(u32 port, void *addr, int size, int count); 13 - void (*write_io)(u32 port, void *addr, int size, int count); 14 - }; 15 - 16 - #ifdef CONFIG_PCI 17 - extern struct cris_io_operations *cris_iops; 18 - #else 19 - #define cris_iops ((struct cris_io_operations*)NULL) 20 - #endif 21 - 22 - /* 23 - * Change virtual addresses to physical addresses and vv. 24 - */ 25 - 26 - static inline unsigned long virt_to_phys(volatile void * address) 27 - { 28 - return __pa(address); 29 - } 30 - 31 - static inline void * phys_to_virt(unsigned long address) 32 - { 33 - return __va(address); 34 - } 35 - 36 - extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); 37 - extern void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgprot_t prot); 38 - 39 - static inline void __iomem * ioremap (unsigned long offset, unsigned long size) 40 - { 41 - return __ioremap(offset, size, 0); 42 - } 43 - 44 - extern void iounmap(volatile void * __iomem addr); 45 - 46 - extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size); 47 - 48 - /* 49 - * IO bus memory addresses are also 1:1 with the physical address 50 - */ 51 - #define virt_to_bus virt_to_phys 52 - #define bus_to_virt phys_to_virt 53 - 54 - /* 55 - * readX/writeX() are used to access memory mapped devices. On some 56 - * architectures the memory mapped IO stuff needs to be accessed 57 - * differently. On the CRIS architecture, we just read/write the 58 - * memory location directly. 59 - */ 60 - #ifdef CONFIG_PCI 61 - #define PCI_SPACE(x) ((((unsigned)(x)) & 0x10000000) == 0x10000000) 62 - #else 63 - #define PCI_SPACE(x) 0 64 - #endif 65 - static inline unsigned char readb(const volatile void __iomem *addr) 66 - { 67 - if (PCI_SPACE(addr) && cris_iops) 68 - return cris_iops->read_mem((void*)addr, 1); 69 - else 70 - return *(volatile unsigned char __force *) addr; 71 - } 72 - static inline unsigned short readw(const volatile void __iomem *addr) 73 - { 74 - if (PCI_SPACE(addr) && cris_iops) 75 - return cris_iops->read_mem((void*)addr, 2); 76 - else 77 - return *(volatile unsigned short __force *) addr; 78 - } 79 - static inline unsigned int readl(const volatile void __iomem *addr) 80 - { 81 - if (PCI_SPACE(addr) && cris_iops) 82 - return cris_iops->read_mem((void*)addr, 4); 83 - else 84 - return *(volatile unsigned int __force *) addr; 85 - } 86 - #define readb_relaxed(addr) readb(addr) 87 - #define readw_relaxed(addr) readw(addr) 88 - #define readl_relaxed(addr) readl(addr) 89 - #define __raw_readb readb 90 - #define __raw_readw readw 91 - #define __raw_readl readl 92 - 93 - static inline void writeb(unsigned char b, volatile void __iomem *addr) 94 - { 95 - if (PCI_SPACE(addr) && cris_iops) 96 - cris_iops->write_mem(b, 1, (void*)addr); 97 - else 98 - *(volatile unsigned char __force *) addr = b; 99 - } 100 - static inline void writew(unsigned short b, volatile void __iomem *addr) 101 - { 102 - if (PCI_SPACE(addr) && cris_iops) 103 - cris_iops->write_mem(b, 2, (void*)addr); 104 - else 105 - *(volatile unsigned short __force *) addr = b; 106 - } 107 - static inline void writel(unsigned int b, volatile void __iomem *addr) 108 - { 109 - if (PCI_SPACE(addr) && cris_iops) 110 - cris_iops->write_mem(b, 4, (void*)addr); 111 - else 112 - *(volatile unsigned int __force *) addr = b; 113 - } 114 - #define __raw_writeb writeb 115 - #define __raw_writew writew 116 - #define __raw_writel writel 117 - 118 - #define mmiowb() 119 - 120 - #define memset_io(a,b,c) memset((void *)(a),(b),(c)) 121 - #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) 122 - #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) 123 - 124 - 125 - /* I/O port access. Normally there is no I/O space on CRIS but when 126 - * Cardbus/PCI is enabled the request is passed through the bridge. 127 - */ 128 - 129 - #define IO_SPACE_LIMIT 0xffff 130 - #define inb(port) (cris_iops ? cris_iops->read_io(port,NULL,1,1) : 0) 131 - #define inw(port) (cris_iops ? cris_iops->read_io(port,NULL,2,1) : 0) 132 - #define inl(port) (cris_iops ? cris_iops->read_io(port,NULL,4,1) : 0) 133 - #define insb(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0) 134 - #define insw(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0) 135 - #define insl(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0) 136 - #define outb(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1) 137 - #define outw(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1) 138 - #define outl(data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1) 139 - #define outsb(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count) 140 - #define outsw(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count) 141 - #define outsl(port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count) 142 - 143 - /* 144 - * Convert a physical pointer to a virtual kernel pointer for /dev/mem 145 - * access 146 - */ 147 - #define xlate_dev_mem_ptr(p) __va(p) 148 - 149 - /* 150 - * Convert a virtual cached pointer to an uncached pointer 151 - */ 152 - #define xlate_dev_kmem_ptr(p) p 153 - 154 - #endif
include/asm-cris/ioctl.h arch/cris/include/asm/ioctl.h
include/asm-cris/ioctls.h arch/cris/include/asm/ioctls.h
include/asm-cris/ipcbuf.h arch/cris/include/asm/ipcbuf.h
-13
include/asm-cris/irq.h
··· 1 - #ifndef _ASM_IRQ_H 2 - #define _ASM_IRQ_H 3 - 4 - #include <asm/arch/irq.h> 5 - 6 - static inline int irq_canonicalize(int irq) 7 - { 8 - return irq; 9 - } 10 - 11 - #endif /* _ASM_IRQ_H */ 12 - 13 -
include/asm-cris/irq_regs.h arch/cris/include/asm/irq_regs.h
include/asm-cris/kdebug.h arch/cris/include/asm/kdebug.h
include/asm-cris/kmap_types.h arch/cris/include/asm/kmap_types.h
include/asm-cris/linkage.h arch/cris/include/asm/linkage.h
include/asm-cris/local.h arch/cris/include/asm/local.h
include/asm-cris/mman.h arch/cris/include/asm/mman.h
-10
include/asm-cris/mmu.h
··· 1 - /* 2 - * CRIS MMU constants and PTE layout 3 - */ 4 - 5 - #ifndef _CRIS_MMU_H 6 - #define _CRIS_MMU_H 7 - 8 - #include <asm/arch/mmu.h> 9 - 10 - #endif
include/asm-cris/mmu_context.h arch/cris/include/asm/mmu_context.h
include/asm-cris/module.h arch/cris/include/asm/module.h
include/asm-cris/msgbuf.h arch/cris/include/asm/msgbuf.h
include/asm-cris/mutex.h arch/cris/include/asm/mutex.h
-74
include/asm-cris/page.h
··· 1 - #ifndef _CRIS_PAGE_H 2 - #define _CRIS_PAGE_H 3 - 4 - #include <asm/arch/page.h> 5 - #include <linux/const.h> 6 - 7 - /* PAGE_SHIFT determines the page size */ 8 - #define PAGE_SHIFT 13 9 - #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 10 - #define PAGE_MASK (~(PAGE_SIZE-1)) 11 - 12 - #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) 13 - #define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) 14 - 15 - #define clear_user_page(page, vaddr, pg) clear_page(page) 16 - #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) 17 - 18 - #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \ 19 - alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) 20 - #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE 21 - 22 - /* 23 - * These are used to make use of C type-checking.. 24 - */ 25 - #ifndef __ASSEMBLY__ 26 - typedef struct { unsigned long pte; } pte_t; 27 - typedef struct { unsigned long pgd; } pgd_t; 28 - typedef struct { unsigned long pgprot; } pgprot_t; 29 - typedef struct page *pgtable_t; 30 - #endif 31 - 32 - #define pte_val(x) ((x).pte) 33 - #define pgd_val(x) ((x).pgd) 34 - #define pgprot_val(x) ((x).pgprot) 35 - 36 - #define __pte(x) ((pte_t) { (x) } ) 37 - #define __pgd(x) ((pgd_t) { (x) } ) 38 - #define __pgprot(x) ((pgprot_t) { (x) } ) 39 - 40 - /* On CRIS the PFN numbers doesn't start at 0 so we have to compensate */ 41 - /* for that before indexing into the page table starting at mem_map */ 42 - #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) 43 - #define pfn_valid(pfn) (((pfn) - (PAGE_OFFSET >> PAGE_SHIFT)) < max_mapnr) 44 - 45 - /* to index into the page map. our pages all start at physical addr PAGE_OFFSET so 46 - * we can let the map start there. notice that we subtract PAGE_OFFSET because 47 - * we start our mem_map there - in other ports they map mem_map physically and 48 - * use __pa instead. in our system both the physical and virtual address of DRAM 49 - * is too high to let mem_map start at 0, so we do it this way instead (similar 50 - * to arm and m68k I think) 51 - */ 52 - 53 - #define virt_to_page(kaddr) (mem_map + (((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT)) 54 - #define VALID_PAGE(page) (((page) - mem_map) < max_mapnr) 55 - #define virt_addr_valid(kaddr) pfn_valid((unsigned)(kaddr) >> PAGE_SHIFT) 56 - 57 - /* convert a page (based on mem_map and forward) to a physical address 58 - * do this by figuring out the virtual address and then use __pa 59 - */ 60 - 61 - #define page_to_phys(page) __pa((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) 62 - 63 - #ifndef __ASSEMBLY__ 64 - 65 - #endif /* __ASSEMBLY__ */ 66 - 67 - #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 68 - VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 69 - 70 - #include <asm-generic/memory_model.h> 71 - #include <asm-generic/page.h> 72 - 73 - #endif /* _CRIS_PAGE_H */ 74 -
include/asm-cris/param.h arch/cris/include/asm/param.h
include/asm-cris/pci.h arch/cris/include/asm/pci.h
include/asm-cris/percpu.h arch/cris/include/asm/percpu.h
include/asm-cris/pgalloc.h arch/cris/include/asm/pgalloc.h
-299
include/asm-cris/pgtable.h
··· 1 - /* 2 - * CRIS pgtable.h - macros and functions to manipulate page tables. 3 - */ 4 - 5 - #ifndef _CRIS_PGTABLE_H 6 - #define _CRIS_PGTABLE_H 7 - 8 - #include <asm/page.h> 9 - #include <asm-generic/pgtable-nopmd.h> 10 - 11 - #ifndef __ASSEMBLY__ 12 - #include <linux/sched.h> 13 - #include <asm/mmu.h> 14 - #endif 15 - #include <asm/arch/pgtable.h> 16 - 17 - /* 18 - * The Linux memory management assumes a three-level page table setup. On 19 - * CRIS, we use that, but "fold" the mid level into the top-level page 20 - * table. Since the MMU TLB is software loaded through an interrupt, it 21 - * supports any page table structure, so we could have used a three-level 22 - * setup, but for the amounts of memory we normally use, a two-level is 23 - * probably more efficient. 24 - * 25 - * This file contains the functions and defines necessary to modify and use 26 - * the CRIS page table tree. 27 - */ 28 - #ifndef __ASSEMBLY__ 29 - extern void paging_init(void); 30 - #endif 31 - 32 - /* Certain architectures need to do special things when pte's 33 - * within a page table are directly modified. Thus, the following 34 - * hook is made available. 35 - */ 36 - #define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval)) 37 - #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 38 - 39 - /* 40 - * (pmds are folded into pgds so this doesn't get actually called, 41 - * but the define is needed for a generic inline function.) 42 - */ 43 - #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) 44 - #define set_pgu(pudptr, pudval) (*(pudptr) = pudval) 45 - 46 - /* PGDIR_SHIFT determines the size of the area a second-level page table can 47 - * map. It is equal to the page size times the number of PTE's that fit in 48 - * a PMD page. A PTE is 4-bytes in CRIS. Hence the following number. 49 - */ 50 - 51 - #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-2)) 52 - #define PGDIR_SIZE (1UL << PGDIR_SHIFT) 53 - #define PGDIR_MASK (~(PGDIR_SIZE-1)) 54 - 55 - /* 56 - * entries per page directory level: we use a two-level, so 57 - * we don't really have any PMD directory physically. 58 - * pointers are 4 bytes so we can use the page size and 59 - * divide it by 4 (shift by 2). 60 - */ 61 - #define PTRS_PER_PTE (1UL << (PAGE_SHIFT-2)) 62 - #define PTRS_PER_PGD (1UL << (PAGE_SHIFT-2)) 63 - 64 - /* calculate how many PGD entries a user-level program can use 65 - * the first mappable virtual address is 0 66 - * (TASK_SIZE is the maximum virtual address space) 67 - */ 68 - 69 - #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 70 - #define FIRST_USER_ADDRESS 0 71 - 72 - /* zero page used for uninitialized stuff */ 73 - #ifndef __ASSEMBLY__ 74 - extern unsigned long empty_zero_page; 75 - #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) 76 - #endif 77 - 78 - /* number of bits that fit into a memory pointer */ 79 - #define BITS_PER_PTR (8*sizeof(unsigned long)) 80 - 81 - /* to align the pointer to a pointer address */ 82 - #define PTR_MASK (~(sizeof(void*)-1)) 83 - 84 - /* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */ 85 - /* 64-bit machines, beware! SRB. */ 86 - #define SIZEOF_PTR_LOG2 2 87 - 88 - /* to find an entry in a page-table */ 89 - #define PAGE_PTR(address) \ 90 - ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) 91 - 92 - /* to set the page-dir */ 93 - #define SET_PAGE_DIR(tsk,pgdir) 94 - 95 - #define pte_none(x) (!pte_val(x)) 96 - #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) 97 - #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) 98 - 99 - #define pmd_none(x) (!pmd_val(x)) 100 - /* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad 101 - * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. 102 - */ 103 - #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE) 104 - #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) 105 - #define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0) 106 - 107 - #ifndef __ASSEMBLY__ 108 - 109 - /* 110 - * The following only work if pte_present() is true. 111 - * Undefined behaviour if not.. 112 - */ 113 - 114 - static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } 115 - static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_MODIFIED; } 116 - static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } 117 - static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } 118 - static inline int pte_special(pte_t pte) { return 0; } 119 - 120 - static inline pte_t pte_wrprotect(pte_t pte) 121 - { 122 - pte_val(pte) &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); 123 - return pte; 124 - } 125 - 126 - static inline pte_t pte_mkclean(pte_t pte) 127 - { 128 - pte_val(pte) &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); 129 - return pte; 130 - } 131 - 132 - static inline pte_t pte_mkold(pte_t pte) 133 - { 134 - pte_val(pte) &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ); 135 - return pte; 136 - } 137 - 138 - static inline pte_t pte_mkwrite(pte_t pte) 139 - { 140 - pte_val(pte) |= _PAGE_WRITE; 141 - if (pte_val(pte) & _PAGE_MODIFIED) 142 - pte_val(pte) |= _PAGE_SILENT_WRITE; 143 - return pte; 144 - } 145 - 146 - static inline pte_t pte_mkdirty(pte_t pte) 147 - { 148 - pte_val(pte) |= _PAGE_MODIFIED; 149 - if (pte_val(pte) & _PAGE_WRITE) 150 - pte_val(pte) |= _PAGE_SILENT_WRITE; 151 - return pte; 152 - } 153 - 154 - static inline pte_t pte_mkyoung(pte_t pte) 155 - { 156 - pte_val(pte) |= _PAGE_ACCESSED; 157 - if (pte_val(pte) & _PAGE_READ) 158 - { 159 - pte_val(pte) |= _PAGE_SILENT_READ; 160 - if ((pte_val(pte) & (_PAGE_WRITE | _PAGE_MODIFIED)) == 161 - (_PAGE_WRITE | _PAGE_MODIFIED)) 162 - pte_val(pte) |= _PAGE_SILENT_WRITE; 163 - } 164 - return pte; 165 - } 166 - static inline pte_t pte_mkspecial(pte_t pte) { return pte; } 167 - 168 - /* 169 - * Conversion functions: convert a page and protection to a page entry, 170 - * and a page entry and page directory to the page they refer to. 171 - */ 172 - 173 - /* What actually goes as arguments to the various functions is less than 174 - * obvious, but a rule of thumb is that struct page's goes as struct page *, 175 - * really physical DRAM addresses are unsigned long's, and DRAM "virtual" 176 - * addresses (the 0xc0xxxxxx's) goes as void *'s. 177 - */ 178 - 179 - static inline pte_t __mk_pte(void * page, pgprot_t pgprot) 180 - { 181 - pte_t pte; 182 - /* the PTE needs a physical address */ 183 - pte_val(pte) = __pa(page) | pgprot_val(pgprot); 184 - return pte; 185 - } 186 - 187 - #define mk_pte(page, pgprot) __mk_pte(page_address(page), (pgprot)) 188 - 189 - #define mk_pte_phys(physpage, pgprot) \ 190 - ({ \ 191 - pte_t __pte; \ 192 - \ 193 - pte_val(__pte) = (physpage) + pgprot_val(pgprot); \ 194 - __pte; \ 195 - }) 196 - 197 - static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 198 - { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } 199 - 200 - 201 - /* pte_val refers to a page in the 0x4xxxxxxx physical DRAM interval 202 - * __pte_page(pte_val) refers to the "virtual" DRAM interval 203 - * pte_pagenr refers to the page-number counted starting from the virtual DRAM start 204 - */ 205 - 206 - static inline unsigned long __pte_page(pte_t pte) 207 - { 208 - /* the PTE contains a physical address */ 209 - return (unsigned long)__va(pte_val(pte) & PAGE_MASK); 210 - } 211 - 212 - #define pte_pagenr(pte) ((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT) 213 - 214 - /* permanent address of a page */ 215 - 216 - #define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT)) 217 - #define pte_page(pte) (mem_map+pte_pagenr(pte)) 218 - 219 - /* only the pte's themselves need to point to physical DRAM (see above) 220 - * the pagetable links are purely handled within the kernel SW and thus 221 - * don't need the __pa and __va transformations. 222 - */ 223 - 224 - static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) 225 - { pmd_val(*pmdp) = _PAGE_TABLE | (unsigned long) ptep; } 226 - 227 - #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 228 - #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) 229 - 230 - /* to find an entry in a page-table-directory. */ 231 - #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) 232 - 233 - /* to find an entry in a page-table-directory */ 234 - static inline pgd_t * pgd_offset(const struct mm_struct *mm, unsigned long address) 235 - { 236 - return mm->pgd + pgd_index(address); 237 - } 238 - 239 - /* to find an entry in a kernel page-table-directory */ 240 - #define pgd_offset_k(address) pgd_offset(&init_mm, address) 241 - 242 - /* Find an entry in the third-level page table.. */ 243 - #define __pte_offset(address) \ 244 - (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) 245 - #define pte_offset_kernel(dir, address) \ 246 - ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) 247 - #define pte_offset_map(dir, address) \ 248 - ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) 249 - #define pte_offset_map_nested(dir, address) pte_offset_map(dir, address) 250 - 251 - #define pte_unmap(pte) do { } while (0) 252 - #define pte_unmap_nested(pte) do { } while (0) 253 - #define pte_pfn(x) ((unsigned long)(__va((x).pte)) >> PAGE_SHIFT) 254 - #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 255 - 256 - #define pte_ERROR(e) \ 257 - printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), pte_val(e)) 258 - #define pgd_ERROR(e) \ 259 - printk("%s:%d: bad pgd %p(%08lx).\n", __FILE__, __LINE__, &(e), pgd_val(e)) 260 - 261 - 262 - extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* defined in head.S */ 263 - 264 - /* 265 - * CRIS doesn't have any external MMU info: the kernel page 266 - * tables contain all the necessary information. 267 - * 268 - * Actually I am not sure on what this could be used for. 269 - */ 270 - static inline void update_mmu_cache(struct vm_area_struct * vma, 271 - unsigned long address, pte_t pte) 272 - { 273 - } 274 - 275 - /* Encode and de-code a swap entry (must be !pte_none(e) && !pte_present(e)) */ 276 - /* Since the PAGE_PRESENT bit is bit 4, we can use the bits above */ 277 - 278 - #define __swp_type(x) (((x).val >> 5) & 0x7f) 279 - #define __swp_offset(x) ((x).val >> 12) 280 - #define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 5) | ((offset) << 12) }) 281 - #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 282 - #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 283 - 284 - #define kern_addr_valid(addr) (1) 285 - 286 - #include <asm-generic/pgtable.h> 287 - 288 - /* 289 - * No page table caches to initialise 290 - */ 291 - #define pgtable_cache_init() do { } while (0) 292 - 293 - #define pte_to_pgoff(x) (pte_val(x) >> 6) 294 - #define pgoff_to_pte(x) __pte(((x) << 6) | _PAGE_FILE) 295 - 296 - typedef pte_t *pte_addr_t; 297 - 298 - #endif /* __ASSEMBLY__ */ 299 - #endif /* _CRIS_PGTABLE_H */
include/asm-cris/poll.h arch/cris/include/asm/poll.h
include/asm-cris/posix_types.h arch/cris/include/asm/posix_types.h
-75
include/asm-cris/processor.h
··· 1 - /* 2 - * include/asm-cris/processor.h 3 - * 4 - * Copyright (C) 2000, 2001 Axis Communications AB 5 - * 6 - * Authors: Bjorn Wesen Initial version 7 - * 8 - */ 9 - 10 - #ifndef __ASM_CRIS_PROCESSOR_H 11 - #define __ASM_CRIS_PROCESSOR_H 12 - 13 - #include <asm/system.h> 14 - #include <asm/page.h> 15 - #include <asm/ptrace.h> 16 - #include <asm/arch/processor.h> 17 - 18 - struct task_struct; 19 - 20 - #define STACK_TOP TASK_SIZE 21 - #define STACK_TOP_MAX STACK_TOP 22 - 23 - /* This decides where the kernel will search for a free chunk of vm 24 - * space during mmap's. 25 - */ 26 - #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) 27 - 28 - /* THREAD_SIZE is the size of the task_struct/kernel_stack combo. 29 - * normally, the stack is found by doing something like p + THREAD_SIZE 30 - * in CRIS, a page is 8192 bytes, which seems like a sane size 31 - */ 32 - 33 - #define THREAD_SIZE PAGE_SIZE 34 - #define KERNEL_STACK_SIZE PAGE_SIZE 35 - 36 - /* 37 - * At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack. 38 - * This macro allows us to find those regs for a task. 39 - * Notice that subsequent pt_regs stackings, like recursive interrupts occurring while 40 - * we're in the kernel, won't affect this - only the first user->kernel transition 41 - * registers are reached by this. 42 - */ 43 - 44 - #define user_regs(thread_info) (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE)) - 1) 45 - 46 - /* 47 - * Dito but for the currently running task 48 - */ 49 - 50 - #define task_pt_regs(task) user_regs(task_thread_info(task)) 51 - #define current_regs() task_pt_regs(current) 52 - 53 - static inline void prepare_to_copy(struct task_struct *tsk) 54 - { 55 - } 56 - 57 - extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); 58 - 59 - unsigned long get_wchan(struct task_struct *p); 60 - 61 - #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) 62 - 63 - extern unsigned long thread_saved_pc(struct task_struct *tsk); 64 - 65 - /* Free all resources held by a thread. */ 66 - static inline void release_thread(struct task_struct *dead_task) 67 - { 68 - /* Nothing needs to be done. */ 69 - } 70 - 71 - #define init_stack (init_thread_union.stack) 72 - 73 - #define cpu_relax() barrier() 74 - 75 - #endif /* __ASM_CRIS_PROCESSOR_H */
-16
include/asm-cris/ptrace.h
··· 1 - #ifndef _CRIS_PTRACE_H 2 - #define _CRIS_PTRACE_H 3 - 4 - #include <asm/arch/ptrace.h> 5 - 6 - #ifdef __KERNEL__ 7 - 8 - /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ 9 - #define PTRACE_GETREGS 12 10 - #define PTRACE_SETREGS 13 11 - 12 - #define profile_pc(regs) instruction_pointer(regs) 13 - 14 - #endif /* __KERNEL__ */ 15 - 16 - #endif /* _CRIS_PTRACE_H */
include/asm-cris/resource.h arch/cris/include/asm/resource.h
include/asm-cris/rs485.h arch/cris/include/asm/rs485.h
include/asm-cris/rtc.h arch/cris/include/asm/rtc.h
include/asm-cris/scatterlist.h arch/cris/include/asm/scatterlist.h
include/asm-cris/sections.h arch/cris/include/asm/sections.h
include/asm-cris/segment.h arch/cris/include/asm/segment.h
include/asm-cris/sembuf.h arch/cris/include/asm/sembuf.h
include/asm-cris/setup.h arch/cris/include/asm/setup.h
include/asm-cris/shmbuf.h arch/cris/include/asm/shmbuf.h
include/asm-cris/shmparam.h arch/cris/include/asm/shmparam.h
include/asm-cris/sigcontext.h arch/cris/include/asm/sigcontext.h
include/asm-cris/siginfo.h arch/cris/include/asm/siginfo.h
include/asm-cris/signal.h arch/cris/include/asm/signal.h
include/asm-cris/smp.h arch/cris/include/asm/smp.h
include/asm-cris/socket.h arch/cris/include/asm/socket.h
include/asm-cris/sockios.h arch/cris/include/asm/sockios.h
-1
include/asm-cris/spinlock.h
··· 1 - #include <asm/arch/spinlock.h>
include/asm-cris/stat.h arch/cris/include/asm/stat.h
include/asm-cris/statfs.h arch/cris/include/asm/statfs.h
include/asm-cris/string.h arch/cris/include/asm/string.h
include/asm-cris/sync_serial.h arch/cris/include/asm/sync_serial.h
-88
include/asm-cris/system.h
··· 1 - #ifndef __ASM_CRIS_SYSTEM_H 2 - #define __ASM_CRIS_SYSTEM_H 3 - 4 - #include <asm/arch/system.h> 5 - 6 - /* the switch_to macro calls resume, an asm function in entry.S which does the actual 7 - * task switching. 8 - */ 9 - 10 - extern struct task_struct *resume(struct task_struct *prev, struct task_struct *next, int); 11 - #define switch_to(prev,next,last) last = resume(prev,next, \ 12 - (int)&((struct task_struct *)0)->thread) 13 - 14 - #define barrier() __asm__ __volatile__("": : :"memory") 15 - #define mb() barrier() 16 - #define rmb() mb() 17 - #define wmb() mb() 18 - #define read_barrier_depends() do { } while(0) 19 - #define set_mb(var, value) do { var = value; mb(); } while (0) 20 - 21 - #ifdef CONFIG_SMP 22 - #define smp_mb() mb() 23 - #define smp_rmb() rmb() 24 - #define smp_wmb() wmb() 25 - #define smp_read_barrier_depends() read_barrier_depends() 26 - #else 27 - #define smp_mb() barrier() 28 - #define smp_rmb() barrier() 29 - #define smp_wmb() barrier() 30 - #define smp_read_barrier_depends() do { } while(0) 31 - #endif 32 - 33 - #define iret() 34 - 35 - /* 36 - * disable hlt during certain critical i/o operations 37 - */ 38 - #define HAVE_DISABLE_HLT 39 - void disable_hlt(void); 40 - void enable_hlt(void); 41 - 42 - static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) 43 - { 44 - /* since Etrax doesn't have any atomic xchg instructions, we need to disable 45 - irq's (if enabled) and do it with move.d's */ 46 - unsigned long flags,temp; 47 - local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ 48 - switch (size) { 49 - case 1: 50 - *((unsigned char *)&temp) = x; 51 - x = *(unsigned char *)ptr; 52 - *(unsigned char *)ptr = *((unsigned char *)&temp); 53 - break; 54 - case 2: 55 - *((unsigned short *)&temp) = x; 56 - x = *(unsigned short *)ptr; 57 - *(unsigned short *)ptr = *((unsigned short *)&temp); 58 - break; 59 - case 4: 60 - temp = x; 61 - x = *(unsigned long *)ptr; 62 - *(unsigned long *)ptr = temp; 63 - break; 64 - } 65 - local_irq_restore(flags); /* restore irq enable bit */ 66 - return x; 67 - } 68 - 69 - #include <asm-generic/cmpxchg-local.h> 70 - 71 - /* 72 - * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make 73 - * them available. 74 - */ 75 - #define cmpxchg_local(ptr, o, n) \ 76 - ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ 77 - (unsigned long)(n), sizeof(*(ptr)))) 78 - #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) 79 - 80 - #ifndef CONFIG_SMP 81 - #include <asm-generic/cmpxchg.h> 82 - #endif 83 - 84 - #define arch_align_stack(x) (x) 85 - 86 - void default_idle(void); 87 - 88 - #endif
include/asm-cris/termbits.h arch/cris/include/asm/termbits.h
include/asm-cris/termios.h arch/cris/include/asm/termios.h
-106
include/asm-cris/thread_info.h
··· 1 - /* thread_info.h: CRIS low-level thread information 2 - * 3 - * Copyright (C) 2002 David Howells (dhowells@redhat.com) 4 - * - Incorporating suggestions made by Linus Torvalds and Dave Miller 5 - * 6 - * CRIS port by Axis Communications 7 - */ 8 - 9 - #ifndef _ASM_THREAD_INFO_H 10 - #define _ASM_THREAD_INFO_H 11 - 12 - #ifdef __KERNEL__ 13 - 14 - #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR 15 - 16 - #ifndef __ASSEMBLY__ 17 - #include <asm/types.h> 18 - #include <asm/processor.h> 19 - #include <asm/arch/thread_info.h> 20 - #include <asm/segment.h> 21 - #endif 22 - 23 - 24 - /* 25 - * low level task data that entry.S needs immediate access to 26 - * - this struct should fit entirely inside of one cache line 27 - * - this struct shares the supervisor stack pages 28 - * - if the contents of this structure are changed, the assembly constants must also be changed 29 - */ 30 - #ifndef __ASSEMBLY__ 31 - struct thread_info { 32 - struct task_struct *task; /* main task structure */ 33 - struct exec_domain *exec_domain; /* execution domain */ 34 - unsigned long flags; /* low level flags */ 35 - __u32 cpu; /* current CPU */ 36 - int preempt_count; /* 0 => preemptable, <0 => BUG */ 37 - __u32 tls; /* TLS for this thread */ 38 - 39 - mm_segment_t addr_limit; /* thread address space: 40 - 0-0xBFFFFFFF for user-thead 41 - 0-0xFFFFFFFF for kernel-thread 42 - */ 43 - struct restart_block restart_block; 44 - __u8 supervisor_stack[0]; 45 - }; 46 - 47 - #endif 48 - 49 - #define PREEMPT_ACTIVE 0x10000000 50 - 51 - /* 52 - * macros/functions for gaining access to the thread information structure 53 - * 54 - * preempt_count needs to be 1 initially, until the scheduler is functional. 55 - */ 56 - #ifndef __ASSEMBLY__ 57 - #define INIT_THREAD_INFO(tsk) \ 58 - { \ 59 - .task = &tsk, \ 60 - .exec_domain = &default_exec_domain, \ 61 - .flags = 0, \ 62 - .cpu = 0, \ 63 - .preempt_count = 1, \ 64 - .addr_limit = KERNEL_DS, \ 65 - .restart_block = { \ 66 - .fn = do_no_restart_syscall, \ 67 - }, \ 68 - } 69 - 70 - #define init_thread_info (init_thread_union.thread_info) 71 - 72 - /* thread information allocation */ 73 - #define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) 74 - #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) 75 - 76 - #endif /* !__ASSEMBLY__ */ 77 - 78 - /* 79 - * thread information flags 80 - * - these are process state flags that various assembly files may need to access 81 - * - pending work-to-be-done flags are in LSW 82 - * - other flags in MSW 83 - */ 84 - #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ 85 - #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ 86 - #define TIF_SIGPENDING 2 /* signal pending */ 87 - #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ 88 - #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ 89 - #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 90 - #define TIF_MEMDIE 17 91 - #define TIF_FREEZE 18 /* is freezing for suspend */ 92 - 93 - #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 94 - #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 95 - #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 96 - #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 97 - #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 98 - #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 99 - #define _TIF_FREEZE (1<<TIF_FREEZE) 100 - 101 - #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ 102 - #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ 103 - 104 - #endif /* __KERNEL__ */ 105 - 106 - #endif /* _ASM_THREAD_INFO_H */
-24
include/asm-cris/timex.h
··· 1 - /* 2 - * linux/include/asm-cris/timex.h 3 - * 4 - * CRIS architecture timex specifications 5 - */ 6 - 7 - #ifndef _ASM_CRIS_TIMEX_H 8 - #define _ASM_CRIS_TIMEX_H 9 - 10 - #include <asm/arch/timex.h> 11 - 12 - /* 13 - * We don't have a cycle-counter.. but we do not support SMP anyway where this is 14 - * used so it does not matter. 15 - */ 16 - 17 - typedef unsigned long long cycles_t; 18 - 19 - static inline cycles_t get_cycles(void) 20 - { 21 - return 0; 22 - } 23 - 24 - #endif
-19
include/asm-cris/tlb.h
··· 1 - #ifndef _CRIS_TLB_H 2 - #define _CRIS_TLB_H 3 - 4 - #include <linux/pagemap.h> 5 - 6 - #include <asm/arch/tlb.h> 7 - 8 - /* 9 - * cris doesn't need any special per-pte or 10 - * per-vma handling.. 11 - */ 12 - #define tlb_start_vma(tlb, vma) do { } while (0) 13 - #define tlb_end_vma(tlb, vma) do { } while (0) 14 - #define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0) 15 - 16 - #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) 17 - #include <asm-generic/tlb.h> 18 - 19 - #endif
include/asm-cris/tlbflush.h arch/cris/include/asm/tlbflush.h
include/asm-cris/topology.h arch/cris/include/asm/topology.h
include/asm-cris/types.h arch/cris/include/asm/types.h
-404
include/asm-cris/uaccess.h
··· 1 - /* 2 - * Authors: Bjorn Wesen (bjornw@axis.com) 3 - * Hans-Peter Nilsson (hp@axis.com) 4 - */ 5 - 6 - /* Asm:s have been tweaked (within the domain of correctness) to give 7 - satisfactory results for "gcc version 2.96 20000427 (experimental)". 8 - 9 - Check regularly... 10 - 11 - Register $r9 is chosen for temporaries, being a call-clobbered register 12 - first in line to be used (notably for local blocks), not colliding with 13 - parameter registers. */ 14 - 15 - #ifndef _CRIS_UACCESS_H 16 - #define _CRIS_UACCESS_H 17 - 18 - #ifndef __ASSEMBLY__ 19 - #include <linux/sched.h> 20 - #include <linux/errno.h> 21 - #include <asm/processor.h> 22 - #include <asm/page.h> 23 - 24 - #define VERIFY_READ 0 25 - #define VERIFY_WRITE 1 26 - 27 - /* 28 - * The fs value determines whether argument validity checking should be 29 - * performed or not. If get_fs() == USER_DS, checking is performed, with 30 - * get_fs() == KERNEL_DS, checking is bypassed. 31 - * 32 - * For historical reasons, these macros are grossly misnamed. 33 - */ 34 - 35 - #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) 36 - 37 - /* addr_limit is the maximum accessible address for the task. we misuse 38 - * the KERNEL_DS and USER_DS values to both assign and compare the 39 - * addr_limit values through the equally misnamed get/set_fs macros. 40 - * (see above) 41 - */ 42 - 43 - #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) 44 - #define USER_DS MAKE_MM_SEG(TASK_SIZE) 45 - 46 - #define get_ds() (KERNEL_DS) 47 - #define get_fs() (current_thread_info()->addr_limit) 48 - #define set_fs(x) (current_thread_info()->addr_limit = (x)) 49 - 50 - #define segment_eq(a,b) ((a).seg == (b).seg) 51 - 52 - #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) 53 - #define __user_ok(addr,size) (((size) <= TASK_SIZE)&&((addr) <= TASK_SIZE-(size))) 54 - #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) 55 - #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) 56 - 57 - #include <asm/arch/uaccess.h> 58 - 59 - /* 60 - * The exception table consists of pairs of addresses: the first is the 61 - * address of an instruction that is allowed to fault, and the second is 62 - * the address at which the program should continue. No registers are 63 - * modified, so it is entirely up to the continuation code to figure out 64 - * what to do. 65 - * 66 - * All the routines below use bits of fixup code that are out of line 67 - * with the main instruction path. This means when everything is well, 68 - * we don't even have to jump over them. Further, they do not intrude 69 - * on our cache or tlb entries. 70 - */ 71 - 72 - struct exception_table_entry 73 - { 74 - unsigned long insn, fixup; 75 - }; 76 - 77 - /* 78 - * These are the main single-value transfer routines. They automatically 79 - * use the right size if we just have the right pointer type. 80 - * 81 - * This gets kind of ugly. We want to return _two_ values in "get_user()" 82 - * and yet we don't want to do any pointers, because that is too much 83 - * of a performance impact. Thus we have a few rather ugly macros here, 84 - * and hide all the ugliness from the user. 85 - * 86 - * The "__xxx" versions of the user access functions are versions that 87 - * do not verify the address space, that must have been done previously 88 - * with a separate "access_ok()" call (this is used when we do multiple 89 - * accesses to the same area of user memory). 90 - * 91 - * As we use the same address space for kernel and user data on 92 - * CRIS, we can just do these as direct assignments. (Of course, the 93 - * exception handling means that it's no longer "just"...) 94 - */ 95 - #define get_user(x,ptr) \ 96 - __get_user_check((x),(ptr),sizeof(*(ptr))) 97 - #define put_user(x,ptr) \ 98 - __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) 99 - 100 - #define __get_user(x,ptr) \ 101 - __get_user_nocheck((x),(ptr),sizeof(*(ptr))) 102 - #define __put_user(x,ptr) \ 103 - __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) 104 - 105 - extern long __put_user_bad(void); 106 - 107 - #define __put_user_size(x,ptr,size,retval) \ 108 - do { \ 109 - retval = 0; \ 110 - switch (size) { \ 111 - case 1: __put_user_asm(x,ptr,retval,"move.b"); break; \ 112 - case 2: __put_user_asm(x,ptr,retval,"move.w"); break; \ 113 - case 4: __put_user_asm(x,ptr,retval,"move.d"); break; \ 114 - case 8: __put_user_asm_64(x,ptr,retval); break; \ 115 - default: __put_user_bad(); \ 116 - } \ 117 - } while (0) 118 - 119 - #define __get_user_size(x,ptr,size,retval) \ 120 - do { \ 121 - retval = 0; \ 122 - switch (size) { \ 123 - case 1: __get_user_asm(x,ptr,retval,"move.b"); break; \ 124 - case 2: __get_user_asm(x,ptr,retval,"move.w"); break; \ 125 - case 4: __get_user_asm(x,ptr,retval,"move.d"); break; \ 126 - case 8: __get_user_asm_64(x,ptr,retval); break; \ 127 - default: (x) = __get_user_bad(); \ 128 - } \ 129 - } while (0) 130 - 131 - #define __put_user_nocheck(x,ptr,size) \ 132 - ({ \ 133 - long __pu_err; \ 134 - __put_user_size((x),(ptr),(size),__pu_err); \ 135 - __pu_err; \ 136 - }) 137 - 138 - #define __put_user_check(x,ptr,size) \ 139 - ({ \ 140 - long __pu_err = -EFAULT; \ 141 - __typeof__(*(ptr)) *__pu_addr = (ptr); \ 142 - if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ 143 - __put_user_size((x),__pu_addr,(size),__pu_err); \ 144 - __pu_err; \ 145 - }) 146 - 147 - struct __large_struct { unsigned long buf[100]; }; 148 - #define __m(x) (*(struct __large_struct *)(x)) 149 - 150 - 151 - 152 - #define __get_user_nocheck(x,ptr,size) \ 153 - ({ \ 154 - long __gu_err, __gu_val; \ 155 - __get_user_size(__gu_val,(ptr),(size),__gu_err); \ 156 - (x) = (__typeof__(*(ptr)))__gu_val; \ 157 - __gu_err; \ 158 - }) 159 - 160 - #define __get_user_check(x,ptr,size) \ 161 - ({ \ 162 - long __gu_err = -EFAULT, __gu_val = 0; \ 163 - const __typeof__(*(ptr)) *__gu_addr = (ptr); \ 164 - if (access_ok(VERIFY_READ,__gu_addr,size)) \ 165 - __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ 166 - (x) = (__typeof__(*(ptr)))__gu_val; \ 167 - __gu_err; \ 168 - }) 169 - 170 - extern long __get_user_bad(void); 171 - 172 - /* More complex functions. Most are inline, but some call functions that 173 - live in lib/usercopy.c */ 174 - 175 - extern unsigned long __copy_user(void __user *to, const void *from, unsigned long n); 176 - extern unsigned long __copy_user_zeroing(void *to, const void __user *from, unsigned long n); 177 - extern unsigned long __do_clear_user(void __user *to, unsigned long n); 178 - 179 - static inline unsigned long 180 - __generic_copy_to_user(void __user *to, const void *from, unsigned long n) 181 - { 182 - if (access_ok(VERIFY_WRITE, to, n)) 183 - return __copy_user(to,from,n); 184 - return n; 185 - } 186 - 187 - static inline unsigned long 188 - __generic_copy_from_user(void *to, const void __user *from, unsigned long n) 189 - { 190 - if (access_ok(VERIFY_READ, from, n)) 191 - return __copy_user_zeroing(to,from,n); 192 - return n; 193 - } 194 - 195 - static inline unsigned long 196 - __generic_clear_user(void __user *to, unsigned long n) 197 - { 198 - if (access_ok(VERIFY_WRITE, to, n)) 199 - return __do_clear_user(to,n); 200 - return n; 201 - } 202 - 203 - static inline long 204 - __strncpy_from_user(char *dst, const char __user *src, long count) 205 - { 206 - return __do_strncpy_from_user(dst, src, count); 207 - } 208 - 209 - static inline long 210 - strncpy_from_user(char *dst, const char __user *src, long count) 211 - { 212 - long res = -EFAULT; 213 - if (access_ok(VERIFY_READ, src, 1)) 214 - res = __do_strncpy_from_user(dst, src, count); 215 - return res; 216 - } 217 - 218 - 219 - /* Note that these expand awfully if made into switch constructs, so 220 - don't do that. */ 221 - 222 - static inline unsigned long 223 - __constant_copy_from_user(void *to, const void __user *from, unsigned long n) 224 - { 225 - unsigned long ret = 0; 226 - if (n == 0) 227 - ; 228 - else if (n == 1) 229 - __asm_copy_from_user_1(to, from, ret); 230 - else if (n == 2) 231 - __asm_copy_from_user_2(to, from, ret); 232 - else if (n == 3) 233 - __asm_copy_from_user_3(to, from, ret); 234 - else if (n == 4) 235 - __asm_copy_from_user_4(to, from, ret); 236 - else if (n == 5) 237 - __asm_copy_from_user_5(to, from, ret); 238 - else if (n == 6) 239 - __asm_copy_from_user_6(to, from, ret); 240 - else if (n == 7) 241 - __asm_copy_from_user_7(to, from, ret); 242 - else if (n == 8) 243 - __asm_copy_from_user_8(to, from, ret); 244 - else if (n == 9) 245 - __asm_copy_from_user_9(to, from, ret); 246 - else if (n == 10) 247 - __asm_copy_from_user_10(to, from, ret); 248 - else if (n == 11) 249 - __asm_copy_from_user_11(to, from, ret); 250 - else if (n == 12) 251 - __asm_copy_from_user_12(to, from, ret); 252 - else if (n == 13) 253 - __asm_copy_from_user_13(to, from, ret); 254 - else if (n == 14) 255 - __asm_copy_from_user_14(to, from, ret); 256 - else if (n == 15) 257 - __asm_copy_from_user_15(to, from, ret); 258 - else if (n == 16) 259 - __asm_copy_from_user_16(to, from, ret); 260 - else if (n == 20) 261 - __asm_copy_from_user_20(to, from, ret); 262 - else if (n == 24) 263 - __asm_copy_from_user_24(to, from, ret); 264 - else 265 - ret = __generic_copy_from_user(to, from, n); 266 - 267 - return ret; 268 - } 269 - 270 - /* Ditto, don't make a switch out of this. */ 271 - 272 - static inline unsigned long 273 - __constant_copy_to_user(void __user *to, const void *from, unsigned long n) 274 - { 275 - unsigned long ret = 0; 276 - if (n == 0) 277 - ; 278 - else if (n == 1) 279 - __asm_copy_to_user_1(to, from, ret); 280 - else if (n == 2) 281 - __asm_copy_to_user_2(to, from, ret); 282 - else if (n == 3) 283 - __asm_copy_to_user_3(to, from, ret); 284 - else if (n == 4) 285 - __asm_copy_to_user_4(to, from, ret); 286 - else if (n == 5) 287 - __asm_copy_to_user_5(to, from, ret); 288 - else if (n == 6) 289 - __asm_copy_to_user_6(to, from, ret); 290 - else if (n == 7) 291 - __asm_copy_to_user_7(to, from, ret); 292 - else if (n == 8) 293 - __asm_copy_to_user_8(to, from, ret); 294 - else if (n == 9) 295 - __asm_copy_to_user_9(to, from, ret); 296 - else if (n == 10) 297 - __asm_copy_to_user_10(to, from, ret); 298 - else if (n == 11) 299 - __asm_copy_to_user_11(to, from, ret); 300 - else if (n == 12) 301 - __asm_copy_to_user_12(to, from, ret); 302 - else if (n == 13) 303 - __asm_copy_to_user_13(to, from, ret); 304 - else if (n == 14) 305 - __asm_copy_to_user_14(to, from, ret); 306 - else if (n == 15) 307 - __asm_copy_to_user_15(to, from, ret); 308 - else if (n == 16) 309 - __asm_copy_to_user_16(to, from, ret); 310 - else if (n == 20) 311 - __asm_copy_to_user_20(to, from, ret); 312 - else if (n == 24) 313 - __asm_copy_to_user_24(to, from, ret); 314 - else 315 - ret = __generic_copy_to_user(to, from, n); 316 - 317 - return ret; 318 - } 319 - 320 - /* No switch, please. */ 321 - 322 - static inline unsigned long 323 - __constant_clear_user(void __user *to, unsigned long n) 324 - { 325 - unsigned long ret = 0; 326 - if (n == 0) 327 - ; 328 - else if (n == 1) 329 - __asm_clear_1(to, ret); 330 - else if (n == 2) 331 - __asm_clear_2(to, ret); 332 - else if (n == 3) 333 - __asm_clear_3(to, ret); 334 - else if (n == 4) 335 - __asm_clear_4(to, ret); 336 - else if (n == 8) 337 - __asm_clear_8(to, ret); 338 - else if (n == 12) 339 - __asm_clear_12(to, ret); 340 - else if (n == 16) 341 - __asm_clear_16(to, ret); 342 - else if (n == 20) 343 - __asm_clear_20(to, ret); 344 - else if (n == 24) 345 - __asm_clear_24(to, ret); 346 - else 347 - ret = __generic_clear_user(to, n); 348 - 349 - return ret; 350 - } 351 - 352 - 353 - #define clear_user(to, n) \ 354 - (__builtin_constant_p(n) ? \ 355 - __constant_clear_user(to, n) : \ 356 - __generic_clear_user(to, n)) 357 - 358 - #define copy_from_user(to, from, n) \ 359 - (__builtin_constant_p(n) ? \ 360 - __constant_copy_from_user(to, from, n) : \ 361 - __generic_copy_from_user(to, from, n)) 362 - 363 - #define copy_to_user(to, from, n) \ 364 - (__builtin_constant_p(n) ? \ 365 - __constant_copy_to_user(to, from, n) : \ 366 - __generic_copy_to_user(to, from, n)) 367 - 368 - /* We let the __ versions of copy_from/to_user inline, because they're often 369 - * used in fast paths and have only a small space overhead. 370 - */ 371 - 372 - static inline unsigned long 373 - __generic_copy_from_user_nocheck(void *to, const void __user *from, 374 - unsigned long n) 375 - { 376 - return __copy_user_zeroing(to,from,n); 377 - } 378 - 379 - static inline unsigned long 380 - __generic_copy_to_user_nocheck(void __user *to, const void *from, 381 - unsigned long n) 382 - { 383 - return __copy_user(to,from,n); 384 - } 385 - 386 - static inline unsigned long 387 - __generic_clear_user_nocheck(void __user *to, unsigned long n) 388 - { 389 - return __do_clear_user(to,n); 390 - } 391 - 392 - /* without checking */ 393 - 394 - #define __copy_to_user(to,from,n) __generic_copy_to_user_nocheck((to),(from),(n)) 395 - #define __copy_from_user(to,from,n) __generic_copy_from_user_nocheck((to),(from),(n)) 396 - #define __copy_to_user_inatomic __copy_to_user 397 - #define __copy_from_user_inatomic __copy_from_user 398 - #define __clear_user(to,n) __generic_clear_user_nocheck((to),(n)) 399 - 400 - #define strlen_user(str) strnlen_user((str), 0x7ffffffe) 401 - 402 - #endif /* __ASSEMBLY__ */ 403 - 404 - #endif /* _CRIS_UACCESS_H */
include/asm-cris/ucontext.h arch/cris/include/asm/ucontext.h
include/asm-cris/unaligned.h arch/cris/include/asm/unaligned.h
-374
include/asm-cris/unistd.h
··· 1 - #ifndef _ASM_CRIS_UNISTD_H_ 2 - #define _ASM_CRIS_UNISTD_H_ 3 - 4 - /* 5 - * This file contains the system call numbers, and stub macros for libc. 6 - */ 7 - 8 - #define __NR_restart_syscall 0 9 - #define __NR_exit 1 10 - #define __NR_fork 2 11 - #define __NR_read 3 12 - #define __NR_write 4 13 - #define __NR_open 5 14 - #define __NR_close 6 15 - #define __NR_waitpid 7 16 - #define __NR_creat 8 17 - #define __NR_link 9 18 - #define __NR_unlink 10 19 - #define __NR_execve 11 20 - #define __NR_chdir 12 21 - #define __NR_time 13 22 - #define __NR_mknod 14 23 - #define __NR_chmod 15 24 - #define __NR_lchown 16 25 - #define __NR_break 17 26 - #define __NR_oldstat 18 27 - #define __NR_lseek 19 28 - #define __NR_getpid 20 29 - #define __NR_mount 21 30 - #define __NR_umount 22 31 - #define __NR_setuid 23 32 - #define __NR_getuid 24 33 - #define __NR_stime 25 34 - #define __NR_ptrace 26 35 - #define __NR_alarm 27 36 - #define __NR_oldfstat 28 37 - #define __NR_pause 29 38 - #define __NR_utime 30 39 - #define __NR_stty 31 40 - #define __NR_gtty 32 41 - #define __NR_access 33 42 - #define __NR_nice 34 43 - #define __NR_ftime 35 44 - #define __NR_sync 36 45 - #define __NR_kill 37 46 - #define __NR_rename 38 47 - #define __NR_mkdir 39 48 - #define __NR_rmdir 40 49 - #define __NR_dup 41 50 - #define __NR_pipe 42 51 - #define __NR_times 43 52 - #define __NR_prof 44 53 - #define __NR_brk 45 54 - #define __NR_setgid 46 55 - #define __NR_getgid 47 56 - #define __NR_signal 48 57 - #define __NR_geteuid 49 58 - #define __NR_getegid 50 59 - #define __NR_acct 51 60 - #define __NR_umount2 52 61 - #define __NR_lock 53 62 - #define __NR_ioctl 54 63 - #define __NR_fcntl 55 64 - #define __NR_mpx 56 65 - #define __NR_setpgid 57 66 - #define __NR_ulimit 58 67 - #define __NR_oldolduname 59 68 - #define __NR_umask 60 69 - #define __NR_chroot 61 70 - #define __NR_ustat 62 71 - #define __NR_dup2 63 72 - #define __NR_getppid 64 73 - #define __NR_getpgrp 65 74 - #define __NR_setsid 66 75 - #define __NR_sigaction 67 76 - #define __NR_sgetmask 68 77 - #define __NR_ssetmask 69 78 - #define __NR_setreuid 70 79 - #define __NR_setregid 71 80 - #define __NR_sigsuspend 72 81 - #define __NR_sigpending 73 82 - #define __NR_sethostname 74 83 - #define __NR_setrlimit 75 84 - #define __NR_getrlimit 76 85 - #define __NR_getrusage 77 86 - #define __NR_gettimeofday 78 87 - #define __NR_settimeofday 79 88 - #define __NR_getgroups 80 89 - #define __NR_setgroups 81 90 - #define __NR_select 82 91 - #define __NR_symlink 83 92 - #define __NR_oldlstat 84 93 - #define __NR_readlink 85 94 - #define __NR_uselib 86 95 - #define __NR_swapon 87 96 - #define __NR_reboot 88 97 - #define __NR_readdir 89 98 - #define __NR_mmap 90 99 - #define __NR_munmap 91 100 - #define __NR_truncate 92 101 - #define __NR_ftruncate 93 102 - #define __NR_fchmod 94 103 - #define __NR_fchown 95 104 - #define __NR_getpriority 96 105 - #define __NR_setpriority 97 106 - #define __NR_profil 98 107 - #define __NR_statfs 99 108 - #define __NR_fstatfs 100 109 - #define __NR_ioperm 101 110 - #define __NR_socketcall 102 111 - #define __NR_syslog 103 112 - #define __NR_setitimer 104 113 - #define __NR_getitimer 105 114 - #define __NR_stat 106 115 - #define __NR_lstat 107 116 - #define __NR_fstat 108 117 - #define __NR_olduname 109 118 - #define __NR_iopl 110 119 - #define __NR_vhangup 111 120 - #define __NR_idle 112 121 - #define __NR_vm86 113 122 - #define __NR_wait4 114 123 - #define __NR_swapoff 115 124 - #define __NR_sysinfo 116 125 - #define __NR_ipc 117 126 - #define __NR_fsync 118 127 - #define __NR_sigreturn 119 128 - #define __NR_clone 120 129 - #define __NR_setdomainname 121 130 - #define __NR_uname 122 131 - #define __NR_modify_ldt 123 132 - #define __NR_adjtimex 124 133 - #define __NR_mprotect 125 134 - #define __NR_sigprocmask 126 135 - #define __NR_create_module 127 136 - #define __NR_init_module 128 137 - #define __NR_delete_module 129 138 - #define __NR_get_kernel_syms 130 139 - #define __NR_quotactl 131 140 - #define __NR_getpgid 132 141 - #define __NR_fchdir 133 142 - #define __NR_bdflush 134 143 - #define __NR_sysfs 135 144 - #define __NR_personality 136 145 - #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ 146 - #define __NR_setfsuid 138 147 - #define __NR_setfsgid 139 148 - #define __NR__llseek 140 149 - #define __NR_getdents 141 150 - #define __NR__newselect 142 151 - #define __NR_flock 143 152 - #define __NR_msync 144 153 - #define __NR_readv 145 154 - #define __NR_writev 146 155 - #define __NR_getsid 147 156 - #define __NR_fdatasync 148 157 - #define __NR__sysctl 149 158 - #define __NR_mlock 150 159 - #define __NR_munlock 151 160 - #define __NR_mlockall 152 161 - #define __NR_munlockall 153 162 - #define __NR_sched_setparam 154 163 - #define __NR_sched_getparam 155 164 - #define __NR_sched_setscheduler 156 165 - #define __NR_sched_getscheduler 157 166 - #define __NR_sched_yield 158 167 - #define __NR_sched_get_priority_max 159 168 - #define __NR_sched_get_priority_min 160 169 - #define __NR_sched_rr_get_interval 161 170 - #define __NR_nanosleep 162 171 - #define __NR_mremap 163 172 - #define __NR_setresuid 164 173 - #define __NR_getresuid 165 174 - 175 - #define __NR_query_module 167 176 - #define __NR_poll 168 177 - #define __NR_nfsservctl 169 178 - #define __NR_setresgid 170 179 - #define __NR_getresgid 171 180 - #define __NR_prctl 172 181 - #define __NR_rt_sigreturn 173 182 - #define __NR_rt_sigaction 174 183 - #define __NR_rt_sigprocmask 175 184 - #define __NR_rt_sigpending 176 185 - #define __NR_rt_sigtimedwait 177 186 - #define __NR_rt_sigqueueinfo 178 187 - #define __NR_rt_sigsuspend 179 188 - #define __NR_pread64 180 189 - #define __NR_pwrite64 181 190 - #define __NR_chown 182 191 - #define __NR_getcwd 183 192 - #define __NR_capget 184 193 - #define __NR_capset 185 194 - #define __NR_sigaltstack 186 195 - #define __NR_sendfile 187 196 - #define __NR_getpmsg 188 /* some people actually want streams */ 197 - #define __NR_putpmsg 189 /* some people actually want streams */ 198 - #define __NR_vfork 190 199 - #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ 200 - #define __NR_mmap2 192 201 - #define __NR_truncate64 193 202 - #define __NR_ftruncate64 194 203 - #define __NR_stat64 195 204 - #define __NR_lstat64 196 205 - #define __NR_fstat64 197 206 - #define __NR_lchown32 198 207 - #define __NR_getuid32 199 208 - #define __NR_getgid32 200 209 - #define __NR_geteuid32 201 210 - #define __NR_getegid32 202 211 - #define __NR_setreuid32 203 212 - #define __NR_setregid32 204 213 - #define __NR_getgroups32 205 214 - #define __NR_setgroups32 206 215 - #define __NR_fchown32 207 216 - #define __NR_setresuid32 208 217 - #define __NR_getresuid32 209 218 - #define __NR_setresgid32 210 219 - #define __NR_getresgid32 211 220 - #define __NR_chown32 212 221 - #define __NR_setuid32 213 222 - #define __NR_setgid32 214 223 - #define __NR_setfsuid32 215 224 - #define __NR_setfsgid32 216 225 - #define __NR_pivot_root 217 226 - #define __NR_mincore 218 227 - #define __NR_madvise 219 228 - #define __NR_getdents64 220 229 - #define __NR_fcntl64 221 230 - /* 223 is unused */ 231 - #define __NR_gettid 224 232 - #define __NR_readahead 225 233 - #define __NR_setxattr 226 234 - #define __NR_lsetxattr 227 235 - #define __NR_fsetxattr 228 236 - #define __NR_getxattr 229 237 - #define __NR_lgetxattr 230 238 - #define __NR_fgetxattr 231 239 - #define __NR_listxattr 232 240 - #define __NR_llistxattr 233 241 - #define __NR_flistxattr 234 242 - #define __NR_removexattr 235 243 - #define __NR_lremovexattr 236 244 - #define __NR_fremovexattr 237 245 - #define __NR_tkill 238 246 - #define __NR_sendfile64 239 247 - #define __NR_futex 240 248 - #define __NR_sched_setaffinity 241 249 - #define __NR_sched_getaffinity 242 250 - #define __NR_set_thread_area 243 251 - #define __NR_get_thread_area 244 252 - #define __NR_io_setup 245 253 - #define __NR_io_destroy 246 254 - #define __NR_io_getevents 247 255 - #define __NR_io_submit 248 256 - #define __NR_io_cancel 249 257 - #define __NR_fadvise64 250 258 - /* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ 259 - #define __NR_exit_group 252 260 - #define __NR_lookup_dcookie 253 261 - #define __NR_epoll_create 254 262 - #define __NR_epoll_ctl 255 263 - #define __NR_epoll_wait 256 264 - #define __NR_remap_file_pages 257 265 - #define __NR_set_tid_address 258 266 - #define __NR_timer_create 259 267 - #define __NR_timer_settime (__NR_timer_create+1) 268 - #define __NR_timer_gettime (__NR_timer_create+2) 269 - #define __NR_timer_getoverrun (__NR_timer_create+3) 270 - #define __NR_timer_delete (__NR_timer_create+4) 271 - #define __NR_clock_settime (__NR_timer_create+5) 272 - #define __NR_clock_gettime (__NR_timer_create+6) 273 - #define __NR_clock_getres (__NR_timer_create+7) 274 - #define __NR_clock_nanosleep (__NR_timer_create+8) 275 - #define __NR_statfs64 268 276 - #define __NR_fstatfs64 269 277 - #define __NR_tgkill 270 278 - #define __NR_utimes 271 279 - #define __NR_fadvise64_64 272 280 - #define __NR_vserver 273 281 - #define __NR_mbind 274 282 - #define __NR_get_mempolicy 275 283 - #define __NR_set_mempolicy 276 284 - #define __NR_mq_open 277 285 - #define __NR_mq_unlink (__NR_mq_open+1) 286 - #define __NR_mq_timedsend (__NR_mq_open+2) 287 - #define __NR_mq_timedreceive (__NR_mq_open+3) 288 - #define __NR_mq_notify (__NR_mq_open+4) 289 - #define __NR_mq_getsetattr (__NR_mq_open+5) 290 - #define __NR_kexec_load 283 291 - #define __NR_waitid 284 292 - /* #define __NR_sys_setaltroot 285 */ 293 - #define __NR_add_key 286 294 - #define __NR_request_key 287 295 - #define __NR_keyctl 288 296 - #define __NR_ioprio_set 289 297 - #define __NR_ioprio_get 290 298 - #define __NR_inotify_init 291 299 - #define __NR_inotify_add_watch 292 300 - #define __NR_inotify_rm_watch 293 301 - #define __NR_migrate_pages 294 302 - #define __NR_openat 295 303 - #define __NR_mkdirat 296 304 - #define __NR_mknodat 297 305 - #define __NR_fchownat 298 306 - #define __NR_futimesat 299 307 - #define __NR_fstatat64 300 308 - #define __NR_unlinkat 301 309 - #define __NR_renameat 302 310 - #define __NR_linkat 303 311 - #define __NR_symlinkat 304 312 - #define __NR_readlinkat 305 313 - #define __NR_fchmodat 306 314 - #define __NR_faccessat 307 315 - #define __NR_pselect6 308 316 - #define __NR_ppoll 309 317 - #define __NR_unshare 310 318 - #define __NR_set_robust_list 311 319 - #define __NR_get_robust_list 312 320 - #define __NR_splice 313 321 - #define __NR_sync_file_range 314 322 - #define __NR_tee 315 323 - #define __NR_vmsplice 316 324 - #define __NR_move_pages 317 325 - #define __NR_getcpu 318 326 - #define __NR_epoll_pwait 319 327 - #define __NR_utimensat 320 328 - #define __NR_signalfd 321 329 - #define __NR_timerfd_create 322 330 - #define __NR_eventfd 323 331 - #define __NR_fallocate 324 332 - #define __NR_timerfd_settime 325 333 - #define __NR_timerfd_gettime 326 334 - 335 - #ifdef __KERNEL__ 336 - 337 - #define NR_syscalls 327 338 - 339 - #include <asm/arch/unistd.h> 340 - 341 - #define __ARCH_WANT_IPC_PARSE_VERSION 342 - #define __ARCH_WANT_OLD_READDIR 343 - #define __ARCH_WANT_OLD_STAT 344 - #define __ARCH_WANT_STAT64 345 - #define __ARCH_WANT_SYS_ALARM 346 - #define __ARCH_WANT_SYS_GETHOSTNAME 347 - #define __ARCH_WANT_SYS_PAUSE 348 - #define __ARCH_WANT_SYS_SGETMASK 349 - #define __ARCH_WANT_SYS_SIGNAL 350 - #define __ARCH_WANT_SYS_TIME 351 - #define __ARCH_WANT_SYS_UTIME 352 - #define __ARCH_WANT_SYS_WAITPID 353 - #define __ARCH_WANT_SYS_SOCKETCALL 354 - #define __ARCH_WANT_SYS_FADVISE64 355 - #define __ARCH_WANT_SYS_GETPGRP 356 - #define __ARCH_WANT_SYS_LLSEEK 357 - #define __ARCH_WANT_SYS_NICE 358 - #define __ARCH_WANT_SYS_OLD_GETRLIMIT 359 - #define __ARCH_WANT_SYS_OLDUMOUNT 360 - #define __ARCH_WANT_SYS_SIGPENDING 361 - #define __ARCH_WANT_SYS_SIGPROCMASK 362 - #define __ARCH_WANT_SYS_RT_SIGACTION 363 - #define __ARCH_WANT_SYS_RT_SIGSUSPEND 364 - 365 - /* 366 - * "Conditional" syscalls 367 - * 368 - * What we want is __attribute__((weak,alias("sys_ni_syscall"))), 369 - * but it doesn't work on all toolchains, so we just do it by hand 370 - */ 371 - #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 372 - 373 - #endif /* __KERNEL__ */ 374 - #endif /* _ASM_CRIS_UNISTD_H_ */
-52
include/asm-cris/user.h
··· 1 - #ifndef __ASM_CRIS_USER_H 2 - #define __ASM_CRIS_USER_H 3 - 4 - #include <linux/types.h> 5 - #include <asm/ptrace.h> 6 - #include <asm/page.h> 7 - #include <asm/arch/user.h> 8 - 9 - /* 10 - * Core file format: The core file is written in such a way that gdb 11 - * can understand it and provide useful information to the user (under 12 - * linux we use the `trad-core' bfd). The file contents are as follows: 13 - * 14 - * upage: 1 page consisting of a user struct that tells gdb 15 - * what is present in the file. Directly after this is a 16 - * copy of the task_struct, which is currently not used by gdb, 17 - * but it may come in handy at some point. All of the registers 18 - * are stored as part of the upage. The upage should always be 19 - * only one page long. 20 - * data: The data segment follows next. We use current->end_text to 21 - * current->brk to pick up all of the user variables, plus any memory 22 - * that may have been sbrk'ed. No attempt is made to determine if a 23 - * page is demand-zero or if a page is totally unused, we just cover 24 - * the entire range. All of the addresses are rounded in such a way 25 - * that an integral number of pages is written. 26 - * stack: We need the stack information in order to get a meaningful 27 - * backtrace. We need to write the data from usp to 28 - * current->start_stack, so we round each of these in order to be able 29 - * to write an integer number of pages. 30 - */ 31 - 32 - struct user { 33 - struct user_regs_struct regs; /* entire machine state */ 34 - size_t u_tsize; /* text size (pages) */ 35 - size_t u_dsize; /* data size (pages) */ 36 - size_t u_ssize; /* stack size (pages) */ 37 - unsigned long start_code; /* text starting address */ 38 - unsigned long start_data; /* data starting address */ 39 - unsigned long start_stack; /* stack starting address */ 40 - long int signal; /* signal causing core dump */ 41 - unsigned long u_ar0; /* help gdb find registers */ 42 - unsigned long magic; /* identifies a core file */ 43 - char u_comm[32]; /* user command name */ 44 - }; 45 - 46 - #define NBPG PAGE_SIZE 47 - #define UPAGES 1 48 - #define HOST_TEXT_START_ADDR (u.start_code) 49 - #define HOST_DATA_START_ADDR (u.start_data) 50 - #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) 51 - 52 - #endif /* __ASM_CRIS_USER_H */