MicroBlaze-2.6-Kernel: linux-2.6.19-uc0-microblaze.patch
| File linux-2.6.19-uc0-microblaze.patch, 0.8 MB (added by jwilliams, 2 years ago) |
|---|
-
include/linux/serial_core.h
old new 152 152 /* Alter Nios II UART */ 153 153 #define PORT_JTAG_UART 80 154 154 155 /* Xilinx uartlite */ 156 #define PORT_UARTLITE 81 155 157 156 158 #ifdef __KERNEL__ 157 159 -
include/asm-microblaze/hw_irq.h
old new 1 /* 2 * include/asm-microblaze/hw_irq.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_HW_IRQ_H 12 #define _ASM_HW_IRQ_H 13 14 static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) 15 { 16 /* Nothing to do */ 17 } 18 19 #endif /* _ASM_HW_IRQ_H */ -
include/asm-microblaze/siginfo.h
old new 1 /* 2 * include/asm-microblaze/siginfo.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_SIGINFO_H 12 #define _ASM_SIGINFO_H 13 14 #include <linux/types.h> 15 #include <asm-generic/siginfo.h> 16 17 #endif /* _ASM_SIGINFO_H */ -
include/asm-microblaze/byteorder.h
old new 1 /* 2 * include/asm-microblaze/system.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_BYTEORDER_H 12 #define _ASM_BYTEORDER_H 13 14 #include <asm/types.h> 15 16 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 17 # define __BYTEORDER_HAS_U64__ 18 # define __SWAB_64_THRU_32__ 19 #endif 20 21 #include <linux/byteorder/big_endian.h> 22 23 #endif /* _ASM_BYTEORDER_H */ -
include/asm-microblaze/poll.h
old new 1 /* 2 * include/asm-microblaze/poll.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_POLL_H 12 #define _ASM_POLL_H 13 14 #define POLLIN 0x0001 15 #define POLLPRI 0x0002 16 #define POLLOUT 0x0004 17 18 #define POLLERR 0x0008 19 #define POLLHUP 0x0010 20 #define POLLNVAL 0x0020 21 22 #define POLLRDNORM 0x0040 23 #define POLLRDBAND 0x0080 24 #define POLLWRNORM POLLOUT 25 #define POLLWRBAND 0x0100 26 27 #define POLLMSG 0x0400 28 #define POLLREMOVE 0x0800 29 #define POLLRDHUP 0x2000 30 31 struct pollfd { 32 int fd; 33 short events; 34 short revents; 35 }; 36 37 #endif /* _ASM_POLL_H */ -
include/asm-microblaze/elf.h
old new 1 /* 2 * include/asm-microblaze/elf.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_ELF_H 12 #define _ASM_ELF_H 13 14 /* 15 * These are used to set parameters in the core dumps. 16 */ 17 #define ELF_CLASS ELFCLASS32 18 19 #endif /* _ASM_ELF_H */ -
include/asm-microblaze/unaligned.h
old new 1 /* 2 * include/asm-microblaze/unaligned.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_UNALIGNED_H 12 #define _ASM_UNALIGNED_H 13 14 #include <asm-generic/unaligned.h> 15 16 #endif /* _ASM_UNALIGNED_H */ -
include/asm-microblaze/ucontext.h
old new 1 #ifndef __MICROBLAZE_UCONTEXT_H__ 2 #define __MICROBLAZE_UCONTEXT_H__ 3 4 #include <asm/sigcontext.h> 5 6 struct ucontext { 7 unsigned long uc_flags; 8 struct ucontext *uc_link; 9 stack_t uc_stack; 10 struct sigcontext uc_mcontext; 11 sigset_t uc_sigmask; /* mask last for extensibility */ 12 }; 13 14 #endif /* __MICROBLAZE_UCONTEXT_H__ */ -
include/asm-microblaze/ioctl.h
old new 1 #ifndef _MICROBLAZE_IOCTL_H 2 #define _MICROBLAZE_IOCTL_H 3 4 5 /* 6 * this was copied from the alpha as it's a bit cleaner there. 7 * -- Cort 8 */ 9 10 #define _IOC_NRBITS 8 11 #define _IOC_TYPEBITS 8 12 #define _IOC_SIZEBITS 13 13 #define _IOC_DIRBITS 3 14 15 #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) 16 #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) 17 #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) 18 #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) 19 20 #define _IOC_NRSHIFT 0 21 #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) 22 #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) 23 #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) 24 25 /* 26 * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit. 27 * And this turns out useful to catch old ioctl numbers in header 28 * files for us. 29 */ 30 #define _IOC_NONE 1U 31 #define _IOC_READ 2U 32 #define _IOC_WRITE 4U 33 34 #define _IOC(dir,type,nr,size) \ 35 (((dir) << _IOC_DIRSHIFT) | \ 36 ((type) << _IOC_TYPESHIFT) | \ 37 ((nr) << _IOC_NRSHIFT) | \ 38 ((size) << _IOC_SIZESHIFT)) 39 40 /* provoke compile error for invalid uses of size argument */ 41 extern unsigned int __invalid_size_argument_for_IOC; 42 #define _IOC_TYPECHECK(t) \ 43 ((sizeof(t) == sizeof(t[1]) && \ 44 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 45 sizeof(t) : __invalid_size_argument_for_IOC) 46 47 /* used to create numbers */ 48 #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) 49 #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) 50 #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) 51 #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) 52 #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) 53 #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) 54 #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) 55 56 /* used to decode them.. */ 57 #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) 58 #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) 59 #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) 60 #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) 61 62 /* various drivers, such as the pcmcia stuff, need these... */ 63 #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) 64 #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) 65 #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) 66 #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) 67 #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) 68 69 #endif /* _MICROBLAZE_IOCTL_H */ -
include/asm-microblaze/irq_regs.h
old new -
include/asm-microblaze/clinkage.h
old new 1 /* 2 * include/asm-microblaze/clinkage.h -- Macros to reflect C symbol-naming conventions 3 * 4 * Copyright (C) 2003 John Williams <jwilliams@itee.uq.edu.au> 5 * Copyright (C) 2001,2002 NEC Corporatione 6 * Copyright (C) 2001,2002 Miles Bader <miles@gnu.org> 7 * 8 * This file is subject to the terms and conditions of the GNU General 9 * Public License. See the file COPYING in the main directory of this 10 * archive for more details. 11 * 12 * Written by Miles Bader <miles@gnu.org> 13 * Microblaze port by John Williams 14 */ 15 16 #ifndef __MICROBLAZE_CLINKAGE_H__ 17 #define __MICROBLAZE_CLINKAGE_H__ 18 19 #define __ASSEMBLY__ 20 21 #include <linux/linkage.h> 22 23 #define C_SYMBOL_NAME(name) name 24 #define C_ENTRY(name) .globl name; .align 4; name 25 #define C_END(name) 26 27 #endif /* __MICROBLAZE_CLINKAGE_H__ */ -
include/asm-microblaze/user.h
old new 1 /* 2 * include/asm-microblaze/user.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 * 10 * Authors: 11 * Yasushi SHOJI <yashi@atmark-techno.com> 12 * Tetsuya OHKAWA <tetsuya@atmark-techno.com> 13 */ 14 15 #ifndef _ASM_USER_H 16 #define _ASM_USER_H 17 18 #endif /* _ASM_USER_H */ -
include/asm-microblaze/tlb.h
old new 1 /* 2 * include/asm-microblaze/tlb.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_TLB_H 12 #define _ASM_TLB_H 13 14 #define tlb_flush(tlb) do {} while(0) 15 16 #include <asm-generic/tlb.h> 17 18 #endif /* _ASM_TLB_H */ -
include/asm-microblaze/tlbflush.h
old new 1 /* 2 * include/asm-microblaze/tlbflush.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_TLBFLUSH_H 12 #define _ASM_TLBFLUSH_H 13 14 #define flush_tlb() BUG() 15 #define flush_tlb_all() BUG() 16 #define flush_tlb_mm(mm) BUG() 17 #define flush_tlb_page(vma,addr) BUG() 18 #define flush_tlb_range(mm,start,end) BUG() 19 #define flush_tlb_pgtables(mm,start,end) BUG() 20 #define flush_tlb_kernel_range(start, end) BUG() 21 22 #endif /* _ASM_TLBFLUSH_H */ -
include/asm-microblaze/a.out.h
old new 1 /* 2 * include/asm-microblaze/a.out.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_A_OUT_H 12 #define _ASM_A_OUT_H 13 14 #endif /* _ASM_A._UT_H */ -
include/asm-microblaze/flat.h
old new 1 /* 2 * include/asm-microblaze/flat.h -- uClinux flat-format executables 3 */ 4 5 #ifndef __MICROBLAZE_FLAT_H__ 6 #define __MICROBLAZE_FLAT_H__ 7 8 #include <asm/unaligned.h> 9 10 #define flat_stack_align(sp) /* nothing needed */ 11 #define flat_argvp_envp_on_stack() 0 12 #define flat_old_ram_flag(flags) (flags) 13 #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) 14 15 /* 16 * Microblaze works a little differently from other arches, because 17 * of the MICROBLAZE_64 reloc type. Here, a 32 bit address is split 18 * over two instructions, an 'imm' instruction which provides the top 19 * 16 bits, then the instruction "proper" which provides the low 16 20 * bits. 21 */ 22 23 /* 24 * Crack open a symbol reference and extract the address to be 25 * relocated. rp is a potentially unaligned pointer to the 26 * reference 27 */ 28 29 static inline unsigned long 30 flat_get_addr_from_rp(unsigned long *rp, unsigned long relval, unsigned long flags) 31 { 32 unsigned long addr; 33 (void)flags; 34 35 /* Is it a split 64/32 reference? */ 36 if(relval & 0x80000000) 37 { 38 /* Grab the two halves of the reference */ 39 unsigned long val_hi, val_lo; 40 41 val_hi = get_unaligned(rp); 42 val_lo = get_unaligned(rp+1); 43 44 /* Crack the address out */ 45 addr = ((val_hi & 0xffff) << 16) + (val_lo & 0xffff); 46 } 47 else 48 { 49 /* Get the address straight out */ 50 addr = get_unaligned(rp); 51 } 52 53 return addr; 54 } 55 56 /* 57 * Insert an address into the symbol reference at rp. rp is potentially 58 * unaligned. 59 */ 60 61 static inline void 62 flat_put_addr_at_rp(unsigned long *rp, unsigned long addr, unsigned long relval) 63 { 64 /* Is this a split 64/32 reloc? */ 65 if(relval & 0x80000000) 66 { 67 /* Get the two "halves" */ 68 unsigned long val_hi = get_unaligned(rp); 69 unsigned long val_lo = get_unaligned(rp + 1); 70 71 /* insert the address */ 72 val_hi = (val_hi & 0xffff0000) | addr >> 16; 73 val_lo = (val_lo & 0xffff0000) | (addr & 0xffff); 74 75 /* store the two halves back into memory */ 76 put_unaligned(val_hi, rp); 77 put_unaligned(val_lo, rp+1); 78 } 79 else 80 { 81 /* Put it straight in, no messing around */ 82 put_unaligned(addr, rp); 83 } 84 } 85 86 #define flat_get_relocate_addr(rel) (rel & 0x7fffffff) 87 88 #endif /* __MICROBLAZE_FLAT_H__ */ -
include/asm-microblaze/uaccess.h
old new 1 /* 2 * include/asm-microblaze/uaccess.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_UACCESS_H 12 #define _ASM_UACCESS_H 13 14 #include <linux/errno.h> 15 #include <asm/segment.h> 16 17 #define VERIFY_READ 0 18 #define VERIFY_WRITE 1 19 20 21 /* FIXME: no function/macro are verified. those are just stubs */ 22 static inline int ___range_ok(unsigned long addr, unsigned long size) 23 { 24 return 0; 25 } 26 27 #define __range_ok(addr, size) ___range_ok((unsigned long)(addr), (unsigned long)(size)) 28 29 #define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0) 30 #define __access_ok(add, size) (__range_ok((addr), (size)) == 0) 31 32 extern inline int bad_user_access_length (void) 33 { 34 return 0; 35 } 36 37 #define __get_user(var, ptr) \ 38 ({ \ 39 int __gu_err = 0; \ 40 typeof(*(ptr)) __gu_val = 0; \ 41 switch (sizeof (*(ptr))) { \ 42 case 1: \ 43 case 2: \ 44 case 4: \ 45 __gu_val = *(ptr); \ 46 break; \ 47 case 8: \ 48 memcpy(&__gu_val, ptr, sizeof(__gu_val)); \ 49 break; \ 50 default: \ 51 __gu_val = 0; \ 52 __gu_err = __get_user_bad (); \ 53 break; \ 54 } \ 55 (var) = __gu_val; \ 56 __gu_err; \ 57 }) 58 #define __get_user_bad() (bad_user_access_length (), (-EFAULT)) 59 60 #define __put_user(var, ptr) \ 61 ({ \ 62 int __pu_err = 0; \ 63 switch (sizeof (*(ptr))) { \ 64 case 1: \ 65 case 2: \ 66 case 4: \ 67 *(ptr) = (var); \ 68 break; \ 69 case 8: { \ 70 typeof(*(ptr)) __pu_val = 0; \ 71 memcpy(ptr, &__pu_val, sizeof(__pu_val)); \ 72 } \ 73 break; \ 74 default: \ 75 __pu_err = __put_user_bad (); \ 76 break; \ 77 } \ 78 __pu_err; \ 79 }) 80 #define __put_user_bad() (bad_user_access_length (), (-EFAULT)) 81 82 #define put_user(x, ptr) __put_user(x, ptr) 83 #define get_user(x, ptr) __get_user(x, ptr) 84 85 #define copy_to_user(to,from,n) (memcpy(to, from, n), 0) 86 #define copy_from_user(to,from,n) (memcpy(to, from, n), 0) 87 88 #define __copy_to_user(to,from,n) (copy_to_user(to,from,n)) 89 #define __copy_from_user(to,from,n) (copy_from_user(to,from,n)) 90 #define __copy_to_user_inatomic(to,from,n) (__copy_to_user(to,from,n)) 91 #define __copy_from_user_inatomic(to,from,n) (__copy_from_user(to,from,n)) 92 93 94 /* 95 * The exception table consists of pairs of addresses: the first is the 96 * address of an instruction that is allowed to fault, and the second is 97 * the address at which the program should continue. No registers are 98 * modified, so it is entirely up to the continuation code to figure out 99 * what to do. 100 * 101 * All the routines below use bits of fixup code that are out of line 102 * with the main instruction path. This means when everything is well, 103 * we don't even have to jump over them. Further, they do not intrude 104 * on our cache or tlb entries. 105 */ 106 struct exception_table_entry 107 { 108 unsigned long insn, fixup; 109 }; 110 111 static inline unsigned long clear_user(void *addr, unsigned long size) 112 { 113 } 114 115 /* Returns 0 if exception not found and fixup otherwise. */ 116 extern unsigned long search_exception_table(unsigned long); 117 118 extern long strncpy_from_user(char *dst, const char *src, long count); 119 extern long strnlen_user(const char *src, long count); 120 121 #endif /* _ASM_UACCESS_H */ -
include/asm-microblaze/namei.h
old new 1 /* 2 * include/asm-microblaze/namei.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_NAMEI_H 12 #define _ASM_NAMEI_H 13 14 #ifdef __KERNEL__ 15 16 /* This dummy routine maybe changed to something useful 17 * for /usr/gnemul/ emulation stuff. 18 * Look at asm-sparc/namei.h for details. 19 */ 20 #define __emul_prefix() NULL 21 22 #endif /* __KERNEL__ */ 23 24 #endif /* _ASM_NAMEI_H */ -
include/asm-microblaze/local.h
old new 1 #ifndef __MB_LOCAL_H 2 #define __MB_LOCAL_H 3 4 #include <asm-generic/local.h> 5 6 #endif /* __MB_LOCAL_H */ -
include/asm-microblaze/hardirq.h
old new 1 /* 2 * include/asm-microblaze/hardirq.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_HARDIRQ_H 12 #define _ASM_HARDIRQ_H 13 14 #include <linux/cache.h> 15 #include <linux/irq.h> 16 #include <asm/irq.h> 17 #include <asm/current.h> 18 #include <asm/ptrace.h> 19 20 /* should be defined in each interrupt controller driver */ 21 extern unsigned int get_irq(struct pt_regs *regs); 22 23 typedef struct { 24 unsigned int __softirq_pending; 25 } ____cacheline_aligned irq_cpustat_t; 26 27 void ack_bad_irq(unsigned int irq); 28 29 #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ 30 31 #endif /* _ASM_HARDIRQ_H */ -
include/asm-microblaze/auxvec.h
old new 1 /* 2 * include/asm-microblaze/auxvec.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_AUXVEC_H 12 #define _ASM_AUXVEC_H 13 14 #endif /* _ASM_AUXVEC_H */ -
include/asm-microblaze/irq.h
old new 1 /* 2 * include/asm-microblaze/irq.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_IRQ_H 12 #define _ASM_IRQ_H 13 14 /* FIXME */ 15 #define NR_IRQS 32 16 17 static inline int irq_canonicalize(int irq) 18 { 19 return (irq); 20 } 21 22 struct pt_regs; 23 extern void do_IRQ(struct pt_regs *regs); 24 25 #endif /* _ASM_IRQ_H */ -
include/asm-microblaze/ioctls.h
old new 1 /* 2 * include/asm-microblaze/ioctls.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_IOCTLS_H 12 #define _ASM_IOCTLS_H 13 14 #include <asm/ioctl.h> 15 16 /* 0x54 is just a magic number to make these relatively unique ('T') */ 17 18 #define TCGETS 0x5401 19 #define TCSETS 0x5402 20 #define TCSETSW 0x5403 21 #define TCSETSF 0x5404 22 #define TCGETA 0x5405 23 #define TCSETA 0x5406 24 #define TCSETAW 0x5407 25 #define TCSETAF 0x5408 26 #define TCSBRK 0x5409 27 #define TCXONC 0x540A 28 #define TCFLSH 0x540B 29 #define TIOCEXCL 0x540C 30 #define TIOCNXCL 0x540D 31 #define TIOCSCTTY 0x540E 32 #define TIOCGPGRP 0x540F 33 #define TIOCSPGRP 0x5410 34 #define TIOCOUTQ 0x5411 35 #define TIOCSTI 0x5412 36 #define TIOCGWINSZ 0x5413 37 #define TIOCSWINSZ 0x5414 38 #define TIOCMGET 0x5415 39 #define TIOCMBIS 0x5416 40 #define TIOCMBIC 0x5417 41 #define TIOCMSET 0x5418 42 #define TIOCGSOFTCAR 0x5419 43 #define TIOCSSOFTCAR 0x541A 44 #define FIONREAD 0x541B 45 #define TIOCINQ FIONREAD 46 #define TIOCLINUX 0x541C 47 #define TIOCCONS 0x541D 48 #define TIOCGSERIAL 0x541E 49 #define TIOCSSERIAL 0x541F 50 #define TIOCPKT 0x5420 51 #define FIONBIO 0x5421 52 #define TIOCNOTTY 0x5422 53 #define TIOCSETD 0x5423 54 #define TIOCGETD 0x5424 55 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ 56 #define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ 57 #define TIOCSBRK 0x5427 /* BSD compatibility */ 58 #define TIOCCBRK 0x5428 /* BSD compatibility */ 59 #define TIOCGSID 0x5429 /* Return the session ID of FD */ 60 #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 61 #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 62 63 #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ 64 #define FIOCLEX 0x5451 65 #define FIOASYNC 0x5452 66 #define TIOCSERCONFIG 0x5453 67 #define TIOCSERGWILD 0x5454 68 #define TIOCSERSWILD 0x5455 69 #define TIOCGLCKTRMIOS 0x5456 70 #define TIOCSLCKTRMIOS 0x5457 71 #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ 72 #define TIOCSERGETLSR 0x5459 /* Get line status register */ 73 #define TIOCSERGETMULTI 0x545A /* Get multiport config */ 74 #define TIOCSERSETMULTI 0x545B /* Set multiport config */ 75 76 #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ 77 #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ 78 79 #define FIOQSIZE 0x545E 80 81 /* Used for packet mode */ 82 #define TIOCPKT_DATA 0 83 #define TIOCPKT_FLUSHREAD 1 84 #define TIOCPKT_FLUSHWRITE 2 85 #define TIOCPKT_STOP 4 86 #define TIOCPKT_START 8 87 #define TIOCPKT_NOSTOP 16 88 #define TIOCPKT_DOSTOP 32 89 90 #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 91 92 #endif /* _ASM_IOCTLS_H */ -
include/asm-microblaze/percpu.h
old new 1 /* 2 * include/asm-microblaze/percpu.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_PERCPU_H 12 #define _ASM_PERCPU_H 13 14 #include <asm-generic/percpu.h> 15 16 #endif /* _ASM_PERCPU_H */ -
include/asm-microblaze/delay.h
old new 1 /* 2 * include/asm-microblaze/delay.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_DELAY_H 12 #define _ASM_DELAY_H 13 14 extern inline void __delay(unsigned long loops) 15 { 16 asm volatile ("# __delay \n\t" \ 17 "1: addi %0, %0, -1 \t\n" \ 18 "bneid %0, 1b \t\n" \ 19 "nop \t\n" 20 : "=r" (loops) 21 : "0" (loops)); 22 } 23 24 static inline void udelay(unsigned long usec) 25 { 26 } 27 28 #endif /* _ASM_DELAY_H */ -
include/asm-microblaze/param.h
old new 1 /* 2 * include/asm-microblaze/param.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_PARAM_H 12 #define _ASM_PARAM_H 13 14 #ifdef __KERNEL__ 15 # define HZ 100 /* internal timer frequency */ 16 # define USER_HZ 100 /* for user interfaces in "ticks" */ 17 # define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */ 18 #endif 19 20 #ifndef NGROUPS 21 #define NGROUPS 32 22 #endif 23 24 #ifndef NOGROUP 25 #define NOGROUP (-1) 26 #endif 27 28 #define EXEC_PAGESIZE 4096 29 30 #ifndef HZ 31 #define HZ 100 32 #endif 33 34 #define MAXHOSTNAMELEN 64 /* max length of hostname */ 35 36 #endif /* _ASM_PARAM_H */ -
include/asm-microblaze/bugs.h
old new 1 /* 2 * include/asm-microblaze/bugs.h 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2006 Atmark Techno, Inc. 9 */ 10 11 #ifndef _ASM_BUGS_H 12 #define _ASM_BUGS_H 13 14 static inline void check_bugs(void) 15 { 16 /* nothing to do */ 17 } 18 19 #endif /* _ASM_BUGS_H */ -
include/asm-microblaze/bitops.h
old new 1 #ifndef _MICROBLAZE_BITOPS_H 2 #define _MICROBLAZE_BITOPS_H 3 4 /* 5 * Copyright 1992, Linus Torvalds. 6 */ 7 8 #include <linux/autoconf.h> 9 #include <asm/byteorder.h> /* swab32 */ 10 #include <asm/system.h> /* save_flags */ 11 12 /* JW FIXME quick workaround to use generic bitops.h */ 13 #if 1 14 /* 15 * clear_bit() doesn't provide any barrier for the compiler. 16 */ 17 #define smp_mb__before_clear_bit() barrier() 18 #define smp_mb__after_clear_bit() barrier() 19 #include <asm-generic/bitops.h> 20 #else 21 22 #ifdef __KERNEL__ 23 /* 24 * Function prototypes to keep gcc -Wall happy 25 */ 26 27 /* 28 * The __ functions are not atomic 29 */ 30 31 extern void set_bit(int nr, volatile void * addr); 32 extern void __set_bit(int nr, volatile void * addr); 33 34 extern void clear_bit(int nr, volatile void * addr); 35 extern void __clear_bit(int nr, volatile void * addr); 36 37 extern void change_bit(int nr, volatile void * addr); 38 extern void __change_bit(int nr, volatile void * addr); 39 extern int test_and_set_bit(int nr, volatile void * addr); 40 extern int __test_and_set_bit(int nr, volatile void * addr); 41 extern int test_and_clear_bit(int nr, volatile void * addr); 42 extern int __test_and_clear_bit(int nr, volatile void * addr); 43 extern int test_and_change_bit(int nr, volatile void * addr); 44 extern int __test_and_change_bit(int nr, volatile void * addr); 45 extern int __constant_test_bit(int nr, const volatile void * addr); 46 extern int __test_bit(int nr, const volatile void * addr); 47 extern int find_first_zero_bit(void * addr, unsigned size); 48 extern int find_next_zero_bit (const void * addr, int size, int offset); 49 extern int find_next_bit(const unsigned long *addr, int size, int offset); 50 51 /* 52 * ffz = Find First Zero in word. Undefined if no zero exists, 53 * so code should check against ~0UL first.. 54 */ 55 extern __inline__ unsigned long ffz(unsigned long word) 56 { 57 unsigned long result = 0; 58 59 while(word & 1) { 60 result++; 61 word >>= 1; 62 } 63 return result; 64 } 65 66 67 extern __inline__ void set_bit(int nr, volatile void * addr) 68 { 69 int * a = (int *) addr; 70 int mask; 71 unsigned long flags; 72 73 a += nr >> 5; 74 mask = 1 << (nr & 0x1f); 75 local_irq_save(flags); 76 *a |= mask; 77 local_irq_restore(flags); 78 } 79 80 extern __inline__ void __set_bit(int nr, volatile void * addr) 81 { 82 int * a = (int *) addr; 83 int mask; 84 85 a += nr >> 5; 86 mask = 1 << (nr & 0x1f); 87 *a |= mask; 88 } 89 90 /* 91 * clear_bit() doesn't provide any barrier for the compiler. 92 */ 93 #define smp_mb__before_clear_bit() barrier() 94 #define smp_mb__after_clear_bit() barrier() 95 extern int kflg; 96 extern int intdeb; 97 extern void printkaa(int *); 98 99 extern __inline__ void clear_bit(int nr, volatile void * addr) 100 { 101 int * a = (int *) addr; 102 int mask; 103 unsigned long flags; 104 105 a += nr >> 5; 106 mask = 1 << (nr & 0x1f); 107 local_irq_save(flags); 108 *a &= ~mask; 109 local_irq_restore(flags); 110 } 111 112 extern __inline__ void __clear_bit(int nr, volatile void * addr) 113 { 114 int * a = (int *) addr; 115 int mask; 116 117 a += nr >> 5; 118 mask = 1 << (nr & 0x1f); 119 *a &= ~mask; 120 } 121 122 123 extern __inline__ void change_bit(int nr, volatile void * addr) 124 { 125 int mask; 126 unsigned long flags; 127 unsigned long *ADDR = (unsigned long *) addr; 128 129 ADDR += nr >> 5; 130 mask = 1 << (nr & 31); 131 local_irq_save(flags); 132 *ADDR ^= mask; 133 local_irq_restore(flags); 134 } 135 136 extern __inline__ void __change_bit(int nr, volatile void * addr) 137 { 138 int mask; 139 unsigned long *ADDR = (unsigned long *) addr; 140 141 ADDR += nr >> 5; 142 mask = 1 << (nr & 31); 143 *ADDR ^= mask; 144 } 145 146 extern __inline__ int test_and_set_bit(int nr, volatile void * addr) 147 { 148 int mask, retval; 149 volatile unsigned int *a = (volatile unsigned int *) addr; 150 unsigned long flags; 151 152 a += nr >> 5; 153 mask = 1 << (nr & 0x1f); 154 local_irq_save(flags); 155 retval = (mask & *a) != 0; 156 *a |= mask; 157 local_irq_restore(flags); 158 159 return retval; 160 } 161 162 extern __inline__ int __test_and_set_bit(int nr, volatile void * addr) 163 { 164 int mask, retval; 165 volatile unsigned int *a = (volatile unsigned int *) addr; 166 167 a += nr >> 5; 168 mask = 1 << (nr & 0x1f); 169 retval = (mask & *a) != 0; 170 *a |= mask; 171 return retval; 172 } 173 174 extern __inline__ int test_and_clear_bit(int nr, volatile void * addr) 175 { 176 int mask, retval; 177 volatile unsigned int *a = (volatile unsigned int *) addr; 178 unsigned long flags; 179 180 a += nr >> 5; 181 mask = 1 << (nr & 0x1f); 182 local_irq_save(flags); 183 retval = (mask & *a) != 0; 184 *a &= ~mask; 185 local_irq_restore(flags); 186 187 return retval; 188 } 189 190 extern __inline__ int __test_and_clear_bit(int nr, volatile void * addr) 191 { 192 int mask, retval; 193 volatile unsigned int *a = (volatile unsigned int *) addr; 194 195 a += nr >> 5; 196 mask = 1 << (nr & 0x1f); 197 retval = (mask & *a) != 0; 198 *a &= ~mask; 199 return retval; 200 } 201 202 extern __inline__ int test_and_change_bit(int nr, volatile void * addr) 203 { 204 int &nbs
