diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2009-07-06 22:55:05 -0400 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-06 22:55:05 -0400 |
| commit | 2b5c0c72ea404d6b554a8284031dd78748314b9e (patch) | |
| tree | 468b7f3d8db0abe6a09ee221dce1de5de2bb8d12 /arch | |
| parent | 2dbc8a23cc2e677422f6dea991aca4e3d31ab65f (diff) | |
| parent | dc53fffc105f68cb08ca872acd51550e89aa2e67 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh/for-2.6.31
Diffstat (limited to 'arch')
171 files changed, 4066 insertions, 2490 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 729298f4b234..7de76dd352fe 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
| @@ -537,7 +537,7 @@ pcibios_align_resource (void *data, struct resource *res, | |||
| 537 | /* | 537 | /* |
| 538 | * PCI BIOS setup, always defaults to SAL interface | 538 | * PCI BIOS setup, always defaults to SAL interface |
| 539 | */ | 539 | */ |
| 540 | char * __devinit | 540 | char * __init |
| 541 | pcibios_setup (char *str) | 541 | pcibios_setup (char *str) |
| 542 | { | 542 | { |
| 543 | return str; | 543 | return str; |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index b50b845fdd50..2db722d80d4d 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
| @@ -53,6 +53,9 @@ config GENERIC_HARDIRQS_NO__DO_IRQ | |||
| 53 | config GENERIC_GPIO | 53 | config GENERIC_GPIO |
| 54 | def_bool y | 54 | def_bool y |
| 55 | 55 | ||
| 56 | config GENERIC_CSUM | ||
| 57 | def_bool y | ||
| 58 | |||
| 56 | config PCI | 59 | config PCI |
| 57 | def_bool n | 60 | def_bool n |
| 58 | 61 | ||
diff --git a/arch/microblaze/include/asm/atomic.h b/arch/microblaze/include/asm/atomic.h index 0de612ad7cb2..6d2e1d418be7 100644 --- a/arch/microblaze/include/asm/atomic.h +++ b/arch/microblaze/include/asm/atomic.h | |||
| @@ -1,95 +1,7 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_ATOMIC_H | 1 | #ifndef _ASM_MICROBLAZE_ATOMIC_H |
| 10 | #define _ASM_MICROBLAZE_ATOMIC_H | 2 | #define _ASM_MICROBLAZE_ATOMIC_H |
| 11 | 3 | ||
| 12 | #include <linux/types.h> | 4 | #include <asm-generic/atomic.h> |
| 13 | #include <linux/compiler.h> /* likely */ | ||
| 14 | #include <asm/system.h> /* local_irq_XXX and friends */ | ||
| 15 | |||
| 16 | #define ATOMIC_INIT(i) { (i) } | ||
| 17 | #define atomic_read(v) ((v)->counter) | ||
| 18 | #define atomic_set(v, i) (((v)->counter) = (i)) | ||
| 19 | |||
| 20 | #define atomic_inc(v) (atomic_add_return(1, (v))) | ||
| 21 | #define atomic_dec(v) (atomic_sub_return(1, (v))) | ||
| 22 | |||
| 23 | #define atomic_add(i, v) (atomic_add_return(i, (v))) | ||
| 24 | #define atomic_sub(i, v) (atomic_sub_return(i, (v))) | ||
| 25 | |||
| 26 | #define atomic_inc_return(v) (atomic_add_return(1, (v))) | ||
| 27 | #define atomic_dec_return(v) (atomic_sub_return(1, (v))) | ||
| 28 | |||
| 29 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) | ||
| 30 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | ||
| 31 | |||
| 32 | #define atomic_inc_not_zero(v) (atomic_add_unless((v), 1, 0)) | ||
| 33 | |||
| 34 | #define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0) | ||
| 35 | |||
| 36 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) | ||
| 37 | { | ||
| 38 | int ret; | ||
| 39 | unsigned long flags; | ||
| 40 | |||
| 41 | local_irq_save(flags); | ||
| 42 | ret = v->counter; | ||
| 43 | if (likely(ret == old)) | ||
| 44 | v->counter = new; | ||
| 45 | local_irq_restore(flags); | ||
| 46 | |||
| 47 | return ret; | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | ||
| 51 | { | ||
| 52 | int c, old; | ||
| 53 | |||
| 54 | c = atomic_read(v); | ||
| 55 | while (c != u && (old = atomic_cmpxchg((v), c, c + a)) != c) | ||
| 56 | c = old; | ||
| 57 | return c != u; | ||
| 58 | } | ||
| 59 | |||
| 60 | static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) | ||
| 61 | { | ||
| 62 | unsigned long flags; | ||
| 63 | |||
| 64 | local_irq_save(flags); | ||
| 65 | *addr &= ~mask; | ||
| 66 | local_irq_restore(flags); | ||
| 67 | } | ||
| 68 | |||
| 69 | /** | ||
| 70 | * atomic_add_return - add and return | ||
| 71 | * @i: integer value to add | ||
| 72 | * @v: pointer of type atomic_t | ||
| 73 | * | ||
| 74 | * Atomically adds @i to @v and returns @i + @v | ||
| 75 | */ | ||
| 76 | static inline int atomic_add_return(int i, atomic_t *v) | ||
| 77 | { | ||
| 78 | unsigned long flags; | ||
| 79 | int val; | ||
| 80 | |||
| 81 | local_irq_save(flags); | ||
| 82 | val = v->counter; | ||
| 83 | v->counter = val += i; | ||
| 84 | local_irq_restore(flags); | ||
| 85 | |||
| 86 | return val; | ||
| 87 | } | ||
| 88 | |||
| 89 | static inline int atomic_sub_return(int i, atomic_t *v) | ||
| 90 | { | ||
| 91 | return atomic_add_return(-i, v); | ||
| 92 | } | ||
| 93 | 5 | ||
| 94 | /* | 6 | /* |
| 95 | * Atomically test *v and decrement if it is greater than 0. | 7 | * Atomically test *v and decrement if it is greater than 0. |
| @@ -109,15 +21,4 @@ static inline int atomic_dec_if_positive(atomic_t *v) | |||
| 109 | return res; | 21 | return res; |
| 110 | } | 22 | } |
| 111 | 23 | ||
| 112 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
| 113 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
| 114 | |||
| 115 | /* Atomic operations are already serializing */ | ||
| 116 | #define smp_mb__before_atomic_dec() barrier() | ||
| 117 | #define smp_mb__after_atomic_dec() barrier() | ||
| 118 | #define smp_mb__before_atomic_inc() barrier() | ||
| 119 | #define smp_mb__after_atomic_inc() barrier() | ||
| 120 | |||
| 121 | #include <asm-generic/atomic-long.h> | ||
| 122 | |||
| 123 | #endif /* _ASM_MICROBLAZE_ATOMIC_H */ | 24 | #endif /* _ASM_MICROBLAZE_ATOMIC_H */ |
diff --git a/arch/microblaze/include/asm/bitops.h b/arch/microblaze/include/asm/bitops.h index d6df1fd4e1e8..a72468f15c8b 100644 --- a/arch/microblaze/include/asm/bitops.h +++ b/arch/microblaze/include/asm/bitops.h | |||
| @@ -1,27 +1 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_BITOPS_H | ||
| 10 | #define _ASM_MICROBLAZE_BITOPS_H | ||
| 11 | |||
| 12 | /* | ||
| 13 | * Copyright 1992, Linus Torvalds. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <asm/byteorder.h> /* swab32 */ | ||
| 17 | #include <asm/system.h> /* save_flags */ | ||
| 18 | |||
| 19 | /* | ||
| 20 | * clear_bit() doesn't provide any barrier for the compiler. | ||
| 21 | */ | ||
| 22 | #define smp_mb__before_clear_bit() barrier() | ||
| 23 | #define smp_mb__after_clear_bit() barrier() | ||
| 24 | #include <asm-generic/bitops.h> | #include <asm-generic/bitops.h> | |
| 25 | #include <asm-generic/bitops/__fls.h> | ||
| 26 | |||
| 27 | #endif /* _ASM_MICROBLAZE_BITOPS_H */ | ||
diff --git a/arch/microblaze/include/asm/bug.h b/arch/microblaze/include/asm/bug.h index 8eb2cdde11d7..b12fd89e42e9 100644 --- a/arch/microblaze/include/asm/bug.h +++ b/arch/microblaze/include/asm/bug.h | |||
| @@ -1,15 +1 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_BUG_H | ||
| 10 | #define _ASM_MICROBLAZE_BUG_H | ||
| 11 | |||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <asm-generic/bug.h> | #include <asm-generic/bug.h> | |
| 14 | |||
| 15 | #endif /* _ASM_MICROBLAZE_BUG_H */ | ||
diff --git a/arch/microblaze/include/asm/bugs.h b/arch/microblaze/include/asm/bugs.h index f2c6593653fb..61791e1ad9f5 100644 --- a/arch/microblaze/include/asm/bugs.h +++ b/arch/microblaze/include/asm/bugs.h | |||
| @@ -1,17 +1 @@ | |||
| 1 | /* | #include <asm-generic/bugs.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_BUGS_H | ||
| 10 | #define _ASM_MICROBLAZE_BUGS_H | ||
| 11 | |||
| 12 | static inline void check_bugs(void) | ||
| 13 | { | ||
| 14 | /* nothing to do */ | ||
| 15 | } | ||
| 16 | |||
| 17 | #endif /* _ASM_MICROBLAZE_BUGS_H */ | ||
diff --git a/arch/microblaze/include/asm/checksum.h b/arch/microblaze/include/asm/checksum.h index 97ea46b5cf80..128bf03b54b7 100644 --- a/arch/microblaze/include/asm/checksum.h +++ b/arch/microblaze/include/asm/checksum.h | |||
| @@ -10,12 +10,11 @@ | |||
| 10 | #ifndef _ASM_MICROBLAZE_CHECKSUM_H | 10 | #ifndef _ASM_MICROBLAZE_CHECKSUM_H |
| 11 | #define _ASM_MICROBLAZE_CHECKSUM_H | 11 | #define _ASM_MICROBLAZE_CHECKSUM_H |
| 12 | 12 | ||
| 13 | #include <linux/in6.h> | ||
| 14 | |||
| 15 | /* | 13 | /* |
| 16 | * computes the checksum of the TCP/UDP pseudo-header | 14 | * computes the checksum of the TCP/UDP pseudo-header |
| 17 | * returns a 16-bit checksum, already complemented | 15 | * returns a 16-bit checksum, already complemented |
| 18 | */ | 16 | */ |
| 17 | #define csum_tcpudp_nofold csum_tcpudp_nofold | ||
| 19 | static inline __wsum | 18 | static inline __wsum |
| 20 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | 19 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, |
| 21 | unsigned short proto, __wsum sum) | 20 | unsigned short proto, __wsum sum) |
| @@ -30,71 +29,6 @@ csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | |||
| 30 | return sum; | 29 | return sum; |
| 31 | } | 30 | } |
| 32 | 31 | ||
| 33 | /* | 32 | #include <asm-generic/checksum.h> |
| 34 | * computes the checksum of a memory block at buff, length len, | ||
| 35 | * and adds in "sum" (32-bit) | ||
| 36 | * | ||
| 37 | * returns a 32-bit number suitable for feeding into itself | ||
| 38 | * or csum_tcpudp_magic | ||
| 39 | * | ||
| 40 | * this function must be called with even lengths, except | ||
| 41 | * for the last fragment, which may be odd | ||
| 42 | * | ||
| 43 | * it's best to have buff aligned on a 32-bit boundary | ||
| 44 | */ | ||
| 45 | extern __wsum csum_partial(const void *buff, int len, __wsum sum); | ||
| 46 | |||
| 47 | /* | ||
| 48 | * the same as csum_partial, but copies from src while it | ||
| 49 | * checksums | ||
| 50 | * | ||
| 51 | * here even more important to align src and dst on a 32-bit (or even | ||
| 52 | * better 64-bit) boundary | ||
| 53 | */ | ||
| 54 | extern __wsum csum_partial_copy(const void *src, void *dst, int len, | ||
| 55 | __wsum sum); | ||
| 56 | |||
| 57 | /* | ||
| 58 | * the same as csum_partial_copy, but copies from user space. | ||
| 59 | * | ||
| 60 | * here even more important to align src and dst on a 32-bit (or even | ||
| 61 | * better 64-bit) boundary | ||
| 62 | */ | ||
| 63 | extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, | ||
| 64 | int len, __wsum sum, int *csum_err); | ||
| 65 | |||
| 66 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | ||
| 67 | csum_partial_copy((src), (dst), (len), (sum)) | ||
| 68 | |||
| 69 | /* | ||
| 70 | * This is a version of ip_compute_csum() optimized for IP headers, | ||
| 71 | * which always checksum on 4 octet boundaries. | ||
| 72 | * | ||
| 73 | */ | ||
| 74 | extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); | ||
| 75 | |||
| 76 | /* | ||
| 77 | * Fold a partial checksum | ||
| 78 | */ | ||
| 79 | static inline __sum16 csum_fold(__wsum csum) | ||
| 80 | { | ||
| 81 | u32 sum = (__force u32)csum; | ||
| 82 | sum = (sum & 0xffff) + (sum >> 16); | ||
| 83 | sum = (sum & 0xffff) + (sum >> 16); | ||
| 84 | return (__force __sum16)~sum; | ||
| 85 | } | ||
| 86 | |||
| 87 | static inline __sum16 | ||
| 88 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, | ||
| 89 | unsigned short proto, __wsum sum) | ||
| 90 | { | ||
| 91 | return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); | ||
| 92 | } | ||
| 93 | |||
| 94 | /* | ||
| 95 | * this routine is used for miscellaneous IP-like checksums, mainly | ||
| 96 | * in icmp.c | ||
| 97 | */ | ||
| 98 | extern __sum16 ip_compute_csum(const void *buff, int len); | ||
| 99 | 33 | ||
| 100 | #endif /* _ASM_MICROBLAZE_CHECKSUM_H */ | 34 | #endif /* _ASM_MICROBLAZE_CHECKSUM_H */ |
diff --git a/arch/microblaze/include/asm/fb.h b/arch/microblaze/include/asm/fb.h new file mode 100644 index 000000000000..3a4988e8df45 --- /dev/null +++ b/arch/microblaze/include/asm/fb.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/fb.h> | |||
diff --git a/arch/microblaze/include/asm/hardirq.h b/arch/microblaze/include/asm/hardirq.h index 0f2d6b013e11..41e1e1aa36ac 100644 --- a/arch/microblaze/include/asm/hardirq.h +++ b/arch/microblaze/include/asm/hardirq.h | |||
| @@ -9,21 +9,11 @@ | |||
| 9 | #ifndef _ASM_MICROBLAZE_HARDIRQ_H | 9 | #ifndef _ASM_MICROBLAZE_HARDIRQ_H |
| 10 | #define _ASM_MICROBLAZE_HARDIRQ_H | 10 | #define _ASM_MICROBLAZE_HARDIRQ_H |
| 11 | 11 | ||
| 12 | #include <linux/cache.h> | ||
| 13 | #include <linux/irq.h> | ||
| 14 | #include <asm/irq.h> | ||
| 15 | #include <asm/current.h> | ||
| 16 | #include <linux/ptrace.h> | ||
| 17 | |||
| 18 | /* should be defined in each interrupt controller driver */ | 12 | /* should be defined in each interrupt controller driver */ |
| 19 | extern unsigned int get_irq(struct pt_regs *regs); | 13 | extern unsigned int get_irq(struct pt_regs *regs); |
| 20 | 14 | ||
| 21 | typedef struct { | 15 | #define ack_bad_irq ack_bad_irq |
| 22 | unsigned int __softirq_pending; | ||
| 23 | } ____cacheline_aligned irq_cpustat_t; | ||
| 24 | |||
| 25 | void ack_bad_irq(unsigned int irq); | 16 | void ack_bad_irq(unsigned int irq); |
| 26 | 17 | #include <asm-generic/hardirq.h> | |
| 27 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
| 28 | 18 | ||
| 29 | #endif /* _ASM_MICROBLAZE_HARDIRQ_H */ | 19 | #endif /* _ASM_MICROBLAZE_HARDIRQ_H */ |
diff --git a/arch/microblaze/include/asm/ioctls.h b/arch/microblaze/include/asm/ioctls.h index 03582b249204..ec34c760665e 100644 --- a/arch/microblaze/include/asm/ioctls.h +++ b/arch/microblaze/include/asm/ioctls.h | |||
| @@ -1,91 +1 @@ | |||
| 1 | /* | #include <asm-generic/ioctls.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_IOCTLS_H | ||
| 10 | #define _ASM_MICROBLAZE_IOCTLS_H | ||
| 11 | |||
| 12 | #include <linux/ioctl.h> | ||
| 13 | |||
| 14 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
| 15 | |||
| 16 | #define TCGETS 0x5401 | ||
| 17 | #define TCSETS 0x5402 | ||
| 18 | #define TCSETSW 0x5403 | ||
| 19 | #define TCSETSF 0x5404 | ||
| 20 | #define TCGETA 0x5405 | ||
| 21 | #define TCSETA 0x5406 | ||
| 22 | #define TCSETAW 0x5407 | ||
| 23 | #define TCSETAF 0x5408 | ||
| 24 | #define TCSBRK 0x5409 | ||
| 25 | #define TCXONC 0x540A | ||
| 26 | #define TCFLSH 0x540B | ||
| 27 | #define TIOCEXCL 0x540C | ||
| 28 | #define TIOCNXCL 0x540D | ||
| 29 | #define TIOCSCTTY 0x540E | ||
| 30 | #define TIOCGPGRP 0x540F | ||
| 31 | #define TIOCSPGRP 0x5410 | ||
| 32 | #define TIOCOUTQ 0x5411 | ||
| 33 | #define TIOCSTI 0x5412 | ||
| 34 | #define TIOCGWINSZ 0x5413 | ||
| 35 | #define TIOCSWINSZ 0x5414 | ||
| 36 | #define TIOCMGET 0x5415 | ||
| 37 | #define TIOCMBIS 0x5416 | ||
| 38 | #define TIOCMBIC 0x5417 | ||
| 39 | #define TIOCMSET 0x5418 | ||
| 40 | #define TIOCGSOFTCAR 0x5419 | ||
| 41 | #define TIOCSSOFTCAR 0x541A | ||
| 42 | #define FIONREAD 0x541B | ||
| 43 | #define TIOCINQ FIONREAD | ||
| 44 | #define TIOCLINUX 0x541C | ||
| 45 | #define TIOCCONS 0x541D | ||
| 46 | #define TIOCGSERIAL 0x541E | ||
| 47 | #define TIOCSSERIAL 0x541F | ||
| 48 | #define TIOCPKT 0x5420 | ||
| 49 | #define FIONBIO 0x5421 | ||
| 50 | #define TIOCNOTTY 0x5422 | ||
| 51 | #define TIOCSETD 0x5423 | ||
| 52 | #define TIOCGETD 0x5424 | ||
| 53 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
| 54 | #define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ | ||
| 55 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
| 56 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
| 57 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
| 58 | /* Get Pty Number (of pty-mux device) */ | ||
| 59 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) | ||
| 60 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | ||
| 61 | |||
| 62 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | ||
| 63 | #define FIOCLEX 0x5451 | ||
| 64 | #define FIOASYNC 0x5452 | ||
| 65 | #define TIOCSERCONFIG 0x5453 | ||
| 66 | #define TIOCSERGWILD 0x5454 | ||
| 67 | #define TIOCSERSWILD 0x5455 | ||
| 68 | #define TIOCGLCKTRMIOS 0x5456 | ||
| 69 | #define TIOCSLCKTRMIOS 0x5457 | ||
| 70 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
| 71 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
| 72 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
| 73 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
| 74 | |||
| 75 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
| 76 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
| 77 | |||
| 78 | #define FIOQSIZE 0x545E | ||
| 79 | |||
| 80 | /* Used for packet mode */ | ||
| 81 | #define TIOCPKT_DATA 0 | ||
| 82 | #define TIOCPKT_FLUSHREAD 1 | ||
| 83 | #define TIOCPKT_FLUSHWRITE 2 | ||
| 84 | #define TIOCPKT_STOP 4 | ||
| 85 | #define TIOCPKT_START 8 | ||
| 86 | #define TIOCPKT_NOSTOP 16 | ||
| 87 | #define TIOCPKT_DOSTOP 32 | ||
| 88 | |||
| 89 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
| 90 | |||
| 91 | #endif /* _ASM_MICROBLAZE_IOCTLS_H */ | ||
diff --git a/arch/microblaze/include/asm/ipcbuf.h b/arch/microblaze/include/asm/ipcbuf.h index b056fa420654..84c7e51cb6d0 100644 --- a/arch/microblaze/include/asm/ipcbuf.h +++ b/arch/microblaze/include/asm/ipcbuf.h | |||
| @@ -1,36 +1 @@ | |||
| 1 | /* | #include <asm-generic/ipcbuf.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_IPCBUF_H | ||
| 10 | #define _ASM_MICROBLAZE_IPCBUF_H | ||
| 11 | |||
| 12 | /* | ||
| 13 | * The user_ipc_perm structure for microblaze architecture. | ||
| 14 | * Note extra padding because this structure is passed back and forth | ||
| 15 | * between kernel and user space. | ||
| 16 | * | ||
| 17 | * Pad space is left for: | ||
| 18 | * - 32-bit mode_t and seq | ||
| 19 | * - 2 miscellaneous 32-bit values | ||
| 20 | */ | ||
| 21 | |||
| 22 | struct ipc64_perm { | ||
| 23 | __kernel_key_t key; | ||
| 24 | __kernel_uid32_t uid; | ||
| 25 | __kernel_gid32_t gid; | ||
| 26 | __kernel_uid32_t cuid; | ||
| 27 | __kernel_gid32_t cgid; | ||
| 28 | __kernel_mode_t mode; | ||
| 29 | unsigned short __pad1; | ||
| 30 | unsigned short seq; | ||
| 31 | unsigned short __pad2; | ||
| 32 | unsigned long __unused1; | ||
| 33 | unsigned long __unused2; | ||
| 34 | }; | ||
| 35 | |||
| 36 | #endif /* _ASM_MICROBLAZE_IPCBUF_H */ | ||
diff --git a/arch/microblaze/include/asm/irq.h b/arch/microblaze/include/asm/irq.h index db515deaa720..90f050535ebe 100644 --- a/arch/microblaze/include/asm/irq.h +++ b/arch/microblaze/include/asm/irq.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #define _ASM_MICROBLAZE_IRQ_H | 10 | #define _ASM_MICROBLAZE_IRQ_H |
| 11 | 11 | ||
| 12 | #define NR_IRQS 32 | 12 | #define NR_IRQS 32 |
| 13 | #include <asm-generic/irq.h> | ||
| 13 | 14 | ||
| 14 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
| 15 | 16 | ||
| @@ -17,11 +18,6 @@ extern unsigned int nr_irq; | |||
| 17 | 18 | ||
| 18 | #define NO_IRQ (-1) | 19 | #define NO_IRQ (-1) |
| 19 | 20 | ||
| 20 | static inline int irq_canonicalize(int irq) | ||
| 21 | { | ||
| 22 | return irq; | ||
| 23 | } | ||
| 24 | |||
| 25 | struct pt_regs; | 21 | struct pt_regs; |
| 26 | extern void do_IRQ(struct pt_regs *regs); | 22 | extern void do_IRQ(struct pt_regs *regs); |
| 27 | 23 | ||
diff --git a/arch/microblaze/include/asm/mman.h b/arch/microblaze/include/asm/mman.h index 4914b1329445..8eebf89f5ab1 100644 --- a/arch/microblaze/include/asm/mman.h +++ b/arch/microblaze/include/asm/mman.h | |||
| @@ -1,25 +1 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_MMAN_H | ||
| 10 | #define _ASM_MICROBLAZE_MMAN_H | ||
| 11 | |||
| 12 | #include <asm-generic/mman.h> | #include <asm-generic/mman.h> | |
| 13 | |||
| 14 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
| 15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
| 16 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
| 17 | #define MAP_LOCKED 0x2000 /* pages are locked */ | ||
| 18 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | ||
| 19 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
| 20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
| 21 | |||
| 22 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
| 23 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
| 24 | |||
| 25 | #endif /* _ASM_MICROBLAZE_MMAN_H */ | ||
diff --git a/arch/microblaze/include/asm/mmu.h b/arch/microblaze/include/asm/mmu.h index 66cad6a99d77..8d6a654ceffb 100644 --- a/arch/microblaze/include/asm/mmu.h +++ b/arch/microblaze/include/asm/mmu.h | |||
| @@ -12,12 +12,7 @@ | |||
| 12 | #define _ASM_MICROBLAZE_MMU_H | 12 | #define _ASM_MICROBLAZE_MMU_H |
| 13 | 13 | ||
| 14 | # ifndef CONFIG_MMU | 14 | # ifndef CONFIG_MMU |
| 15 | # ifndef __ASSEMBLY__ | 15 | # include <asm-generic/mmu.h> |
| 16 | typedef struct { | ||
| 17 | struct vm_list_struct *vmlist; | ||
| 18 | unsigned long end_brk; | ||
| 19 | } mm_context_t; | ||
| 20 | # endif /* __ASSEMBLY__ */ | ||
| 21 | # else /* CONFIG_MMU */ | 16 | # else /* CONFIG_MMU */ |
| 22 | # ifdef __KERNEL__ | 17 | # ifdef __KERNEL__ |
| 23 | # ifndef __ASSEMBLY__ | 18 | # ifndef __ASSEMBLY__ |
diff --git a/arch/microblaze/include/asm/mmu_context.h b/arch/microblaze/include/asm/mmu_context.h index 385fed16bbfb..24eab1674d3e 100644 --- a/arch/microblaze/include/asm/mmu_context.h +++ b/arch/microblaze/include/asm/mmu_context.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #ifdef CONFIG_MMU | 1 | #ifdef CONFIG_MMU |
| 2 | # include "mmu_context_mm.h" | 2 | # include "mmu_context_mm.h" |
| 3 | #else | 3 | #else |
| 4 | # include "mmu_context_no.h" | 4 | # include <asm-generic/mmu_context.h> |
| 5 | #endif | 5 | #endif |
diff --git a/arch/microblaze/include/asm/mmu_context_no.h b/arch/microblaze/include/asm/mmu_context_no.h deleted file mode 100644 index ba5567190154..000000000000 --- a/arch/microblaze/include/asm/mmu_context_no.h +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> | ||
| 3 | * Copyright (C) 2008-2009 PetaLogix | ||
| 4 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _ASM_MICROBLAZE_MMU_CONTEXT_H | ||
| 12 | #define _ASM_MICROBLAZE_MMU_CONTEXT_H | ||
| 13 | |||
| 14 | # define init_new_context(tsk, mm) ({ 0; }) | ||
| 15 | |||
| 16 | # define enter_lazy_tlb(mm, tsk) do {} while (0) | ||
| 17 | # define change_mm_context(old, ctx, _pml4) do {} while (0) | ||
| 18 | # define destroy_context(mm) do {} while (0) | ||
| 19 | # define deactivate_mm(tsk, mm) do {} while (0) | ||
| 20 | # define switch_mm(prev, next, tsk) do {} while (0) | ||
| 21 | # define activate_mm(prev, next) do {} while (0) | ||
| 22 | |||
| 23 | #endif /* _ASM_MICROBLAZE_MMU_CONTEXT_H */ | ||
diff --git a/arch/microblaze/include/asm/module.h b/arch/microblaze/include/asm/module.h index 914565a90315..7be1347fce42 100644 --- a/arch/microblaze/include/asm/module.h +++ b/arch/microblaze/include/asm/module.h | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | #ifndef _ASM_MICROBLAZE_MODULE_H | 9 | #ifndef _ASM_MICROBLAZE_MODULE_H |
| 10 | #define _ASM_MICROBLAZE_MODULE_H | 10 | #define _ASM_MICROBLAZE_MODULE_H |
| 11 | 11 | ||
| 12 | #include <asm-generic/module.h> | ||
| 13 | |||
| 12 | /* Microblaze Relocations */ | 14 | /* Microblaze Relocations */ |
| 13 | #define R_MICROBLAZE_NONE 0 | 15 | #define R_MICROBLAZE_NONE 0 |
| 14 | #define R_MICROBLAZE_32 1 | 16 | #define R_MICROBLAZE_32 1 |
| @@ -24,14 +26,6 @@ | |||
| 24 | /* Keep this the last entry. */ | 26 | /* Keep this the last entry. */ |
| 25 | #define R_MICROBLAZE_NUM 11 | 27 | #define R_MICROBLAZE_NUM 11 |
| 26 | 28 | ||
| 27 | struct mod_arch_specific { | ||
| 28 | int foo; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #define Elf_Shdr Elf32_Shdr | ||
| 32 | #define Elf_Sym Elf32_Sym | ||
| 33 | #define Elf_Ehdr Elf32_Ehdr | ||
| 34 | |||
| 35 | typedef struct { volatile int counter; } module_t; | 29 | typedef struct { volatile int counter; } module_t; |
| 36 | 30 | ||
| 37 | #endif /* _ASM_MICROBLAZE_MODULE_H */ | 31 | #endif /* _ASM_MICROBLAZE_MODULE_H */ |
diff --git a/arch/microblaze/include/asm/msgbuf.h b/arch/microblaze/include/asm/msgbuf.h index 09dd97097211..809134c644a6 100644 --- a/arch/microblaze/include/asm/msgbuf.h +++ b/arch/microblaze/include/asm/msgbuf.h | |||
| @@ -1,31 +1 @@ | |||
| 1 | #ifndef _ASM_MICROBLAZE_MSGBUF_H | #include <asm-generic/msgbuf.h> | |
| 2 | #define _ASM_MICROBLAZE_MSGBUF_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * The msqid64_ds structure for microblaze architecture. | ||
| 6 | * Note extra padding because this structure is passed back and forth | ||
| 7 | * between kernel and user space. | ||
| 8 | * | ||
| 9 | * Pad space is left for: | ||
| 10 | * - 64-bit time_t to solve y2038 problem | ||
| 11 | * - 2 miscellaneous 32-bit values | ||
| 12 | */ | ||
| 13 | |||
| 14 | struct msqid64_ds { | ||
| 15 | struct ipc64_perm msg_perm; | ||
| 16 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
| 17 | unsigned long __unused1; | ||
| 18 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
| 19 | unsigned long __unused2; | ||
| 20 | __kernel_time_t msg_ctime; /* last change time */ | ||
| 21 | unsigned long __unused3; | ||
| 22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
| 23 | unsigned long msg_qnum; /* number of messages in queue */ | ||
| 24 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
| 25 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
| 26 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
| 27 | unsigned long __unused4; | ||
| 28 | unsigned long __unused5; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* _ASM_MICROBLAZE_MSGBUF_H */ | ||
diff --git a/arch/microblaze/include/asm/param.h b/arch/microblaze/include/asm/param.h index 8c538a49616d..965d45427975 100644 --- a/arch/microblaze/include/asm/param.h +++ b/arch/microblaze/include/asm/param.h | |||
| @@ -1,30 +1 @@ | |||
| 1 | /* | #include <asm-generic/param.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_PARAM_H | ||
| 10 | #define _ASM_MICROBLAZE_PARAM_H | ||
| 11 | |||
| 12 | #ifdef __KERNEL__ | ||
| 13 | #define HZ CONFIG_HZ /* internal kernel timer frequency */ | ||
| 14 | #define USER_HZ 100 /* for user interfaces in "ticks" */ | ||
| 15 | #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ | ||
| 16 | #endif /* __KERNEL__ */ | ||
| 17 | |||
| 18 | #ifndef HZ | ||
| 19 | #define HZ 100 | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #define EXEC_PAGESIZE 4096 | ||
| 23 | |||
| 24 | #ifndef NOGROUP | ||
| 25 | #define NOGROUP (-1) | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
| 29 | |||
| 30 | #endif /* _ASM_MICROBLAZE_PARAM_H */ | ||
diff --git a/arch/microblaze/include/asm/parport.h b/arch/microblaze/include/asm/parport.h new file mode 100644 index 000000000000..cf252af64590 --- /dev/null +++ b/arch/microblaze/include/asm/parport.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/parport.h> | |||
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index ca03794cf3f0..9f0df5faf2c8 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h | |||
| @@ -1 +1 @@ | |||
| #include <linux/io.h> | #include <asm-generic/pci.h> | ||
diff --git a/arch/microblaze/include/asm/posix_types.h b/arch/microblaze/include/asm/posix_types.h index 8c758b231f37..0e15039673e3 100644 --- a/arch/microblaze/include/asm/posix_types.h +++ b/arch/microblaze/include/asm/posix_types.h | |||
| @@ -1,73 +1,9 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_POSIX_TYPES_H | 1 | #ifndef _ASM_MICROBLAZE_POSIX_TYPES_H |
| 10 | #define _ASM_MICROBLAZE_POSIX_TYPES_H | 2 | #define _ASM_MICROBLAZE_POSIX_TYPES_H |
| 11 | 3 | ||
| 12 | /* | ||
| 13 | * This file is generally used by user-level software, so you need to | ||
| 14 | * be a little careful about namespace pollution etc. Also, we cannot | ||
| 15 | * assume GCC is being used. | ||
| 16 | */ | ||
| 17 | |||
| 18 | typedef unsigned long __kernel_ino_t; | ||
| 19 | typedef unsigned short __kernel_mode_t; | 4 | typedef unsigned short __kernel_mode_t; |
| 20 | typedef unsigned int __kernel_nlink_t; | 5 | #define __kernel_mode_t __kernel_mode_t |
| 21 | typedef long __kernel_off_t; | ||
| 22 | typedef int __kernel_pid_t; | ||
| 23 | typedef unsigned int __kernel_ipc_pid_t; | ||
| 24 | typedef unsigned int __kernel_uid_t; | ||
| 25 | typedef unsigned int __kernel_gid_t; | ||
| 26 | typedef unsigned long __kernel_size_t; | ||
| 27 | typedef long __kernel_ssize_t; | ||
| 28 | typedef int __kernel_ptrdiff_t; | ||
| 29 | typedef long __kernel_time_t; | ||
| 30 | typedef long __kernel_suseconds_t; | ||
| 31 | typedef long __kernel_clock_t; | ||
| 32 | typedef int __kernel_timer_t; | ||
| 33 | typedef int __kernel_clockid_t; | ||
| 34 | typedef int __kernel_daddr_t; | ||
| 35 | typedef char *__kernel_caddr_t; | ||
| 36 | typedef unsigned short __kernel_uid16_t; | ||
| 37 | typedef unsigned short __kernel_gid16_t; | ||
| 38 | typedef unsigned int __kernel_uid32_t; | ||
| 39 | typedef unsigned int __kernel_gid32_t; | ||
| 40 | |||
| 41 | typedef unsigned int __kernel_old_uid_t; | ||
| 42 | typedef unsigned int __kernel_old_gid_t; | ||
| 43 | typedef unsigned int __kernel_old_dev_t; | ||
| 44 | |||
| 45 | #ifdef __GNUC__ | ||
| 46 | typedef long long __kernel_loff_t; | ||
| 47 | #endif | ||
| 48 | |||
| 49 | typedef struct { | ||
| 50 | #if defined(__KERNEL__) || defined(__USE_ALL) | ||
| 51 | int val[2]; | ||
| 52 | #else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
| 53 | int __val[2]; | ||
| 54 | #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
| 55 | } __kernel_fsid_t; | ||
| 56 | |||
| 57 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
| 58 | |||
| 59 | #undef __FD_SET | ||
| 60 | #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) | ||
| 61 | |||
| 62 | #undef __FD_CLR | ||
| 63 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | ||
| 64 | |||
| 65 | #undef __FD_ISSET | ||
| 66 | #define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d))) | ||
| 67 | |||
| 68 | #undef __FD_ZERO | ||
| 69 | #define __FD_ZERO(fdsetp) (memset(fdsetp, 0, sizeof(*(fd_set *)fdsetp))) | ||
| 70 | 6 | ||
| 71 | #endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ | 7 | #include <asm-generic/posix_types.h> |
| 72 | 8 | ||
| 73 | #endif /* _ASM_MICROBLAZE_POSIX_TYPES_H */ | 9 | #endif /* _ASM_MICROBLAZE_POSIX_TYPES_H */ |
diff --git a/arch/microblaze/include/asm/scatterlist.h b/arch/microblaze/include/asm/scatterlist.h index 08ff1d049b42..35d786fe93ae 100644 --- a/arch/microblaze/include/asm/scatterlist.h +++ b/arch/microblaze/include/asm/scatterlist.h | |||
| @@ -1,28 +1 @@ | |||
| 1 | /* | #include <asm-generic/scatterlist.h> | |
| 2 | * Copyright (C) 2008 Michal Simek <monstr@monstr.eu> | ||
| 3 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 4 | * | ||
| 5 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 6 | * License. See the file "COPYING" in the main directory of this archive | ||
| 7 | * for more details. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _ASM_MICROBLAZE_SCATTERLIST_H | ||
| 11 | #define _ASM_MICROBLAZE_SCATTERLIST_H | ||
| 12 | |||
| 13 | struct scatterlist { | ||
| 14 | #ifdef CONFIG_DEBUG_SG | ||
| 15 | unsigned long sg_magic; | ||
| 16 | #endif | ||
| 17 | unsigned long page_link; | ||
| 18 | dma_addr_t dma_address; | ||
| 19 | unsigned int offset; | ||
| 20 | unsigned int length; | ||
| 21 | }; | ||
| 22 | |||
| 23 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
| 24 | #define sg_dma_len(sg) ((sg)->length) | ||
| 25 | |||
| 26 | #define ISA_DMA_THRESHOLD (~0UL) | ||
| 27 | |||
| 28 | #endif /* _ASM_MICROBLAZE_SCATTERLIST_H */ | ||
diff --git a/arch/microblaze/include/asm/sembuf.h b/arch/microblaze/include/asm/sembuf.h index b804ed71a57e..7673b83cfef7 100644 --- a/arch/microblaze/include/asm/sembuf.h +++ b/arch/microblaze/include/asm/sembuf.h | |||
| @@ -1,34 +1 @@ | |||
| 1 | /* | #include <asm-generic/sembuf.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_SEMBUF_H | ||
| 10 | #define _ASM_MICROBLAZE_SEMBUF_H | ||
| 11 | |||
| 12 | /* | ||
| 13 | * The semid64_ds structure for microblaze architecture. | ||
| 14 | * Note extra padding because this structure is passed back and forth | ||
| 15 | * between kernel and user space. | ||
| 16 | * | ||
| 17 | * Pad space is left for: | ||
| 18 | * - 64-bit time_t to solve y2038 problem | ||
| 19 | * - 2 miscellaneous 32-bit values | ||
| 20 | */ | ||
| 21 | |||
| 22 | struct semid64_ds { | ||
| 23 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
| 24 | __kernel_time_t sem_otime; /* last semop time */ | ||
| 25 | unsigned long __unused1; | ||
| 26 | __kernel_time_t sem_ctime; /* last change time */ | ||
| 27 | unsigned long __unused2; | ||
| 28 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
| 29 | unsigned long __unused3; | ||
| 30 | unsigned long __unused4; | ||
| 31 | }; | ||
| 32 | |||
| 33 | |||
| 34 | #endif /* _ASM_MICROBLAZE_SEMBUF_H */ | ||
diff --git a/arch/microblaze/include/asm/serial.h b/arch/microblaze/include/asm/serial.h index 39bfc8ce6af5..a0cb0caff152 100644 --- a/arch/microblaze/include/asm/serial.h +++ b/arch/microblaze/include/asm/serial.h | |||
| @@ -1,14 +1 @@ | |||
| 1 | /* | #include <asm-generic/serial.h> | |
| 2 | * Copyright (C) 2009 Michal Simek <monstr@monstr.eu> | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_SERIAL_H | ||
| 10 | #define _ASM_MICROBLAZE_SERIAL_H | ||
| 11 | |||
| 12 | # define BASE_BAUD (1843200 / 16) | ||
| 13 | |||
| 14 | #endif /* _ASM_MICROBLAZE_SERIAL_H */ | ||
diff --git a/arch/microblaze/include/asm/shmbuf.h b/arch/microblaze/include/asm/shmbuf.h index f829c5843618..83c05fc2de38 100644 --- a/arch/microblaze/include/asm/shmbuf.h +++ b/arch/microblaze/include/asm/shmbuf.h | |||
| @@ -1,42 +1 @@ | |||
| 1 | #ifndef _ASM_MICROBLAZE_SHMBUF_H | #include <asm-generic/shmbuf.h> | |
| 2 | #define _ASM_MICROBLAZE_SHMBUF_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * The shmid64_ds structure for microblaze architecture. | ||
| 6 | * Note extra padding because this structure is passed back and forth | ||
| 7 | * between kernel and user space. | ||
| 8 | * | ||
| 9 | * Pad space is left for: | ||
| 10 | * - 64-bit time_t to solve y2038 problem | ||
| 11 | * - 2 miscellaneous 32-bit values | ||
| 12 | */ | ||
| 13 | |||
| 14 | struct shmid64_ds { | ||
| 15 | struct ipc64_perm shm_perm; /* operation perms */ | ||
| 16 | size_t shm_segsz; /* size of segment (bytes) */ | ||
| 17 | __kernel_time_t shm_atime; /* last attach time */ | ||
| 18 | unsigned long __unused1; | ||
| 19 | __kernel_time_t shm_dtime; /* last detach time */ | ||
| 20 | unsigned long __unused2; | ||
| 21 | __kernel_time_t shm_ctime; /* last change time */ | ||
| 22 | unsigned long __unused3; | ||
| 23 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
| 24 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
| 25 | unsigned long shm_nattch; /* no. of current attaches */ | ||
| 26 | unsigned long __unused4; | ||
| 27 | unsigned long __unused5; | ||
| 28 | }; | ||
| 29 | |||
| 30 | struct shminfo64 { | ||
| 31 | unsigned long shmmax; | ||
| 32 | unsigned long shmmin; | ||
| 33 | unsigned long shmmni; | ||
| 34 | unsigned long shmseg; | ||
| 35 | unsigned long shmall; | ||
| 36 | unsigned long __unused1; | ||
| 37 | unsigned long __unused2; | ||
| 38 | unsigned long __unused3; | ||
| 39 | unsigned long __unused4; | ||
| 40 | }; | ||
| 41 | |||
| 42 | #endif /* _ASM_MICROBLAZE_SHMBUF_H */ | ||
diff --git a/arch/microblaze/include/asm/shmparam.h b/arch/microblaze/include/asm/shmparam.h index 9f5fc2b3b6a3..93f30deb95d0 100644 --- a/arch/microblaze/include/asm/shmparam.h +++ b/arch/microblaze/include/asm/shmparam.h | |||
| @@ -1,6 +1 @@ | |||
| 1 | #ifndef _ASM_MICROBLAZE_SHMPARAM_H | #include <asm-generic/shmparam.h> | |
| 2 | #define _ASM_MICROBLAZE_SHMPARAM_H | ||
| 3 | |||
| 4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | ||
| 5 | |||
| 6 | #endif /* _ASM_MICROBLAZE_SHMPARAM_H */ | ||
diff --git a/arch/microblaze/include/asm/siginfo.h b/arch/microblaze/include/asm/siginfo.h index f162911a8f50..0815d29d82e5 100644 --- a/arch/microblaze/include/asm/siginfo.h +++ b/arch/microblaze/include/asm/siginfo.h | |||
| @@ -1,15 +1 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_SIGINFO_H | ||
| 10 | #define _ASM_MICROBLAZE_SIGINFO_H | ||
| 11 | |||
| 12 | #include <linux/types.h> | ||
| 13 | #include <asm-generic/siginfo.h> | #include <asm-generic/siginfo.h> | |
| 14 | |||
| 15 | #endif /* _ASM_MICROBLAZE_SIGINFO_H */ | ||
diff --git a/arch/microblaze/include/asm/signal.h b/arch/microblaze/include/asm/signal.h index 46bc2267d949..7b1573ce19de 100644 --- a/arch/microblaze/include/asm/signal.h +++ b/arch/microblaze/include/asm/signal.h | |||
| @@ -1,165 +1 @@ | |||
| 1 | /* | #include <asm-generic/signal.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 3 | * Yasushi SHOJI <yashi@atmark-techno.com> | ||
| 4 | * Tetsuya OHKAWA <tetsuya@atmark-techno.com> | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _ASM_MICROBLAZE_SIGNAL_H | ||
| 12 | #define _ASM_MICROBLAZE_SIGNAL_H | ||
| 13 | |||
| 14 | #define SIGHUP 1 | ||
| 15 | #define SIGINT 2 | ||
| 16 | #define SIGQUIT 3 | ||
| 17 | #define SIGILL 4 | ||
| 18 | #define SIGTRAP 5 | ||
| 19 | #define SIGABRT 6 | ||
| 20 | #define SIGIOT 6 | ||
| 21 | #define SIGBUS 7 | ||
| 22 | #define SIGFPE 8 | ||
| 23 | #define SIGKILL 9 | ||
| 24 | #define SIGUSR1 10 | ||
| 25 | #define SIGSEGV 11 | ||
| 26 | #define SIGUSR2 12 | ||
| 27 | #define SIGPIPE 13 | ||
| 28 | #define SIGALRM 14 | ||
| 29 | #define SIGTERM 15 | ||
| 30 | #define SIGSTKFLT 16 | ||
| 31 | #define SIGCHLD 17 | ||
| 32 | #define SIGCONT 18 | ||
| 33 | #define SIGSTOP 19 | ||
| 34 | #define SIGTSTP 20 | ||
| 35 | #define SIGTTIN 21 | ||
| 36 | #define SIGTTOU 22 | ||
| 37 | #define SIGURG 23 | ||
| 38 | #define SIGXCPU 24 | ||
| 39 | #define SIGXFSZ 25 | ||
| 40 | #define SIGVTALRM 26 | ||
| 41 | #define SIGPROF 27 | ||
| 42 | #define SIGWINCH 28 | ||
| 43 | #define SIGIO 29 | ||
| 44 | #define SIGPOLL SIGIO | ||
| 45 | /* | ||
| 46 | #define SIGLOST 29 | ||
| 47 | */ | ||
| 48 | #define SIGPWR 30 | ||
| 49 | #define SIGSYS 31 | ||
| 50 | #define SIGUNUSED 31 | ||
| 51 | |||
| 52 | /* These should not be considered constants from userland. */ | ||
| 53 | #define SIGRTMIN 32 | ||
| 54 | #define SIGRTMAX _NSIG | ||
| 55 | |||
| 56 | /* | ||
| 57 | * SA_FLAGS values: | ||
| 58 | * | ||
| 59 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
| 60 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
| 61 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
| 62 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
| 63 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
| 64 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
| 65 | * | ||
| 66 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
| 67 | * Unix names RESETHAND and NODEFER respectively. | ||
| 68 | */ | ||
| 69 | #define SA_NOCLDSTOP 0x00000001 | ||
| 70 | #define SA_NOCLDWAIT 0x00000002 | ||
| 71 | #define SA_SIGINFO 0x00000004 | ||
| 72 | #define SA_ONSTACK 0x08000000 | ||
| 73 | #define SA_RESTART 0x10000000 | ||
| 74 | #define SA_NODEFER 0x40000000 | ||
| 75 | #define SA_RESETHAND 0x80000000 | ||
| 76 | |||
| 77 | #define SA_NOMASK SA_NODEFER | ||
| 78 | #define SA_ONESHOT SA_RESETHAND | ||
| 79 | |||
| 80 | #define SA_RESTORER 0x04000000 | ||
| 81 | |||
| 82 | /* | ||
| 83 | * sigaltstack controls | ||
| 84 | */ | ||
| 85 | #define SS_ONSTACK 1 | ||
| 86 | #define SS_DISABLE 2 | ||
| 87 | |||
| 88 | #define MINSIGSTKSZ 2048 | ||
| 89 | #define SIGSTKSZ 8192 | ||
| 90 | |||
| 91 | # ifndef __ASSEMBLY__ | ||
| 92 | # include <linux/types.h> | ||
| 93 | # include <asm-generic/signal-defs.h> | ||
| 94 | |||
| 95 | /* Avoid too many header ordering problems. */ | ||
| 96 | struct siginfo; | ||
| 97 | |||
| 98 | # ifdef __KERNEL__ | ||
| 99 | /* | ||
| 100 | * Most things should be clean enough to redefine this at will, if care | ||
| 101 | * is taken to make libc match. | ||
| 102 | */ | ||
| 103 | # define _NSIG 64 | ||
| 104 | # define _NSIG_BPW 32 | ||
| 105 | # define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
| 106 | |||
| 107 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
| 108 | |||
| 109 | typedef struct { | ||
| 110 | unsigned long sig[_NSIG_WORDS]; | ||
| 111 | } sigset_t; | ||
| 112 | |||
| 113 | struct old_sigaction { | ||
| 114 | __sighandler_t sa_handler; | ||
| 115 | old_sigset_t sa_mask; | ||
| 116 | unsigned long sa_flags; | ||
| 117 | void (*sa_restorer)(void); | ||
| 118 | }; | ||
| 119 | |||
| 120 | struct sigaction { | ||
| 121 | __sighandler_t sa_handler; | ||
| 122 | unsigned long sa_flags; | ||
| 123 | void (*sa_restorer)(void); | ||
| 124 | sigset_t sa_mask; /* mask last for extensibility */ | ||
| 125 | }; | ||
| 126 | |||
| 127 | struct k_sigaction { | ||
| 128 | struct sigaction sa; | ||
| 129 | }; | ||
| 130 | |||
| 131 | # include <asm/sigcontext.h> | ||
| 132 | # undef __HAVE_ARCH_SIG_BITOPS | ||
| 133 | |||
| 134 | # define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
| 135 | |||
| 136 | # else /* !__KERNEL__ */ | ||
| 137 | |||
| 138 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
| 139 | |||
| 140 | # define NSIG 32 | ||
| 141 | typedef unsigned long sigset_t; | ||
| 142 | |||
| 143 | struct sigaction { | ||
| 144 | union { | ||
| 145 | __sighandler_t _sa_handler; | ||
| 146 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
| 147 | } _u; | ||
| 148 | sigset_t sa_mask; | ||
| 149 | unsigned long sa_flags; | ||
| 150 | void (*sa_restorer)(void); | ||
| 151 | }; | ||
| 152 | |||
| 153 | # define sa_handler _u._sa_handler | ||
| 154 | # define sa_sigaction _u._sa_sigaction | ||
| 155 | |||
| 156 | # endif /* __KERNEL__ */ | ||
| 157 | |||
| 158 | typedef struct sigaltstack { | ||
| 159 | void *ss_sp; | ||
| 160 | int ss_flags; | ||
| 161 | size_t ss_size; | ||
| 162 | } stack_t; | ||
| 163 | |||
| 164 | # endif /* __ASSEMBLY__ */ | ||
| 165 | #endif /* _ASM_MICROBLAZE_SIGNAL_H */ | ||
diff --git a/arch/microblaze/include/asm/socket.h b/arch/microblaze/include/asm/socket.h index 825936860314..6b71384b9d8b 100644 --- a/arch/microblaze/include/asm/socket.h +++ b/arch/microblaze/include/asm/socket.h | |||
| @@ -1,69 +1 @@ | |||
| 1 | /* | #include <asm-generic/socket.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_SOCKET_H | ||
| 10 | #define _ASM_MICROBLAZE_SOCKET_H | ||
| 11 | |||
| 12 | #include <asm/sockios.h> | ||
| 13 | |||
| 14 | /* For setsockoptions(2) */ | ||
| 15 | #define SOL_SOCKET 1 | ||
| 16 | |||
| 17 | #define SO_DEBUG 1 | ||
| 18 | #define SO_REUSEADDR 2 | ||
| 19 | #define SO_TYPE 3 | ||
| 20 | #define SO_ERROR 4 | ||
| 21 | #define SO_DONTROUTE 5 | ||
| 22 | #define SO_BROADCAST 6 | ||
| 23 | #define SO_SNDBUF 7 | ||
| 24 | #define SO_RCVBUF 8 | ||
| 25 | #define SO_SNDBUFFORCE 32 | ||
| 26 | #define SO_RCVBUFFORCE 33 | ||
| 27 | #define SO_KEEPALIVE 9 | ||
| 28 | #define SO_OOBINLINE 10 | ||
| 29 | #define SO_NO_CHECK 11 | ||
| 30 | #define SO_PRIORITY 12 | ||
| 31 | #define SO_LINGER 13 | ||
| 32 | #define SO_BSDCOMPAT 14 | ||
| 33 | /* To add :#define SO_REUSEPORT 15 */ | ||
| 34 | #define SO_PASSCRED 16 | ||
| 35 | #define SO_PEERCRED 17 | ||
| 36 | #define SO_RCVLOWAT 18 | ||
| 37 | #define SO_SNDLOWAT 19 | ||
| 38 | #define SO_RCVTIMEO 20 | ||
| 39 | #define SO_SNDTIMEO 21 | ||
| 40 | |||
| 41 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
| 42 | #define SO_SECURITY_AUTHENTICATION 22 | ||
| 43 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
| 44 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
| 45 | |||
| 46 | #define SO_BINDTODEVICE 25 | ||
| 47 | |||
| 48 | /* Socket filtering */ | ||
| 49 | #define SO_ATTACH_FILTER 26 | ||
| 50 | #define SO_DETACH_FILTER 27 | ||
| 51 | |||
| 52 | #define SO_PEERNAME 28 | ||
| 53 | #define SO_TIMESTAMP 29 | ||
| 54 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
| 55 | |||
| 56 | #define SO_ACCEPTCONN 30 | ||
| 57 | |||
| 58 | #define SO_PEERSEC 31 | ||
| 59 | #define SO_PASSSEC 34 | ||
| 60 | |||
| 61 | #define SO_TIMESTAMPNS 35 | ||
| 62 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
| 63 | |||
| 64 | #define SO_MARK 36 | ||
| 65 | |||
| 66 | #define SO_TIMESTAMPING 37 | ||
| 67 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
| 68 | |||
| 69 | #endif /* _ASM_MICROBLAZE_SOCKET_H */ | ||
diff --git a/arch/microblaze/include/asm/sockios.h b/arch/microblaze/include/asm/sockios.h index 9fff57a701e1..def6d4746ee7 100644 --- a/arch/microblaze/include/asm/sockios.h +++ b/arch/microblaze/include/asm/sockios.h | |||
| @@ -1,23 +1 @@ | |||
| 1 | /* | #include <asm-generic/sockios.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_SOCKIOS_H | ||
| 10 | #define _ASM_MICROBLAZE_SOCKIOS_H | ||
| 11 | |||
| 12 | #include <linux/ioctl.h> | ||
| 13 | |||
| 14 | /* Socket-level I/O control calls. */ | ||
| 15 | #define FIOSETOWN 0x8901 | ||
| 16 | #define SIOCSPGRP 0x8902 | ||
| 17 | #define FIOGETOWN 0x8903 | ||
| 18 | #define SIOCGPGRP 0x8904 | ||
| 19 | #define SIOCATMARK 0x8905 | ||
| 20 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
| 21 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
| 22 | |||
| 23 | #endif /* _ASM_MICROBLAZE_SOCKIOS_H */ | ||
diff --git a/arch/microblaze/include/asm/stat.h b/arch/microblaze/include/asm/stat.h index a15f77520bfd..3dc90fa92c70 100644 --- a/arch/microblaze/include/asm/stat.h +++ b/arch/microblaze/include/asm/stat.h | |||
| @@ -1,68 +1 @@ | |||
| 1 | /* | #include <asm-generic/stat.h> | |
| 2 | * Microblaze stat structure | ||
| 3 | * | ||
| 4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
| 5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
| 6 | * | ||
| 7 | * This file is subject to the terms and conditions of the GNU General | ||
| 8 | * Public License. See the file COPYING in the main directory of this | ||
| 9 | * archive for more details. | ||
| 10 | * | ||
| 11 | * Written by Miles Bader <miles@gnu.org> | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef _ASM_MICROBLAZE_STAT_H | ||
| 15 | #define _ASM_MICROBLAZE_STAT_H | ||
| 16 | |||
| 17 | #include <linux/posix_types.h> | ||
| 18 | |||
| 19 | #define STAT_HAVE_NSEC 1 | ||
| 20 | |||
| 21 | struct stat { | ||
| 22 | unsigned long st_dev; | ||
| 23 | unsigned long st_ino; | ||
| 24 | unsigned int st_mode; | ||
| 25 | unsigned int st_nlink; | ||
| 26 | unsigned int st_uid; | ||
| 27 | unsigned int st_gid; | ||
| 28 | unsigned long st_rdev; | ||
| 29 | unsigned long __pad1; | ||
| 30 | long st_size; | ||
| 31 | int st_blksize; | ||
| 32 | int __pad2; | ||
| 33 | long st_blocks; | ||
| 34 | int st_atime; | ||
| 35 | unsigned int st_atime_nsec; | ||
| 36 | int st_mtime; | ||
| 37 | unsigned int st_mtime_nsec; | ||
| 38 | int st_ctime; | ||
| 39 | unsigned int st_ctime_nsec; | ||
| 40 | unsigned long __unused4; | ||
| 41 | unsigned long __unused5; | ||
| 42 | }; | ||
| 43 | |||
| 44 | struct stat64 { | ||
| 45 | unsigned long long st_dev; /* Device. */ | ||
| 46 | unsigned long long st_ino; /* File serial number. */ | ||
| 47 | unsigned int st_mode; /* File mode. */ | ||
| 48 | unsigned int st_nlink; /* Link count. */ | ||
| 49 | unsigned int st_uid; /* User ID of the file's owner. */ | ||
| 50 | unsigned int st_gid; /* Group ID of the file's group. */ | ||
| 51 | unsigned long long st_rdev; /* Device number, if device. */ | ||
| 52 | unsigned long long __pad1; | ||
| 53 | long long st_size; /* Size of file, in bytes. */ | ||
| 54 | int st_blksize; /* Optimal block size for I/O. */ | ||
| 55 | int __pad2; | ||
| 56 | long long st_blocks; /* Number 512-byte blocks allocated. */ | ||
| 57 | int st_atime; /* Time of last access. */ | ||
| 58 | unsigned int st_atime_nsec; | ||
| 59 | int st_mtime; /* Time of last modification. */ | ||
| 60 | unsigned int st_mtime_nsec; | ||
| 61 | int st_ctime; /* Time of last status change. */ | ||
| 62 | unsigned int st_ctime_nsec; | ||
| 63 | unsigned int __unused4; | ||
| 64 | unsigned int __unused5; | ||
| 65 | }; | ||
| 66 | |||
| 67 | #endif /* _ASM_MICROBLAZE_STAT_H */ | ||
| 68 | |||
diff --git a/arch/microblaze/include/asm/swab.h b/arch/microblaze/include/asm/swab.h index b375d7b65ad7..7847e563ab66 100644 --- a/arch/microblaze/include/asm/swab.h +++ b/arch/microblaze/include/asm/swab.h | |||
| @@ -1,8 +1 @@ | |||
| 1 | #ifndef _ASM_MICROBLAZE_SWAB_H | #include <asm-generic/swab.h> | |
| 2 | #define _ASM_MICROBLAZE_SWAB_H | ||
| 3 | |||
| 4 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
| 5 | #define __SWAB_64_THRU_32__ | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #endif /* _ASM_MICROBLAZE_SWAB_H */ | ||
diff --git a/arch/microblaze/include/asm/syscalls.h b/arch/microblaze/include/asm/syscalls.h index ddea9eb31f8d..720761cc741f 100644 --- a/arch/microblaze/include/asm/syscalls.h +++ b/arch/microblaze/include/asm/syscalls.h | |||
| @@ -1,48 +1,8 @@ | |||
| 1 | #ifndef __ASM_MICROBLAZE_SYSCALLS_H | 1 | #ifndef __ASM_MICROBLAZE_SYSCALLS_H |
| 2 | #define __ASM_MICROBLAZE_SYSCALLS_H | ||
| 3 | #ifdef __KERNEL__ | ||
| 4 | 2 | ||
| 5 | #include <linux/compiler.h> | 3 | asmlinkage long sys_clone(int flags, unsigned long stack, struct pt_regs *regs); |
| 6 | #include <linux/linkage.h> | 4 | #define sys_clone sys_clone |
| 7 | #include <linux/types.h> | ||
| 8 | #include <linux/signal.h> | ||
| 9 | 5 | ||
| 10 | /* FIXME will be removed */ | 6 | #include <asm-generic/syscalls.h> |
| 11 | asmlinkage int sys_ipc(uint call, int first, int second, | ||
| 12 | int third, void *ptr, long fifth); | ||
| 13 | 7 | ||
| 14 | struct pt_regs; | ||
| 15 | asmlinkage int sys_vfork(struct pt_regs *regs); | ||
| 16 | asmlinkage int sys_clone(int flags, unsigned long stack, struct pt_regs *regs); | ||
| 17 | asmlinkage int sys_execve(char __user *filenamei, char __user *__user *argv, | ||
| 18 | char __user *__user *envp, struct pt_regs *regs); | ||
| 19 | |||
| 20 | asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len, | ||
| 21 | unsigned long prot, unsigned long flags, | ||
| 22 | unsigned long fd, unsigned long pgoff); | ||
| 23 | |||
| 24 | asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, | ||
| 25 | unsigned long prot, unsigned long flags, | ||
| 26 | unsigned long fd, off_t offset); | ||
| 27 | |||
| 28 | /* from signal.c */ | ||
| 29 | asmlinkage int sys_sigsuspend(old_sigset_t mask, struct pt_regs *regs); | ||
| 30 | |||
| 31 | asmlinkage int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, | ||
| 32 | struct pt_regs *regs); | ||
| 33 | |||
| 34 | asmlinkage int sys_sigaction(int sig, const struct old_sigaction *act, | ||
| 35 | struct old_sigaction *oact); | ||
| 36 | |||
| 37 | asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, | ||
| 38 | struct sigaction __user *oact, size_t sigsetsize); | ||
| 39 | |||
| 40 | asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | ||
| 41 | struct pt_regs *regs); | ||
| 42 | |||
| 43 | asmlinkage int sys_sigreturn(struct pt_regs *regs); | ||
| 44 | |||
| 45 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs); | ||
| 46 | |||
| 47 | #endif /* __KERNEL__ */ | ||
| 48 | #endif /* __ASM_MICROBLAZE_SYSCALLS_H */ | 8 | #endif /* __ASM_MICROBLAZE_SYSCALLS_H */ |
diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h index c4e308850b5d..b1ed61590660 100644 --- a/arch/microblaze/include/asm/system.h +++ b/arch/microblaze/include/asm/system.h | |||
| @@ -13,6 +13,9 @@ | |||
| 13 | #include <asm/setup.h> | 13 | #include <asm/setup.h> |
| 14 | #include <asm/irqflags.h> | 14 | #include <asm/irqflags.h> |
| 15 | 15 | ||
| 16 | #include <asm-generic/cmpxchg.h> | ||
| 17 | #include <asm-generic/cmpxchg-local.h> | ||
| 18 | |||
| 16 | struct task_struct; | 19 | struct task_struct; |
| 17 | struct thread_info; | 20 | struct thread_info; |
| 18 | 21 | ||
diff --git a/arch/microblaze/include/asm/termbits.h b/arch/microblaze/include/asm/termbits.h index a1b64bc4724a..3935b106de79 100644 --- a/arch/microblaze/include/asm/termbits.h +++ b/arch/microblaze/include/asm/termbits.h | |||
| @@ -1,203 +1 @@ | |||
| 1 | /* | #include <asm-generic/termbits.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_TERMBITS_H | ||
| 10 | #define _ASM_MICROBLAZE_TERMBITS_H | ||
| 11 | |||
| 12 | #include <linux/posix_types.h> | ||
| 13 | |||
| 14 | typedef unsigned char cc_t; | ||
| 15 | typedef unsigned int speed_t; | ||
| 16 | typedef unsigned int tcflag_t; | ||
| 17 | |||
| 18 | #define NCCS 19 | ||
| 19 | struct termios { | ||
| 20 | tcflag_t c_iflag; /* input mode flags */ | ||
| 21 | tcflag_t c_oflag; /* output mode flags */ | ||
| 22 | tcflag_t c_cflag; /* control mode flags */ | ||
| 23 | tcflag_t c_lflag; /* local mode flags */ | ||
| 24 | cc_t c_line; /* line discipline */ | ||
| 25 | cc_t c_cc[NCCS]; /* control characters */ | ||
| 26 | }; | ||
| 27 | |||
| 28 | struct ktermios { | ||
| 29 | tcflag_t c_iflag; /* input mode flags */ | ||
| 30 | tcflag_t c_oflag; /* output mode flags */ | ||
| 31 | tcflag_t c_cflag; /* control mode flags */ | ||
| 32 | tcflag_t c_lflag; /* local mode flags */ | ||
| 33 | cc_t c_line; /* line discipline */ | ||
| 34 | cc_t c_cc[NCCS]; /* control characters */ | ||
| 35 | speed_t c_ispeed; /* input speed */ | ||
| 36 | speed_t c_ospeed; /* output speed */ | ||
| 37 | }; | ||
| 38 | |||
| 39 | /* c_cc characters */ | ||
| 40 | |||
| 41 | #define VINTR 0 | ||
| 42 | #define VQUIT 1 | ||
| 43 | #define VERASE 2 | ||
| 44 | #define VKILL 3 | ||
| 45 | #define VEOF 4 | ||
| 46 | #define VTIME 5 | ||
| 47 | #define VMIN 6 | ||
| 48 | #define VSWTC 7 | ||
| 49 | #define VSTART 8 | ||
| 50 | #define VSTOP 9 | ||
| 51 | #define VSUSP 10 | ||
| 52 | #define VEOL 11 | ||
| 53 | #define VREPRINT 12 | ||
| 54 | #define VDISCARD 13 | ||
| 55 | #define VWERASE 14 | ||
| 56 | #define VLNEXT 15 | ||
| 57 | #define VEOL2 16 | ||
| 58 | |||
| 59 | /* c_iflag bits */ | ||
| 60 | |||
| 61 | #define IGNBRK 0000001 | ||
| 62 | #define BRKINT 0000002 | ||
| 63 | #define IGNPAR 0000004 | ||
| 64 | #define PARMRK 0000010 | ||
| 65 | #define INPCK 0000020 | ||
| 66 | #define ISTRIP 0000040 | ||
| 67 | #define INLCR 0000100 | ||
| 68 | #define IGNCR 0000200 | ||
| 69 | #define ICRNL 0000400 | ||
| 70 | #define IUCLC 0001000 | ||
| 71 | #define IXON 0002000 | ||
| 72 | #define IXANY 0004000 | ||
| 73 | #define IXOFF 0010000 | ||
| 74 | #define IMAXBEL 0020000 | ||
| 75 | #define IUTF8 0040000 | ||
| 76 | |||
| 77 | /* c_oflag bits */ | ||
| 78 | |||
| 79 | #define OPOST 0000001 | ||
| 80 | #define OLCUC 0000002 | ||
| 81 | #define ONLCR 0000004 | ||
| 82 | #define OCRNL 0000010 | ||
| 83 | #define ONOCR 0000020 | ||
| 84 | #define ONLRET 0000040 | ||
| 85 | #define OFILL 0000100 | ||
| 86 | #define OFDEL 0000200 | ||
| 87 | #define NLDLY 0000400 | ||
| 88 | #define NL0 0000000 | ||
| 89 | #define NL1 0000400 | ||
| 90 | #define CRDLY 0003000 | ||
| 91 | #define CR0 0000000 | ||
| 92 | #define CR1 0001000 | ||
| 93 | #define CR2 0002000 | ||
| 94 | #define CR3 0003000 | ||
| 95 | #define TABDLY 0014000 | ||
| 96 | #define TAB0 0000000 | ||
| 97 | #define TAB1 0004000 | ||
| 98 | #define TAB2 0010000 | ||
| 99 | #define TAB3 0014000 | ||
| 100 | #define XTABS 0014000 | ||
| 101 | #define BSDLY 0020000 | ||
| 102 | #define BS0 0000000 | ||
| 103 | #define BS1 0020000 | ||
| 104 | #define VTDLY 0040000 | ||
| 105 | #define VT0 0000000 | ||
| 106 | #define VT1 0040000 | ||
| 107 | #define FFDLY 0100000 | ||
| 108 | #define FF0 0000000 | ||
| 109 | #define FF1 0100000 | ||
| 110 | |||
| 111 | /* c_cflag bit meaning */ | ||
| 112 | |||
| 113 | #define CBAUD 0010017 | ||
| 114 | #define B0 0000000 /* hang up */ | ||
| 115 | #define B50 0000001 | ||
| 116 | #define B75 0000002 | ||
| 117 | #define B110 0000003 | ||
| 118 | #define B134 0000004 | ||
| 119 | #define B150 0000005 | ||
| 120 | #define B200 0000006 | ||
| 121 | #define B300 0000007 | ||
| 122 | #define B600 0000010 | ||
| 123 | #define B1200 0000011 | ||
| 124 | #define B1800 0000012 | ||
| 125 | #define B2400 0000013 | ||
| 126 | #define B4800 0000014 | ||
| 127 | #define B9600 0000015 | ||
| 128 | #define B19200 0000016 | ||
| 129 | #define B38400 0000017 | ||
| 130 | #define EXTA B19200 | ||
| 131 | #define EXTB B38400 | ||
| 132 | #define CSIZE 0000060 | ||
| 133 | #define CS5 0000000 | ||
| 134 | #define CS6 0000020 | ||
| 135 | #define CS7 0000040 | ||
| 136 | #define CS8 0000060 | ||
| 137 | #define CSTOPB 0000100 | ||
| 138 | #define CREAD 0000200 | ||
| 139 | #define PARENB 0000400 | ||
| 140 | #define PARODD 0001000 | ||
| 141 | #define HUPCL 0002000 | ||
| 142 | #define CLOCAL 0004000 | ||
| 143 | #define CBAUDEX 0010000 | ||
| 144 | #define B57600 0010001 | ||
| 145 | #define B115200 0010002 | ||
| 146 | #define B230400 0010003 | ||
| 147 | #define B460800 0010004 | ||
| 148 | #define B500000 0010005 | ||
| 149 | #define B576000 0010006 | ||
| 150 | #define B921600 0010007 | ||
| 151 | #define BOTHER 0010000 | ||
| 152 | #define B1000000 0010010 | ||
| 153 | #define B1152000 0010011 | ||
| 154 | #define B1500000 0010012 | ||
| 155 | #define B2000000 0010013 | ||
| 156 | #define B2500000 0010014 | ||
| 157 | #define B3000000 0010015 | ||
| 158 | #define B3500000 0010016 | ||
| 159 | #define B4000000 0010017 | ||
| 160 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | ||
| 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
| 162 | #define CRTSCTS 020000000000 /* flow control */ | ||
| 163 | |||
| 164 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
| 165 | |||
| 166 | /* c_lflag bits */ | ||
| 167 | |||
| 168 | #define ISIG 0000001 | ||
| 169 | #define ICANON 0000002 | ||
| 170 | #define XCASE 0000004 | ||
| 171 | #define ECHO 0000010 | ||
| 172 | #define ECHOE 0000020 | ||
| 173 | #define ECHOK 0000040 | ||
| 174 | #define ECHONL 0000100 | ||
| 175 | #define NOFLSH 0000200 | ||
| 176 | #define TOSTOP 0000400 | ||
| 177 | #define ECHOCTL 0001000 | ||
| 178 | #define ECHOPRT 0002000 | ||
| 179 | #define ECHOKE 0004000 | ||
| 180 | #define FLUSHO 0010000 | ||
| 181 | #define PENDIN 0040000 | ||
| 182 | #define IEXTEN 0100000 | ||
| 183 | |||
| 184 | /* tcflow() and TCXONC use these */ | ||
| 185 | |||
| 186 | #define TCOOFF 0 | ||
| 187 | #define TCOON 1 | ||
| 188 | #define TCIOFF 2 | ||
| 189 | #define TCION 3 | ||
| 190 | |||
| 191 | /* tcflush() and TCFLSH use these */ | ||
| 192 | |||
| 193 | #define TCIFLUSH 0 | ||
| 194 | #define TCOFLUSH 1 | ||
| 195 | #define TCIOFLUSH 2 | ||
| 196 | |||
| 197 | /* tcsetattr uses these */ | ||
| 198 | |||
| 199 | #define TCSANOW 0 | ||
| 200 | #define TCSADRAIN 1 | ||
| 201 | #define TCSAFLUSH 2 | ||
| 202 | |||
| 203 | #endif /* _ASM_MICROBLAZE_TERMBITS_H */ | ||
diff --git a/arch/microblaze/include/asm/termios.h b/arch/microblaze/include/asm/termios.h index 47a46d1fbe26..280d78a9d966 100644 --- a/arch/microblaze/include/asm/termios.h +++ b/arch/microblaze/include/asm/termios.h | |||
| @@ -1,88 +1 @@ | |||
| 1 | /* | #include <asm-generic/termios.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_TERMIOS_H | ||
| 10 | #define _ASM_MICROBLAZE_TERMIOS_H | ||
| 11 | |||
| 12 | #include <linux/string.h> | ||
| 13 | #include <asm/termbits.h> | ||
| 14 | #include <asm/ioctls.h> | ||
| 15 | |||
| 16 | struct winsize { | ||
| 17 | unsigned short ws_row; | ||
| 18 | unsigned short ws_col; | ||
| 19 | unsigned short ws_xpixel; | ||
| 20 | unsigned short ws_ypixel; | ||
| 21 | }; | ||
| 22 | |||
| 23 | #define NCC 8 | ||
| 24 | struct termio { | ||
| 25 | unsigned short c_iflag; /* input mode flags */ | ||
| 26 | unsigned short c_oflag; /* output mode flags */ | ||
| 27 | unsigned short c_cflag; /* control mode flags */ | ||
| 28 | unsigned short c_lflag; /* local mode flags */ | ||
| 29 | unsigned char c_line; /* line discipline */ | ||
| 30 | unsigned char c_cc[NCC]; /* control characters */ | ||
| 31 | }; | ||
| 32 | |||
| 33 | #ifdef __KERNEL__ | ||
| 34 | /* intr=^C quit=^| erase=del kill=^U | ||
| 35 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
| 36 | start=^Q stop=^S susp=^Z eol=\0 | ||
| 37 | reprint=^R discard=^U werase=^W lnext=^V | ||
| 38 | eol2=\0 | ||
| 39 | */ | ||
| 40 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /* Modem lines */ | ||
| 44 | |||
| 45 | #define TIOCM_LE 0x001 | ||
| 46 | #define TIOCM_DTR 0x002 | ||
| 47 | #define TIOCM_RTS 0x004 | ||
| 48 | #define TIOCM_ST 0x008 | ||
| 49 | #define TIOCM_SR 0x010 | ||
| 50 | #define TIOCM_CTS 0x020 | ||
| 51 | #define TIOCM_CAR 0x040 | ||
| 52 | #define TIOCM_RNG 0x080 | ||
| 53 | #define TIOCM_DSR 0x100 | ||
| 54 | #define TIOCM_CD TIOCM_CAR | ||
| 55 | #define TIOCM_RI TIOCM_RNG | ||
| 56 | #define TIOCM_OUT1 0x2000 | ||
| 57 | #define TIOCM_OUT2 0x4000 | ||
| 58 | #define TIOCM_LOOP 0x8000 | ||
| 59 | |||
| 60 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
| 61 | |||
| 62 | /* Line disciplines */ | ||
| 63 | |||
| 64 | #define N_TTY 0 | ||
| 65 | #define N_SLIP 1 | ||
| 66 | #define N_MOUSE 2 | ||
| 67 | #define N_PPP 3 | ||
| 68 | #define N_STRIP 4 | ||
| 69 | #define N_AX25 5 | ||
| 70 | #define N_X25 6 /* X.25 async */ | ||
| 71 | #define N_6PACK 7 | ||
| 72 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
| 73 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
| 74 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
| 75 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
| 76 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards | ||
| 77 | about SMS messages */ | ||
| 78 | #define N_HDLC 13 /* synchronous HDLC */ | ||
| 79 | #define N_SYNC_PPP 14 | ||
| 80 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
| 81 | |||
| 82 | #ifdef __KERNEL__ | ||
| 83 | |||
| 84 | #include <asm-generic/termios-base.h> | ||
| 85 | |||
| 86 | #endif /* __KERNEL__ */ | ||
| 87 | |||
| 88 | #endif /* _ASM_MICROBLAZE_TERMIOS_H */ | ||
diff --git a/arch/microblaze/include/asm/timex.h b/arch/microblaze/include/asm/timex.h index 678525dc6d0b..befcf3de5532 100644 --- a/arch/microblaze/include/asm/timex.h +++ b/arch/microblaze/include/asm/timex.h | |||
| @@ -9,10 +9,8 @@ | |||
| 9 | #ifndef _ASM_MICROBLAZE_TIMEX_H | 9 | #ifndef _ASM_MICROBLAZE_TIMEX_H |
| 10 | #define _ASM_MICROBLAZE_TIMEX_H | 10 | #define _ASM_MICROBLAZE_TIMEX_H |
| 11 | 11 | ||
| 12 | #define CLOCK_TICK_RATE 1000 /* Timer input freq. */ | 12 | #include <asm-generic/timex.h> |
| 13 | |||
| 14 | typedef unsigned long cycles_t; | ||
| 15 | 13 | ||
| 16 | #define get_cycles() (0) | 14 | #define CLOCK_TICK_RATE 1000 /* Timer input freq. */ |
| 17 | 15 | ||
| 18 | #endif /* _ASM_TIMEX_H */ | 16 | #endif /* _ASM_TIMEX_H */ |
diff --git a/arch/microblaze/include/asm/types.h b/arch/microblaze/include/asm/types.h index bebc018318f5..b9e79bc580dd 100644 --- a/arch/microblaze/include/asm/types.h +++ b/arch/microblaze/include/asm/types.h | |||
| @@ -1,38 +1 @@ | |||
| 1 | /* | #include <asm-generic/types.h> | |
| 2 | * Copyright (C) Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_TYPES_H | ||
| 10 | #define _ASM_MICROBLAZE_TYPES_H | ||
| 11 | |||
| 12 | /* | ||
| 13 | * This file is never included by application software unless | ||
| 14 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
| 15 | * application is Linux specific so (user-) name space pollution is | ||
| 16 | * not a major issue. However, for interoperability, libraries still | ||
| 17 | * need to be careful to avoid a name clashes. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <asm-generic/int-ll64.h> | ||
| 21 | |||
| 22 | # ifndef __ASSEMBLY__ | ||
| 23 | |||
| 24 | typedef unsigned short umode_t; | ||
| 25 | |||
| 26 | /* | ||
| 27 | * These aren't exported outside the kernel to avoid name space clashes | ||
| 28 | */ | ||
| 29 | # ifdef __KERNEL__ | ||
| 30 | # define BITS_PER_LONG 32 | ||
| 31 | |||
| 32 | /* Dma addresses are 32-bits wide. */ | ||
| 33 | |||
| 34 | typedef u32 dma_addr_t; | ||
| 35 | |||
| 36 | # endif/* __KERNEL__ */ | ||
| 37 | # endif /* __ASSEMBLY__ */ | ||
| 38 | #endif /* _ASM_MICROBLAZE_TYPES_H */ | ||
diff --git a/arch/microblaze/include/asm/ucontext.h b/arch/microblaze/include/asm/ucontext.h index 11f6bb3ae3a4..9bc07b9f30fb 100644 --- a/arch/microblaze/include/asm/ucontext.h +++ b/arch/microblaze/include/asm/ucontext.h | |||
| @@ -1,22 +1 @@ | |||
| 1 | /* | #include <asm-generic/ucontext.h> | |
| 2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
| 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 | |||
| 9 | #ifndef _ASM_MICROBLAZE_UCONTEXT_H | ||
| 10 | #define _ASM_MICROBLAZE_UCONTEXT_H | ||
| 11 | |||
| 12 | #include <asm/sigcontext.h> | ||
| 13 | |||
| 14 | struct ucontext { | ||
| 15 | unsigned long uc_flags; | ||
| 16 | struct ucontext *uc_link; | ||
| 17 | stack_t uc_stack; | ||
| 18 | struct sigcontext uc_mcontext; | ||
| 19 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif /* _ASM_MICROBLAZE_UCONTEXT_H */ | ||
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index b5e2f5fa5c53..0b852327c0e7 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h | |||
| @@ -380,8 +380,10 @@ | |||
| 380 | #define __NR_accept04 362 /* new */ | 380 | #define __NR_accept04 362 /* new */ |
| 381 | #define __NR_preadv 363 /* new */ | 381 | #define __NR_preadv 363 /* new */ |
| 382 | #define __NR_pwritev 364 /* new */ | 382 | #define __NR_pwritev 364 /* new */ |
| 383 | #define __NR_rt_tgsigqueueinfo 365 /* new */ | ||
| 384 | #define __NR_perf_counter_open 366 /* new */ | ||
| 383 | 385 | ||
| 384 | #define __NR_syscalls 365 | 386 | #define __NR_syscalls 367 |
| 385 | 387 | ||
| 386 | #ifdef __KERNEL__ | 388 | #ifdef __KERNEL__ |
| 387 | #ifndef __ASSEMBLY__ | 389 | #ifndef __ASSEMBLY__ |
| @@ -408,7 +410,7 @@ | |||
| 408 | #define __ARCH_WANT_SYS_SIGPENDING | 410 | #define __ARCH_WANT_SYS_SIGPENDING |
| 409 | #define __ARCH_WANT_SYS_SIGPROCMASK | 411 | #define __ARCH_WANT_SYS_SIGPROCMASK |
| 410 | #define __ARCH_WANT_SYS_RT_SIGACTION | 412 | #define __ARCH_WANT_SYS_RT_SIGACTION |
| 411 | /* #define __ARCH_WANT_SYS_RT_SIGSUSPEND */ | 413 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
| 412 | 414 | ||
| 413 | /* | 415 | /* |
| 414 | * "Conditional" syscalls | 416 | * "Conditional" syscalls |
diff --git a/arch/microblaze/include/asm/vga.h b/arch/microblaze/include/asm/vga.h index 8b137891791f..89d82fd8fcf1 100644 --- a/arch/microblaze/include/asm/vga.h +++ b/arch/microblaze/include/asm/vga.h | |||
| @@ -1 +1 @@ | |||
| #include <asm-generic/vga.h> | |||
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S index 1fce6b803f54..9083d85376a4 100644 --- a/arch/microblaze/kernel/entry-nommu.S +++ b/arch/microblaze/kernel/entry-nommu.S | |||
| @@ -551,30 +551,22 @@ no_work_pending: | |||
| 551 | rtid r14, 0 | 551 | rtid r14, 0 |
| 552 | nop | 552 | nop |
| 553 | 553 | ||
| 554 | sys_vfork_wrapper: | 554 | sys_vfork: |
| 555 | brid sys_vfork | 555 | brid microblaze_vfork |
| 556 | addk r5, r1, r0 | 556 | addk r5, r1, r0 |
| 557 | 557 | ||
| 558 | sys_clone_wrapper: | 558 | sys_clone: |
| 559 | brid sys_clone | 559 | brid microblaze_clone |
| 560 | addk r7, r1, r0 | 560 | addk r7, r1, r0 |
| 561 | 561 | ||
| 562 | sys_execve_wrapper: | 562 | sys_execve: |
| 563 | brid sys_execve | 563 | brid microblaze_execve |
| 564 | addk r8, r1, r0 | 564 | addk r8, r1, r0 |
| 565 | 565 | ||
| 566 | sys_sigreturn_wrapper: | ||
| 567 | brid sys_sigreturn | ||
| 568 | addk r5, r1, r0 | ||
| 569 | |||
| 570 | sys_rt_sigreturn_wrapper: | 566 | sys_rt_sigreturn_wrapper: |
| 571 | brid sys_rt_sigreturn | 567 | brid sys_rt_sigreturn |
| 572 | addk r5, r1, r0 | 568 | addk r5, r1, r0 |
| 573 | 569 | ||
| 574 | sys_sigsuspend_wrapper: | ||
| 575 | brid sys_rt_sigsuspend | ||
| 576 | addk r6, r1, r0 | ||
| 577 | |||
| 578 | sys_rt_sigsuspend_wrapper: | 570 | sys_rt_sigsuspend_wrapper: |
| 579 | brid sys_rt_sigsuspend | 571 | brid sys_rt_sigsuspend |
| 580 | addk r7, r1, r0 | 572 | addk r7, r1, r0 |
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index 91a0e7b185dd..c7353e79f4a2 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S | |||
| @@ -429,12 +429,11 @@ C_ENTRY(ret_from_fork): | |||
| 429 | brid ret_from_trap; /* Do normal trap return */ | 429 | brid ret_from_trap; /* Do normal trap return */ |
| 430 | nop; | 430 | nop; |
| 431 | 431 | ||
| 432 | C_ENTRY(sys_vfork_wrapper): | 432 | C_ENTRY(sys_vfork): |
| 433 | brid microblaze_vfork /* Do real work (tail-call) */ | ||
| 433 | la r5, r1, PTO | 434 | la r5, r1, PTO |
| 434 | brid sys_vfork /* Do real work (tail-call) */ | ||
| 435 | nop | ||
| 436 | 435 | ||
| 437 | C_ENTRY(sys_clone_wrapper): | 436 | C_ENTRY(sys_clone): |
| 438 | bnei r6, 1f; /* See if child SP arg (arg 1) is 0. */ | 437 | bnei r6, 1f; /* See if child SP arg (arg 1) is 0. */ |
| 439 | lwi r6, r1, PTO+PT_R1; /* If so, use paret's stack ptr */ | 438 | lwi r6, r1, PTO+PT_R1; /* If so, use paret's stack ptr */ |
| 440 | 1: la r7, r1, PTO; /* Arg 2: parent context */ | 439 | 1: la r7, r1, PTO; /* Arg 2: parent context */ |
| @@ -444,20 +443,9 @@ C_ENTRY(sys_clone_wrapper): | |||
| 444 | brid do_fork /* Do real work (tail-call) */ | 443 | brid do_fork /* Do real work (tail-call) */ |
| 445 | nop; | 444 | nop; |
| 446 | 445 | ||
| 447 | C_ENTRY(sys_execve_wrapper): | 446 | C_ENTRY(sys_execve): |
| 448 | la r8, r1, PTO; /* add user context as 4th arg */ | 447 | la r8, r1, PTO; /* add user context as 4th arg */ |
| 449 | brid sys_execve; /* Do real work (tail-call).*/ | 448 | brid microblaze_execve; /* Do real work (tail-call).*/ |
| 450 | nop; | ||
| 451 | |||
| 452 | C_ENTRY(sys_sigsuspend_wrapper): | ||
| 453 | swi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */ | ||
| 454 | swi r4, r1, PTO+PT_R4; | ||
| 455 | la r6, r1, PTO; /* add user context as 2nd arg */ | ||
| 456 | bralid r15, sys_sigsuspend; /* Do real work.*/ | ||
| 457 | nop; | ||
| 458 | lwi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */ | ||
| 459 | lwi r4, r1, PTO+PT_R4; | ||
| 460 | bri ret_from_trap /* fall through will not work here due to align */ | ||
| 461 | nop; | 449 | nop; |
| 462 | 450 | ||
| 463 | C_ENTRY(sys_rt_sigsuspend_wrapper): | 451 | C_ENTRY(sys_rt_sigsuspend_wrapper): |
| @@ -471,18 +459,6 @@ C_ENTRY(sys_rt_sigsuspend_wrapper): | |||
| 471 | bri ret_from_trap /* fall through will not work here due to align */ | 459 | bri ret_from_trap /* fall through will not work here due to align */ |
| 472 | nop; | 460 | nop; |
| 473 | 461 | ||
| 474 | |||
| 475 | C_ENTRY(sys_sigreturn_wrapper): | ||
| 476 | swi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */ | ||
| 477 | swi r4, r1, PTO+PT_R4; | ||
| 478 | la r5, r1, PTO; /* add user context as 1st arg */ | ||
| 479 | brlid r15, sys_sigreturn; /* Do real work.*/ | ||
| 480 | nop; | ||
| 481 | lwi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */ | ||
| 482 | lwi r4, r1, PTO+PT_R4; | ||
| 483 | bri ret_from_trap /* fall through will not work here due to align */ | ||
| 484 | nop; | ||
| 485 | |||
| 486 | C_ENTRY(sys_rt_sigreturn_wrapper): | 462 | C_ENTRY(sys_rt_sigreturn_wrapper): |
| 487 | swi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */ | 463 | swi r3, r1, PTO+PT_R3; /* restore saved r3, r4 registers */ |
| 488 | swi r4, r1, PTO+PT_R4; | 464 | swi r4, r1, PTO+PT_R4; |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 4c0e6521b114..493819c25fba 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
| @@ -45,91 +45,8 @@ | |||
| 45 | 45 | ||
| 46 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_sycall); | 46 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_sycall); |
| 47 | 47 | ||
| 48 | /* | ||
| 49 | * Atomically swap in the new signal mask, and wait for a signal. | ||
| 50 | */ | ||
| 51 | asmlinkage int | ||
| 52 | sys_sigsuspend(old_sigset_t mask, struct pt_regs *regs) | ||
| 53 | { | ||
| 54 | sigset_t saveset; | ||
| 55 | |||
| 56 | mask &= _BLOCKABLE; | ||
| 57 | spin_lock_irq(¤t->sighand->siglock); | ||
| 58 | saveset = current->blocked; | ||
| 59 | siginitset(¤t->blocked, mask); | ||
| 60 | recalc_sigpending(); | ||
| 61 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 62 | |||
| 63 | regs->r3 = -EINTR; | ||
| 64 | while (1) { | ||
| 65 | current->state = TASK_INTERRUPTIBLE; | ||
| 66 | schedule(); | ||
| 67 | if (do_signal(regs, &saveset, 1)) | ||
| 68 | return -EINTR; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | asmlinkage int | ||
| 73 | sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, | ||
| 74 | struct pt_regs *regs) | ||
| 75 | { | ||
| 76 | sigset_t saveset, newset; | ||
| 77 | |||
| 78 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
| 79 | if (sigsetsize != sizeof(sigset_t)) | ||
| 80 | return -EINVAL; | ||
| 81 | |||
| 82 | if (copy_from_user(&newset, unewset, sizeof(newset))) | ||
| 83 | return -EFAULT; | ||
| 84 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
| 85 | spin_lock_irq(¤t->sighand->siglock); | ||
| 86 | saveset = current->blocked; | ||
| 87 | current->blocked = newset; | ||
| 88 | recalc_sigpending(); | ||
| 89 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 90 | |||
| 91 | regs->r3 = -EINTR; | ||
| 92 | while (1) { | ||
| 93 | current->state = TASK_INTERRUPTIBLE; | ||
| 94 | schedule(); | ||
| 95 | if (do_signal(regs, &saveset, 1)) | ||
| 96 | return -EINTR; | ||
| 97 | } | ||
| 98 | } | ||
| 99 | |||
| 100 | asmlinkage int | ||
| 101 | sys_sigaction(int sig, const struct old_sigaction *act, | ||
| 102 | struct old_sigaction *oact) | ||
| 103 | { | ||
| 104 | struct k_sigaction new_ka, old_ka; | ||
| 105 | int ret; | ||
| 106 | |||
| 107 | if (act) { | ||
| 108 | old_sigset_t mask; | ||
| 109 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | ||
| 110 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || | ||
| 111 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) | ||
| 112 | return -EFAULT; | ||
| 113 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
| 114 | __get_user(mask, &act->sa_mask); | ||
| 115 | siginitset(&new_ka.sa.sa_mask, mask); | ||
| 116 | } | ||
| 117 | 48 | ||
| 118 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); | 49 | asmlinkage long |
| 119 | |||
| 120 | if (!ret && oact) { | ||
| 121 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | ||
| 122 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || | ||
| 123 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) | ||
| 124 | return -EFAULT; | ||
| 125 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
| 126 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
| 127 | } | ||
| 128 | |||
| 129 | return ret; | ||
| 130 | } | ||
| 131 | |||
| 132 | asmlinkage int | ||
| 133 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | 50 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, |
| 134 | struct pt_regs *regs) | 51 | struct pt_regs *regs) |
| 135 | { | 52 | { |
| @@ -139,7 +56,6 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | |||
| 139 | /* | 56 | /* |
| 140 | * Do a signal return; undo the signal stack. | 57 | * Do a signal return; undo the signal stack. |
| 141 | */ | 58 | */ |
| 142 | |||
| 143 | struct sigframe { | 59 | struct sigframe { |
| 144 | struct sigcontext sc; | 60 | struct sigcontext sc; |
| 145 | unsigned long extramask[_NSIG_WORDS-1]; | 61 | unsigned long extramask[_NSIG_WORDS-1]; |
| @@ -176,40 +92,7 @@ static int restore_sigcontext(struct pt_regs *regs, | |||
| 176 | return err; | 92 | return err; |
| 177 | } | 93 | } |
| 178 | 94 | ||
| 179 | asmlinkage int sys_sigreturn(struct pt_regs *regs) | 95 | asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) |
| 180 | { | ||
| 181 | struct sigframe *frame = | ||
| 182 | (struct sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE); | ||
| 183 | |||
| 184 | sigset_t set; | ||
| 185 | int rval; | ||
| 186 | |||
| 187 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | ||
| 188 | goto badframe; | ||
| 189 | |||
| 190 | if (__get_user(set.sig[0], &frame->sc.oldmask) | ||
| 191 | || (_NSIG_WORDS > 1 | ||
| 192 | && __copy_from_user(&set.sig[1], &frame->extramask, | ||
| 193 | sizeof(frame->extramask)))) | ||
| 194 | goto badframe; | ||
| 195 | |||
| 196 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
| 197 | |||
| 198 | spin_lock_irq(¤t->sighand->siglock); | ||
| 199 | current->blocked = set; | ||
| 200 | recalc_sigpending(); | ||
| 201 | spin_unlock_irq(¤t->sighand->siglock); | ||
| 202 | |||
| 203 | if (restore_sigcontext(regs, &frame->sc, &rval)) | ||
| 204 | goto badframe; | ||
| 205 | return rval; | ||
| 206 | |||
| 207 | badframe: | ||
| 208 | force_sig(SIGSEGV, current); | ||
| 209 | return 0; | ||
| 210 | } | ||
| 211 | |||
| 212 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | ||
| 213 | { | 96 | { |
| 214 | struct rt_sigframe __user *frame = | 97 | struct rt_sigframe __user *frame = |
| 215 | (struct rt_sigframe __user *)(regs->r1 + STATE_SAVE_ARG_SPACE); | 98 | (struct rt_sigframe __user *)(regs->r1 + STATE_SAVE_ARG_SPACE); |
| @@ -324,21 +207,17 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
| 324 | /* Set up to return from userspace. If provided, use a stub | 207 | /* Set up to return from userspace. If provided, use a stub |
| 325 | already in userspace. */ | 208 | already in userspace. */ |
| 326 | /* minus 8 is offset to cater for "rtsd r15,8" */ | 209 | /* minus 8 is offset to cater for "rtsd r15,8" */ |
| 327 | if (ka->sa.sa_flags & SA_RESTORER) { | 210 | /* addi r12, r0, __NR_sigreturn */ |
| 328 | regs->r15 = ((unsigned long)ka->sa.sa_restorer)-8; | 211 | err |= __put_user(0x31800000 | __NR_rt_sigreturn , |
| 329 | } else { | 212 | frame->tramp + 0); |
| 330 | /* addi r12, r0, __NR_sigreturn */ | 213 | /* brki r14, 0x8 */ |
| 331 | err |= __put_user(0x31800000 | __NR_rt_sigreturn , | 214 | err |= __put_user(0xb9cc0008, frame->tramp + 1); |
| 332 | frame->tramp + 0); | 215 | |
| 333 | /* brki r14, 0x8 */ | 216 | /* Return from sighandler will jump to the tramp. |
| 334 | err |= __put_user(0xb9cc0008, frame->tramp + 1); | 217 | Negative 8 offset because return is rtsd r15, 8 */ |
| 335 | 218 | regs->r15 = ((unsigned long)frame->tramp)-8; | |
| 336 | /* Return from sighandler will jump to the tramp. | 219 | |
| 337 | Negative 8 offset because return is rtsd r15, 8 */ | 220 | __invalidate_cache_sigtramp((unsigned long)frame->tramp); |
| 338 | regs->r15 = ((unsigned long)frame->tramp)-8; | ||
| 339 | |||
| 340 | __invalidate_cache_sigtramp((unsigned long)frame->tramp); | ||
| 341 | } | ||
| 342 | 221 | ||
| 343 | if (err) | 222 | if (err) |
| 344 | goto give_sigsegv; | 223 | goto give_sigsegv; |
| @@ -405,7 +284,7 @@ do_restart: | |||
| 405 | * OK, we're invoking a handler | 284 | * OK, we're invoking a handler |
| 406 | */ | 285 | */ |
| 407 | 286 | ||
| 408 | static void | 287 | static int |
| 409 | handle_signal(unsigned long sig, struct k_sigaction *ka, | 288 | handle_signal(unsigned long sig, struct k_sigaction *ka, |
| 410 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) | 289 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) |
| 411 | { | 290 | { |
| @@ -426,6 +305,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
| 426 | recalc_sigpending(); | 305 | recalc_sigpending(); |
| 427 | spin_unlock_irq(¤t->sighand->siglock); | 306 | spin_unlock_irq(¤t->sighand->siglock); |
| 428 | } | 307 | } |
| 308 | return 1; | ||
| 429 | } | 309 | } |
| 430 | 310 | ||
| 431 | /* | 311 | /* |
| @@ -456,7 +336,9 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_syscall) | |||
| 456 | if (kernel_mode(regs)) | 336 | if (kernel_mode(regs)) |
| 457 | return 1; | 337 | return 1; |
| 458 | 338 | ||
| 459 | if (!oldset) | 339 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) |
| 340 | oldset = ¤t->saved_sigmask; | ||
| 341 | else | ||
| 460 | oldset = ¤t->blocked; | 342 | oldset = ¤t->blocked; |
| 461 | 343 | ||
| 462 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 344 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
| @@ -464,13 +346,31 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int in_syscall) | |||
| 464 | /* Whee! Actually deliver the signal. */ | 346 | /* Whee! Actually deliver the signal. */ |
| 465 | if (in_syscall) | 347 | if (in_syscall) |
| 466 | handle_restart(regs, &ka, 1); | 348 | handle_restart(regs, &ka, 1); |
| 467 | handle_signal(signr, &ka, &info, oldset, regs); | 349 | if (handle_signal(signr, &ka, &info, oldset, regs)) { |
| 350 | /* | ||
| 351 | * A signal was successfully delivered; the saved | ||
| 352 | * sigmask will have been stored in the signal frame, | ||
| 353 | * and will be restored by sigreturn, so we can simply | ||
| 354 | * clear the TS_RESTORE_SIGMASK flag. | ||
| 355 | */ | ||
| 356 | current_thread_info()->status &= | ||
| 357 | ~TS_RESTORE_SIGMASK; | ||
| 358 | } | ||
| 468 | return 1; | 359 | return 1; |
| 469 | } | 360 | } |
| 470 | 361 | ||
| 471 | if (in_syscall) | 362 | if (in_syscall) |
| 472 | handle_restart(regs, NULL, 0); | 363 | handle_restart(regs, NULL, 0); |
| 473 | 364 | ||
| 365 | /* | ||
| 366 | * If there's no signal to deliver, we just put the saved sigmask | ||
| 367 | * back. | ||
| 368 | */ | ||
| 369 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) { | ||
| 370 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; | ||
| 371 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
| 372 | } | ||
| 373 | |||
| 474 | /* Did we come from a system call? */ | 374 | /* Did we come from a system call? */ |
| 475 | return 0; | 375 | return 0; |
| 476 | } | 376 | } |
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index 31905ff590b7..8c9ebac5da10 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | * | 39 | * |
| 40 | * This is really horribly ugly. This will be remove with new toolchain. | 40 | * This is really horribly ugly. This will be remove with new toolchain. |
| 41 | */ | 41 | */ |
| 42 | asmlinkage int | 42 | asmlinkage long |
| 43 | sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth) | 43 | sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth) |
| 44 | { | 44 | { |
| 45 | int version, ret; | 45 | int version, ret; |
| @@ -134,20 +134,20 @@ sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth) | |||
| 134 | return ret; | 134 | return ret; |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | asmlinkage int sys_vfork(struct pt_regs *regs) | 137 | asmlinkage long microblaze_vfork(struct pt_regs *regs) |
| 138 | { | 138 | { |
| 139 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->r1, | 139 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->r1, |
| 140 | regs, 0, NULL, NULL); | 140 | regs, 0, NULL, NULL); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | asmlinkage int sys_clone(int flags, unsigned long stack, struct pt_regs *regs) | 143 | asmlinkage long microblaze_clone(int flags, unsigned long stack, struct pt_regs *regs) |
| 144 | { | 144 | { |
| 145 | if (!stack) | 145 | if (!stack) |
| 146 | stack = regs->r1; | 146 | stack = regs->r1; |
| 147 | return do_fork(flags, stack, regs, 0, NULL, NULL); | 147 | return do_fork(flags, stack, regs, 0, NULL, NULL); |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | asmlinkage int sys_execve(char __user *filenamei, char __user *__user *argv, | 150 | asmlinkage long microblaze_execve(char __user *filenamei, char __user *__user *argv, |
| 151 | char __user *__user *envp, struct pt_regs *regs) | 151 | char __user *__user *envp, struct pt_regs *regs) |
| 152 | { | 152 | { |
| 153 | int error; | 153 | int error; |
| @@ -163,8 +163,8 @@ out: | |||
| 163 | return error; | 163 | return error; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | asmlinkage unsigned long | 166 | asmlinkage long |
| 167 | sys_mmap2(unsigned long addr, size_t len, | 167 | sys_mmap2(unsigned long addr, unsigned long len, |
| 168 | unsigned long prot, unsigned long flags, | 168 | unsigned long prot, unsigned long flags, |
| 169 | unsigned long fd, unsigned long pgoff) | 169 | unsigned long fd, unsigned long pgoff) |
| 170 | { | 170 | { |
| @@ -189,18 +189,18 @@ out: | |||
| 189 | return ret; | 189 | return ret; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, | 192 | asmlinkage long sys_mmap(unsigned long addr, unsigned long len, |
| 193 | unsigned long prot, unsigned long flags, | 193 | unsigned long prot, unsigned long flags, |
| 194 | unsigned long fd, off_t offset) | 194 | unsigned long fd, off_t pgoff) |
| 195 | { | 195 | { |
| 196 | int err = -EINVAL; | 196 | int err = -EINVAL; |
| 197 | 197 | ||
| 198 | if (offset & ~PAGE_MASK) { | 198 | if (pgoff & ~PAGE_MASK) { |
| 199 | printk(KERN_INFO "no pagemask in mmap\r\n"); | 199 | printk(KERN_INFO "no pagemask in mmap\r\n"); |
| 200 | goto out; | 200 | goto out; |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); | 203 | err = sys_mmap2(addr, len, prot, flags, fd, pgoff >> PAGE_SHIFT); |
| 204 | out: | 204 | out: |
| 205 | return err; | 205 | return err; |
| 206 | } | 206 | } |
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index 376d1789f7c0..31b32a6c5f4e 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S | |||
| @@ -15,7 +15,7 @@ ENTRY(sys_call_table) | |||
| 15 | .long sys_creat | 15 | .long sys_creat |
| 16 | .long sys_link | 16 | .long sys_link |
| 17 | .long sys_unlink /* 10 */ | 17 | .long sys_unlink /* 10 */ |
| 18 | .long sys_execve_wrapper | 18 | .long sys_execve |
| 19 | .long sys_chdir | 19 | .long sys_chdir |
| 20 | .long sys_time | 20 | .long sys_time |
| 21 | .long sys_mknod | 21 | .long sys_mknod |
| @@ -71,12 +71,12 @@ ENTRY(sys_call_table) | |||
| 71 | .long sys_getppid | 71 | .long sys_getppid |
| 72 | .long sys_getpgrp /* 65 */ | 72 | .long sys_getpgrp /* 65 */ |
| 73 | .long sys_setsid | 73 | .long sys_setsid |
| 74 | .long sys_sigaction | 74 | .long sys_ni_syscall /* sys_sigaction */ |
| 75 | .long sys_sgetmask | 75 | .long sys_sgetmask |
| 76 | .long sys_ssetmask | 76 | .long sys_ssetmask |
| 77 | .long sys_setreuid /* 70 */ | 77 | .long sys_setreuid /* 70 */ |
| 78 | .long sys_setregid | 78 | .long sys_setregid |
| 79 | .long sys_sigsuspend_wrapper | 79 | .long sys_ni_syscall /* sys_sigsuspend_wrapper */ |
| 80 | .long sys_sigpending | 80 | .long sys_sigpending |
| 81 | .long sys_sethostname | 81 | .long sys_sethostname |
| 82 | .long sys_setrlimit /* 75 */ | 82 | .long sys_setrlimit /* 75 */ |
| @@ -123,8 +123,8 @@ ENTRY(sys_call_table) | |||
| 123 | .long sys_sysinfo | 123 | .long sys_sysinfo |
| 124 | .long sys_ipc | 124 | .long sys_ipc |
| 125 | .long sys_fsync | 125 | .long sys_fsync |
| 126 | .long sys_sigreturn_wrapper | 126 | .long sys_ni_syscall /* sys_sigreturn_wrapper */ |
| 127 | .long sys_clone_wrapper /* 120 */ | 127 | .long sys_clone /* 120 */ |
| 128 | .long sys_setdomainname | 128 | .long sys_setdomainname |
| 129 | .long sys_newuname | 129 | .long sys_newuname |
| 130 | .long sys_ni_syscall /* modify_ldt */ | 130 | .long sys_ni_syscall /* modify_ldt */ |
| @@ -194,7 +194,7 @@ ENTRY(sys_call_table) | |||
| 194 | .long sys_sendfile | 194 | .long sys_sendfile |
| 195 | .long sys_ni_syscall /* reserved for streams1 */ | 195 | .long sys_ni_syscall /* reserved for streams1 */ |
| 196 | .long sys_ni_syscall /* reserved for streams2 */ | 196 | .long sys_ni_syscall /* reserved for streams2 */ |
| 197 | .long sys_vfork_wrapper /* 190 */ | 197 | .long sys_vfork /* 190 */ |
| 198 | .long sys_getrlimit | 198 | .long sys_getrlimit |
| 199 | .long sys_mmap2 /* mmap2 */ | 199 | .long sys_mmap2 /* mmap2 */ |
| 200 | .long sys_truncate64 | 200 | .long sys_truncate64 |
| @@ -369,3 +369,5 @@ ENTRY(sys_call_table) | |||
| 369 | .long sys_ni_syscall | 369 | .long sys_ni_syscall |
| 370 | .long sys_ni_syscall | 370 | .long sys_ni_syscall |
| 371 | .long sys_ni_syscall | 371 | .long sys_ni_syscall |
| 372 | .long sys_rt_tgsigqueueinfo /* 365 */ | ||
| 373 | .long sys_perf_counter_open | ||
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index 71c8cb6c9e43..b579db068c06 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Makefile | 2 | # Makefile |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | lib-y := memset.o checksum.o | 5 | lib-y := memset.o |
| 6 | 6 | ||
| 7 | ifeq ($(CONFIG_OPT_LIB_ASM),y) | 7 | ifeq ($(CONFIG_OPT_LIB_ASM),y) |
| 8 | lib-y += fastcopy.o | 8 | lib-y += fastcopy.o |
diff --git a/arch/microblaze/lib/checksum.c b/arch/microblaze/lib/checksum.c deleted file mode 100644 index f08e74591418..000000000000 --- a/arch/microblaze/lib/checksum.c +++ /dev/null | |||
| @@ -1,172 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * INET An implementation of the TCP/IP protocol suite for the LINUX | ||
| 4 | * operating system. INET is implemented using the BSD Socket | ||
| 5 | * interface as the means of communication with the user level. | ||
| 6 | * | ||
| 7 | * IP/TCP/UDP checksumming routines | ||
| 8 | * | ||
| 9 | * Authors: Jorge Cwik, <jorge@laser.satlink.net> | ||
| 10 | * Arnt Gulbrandsen, <agulbra@nvg.unit.no> | ||
| 11 | * Tom May, <ftom@netcom.com> | ||
| 12 | * Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de> | ||
| 13 | * Lots of code moved from tcp.c and ip.c; see those files | ||
| 14 | * for more names. | ||
| 15 | * | ||
| 16 | * 03/02/96 Jes Sorensen, Andreas Schwab, Roman Hodek: | ||
| 17 | * Fixed some nasty bugs, causing some horrible crashes. | ||
| 18 | * A: At some points, the sum (%0) was used as | ||
| 19 | * length-counter instead of the length counter | ||
| 20 | * (%1). Thanks to Roman Hodek for pointing this out. | ||
| 21 | * B: GCC seems to mess up if one uses too many | ||
| 22 | * data-registers to hold input values and one tries to | ||
| 23 | * specify d0 and d1 as scratch registers. Letting gcc | ||
| 24 | * choose these registers itself solves the problem. | ||
| 25 | * | ||
| 26 | * This program is free software; you can redistribute it and/or | ||
| 27 | * modify it under the terms of the GNU General Public License | ||
| 28 | * as published by the Free Software Foundation; either version | ||
| 29 | * 2 of the License, or (at your option) any later version. | ||
| 30 | */ | ||
| 31 | |||
| 32 | /* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access | ||
| 33 | kills, so most of the assembly has to go. */ | ||
| 34 | |||
| 35 | #include <linux/module.h> | ||
| 36 | #include <net/checksum.h> | ||
| 37 | |||
| 38 | #include <asm/byteorder.h> | ||
| 39 | |||
| 40 | static inline unsigned short from32to16(unsigned long x) | ||
| 41 | { | ||
| 42 | /* add up 16-bit and 16-bit for 16+c bit */ | ||
| 43 | x = (x & 0xffff) + (x >> 16); | ||
| 44 | /* add up carry.. */ | ||
| 45 | x = (x & 0xffff) + (x >> 16); | ||
| 46 | return x; | ||
| 47 | } | ||
| 48 | |||
| 49 | static unsigned int do_csum(const unsigned char *buff, int len) | ||
| 50 | { | ||
| 51 | int odd, count; | ||
| 52 | unsigned long result = 0; | ||
| 53 | |||
| 54 | if (len <= 0) | ||
| 55 | goto out; | ||
| 56 | odd = 1 & (unsigned long) buff; | ||
| 57 | if (odd) { | ||
| 58 | result = *buff; | ||
| 59 | len--; | ||
| 60 | buff++; | ||
| 61 | } | ||
| 62 | count = len >> 1; /* nr of 16-bit words.. */ | ||
| 63 | if (count) { | ||
| 64 | if (2 & (unsigned long) buff) { | ||
| 65 | result += *(unsigned short *) buff; | ||
| 66 | count--; | ||
| 67 | len -= 2; | ||
| 68 | buff += 2; | ||
| 69 | } | ||
| 70 | count >>= 1; /* nr of 32-bit words.. */ | ||
| 71 | if (count) { | ||
| 72 | unsigned long carry = 0; | ||
| 73 | do { | ||
| 74 | unsigned long w = *(unsigned long *) buff; | ||
| 75 | count--; | ||
| 76 | buff += 4; | ||
| 77 | result += carry; | ||
| 78 | result += w; | ||
| 79 | carry = (w > result); | ||
| 80 | } while (count); | ||
| 81 | result += carry; | ||
| 82 | result = (result & 0xffff) + (result >> 16); | ||
| 83 | } | ||
| 84 | if (len & 2) { | ||
| 85 | result += *(unsigned short *) buff; | ||
| 86 | buff += 2; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | if (len & 1) | ||
| 90 | result += (*buff << 8); | ||
| 91 | result = from32to16(result); | ||
| 92 | if (odd) | ||
| 93 | result = ((result >> 8) & 0xff) | ((result & 0xff) << 8); | ||
| 94 | out: | ||
| 95 | return result; | ||
| 96 | } | ||
| 97 | |||
| 98 | /* | ||
| 99 | * This is a version of ip_compute_csum() optimized for IP headers, | ||
| 100 | * which always checksum on 4 octet boundaries. | ||
| 101 | */ | ||
| 102 | __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | ||
| 103 | { | ||
| 104 | return (__force __sum16)~do_csum(iph, ihl*4); | ||
| 105 | } | ||
| 106 | EXPORT_SYMBOL(ip_fast_csum); | ||
| 107 | |||
| 108 | /* | ||
| 109 | * computes the checksum of a memory block at buff, length len, | ||
| 110 | * and adds in "sum" (32-bit) | ||
| 111 | * | ||
| 112 | * returns a 32-bit number suitable for feeding into itself | ||
| 113 | * or csum_tcpudp_magic | ||
| 114 | * | ||
| 115 | * this function must be called with even lengths, except | ||
| 116 | * for the last fragment, which may be odd | ||
| 117 | * | ||
| 118 | * it's best to have buff aligned on a 32-bit boundary | ||
| 119 | */ | ||
| 120 | __wsum csum_partial(const void *buff, int len, __wsum wsum) | ||
| 121 | { | ||
| 122 | unsigned int sum = (__force unsigned int)wsum; | ||
| 123 | unsigned int result = do_csum(buff, len); | ||
| 124 | |||
| 125 | /* add in old sum, and carry.. */ | ||
| 126 | result += sum; | ||
| 127 | if (sum > result) | ||
| 128 | result += 1; | ||
| 129 | return (__force __wsum)result; | ||
| 130 | } | ||
| 131 | EXPORT_SYMBOL(csum_partial); | ||
| 132 | |||
| 133 | /* | ||
| 134 | * this routine is used for miscellaneous IP-like checksums, mainly | ||
| 135 | * in icmp.c | ||
| 136 | */ | ||
| 137 | __sum16 ip_compute_csum(const void *buff, int len) | ||
| 138 | { | ||
| 139 | return (__force __sum16)~do_csum(buff, len); | ||
| 140 | } | ||
| 141 | EXPORT_SYMBOL(ip_compute_csum); | ||
| 142 | |||
| 143 | /* | ||
| 144 | * copy from fs while checksumming, otherwise like csum_partial | ||
| 145 | */ | ||
| 146 | __wsum | ||
| 147 | csum_partial_copy_from_user(const void __user *src, void *dst, int len, | ||
| 148 | __wsum sum, int *csum_err) | ||
| 149 | { | ||
| 150 | int missing; | ||
| 151 | |||
| 152 | missing = __copy_from_user(dst, src, len); | ||
| 153 | if (missing) { | ||
| 154 | memset(dst + len - missing, 0, missing); | ||
| 155 | *csum_err = -EFAULT; | ||
| 156 | } else | ||
| 157 | *csum_err = 0; | ||
| 158 | |||
| 159 | return csum_partial(dst, len, sum); | ||
| 160 | } | ||
| 161 | EXPORT_SYMBOL(csum_partial_copy_from_user); | ||
| 162 | |||
| 163 | /* | ||
| 164 | * copy from ds while checksumming, otherwise like csum_partial | ||
| 165 | */ | ||
| 166 | __wsum | ||
| 167 | csum_partial_copy(const void *src, void *dst, int len, __wsum sum) | ||
| 168 | { | ||
| 169 | memcpy(dst, src, len); | ||
| 170 | return csum_partial(dst, len, sum); | ||
| 171 | } | ||
| 172 | EXPORT_SYMBOL(csum_partial_copy); | ||
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index b5a701cd71e0..8d92c4efe9a4 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
| @@ -80,15 +80,15 @@ void __init setup_memory(void) | |||
| 80 | memory_size = memory_end - memory_start; | 80 | memory_size = memory_end - memory_start; |
| 81 | PAGE_OFFSET = memory_start; | 81 | PAGE_OFFSET = memory_start; |
| 82 | printk(KERN_INFO "%s: Main mem: 0x%x-0x%x, " | 82 | printk(KERN_INFO "%s: Main mem: 0x%x-0x%x, " |
| 83 | "size 0x%08x\n", __func__, memory_start, | 83 | "size 0x%08x\n", __func__, (u32) memory_start, |
| 84 | memory_end, memory_size); | 84 | (u32) memory_end, (u32) memory_size); |
| 85 | break; | 85 | break; |
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | if (!memory_start || !memory_end) { | 89 | if (!memory_start || !memory_end) { |
| 90 | panic("%s: Missing memory setting 0x%08x-0x%08x\n", | 90 | panic("%s: Missing memory setting 0x%08x-0x%08x\n", |
| 91 | __func__, memory_start, memory_end); | 91 | __func__, (u32) memory_start, (u32) memory_end); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | /* reservation of region where is the kernel */ | 94 | /* reservation of region where is the kernel */ |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 8c4be1f301cf..3ca0fe1a9123 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -22,6 +22,26 @@ choice | |||
| 22 | config MACH_ALCHEMY | 22 | config MACH_ALCHEMY |
| 23 | bool "Alchemy processor based machines" | 23 | bool "Alchemy processor based machines" |
| 24 | 24 | ||
| 25 | config AR7 | ||
| 26 | bool "Texas Instruments AR7" | ||
| 27 | select BOOT_ELF32 | ||
| 28 | select DMA_NONCOHERENT | ||
| 29 | select CEVT_R4K | ||
| 30 | select CSRC_R4K | ||
| 31 | select IRQ_CPU | ||
| 32 | select NO_EXCEPT_FILL | ||
| 33 | select SWAP_IO_SPACE | ||
| 34 | select SYS_HAS_CPU_MIPS32_R1 | ||
| 35 | select SYS_HAS_EARLY_PRINTK | ||
| 36 | select SYS_SUPPORTS_32BIT_KERNEL | ||
| 37 | select SYS_SUPPORTS_LITTLE_ENDIAN | ||
| 38 | select GENERIC_GPIO | ||
| 39 | select GCD | ||
| 40 | select VLYNQ | ||
| 41 | help | ||
| 42 | Support for the Texas Instruments AR7 System-on-a-Chip | ||
| 43 | family: TNETD7100, 7200 and 7300. | ||
| 44 | |||
| 25 | config BASLER_EXCITE | 45 | config BASLER_EXCITE |
| 26 | bool "Basler eXcite smart camera" | 46 | bool "Basler eXcite smart camera" |
| 27 | select CEVT_R4K | 47 | select CEVT_R4K |
| @@ -209,7 +229,7 @@ config MIPS_MALTA | |||
| 209 | select SYS_SUPPORTS_64BIT_KERNEL | 229 | select SYS_SUPPORTS_64BIT_KERNEL |
| 210 | select SYS_SUPPORTS_BIG_ENDIAN | 230 | select SYS_SUPPORTS_BIG_ENDIAN |
| 211 | select SYS_SUPPORTS_LITTLE_ENDIAN | 231 | select SYS_SUPPORTS_LITTLE_ENDIAN |
| 212 | select SYS_SUPPORTS_MIPS_CMP if BROKEN # because SYNC_R4K is broken | 232 | select SYS_SUPPORTS_MIPS_CMP |
| 213 | select SYS_SUPPORTS_MULTITHREADING | 233 | select SYS_SUPPORTS_MULTITHREADING |
| 214 | select SYS_SUPPORTS_SMARTMIPS | 234 | select SYS_SUPPORTS_SMARTMIPS |
| 215 | help | 235 | help |
| @@ -247,6 +267,7 @@ config MACH_VR41XX | |||
| 247 | select CEVT_R4K | 267 | select CEVT_R4K |
| 248 | select CSRC_R4K | 268 | select CSRC_R4K |
| 249 | select SYS_HAS_CPU_VR41XX | 269 | select SYS_HAS_CPU_VR41XX |
| 270 | select ARCH_REQUIRE_GPIOLIB | ||
| 250 | 271 | ||
| 251 | config NXP_STB220 | 272 | config NXP_STB220 |
| 252 | bool "NXP STB220 board" | 273 | bool "NXP STB220 board" |
| @@ -1635,7 +1656,7 @@ config MIPS_APSP_KSPD | |||
| 1635 | config MIPS_CMP | 1656 | config MIPS_CMP |
| 1636 | bool "MIPS CMP framework support" | 1657 | bool "MIPS CMP framework support" |
| 1637 | depends on SYS_SUPPORTS_MIPS_CMP | 1658 | depends on SYS_SUPPORTS_MIPS_CMP |
| 1638 | select SYNC_R4K if BROKEN | 1659 | select SYNC_R4K |
| 1639 | select SYS_SUPPORTS_SMP | 1660 | select SYS_SUPPORTS_SMP |
| 1640 | select SYS_SUPPORTS_SCHED_SMT if SMP | 1661 | select SYS_SUPPORTS_SCHED_SMT if SMP |
| 1641 | select WEAK_ORDERING | 1662 | select WEAK_ORDERING |
| @@ -2147,11 +2168,11 @@ menu "Power management options" | |||
| 2147 | 2168 | ||
| 2148 | config ARCH_HIBERNATION_POSSIBLE | 2169 | config ARCH_HIBERNATION_POSSIBLE |
| 2149 | def_bool y | 2170 | def_bool y |
| 2150 | depends on SYS_SUPPORTS_HOTPLUG_CPU | 2171 | depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP |
| 2151 | 2172 | ||
| 2152 | config ARCH_SUSPEND_POSSIBLE | 2173 | config ARCH_SUSPEND_POSSIBLE |
| 2153 | def_bool y | 2174 | def_bool y |
| 2154 | depends on SYS_SUPPORTS_HOTPLUG_CPU | 2175 | depends on SYS_SUPPORTS_HOTPLUG_CPU || !SMP |
| 2155 | 2176 | ||
| 2156 | source "kernel/power/Kconfig" | 2177 | source "kernel/power/Kconfig" |
| 2157 | 2178 | ||
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 807572a6a4d2..861da514a468 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
| @@ -173,6 +173,13 @@ libs-y += arch/mips/fw/lib/ | |||
| 173 | # | 173 | # |
| 174 | 174 | ||
| 175 | # | 175 | # |
| 176 | # Texas Instruments AR7 | ||
| 177 | # | ||
| 178 | core-$(CONFIG_AR7) += arch/mips/ar7/ | ||
| 179 | cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7 | ||
| 180 | load-$(CONFIG_AR7) += 0xffffffff94100000 | ||
| 181 | |||
| 182 | # | ||
| 176 | # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. | 183 | # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. |
| 177 | # | 184 | # |
| 178 | core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ | 185 | core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ |
diff --git a/arch/mips/ar7/Makefile b/arch/mips/ar7/Makefile new file mode 100644 index 000000000000..7435e44b3964 --- /dev/null +++ b/arch/mips/ar7/Makefile | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | |||
| 2 | obj-y := \ | ||
| 3 | prom.o \ | ||
| 4 | setup.o \ | ||
| 5 | memory.o \ | ||
| 6 | irq.o \ | ||
| 7 | time.o \ | ||
| 8 | platform.o \ | ||
| 9 | gpio.o \ | ||
| 10 | clock.o | ||
diff --git a/arch/mips/ar7/clock.c b/arch/mips/ar7/clock.c new file mode 100644 index 000000000000..27dc6663f2fa --- /dev/null +++ b/arch/mips/ar7/clock.c | |||
| @@ -0,0 +1,440 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Felix Fietkau <nbd@openwrt.org> | ||
| 3 | * Copyright (C) 2007 Eugene Konev <ejka@openwrt.org> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/kernel.h> | ||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/types.h> | ||
| 23 | #include <linux/module.h> | ||
| 24 | #include <linux/delay.h> | ||
| 25 | #include <linux/gcd.h> | ||
| 26 | #include <linux/io.h> | ||
| 27 | |||
| 28 | #include <asm/addrspace.h> | ||
| 29 | #include <asm/mach-ar7/ar7.h> | ||
| 30 | |||
| 31 | #define BOOT_PLL_SOURCE_MASK 0x3 | ||
| 32 | #define CPU_PLL_SOURCE_SHIFT 16 | ||
| 33 | #define BUS_PLL_SOURCE_SHIFT 14 | ||
| 34 | #define USB_PLL_SOURCE_SHIFT 18 | ||
| 35 | #define DSP_PLL_SOURCE_SHIFT 22 | ||
| 36 | #define BOOT_PLL_SOURCE_AFE 0 | ||
| 37 | #define BOOT_PLL_SOURCE_BUS 0 | ||
| 38 | #define BOOT_PLL_SOURCE_REF 1 | ||
| 39 | #define BOOT_PLL_SOURCE_XTAL 2 | ||
| 40 | #define BOOT_PLL_SOURCE_CPU 3 | ||
| 41 | #define BOOT_PLL_BYPASS 0x00000020 | ||
| 42 | #define BOOT_PLL_ASYNC_MODE 0x02000000 | ||
| 43 | #define BOOT_PLL_2TO1_MODE 0x00008000 | ||
| 44 | |||
| 45 | #define TNETD7200_CLOCK_ID_CPU 0 | ||
| 46 | #define TNETD7200_CLOCK_ID_DSP 1 | ||
| 47 | #define TNETD7200_CLOCK_ID_USB 2 | ||
| 48 | |||
| 49 | #define TNETD7200_DEF_CPU_CLK 211000000 | ||
| 50 | #define TNETD7200_DEF_DSP_CLK 125000000 | ||
| 51 | #define TNETD7200_DEF_USB_CLK 48000000 | ||
| 52 | |||
| 53 | struct tnetd7300_clock { | ||
| 54 | u32 ctrl; | ||
| 55 | #define PREDIV_MASK 0x001f0000 | ||
| 56 | #define PREDIV_SHIFT 16 | ||
| 57 | #define POSTDIV_MASK 0x0000001f | ||
| 58 | u32 unused1[3]; | ||
| 59 | u32 pll; | ||
| 60 | #define MUL_MASK 0x0000f000 | ||
| 61 | #define MUL_SHIFT 12 | ||
| 62 | #define PLL_MODE_MASK 0x00000001 | ||
| 63 | #define PLL_NDIV 0x00000800 | ||
| 64 | #define PLL_DIV 0x00000002 | ||
| 65 | #define PLL_STATUS 0x00000001 | ||
| 66 | u32 unused2[3]; | ||
| 67 | }; | ||
| 68 | |||
| 69 | struct tnetd7300_clocks { | ||
| 70 | struct tnetd7300_clock bus; | ||
| 71 | struct tnetd7300_clock cpu; | ||
| 72 | struct tnetd7300_clock usb; | ||
| 73 | struct tnetd7300_clock dsp; | ||
| 74 | }; | ||
| 75 | |||
| 76 | struct tnetd7200_clock { | ||
| 77 | u32 ctrl; | ||
| 78 | u32 unused1[3]; | ||
| 79 | #define DIVISOR_ENABLE_MASK 0x00008000 | ||
| 80 | u32 mul; | ||
| 81 | u32 prediv; | ||
| 82 | u32 postdiv; | ||
| 83 | u32 postdiv2; | ||
| 84 | u32 unused2[6]; | ||
| 85 | u32 cmd; | ||
| 86 | u32 status; | ||
| 87 | u32 cmden; | ||
| 88 | u32 padding[15]; | ||
| 89 | }; | ||
| 90 | |||
| 91 | struct tnetd7200_clocks { | ||
| 92 | struct tnetd7200_clock cpu; | ||
| 93 | struct tnetd7200_clock dsp; | ||
| 94 | struct tnetd7200_clock usb; | ||
| 95 | }; | ||
| 96 | |||
| 97 | int ar7_cpu_clock = 150000000; | ||
| 98 | EXPORT_SYMBOL(ar7_cpu_clock); | ||
| 99 | int ar7_bus_clock = 125000000; | ||
| 100 | EXPORT_SYMBOL(ar7_bus_clock); | ||
| 101 | int ar7_dsp_clock; | ||
| 102 | EXPORT_SYMBOL(ar7_dsp_clock); | ||
| 103 | |||
| 104 | static void approximate(int base, int target, int *prediv, | ||
| 105 | int *postdiv, int *mul) | ||
| 106 | { | ||
| 107 | int i, j, k, freq, res = target; | ||
| 108 | for (i = 1; i <= 16; i++) | ||
| 109 | for (j = 1; j <= 32; j++) | ||
| 110 | for (k = 1; k <= 32; k++) { | ||
| 111 | freq = abs(base / j * i / k - target); | ||
| 112 | if (freq < res) { | ||
| 113 | res = freq; | ||
| 114 | *mul = i; | ||
| 115 | *prediv = j; | ||
| 116 | *postdiv = k; | ||
| 117 | } | ||
| 118 | } | ||
| 119 | } | ||
| 120 | |||
| 121 | static void calculate(int base, int target, int *prediv, int *postdiv, | ||
| 122 | int *mul) | ||
| 123 | { | ||
| 124 | int tmp_gcd, tmp_base, tmp_freq; | ||
| 125 | |||
| 126 | for (*prediv = 1; *prediv <= 32; (*prediv)++) { | ||
| 127 | tmp_base = base / *prediv; | ||
| 128 | tmp_gcd = gcd(target, tmp_base); | ||
| 129 | *mul = target / tmp_gcd; | ||
| 130 | *postdiv = tmp_base / tmp_gcd; | ||
| 131 | if ((*mul < 1) || (*mul >= 16)) | ||
| 132 | continue; | ||
| 133 | if ((*postdiv > 0) & (*postdiv <= 32)) | ||
| 134 | break; | ||
| 135 | } | ||
| 136 | |||
| 137 | if (base / *prediv * *mul / *postdiv != target) { | ||
| 138 | approximate(base, target, prediv, postdiv, mul); | ||
| 139 | tmp_freq = base / *prediv * *mul / *postdiv; | ||
| 140 | printk(KERN_WARNING | ||
| 141 | "Adjusted requested frequency %d to %d\n", | ||
| 142 | target, tmp_freq); | ||
| 143 | } | ||
| 144 | |||
| 145 | printk(KERN_DEBUG "Clocks: prediv: %d, postdiv: %d, mul: %d\n", | ||
| 146 | *prediv, *postdiv, *mul); | ||
| 147 | } | ||
| 148 | |||
| 149 | static int tnetd7300_dsp_clock(void) | ||
| 150 | { | ||
| 151 | u32 didr1, didr2; | ||
| 152 | u8 rev = ar7_chip_rev(); | ||
| 153 | didr1 = readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x18)); | ||
| 154 | didr2 = readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x1c)); | ||
| 155 | if (didr2 & (1 << 23)) | ||
| 156 | return 0; | ||
| 157 | if ((rev >= 0x23) && (rev != 0x57)) | ||
| 158 | return 250000000; | ||
| 159 | if ((((didr2 & 0x1fff) << 10) | ((didr1 & 0xffc00000) >> 22)) | ||
| 160 | > 4208000) | ||
| 161 | return 250000000; | ||
| 162 | return 0; | ||
| 163 | } | ||
| 164 | |||
| 165 | static int tnetd7300_get_clock(u32 shift, struct tnetd7300_clock *clock, | ||
| 166 | u32 *bootcr, u32 bus_clock) | ||
| 167 | { | ||
| 168 | int product; | ||
| 169 | int base_clock = AR7_REF_CLOCK; | ||
| 170 | u32 ctrl = readl(&clock->ctrl); | ||
| 171 | u32 pll = readl(&clock->pll); | ||
| 172 | int prediv = ((ctrl & PREDIV_MASK) >> PREDIV_SHIFT) + 1; | ||
| 173 | int postdiv = (ctrl & POSTDIV_MASK) + 1; | ||
| 174 | int divisor = prediv * postdiv; | ||
| 175 | int mul = ((pll & MUL_MASK) >> MUL_SHIFT) + 1; | ||
| 176 | |||
| 177 | switch ((*bootcr & (BOOT_PLL_SOURCE_MASK << shift)) >> shift) { | ||
| 178 | case BOOT_PLL_SOURCE_BUS: | ||
| 179 | base_clock = bus_clock; | ||
| 180 | break; | ||
| 181 | case BOOT_PLL_SOURCE_REF: | ||
| 182 | base_clock = AR7_REF_CLOCK; | ||
| 183 | break; | ||
| 184 | case BOOT_PLL_SOURCE_XTAL: | ||
| 185 | base_clock = AR7_XTAL_CLOCK; | ||
| 186 | break; | ||
| 187 | case BOOT_PLL_SOURCE_CPU: | ||
| 188 | base_clock = ar7_cpu_clock; | ||
| 189 | break; | ||
| 190 | } | ||
| 191 | |||
| 192 | if (*bootcr & BOOT_PLL_BYPASS) | ||
| 193 | return base_clock / divisor; | ||
| 194 | |||
| 195 | if ((pll & PLL_MODE_MASK) == 0) | ||
| 196 | return (base_clock >> (mul / 16 + 1)) / divisor; | ||
| 197 | |||
| 198 | if ((pll & (PLL_NDIV | PLL_DIV)) == (PLL_NDIV | PLL_DIV)) { | ||
| 199 | product = (mul & 1) ? | ||
| 200 | (base_clock * mul) >> 1 : | ||
| 201 | (base_clock * (mul - 1)) >> 2; | ||
| 202 | return product / divisor; | ||
| 203 | } | ||
| 204 | |||
| 205 | if (mul == 16) | ||
| 206 | return base_clock / divisor; | ||
| 207 | |||
| 208 | return base_clock * mul / divisor; | ||
| 209 | } | ||
| 210 | |||
| 211 | static void tnetd7300_set_clock(u32 shift, struct tnetd7300_clock *clock, | ||
| 212 | u32 *bootcr, u32 frequency) | ||
| 213 | { | ||
| 214 | int prediv, postdiv, mul; | ||
| 215 | int base_clock = ar7_bus_clock; | ||
| 216 | |||
| 217 | switch ((*bootcr & (BOOT_PLL_SOURCE_MASK << shift)) >> shift) { | ||
| 218 | case BOOT_PLL_SOURCE_BUS: | ||
| 219 | base_clock = ar7_bus_clock; | ||
| 220 | break; | ||
| 221 | case BOOT_PLL_SOURCE_REF: | ||
| 222 | base_clock = AR7_REF_CLOCK; | ||
| 223 | break; | ||
| 224 | case BOOT_PLL_SOURCE_XTAL: | ||
| 225 | base_clock = AR7_XTAL_CLOCK; | ||
| 226 | break; | ||
| 227 | case BOOT_PLL_SOURCE_CPU: | ||
| 228 | base_clock = ar7_cpu_clock; | ||
| 229 | break; | ||
| 230 | } | ||
| 231 | |||
| 232 | calculate(base_clock, frequency, &prediv, &postdiv, &mul); | ||
| 233 | |||
| 234 | writel(((prediv - 1) << PREDIV_SHIFT) | (postdiv - 1), &clock->ctrl); | ||
| 235 | msleep(1); | ||
| 236 | writel(4, &clock->pll); | ||
| 237 | while (readl(&clock->pll) & PLL_STATUS) | ||
| 238 | ; | ||
| 239 | writel(((mul - 1) << MUL_SHIFT) | (0xff << 3) | 0x0e, &clock->pll); | ||
| 240 | msleep(75); | ||
| 241 | } | ||
| 242 | |||
| 243 | static void __init tnetd7300_init_clocks(void) | ||
| 244 | { | ||
| 245 | u32 *bootcr = (u32 *)ioremap_nocache(AR7_REGS_DCL, 4); | ||
| 246 | struct tnetd7300_clocks *clocks = | ||
| 247 | ioremap_nocache(UR8_REGS_CLOCKS, | ||
| 248 | sizeof(struct tnetd7300_clocks)); | ||
| 249 | |||
| 250 | ar7_bus_clock = tnetd7300_get_clock(BUS_PLL_SOURCE_SHIFT, | ||
| 251 | &clocks->bus, bootcr, AR7_AFE_CLOCK); | ||
| 252 | |||
| 253 | if (*bootcr & BOOT_PLL_ASYNC_MODE) | ||
| 254 | ar7_cpu_clock = tnetd7300_get_clock(CPU_PLL_SOURCE_SHIFT, | ||
| 255 | &clocks->cpu, bootcr, AR7_AFE_CLOCK); | ||
| 256 | else | ||
| 257 | ar7_cpu_clock = ar7_bus_clock; | ||
| 258 | |||
| 259 | if (ar7_dsp_clock == 250000000) | ||
| 260 | tnetd7300_set_clock(DSP_PLL_SOURCE_SHIFT, &clocks->dsp, | ||
| 261 | bootcr, ar7_dsp_clock); | ||
| 262 | |||
| 263 | iounmap(clocks); | ||
| 264 | iounmap(bootcr); | ||
| 265 | } | ||
| 266 | |||
| 267 | static int tnetd7200_get_clock(int base, struct tnetd7200_clock *clock, | ||
| 268 | u32 *bootcr, u32 bus_clock) | ||
| 269 | { | ||
| 270 | int divisor = ((readl(&clock->prediv) & 0x1f) + 1) * | ||
| 271 | ((readl(&clock->postdiv) & 0x1f) + 1); | ||
| 272 | |||
| 273 | if (*bootcr & BOOT_PLL_BYPASS) | ||
| 274 | return base / divisor; | ||
| 275 | |||
| 276 | return base * ((readl(&clock->mul) & 0xf) + 1) / divisor; | ||
| 277 | } | ||
| 278 | |||
| 279 | |||
| 280 | static void tnetd7200_set_clock(int base, struct tnetd7200_clock *clock, | ||
| 281 | int prediv, int postdiv, int postdiv2, int mul, u32 frequency) | ||
| 282 | { | ||
| 283 | printk(KERN_INFO | ||
| 284 | "Clocks: base = %d, frequency = %u, prediv = %d, " | ||
| 285 | "postdiv = %d, postdiv2 = %d, mul = %d\n", | ||
| 286 | base, frequency, prediv, postdiv, postdiv2, mul); | ||
| 287 | |||
| 288 | writel(0, &clock->ctrl); | ||
| 289 | writel(DIVISOR_ENABLE_MASK | ((prediv - 1) & 0x1F), &clock->prediv); | ||
| 290 | writel((mul - 1) & 0xF, &clock->mul); | ||
| 291 | |||
| 292 | while (readl(&clock->status) & 0x1) | ||
| 293 | ; /* nop */ | ||
| 294 | |||
| 295 | writel(DIVISOR_ENABLE_MASK | ((postdiv - 1) & 0x1F), &clock->postdiv); | ||
| 296 | |||
| 297 | writel(readl(&clock->cmden) | 1, &clock->cmden); | ||
| 298 | writel(readl(&clock->cmd) | 1, &clock->cmd); | ||
| 299 | |||
| 300 | while (readl(&clock->status) & 0x1) | ||
| 301 | ; /* nop */ | ||
| 302 | |||
| 303 | writel(DIVISOR_ENABLE_MASK | ((postdiv2 - 1) & 0x1F), &clock->postdiv2); | ||
| 304 | |||
| 305 | writel(readl(&clock->cmden) | 1, &clock->cmden); | ||
| 306 | writel(readl(&clock->cmd) | 1, &clock->cmd); | ||
| 307 | |||
| 308 | while (readl(&clock->status) & 0x1) | ||
| 309 | ; /* nop */ | ||
| 310 | |||
| 311 | writel(readl(&clock->ctrl) | 1, &clock->ctrl); | ||
| 312 | } | ||
| 313 | |||
| 314 | static int tnetd7200_get_clock_base(int clock_id, u32 *bootcr) | ||
| 315 | { | ||
| 316 | if (*bootcr & BOOT_PLL_ASYNC_MODE) | ||
| 317 | /* Async */ | ||
| 318 | switch (clock_id) { | ||
| 319 | case TNETD7200_CLOCK_ID_DSP: | ||
| 320 | return AR7_REF_CLOCK; | ||
| 321 | default: | ||
| 322 | return AR7_AFE_CLOCK; | ||
| 323 | } | ||
| 324 | else | ||
| 325 | /* Sync */ | ||
| 326 | if (*bootcr & BOOT_PLL_2TO1_MODE) | ||
| 327 | /* 2:1 */ | ||
| 328 | switch (clock_id) { | ||
| 329 | case TNETD7200_CLOCK_ID_DSP: | ||
| 330 | return AR7_REF_CLOCK; | ||
| 331 | default: | ||
| 332 | return AR7_AFE_CLOCK; | ||
| 333 | } | ||
| 334 | else | ||
| 335 | /* 1:1 */ | ||
| 336 | return AR7_REF_CLOCK; | ||
| 337 | } | ||
| 338 | |||
| 339 | |||
| 340 | static void __init tnetd7200_init_clocks(void) | ||
| 341 | { | ||
| 342 | u32 *bootcr = (u32 *)ioremap_nocache(AR7_REGS_DCL, 4); | ||
| 343 | struct tnetd7200_clocks *clocks = | ||
| 344 | ioremap_nocache(AR7_REGS_CLOCKS, | ||
| 345 | sizeof(struct tnetd7200_clocks)); | ||
| 346 | int cpu_base, cpu_mul, cpu_prediv, cpu_postdiv; | ||
| 347 | int dsp_base, dsp_mul, dsp_prediv, dsp_postdiv; | ||
| 348 | int usb_base, usb_mul, usb_prediv, usb_postdiv; | ||
| 349 | |||
| 350 | cpu_base = tnetd7200_get_clock_base(TNETD7200_CLOCK_ID_CPU, bootcr); | ||
| 351 | dsp_base = tnetd7200_get_clock_base(TNETD7200_CLOCK_ID_DSP, bootcr); | ||
| 352 | |||
| 353 | if (*bootcr & BOOT_PLL_ASYNC_MODE) { | ||
| 354 | printk(KERN_INFO "Clocks: Async mode\n"); | ||
| 355 | |||
| 356 | printk(KERN_INFO "Clocks: Setting DSP clock\n"); | ||
| 357 | calculate(dsp_base, TNETD7200_DEF_DSP_CLK, | ||
| 358 | &dsp_prediv, &dsp_postdiv, &dsp_mul); | ||
| 359 | ar7_bus_clock = | ||
| 360 | ((dsp_base / dsp_prediv) * dsp_mul) / dsp_postdiv; | ||
| 361 | tnetd7200_set_clock(dsp_base, &clocks->dsp, | ||
| 362 | dsp_prediv, dsp_postdiv * 2, dsp_postdiv, dsp_mul * 2, | ||
| 363 | ar7_bus_clock); | ||
| 364 | |||
| 365 | printk(KERN_INFO "Clocks: Setting CPU clock\n"); | ||
| 366 | calculate(cpu_base, TNETD7200_DEF_CPU_CLK, &cpu_prediv, | ||
| 367 | &cpu_postdiv, &cpu_mul); | ||
| 368 | ar7_cpu_clock = | ||
| 369 | ((cpu_base / cpu_prediv) * cpu_mul) / cpu_postdiv; | ||
| 370 | tnetd7200_set_clock(cpu_base, &clocks->cpu, | ||
| 371 | cpu_prediv, cpu_postdiv, -1, cpu_mul, | ||
| 372 | ar7_cpu_clock); | ||
| 373 | |||
| 374 | } else | ||
| 375 | if (*bootcr & BOOT_PLL_2TO1_MODE) { | ||
| 376 | printk(KERN_INFO "Clocks: Sync 2:1 mode\n"); | ||
| 377 | |||
| 378 | printk(KERN_INFO "Clocks: Setting CPU clock\n"); | ||
| 379 | calculate(cpu_base, TNETD7200_DEF_CPU_CLK, &cpu_prediv, | ||
| 380 | &cpu_postdiv, &cpu_mul); | ||
| 381 | ar7_cpu_clock = ((cpu_base / cpu_prediv) * cpu_mul) | ||
| 382 | / cpu_postdiv; | ||
| 383 | tnetd7200_set_clock(cpu_base, &clocks->cpu, | ||
| 384 | cpu_prediv, cpu_postdiv, -1, cpu_mul, | ||
| 385 | ar7_cpu_clock); | ||
| 386 | |||
| 387 | printk(KERN_INFO "Clocks: Setting DSP clock\n"); | ||
| 388 | calculate(dsp_base, TNETD7200_DEF_DSP_CLK, &dsp_prediv, | ||
| 389 | &dsp_postdiv, &dsp_mul); | ||
| 390 | ar7_bus_clock = ar7_cpu_clock / 2; | ||
| 391 | tnetd7200_set_clock(dsp_base, &clocks->dsp, | ||
| 392 | dsp_prediv, dsp_postdiv * 2, dsp_postdiv, | ||
| 393 | dsp_mul * 2, ar7_bus_clock); | ||
| 394 | } else { | ||
| 395 | printk(KERN_INFO "Clocks: Sync 1:1 mode\n"); | ||
| 396 | |||
| 397 | printk(KERN_INFO "Clocks: Setting DSP clock\n"); | ||
| 398 | calculate(dsp_base, TNETD7200_DEF_DSP_CLK, &dsp_prediv, | ||
| 399 | &dsp_postdiv, &dsp_mul); | ||
| 400 | ar7_bus_clock = ((dsp_base / dsp_prediv) * dsp_mul) | ||
| 401 | / dsp_postdiv; | ||
| 402 | tnetd7200_set_clock(dsp_base, &clocks->dsp, | ||
| 403 | dsp_prediv, dsp_postdiv * 2, dsp_postdiv, | ||
| 404 | dsp_mul * 2, ar7_bus_clock); | ||
| 405 | |||
| 406 | ar7_cpu_clock = ar7_bus_clock; | ||
| 407 | } | ||
| 408 | |||
| 409 | printk(KERN_INFO "Clocks: Setting USB clock\n"); | ||
| 410 | usb_base = ar7_bus_clock; | ||
| 411 | calculate(usb_base, TNETD7200_DEF_USB_CLK, &usb_prediv, | ||
| 412 | &usb_postdiv, &usb_mul); | ||
| 413 | tnetd7200_set_clock(usb_base, &clocks->usb, | ||
| 414 | usb_prediv, usb_postdiv, -1, usb_mul, | ||
| 415 | TNETD7200_DEF_USB_CLK); | ||
| 416 | |||
| 417 | ar7_dsp_clock = ar7_cpu_clock; | ||
| 418 | |||
| 419 | iounmap(clocks); | ||
| 420 | iounmap(bootcr); | ||
| 421 | } | ||
| 422 | |||
| 423 | int __init ar7_init_clocks(void) | ||
| 424 | { | ||
| 425 | switch (ar7_chip_id()) { | ||
| 426 | case AR7_CHIP_7100: | ||
| 427 | case AR7_CHIP_7200: | ||
| 428 | tnetd7200_init_clocks(); | ||
| 429 | break; | ||
| 430 | case AR7_CHIP_7300: | ||
| 431 | ar7_dsp_clock = tnetd7300_dsp_clock(); | ||
| 432 | tnetd7300_init_clocks(); | ||
| 433 | break; | ||
| 434 | default: | ||
| 435 | break; | ||
| 436 | } | ||
| 437 | |||
| 438 | return 0; | ||
| 439 | } | ||
| 440 | arch_initcall(ar7_init_clocks); | ||
diff --git a/arch/mips/ar7/gpio.c b/arch/mips/ar7/gpio.c new file mode 100644 index 000000000000..74e14a3dbf4a --- /dev/null +++ b/arch/mips/ar7/gpio.c | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Felix Fietkau <nbd@openwrt.org> | ||
| 3 | * Copyright (C) 2007 Eugene Konev <ejka@openwrt.org> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/module.h> | ||
| 21 | |||
| 22 | #include <asm/mach-ar7/gpio.h> | ||
| 23 | |||
| 24 | static const char *ar7_gpio_list[AR7_GPIO_MAX]; | ||
| 25 | |||
| 26 | int gpio_request(unsigned gpio, const char *label) | ||
| 27 | { | ||
| 28 | if (gpio >= AR7_GPIO_MAX) | ||
| 29 | return -EINVAL; | ||
| 30 | |||
| 31 | if (ar7_gpio_list[gpio]) | ||
| 32 | return -EBUSY; | ||
| 33 | |||
| 34 | if (label) | ||
| 35 | ar7_gpio_list[gpio] = label; | ||
| 36 | else | ||
| 37 | ar7_gpio_list[gpio] = "busy"; | ||
| 38 | |||
| 39 | return 0; | ||
| 40 | } | ||
| 41 | EXPORT_SYMBOL(gpio_request); | ||
| 42 | |||
| 43 | void gpio_free(unsigned gpio) | ||
| 44 | { | ||
| 45 | BUG_ON(!ar7_gpio_list[gpio]); | ||
| 46 | ar7_gpio_list[gpio] = NULL; | ||
| 47 | } | ||
| 48 | EXPORT_SYMBOL(gpio_free); | ||
diff --git a/arch/mips/ar7/irq.c b/arch/mips/ar7/irq.c new file mode 100644 index 000000000000..c781556c44e4 --- /dev/null +++ b/arch/mips/ar7/irq.c | |||
| @@ -0,0 +1,176 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006,2007 Felix Fietkau <nbd@openwrt.org> | ||
| 3 | * Copyright (C) 2006,2007 Eugene Konev <ejka@openwrt.org> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/interrupt.h> | ||
| 21 | #include <linux/io.h> | ||
| 22 | |||
| 23 | #include <asm/irq_cpu.h> | ||
| 24 | #include <asm/mipsregs.h> | ||
| 25 | #include <asm/mach-ar7/ar7.h> | ||
| 26 | |||
| 27 | #define EXCEPT_OFFSET 0x80 | ||
| 28 | #define PACE_OFFSET 0xA0 | ||
| 29 | #define CHNLS_OFFSET 0x200 | ||
| 30 | |||
| 31 | #define REG_OFFSET(irq, reg) ((irq) / 32 * 0x4 + reg * 0x10) | ||
| 32 | #define SEC_REG_OFFSET(reg) (EXCEPT_OFFSET + reg * 0x8) | ||
| 33 | #define SEC_SR_OFFSET (SEC_REG_OFFSET(0)) /* 0x80 */ | ||
| 34 | #define CR_OFFSET(irq) (REG_OFFSET(irq, 1)) /* 0x10 */ | ||
| 35 | #define SEC_CR_OFFSET (SEC_REG_OFFSET(1)) /* 0x88 */ | ||
| 36 | #define ESR_OFFSET(irq) (REG_OFFSET(irq, 2)) /* 0x20 */ | ||
| 37 | #define SEC_ESR_OFFSET (SEC_REG_OFFSET(2)) /* 0x90 */ | ||
| 38 | #define ECR_OFFSET(irq) (REG_OFFSET(irq, 3)) /* 0x30 */ | ||
| 39 | #define SEC_ECR_OFFSET (SEC_REG_OFFSET(3)) /* 0x98 */ | ||
| 40 | #define PIR_OFFSET (0x40) | ||
| 41 | #define MSR_OFFSET (0x44) | ||
| 42 | #define PM_OFFSET(irq) (REG_OFFSET(irq, 5)) /* 0x50 */ | ||
| 43 | #define TM_OFFSET(irq) (REG_OFFSET(irq, 6)) /* 0x60 */ | ||
| 44 | |||
| 45 | #define REG(addr) ((u32 *)(KSEG1ADDR(AR7_REGS_IRQ) + addr)) | ||
| 46 | |||
| 47 | #define CHNL_OFFSET(chnl) (CHNLS_OFFSET + (chnl * 4)) | ||
| 48 | |||
| 49 | static int ar7_irq_base; | ||
| 50 | |||
| 51 | static void ar7_unmask_irq(unsigned int irq) | ||
| 52 | { | ||
| 53 | writel(1 << ((irq - ar7_irq_base) % 32), | ||
| 54 | REG(ESR_OFFSET(irq - ar7_irq_base))); | ||
| 55 | } | ||
| 56 | |||
| 57 | static void ar7_mask_irq(unsigned int irq) | ||
| 58 | { | ||
| 59 | writel(1 << ((irq - ar7_irq_base) % 32), | ||
| 60 | REG(ECR_OFFSET(irq - ar7_irq_base))); | ||
| 61 | } | ||
| 62 | |||
| 63 | static void ar7_ack_irq(unsigned int irq) | ||
| 64 | { | ||
| 65 | writel(1 << ((irq - ar7_irq_base) % 32), | ||
| 66 | REG(CR_OFFSET(irq - ar7_irq_base))); | ||
| 67 | } | ||
| 68 | |||
| 69 | static void ar7_unmask_sec_irq(unsigned int irq) | ||
| 70 | { | ||
| 71 | writel(1 << (irq - ar7_irq_base - 40), REG(SEC_ESR_OFFSET)); | ||
| 72 | } | ||
| 73 | |||
| 74 | static void ar7_mask_sec_irq(unsigned int irq) | ||
| 75 | { | ||
| 76 | writel(1 << (irq - ar7_irq_base - 40), REG(SEC_ECR_OFFSET)); | ||
| 77 | } | ||
| 78 | |||
| 79 | static void ar7_ack_sec_irq(unsigned int irq) | ||
| 80 | { | ||
| 81 | writel(1 << (irq - ar7_irq_base - 40), REG(SEC_CR_OFFSET)); | ||
| 82 | } | ||
| 83 | |||
| 84 | static struct irq_chip ar7_irq_type = { | ||
| 85 | .name = "AR7", | ||
| 86 | .unmask = ar7_unmask_irq, | ||
| 87 | .mask = ar7_mask_irq, | ||
| 88 | .ack = ar7_ack_irq | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct irq_chip ar7_sec_irq_type = { | ||
| 92 | .name = "AR7", | ||
| 93 | .unmask = ar7_unmask_sec_irq, | ||
| 94 | .mask = ar7_mask_sec_irq, | ||
| 95 | .ack = ar7_ack_sec_irq, | ||
| 96 | }; | ||
| 97 | |||
| 98 | static struct irqaction ar7_cascade_action = { | ||
| 99 | .handler = no_action, | ||
| 100 | .name = "AR7 cascade interrupt" | ||
| 101 | }; | ||
| 102 | |||
| 103 | static void __init ar7_irq_init(int base) | ||
| 104 | { | ||
| 105 | int i; | ||
| 106 | /* | ||
| 107 | * Disable interrupts and clear pending | ||
| 108 | */ | ||
| 109 | writel(0xffffffff, REG(ECR_OFFSET(0))); | ||
| 110 | writel(0xff, REG(ECR_OFFSET(32))); | ||
| 111 | writel(0xffffffff, REG(SEC_ECR_OFFSET)); | ||
| 112 | writel(0xffffffff, REG(CR_OFFSET(0))); | ||
| 113 | writel(0xff, REG(CR_OFFSET(32))); | ||
| 114 | writel(0xffffffff, REG(SEC_CR_OFFSET)); | ||
| 115 | |||
| 116 | ar7_irq_base = base; | ||
| 117 | |||
| 118 | for (i = 0; i < 40; i++) { | ||
| 119 | writel(i, REG(CHNL_OFFSET(i))); | ||
| 120 | /* Primary IRQ's */ | ||
| 121 | set_irq_chip_and_handler(base + i, &ar7_irq_type, | ||
| 122 | handle_level_irq); | ||
| 123 | /* Secondary IRQ's */ | ||
| 124 | if (i < 32) | ||
| 125 | set_irq_chip_and_handler(base + i + 40, | ||
| 126 | &ar7_sec_irq_type, | ||
| 127 | handle_level_irq); | ||
| 128 | } | ||
| 129 | |||
| 130 | setup_irq(2, &ar7_cascade_action); | ||
| 131 | setup_irq(ar7_irq_base, &ar7_cascade_action); | ||
| 132 | set_c0_status(IE_IRQ0); | ||
| 133 | } | ||
| 134 | |||
| 135 | void __init arch_init_irq(void) | ||
| 136 | { | ||
| 137 | mips_cpu_irq_init(); | ||
| 138 | ar7_irq_init(8); | ||
| 139 | } | ||
| 140 | |||
| 141 | static void ar7_cascade(void) | ||
| 142 | { | ||
| 143 | u32 status; | ||
| 144 | int i, irq; | ||
| 145 | |||
| 146 | /* Primary IRQ's */ | ||
| 147 | irq = readl(REG(PIR_OFFSET)) & 0x3f; | ||
| 148 | if (irq) { | ||
| 149 | do_IRQ(ar7_irq_base + irq); | ||
| 150 | return; | ||
| 151 | } | ||
| 152 | |||
| 153 | /* Secondary IRQ's are cascaded through primary '0' */ | ||
| 154 | writel(1, REG(CR_OFFSET(irq))); | ||
| 155 | status = readl(REG(SEC_SR_OFFSET)); | ||
| 156 | for (i = 0; i < 32; i++) { | ||
| 157 | if (status & 1) { | ||
| 158 | do_IRQ(ar7_irq_base + i + 40); | ||
| 159 | return; | ||
| 160 | } | ||
| 161 | status >>= 1; | ||
| 162 | } | ||
| 163 | |||
| 164 | spurious_interrupt(); | ||
| 165 | } | ||
| 166 | |||
| 167 | asmlinkage void plat_irq_dispatch(void) | ||
| 168 | { | ||
| 169 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; | ||
| 170 | if (pending & STATUSF_IP7) /* cpu timer */ | ||
| 171 | do_IRQ(7); | ||
| 172 | else if (pending & STATUSF_IP2) /* int0 hardware line */ | ||
| 173 | ar7_cascade(); | ||
| 174 | else | ||
| 175 | spurious_interrupt(); | ||
| 176 | } | ||
diff --git a/arch/mips/ar7/memory.c b/arch/mips/ar7/memory.c new file mode 100644 index 000000000000..46fed44825a6 --- /dev/null +++ b/arch/mips/ar7/memory.c | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Felix Fietkau <nbd@openwrt.org> | ||
| 3 | * Copyright (C) 2007 Eugene Konev <ejka@openwrt.org> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | #include <linux/bootmem.h> | ||
| 20 | #include <linux/init.h> | ||
| 21 | #include <linux/mm.h> | ||
| 22 | #include <linux/module.h> | ||
| 23 | #include <linux/pfn.h> | ||
| 24 | #include <linux/proc_fs.h> | ||
| 25 | #include <linux/string.h> | ||
| 26 | #include <linux/swap.h> | ||
| 27 | |||
| 28 | #include <asm/bootinfo.h> | ||
| 29 | #include <asm/page.h> | ||
| 30 | #include <asm/sections.h> | ||
| 31 | |||
| 32 | #include <asm/mach-ar7/ar7.h> | ||
| 33 | #include <asm/mips-boards/prom.h> | ||
| 34 | |||
| 35 | static int __init memsize(void) | ||
| 36 | { | ||
| 37 | u32 size = (64 << 20); | ||
| 38 | u32 *addr = (u32 *)KSEG1ADDR(AR7_SDRAM_BASE + size - 4); | ||
| 39 | u32 *kernel_end = (u32 *)KSEG1ADDR(CPHYSADDR((u32)&_end)); | ||
| 40 | u32 *tmpaddr = addr; | ||
| 41 | |||
| 42 | while (tmpaddr > kernel_end) { | ||
| 43 | *tmpaddr = (u32)tmpaddr; | ||
| 44 | size >>= 1; | ||
| 45 | tmpaddr -= size >> 2; | ||
| 46 | } | ||
| 47 | |||
| 48 | do { | ||
| 49 | tmpaddr += size >> 2; | ||
| 50 | if (*tmpaddr != (u32)tmpaddr) | ||
| 51 | break; | ||
| 52 | size <<= 1; | ||
| 53 | } while (size < (64 << 20)); | ||
| 54 | |||
| 55 | writel(tmpaddr, &addr); | ||
| 56 | |||
| 57 | return size; | ||
| 58 | } | ||
| 59 | |||
| 60 | void __init prom_meminit(void) | ||
| 61 | { | ||
| 62 | unsigned long pages; | ||
| 63 | |||
| 64 | pages = memsize() >> PAGE_SHIFT; | ||
| 65 | add_memory_region(PHYS_OFFSET, pages << PAGE_SHIFT, | ||
| 66 | BOOT_MEM_RAM); | ||
| 67 | } | ||
| 68 | |||
| 69 | void __init prom_free_prom_memory(void) | ||
| 70 | { | ||
| 71 | /* Nothing to free */ | ||
| 72 | } | ||
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c new file mode 100644 index 000000000000..542244961780 --- /dev/null +++ b/arch/mips/ar7/platform.c | |||
| @@ -0,0 +1,555 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006,2007 Felix Fietkau <nbd@openwrt.org> | ||
| 3 | * Copyright (C) 2006,2007 Eugene Konev <ejka@openwrt.org> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <linux/init.h> | ||
| 21 | #include <linux/types.h> | ||
| 22 | #include <linux/module.h> | ||
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/dma-mapping.h> | ||
| 25 | #include <linux/platform_device.h> | ||
| 26 | #include <linux/mtd/physmap.h> | ||
| 27 | #include <linux/serial.h> | ||
| 28 | #include <linux/serial_8250.h> | ||
| 29 | #include <linux/ioport.h> | ||
| 30 | #include <linux/io.h> | ||
| 31 | #include <linux/version.h> | ||
| 32 | #include <linux/vlynq.h> | ||
| 33 | #include <linux/leds.h> | ||
| 34 | #include <linux/string.h> | ||
| 35 | #include <linux/etherdevice.h> | ||
| 36 | |||
| 37 | #include <asm/addrspace.h> | ||
| 38 | #include <asm/mach-ar7/ar7.h> | ||
| 39 | #include <asm/mach-ar7/gpio.h> | ||
| 40 | #include <asm/mach-ar7/prom.h> | ||
| 41 | |||
| 42 | struct plat_vlynq_data { | ||
| 43 | struct plat_vlynq_ops ops; | ||
| 44 | int gpio_bit; | ||
| 45 | int reset_bit; | ||
| 46 | }; | ||
| 47 | |||
| 48 | |||
| 49 | static int vlynq_on(struct vlynq_device *dev) | ||
| 50 | { | ||
| 51 | int result; | ||
| 52 | struct plat_vlynq_data *pdata = dev->dev.platform_data; | ||
| 53 | |||
| 54 | result = gpio_request(pdata->gpio_bit, "vlynq"); | ||
| 55 | if (result) | ||
| 56 | goto out; | ||
| 57 | |||
| 58 | ar7_device_reset(pdata->reset_bit); | ||
| 59 | |||
| 60 | result = ar7_gpio_disable(pdata->gpio_bit); | ||
| 61 | if (result) | ||
| 62 | goto out_enabled; | ||
| 63 | |||
| 64 | result = ar7_gpio_enable(pdata->gpio_bit); | ||
| 65 | if (result) | ||
| 66 | goto out_enabled; | ||
| 67 | |||
| 68 | result = gpio_direction_output(pdata->gpio_bit, 0); | ||
| 69 | if (result) | ||
| 70 | goto out_gpio_enabled; | ||
| 71 | |||
| 72 | msleep(50); | ||
| 73 | |||
| 74 | gpio_set_value(pdata->gpio_bit, 1); | ||
| 75 | msleep(50); | ||
| 76 | |||
| 77 | return 0; | ||
| 78 | |||
| 79 | out_gpio_enabled: | ||
| 80 | ar7_gpio_disable(pdata->gpio_bit); | ||
| 81 | out_enabled: | ||
| 82 | ar7_device_disable(pdata->reset_bit); | ||
| 83 | gpio_free(pdata->gpio_bit); | ||
| 84 | out: | ||
| 85 | return result; | ||
| 86 | } | ||
| 87 | |||
| 88 | static void vlynq_off(struct vlynq_device *dev) | ||
| 89 | { | ||
| 90 | struct plat_vlynq_data *pdata = dev->dev.platform_data; | ||
| 91 | ar7_gpio_disable(pdata->gpio_bit); | ||
| 92 | gpio_free(pdata->gpio_bit); | ||
| 93 | ar7_device_disable(pdata->reset_bit); | ||
| 94 | } | ||
| 95 | |||
| 96 | static struct resource physmap_flash_resource = { | ||
| 97 | .name = "mem", | ||
| 98 | .flags = IORESOURCE_MEM, | ||
| 99 | .start = 0x10000000, | ||
| 100 | .end = 0x107fffff, | ||
| 101 | }; | ||
| 102 | |||
| 103 | static struct resource cpmac_low_res[] = { | ||
| 104 | { | ||
| 105 | .name = "regs", | ||
| 106 | .flags = IORESOURCE_MEM, | ||
| 107 | .start = AR7_REGS_MAC0, | ||
| 108 | .end = AR7_REGS_MAC0 + 0x7ff, | ||
| 109 | }, | ||
| 110 | { | ||
| 111 | .name = "irq", | ||
| 112 | .flags = IORESOURCE_IRQ, | ||
| 113 | .start = 27, | ||
| 114 | .end = 27, | ||
| 115 | }, | ||
| 116 | }; | ||
| 117 | |||
| 118 | static struct resource cpmac_high_res[] = { | ||
| 119 | { | ||
| 120 | .name = "regs", | ||
| 121 | .flags = IORESOURCE_MEM, | ||
| 122 | .start = AR7_REGS_MAC1, | ||
| 123 | .end = AR7_REGS_MAC1 + 0x7ff, | ||
| 124 | }, | ||
| 125 | { | ||
| 126 | .name = "irq", | ||
| 127 | .flags = IORESOURCE_IRQ, | ||
| 128 | .start = 41, | ||
| 129 | .end = 41, | ||
| 130 | }, | ||
| 131 | }; | ||
| 132 | |||
| 133 | static struct resource vlynq_low_res[] = { | ||
| 134 | { | ||
| 135 | .name = "regs", | ||
| 136 | .flags = IORESOURCE_MEM, | ||
| 137 | .start = AR7_REGS_VLYNQ0, | ||
| 138 | .end = AR7_REGS_VLYNQ0 + 0xff, | ||
| 139 | }, | ||
| 140 | { | ||
| 141 | .name = "irq", | ||
| 142 | .flags = IORESOURCE_IRQ, | ||
| 143 | .start = 29, | ||
| 144 | .end = 29, | ||
| 145 | }, | ||
| 146 | { | ||
| 147 | .name = "mem", | ||
| 148 | .flags = IORESOURCE_MEM, | ||
| 149 | .start = 0x04000000, | ||
| 150 | .end = 0x04ffffff, | ||
| 151 | }, | ||
| 152 | { | ||
| 153 | .name = "devirq", | ||
| 154 | .flags = IORESOURCE_IRQ, | ||
| 155 | .start = 80, | ||
| 156 | .end = 111, | ||
| 157 | }, | ||
| 158 | }; | ||
| 159 | |||
| 160 | static struct resource vlynq_high_res[] = { | ||
| 161 | { | ||
| 162 | .name = "regs", | ||
| 163 | .flags = IORESOURCE_MEM, | ||
| 164 | .start = AR7_REGS_VLYNQ1, | ||
| 165 | .end = AR7_REGS_VLYNQ1 + 0xff, | ||
| 166 | }, | ||
| 167 | { | ||
| 168 | .name = "irq", | ||
| 169 | .flags = IORESOURCE_IRQ, | ||
| 170 | .start = 33, | ||
| 171 | .end = 33, | ||
| 172 | }, | ||
| 173 | { | ||
| 174 | .name = "mem", | ||
| 175 | .flags = IORESOURCE_MEM, | ||
| 176 | .start = 0x0c000000, | ||
| 177 | .end = 0x0cffffff, | ||
| 178 | }, | ||
| 179 | { | ||
| 180 | .name = "devirq", | ||
| 181 | .flags = IORESOURCE_IRQ, | ||
| 182 | .start = 112, | ||
| 183 | .end = 143, | ||
| 184 | }, | ||
| 185 | }; | ||
| 186 | |||
| 187 | static struct resource usb_res[] = { | ||
| 188 | { | ||
| 189 | .name = "regs", | ||
| 190 | .flags = IORESOURCE_MEM, | ||
| 191 | .start = AR7_REGS_USB, | ||
| 192 | .end = AR7_REGS_USB + 0xff, | ||
| 193 | }, | ||
| 194 | { | ||
| 195 | .name = "irq", | ||
| 196 | .flags = IORESOURCE_IRQ, | ||
| 197 | .start = 32, | ||
| 198 | .end = 32, | ||
| 199 | }, | ||
| 200 | { | ||
| 201 | .name = "mem", | ||
| 202 | .flags = IORESOURCE_MEM, | ||
| 203 | .start = 0x03400000, | ||
| 204 | .end = 0x034001fff, | ||
| 205 | }, | ||
| 206 | }; | ||
| 207 | |||
| 208 | static struct physmap_flash_data physmap_flash_data = { | ||
| 209 | .width = 2, | ||
| 210 | }; | ||
| 211 | |||
| 212 | static struct plat_cpmac_data cpmac_low_data = { | ||
| 213 | .reset_bit = 17, | ||
| 214 | .power_bit = 20, | ||
| 215 | .phy_mask = 0x80000000, | ||
| 216 | }; | ||
| 217 | |||
| 218 | static struct plat_cpmac_data cpmac_high_data = { | ||
| 219 | .reset_bit = 21, | ||
| 220 | .power_bit = 22, | ||
| 221 | .phy_mask = 0x7fffffff, | ||
| 222 | }; | ||
| 223 | |||
| 224 | static struct plat_vlynq_data vlynq_low_data = { | ||
| 225 | .ops.on = vlynq_on, | ||
| 226 | .ops.off = vlynq_off, | ||
| 227 | .reset_bit = 20, | ||
| 228 | .gpio_bit = 18, | ||
| 229 | }; | ||
| 230 | |||
| 231 | static struct plat_vlynq_data vlynq_high_data = { | ||
| 232 | .ops.on = vlynq_on, | ||
| 233 | .ops.off = vlynq_off, | ||
| 234 | .reset_bit = 16, | ||
| 235 | .gpio_bit = 19, | ||
| 236 | }; | ||
| 237 | |||
| 238 | static struct platform_device physmap_flash = { | ||
| 239 | .id = 0, | ||
| 240 | .name = "physmap-flash", | ||
| 241 | .dev.platform_data = &physmap_flash_data, | ||
| 242 | .resource = &physmap_flash_resource, | ||
| 243 | .num_resources = 1, | ||
| 244 | }; | ||
| 245 | |||
| 246 | static u64 cpmac_dma_mask = DMA_32BIT_MASK; | ||
| 247 | static struct platform_device cpmac_low = { | ||
| 248 | .id = 0, | ||
| 249 | .name = "cpmac", | ||
| 250 | .dev = { | ||
| 251 | .dma_mask = &cpmac_dma_mask, | ||
| 252 | .coherent_dma_mask = DMA_32BIT_MASK, | ||
| 253 | .platform_data = &cpmac_low_data, | ||
| 254 | }, | ||
| 255 | .resource = cpmac_low_res, | ||
| 256 | .num_resources = ARRAY_SIZE(cpmac_low_res), | ||
| 257 | }; | ||
| 258 | |||
| 259 | static struct platform_device cpmac_high = { | ||
| 260 | .id = 1, | ||
| 261 | .name = "cpmac", | ||
| 262 | .dev = { | ||
| 263 | .dma_mask = &cpmac_dma_mask, | ||
| 264 | .coherent_dma_mask = DMA_32BIT_MASK, | ||
| 265 | .platform_data = &cpmac_high_data, | ||
| 266 | }, | ||
| 267 | .resource = cpmac_high_res, | ||
| 268 | .num_resources = ARRAY_SIZE(cpmac_high_res), | ||
| 269 | }; | ||
| 270 | |||
| 271 | static struct platform_device vlynq_low = { | ||
| 272 | .id = 0, | ||
| 273 | .name = "vlynq", | ||
| 274 | .dev.platform_data = &vlynq_low_data, | ||
| 275 | .resource = vlynq_low_res, | ||
| 276 | .num_resources = ARRAY_SIZE(vlynq_low_res), | ||
| 277 | }; | ||
| 278 | |||
| 279 | static struct platform_device vlynq_high = { | ||
| 280 | .id = 1, | ||
| 281 | .name = "vlynq", | ||
| 282 | .dev.platform_data = &vlynq_high_data, | ||
| 283 | .resource = vlynq_high_res, | ||
| 284 | .num_resources = ARRAY_SIZE(vlynq_high_res), | ||
| 285 | }; | ||
| 286 | |||
| 287 | |||
| 288 | static struct gpio_led default_leds[] = { | ||
| 289 | { | ||
| 290 | .name = "status", | ||
| 291 | .gpio = 8, | ||
| 292 | .active_low = 1, | ||
| 293 | }, | ||
| 294 | }; | ||
| 295 | |||
| 296 | static struct gpio_led dsl502t_leds[] = { | ||
| 297 | { | ||
| 298 | .name = "status", | ||
| 299 | .gpio = 9, | ||
| 300 | .active_low = 1, | ||
| 301 | }, | ||
| 302 | { | ||
| 303 | .name = "ethernet", | ||
| 304 | .gpio = 7, | ||
| 305 | .active_low = 1, | ||
| 306 | }, | ||
| 307 | { | ||
| 308 | .name = "usb", | ||
| 309 | .gpio = 12, | ||
| 310 | .active_low = 1, | ||
| 311 | }, | ||
| 312 | }; | ||
| 313 | |||
| 314 | static struct gpio_led dg834g_leds[] = { | ||
| 315 | { | ||
| 316 | .name = "ppp", | ||
| 317 | .gpio = 6, | ||
| 318 | .active_low = 1, | ||
| 319 | }, | ||
| 320 | { | ||
| 321 | .name = "status", | ||
| 322 | .gpio = 7, | ||
| 323 | .active_low = 1, | ||
| 324 | }, | ||
| 325 | { | ||
| 326 | .name = "adsl", | ||
| 327 | .gpio = 8, | ||
| 328 | .active_low = 1, | ||
| 329 | }, | ||
| 330 | { | ||
| 331 | .name = "wifi", | ||
| 332 | .gpio = 12, | ||
| 333 | .active_low = 1, | ||
| 334 | }, | ||
| 335 | { | ||
| 336 | .name = "power", | ||
| 337 | .gpio = 14, | ||
| 338 | .active_low = 1, | ||
| 339 | .default_trigger = "default-on", | ||
| 340 | }, | ||
| 341 | }; | ||
| 342 | |||
| 343 | static struct gpio_led fb_sl_leds[] = { | ||
| 344 | { | ||
| 345 | .name = "1", | ||
| 346 | .gpio = 7, | ||
| 347 | }, | ||
| 348 | { | ||
| 349 | .name = "2", | ||
| 350 | .gpio = 13, | ||
| 351 | .active_low = 1, | ||
| 352 | }, | ||
| 353 | { | ||
| 354 | .name = "3", | ||
| 355 | .gpio = 10, | ||
| 356 | .active_low = 1, | ||
| 357 | }, | ||
| 358 | { | ||
| 359 | .name = "4", | ||
| 360 | .gpio = 12, | ||
| 361 | .active_low = 1, | ||
| 362 | }, | ||
| 363 | { | ||
| 364 | .name = "5", | ||
| 365 | .gpio = 9, | ||
| 366 | .active_low = 1, | ||
| 367 | }, | ||
| 368 | }; | ||
| 369 | |||
| 370 | static struct gpio_led fb_fon_leds[] = { | ||
| 371 | { | ||
| 372 | .name = "1", | ||
| 373 | .gpio = 8, | ||
| 374 | }, | ||
| 375 | { | ||
| 376 | .name = "2", | ||
| 377 | .gpio = 3, | ||
| 378 | .active_low = 1, | ||
| 379 | }, | ||
| 380 | { | ||
| 381 | .name = "3", | ||
| 382 | .gpio = 5, | ||
| 383 | }, | ||
| 384 | { | ||
| 385 | .name = "4", | ||
| 386 | .gpio = 4, | ||
| 387 | .active_low = 1, | ||
| 388 | }, | ||
| 389 | { | ||
| 390 | .name = "5", | ||
| 391 | .gpio = 11, | ||
| 392 | .active_low = 1, | ||
| 393 | }, | ||
| 394 | }; | ||
| 395 | |||
| 396 | static struct gpio_led_platform_data ar7_led_data; | ||
| 397 | |||
| 398 | static struct platform_device ar7_gpio_leds = { | ||
| 399 | .name = "leds-gpio", | ||
| 400 | .id = -1, | ||
| 401 | .dev = { | ||
| 402 | .platform_data = &ar7_led_data, | ||
| 403 | } | ||
| 404 | }; | ||
| 405 | |||
| 406 | static struct platform_device ar7_udc = { | ||
| 407 | .id = -1, | ||
| 408 | .name = "ar7_udc", | ||
| 409 | .resource = usb_res, | ||
| 410 | .num_resources = ARRAY_SIZE(usb_res), | ||
| 411 | }; | ||
| 412 | |||
| 413 | static inline unsigned char char2hex(char h) | ||
| 414 | { | ||
| 415 | switch (h) { | ||
| 416 | case '0': case '1': case '2': case '3': case '4': | ||
| 417 | case '5': case '6': case '7': case '8': case '9': | ||
| 418 | return h - '0'; | ||
| 419 | case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': | ||
| 420 | return h - 'A' + 10; | ||
| 421 | case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': | ||
| 422 | return h - 'a' + 10; | ||
| 423 | default: | ||
| 424 | return 0; | ||
| 425 | } | ||
| 426 | } | ||
| 427 | |||
| 428 | static void cpmac_get_mac(int instance, unsigned char *dev_addr) | ||
| 429 | { | ||
| 430 | int i; | ||
| 431 | char name[5], default_mac[ETH_ALEN], *mac; | ||
| 432 | |||
| 433 | mac = NULL; | ||
| 434 | sprintf(name, "mac%c", 'a' + instance); | ||
| 435 | mac = prom_getenv(name); | ||
| 436 | if (!mac) { | ||
| 437 | sprintf(name, "mac%c", 'a'); | ||
| 438 | mac = prom_getenv(name); | ||
| 439 | } | ||
| 440 | if (!mac) { | ||
| 441 | random_ether_addr(default_mac); | ||
| 442 | mac = default_mac; | ||
| 443 | } | ||
| 444 | for (i = 0; i < 6; i++) | ||
| 445 | dev_addr[i] = (char2hex(mac[i * 3]) << 4) + | ||
| 446 | char2hex(mac[i * 3 + 1]); | ||
| 447 | } | ||
| 448 | |||
| 449 | static void __init detect_leds(void) | ||
| 450 | { | ||
| 451 | char *prid, *usb_prod; | ||
| 452 | |||
| 453 | /* Default LEDs */ | ||
| 454 | ar7_led_data.num_leds = ARRAY_SIZE(default_leds); | ||
| 455 | ar7_led_data.leds = default_leds; | ||
| 456 | |||
| 457 | /* FIXME: the whole thing is unreliable */ | ||
| 458 | prid = prom_getenv("ProductID"); | ||
| 459 | usb_prod = prom_getenv("usb_prod"); | ||
| 460 | |||
| 461 | /* If we can't get the product id from PROM, use the default LEDs */ | ||
| 462 | if (!prid) | ||
| 463 | return; | ||
| 464 | |||
| 465 | if (strstr(prid, "Fritz_Box_FON")) { | ||
| 466 | ar7_led_data.num_leds = ARRAY_SIZE(fb_fon_leds); | ||
| 467 | ar7_led_data.leds = fb_fon_leds; | ||
| 468 | } else if (strstr(prid, "Fritz_Box_")) { | ||
| 469 | ar7_led_data.num_leds = ARRAY_SIZE(fb_sl_leds); | ||
| 470 | ar7_led_data.leds = fb_sl_leds; | ||
| 471 | } else if ((!strcmp(prid, "AR7RD") || !strcmp(prid, "AR7DB")) | ||
| 472 | && usb_prod != NULL && strstr(usb_prod, "DSL-502T")) { | ||
| 473 | ar7_led_data.num_leds = ARRAY_SIZE(dsl502t_leds); | ||
| 474 | ar7_led_data.leds = dsl502t_leds; | ||
| 475 | } else if (strstr(prid, "DG834")) { | ||
| 476 | ar7_led_data.num_leds = ARRAY_SIZE(dg834g_leds); | ||
| 477 | ar7_led_data.leds = dg834g_leds; | ||
| 478 | } | ||
| 479 | } | ||
| 480 | |||
| 481 | static int __init ar7_register_devices(void) | ||
| 482 | { | ||
| 483 | int res; | ||
| 484 | static struct uart_port uart_port[2]; | ||
| 485 | |||
| 486 | memset(uart_port, 0, sizeof(struct uart_port) * 2); | ||
| 487 | |||
| 488 | uart_port[0].type = PORT_16550A; | ||
| 489 | uart_port[0].line = 0; | ||
| 490 | uart_port[0].irq = AR7_IRQ_UART0; | ||
| 491 | uart_port[0].uartclk = ar7_bus_freq() / 2; | ||
| 492 | uart_port[0].iotype = UPIO_MEM32; | ||
| 493 | uart_port[0].mapbase = AR7_REGS_UART0; | ||
| 494 | uart_port[0].membase = ioremap(uart_port[0].mapbase, 256); | ||
| 495 | uart_port[0].regshift = 2; | ||
| 496 | res = early_serial_setup(&uart_port[0]); | ||
| 497 | if (res) | ||
| 498 | return res; | ||
| 499 | |||
| 500 | |||
| 501 | /* Only TNETD73xx have a second serial port */ | ||
| 502 | if (ar7_has_second_uart()) { | ||
| 503 | uart_port[1].type = PORT_16550A; | ||
| 504 | uart_port[1].line = 1; | ||
| 505 | uart_port[1].irq = AR7_IRQ_UART1; | ||
| 506 | uart_port[1].uartclk = ar7_bus_freq() / 2; | ||
| 507 | uart_port[1].iotype = UPIO_MEM32; | ||
| 508 | uart_port[1].mapbase = UR8_REGS_UART1; | ||
| 509 | uart_port[1].membase = ioremap(uart_port[1].mapbase, 256); | ||
| 510 | uart_port[1].regshift = 2; | ||
| 511 | res = early_serial_setup(&uart_port[1]); | ||
| 512 | if (res) | ||
| 513 | return res; | ||
| 514 | } | ||
| 515 | |||
| 516 | res = platform_device_register(&physmap_flash); | ||
| 517 | if (res) | ||
| 518 | return res; | ||
| 519 | |||
| 520 | ar7_device_disable(vlynq_low_data.reset_bit); | ||
| 521 | res = platform_device_register(&vlynq_low); | ||
| 522 | if (res) | ||
| 523 | return res; | ||
| 524 | |||
| 525 | if (ar7_has_high_vlynq()) { | ||
| 526 | ar7_device_disable(vlynq_high_data.reset_bit); | ||
| 527 | res = platform_device_register(&vlynq_high); | ||
| 528 | if (res) | ||
| 529 | return res; | ||
| 530 | } | ||
| 531 | |||
| 532 | if (ar7_has_high_cpmac()) { | ||
| 533 | cpmac_get_mac(1, cpmac_high_data.dev_addr); | ||
| 534 | res = platform_device_register(&cpmac_high); | ||
| 535 | if (res) | ||
| 536 | return res; | ||
| 537 | } else { | ||
| 538 | cpmac_low_data.phy_mask = 0xffffffff; | ||
| 539 | } | ||
| 540 | |||
| 541 | cpmac_get_mac(0, cpmac_low_data.dev_addr); | ||
| 542 | res = platform_device_register(&cpmac_low); | ||
| 543 | if (res) | ||
| 544 | return res; | ||
| 545 | |||
| 546 | detect_leds(); | ||
| 547 | res = platform_device_register(&ar7_gpio_leds); | ||
| 548 | if (res) | ||
| 549 | return res; | ||
| 550 | |||
| 551 | res = platform_device_register(&ar7_udc); | ||
| 552 | |||
| 553 | return res; | ||
| 554 | } | ||
| 555 | arch_initcall(ar7_register_devices); | ||
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c new file mode 100644 index 000000000000..a320bceb2f9d --- /dev/null +++ b/arch/mips/ar7/prom.c | |||
| @@ -0,0 +1,297 @@ | |||
| 1 | /* | ||
| 2 | * Carsten Langgaard, carstenl@mips.com | ||
| 3 | * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * This program is free software; you can distribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License (Version 2) as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 12 | * for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along | ||
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 17 | * | ||
| 18 | * Putting things on the screen/serial line using YAMONs facilities. | ||
| 19 | */ | ||
| 20 | #include <linux/init.h> | ||
| 21 | #include <linux/kernel.h> | ||
| 22 | #include <linux/serial_reg.h> | ||
| 23 | #include <linux/spinlock.h> | ||
| 24 | #include <linux/module.h> | ||
| 25 | #include <linux/string.h> | ||
| 26 | #include <linux/io.h> | ||
| 27 | #include <asm/bootinfo.h> | ||
| 28 | |||
| 29 | #include <asm/mach-ar7/ar7.h> | ||
| 30 | #include <asm/mach-ar7/prom.h> | ||
| 31 | |||
| 32 | #define MAX_ENTRY 80 | ||
| 33 | |||
| 34 | struct env_var { | ||
| 35 | char *name; | ||
| 36 | char *value; | ||
| 37 | }; | ||
| 38 | |||
| 39 | static struct env_var adam2_env[MAX_ENTRY]; | ||
| 40 | |||
| 41 | char *prom_getenv(const char *name) | ||
| 42 | { | ||
| 43 | int i; | ||
| 44 | for (i = 0; (i < MAX_ENTRY) && adam2_env[i].name; i++) | ||
| 45 | if (!strcmp(name, adam2_env[i].name)) | ||
| 46 | return adam2_env[i].value; | ||
| 47 | |||
| 48 | return NULL; | ||
| 49 | } | ||
| 50 | EXPORT_SYMBOL(prom_getenv); | ||
| 51 | |||
| 52 | char * __init prom_getcmdline(void) | ||
| 53 | { | ||
| 54 | return &(arcs_cmdline[0]); | ||
| 55 | } | ||
| 56 | |||
| 57 | static void __init ar7_init_cmdline(int argc, char *argv[]) | ||
| 58 | { | ||
| 59 | char *cp; | ||
| 60 | int actr; | ||
| 61 | |||
| 62 | actr = 1; /* Always ignore argv[0] */ | ||
| 63 | |||
| 64 | cp = &(arcs_cmdline[0]); | ||
| 65 | while (actr < argc) { | ||
| 66 | strcpy(cp, argv[actr]); | ||
| 67 | cp += strlen(argv[actr]); | ||
| 68 | *cp++ = ' '; | ||
| 69 | actr++; | ||
| 70 | } | ||
| 71 | if (cp != &(arcs_cmdline[0])) { | ||
| 72 | /* get rid of trailing space */ | ||
| 73 | --cp; | ||
| 74 | *cp = '\0'; | ||
| 75 | } | ||
| 76 | } | ||
| 77 | |||
| 78 | struct psbl_rec { | ||
| 79 | u32 psbl_size; | ||
| 80 | u32 env_base; | ||
| 81 | u32 env_size; | ||
| 82 | u32 ffs_base; | ||
| 83 | u32 ffs_size; | ||
| 84 | }; | ||
| 85 | |||
| 86 | static __initdata char psp_env_version[] = "TIENV0.8"; | ||
| 87 | |||
| 88 | struct psp_env_chunk { | ||
| 89 | u8 num; | ||
| 90 | u8 ctrl; | ||
| 91 | u16 csum; | ||
| 92 | u8 len; | ||
| 93 | char data[11]; | ||
| 94 | } __attribute__ ((packed)); | ||
| 95 | |||
| 96 | struct psp_var_map_entry { | ||
| 97 | u8 num; | ||
| 98 | char *value; | ||
| 99 | }; | ||
| 100 | |||
| 101 | static struct psp_var_map_entry psp_var_map[] = { | ||
| 102 | { 1, "cpufrequency" }, | ||
| 103 | { 2, "memsize" }, | ||
| 104 | { 3, "flashsize" }, | ||
| 105 | { 4, "modetty0" }, | ||
| 106 | { 5, "modetty1" }, | ||
| 107 | { 8, "maca" }, | ||
| 108 | { 9, "macb" }, | ||
| 109 | { 28, "sysfrequency" }, | ||
| 110 | { 38, "mipsfrequency" }, | ||
| 111 | }; | ||
| 112 | |||
| 113 | /* | ||
| 114 | |||
| 115 | Well-known variable (num is looked up in table above for matching variable name) | ||
| 116 | Example: cpufrequency=211968000 | ||
| 117 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- | ||
| 118 | | 01 |CTRL|CHECKSUM | 01 | _2 | _1 | _1 | _9 | _6 | _8 | _0 | _0 | _0 | \0 | FF | ||
| 119 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- | ||
| 120 | |||
| 121 | Name=Value pair in a single chunk | ||
| 122 | Example: NAME=VALUE | ||
| 123 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- | ||
| 124 | | 00 |CTRL|CHECKSUM | 01 | _N | _A | _M | _E | _0 | _V | _A | _L | _U | _E | \0 | ||
| 125 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- | ||
| 126 | |||
| 127 | Name=Value pair in 2 chunks (len is the number of chunks) | ||
| 128 | Example: bootloaderVersion=1.3.7.15 | ||
| 129 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- | ||
| 130 | | 00 |CTRL|CHECKSUM | 02 | _b | _o | _o | _t | _l | _o | _a | _d | _e | _r | _V | ||
| 131 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- | ||
| 132 | | _e | _r | _s | _i | _o | _n | \0 | _1 | _. | _3 | _. | _7 | _. | _1 | _5 | \0 | ||
| 133 | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+--- | ||
| 134 | |||
| 135 | Data is padded with 0xFF | ||
| 136 | |||
| 137 | */ | ||
| 138 | |||
| 139 | #define PSP_ENV_SIZE 4096 | ||
| 140 | |||
| 141 | static char psp_env_data[PSP_ENV_SIZE] = { 0, }; | ||
| 142 | |||
| 143 | static char * __init lookup_psp_var_map(u8 num) | ||
| 144 | { | ||
| 145 | int i; | ||
| 146 | |||
| 147 | for (i = 0; i < sizeof(psp_var_map); i++) | ||
| 148 | if (psp_var_map[i].num == num) | ||
| 149 | return psp_var_map[i].value; | ||
| 150 | |||
| 151 | return NULL; | ||
| 152 | } | ||
| 153 | |||
| 154 | static void __init add_adam2_var(char *name, char *value) | ||
| 155 | { | ||
| 156 | int i; | ||
| 157 | for (i = 0; i < MAX_ENTRY; i++) { | ||
| 158 | if (!adam2_env[i].name) { | ||
| 159 | adam2_env[i].name = name; | ||
| 160 | adam2_env[i].value = value; | ||
| 161 | return; | ||
| 162 | } else if (!strcmp(adam2_env[i].name, name)) { | ||
| 163 | adam2_env[i].value = value; | ||
| 164 | return; | ||
| 165 | } | ||
| 166 | } | ||
| 167 | } | ||
| 168 | |||
| 169 | static int __init parse_psp_env(void *psp_env_base) | ||
| 170 | { | ||
| 171 | int i, n; | ||
| 172 | char *name, *value; | ||
| 173 | struct psp_env_chunk *chunks = (struct psp_env_chunk *)psp_env_data; | ||
| 174 | |||
| 175 | memcpy_fromio(chunks, psp_env_base, PSP_ENV_SIZE); | ||
| 176 | |||
| 177 | i = 1; | ||
| 178 | n = PSP_ENV_SIZE / sizeof(struct psp_env_chunk); | ||
| 179 | while (i < n) { | ||
| 180 | if ((chunks[i].num == 0xff) || ((i + chunks[i].len) > n)) | ||
| 181 | break; | ||
| 182 | value = chunks[i].data; | ||
| 183 | if (chunks[i].num) { | ||
| 184 | name = lookup_psp_var_map(chunks[i].num); | ||
| 185 | } else { | ||
| 186 | name = value; | ||
| 187 | value += strlen(name) + 1; | ||
| 188 | } | ||
| 189 | if (name) | ||
| 190 | add_adam2_var(name, value); | ||
| 191 | i += chunks[i].len; | ||
| 192 | } | ||
| 193 | return 0; | ||
| 194 | } | ||
| 195 | |||
| 196 | static void __init ar7_init_env(struct env_var *env) | ||
| 197 | { | ||
| 198 | int i; | ||
| 199 | struct psbl_rec *psbl = (struct psbl_rec *)(KSEG1ADDR(0x14000300)); | ||
| 200 | void *psp_env = (void *)KSEG1ADDR(psbl->env_base); | ||
| 201 | |||
| 202 | if (strcmp(psp_env, psp_env_version) == 0) { | ||
| 203 | parse_psp_env(psp_env); | ||
| 204 | } else { | ||
| 205 | for (i = 0; i < MAX_ENTRY; i++, env++) | ||
| 206 | if (env->name) | ||
| 207 | add_adam2_var(env->name, env->value); | ||
| 208 | } | ||
| 209 | } | ||
| 210 | |||
| 211 | static void __init console_config(void) | ||
| 212 | { | ||
| 213 | #ifdef CONFIG_SERIAL_8250_CONSOLE | ||
| 214 | char console_string[40]; | ||
| 215 | int baud = 0; | ||
| 216 | char parity = '\0', bits = '\0', flow = '\0'; | ||
| 217 | char *s, *p; | ||
| 218 | |||
| 219 | if (strstr(prom_getcmdline(), "console=")) | ||
| 220 | return; | ||
| 221 | |||
| 222 | #ifdef CONFIG_KGDB | ||
| 223 | if (!strstr(prom_getcmdline(), "nokgdb")) { | ||
| 224 | strcat(prom_getcmdline(), " console=kgdb"); | ||
| 225 | kgdb_enabled = 1; | ||
| 226 | return; | ||
| 227 | } | ||
| 228 | #endif | ||
| 229 | |||
| 230 | s = prom_getenv("modetty0"); | ||
| 231 | if (s) { | ||
| 232 | baud = simple_strtoul(s, &p, 10); | ||
| 233 | s = p; | ||
| 234 | if (*s == ',') | ||
| 235 | s++; | ||
| 236 | if (*s) | ||
| 237 | parity = *s++; | ||
| 238 | if (*s == ',') | ||
| 239 | s++; | ||
| 240 | if (*s) | ||
| 241 | bits = *s++; | ||
| 242 | if (*s == ',') | ||
| 243 | s++; | ||
| 244 | if (*s == 'h') | ||
| 245 | flow = 'r'; | ||
| 246 | } | ||
| 247 | |||
| 248 | if (baud == 0) | ||
| 249 | baud = 38400; | ||
| 250 | if (parity != 'n' && parity != 'o' && parity != 'e') | ||
| 251 | parity = 'n'; | ||
| 252 | if (bits != '7' && bits != '8') | ||
| 253 | bits = '8'; | ||
| 254 | |||
| 255 | if (flow == 'r') | ||
| 256 | sprintf(console_string, " console=ttyS0,%d%c%c%c", baud, | ||
| 257 | parity, bits, flow); | ||
| 258 | else | ||
| 259 | sprintf(console_string, " console=ttyS0,%d%c%c", baud, parity, | ||
| 260 | bits); | ||
| 261 | strcat(prom_getcmdline(), console_string); | ||
| 262 | #endif | ||
| 263 | } | ||
| 264 | |||
| 265 | void __init prom_init(void) | ||
| 266 | { | ||
| 267 | ar7_init_cmdline(fw_arg0, (char **)fw_arg1); | ||
| 268 | ar7_init_env((struct env_var *)fw_arg2); | ||
| 269 | console_config(); | ||
| 270 | } | ||
| 271 | |||
| 272 | #define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4))) | ||
| 273 | static inline unsigned int serial_in(int offset) | ||
| 274 | { | ||
| 275 | return readl((void *)PORT(offset)); | ||
| 276 | } | ||
| 277 | |||
| 278 | static inline void serial_out(int offset, int value) | ||
| 279 | { | ||
| 280 | writel(value, (void *)PORT(offset)); | ||
| 281 | } | ||
| 282 | |||
| 283 | char prom_getchar(void) | ||
| 284 | { | ||
| 285 | while (!(serial_in(UART_LSR) & UART_LSR_DR)) | ||
| 286 | ; | ||
| 287 | return serial_in(UART_RX); | ||
| 288 | } | ||
| 289 | |||
| 290 | int prom_putchar(char c) | ||
| 291 | { | ||
| 292 | while ((serial_in(UART_LSR) & UART_LSR_TEMT) == 0) | ||
| 293 | ; | ||
| 294 | serial_out(UART_TX, c); | ||
| 295 | return 1; | ||
| 296 | } | ||
| 297 | |||
diff --git a/arch/mips/ar7/setup.c b/arch/mips/ar7/setup.c new file mode 100644 index 000000000000..6ebb5f16d967 --- /dev/null +++ b/arch/mips/ar7/setup.c | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | /* | ||
| 2 | * Carsten Langgaard, carstenl@mips.com | ||
| 3 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * This program is free software; you can distribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License (Version 2) as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 12 | * for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along | ||
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 17 | */ | ||
| 18 | #include <linux/version.h> | ||
| 19 | #include <linux/init.h> | ||
| 20 | #include <linux/ioport.h> | ||
| 21 | #include <linux/pm.h> | ||
| 22 | #include <linux/time.h> | ||
| 23 | |||
| 24 | #include <asm/reboot.h> | ||
| 25 | #include <asm/mach-ar7/ar7.h> | ||
| 26 | #include <asm/mach-ar7/prom.h> | ||
| 27 | |||
| 28 | static void ar7_machine_restart(char *command) | ||
| 29 | { | ||
| 30 | u32 *softres_reg = ioremap(AR7_REGS_RESET + | ||
| 31 | AR7_RESET_SOFTWARE, 1); | ||
| 32 | writel(1, softres_reg); | ||
| 33 | } | ||
| 34 | |||
| 35 | static void ar7_machine_halt(void) | ||
| 36 | { | ||
| 37 | while (1) | ||
| 38 | ; | ||
| 39 | } | ||
| 40 | |||
| 41 | static void ar7_machine_power_off(void) | ||
| 42 | { | ||
| 43 | u32 *power_reg = (u32 *)ioremap(AR7_REGS_POWER, 1); | ||
| 44 | u32 power_state = readl(power_reg) | (3 << 30); | ||
| 45 | writel(power_state, power_reg); | ||
| 46 | ar7_machine_halt(); | ||
| 47 | } | ||
| 48 | |||
| 49 | const char *get_system_type(void) | ||
| 50 | { | ||
| 51 | u16 chip_id = ar7_chip_id(); | ||
| 52 | switch (chip_id) { | ||
| 53 | case AR7_CHIP_7300: | ||
| 54 | return "TI AR7 (TNETD7300)"; | ||
| 55 | case AR7_CHIP_7100: | ||
| 56 | return "TI AR7 (TNETD7100)"; | ||
| 57 | case AR7_CHIP_7200: | ||
| 58 | return "TI AR7 (TNETD7200)"; | ||
| 59 | default: | ||
| 60 | return "TI AR7 (Unknown)"; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | static int __init ar7_init_console(void) | ||
| 65 | { | ||
| 66 | return 0; | ||
| 67 | } | ||
| 68 | console_initcall(ar7_init_console); | ||
| 69 | |||
| 70 | /* | ||
| 71 | * Initializes basic routines and structures pointers, memory size (as | ||
| 72 | * given by the bios and saves the command line. | ||
| 73 | */ | ||
| 74 | |||
| 75 | void __init plat_mem_setup(void) | ||
| 76 | { | ||
| 77 | unsigned long io_base; | ||
| 78 | |||
| 79 | _machine_restart = ar7_machine_restart; | ||
| 80 | _machine_halt = ar7_machine_halt; | ||
| 81 | pm_power_off = ar7_machine_power_off; | ||
| 82 | panic_timeout = 3; | ||
| 83 | |||
| 84 | io_base = (unsigned long)ioremap(AR7_REGS_BASE, 0x10000); | ||
| 85 | if (!io_base) | ||
| 86 | panic("Can't remap IO base!\n"); | ||
| 87 | set_io_port_base(io_base); | ||
| 88 | |||
| 89 | prom_meminit(); | ||
| 90 | |||
| 91 | printk(KERN_INFO "%s, ID: 0x%04x, Revision: 0x%02x\n", | ||
| 92 | get_system_type(), | ||
| 93 | ar7_chip_id(), ar7_chip_rev()); | ||
| 94 | } | ||
diff --git a/arch/mips/ar7/time.c b/arch/mips/ar7/time.c new file mode 100644 index 000000000000..a1fba894daa2 --- /dev/null +++ b/arch/mips/ar7/time.c | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * Carsten Langgaard, carstenl@mips.com | ||
| 3 | * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * This program is free software; you can distribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License (Version 2) as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 12 | * for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License along | ||
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 17 | * | ||
| 18 | * Setting up the clock on the MIPS boards. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/init.h> | ||
| 22 | #include <linux/time.h> | ||
| 23 | |||
| 24 | #include <asm/time.h> | ||
| 25 | #include <asm/mach-ar7/ar7.h> | ||
| 26 | |||
| 27 | void __init plat_time_init(void) | ||
| 28 | { | ||
| 29 | mips_hpt_frequency = ar7_cpu_freq() / 2; | ||
| 30 | } | ||
diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile index 7c0528b0e34c..d6903c3f3d51 100644 --- a/arch/mips/cavium-octeon/Makefile +++ b/arch/mips/cavium-octeon/Makefile | |||
| @@ -14,9 +14,5 @@ obj-y += dma-octeon.o flash_setup.o | |||
| 14 | obj-y += octeon-memcpy.o | 14 | obj-y += octeon-memcpy.o |
| 15 | 15 | ||
| 16 | obj-$(CONFIG_SMP) += smp.o | 16 | obj-$(CONFIG_SMP) += smp.o |
| 17 | obj-$(CONFIG_PCI) += pci-common.o | ||
| 18 | obj-$(CONFIG_PCI) += pci.o | ||
| 19 | obj-$(CONFIG_PCI) += pcie.o | ||
| 20 | obj-$(CONFIG_PCI_MSI) += msi.o | ||
| 21 | 17 | ||
| 22 | EXTRA_CFLAGS += -Werror | 18 | EXTRA_CFLAGS += -Werror |
diff --git a/arch/mips/cavium-octeon/dma-octeon.c b/arch/mips/cavium-octeon/dma-octeon.c index 627c162a6159..4b92bfc662db 100644 --- a/arch/mips/cavium-octeon/dma-octeon.c +++ b/arch/mips/cavium-octeon/dma-octeon.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <dma-coherence.h> | 29 | #include <dma-coherence.h> |
| 30 | 30 | ||
| 31 | #ifdef CONFIG_PCI | 31 | #ifdef CONFIG_PCI |
| 32 | #include "pci-common.h" | 32 | #include <asm/octeon/pci-octeon.h> |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | #define BAR2_PCI_ADDRESS 0x8000000000ul | 35 | #define BAR2_PCI_ADDRESS 0x8000000000ul |
diff --git a/arch/mips/cavium-octeon/pci-common.c b/arch/mips/cavium-octeon/pci-common.c deleted file mode 100644 index cd029f88da7f..000000000000 --- a/arch/mips/cavium-octeon/pci-common.c +++ /dev/null | |||
| @@ -1,137 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2005-2007 Cavium Networks | ||
| 7 | */ | ||
| 8 | #include <linux/kernel.h> | ||
| 9 | #include <linux/init.h> | ||
| 10 | #include <linux/pci.h> | ||
| 11 | #include <linux/interrupt.h> | ||
| 12 | #include <linux/time.h> | ||
| 13 | #include <linux/delay.h> | ||
| 14 | #include "pci-common.h" | ||
| 15 | |||
| 16 | typeof(pcibios_map_irq) *octeon_pcibios_map_irq; | ||
| 17 | enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID; | ||
| 18 | |||
| 19 | /** | ||
| 20 | * Map a PCI device to the appropriate interrupt line | ||
| 21 | * | ||
| 22 | * @param dev The Linux PCI device structure for the device to map | ||
| 23 | * @param slot The slot number for this device on __BUS 0__. Linux | ||
| 24 | * enumerates through all the bridges and figures out the | ||
| 25 | * slot on Bus 0 where this device eventually hooks to. | ||
| 26 | * @param pin The PCI interrupt pin read from the device, then swizzled | ||
| 27 | * as it goes through each bridge. | ||
| 28 | * @return Interrupt number for the device | ||
| 29 | */ | ||
| 30 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||
| 31 | { | ||
| 32 | if (octeon_pcibios_map_irq) | ||
| 33 | return octeon_pcibios_map_irq(dev, slot, pin); | ||
| 34 | else | ||
| 35 | panic("octeon_pcibios_map_irq doesn't point to a " | ||
| 36 | "pcibios_map_irq() function"); | ||
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | /** | ||
| 41 | * Called to perform platform specific PCI setup | ||
| 42 | * | ||
| 43 | * @param dev | ||
| 44 | * @return | ||
| 45 | */ | ||
| 46 | int pcibios_plat_dev_init(struct pci_dev *dev) | ||
| 47 | { | ||
| 48 | uint16_t config; | ||
| 49 | uint32_t dconfig; | ||
| 50 | int pos; | ||
| 51 | /* | ||
| 52 | * Force the Cache line setting to 64 bytes. The standard | ||
| 53 | * Linux bus scan doesn't seem to set it. Octeon really has | ||
| 54 | * 128 byte lines, but Intel bridges get really upset if you | ||
| 55 | * try and set values above 64 bytes. Value is specified in | ||
| 56 | * 32bit words. | ||
| 57 | */ | ||
| 58 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 64 / 4); | ||
| 59 | /* Set latency timers for all devices */ | ||
| 60 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 48); | ||
| 61 | |||
| 62 | /* Enable reporting System errors and parity errors on all devices */ | ||
| 63 | /* Enable parity checking and error reporting */ | ||
| 64 | pci_read_config_word(dev, PCI_COMMAND, &config); | ||
| 65 | config |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR; | ||
| 66 | pci_write_config_word(dev, PCI_COMMAND, config); | ||
| 67 | |||
| 68 | if (dev->subordinate) { | ||
| 69 | /* Set latency timers on sub bridges */ | ||
| 70 | pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, 48); | ||
| 71 | /* More bridge error detection */ | ||
| 72 | pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &config); | ||
| 73 | config |= PCI_BRIDGE_CTL_PARITY | PCI_BRIDGE_CTL_SERR; | ||
| 74 | pci_write_config_word(dev, PCI_BRIDGE_CONTROL, config); | ||
| 75 | } | ||
| 76 | |||
| 77 | /* Enable the PCIe normal error reporting */ | ||
| 78 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | ||
| 79 | if (pos) { | ||
| 80 | /* Update Device Control */ | ||
| 81 | pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &config); | ||
| 82 | /* Correctable Error Reporting */ | ||
| 83 | config |= PCI_EXP_DEVCTL_CERE; | ||
| 84 | /* Non-Fatal Error Reporting */ | ||
| 85 | config |= PCI_EXP_DEVCTL_NFERE; | ||
| 86 | /* Fatal Error Reporting */ | ||
| 87 | config |= PCI_EXP_DEVCTL_FERE; | ||
| 88 | /* Unsupported Request */ | ||
| 89 | config |= PCI_EXP_DEVCTL_URRE; | ||
| 90 | pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, config); | ||
| 91 | } | ||
| 92 | |||
| 93 | /* Find the Advanced Error Reporting capability */ | ||
| 94 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); | ||
| 95 | if (pos) { | ||
| 96 | /* Clear Uncorrectable Error Status */ | ||
| 97 | pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, | ||
| 98 | &dconfig); | ||
| 99 | pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, | ||
| 100 | dconfig); | ||
| 101 | /* Enable reporting of all uncorrectable errors */ | ||
| 102 | /* Uncorrectable Error Mask - turned on bits disable errors */ | ||
| 103 | pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, 0); | ||
| 104 | /* | ||
| 105 | * Leave severity at HW default. This only controls if | ||
| 106 | * errors are reported as uncorrectable or | ||
| 107 | * correctable, not if the error is reported. | ||
| 108 | */ | ||
| 109 | /* PCI_ERR_UNCOR_SEVER - Uncorrectable Error Severity */ | ||
| 110 | /* Clear Correctable Error Status */ | ||
| 111 | pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS, &dconfig); | ||
| 112 | pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, dconfig); | ||
| 113 | /* Enable reporting of all correctable errors */ | ||
| 114 | /* Correctable Error Mask - turned on bits disable errors */ | ||
| 115 | pci_write_config_dword(dev, pos + PCI_ERR_COR_MASK, 0); | ||
| 116 | /* Advanced Error Capabilities */ | ||
| 117 | pci_read_config_dword(dev, pos + PCI_ERR_CAP, &dconfig); | ||
| 118 | /* ECRC Generation Enable */ | ||
| 119 | if (config & PCI_ERR_CAP_ECRC_GENC) | ||
| 120 | config |= PCI_ERR_CAP_ECRC_GENE; | ||
| 121 | /* ECRC Check Enable */ | ||
| 122 | if (config & PCI_ERR_CAP_ECRC_CHKC) | ||
| 123 | config |= PCI_ERR_CAP_ECRC_CHKE; | ||
| 124 | pci_write_config_dword(dev, pos + PCI_ERR_CAP, dconfig); | ||
| 125 | /* PCI_ERR_HEADER_LOG - Header Log Register (16 bytes) */ | ||
| 126 | /* Report all errors to the root complex */ | ||
| 127 | pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, | ||
| 128 | PCI_ERR_ROOT_CMD_COR_EN | | ||
| 129 | PCI_ERR_ROOT_CMD_NONFATAL_EN | | ||
| 130 | PCI_ERR_ROOT_CMD_FATAL_EN); | ||
| 131 | /* Clear the Root status register */ | ||
| 132 | pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &dconfig); | ||
| 133 | pci_write_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, dconfig); | ||
| 134 | } | ||
| 135 | |||
| 136 | return 0; | ||
| 137 | } | ||
diff --git a/arch/mips/cobalt/buttons.c b/arch/mips/cobalt/buttons.c index 9e143989c7b8..4eaec8b46e0c 100644 --- a/arch/mips/cobalt/buttons.c +++ b/arch/mips/cobalt/buttons.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Cobalt buttons platform device. | 2 | * Cobalt buttons platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cobalt/lcd.c b/arch/mips/cobalt/lcd.c index 0720e4fae311..0f1cd90f37ed 100644 --- a/arch/mips/cobalt/lcd.c +++ b/arch/mips/cobalt/lcd.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Registration of Cobalt LCD platform device. | 2 | * Registration of Cobalt LCD platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cobalt/led.c b/arch/mips/cobalt/led.c index 1c6ebd468b07..d3ce6fa1dc74 100644 --- a/arch/mips/cobalt/led.c +++ b/arch/mips/cobalt/led.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Registration of Cobalt LED platform device. | 2 | * Registration of Cobalt LED platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cobalt/mtd.c b/arch/mips/cobalt/mtd.c index 2b088ef3839a..691d620b6766 100644 --- a/arch/mips/cobalt/mtd.c +++ b/arch/mips/cobalt/mtd.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Registration of Cobalt MTD device. | 2 | * Registration of Cobalt MTD device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2006 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cobalt/rtc.c b/arch/mips/cobalt/rtc.c index e70794b8bcba..3ab39898b4e4 100644 --- a/arch/mips/cobalt/rtc.c +++ b/arch/mips/cobalt/rtc.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Registration of Cobalt RTC platform device. | 2 | * Registration of Cobalt RTC platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cobalt/serial.c b/arch/mips/cobalt/serial.c index 53b8d0d6da90..7cb51f57275e 100644 --- a/arch/mips/cobalt/serial.c +++ b/arch/mips/cobalt/serial.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Registration of Cobalt UART platform device. | 2 | * Registration of Cobalt UART platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cobalt/time.c b/arch/mips/cobalt/time.c index 4a570e7145fe..0162f9edc693 100644 --- a/arch/mips/cobalt/time.c +++ b/arch/mips/cobalt/time.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Cobalt time initialization. | 2 | * Cobalt time initialization. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/configs/ar7_defconfig b/arch/mips/configs/ar7_defconfig new file mode 100644 index 000000000000..dad5b6769d74 --- /dev/null +++ b/arch/mips/configs/ar7_defconfig | |||
| @@ -0,0 +1,1182 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.30 | ||
| 4 | # Wed Jun 24 14:08:59 2009 | ||
| 5 | # | ||
| 6 | CONFIG_MIPS=y | ||
| 7 | |||
| 8 | # | ||
| 9 | # Machine selection | ||
| 10 | # | ||
| 11 | # CONFIG_MACH_ALCHEMY is not set | ||
| 12 | CONFIG_AR7=y | ||
| 13 | # CONFIG_BASLER_EXCITE is not set | ||
| 14 | # CONFIG_BCM47XX is not set | ||
| 15 | # CONFIG_MIPS_COBALT is not set | ||
| 16 | # CONFIG_MACH_DECSTATION is not set | ||
| 17 | # CONFIG_MACH_JAZZ is not set | ||
| 18 | # CONFIG_LASAT is not set | ||
| 19 | # CONFIG_LEMOTE_FULONG is not set | ||
| 20 | # CONFIG_MIPS_MALTA is not set | ||
| 21 | # CONFIG_MIPS_SIM is not set | ||
| 22 | # CONFIG_NEC_MARKEINS is not set | ||
| 23 | # CONFIG_MACH_VR41XX is not set | ||
| 24 | # CONFIG_NXP_STB220 is not set | ||
| 25 | # CONFIG_NXP_STB225 is not set | ||
| 26 | # CONFIG_PNX8550_JBS is not set | ||
| 27 | # CONFIG_PNX8550_STB810 is not set | ||
| 28 | # CONFIG_PMC_MSP is not set | ||
| 29 | # CONFIG_PMC_YOSEMITE is not set | ||
| 30 | # CONFIG_SGI_IP22 is not set | ||
| 31 | # CONFIG_SGI_IP27 is not set | ||
| 32 | # CONFIG_SGI_IP28 is not set | ||
| 33 | # CONFIG_SGI_IP32 is not set | ||
| 34 | # CONFIG_SIBYTE_CRHINE is not set | ||
| 35 | # CONFIG_SIBYTE_CARMEL is not set | ||
| 36 | # CONFIG_SIBYTE_CRHONE is not set | ||
| 37 | # CONFIG_SIBYTE_RHONE is not set | ||
| 38 | # CONFIG_SIBYTE_SWARM is not set | ||
| 39 | # CONFIG_SIBYTE_LITTLESUR is not set | ||
| 40 | # CONFIG_SIBYTE_SENTOSA is not set | ||
| 41 | # CONFIG_SIBYTE_BIGSUR is not set | ||
| 42 | # CONFIG_SNI_RM is not set | ||
| 43 | # CONFIG_MACH_TX39XX is not set | ||
| 44 | # CONFIG_MACH_TX49XX is not set | ||
| 45 | # CONFIG_MIKROTIK_RB532 is not set | ||
| 46 | # CONFIG_WR_PPMC is not set | ||
| 47 | # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set | ||
| 48 | # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set | ||
| 49 | # CONFIG_ALCHEMY_GPIO_INDIRECT is not set | ||
| 50 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 51 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
| 52 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
| 53 | CONFIG_ARCH_SUPPORTS_OPROFILE=y | ||
| 54 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 55 | CONFIG_GENERIC_HWEIGHT=y | ||
| 56 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 57 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
| 58 | CONFIG_GENERIC_TIME=y | ||
| 59 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
| 60 | CONFIG_SCHED_OMIT_FRAME_POINTER=y | ||
| 61 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
| 62 | CONFIG_CEVT_R4K_LIB=y | ||
| 63 | CONFIG_CEVT_R4K=y | ||
| 64 | CONFIG_CSRC_R4K_LIB=y | ||
| 65 | CONFIG_CSRC_R4K=y | ||
| 66 | CONFIG_DMA_NONCOHERENT=y | ||
| 67 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
| 68 | CONFIG_EARLY_PRINTK=y | ||
| 69 | CONFIG_SYS_HAS_EARLY_PRINTK=y | ||
| 70 | # CONFIG_HOTPLUG_CPU is not set | ||
| 71 | # CONFIG_NO_IOPORT is not set | ||
| 72 | CONFIG_GENERIC_GPIO=y | ||
| 73 | # CONFIG_CPU_BIG_ENDIAN is not set | ||
| 74 | CONFIG_CPU_LITTLE_ENDIAN=y | ||
| 75 | CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y | ||
| 76 | CONFIG_IRQ_CPU=y | ||
| 77 | CONFIG_NO_EXCEPT_FILL=y | ||
| 78 | CONFIG_SWAP_IO_SPACE=y | ||
| 79 | CONFIG_BOOT_ELF32=y | ||
| 80 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | ||
| 81 | |||
| 82 | # | ||
| 83 | # CPU selection | ||
| 84 | # | ||
| 85 | # CONFIG_CPU_LOONGSON2 is not set | ||
| 86 | CONFIG_CPU_MIPS32_R1=y | ||
| 87 | # CONFIG_CPU_MIPS32_R2 is not set | ||
| 88 | # CONFIG_CPU_MIPS64_R1 is not set | ||
| 89 | # CONFIG_CPU_MIPS64_R2 is not set | ||
| 90 | # CONFIG_CPU_R3000 is not set | ||
| 91 | # CONFIG_CPU_TX39XX is not set | ||
| 92 | # CONFIG_CPU_VR41XX is not set | ||
| 93 | # CONFIG_CPU_R4300 is not set | ||
| 94 | # CONFIG_CPU_R4X00 is not set | ||
| 95 | # CONFIG_CPU_TX49XX is not set | ||
| 96 | # CONFIG_CPU_R5000 is not set | ||
| 97 | # CONFIG_CPU_R5432 is not set | ||
| 98 | # CONFIG_CPU_R5500 is not set | ||
| 99 | # CONFIG_CPU_R6000 is not set | ||
| 100 | # CONFIG_CPU_NEVADA is not set | ||
| 101 | # CONFIG_CPU_R8000 is not set | ||
| 102 | # CONFIG_CPU_R10000 is not set | ||
| 103 | # CONFIG_CPU_RM7000 is not set | ||
| 104 | # CONFIG_CPU_RM9000 is not set | ||
| 105 | # CONFIG_CPU_SB1 is not set | ||
| 106 | # CONFIG_CPU_CAVIUM_OCTEON is not set | ||
| 107 | CONFIG_SYS_HAS_CPU_MIPS32_R1=y | ||
| 108 | CONFIG_CPU_MIPS32=y | ||
| 109 | CONFIG_CPU_MIPSR1=y | ||
| 110 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y | ||
| 111 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y | ||
| 112 | CONFIG_HARDWARE_WATCHPOINTS=y | ||
| 113 | |||
| 114 | # | ||
| 115 | # Kernel type | ||
| 116 | # | ||
| 117 | CONFIG_32BIT=y | ||
| 118 | # CONFIG_64BIT is not set | ||
| 119 | CONFIG_PAGE_SIZE_4KB=y | ||
| 120 | # CONFIG_PAGE_SIZE_8KB is not set | ||
| 121 | # CONFIG_PAGE_SIZE_16KB is not set | ||
| 122 | # CONFIG_PAGE_SIZE_32KB is not set | ||
| 123 | # CONFIG_PAGE_SIZE_64KB is not set | ||
| 124 | CONFIG_CPU_HAS_PREFETCH=y | ||
| 125 | CONFIG_MIPS_MT_DISABLED=y | ||
| 126 | # CONFIG_MIPS_MT_SMP is not set | ||
| 127 | # CONFIG_MIPS_MT_SMTC is not set | ||
| 128 | CONFIG_CPU_HAS_LLSC=y | ||
| 129 | CONFIG_CPU_HAS_SYNC=y | ||
| 130 | CONFIG_GENERIC_HARDIRQS=y | ||
| 131 | CONFIG_GENERIC_IRQ_PROBE=y | ||
| 132 | CONFIG_CPU_SUPPORTS_HIGHMEM=y | ||
| 133 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
| 134 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
| 135 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 136 | CONFIG_FLATMEM_MANUAL=y | ||
| 137 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 138 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 139 | CONFIG_FLATMEM=y | ||
| 140 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 141 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 142 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 143 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
| 144 | CONFIG_ZONE_DMA_FLAG=0 | ||
| 145 | CONFIG_VIRT_TO_BUS=y | ||
| 146 | CONFIG_HAVE_MLOCK=y | ||
| 147 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
| 148 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
| 149 | CONFIG_TICK_ONESHOT=y | ||
| 150 | # CONFIG_NO_HZ is not set | ||
| 151 | CONFIG_HIGH_RES_TIMERS=y | ||
| 152 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
| 153 | # CONFIG_HZ_48 is not set | ||
| 154 | CONFIG_HZ_100=y | ||
| 155 | # CONFIG_HZ_128 is not set | ||
| 156 | # CONFIG_HZ_250 is not set | ||
| 157 | # CONFIG_HZ_256 is not set | ||
| 158 | # CONFIG_HZ_1000 is not set | ||
| 159 | # CONFIG_HZ_1024 is not set | ||
| 160 | CONFIG_SYS_SUPPORTS_ARBIT_HZ=y | ||
| 161 | CONFIG_HZ=100 | ||
| 162 | CONFIG_PREEMPT_NONE=y | ||
| 163 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
| 164 | # CONFIG_PREEMPT is not set | ||
| 165 | CONFIG_KEXEC=y | ||
| 166 | # CONFIG_SECCOMP is not set | ||
| 167 | CONFIG_LOCKDEP_SUPPORT=y | ||
| 168 | CONFIG_STACKTRACE_SUPPORT=y | ||
| 169 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 170 | |||
| 171 | # | ||
| 172 | # General setup | ||
| 173 | # | ||
| 174 | CONFIG_EXPERIMENTAL=y | ||
| 175 | CONFIG_BROKEN_ON_SMP=y | ||
| 176 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 177 | CONFIG_LOCALVERSION="" | ||
| 178 | # CONFIG_LOCALVERSION_AUTO is not set | ||
| 179 | CONFIG_SWAP=y | ||
| 180 | CONFIG_SYSVIPC=y | ||
| 181 | CONFIG_SYSVIPC_SYSCTL=y | ||
| 182 | # CONFIG_POSIX_MQUEUE is not set | ||
| 183 | CONFIG_BSD_PROCESS_ACCT=y | ||
| 184 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
| 185 | # CONFIG_TASKSTATS is not set | ||
| 186 | # CONFIG_AUDIT is not set | ||
| 187 | |||
| 188 | # | ||
| 189 | # RCU Subsystem | ||
| 190 | # | ||
| 191 | CONFIG_CLASSIC_RCU=y | ||
| 192 | # CONFIG_TREE_RCU is not set | ||
| 193 | # CONFIG_PREEMPT_RCU is not set | ||
| 194 | # CONFIG_TREE_RCU_TRACE is not set | ||
| 195 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
| 196 | # CONFIG_IKCONFIG is not set | ||
| 197 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 198 | # CONFIG_GROUP_SCHED is not set | ||
| 199 | # CONFIG_CGROUPS is not set | ||
| 200 | CONFIG_SYSFS_DEPRECATED=y | ||
| 201 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
| 202 | CONFIG_RELAY=y | ||
| 203 | # CONFIG_NAMESPACES is not set | ||
| 204 | CONFIG_BLK_DEV_INITRD=y | ||
| 205 | CONFIG_INITRAMFS_SOURCE="" | ||
| 206 | CONFIG_RD_GZIP=y | ||
| 207 | # CONFIG_RD_BZIP2 is not set | ||
| 208 | CONFIG_RD_LZMA=y | ||
| 209 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 210 | CONFIG_SYSCTL=y | ||
| 211 | CONFIG_ANON_INODES=y | ||
| 212 | CONFIG_EMBEDDED=y | ||
| 213 | CONFIG_SYSCTL_SYSCALL=y | ||
| 214 | # CONFIG_KALLSYMS is not set | ||
| 215 | CONFIG_HOTPLUG=y | ||
| 216 | CONFIG_PRINTK=y | ||
| 217 | CONFIG_BUG=y | ||
| 218 | # CONFIG_ELF_CORE is not set | ||
| 219 | # CONFIG_PCSPKR_PLATFORM is not set | ||
| 220 | CONFIG_BASE_FULL=y | ||
| 221 | CONFIG_FUTEX=y | ||
| 222 | CONFIG_EPOLL=y | ||
| 223 | CONFIG_SIGNALFD=y | ||
| 224 | CONFIG_TIMERFD=y | ||
| 225 | CONFIG_EVENTFD=y | ||
| 226 | CONFIG_SHMEM=y | ||
| 227 | CONFIG_AIO=y | ||
| 228 | |||
| 229 | # | ||
| 230 | # Performance Counters | ||
| 231 | # | ||
| 232 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
| 233 | CONFIG_STRIP_ASM_SYMS=y | ||
| 234 | # CONFIG_COMPAT_BRK is not set | ||
| 235 | CONFIG_SLAB=y | ||
| 236 | # CONFIG_SLUB is not set | ||
| 237 | # CONFIG_SLOB is not set | ||
| 238 | # CONFIG_PROFILING is not set | ||
| 239 | # CONFIG_MARKERS is not set | ||
| 240 | CONFIG_HAVE_OPROFILE=y | ||
| 241 | # CONFIG_SLOW_WORK is not set | ||
| 242 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | ||
| 243 | CONFIG_SLABINFO=y | ||
| 244 | CONFIG_RT_MUTEXES=y | ||
| 245 | CONFIG_BASE_SMALL=0 | ||
| 246 | CONFIG_MODULES=y | ||
| 247 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
| 248 | CONFIG_MODULE_UNLOAD=y | ||
| 249 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 250 | # CONFIG_MODVERSIONS is not set | ||
| 251 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 252 | CONFIG_BLOCK=y | ||
| 253 | # CONFIG_LBD is not set | ||
| 254 | # CONFIG_BLK_DEV_BSG is not set | ||
| 255 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
| 256 | |||
| 257 | # | ||
| 258 | # IO Schedulers | ||
| 259 | # | ||
| 260 | CONFIG_IOSCHED_NOOP=y | ||
| 261 | # CONFIG_IOSCHED_AS is not set | ||
| 262 | CONFIG_IOSCHED_DEADLINE=y | ||
| 263 | # CONFIG_IOSCHED_CFQ is not set | ||
| 264 | # CONFIG_DEFAULT_AS is not set | ||
| 265 | CONFIG_DEFAULT_DEADLINE=y | ||
| 266 | # CONFIG_DEFAULT_CFQ is not set | ||
| 267 | # CONFIG_DEFAULT_NOOP is not set | ||
| 268 | CONFIG_DEFAULT_IOSCHED="deadline" | ||
| 269 | CONFIG_PROBE_INITRD_HEADER=y | ||
| 270 | # CONFIG_FREEZER is not set | ||
| 271 | |||
| 272 | # | ||
| 273 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | ||
| 274 | # | ||
| 275 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
| 276 | CONFIG_MMU=y | ||
| 277 | # CONFIG_PCCARD is not set | ||
| 278 | |||
| 279 | # | ||
| 280 | # Executable file formats | ||
| 281 | # | ||
| 282 | CONFIG_BINFMT_ELF=y | ||
| 283 | # CONFIG_HAVE_AOUT is not set | ||
| 284 | # CONFIG_BINFMT_MISC is not set | ||
| 285 | CONFIG_TRAD_SIGNALS=y | ||
| 286 | |||
| 287 | # | ||
| 288 | # Power management options | ||
| 289 | # | ||
| 290 | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | ||
| 291 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
| 292 | # CONFIG_PM is not set | ||
| 293 | CONFIG_NET=y | ||
| 294 | |||
| 295 | # | ||
| 296 | # Networking options | ||
| 297 | # | ||
| 298 | CONFIG_PACKET=y | ||
| 299 | CONFIG_PACKET_MMAP=y | ||
| 300 | CONFIG_UNIX=y | ||
| 301 | # CONFIG_NET_KEY is not set | ||
| 302 | CONFIG_INET=y | ||
| 303 | CONFIG_IP_MULTICAST=y | ||
| 304 | CONFIG_IP_ADVANCED_ROUTER=y | ||
| 305 | CONFIG_ASK_IP_FIB_HASH=y | ||
| 306 | # CONFIG_IP_FIB_TRIE is not set | ||
| 307 | CONFIG_IP_FIB_HASH=y | ||
| 308 | CONFIG_IP_MULTIPLE_TABLES=y | ||
| 309 | CONFIG_IP_ROUTE_MULTIPATH=y | ||
| 310 | CONFIG_IP_ROUTE_VERBOSE=y | ||
| 311 | # CONFIG_IP_PNP is not set | ||
| 312 | # CONFIG_NET_IPIP is not set | ||
| 313 | # CONFIG_NET_IPGRE is not set | ||
| 314 | CONFIG_IP_MROUTE=y | ||
| 315 | # CONFIG_IP_PIMSM_V1 is not set | ||
| 316 | # CONFIG_IP_PIMSM_V2 is not set | ||
| 317 | CONFIG_ARPD=y | ||
| 318 | CONFIG_SYN_COOKIES=y | ||
| 319 | # CONFIG_INET_AH is not set | ||
| 320 | # CONFIG_INET_ESP is not set | ||
| 321 | # CONFIG_INET_IPCOMP is not set | ||
| 322 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 323 | # CONFIG_INET_TUNNEL is not set | ||
| 324 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
| 325 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
| 326 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
| 327 | # CONFIG_INET_LRO is not set | ||
| 328 | # CONFIG_INET_DIAG is not set | ||
| 329 | CONFIG_TCP_CONG_ADVANCED=y | ||
| 330 | # CONFIG_TCP_CONG_BIC is not set | ||
| 331 | # CONFIG_TCP_CONG_CUBIC is not set | ||
| 332 | CONFIG_TCP_CONG_WESTWOOD=y | ||
| 333 | # CONFIG_TCP_CONG_HTCP is not set | ||
| 334 | # CONFIG_TCP_CONG_HSTCP is not set | ||
| 335 | # CONFIG_TCP_CONG_HYBLA is not set | ||
| 336 | # CONFIG_TCP_CONG_VEGAS is not set | ||
| 337 | # CONFIG_TCP_CONG_SCALABLE is not set | ||
| 338 | # CONFIG_TCP_CONG_LP is not set | ||
| 339 | # CONFIG_TCP_CONG_VENO is not set | ||
| 340 | # CONFIG_TCP_CONG_YEAH is not set | ||
| 341 | # CONFIG_TCP_CONG_ILLINOIS is not set | ||
| 342 | # CONFIG_DEFAULT_BIC is not set | ||
| 343 | # CONFIG_DEFAULT_CUBIC is not set | ||
| 344 | # CONFIG_DEFAULT_HTCP is not set | ||
| 345 | # CONFIG_DEFAULT_VEGAS is not set | ||
| 346 | CONFIG_DEFAULT_WESTWOOD=y | ||
| 347 | # CONFIG_DEFAULT_RENO is not set | ||
| 348 | CONFIG_DEFAULT_TCP_CONG="westwood" | ||
| 349 | # CONFIG_TCP_MD5SIG is not set | ||
| 350 | # CONFIG_IPV6 is not set | ||
| 351 | # CONFIG_NETWORK_SECMARK is not set | ||
| 352 | CONFIG_NETFILTER=y | ||
| 353 | # CONFIG_NETFILTER_DEBUG is not set | ||
| 354 | CONFIG_NETFILTER_ADVANCED=y | ||
| 355 | # CONFIG_BRIDGE_NETFILTER is not set | ||
| 356 | |||
| 357 | # | ||
| 358 | # Core Netfilter Configuration | ||
| 359 | # | ||
| 360 | # CONFIG_NETFILTER_NETLINK_QUEUE is not set | ||
| 361 | # CONFIG_NETFILTER_NETLINK_LOG is not set | ||
| 362 | CONFIG_NF_CONNTRACK=m | ||
| 363 | # CONFIG_NF_CT_ACCT is not set | ||
| 364 | CONFIG_NF_CONNTRACK_MARK=y | ||
| 365 | # CONFIG_NF_CONNTRACK_EVENTS is not set | ||
| 366 | # CONFIG_NF_CT_PROTO_DCCP is not set | ||
| 367 | # CONFIG_NF_CT_PROTO_SCTP is not set | ||
| 368 | # CONFIG_NF_CT_PROTO_UDPLITE is not set | ||
| 369 | # CONFIG_NF_CONNTRACK_AMANDA is not set | ||
| 370 | CONFIG_NF_CONNTRACK_FTP=m | ||
| 371 | # CONFIG_NF_CONNTRACK_H323 is not set | ||
| 372 | CONFIG_NF_CONNTRACK_IRC=m | ||
| 373 | # CONFIG_NF_CONNTRACK_NETBIOS_NS is not set | ||
| 374 | # CONFIG_NF_CONNTRACK_PPTP is not set | ||
| 375 | # CONFIG_NF_CONNTRACK_SANE is not set | ||
| 376 | # CONFIG_NF_CONNTRACK_SIP is not set | ||
| 377 | CONFIG_NF_CONNTRACK_TFTP=m | ||
| 378 | # CONFIG_NF_CT_NETLINK is not set | ||
| 379 | # CONFIG_NETFILTER_TPROXY is not set | ||
| 380 | CONFIG_NETFILTER_XTABLES=m | ||
| 381 | # CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set | ||
| 382 | # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set | ||
| 383 | # CONFIG_NETFILTER_XT_TARGET_DSCP is not set | ||
| 384 | # CONFIG_NETFILTER_XT_TARGET_HL is not set | ||
| 385 | # CONFIG_NETFILTER_XT_TARGET_LED is not set | ||
| 386 | # CONFIG_NETFILTER_XT_TARGET_MARK is not set | ||
| 387 | # CONFIG_NETFILTER_XT_TARGET_NFLOG is not set | ||
| 388 | # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set | ||
| 389 | CONFIG_NETFILTER_XT_TARGET_NOTRACK=m | ||
| 390 | # CONFIG_NETFILTER_XT_TARGET_RATEEST is not set | ||
| 391 | # CONFIG_NETFILTER_XT_TARGET_TRACE is not set | ||
| 392 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | ||
| 393 | # CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set | ||
| 394 | # CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set | ||
| 395 | # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set | ||
| 396 | # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set | ||
| 397 | # CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set | ||
| 398 | # CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set | ||
| 399 | # CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set | ||
| 400 | # CONFIG_NETFILTER_XT_MATCH_DCCP is not set | ||
| 401 | # CONFIG_NETFILTER_XT_MATCH_DSCP is not set | ||
| 402 | # CONFIG_NETFILTER_XT_MATCH_ESP is not set | ||
| 403 | # CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set | ||
| 404 | # CONFIG_NETFILTER_XT_MATCH_HELPER is not set | ||
| 405 | # CONFIG_NETFILTER_XT_MATCH_HL is not set | ||
| 406 | # CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set | ||
| 407 | # CONFIG_NETFILTER_XT_MATCH_LENGTH is not set | ||
| 408 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
| 409 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
| 410 | # CONFIG_NETFILTER_XT_MATCH_MARK is not set | ||
| 411 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
| 412 | # CONFIG_NETFILTER_XT_MATCH_OWNER is not set | ||
| 413 | # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set | ||
| 414 | # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set | ||
| 415 | # CONFIG_NETFILTER_XT_MATCH_RATEEST is not set | ||
| 416 | # CONFIG_NETFILTER_XT_MATCH_REALM is not set | ||
| 417 | # CONFIG_NETFILTER_XT_MATCH_RECENT is not set | ||
| 418 | # CONFIG_NETFILTER_XT_MATCH_SCTP is not set | ||
| 419 | CONFIG_NETFILTER_XT_MATCH_STATE=m | ||
| 420 | # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set | ||
| 421 | # CONFIG_NETFILTER_XT_MATCH_STRING is not set | ||
| 422 | # CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set | ||
| 423 | # CONFIG_NETFILTER_XT_MATCH_TIME is not set | ||
| 424 | # CONFIG_NETFILTER_XT_MATCH_U32 is not set | ||
| 425 | # CONFIG_IP_VS is not set | ||
| 426 | |||
| 427 | # | ||
| 428 | # IP: Netfilter Configuration | ||
| 429 | # | ||
| 430 | CONFIG_NF_DEFRAG_IPV4=m | ||
| 431 | CONFIG_NF_CONNTRACK_IPV4=m | ||
| 432 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | ||
| 433 | # CONFIG_IP_NF_QUEUE is not set | ||
| 434 | CONFIG_IP_NF_IPTABLES=m | ||
| 435 | # CONFIG_IP_NF_MATCH_ADDRTYPE is not set | ||
| 436 | # CONFIG_IP_NF_MATCH_AH is not set | ||
| 437 | # CONFIG_IP_NF_MATCH_ECN is not set | ||
| 438 | # CONFIG_IP_NF_MATCH_TTL is not set | ||
| 439 | CONFIG_IP_NF_FILTER=m | ||
| 440 | CONFIG_IP_NF_TARGET_REJECT=m | ||
| 441 | CONFIG_IP_NF_TARGET_LOG=m | ||
| 442 | # CONFIG_IP_NF_TARGET_ULOG is not set | ||
| 443 | CONFIG_NF_NAT=m | ||
| 444 | CONFIG_NF_NAT_NEEDED=y | ||
| 445 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
| 446 | # CONFIG_IP_NF_TARGET_NETMAP is not set | ||
| 447 | # CONFIG_IP_NF_TARGET_REDIRECT is not set | ||
| 448 | # CONFIG_NF_NAT_SNMP_BASIC is not set | ||
| 449 | CONFIG_NF_NAT_FTP=m | ||
| 450 | CONFIG_NF_NAT_IRC=m | ||
| 451 | CONFIG_NF_NAT_TFTP=m | ||
| 452 | # CONFIG_NF_NAT_AMANDA is not set | ||
| 453 | # CONFIG_NF_NAT_PPTP is not set | ||
| 454 | # CONFIG_NF_NAT_H323 is not set | ||
| 455 | # CONFIG_NF_NAT_SIP is not set | ||
| 456 | CONFIG_IP_NF_MANGLE=m | ||
| 457 | # CONFIG_IP_NF_TARGET_CLUSTERIP is not set | ||
| 458 | # CONFIG_IP_NF_TARGET_ECN is not set | ||
| 459 | # CONFIG_IP_NF_TARGET_TTL is not set | ||
| 460 | CONFIG_IP_NF_RAW=m | ||
| 461 | # CONFIG_IP_NF_ARPTABLES is not set | ||
| 462 | # CONFIG_IP_DCCP is not set | ||
| 463 | # CONFIG_IP_SCTP is not set | ||
| 464 | # CONFIG_TIPC is not set | ||
| 465 | CONFIG_ATM=m | ||
| 466 | # CONFIG_ATM_CLIP is not set | ||
| 467 | # CONFIG_ATM_LANE is not set | ||
| 468 | CONFIG_ATM_BR2684=m | ||
| 469 | CONFIG_ATM_BR2684_IPFILTER=y | ||
| 470 | CONFIG_STP=y | ||
| 471 | CONFIG_BRIDGE=y | ||
| 472 | # CONFIG_NET_DSA is not set | ||
| 473 | CONFIG_VLAN_8021Q=y | ||
| 474 | # CONFIG_VLAN_8021Q_GVRP is not set | ||
| 475 | # CONFIG_DECNET is not set | ||
| 476 | CONFIG_LLC=y | ||
| 477 | # CONFIG_LLC2 is not set | ||
| 478 | # CONFIG_IPX is not set | ||
| 479 | # CONFIG_ATALK is not set | ||
| 480 | # CONFIG_X25 is not set | ||
| 481 | # CONFIG_LAPB is not set | ||
| 482 | # CONFIG_ECONET is not set | ||
| 483 | # CONFIG_WAN_ROUTER is not set | ||
| 484 | # CONFIG_PHONET is not set | ||
| 485 | # CONFIG_IEEE802154 is not set | ||
| 486 | CONFIG_NET_SCHED=y | ||
| 487 | |||
| 488 | # | ||
| 489 | # Queueing/Scheduling | ||
| 490 | # | ||
| 491 | # CONFIG_NET_SCH_CBQ is not set | ||
| 492 | # CONFIG_NET_SCH_HTB is not set | ||
| 493 | # CONFIG_NET_SCH_HFSC is not set | ||
| 494 | # CONFIG_NET_SCH_ATM is not set | ||
| 495 | # CONFIG_NET_SCH_PRIO is not set | ||
| 496 | # CONFIG_NET_SCH_MULTIQ is not set | ||
| 497 | # CONFIG_NET_SCH_RED is not set | ||
| 498 | # CONFIG_NET_SCH_SFQ is not set | ||
| 499 | # CONFIG_NET_SCH_TEQL is not set | ||
| 500 | # CONFIG_NET_SCH_TBF is not set | ||
| 501 | # CONFIG_NET_SCH_GRED is not set | ||
| 502 | # CONFIG_NET_SCH_DSMARK is not set | ||
| 503 | # CONFIG_NET_SCH_NETEM is not set | ||
| 504 | # CONFIG_NET_SCH_DRR is not set | ||
| 505 | # CONFIG_NET_SCH_INGRESS is not set | ||
| 506 | |||
| 507 | # | ||
| 508 | # Classification | ||
| 509 | # | ||
| 510 | # CONFIG_NET_CLS_BASIC is not set | ||
| 511 | # CONFIG_NET_CLS_TCINDEX is not set | ||
| 512 | # CONFIG_NET_CLS_ROUTE4 is not set | ||
| 513 | # CONFIG_NET_CLS_FW is not set | ||
| 514 | # CONFIG_NET_CLS_U32 is not set | ||
| 515 | # CONFIG_NET_CLS_RSVP is not set | ||
| 516 | # CONFIG_NET_CLS_RSVP6 is not set | ||
| 517 | # CONFIG_NET_CLS_FLOW is not set | ||
| 518 | # CONFIG_NET_EMATCH is not set | ||
| 519 | CONFIG_NET_CLS_ACT=y | ||
| 520 | CONFIG_NET_ACT_POLICE=y | ||
| 521 | # CONFIG_NET_ACT_GACT is not set | ||
| 522 | # CONFIG_NET_ACT_MIRRED is not set | ||
| 523 | # CONFIG_NET_ACT_IPT is not set | ||
| 524 | # CONFIG_NET_ACT_NAT is not set | ||
| 525 | # CONFIG_NET_ACT_PEDIT is not set | ||
| 526 | # CONFIG_NET_ACT_SIMP is not set | ||
| 527 | # CONFIG_NET_ACT_SKBEDIT is not set | ||
| 528 | CONFIG_NET_SCH_FIFO=y | ||
| 529 | # CONFIG_DCB is not set | ||
| 530 | |||
| 531 | # | ||
| 532 | # Network testing | ||
| 533 | # | ||
| 534 | # CONFIG_NET_PKTGEN is not set | ||
| 535 | CONFIG_HAMRADIO=y | ||
| 536 | |||
| 537 | # | ||
| 538 | # Packet Radio protocols | ||
| 539 | # | ||
| 540 | # CONFIG_AX25 is not set | ||
| 541 | # CONFIG_CAN is not set | ||
| 542 | # CONFIG_IRDA is not set | ||
| 543 | # CONFIG_BT is not set | ||
| 544 | # CONFIG_AF_RXRPC is not set | ||
| 545 | CONFIG_FIB_RULES=y | ||
| 546 | CONFIG_WIRELESS=y | ||
| 547 | CONFIG_CFG80211=m | ||
| 548 | # CONFIG_CFG80211_REG_DEBUG is not set | ||
| 549 | # CONFIG_CFG80211_DEBUGFS is not set | ||
| 550 | # CONFIG_WIRELESS_OLD_REGULATORY is not set | ||
| 551 | CONFIG_WIRELESS_EXT=y | ||
| 552 | CONFIG_WIRELESS_EXT_SYSFS=y | ||
| 553 | # CONFIG_LIB80211 is not set | ||
| 554 | CONFIG_MAC80211=m | ||
| 555 | CONFIG_MAC80211_DEFAULT_PS=y | ||
| 556 | CONFIG_MAC80211_DEFAULT_PS_VALUE=1 | ||
| 557 | |||
| 558 | # | ||
| 559 | # Rate control algorithm selection | ||
| 560 | # | ||
| 561 | CONFIG_MAC80211_RC_PID=y | ||
| 562 | CONFIG_MAC80211_RC_MINSTREL=y | ||
| 563 | CONFIG_MAC80211_RC_DEFAULT_PID=y | ||
| 564 | # CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set | ||
| 565 | CONFIG_MAC80211_RC_DEFAULT="pid" | ||
| 566 | # CONFIG_MAC80211_MESH is not set | ||
| 567 | # CONFIG_MAC80211_LEDS is not set | ||
| 568 | # CONFIG_MAC80211_DEBUGFS is not set | ||
| 569 | # CONFIG_MAC80211_DEBUG_MENU is not set | ||
| 570 | # CONFIG_WIMAX is not set | ||
| 571 | # CONFIG_RFKILL is not set | ||
| 572 | # CONFIG_NET_9P is not set | ||
| 573 | |||
| 574 | # | ||
| 575 | # Device Drivers | ||
| 576 | # | ||
| 577 | |||
| 578 | # | ||
| 579 | # Generic Driver Options | ||
| 580 | # | ||
| 581 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 582 | CONFIG_STANDALONE=y | ||
| 583 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 584 | CONFIG_FW_LOADER=y | ||
| 585 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
| 586 | CONFIG_EXTRA_FIRMWARE="" | ||
| 587 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 588 | # CONFIG_CONNECTOR is not set | ||
| 589 | CONFIG_MTD=y | ||
| 590 | # CONFIG_MTD_DEBUG is not set | ||
| 591 | # CONFIG_MTD_CONCAT is not set | ||
| 592 | CONFIG_MTD_PARTITIONS=y | ||
| 593 | # CONFIG_MTD_TESTS is not set | ||
| 594 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
| 595 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
| 596 | # CONFIG_MTD_AR7_PARTS is not set | ||
| 597 | |||
| 598 | # | ||
| 599 | # User Modules And Translation Layers | ||
| 600 | # | ||
| 601 | CONFIG_MTD_CHAR=y | ||
| 602 | CONFIG_MTD_BLKDEVS=y | ||
| 603 | CONFIG_MTD_BLOCK=y | ||
| 604 | # CONFIG_FTL is not set | ||
| 605 | # CONFIG_NFTL is not set | ||
| 606 | # CONFIG_INFTL is not set | ||
| 607 | # CONFIG_RFD_FTL is not set | ||
| 608 | # CONFIG_SSFDC is not set | ||
| 609 | # CONFIG_MTD_OOPS is not set | ||
| 610 | |||
| 611 | # | ||
| 612 | # RAM/ROM/Flash chip drivers | ||
| 613 | # | ||
| 614 | CONFIG_MTD_CFI=y | ||
| 615 | # CONFIG_MTD_JEDECPROBE is not set | ||
| 616 | CONFIG_MTD_GEN_PROBE=y | ||
| 617 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
| 618 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
| 619 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
| 620 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
| 621 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
| 622 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
| 623 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
| 624 | CONFIG_MTD_CFI_I1=y | ||
| 625 | CONFIG_MTD_CFI_I2=y | ||
| 626 | # CONFIG_MTD_CFI_I4 is not set | ||
| 627 | # CONFIG_MTD_CFI_I8 is not set | ||
| 628 | CONFIG_MTD_CFI_INTELEXT=y | ||
| 629 | CONFIG_MTD_CFI_AMDSTD=y | ||
| 630 | CONFIG_MTD_CFI_STAA=y | ||
| 631 | CONFIG_MTD_CFI_UTIL=y | ||
| 632 | # CONFIG_MTD_RAM is not set | ||
| 633 | # CONFIG_MTD_ROM is not set | ||
| 634 | # CONFIG_MTD_ABSENT is not set | ||
| 635 | |||
| 636 | # | ||
| 637 | # Mapping drivers for chip access | ||
| 638 | # | ||
| 639 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
| 640 | CONFIG_MTD_PHYSMAP=y | ||
| 641 | # CONFIG_MTD_PHYSMAP_COMPAT is not set | ||
| 642 | # CONFIG_MTD_PLATRAM is not set | ||
| 643 | |||
| 644 | # | ||
| 645 | # Self-contained MTD device drivers | ||
| 646 | # | ||
| 647 | # CONFIG_MTD_SLRAM is not set | ||
| 648 | # CONFIG_MTD_PHRAM is not set | ||
| 649 | # CONFIG_MTD_MTDRAM is not set | ||
| 650 | # CONFIG_MTD_BLOCK2MTD is not set | ||
| 651 | |||
| 652 | # | ||
| 653 | # Disk-On-Chip Device Drivers | ||
| 654 | # | ||
| 655 | # CONFIG_MTD_DOC2000 is not set | ||
| 656 | # CONFIG_MTD_DOC2001 is not set | ||
| 657 | # CONFIG_MTD_DOC2001PLUS is not set | ||
| 658 | # CONFIG_MTD_NAND is not set | ||
| 659 | # CONFIG_MTD_ONENAND is not set | ||
| 660 | |||
| 661 | # | ||
| 662 | # LPDDR flash memory drivers | ||
| 663 | # | ||
| 664 | # CONFIG_MTD_LPDDR is not set | ||
| 665 | |||
| 666 | # | ||
| 667 | # UBI - Unsorted block images | ||
| 668 | # | ||
| 669 | # CONFIG_MTD_UBI is not set | ||
| 670 | # CONFIG_PARPORT is not set | ||
| 671 | CONFIG_BLK_DEV=y | ||
| 672 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 673 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 674 | # CONFIG_BLK_DEV_NBD is not set | ||
| 675 | # CONFIG_BLK_DEV_RAM is not set | ||
| 676 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 677 | # CONFIG_ATA_OVER_ETH is not set | ||
| 678 | # CONFIG_BLK_DEV_HD is not set | ||
| 679 | CONFIG_MISC_DEVICES=y | ||
| 680 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
| 681 | # CONFIG_C2PORT is not set | ||
| 682 | |||
| 683 | # | ||
| 684 | # EEPROM support | ||
| 685 | # | ||
| 686 | # CONFIG_EEPROM_93CX6 is not set | ||
| 687 | CONFIG_HAVE_IDE=y | ||
| 688 | # CONFIG_IDE is not set | ||
| 689 | |||
| 690 | # | ||
| 691 | # SCSI device support | ||
| 692 | # | ||
| 693 | # CONFIG_RAID_ATTRS is not set | ||
| 694 | # CONFIG_SCSI is not set | ||
| 695 | # CONFIG_SCSI_DMA is not set | ||
| 696 | # CONFIG_SCSI_NETLINK is not set | ||
| 697 | # CONFIG_ATA is not set | ||
| 698 | # CONFIG_MD is not set | ||
| 699 | CONFIG_NETDEVICES=y | ||
| 700 | # CONFIG_IFB is not set | ||
| 701 | # CONFIG_DUMMY is not set | ||
| 702 | # CONFIG_BONDING is not set | ||
| 703 | # CONFIG_MACVLAN is not set | ||
| 704 | # CONFIG_EQUALIZER is not set | ||
| 705 | # CONFIG_TUN is not set | ||
| 706 | # CONFIG_VETH is not set | ||
| 707 | CONFIG_PHYLIB=y | ||
| 708 | |||
| 709 | # | ||
| 710 | # MII PHY device drivers | ||
| 711 | # | ||
| 712 | # CONFIG_MARVELL_PHY is not set | ||
| 713 | # CONFIG_DAVICOM_PHY is not set | ||
| 714 | # CONFIG_QSEMI_PHY is not set | ||
| 715 | # CONFIG_LXT_PHY is not set | ||
| 716 | # CONFIG_CICADA_PHY is not set | ||
| 717 | # CONFIG_VITESSE_PHY is not set | ||
| 718 | # CONFIG_SMSC_PHY is not set | ||
| 719 | # CONFIG_BROADCOM_PHY is not set | ||
| 720 | # CONFIG_ICPLUS_PHY is not set | ||
| 721 | # CONFIG_REALTEK_PHY is not set | ||
| 722 | # CONFIG_NATIONAL_PHY is not set | ||
| 723 | # CONFIG_STE10XP is not set | ||
| 724 | # CONFIG_LSI_ET1011C_PHY is not set | ||
| 725 | CONFIG_FIXED_PHY=y | ||
| 726 | # CONFIG_MDIO_BITBANG is not set | ||
| 727 | CONFIG_NET_ETHERNET=y | ||
| 728 | CONFIG_MII=y | ||
| 729 | # CONFIG_AX88796 is not set | ||
| 730 | # CONFIG_SMC91X is not set | ||
| 731 | # CONFIG_DM9000 is not set | ||
| 732 | # CONFIG_ETHOC is not set | ||
| 733 | # CONFIG_DNET is not set | ||
| 734 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 735 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 736 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 737 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 738 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
| 739 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
| 740 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
| 741 | # CONFIG_B44 is not set | ||
| 742 | # CONFIG_KS8842 is not set | ||
| 743 | CONFIG_CPMAC=y | ||
| 744 | # CONFIG_NETDEV_1000 is not set | ||
| 745 | # CONFIG_NETDEV_10000 is not set | ||
| 746 | |||
| 747 | # | ||
| 748 | # Wireless LAN | ||
| 749 | # | ||
| 750 | # CONFIG_WLAN_PRE80211 is not set | ||
| 751 | CONFIG_WLAN_80211=y | ||
| 752 | # CONFIG_LIBERTAS is not set | ||
| 753 | # CONFIG_LIBERTAS_THINFIRM is not set | ||
| 754 | # CONFIG_MAC80211_HWSIM is not set | ||
| 755 | # CONFIG_P54_COMMON is not set | ||
| 756 | # CONFIG_HOSTAP is not set | ||
| 757 | # CONFIG_B43 is not set | ||
| 758 | # CONFIG_B43LEGACY is not set | ||
| 759 | # CONFIG_RT2X00 is not set | ||
| 760 | |||
| 761 | # | ||
| 762 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
| 763 | # | ||
| 764 | # CONFIG_WAN is not set | ||
| 765 | CONFIG_ATM_DRIVERS=y | ||
| 766 | # CONFIG_ATM_DUMMY is not set | ||
| 767 | # CONFIG_ATM_TCP is not set | ||
| 768 | CONFIG_PPP=m | ||
| 769 | CONFIG_PPP_MULTILINK=y | ||
| 770 | CONFIG_PPP_FILTER=y | ||
| 771 | CONFIG_PPP_ASYNC=m | ||
| 772 | # CONFIG_PPP_SYNC_TTY is not set | ||
| 773 | # CONFIG_PPP_DEFLATE is not set | ||
| 774 | # CONFIG_PPP_BSDCOMP is not set | ||
| 775 | # CONFIG_PPP_MPPE is not set | ||
| 776 | CONFIG_PPPOE=m | ||
| 777 | CONFIG_PPPOATM=m | ||
| 778 | # CONFIG_PPPOL2TP is not set | ||
| 779 | # CONFIG_SLIP is not set | ||
| 780 | CONFIG_SLHC=m | ||
| 781 | # CONFIG_NETCONSOLE is not set | ||
| 782 | # CONFIG_NETPOLL is not set | ||
| 783 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 784 | # CONFIG_ISDN is not set | ||
| 785 | # CONFIG_PHONE is not set | ||
| 786 | |||
| 787 | # | ||
| 788 | # Input device support | ||
| 789 | # | ||
| 790 | # CONFIG_INPUT is not set | ||
| 791 | |||
| 792 | # | ||
| 793 | # Hardware I/O ports | ||
| 794 | # | ||
| 795 | # CONFIG_SERIO is not set | ||
| 796 | # CONFIG_GAMEPORT is not set | ||
| 797 | |||
| 798 | # | ||
| 799 | # Character devices | ||
| 800 | # | ||
| 801 | # CONFIG_VT is not set | ||
| 802 | # CONFIG_DEVKMEM is not set | ||
| 803 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 804 | |||
| 805 | # | ||
| 806 | # Serial drivers | ||
| 807 | # | ||
| 808 | CONFIG_SERIAL_8250=y | ||
| 809 | CONFIG_SERIAL_8250_CONSOLE=y | ||
| 810 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
| 811 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | ||
| 812 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
| 813 | |||
| 814 | # | ||
| 815 | # Non-8250 serial port support | ||
| 816 | # | ||
| 817 | CONFIG_SERIAL_CORE=y | ||
| 818 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 819 | CONFIG_UNIX98_PTYS=y | ||
| 820 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
| 821 | # CONFIG_LEGACY_PTYS is not set | ||
| 822 | # CONFIG_IPMI_HANDLER is not set | ||
| 823 | CONFIG_HW_RANDOM=y | ||
| 824 | # CONFIG_HW_RANDOM_TIMERIOMEM is not set | ||
| 825 | # CONFIG_R3964 is not set | ||
| 826 | # CONFIG_RAW_DRIVER is not set | ||
| 827 | # CONFIG_TCG_TPM is not set | ||
| 828 | # CONFIG_I2C is not set | ||
| 829 | # CONFIG_SPI is not set | ||
| 830 | # CONFIG_W1 is not set | ||
| 831 | # CONFIG_POWER_SUPPLY is not set | ||
| 832 | # CONFIG_HWMON is not set | ||
| 833 | # CONFIG_THERMAL is not set | ||
| 834 | # CONFIG_THERMAL_HWMON is not set | ||
| 835 | CONFIG_WATCHDOG=y | ||
| 836 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
| 837 | |||
| 838 | # | ||
| 839 | # Watchdog Device Drivers | ||
| 840 | # | ||
| 841 | # CONFIG_SOFT_WATCHDOG is not set | ||
| 842 | CONFIG_AR7_WDT=y | ||
| 843 | CONFIG_SSB_POSSIBLE=y | ||
| 844 | |||
| 845 | # | ||
| 846 | # Sonics Silicon Backplane | ||
| 847 | # | ||
| 848 | CONFIG_SSB=y | ||
| 849 | # CONFIG_SSB_SILENT is not set | ||
| 850 | # CONFIG_SSB_DEBUG is not set | ||
| 851 | CONFIG_SSB_SERIAL=y | ||
| 852 | CONFIG_SSB_DRIVER_MIPS=y | ||
| 853 | CONFIG_SSB_EMBEDDED=y | ||
| 854 | CONFIG_SSB_DRIVER_EXTIF=y | ||
| 855 | |||
| 856 | # | ||
| 857 | # Multifunction device drivers | ||
| 858 | # | ||
| 859 | # CONFIG_MFD_CORE is not set | ||
| 860 | # CONFIG_MFD_SM501 is not set | ||
| 861 | # CONFIG_HTC_PASIC3 is not set | ||
| 862 | # CONFIG_MFD_TMIO is not set | ||
| 863 | # CONFIG_REGULATOR is not set | ||
| 864 | # CONFIG_MEDIA_SUPPORT is not set | ||
| 865 | |||
| 866 | # | ||
| 867 | # Graphics support | ||
| 868 | # | ||
| 869 | # CONFIG_VGASTATE is not set | ||
| 870 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 871 | # CONFIG_FB is not set | ||
| 872 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 873 | |||
| 874 | # | ||
| 875 | # Display device support | ||
| 876 | # | ||
| 877 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 878 | # CONFIG_SOUND is not set | ||
| 879 | # CONFIG_USB_SUPPORT is not set | ||
| 880 | # CONFIG_MMC is not set | ||
| 881 | # CONFIG_MEMSTICK is not set | ||
| 882 | CONFIG_NEW_LEDS=y | ||
| 883 | CONFIG_LEDS_CLASS=y | ||
| 884 | |||
| 885 | # | ||
| 886 | # LED drivers | ||
| 887 | # | ||
| 888 | # CONFIG_LEDS_GPIO is not set | ||
| 889 | |||
| 890 | # | ||
| 891 | # LED Triggers | ||
| 892 | # | ||
| 893 | CONFIG_LEDS_TRIGGERS=y | ||
| 894 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
| 895 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
| 896 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set | ||
| 897 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
| 898 | |||
| 899 | # | ||
| 900 | # iptables trigger is under Netfilter config (LED target) | ||
| 901 | # | ||
| 902 | # CONFIG_ACCESSIBILITY is not set | ||
| 903 | CONFIG_RTC_LIB=y | ||
| 904 | # CONFIG_RTC_CLASS is not set | ||
| 905 | # CONFIG_DMADEVICES is not set | ||
| 906 | # CONFIG_AUXDISPLAY is not set | ||
| 907 | # CONFIG_UIO is not set | ||
| 908 | |||
| 909 | # | ||
| 910 | # TI VLYNQ | ||
| 911 | # | ||
| 912 | CONFIG_VLYNQ=y | ||
| 913 | # CONFIG_STAGING is not set | ||
| 914 | |||
| 915 | # | ||
| 916 | # File systems | ||
| 917 | # | ||
| 918 | # CONFIG_EXT2_FS is not set | ||
| 919 | # CONFIG_EXT3_FS is not set | ||
| 920 | # CONFIG_EXT4_FS is not set | ||
| 921 | # CONFIG_REISERFS_FS is not set | ||
| 922 | # CONFIG_JFS_FS is not set | ||
| 923 | # CONFIG_FS_POSIX_ACL is not set | ||
| 924 | # CONFIG_XFS_FS is not set | ||
| 925 | # CONFIG_OCFS2_FS is not set | ||
| 926 | # CONFIG_BTRFS_FS is not set | ||
| 927 | CONFIG_FILE_LOCKING=y | ||
| 928 | CONFIG_FSNOTIFY=y | ||
| 929 | # CONFIG_DNOTIFY is not set | ||
| 930 | # CONFIG_INOTIFY is not set | ||
| 931 | CONFIG_INOTIFY_USER=y | ||
| 932 | # CONFIG_QUOTA is not set | ||
| 933 | # CONFIG_AUTOFS_FS is not set | ||
| 934 | # CONFIG_AUTOFS4_FS is not set | ||
| 935 | # CONFIG_FUSE_FS is not set | ||
| 936 | |||
| 937 | # | ||
| 938 | # Caches | ||
| 939 | # | ||
| 940 | # CONFIG_FSCACHE is not set | ||
| 941 | |||
| 942 | # | ||
| 943 | # CD-ROM/DVD Filesystems | ||
| 944 | # | ||
| 945 | # CONFIG_ISO9660_FS is not set | ||
| 946 | # CONFIG_UDF_FS is not set | ||
| 947 | |||
| 948 | # | ||
| 949 | # DOS/FAT/NT Filesystems | ||
| 950 | # | ||
| 951 | # CONFIG_MSDOS_FS is not set | ||
| 952 | # CONFIG_VFAT_FS is not set | ||
| 953 | # CONFIG_NTFS_FS is not set | ||
| 954 | |||
| 955 | # | ||
| 956 | # Pseudo filesystems | ||
| 957 | # | ||
| 958 | CONFIG_PROC_FS=y | ||
| 959 | CONFIG_PROC_KCORE=y | ||
| 960 | CONFIG_PROC_SYSCTL=y | ||
| 961 | # CONFIG_PROC_PAGE_MONITOR is not set | ||
| 962 | CONFIG_SYSFS=y | ||
| 963 | CONFIG_TMPFS=y | ||
| 964 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
| 965 | # CONFIG_HUGETLB_PAGE is not set | ||
| 966 | # CONFIG_CONFIGFS_FS is not set | ||
| 967 | CONFIG_MISC_FILESYSTEMS=y | ||
| 968 | # CONFIG_ADFS_FS is not set | ||
| 969 | # CONFIG_AFFS_FS is not set | ||
| 970 | # CONFIG_HFS_FS is not set | ||
| 971 | # CONFIG_HFSPLUS_FS is not set | ||
| 972 | # CONFIG_BEFS_FS is not set | ||
| 973 | # CONFIG_BFS_FS is not set | ||
| 974 | # CONFIG_EFS_FS is not set | ||
| 975 | CONFIG_JFFS2_FS=y | ||
| 976 | CONFIG_JFFS2_FS_DEBUG=0 | ||
| 977 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
| 978 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
| 979 | CONFIG_JFFS2_SUMMARY=y | ||
| 980 | # CONFIG_JFFS2_FS_XATTR is not set | ||
| 981 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | ||
| 982 | CONFIG_JFFS2_ZLIB=y | ||
| 983 | # CONFIG_JFFS2_LZO is not set | ||
| 984 | CONFIG_JFFS2_RTIME=y | ||
| 985 | # CONFIG_JFFS2_RUBIN is not set | ||
| 986 | # CONFIG_JFFS2_CMODE_NONE is not set | ||
| 987 | CONFIG_JFFS2_CMODE_PRIORITY=y | ||
| 988 | # CONFIG_JFFS2_CMODE_SIZE is not set | ||
| 989 | # CONFIG_JFFS2_CMODE_FAVOURLZO is not set | ||
| 990 | # CONFIG_CRAMFS is not set | ||
| 991 | CONFIG_SQUASHFS=y | ||
| 992 | # CONFIG_SQUASHFS_EMBEDDED is not set | ||
| 993 | CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 | ||
| 994 | # CONFIG_VXFS_FS is not set | ||
| 995 | # CONFIG_MINIX_FS is not set | ||
| 996 | # CONFIG_OMFS_FS is not set | ||
| 997 | # CONFIG_HPFS_FS is not set | ||
| 998 | # CONFIG_QNX4FS_FS is not set | ||
| 999 | # CONFIG_ROMFS_FS is not set | ||
| 1000 | # CONFIG_SYSV_FS is not set | ||
| 1001 | # CONFIG_UFS_FS is not set | ||
| 1002 | # CONFIG_NILFS2_FS is not set | ||
| 1003 | CONFIG_NETWORK_FILESYSTEMS=y | ||
| 1004 | # CONFIG_NFS_FS is not set | ||
| 1005 | # CONFIG_NFSD is not set | ||
| 1006 | # CONFIG_SMB_FS is not set | ||
| 1007 | # CONFIG_CIFS is not set | ||
| 1008 | # CONFIG_NCP_FS is not set | ||
| 1009 | # CONFIG_CODA_FS is not set | ||
| 1010 | # CONFIG_AFS_FS is not set | ||
| 1011 | |||
| 1012 | # | ||
| 1013 | # Partition Types | ||
| 1014 | # | ||
| 1015 | CONFIG_PARTITION_ADVANCED=y | ||
| 1016 | # CONFIG_ACORN_PARTITION is not set | ||
| 1017 | # CONFIG_OSF_PARTITION is not set | ||
| 1018 | # CONFIG_AMIGA_PARTITION is not set | ||
| 1019 | # CONFIG_ATARI_PARTITION is not set | ||
| 1020 | # CONFIG_MAC_PARTITION is not set | ||
| 1021 | CONFIG_MSDOS_PARTITION=y | ||
| 1022 | CONFIG_BSD_DISKLABEL=y | ||
| 1023 | # CONFIG_MINIX_SUBPARTITION is not set | ||
| 1024 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
| 1025 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
| 1026 | # CONFIG_LDM_PARTITION is not set | ||
| 1027 | # CONFIG_SGI_PARTITION is not set | ||
| 1028 | # CONFIG_ULTRIX_PARTITION is not set | ||
| 1029 | # CONFIG_SUN_PARTITION is not set | ||
| 1030 | # CONFIG_KARMA_PARTITION is not set | ||
| 1031 | # CONFIG_EFI_PARTITION is not set | ||
| 1032 | # CONFIG_SYSV68_PARTITION is not set | ||
| 1033 | # CONFIG_NLS is not set | ||
| 1034 | # CONFIG_DLM is not set | ||
| 1035 | |||
| 1036 | # | ||
| 1037 | # Kernel hacking | ||
| 1038 | # | ||
| 1039 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
| 1040 | # CONFIG_PRINTK_TIME is not set | ||
| 1041 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1042 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
| 1043 | CONFIG_FRAME_WARN=1024 | ||
| 1044 | # CONFIG_MAGIC_SYSRQ is not set | ||
| 1045 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 1046 | CONFIG_DEBUG_FS=y | ||
| 1047 | # CONFIG_HEADERS_CHECK is not set | ||
| 1048 | # CONFIG_DEBUG_KERNEL is not set | ||
| 1049 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
| 1050 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
| 1051 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
| 1052 | CONFIG_TRACING_SUPPORT=y | ||
| 1053 | # CONFIG_FTRACE is not set | ||
| 1054 | # CONFIG_DYNAMIC_DEBUG is not set | ||
| 1055 | # CONFIG_SAMPLES is not set | ||
| 1056 | CONFIG_HAVE_ARCH_KGDB=y | ||
| 1057 | CONFIG_CMDLINE="rootfstype=squashfs,jffs2" | ||
| 1058 | |||
| 1059 | # | ||
| 1060 | # Security options | ||
| 1061 | # | ||
| 1062 | # CONFIG_KEYS is not set | ||
| 1063 | # CONFIG_SECURITY is not set | ||
| 1064 | # CONFIG_SECURITYFS is not set | ||
| 1065 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 1066 | CONFIG_CRYPTO=y | ||
| 1067 | |||
| 1068 | # | ||
| 1069 | # Crypto core or helper | ||
| 1070 | # | ||
| 1071 | # CONFIG_CRYPTO_FIPS is not set | ||
| 1072 | CONFIG_CRYPTO_ALGAPI=m | ||
| 1073 | CONFIG_CRYPTO_ALGAPI2=m | ||
| 1074 | CONFIG_CRYPTO_AEAD2=m | ||
| 1075 | CONFIG_CRYPTO_BLKCIPHER=m | ||
| 1076 | CONFIG_CRYPTO_BLKCIPHER2=m | ||
| 1077 | CONFIG_CRYPTO_HASH2=m | ||
| 1078 | CONFIG_CRYPTO_RNG2=m | ||
| 1079 | CONFIG_CRYPTO_PCOMP=m | ||
| 1080 | CONFIG_CRYPTO_MANAGER=m | ||
| 1081 | CONFIG_CRYPTO_MANAGER2=m | ||
| 1082 | # CONFIG_CRYPTO_GF128MUL is not set | ||
| 1083 | # CONFIG_CRYPTO_NULL is not set | ||
| 1084 | CONFIG_CRYPTO_WORKQUEUE=m | ||
| 1085 | # CONFIG_CRYPTO_CRYPTD is not set | ||
| 1086 | # CONFIG_CRYPTO_AUTHENC is not set | ||
| 1087 | # CONFIG_CRYPTO_TEST is not set | ||
| 1088 | |||
| 1089 | # | ||
| 1090 | # Authenticated Encryption with Associated Data | ||
| 1091 | # | ||
| 1092 | # CONFIG_CRYPTO_CCM is not set | ||
| 1093 | # CONFIG_CRYPTO_GCM is not set | ||
| 1094 | # CONFIG_CRYPTO_SEQIV is not set | ||
| 1095 | |||
| 1096 | # | ||
| 1097 | # Block modes | ||
| 1098 | # | ||
| 1099 | # CONFIG_CRYPTO_CBC is not set | ||
| 1100 | # CONFIG_CRYPTO_CTR is not set | ||
| 1101 | # CONFIG_CRYPTO_CTS is not set | ||
| 1102 | CONFIG_CRYPTO_ECB=m | ||
| 1103 | # CONFIG_CRYPTO_LRW is not set | ||
| 1104 | # CONFIG_CRYPTO_PCBC is not set | ||
| 1105 | # CONFIG_CRYPTO_XTS is not set | ||
| 1106 | |||
| 1107 | # | ||
| 1108 | # Hash modes | ||
| 1109 | # | ||
| 1110 | # CONFIG_CRYPTO_HMAC is not set | ||
| 1111 | # CONFIG_CRYPTO_XCBC is not set | ||
| 1112 | |||
| 1113 | # | ||
| 1114 | # Digest | ||
| 1115 | # | ||
| 1116 | # CONFIG_CRYPTO_CRC32C is not set | ||
| 1117 | # CONFIG_CRYPTO_MD4 is not set | ||
| 1118 | # CONFIG_CRYPTO_MD5 is not set | ||
| 1119 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
| 1120 | # CONFIG_CRYPTO_RMD128 is not set | ||
| 1121 | # CONFIG_CRYPTO_RMD160 is not set | ||
| 1122 | # CONFIG_CRYPTO_RMD256 is not set | ||
| 1123 | # CONFIG_CRYPTO_RMD320 is not set | ||
| 1124 | # CONFIG_CRYPTO_SHA1 is not set | ||
| 1125 | # CONFIG_CRYPTO_SHA256 is not set | ||
| 1126 | # CONFIG_CRYPTO_SHA512 is not set | ||
| 1127 | # CONFIG_CRYPTO_TGR192 is not set | ||
| 1128 | # CONFIG_CRYPTO_WP512 is not set | ||
| 1129 | |||
| 1130 | # | ||
| 1131 | # Ciphers | ||
| 1132 | # | ||
| 1133 | CONFIG_CRYPTO_AES=m | ||
| 1134 | # CONFIG_CRYPTO_ANUBIS is not set | ||
| 1135 | CONFIG_CRYPTO_ARC4=m | ||
| 1136 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
| 1137 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
| 1138 | # CONFIG_CRYPTO_CAST5 is not set | ||
| 1139 | # CONFIG_CRYPTO_CAST6 is not set | ||
| 1140 | # CONFIG_CRYPTO_DES is not set | ||
| 1141 | # CONFIG_CRYPTO_FCRYPT is not set | ||
| 1142 | # CONFIG_CRYPTO_KHAZAD is not set | ||
| 1143 | # CONFIG_CRYPTO_SALSA20 is not set | ||
| 1144 | # CONFIG_CRYPTO_SEED is not set | ||
| 1145 | # CONFIG_CRYPTO_SERPENT is not set | ||
| 1146 | # CONFIG_CRYPTO_TEA is not set | ||
| 1147 | # CONFIG_CRYPTO_TWOFISH is not set | ||
| 1148 | |||
| 1149 | # | ||
| 1150 | # Compression | ||
| 1151 | # | ||
| 1152 | # CONFIG_CRYPTO_DEFLATE is not set | ||
| 1153 | # CONFIG_CRYPTO_ZLIB is not set | ||
| 1154 | # CONFIG_CRYPTO_LZO is not set | ||
| 1155 | |||
| 1156 | # | ||
| 1157 | # Random Number Generation | ||
| 1158 | # | ||
| 1159 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
| 1160 | # CONFIG_CRYPTO_HW is not set | ||
| 1161 | # CONFIG_BINARY_PRINTF is not set | ||
| 1162 | |||
| 1163 | # | ||
| 1164 | # Library routines | ||
| 1165 | # | ||
| 1166 | CONFIG_BITREVERSE=y | ||
| 1167 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
| 1168 | CONFIG_CRC_CCITT=m | ||
| 1169 | # CONFIG_CRC16 is not set | ||
| 1170 | # CONFIG_CRC_T10DIF is not set | ||
| 1171 | # CONFIG_CRC_ITU_T is not set | ||
| 1172 | CONFIG_CRC32=y | ||
| 1173 | # CONFIG_CRC7 is not set | ||
| 1174 | # CONFIG_LIBCRC32C is not set | ||
| 1175 | CONFIG_ZLIB_INFLATE=y | ||
| 1176 | CONFIG_ZLIB_DEFLATE=y | ||
| 1177 | CONFIG_DECOMPRESS_GZIP=y | ||
| 1178 | CONFIG_DECOMPRESS_LZMA=y | ||
| 1179 | CONFIG_HAS_IOMEM=y | ||
| 1180 | CONFIG_HAS_IOPORT=y | ||
| 1181 | CONFIG_HAS_DMA=y | ||
| 1182 | CONFIG_NLATTR=y | ||
diff --git a/arch/mips/gt64120/wrppmc/serial.c b/arch/mips/gt64120/wrppmc/serial.c index 5ec1c2ffd3a5..6f9d0858f596 100644 --- a/arch/mips/gt64120/wrppmc/serial.c +++ b/arch/mips/gt64120/wrppmc/serial.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Registration of WRPPMC UART platform device. | 2 | * Registration of WRPPMC UART platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/amon.h b/arch/mips/include/asm/amon.h new file mode 100644 index 000000000000..c3dc1a68dd8d --- /dev/null +++ b/arch/mips/include/asm/amon.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | /* | ||
| 2 | * Amon support | ||
| 3 | */ | ||
| 4 | |||
| 5 | int amon_cpu_avail(int); | ||
| 6 | void amon_cpu_start(int, unsigned long, unsigned long, | ||
| 7 | unsigned long, unsigned long); | ||
diff --git a/arch/mips/include/asm/ds1287.h b/arch/mips/include/asm/ds1287.h index ba1702e86931..3af0b8fb3b8c 100644 --- a/arch/mips/include/asm/ds1287.h +++ b/arch/mips/include/asm/ds1287.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DS1287 timer functions. | 2 | * DS1287 timer functions. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index d58f128aa747..7990694cda22 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h | |||
| @@ -316,9 +316,13 @@ extern void elf_dump_regs(elf_greg_t *, struct pt_regs *regs); | |||
| 316 | extern int dump_task_regs(struct task_struct *, elf_gregset_t *); | 316 | extern int dump_task_regs(struct task_struct *, elf_gregset_t *); |
| 317 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); | 317 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); |
| 318 | 318 | ||
| 319 | #ifndef ELF_CORE_COPY_REGS | ||
| 319 | #define ELF_CORE_COPY_REGS(elf_regs, regs) \ | 320 | #define ELF_CORE_COPY_REGS(elf_regs, regs) \ |
| 320 | elf_dump_regs((elf_greg_t *)&(elf_regs), regs); | 321 | elf_dump_regs((elf_greg_t *)&(elf_regs), regs); |
| 322 | #endif | ||
| 323 | #ifndef ELF_CORE_COPY_TASK_REGS | ||
| 321 | #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs) | 324 | #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs) |
| 325 | #endif | ||
| 322 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \ | 326 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \ |
| 323 | dump_task_fpu(tsk, elf_fpregs) | 327 | dump_task_fpu(tsk, elf_fpregs) |
| 324 | 328 | ||
diff --git a/arch/mips/include/asm/gcmpregs.h b/arch/mips/include/asm/gcmpregs.h index d74a8a4ca861..36fd969d64d6 100644 --- a/arch/mips/include/asm/gcmpregs.h +++ b/arch/mips/include/asm/gcmpregs.h | |||
| @@ -114,4 +114,6 @@ | |||
| 114 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ | 114 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ |
| 115 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ | 115 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ |
| 116 | 116 | ||
| 117 | extern int __init gcmp_probe(unsigned long, unsigned long); | ||
| 118 | |||
| 117 | #endif /* _ASM_GCMPREGS_H */ | 119 | #endif /* _ASM_GCMPREGS_H */ |
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index 954807d9d66a..10292e37c1f7 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
| @@ -20,7 +20,11 @@ | |||
| 20 | #define GIC_TRIG_EDGE 1 | 20 | #define GIC_TRIG_EDGE 1 |
| 21 | #define GIC_TRIG_LEVEL 0 | 21 | #define GIC_TRIG_LEVEL 0 |
| 22 | 22 | ||
| 23 | #if CONFIG_SMP | ||
| 24 | #define GIC_NUM_INTRS (24 + NR_CPUS * 2) | ||
| 25 | #else | ||
| 23 | #define GIC_NUM_INTRS 32 | 26 | #define GIC_NUM_INTRS 32 |
| 27 | #endif | ||
| 24 | 28 | ||
| 25 | #define MSK(n) ((1 << (n)) - 1) | 29 | #define MSK(n) ((1 << (n)) - 1) |
| 26 | #define REG32(addr) (*(volatile unsigned int *) (addr)) | 30 | #define REG32(addr) (*(volatile unsigned int *) (addr)) |
| @@ -483,5 +487,7 @@ extern void gic_init(unsigned long gic_base_addr, | |||
| 483 | 487 | ||
| 484 | extern unsigned int gic_get_int(void); | 488 | extern unsigned int gic_get_int(void); |
| 485 | extern void gic_send_ipi(unsigned int intr); | 489 | extern void gic_send_ipi(unsigned int intr); |
| 490 | extern unsigned int plat_ipi_call_int_xlate(unsigned int); | ||
| 491 | extern unsigned int plat_ipi_resched_int_xlate(unsigned int); | ||
| 486 | 492 | ||
| 487 | #endif /* _ASM_GICREGS_H */ | 493 | #endif /* _ASM_GICREGS_H */ |
diff --git a/arch/mips/include/asm/irq_gt641xx.h b/arch/mips/include/asm/irq_gt641xx.h index f9a7c3ac2e66..250a2407b599 100644 --- a/arch/mips/include/asm/irq_gt641xx.h +++ b/arch/mips/include/asm/irq_gt641xx.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Galileo/Marvell GT641xx IRQ definitions. | 2 | * Galileo/Marvell GT641xx IRQ definitions. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/mach-ar7/ar7.h b/arch/mips/include/asm/mach-ar7/ar7.h new file mode 100644 index 000000000000..de71694614de --- /dev/null +++ b/arch/mips/include/asm/mach-ar7/ar7.h | |||
| @@ -0,0 +1,178 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006,2007 Felix Fietkau <nbd@openwrt.org> | ||
| 3 | * Copyright (C) 2006,2007 Eugene Konev <ejka@openwrt.org> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __AR7_H__ | ||
| 21 | #define __AR7_H__ | ||
| 22 | |||
| 23 | #include <linux/delay.h> | ||
| 24 | #include <linux/io.h> | ||
| 25 | #include <linux/errno.h> | ||
| 26 | |||
| 27 | #include <asm/addrspace.h> | ||
| 28 | |||
| 29 | #define AR7_SDRAM_BASE 0x14000000 | ||
| 30 | |||
| 31 | #define AR7_REGS_BASE 0x08610000 | ||
| 32 | |||
| 33 | #define AR7_REGS_MAC0 (AR7_REGS_BASE + 0x0000) | ||
| 34 | #define AR7_REGS_GPIO (AR7_REGS_BASE + 0x0900) | ||
| 35 | /* 0x08610A00 - 0x08610BFF (512 bytes, 128 bytes / clock) */ | ||
| 36 | #define AR7_REGS_POWER (AR7_REGS_BASE + 0x0a00) | ||
| 37 | #define AR7_REGS_CLOCKS (AR7_REGS_POWER + 0x80) | ||
| 38 | #define UR8_REGS_CLOCKS (AR7_REGS_POWER + 0x20) | ||
| 39 | #define AR7_REGS_UART0 (AR7_REGS_BASE + 0x0e00) | ||
| 40 | #define AR7_REGS_USB (AR7_REGS_BASE + 0x1200) | ||
| 41 | #define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600) | ||
| 42 | #define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800) | ||
| 43 | #define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00) | ||
| 44 | #define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1c00) | ||
| 45 | #define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1e00) | ||
| 46 | #define AR7_REGS_IRQ (AR7_REGS_BASE + 0x2400) | ||
| 47 | #define AR7_REGS_MAC1 (AR7_REGS_BASE + 0x2800) | ||
| 48 | |||
| 49 | #define AR7_REGS_WDT (AR7_REGS_BASE + 0x1f00) | ||
| 50 | #define UR8_REGS_WDT (AR7_REGS_BASE + 0x0b00) | ||
| 51 | #define UR8_REGS_UART1 (AR7_REGS_BASE + 0x0f00) | ||
| 52 | |||
| 53 | #define AR7_RESET_PEREPHERIAL 0x0 | ||
| 54 | #define AR7_RESET_SOFTWARE 0x4 | ||
| 55 | #define AR7_RESET_STATUS 0x8 | ||
| 56 | |||
| 57 | #define AR7_RESET_BIT_CPMAC_LO 17 | ||
| 58 | #define AR7_RESET_BIT_CPMAC_HI 21 | ||
| 59 | #define AR7_RESET_BIT_MDIO 22 | ||
| 60 | #define AR7_RESET_BIT_EPHY 26 | ||
| 61 | |||
| 62 | /* GPIO control registers */ | ||
| 63 | #define AR7_GPIO_INPUT 0x0 | ||
| 64 | #define AR7_GPIO_OUTPUT 0x4 | ||
| 65 | #define AR7_GPIO_DIR 0x8 | ||
| 66 | #define AR7_GPIO_ENABLE 0xc | ||
| 67 | |||
| 68 | #define AR7_CHIP_7100 0x18 | ||
| 69 | #define AR7_CHIP_7200 0x2b | ||
| 70 | #define AR7_CHIP_7300 0x05 | ||
| 71 | |||
| 72 | /* Interrupts */ | ||
| 73 | #define AR7_IRQ_UART0 15 | ||
| 74 | #define AR7_IRQ_UART1 16 | ||
| 75 | |||
| 76 | /* Clocks */ | ||
| 77 | #define AR7_AFE_CLOCK 35328000 | ||
| 78 | #define AR7_REF_CLOCK 25000000 | ||
| 79 | #define AR7_XTAL_CLOCK 24000000 | ||
| 80 | |||
| 81 | struct plat_cpmac_data { | ||
| 82 | int reset_bit; | ||
| 83 | int power_bit; | ||
| 84 | u32 phy_mask; | ||
| 85 | char dev_addr[6]; | ||
| 86 | }; | ||
| 87 | |||
| 88 | struct plat_dsl_data { | ||
| 89 | int reset_bit_dsl; | ||
| 90 | int reset_bit_sar; | ||
| 91 | }; | ||
| 92 | |||
| 93 | extern int ar7_cpu_clock, ar7_bus_clock, ar7_dsp_clock; | ||
| 94 | |||
| 95 | static inline u16 ar7_chip_id(void) | ||
| 96 | { | ||
| 97 | return readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x14)) & 0xffff; | ||
| 98 | } | ||
| 99 | |||
| 100 | static inline u8 ar7_chip_rev(void) | ||
| 101 | { | ||
| 102 | return (readl((void *)KSEG1ADDR(AR7_REGS_GPIO + 0x14)) >> 16) & 0xff; | ||
| 103 | } | ||
| 104 | |||
| 105 | static inline int ar7_cpu_freq(void) | ||
| 106 | { | ||
| 107 | return ar7_cpu_clock; | ||
| 108 | } | ||
| 109 | |||
| 110 | static inline int ar7_bus_freq(void) | ||
| 111 | { | ||
| 112 | return ar7_bus_clock; | ||
| 113 | } | ||
| 114 | |||
| 115 | static inline int ar7_vbus_freq(void) | ||
| 116 | { | ||
| 117 | return ar7_bus_clock / 2; | ||
| 118 | } | ||
| 119 | #define ar7_cpmac_freq ar7_vbus_freq | ||
| 120 | |||
| 121 | static inline int ar7_dsp_freq(void) | ||
| 122 | { | ||
| 123 | return ar7_dsp_clock; | ||
| 124 | } | ||
| 125 | |||
| 126 | static inline int ar7_has_high_cpmac(void) | ||
| 127 | { | ||
| 128 | u16 chip_id = ar7_chip_id(); | ||
| 129 | switch (chip_id) { | ||
| 130 | case AR7_CHIP_7100: | ||
| 131 | case AR7_CHIP_7200: | ||
| 132 | return 0; | ||
| 133 | case AR7_CHIP_7300: | ||
| 134 | return 1; | ||
| 135 | default: | ||
| 136 | return -ENXIO; | ||
| 137 | } | ||
| 138 | } | ||
| 139 | #define ar7_has_high_vlynq ar7_has_high_cpmac | ||
| 140 | #define ar7_has_second_uart ar7_has_high_cpmac | ||
| 141 | |||
| 142 | static inline void ar7_device_enable(u32 bit) | ||
| 143 | { | ||
| 144 | void *reset_reg = | ||
| 145 | (void *)KSEG1ADDR(AR7_REGS_RESET + AR7_RESET_PEREPHERIAL); | ||
| 146 | writel(readl(reset_reg) | (1 << bit), reset_reg); | ||
| 147 | msleep(20); | ||
| 148 | } | ||
| 149 | |||
| 150 | static inline void ar7_device_disable(u32 bit) | ||
| 151 | { | ||
| 152 | void *reset_reg = | ||
| 153 | (void *)KSEG1ADDR(AR7_REGS_RESET + AR7_RESET_PEREPHERIAL); | ||
| 154 | writel(readl(reset_reg) & ~(1 << bit), reset_reg); | ||
| 155 | msleep(20); | ||
| 156 | } | ||
| 157 | |||
| 158 | static inline void ar7_device_reset(u32 bit) | ||
| 159 | { | ||
| 160 | ar7_device_disable(bit); | ||
| 161 | ar7_device_enable(bit); | ||
| 162 | } | ||
| 163 | |||
| 164 | static inline void ar7_device_on(u32 bit) | ||
| 165 | { | ||
| 166 | void *power_reg = (void *)KSEG1ADDR(AR7_REGS_POWER); | ||
| 167 | writel(readl(power_reg) | (1 << bit), power_reg); | ||
| 168 | msleep(20); | ||
| 169 | } | ||
| 170 | |||
| 171 | static inline void ar7_device_off(u32 bit) | ||
| 172 | { | ||
| 173 | void *power_reg = (void *)KSEG1ADDR(AR7_REGS_POWER); | ||
| 174 | writel(readl(power_reg) & ~(1 << bit), power_reg); | ||
| 175 | msleep(20); | ||
| 176 | } | ||
| 177 | |||
| 178 | #endif /* __AR7_H__ */ | ||
diff --git a/arch/mips/include/asm/mach-ar7/gpio.h b/arch/mips/include/asm/mach-ar7/gpio.h new file mode 100644 index 000000000000..cbe9c4f126df --- /dev/null +++ b/arch/mips/include/asm/mach-ar7/gpio.h | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2007 Florian Fainelli <florian@openwrt.org> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __AR7_GPIO_H__ | ||
| 20 | #define __AR7_GPIO_H__ | ||
| 21 | |||
| 22 | #include <asm/mach-ar7/ar7.h> | ||
| 23 | |||
| 24 | #define AR7_GPIO_MAX 32 | ||
| 25 | |||
| 26 | extern int gpio_request(unsigned gpio, const char *label); | ||
| 27 | extern void gpio_free(unsigned gpio); | ||
| 28 | |||
| 29 | /* Common GPIO layer */ | ||
| 30 | static inline int gpio_get_value(unsigned gpio) | ||
| 31 | { | ||
| 32 | void __iomem *gpio_in = | ||
| 33 | (void __iomem *)KSEG1ADDR(AR7_REGS_GPIO + AR7_GPIO_INPUT); | ||
| 34 | |||
| 35 | return readl(gpio_in) & (1 << gpio); | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline void gpio_set_value(unsigned gpio, int value) | ||
| 39 | { | ||
| 40 | void __iomem *gpio_out = | ||
| 41 | (void __iomem *)KSEG1ADDR(AR7_REGS_GPIO + AR7_GPIO_OUTPUT); | ||
| 42 | unsigned tmp; | ||
| 43 | |||
| 44 | tmp = readl(gpio_out) & ~(1 << gpio); | ||
| 45 | if (value) | ||
| 46 | tmp |= 1 << gpio; | ||
| 47 | writel(tmp, gpio_out); | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline int gpio_direction_input(unsigned gpio) | ||
| 51 | { | ||
| 52 | void __iomem *gpio_dir = | ||
| 53 | (void __iomem *)KSEG1ADDR(AR7_REGS_GPIO + AR7_GPIO_DIR); | ||
| 54 | |||
| 55 | if (gpio >= AR7_GPIO_MAX) | ||
| 56 | return -EINVAL; | ||
| 57 | |||
| 58 | writel(readl(gpio_dir) | (1 << gpio), gpio_dir); | ||
| 59 | |||
| 60 | return 0; | ||
| 61 | } | ||
| 62 | |||
| 63 | static inline int gpio_direction_output(unsigned gpio, int value) | ||
| 64 | { | ||
| 65 | void __iomem *gpio_dir = | ||
| 66 | (void __iomem *)KSEG1ADDR(AR7_REGS_GPIO + AR7_GPIO_DIR); | ||
| 67 | |||
| 68 | if (gpio >= AR7_GPIO_MAX) | ||
| 69 | return -EINVAL; | ||
| 70 | |||
| 71 | gpio_set_value(gpio, value); | ||
| 72 | writel(readl(gpio_dir) & ~(1 << gpio), gpio_dir); | ||
| 73 | |||
| 74 | return 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline int gpio_to_irq(unsigned gpio) | ||
| 78 | { | ||
| 79 | return -EINVAL; | ||
| 80 | } | ||
| 81 | |||
| 82 | static inline int irq_to_gpio(unsigned irq) | ||
| 83 | { | ||
| 84 | return -EINVAL; | ||
| 85 | } | ||
| 86 | |||
| 87 | /* Board specific GPIO functions */ | ||
| 88 | static inline int ar7_gpio_enable(unsigned gpio) | ||
| 89 | { | ||
| 90 | void __iomem *gpio_en = | ||
| 91 | (void __iomem *)KSEG1ADDR(AR7_REGS_GPIO + AR7_GPIO_ENABLE); | ||
| 92 | |||
| 93 | writel(readl(gpio_en) | (1 << gpio), gpio_en); | ||
| 94 | |||
| 95 | return 0; | ||
| 96 | } | ||
| 97 | |||
| 98 | static inline int ar7_gpio_disable(unsigned gpio) | ||
| 99 | { | ||
| 100 | void __iomem *gpio_en = | ||
| 101 | (void __iomem *)KSEG1ADDR(AR7_REGS_GPIO + AR7_GPIO_ENABLE); | ||
| 102 | |||
| 103 | writel(readl(gpio_en) & ~(1 << gpio), gpio_en); | ||
| 104 | |||
| 105 | return 0; | ||
| 106 | } | ||
| 107 | |||
| 108 | #include <asm-generic/gpio.h> | ||
| 109 | |||
| 110 | #endif | ||
diff --git a/arch/mips/include/asm/mach-ar7/irq.h b/arch/mips/include/asm/mach-ar7/irq.h new file mode 100644 index 000000000000..39e9757e3d93 --- /dev/null +++ b/arch/mips/include/asm/mach-ar7/irq.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Shamelessly copied from asm-mips/mach-emma2rh/ | ||
| 7 | * Copyright (C) 2003 by Ralf Baechle | ||
| 8 | */ | ||
| 9 | #ifndef __ASM_AR7_IRQ_H | ||
| 10 | #define __ASM_AR7_IRQ_H | ||
| 11 | |||
| 12 | #define NR_IRQS 256 | ||
| 13 | |||
| 14 | #include_next <irq.h> | ||
| 15 | |||
| 16 | #endif /* __ASM_AR7_IRQ_H */ | ||
diff --git a/arch/mips/include/asm/mach-ar7/prom.h b/arch/mips/include/asm/mach-ar7/prom.h new file mode 100644 index 000000000000..088f61fe85ea --- /dev/null +++ b/arch/mips/include/asm/mach-ar7/prom.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2006, 2007 Florian Fainelli <florian@openwrt.org> | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __PROM_H__ | ||
| 20 | #define __PROM_H__ | ||
| 21 | |||
| 22 | extern char *prom_getenv(const char *name); | ||
| 23 | extern void prom_meminit(void); | ||
| 24 | |||
| 25 | #endif /* __PROM_H__ */ | ||
diff --git a/arch/mips/include/asm/mach-ar7/spaces.h b/arch/mips/include/asm/mach-ar7/spaces.h new file mode 100644 index 000000000000..ac28f273449c --- /dev/null +++ b/arch/mips/include/asm/mach-ar7/spaces.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle | ||
| 7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | ||
| 8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | ||
| 9 | */ | ||
| 10 | #ifndef _ASM_AR7_SPACES_H | ||
| 11 | #define _ASM_AR7_SPACES_H | ||
| 12 | |||
| 13 | /* | ||
| 14 | * This handles the memory map. | ||
| 15 | * We handle pages at KSEG0 for kernels with 32 bit address space. | ||
| 16 | */ | ||
| 17 | #define PAGE_OFFSET 0x94000000UL | ||
| 18 | #define PHYS_OFFSET 0x14000000UL | ||
| 19 | |||
| 20 | #include <asm/mach-generic/spaces.h> | ||
| 21 | |||
| 22 | #endif /* __ASM_AR7_SPACES_H */ | ||
diff --git a/arch/mips/include/asm/mach-ar7/war.h b/arch/mips/include/asm/mach-ar7/war.h new file mode 100644 index 000000000000..f4862b563080 --- /dev/null +++ b/arch/mips/include/asm/mach-ar7/war.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org> | ||
| 7 | */ | ||
| 8 | #ifndef __ASM_MIPS_MACH_AR7_WAR_H | ||
| 9 | #define __ASM_MIPS_MACH_AR7_WAR_H | ||
| 10 | |||
| 11 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 | ||
| 12 | #define R4600_V1_HIT_CACHEOP_WAR 0 | ||
| 13 | #define R4600_V2_HIT_CACHEOP_WAR 0 | ||
| 14 | #define R5432_CP0_INTERRUPT_WAR 0 | ||
| 15 | #define BCM1250_M3_WAR 0 | ||
| 16 | #define SIBYTE_1956_WAR 0 | ||
| 17 | #define MIPS4K_ICACHE_REFILL_WAR 0 | ||
| 18 | #define MIPS_CACHE_SYNC_WAR 0 | ||
| 19 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 | ||
| 20 | #define RM9000_CDEX_SMP_WAR 0 | ||
| 21 | #define ICACHE_REFILLS_WORKAROUND_WAR 0 | ||
| 22 | #define R10000_LLSC_WAR 0 | ||
| 23 | #define MIPS34K_MISSED_ITLB_WAR 0 | ||
| 24 | |||
| 25 | #endif /* __ASM_MIPS_MACH_AR7_WAR_H */ | ||
diff --git a/arch/mips/include/asm/mach-cobalt/irq.h b/arch/mips/include/asm/mach-cobalt/irq.h index 57c8c9ac5851..9da9acf5dcba 100644 --- a/arch/mips/include/asm/mach-cobalt/irq.h +++ b/arch/mips/include/asm/mach-cobalt/irq.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Copyright (C) 1997 Cobalt Microserver | 8 | * Copyright (C) 1997 Cobalt Microserver |
| 9 | * Copyright (C) 1997, 2003 Ralf Baechle | 9 | * Copyright (C) 1997, 2003 Ralf Baechle |
| 10 | * Copyright (C) 2001-2003 Liam Davies (ldavies@agile.tv) | 10 | * Copyright (C) 2001-2003 Liam Davies (ldavies@agile.tv) |
| 11 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 11 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 12 | */ | 12 | */ |
| 13 | #ifndef _ASM_COBALT_IRQ_H | 13 | #ifndef _ASM_COBALT_IRQ_H |
| 14 | #define _ASM_COBALT_IRQ_H | 14 | #define _ASM_COBALT_IRQ_H |
diff --git a/arch/mips/include/asm/mach-cobalt/mach-gt64120.h b/arch/mips/include/asm/mach-cobalt/mach-gt64120.h index ae9c5523c7ef..f8afec3f2943 100644 --- a/arch/mips/include/asm/mach-cobalt/mach-gt64120.h +++ b/arch/mips/include/asm/mach-cobalt/mach-gt64120.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2 | * Copyright (C) 2006 Yoichi Yuasa <yuasa@linux-mips.org> |
| 3 | * | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cavium-octeon/pci-common.h b/arch/mips/include/asm/octeon/pci-octeon.h index 74ae79991e45..6ac5d3e3398e 100644 --- a/arch/mips/cavium-octeon/pci-common.h +++ b/arch/mips/include/asm/octeon/pci-octeon.h | |||
| @@ -3,23 +3,29 @@ | |||
| 3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. | 4 | * for more details. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2005-2007 Cavium Networks | 6 | * Copyright (C) 2005-2009 Cavium Networks |
| 7 | */ | 7 | */ |
| 8 | #ifndef __OCTEON_PCI_COMMON_H__ | 8 | |
| 9 | #define __OCTEON_PCI_COMMON_H__ | 9 | #ifndef __PCI_OCTEON_H__ |
| 10 | #define __PCI_OCTEON_H__ | ||
| 10 | 11 | ||
| 11 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
| 12 | 13 | ||
| 13 | /* Some PCI cards require delays when accessing config space. */ | 14 | /* Some PCI cards require delays when accessing config space. */ |
| 14 | #define PCI_CONFIG_SPACE_DELAY 10000 | 15 | #define PCI_CONFIG_SPACE_DELAY 10000 |
| 15 | 16 | ||
| 16 | /* pcibios_map_irq() is defined inside pci-common.c. All it does is call the | 17 | /* |
| 17 | Octeon specific version pointed to by this variable. This function needs to | 18 | * pcibios_map_irq() is defined inside pci-octeon.c. All it does is |
| 18 | change for PCI or PCIe based hosts */ | 19 | * call the Octeon specific version pointed to by this variable. This |
| 19 | extern typeof(pcibios_map_irq) *octeon_pcibios_map_irq; | 20 | * function needs to change for PCI or PCIe based hosts. |
| 21 | */ | ||
| 22 | extern int (*octeon_pcibios_map_irq)(const struct pci_dev *dev, | ||
| 23 | u8 slot, u8 pin); | ||
| 20 | 24 | ||
| 21 | /* The following defines are only used when octeon_dma_bar_type = | 25 | /* |
| 22 | OCTEON_DMA_BAR_TYPE_BIG */ | 26 | * The following defines are used when octeon_dma_bar_type = |
| 27 | * OCTEON_DMA_BAR_TYPE_BIG | ||
| 28 | */ | ||
| 23 | #define OCTEON_PCI_BAR1_HOLE_BITS 5 | 29 | #define OCTEON_PCI_BAR1_HOLE_BITS 5 |
| 24 | #define OCTEON_PCI_BAR1_HOLE_SIZE (1ul<<(OCTEON_PCI_BAR1_HOLE_BITS+3)) | 30 | #define OCTEON_PCI_BAR1_HOLE_SIZE (1ul<<(OCTEON_PCI_BAR1_HOLE_BITS+3)) |
| 25 | 31 | ||
| @@ -30,9 +36,9 @@ enum octeon_dma_bar_type { | |||
| 30 | OCTEON_DMA_BAR_TYPE_PCIE | 36 | OCTEON_DMA_BAR_TYPE_PCIE |
| 31 | }; | 37 | }; |
| 32 | 38 | ||
| 33 | /** | 39 | /* |
| 34 | * This is a variable to tell the DMA mapping system in dma-octeon.c | 40 | * This tells the DMA mapping system in dma-octeon.c how to map PCI |
| 35 | * how to map PCI DMA addresses. | 41 | * DMA addresses. |
| 36 | */ | 42 | */ |
| 37 | extern enum octeon_dma_bar_type octeon_dma_bar_type; | 43 | extern enum octeon_dma_bar_type octeon_dma_bar_type; |
| 38 | 44 | ||
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index dc0eaa731281..96a14a426a7c 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
| @@ -165,7 +165,14 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
| 165 | 165 | ||
| 166 | #ifdef CONFIG_FLATMEM | 166 | #ifdef CONFIG_FLATMEM |
| 167 | 167 | ||
| 168 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) | 168 | #define pfn_valid(pfn) \ |
| 169 | ({ \ | ||
| 170 | unsigned long __pfn = (pfn); \ | ||
| 171 | /* avoid <linux/bootmem.h> include hell */ \ | ||
| 172 | extern unsigned long min_low_pfn; \ | ||
| 173 | \ | ||
| 174 | __pfn >= min_low_pfn && __pfn < max_mapnr; \ | ||
| 175 | }) | ||
| 169 | 176 | ||
| 170 | #elif defined(CONFIG_SPARSEMEM) | 177 | #elif defined(CONFIG_SPARSEMEM) |
| 171 | 178 | ||
diff --git a/arch/mips/include/asm/reg.h b/arch/mips/include/asm/reg.h index 634b55d7e7f6..910e71a12466 100644 --- a/arch/mips/include/asm/reg.h +++ b/arch/mips/include/asm/reg.h | |||
| @@ -69,7 +69,7 @@ | |||
| 69 | 69 | ||
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | #ifdef CONFIG_64BIT | 72 | #if defined(CONFIG_64BIT) && !defined(WANT_COMPAT_REG_H) |
| 73 | 73 | ||
| 74 | #define EF_R0 0 | 74 | #define EF_R0 0 |
| 75 | #define EF_R1 1 | 75 | #define EF_R1 1 |
diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/asm/swab.h index 99993c0d6c12..97c2f81b4b43 100644 --- a/arch/mips/include/asm/swab.h +++ b/arch/mips/include/asm/swab.h | |||
| @@ -38,7 +38,11 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | |||
| 38 | } | 38 | } |
| 39 | #define __arch_swab32 __arch_swab32 | 39 | #define __arch_swab32 __arch_swab32 |
| 40 | 40 | ||
| 41 | #ifdef CONFIG_CPU_MIPS64_R2 | 41 | /* |
| 42 | * Having already checked for CONFIG_CPU_MIPSR2, enable the | ||
| 43 | * optimized version for 64-bit kernel on r2 CPUs. | ||
| 44 | */ | ||
| 45 | #ifdef CONFIG_64BIT | ||
| 42 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) | 46 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) |
| 43 | { | 47 | { |
| 44 | __asm__( | 48 | __asm__( |
| @@ -50,6 +54,6 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 x) | |||
| 50 | return x; | 54 | return x; |
| 51 | } | 55 | } |
| 52 | #define __arch_swab64 __arch_swab64 | 56 | #define __arch_swab64 __arch_swab64 |
| 53 | #endif /* CONFIG_CPU_MIPS64_R2 */ | 57 | #endif /* CONFIG_64BIT */ |
| 54 | #endif /* CONFIG_CPU_MIPSR2 */ | 58 | #endif /* CONFIG_CPU_MIPSR2 */ |
| 55 | #endif /* _ASM_SWAB_H */ | 59 | #endif /* _ASM_SWAB_H */ |
diff --git a/arch/mips/include/asm/unistd.h b/arch/mips/include/asm/unistd.h index 40005010827c..b70c49fdda26 100644 --- a/arch/mips/include/asm/unistd.h +++ b/arch/mips/include/asm/unistd.h | |||
| @@ -352,16 +352,18 @@ | |||
| 352 | #define __NR_inotify_init1 (__NR_Linux + 329) | 352 | #define __NR_inotify_init1 (__NR_Linux + 329) |
| 353 | #define __NR_preadv (__NR_Linux + 330) | 353 | #define __NR_preadv (__NR_Linux + 330) |
| 354 | #define __NR_pwritev (__NR_Linux + 331) | 354 | #define __NR_pwritev (__NR_Linux + 331) |
| 355 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) | ||
| 356 | #define __NR_perf_counter_open (__NR_Linux + 333) | ||
| 355 | 357 | ||
| 356 | /* | 358 | /* |
| 357 | * Offset of the last Linux o32 flavoured syscall | 359 | * Offset of the last Linux o32 flavoured syscall |
| 358 | */ | 360 | */ |
| 359 | #define __NR_Linux_syscalls 331 | 361 | #define __NR_Linux_syscalls 333 |
| 360 | 362 | ||
| 361 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 363 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 362 | 364 | ||
| 363 | #define __NR_O32_Linux 4000 | 365 | #define __NR_O32_Linux 4000 |
| 364 | #define __NR_O32_Linux_syscalls 331 | 366 | #define __NR_O32_Linux_syscalls 333 |
| 365 | 367 | ||
| 366 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 368 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 367 | 369 | ||
| @@ -660,16 +662,18 @@ | |||
| 660 | #define __NR_inotify_init1 (__NR_Linux + 288) | 662 | #define __NR_inotify_init1 (__NR_Linux + 288) |
| 661 | #define __NR_preadv (__NR_Linux + 289) | 663 | #define __NR_preadv (__NR_Linux + 289) |
| 662 | #define __NR_pwritev (__NR_Linux + 290) | 664 | #define __NR_pwritev (__NR_Linux + 290) |
| 665 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) | ||
| 666 | #define __NR_perf_counter_open (__NR_Linux + 292) | ||
| 663 | 667 | ||
| 664 | /* | 668 | /* |
| 665 | * Offset of the last Linux 64-bit flavoured syscall | 669 | * Offset of the last Linux 64-bit flavoured syscall |
| 666 | */ | 670 | */ |
| 667 | #define __NR_Linux_syscalls 290 | 671 | #define __NR_Linux_syscalls 292 |
| 668 | 672 | ||
| 669 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 673 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 670 | 674 | ||
| 671 | #define __NR_64_Linux 5000 | 675 | #define __NR_64_Linux 5000 |
| 672 | #define __NR_64_Linux_syscalls 290 | 676 | #define __NR_64_Linux_syscalls 292 |
| 673 | 677 | ||
| 674 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 678 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 675 | 679 | ||
| @@ -972,16 +976,18 @@ | |||
| 972 | #define __NR_inotify_init1 (__NR_Linux + 292) | 976 | #define __NR_inotify_init1 (__NR_Linux + 292) |
| 973 | #define __NR_preadv (__NR_Linux + 293) | 977 | #define __NR_preadv (__NR_Linux + 293) |
| 974 | #define __NR_pwritev (__NR_Linux + 294) | 978 | #define __NR_pwritev (__NR_Linux + 294) |
| 979 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) | ||
| 980 | #define __NR_perf_counter_open (__NR_Linux + 296) | ||
| 975 | 981 | ||
| 976 | /* | 982 | /* |
| 977 | * Offset of the last N32 flavoured syscall | 983 | * Offset of the last N32 flavoured syscall |
| 978 | */ | 984 | */ |
| 979 | #define __NR_Linux_syscalls 294 | 985 | #define __NR_Linux_syscalls 296 |
| 980 | 986 | ||
| 981 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 987 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 982 | 988 | ||
| 983 | #define __NR_N32_Linux 6000 | 989 | #define __NR_N32_Linux 6000 |
| 984 | #define __NR_N32_Linux_syscalls 294 | 990 | #define __NR_N32_Linux_syscalls 296 |
| 985 | 991 | ||
| 986 | #ifdef __KERNEL__ | 992 | #ifdef __KERNEL__ |
| 987 | 993 | ||
diff --git a/arch/mips/include/asm/vr41xx/capcella.h b/arch/mips/include/asm/vr41xx/capcella.h index e0ee05a3dfcc..fcc6569414fa 100644 --- a/arch/mips/include/asm/vr41xx/capcella.h +++ b/arch/mips/include/asm/vr41xx/capcella.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * capcella.h, Include file for ZAO Networks Capcella. | 2 | * capcella.h, Include file for ZAO Networks Capcella. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/vr41xx/giu.h b/arch/mips/include/asm/vr41xx/giu.h index 0bcdd3a5c256..6a90bc1d916b 100644 --- a/arch/mips/include/asm/vr41xx/giu.h +++ b/arch/mips/include/asm/vr41xx/giu.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Include file for NEC VR4100 series General-purpose I/O Unit. | 2 | * Include file for NEC VR4100 series General-purpose I/O Unit. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2005-2009 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
| @@ -41,7 +41,8 @@ typedef enum { | |||
| 41 | IRQ_SIGNAL_HOLD, | 41 | IRQ_SIGNAL_HOLD, |
| 42 | } irq_signal_t; | 42 | } irq_signal_t; |
| 43 | 43 | ||
| 44 | extern void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_t signal); | 44 | extern void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, |
| 45 | irq_signal_t signal); | ||
| 45 | 46 | ||
| 46 | typedef enum { | 47 | typedef enum { |
| 47 | IRQ_LEVEL_LOW, | 48 | IRQ_LEVEL_LOW, |
| @@ -51,23 +52,6 @@ typedef enum { | |||
| 51 | extern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level); | 52 | extern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level); |
| 52 | 53 | ||
| 53 | typedef enum { | 54 | typedef enum { |
| 54 | GPIO_DATA_LOW, | ||
| 55 | GPIO_DATA_HIGH, | ||
| 56 | GPIO_DATA_INVAL, | ||
| 57 | } gpio_data_t; | ||
| 58 | |||
| 59 | extern gpio_data_t vr41xx_gpio_get_pin(unsigned int pin); | ||
| 60 | extern int vr41xx_gpio_set_pin(unsigned int pin, gpio_data_t data); | ||
| 61 | |||
| 62 | typedef enum { | ||
| 63 | GPIO_INPUT, | ||
| 64 | GPIO_OUTPUT, | ||
| 65 | GPIO_OUTPUT_DISABLE, | ||
| 66 | } gpio_direction_t; | ||
| 67 | |||
| 68 | extern int vr41xx_gpio_set_direction(unsigned int pin, gpio_direction_t dir); | ||
| 69 | |||
| 70 | typedef enum { | ||
| 71 | GPIO_PULL_DOWN, | 55 | GPIO_PULL_DOWN, |
| 72 | GPIO_PULL_UP, | 56 | GPIO_PULL_UP, |
| 73 | GPIO_PULL_DISABLE, | 57 | GPIO_PULL_DISABLE, |
diff --git a/arch/mips/include/asm/vr41xx/irq.h b/arch/mips/include/asm/vr41xx/irq.h index d315dfbc08f2..b07f7321751d 100644 --- a/arch/mips/include/asm/vr41xx/irq.h +++ b/arch/mips/include/asm/vr41xx/irq.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Copyright (C) 2001, 2002 Paul Mundt | 7 | * Copyright (C) 2001, 2002 Paul Mundt |
| 8 | * Copyright (C) 2002 MontaVista Software, Inc. | 8 | * Copyright (C) 2002 MontaVista Software, Inc. |
| 9 | * Copyright (C) 2002 TimeSys Corp. | 9 | * Copyright (C) 2002 TimeSys Corp. |
| 10 | * Copyright (C) 2003-2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 10 | * Copyright (C) 2003-2006 Yoichi Yuasa <yuasa@linux-mips.org> |
| 11 | * | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
| 13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
diff --git a/arch/mips/include/asm/vr41xx/mpc30x.h b/arch/mips/include/asm/vr41xx/mpc30x.h index 1d67df843dc3..130d09d8c8cb 100644 --- a/arch/mips/include/asm/vr41xx/mpc30x.h +++ b/arch/mips/include/asm/vr41xx/mpc30x.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * mpc30x.h, Include file for Victor MP-C303/304. | 2 | * mpc30x.h, Include file for Victor MP-C303/304. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/vr41xx/pci.h b/arch/mips/include/asm/vr41xx/pci.h index 6fc01ce19777..c231a3d6cfd8 100644 --- a/arch/mips/include/asm/vr41xx/pci.h +++ b/arch/mips/include/asm/vr41xx/pci.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Include file for NEC VR4100 series PCI Control Unit. | 2 | * Include file for NEC VR4100 series PCI Control Unit. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2004-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/vr41xx/siu.h b/arch/mips/include/asm/vr41xx/siu.h index da9f6e373409..ca806bc4ddc8 100644 --- a/arch/mips/include/asm/vr41xx/siu.h +++ b/arch/mips/include/asm/vr41xx/siu.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Include file for NEC VR4100 series Serial Interface Unit. | 2 | * Include file for NEC VR4100 series Serial Interface Unit. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2005-2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/vr41xx/tb0219.h b/arch/mips/include/asm/vr41xx/tb0219.h index dc981b4be0a4..c78e8243b447 100644 --- a/arch/mips/include/asm/vr41xx/tb0219.h +++ b/arch/mips/include/asm/vr41xx/tb0219.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * tb0219.h, Include file for TANBAC TB0219. | 2 | * tb0219.h, Include file for TANBAC TB0219. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * Modified for TANBAC TB0219: | 6 | * Modified for TANBAC TB0219: |
| 7 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> | 7 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> |
diff --git a/arch/mips/include/asm/vr41xx/tb0226.h b/arch/mips/include/asm/vr41xx/tb0226.h index de527dcfa5f3..36f5f798e416 100644 --- a/arch/mips/include/asm/vr41xx/tb0226.h +++ b/arch/mips/include/asm/vr41xx/tb0226.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * tb0226.h, Include file for TANBAC TB0226. | 2 | * tb0226.h, Include file for TANBAC TB0226. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/vr41xx/vr41xx.h b/arch/mips/include/asm/vr41xx/vr41xx.h index 22be64971cc6..7b96a43b72ba 100644 --- a/arch/mips/include/asm/vr41xx/vr41xx.h +++ b/arch/mips/include/asm/vr41xx/vr41xx.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * Copyright (C) 2001, 2002 Paul Mundt | 7 | * Copyright (C) 2001, 2002 Paul Mundt |
| 8 | * Copyright (C) 2002 MontaVista Software, Inc. | 8 | * Copyright (C) 2002 MontaVista Software, Inc. |
| 9 | * Copyright (C) 2002 TimeSys Corp. | 9 | * Copyright (C) 2002 TimeSys Corp. |
| 10 | * Copyright (C) 2003-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 10 | * Copyright (C) 2003-2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 11 | * | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
| 13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c index e1333d7319e2..ff448233dab5 100644 --- a/arch/mips/kernel/binfmt_elfo32.c +++ b/arch/mips/kernel/binfmt_elfo32.c | |||
| @@ -53,6 +53,23 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
| 53 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) | 53 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) |
| 54 | 54 | ||
| 55 | #include <asm/processor.h> | 55 | #include <asm/processor.h> |
| 56 | |||
| 57 | /* | ||
| 58 | * When this file is selected, we are definitely running a 64bit kernel. | ||
| 59 | * So using the right regs define in asm/reg.h | ||
| 60 | */ | ||
| 61 | #define WANT_COMPAT_REG_H | ||
| 62 | |||
| 63 | /* These MUST be defined before elf.h gets included */ | ||
| 64 | extern void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs); | ||
| 65 | #define ELF_CORE_COPY_REGS(_dest, _regs) elf32_core_copy_regs(_dest, _regs); | ||
| 66 | #define ELF_CORE_COPY_TASK_REGS(_tsk, _dest) \ | ||
| 67 | ({ \ | ||
| 68 | int __res = 1; \ | ||
| 69 | elf32_core_copy_regs(*(_dest), task_pt_regs(_tsk)); \ | ||
| 70 | __res; \ | ||
| 71 | }) | ||
| 72 | |||
| 56 | #include <linux/module.h> | 73 | #include <linux/module.h> |
| 57 | #include <linux/elfcore.h> | 74 | #include <linux/elfcore.h> |
| 58 | #include <linux/compat.h> | 75 | #include <linux/compat.h> |
| @@ -110,9 +127,6 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
| 110 | value->tv_usec = rem / NSEC_PER_USEC; | 127 | value->tv_usec = rem / NSEC_PER_USEC; |
| 111 | } | 128 | } |
| 112 | 129 | ||
| 113 | #undef ELF_CORE_COPY_REGS | ||
| 114 | #define ELF_CORE_COPY_REGS(_dest, _regs) elf32_core_copy_regs(_dest, _regs); | ||
| 115 | |||
| 116 | void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs) | 130 | void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs) |
| 117 | { | 131 | { |
| 118 | int i; | 132 | int i; |
diff --git a/arch/mips/kernel/cevt-ds1287.c b/arch/mips/kernel/cevt-ds1287.c index 1ada45ea0700..6996da4d74a2 100644 --- a/arch/mips/kernel/cevt-ds1287.c +++ b/arch/mips/kernel/cevt-ds1287.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DS1287 clockevent driver | 2 | * DS1287 clockevent driver |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/kernel/cevt-gt641xx.c b/arch/mips/kernel/cevt-gt641xx.c index e9b787feedcb..92351e00ae0e 100644 --- a/arch/mips/kernel/cevt-gt641xx.c +++ b/arch/mips/kernel/cevt-gt641xx.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * GT641xx clockevent routines. | 2 | * GT641xx clockevent routines. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c index b551f48d3a07..23da108506b0 100644 --- a/arch/mips/kernel/csrc-ioasic.c +++ b/arch/mips/kernel/csrc-ioasic.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * DEC I/O ASIC's counter clocksource | 2 | * DEC I/O ASIC's counter clocksource |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/kernel/irq-gic.c b/arch/mips/kernel/irq-gic.c index 39000f103f2c..d2072cd38592 100644 --- a/arch/mips/kernel/irq-gic.c +++ b/arch/mips/kernel/irq-gic.c | |||
| @@ -107,9 +107,7 @@ static unsigned int gic_irq_startup(unsigned int irq) | |||
| 107 | { | 107 | { |
| 108 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); | 108 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); |
| 109 | irq -= _irqbase; | 109 | irq -= _irqbase; |
| 110 | /* FIXME: this is wrong for !GICISWORDLITTLEENDIAN */ | 110 | GIC_SET_INTR_MASK(irq, 1); |
| 111 | GICWRITE(GIC_REG_ADDR(SHARED, (GIC_SH_SMASK_31_0_OFS + (irq / 32))), | ||
| 112 | 1 << (irq % 32)); | ||
| 113 | return 0; | 111 | return 0; |
| 114 | } | 112 | } |
| 115 | 113 | ||
| @@ -120,8 +118,7 @@ static void gic_irq_ack(unsigned int irq) | |||
| 120 | #endif | 118 | #endif |
| 121 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); | 119 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); |
| 122 | irq -= _irqbase; | 120 | irq -= _irqbase; |
| 123 | GICWRITE(GIC_REG_ADDR(SHARED, (GIC_SH_RMASK_31_0_OFS + (irq / 32))), | 121 | GIC_CLR_INTR_MASK(irq, 1); |
| 124 | 1 << (irq % 32)); | ||
| 125 | 122 | ||
| 126 | if (_intrmap[irq].trigtype == GIC_TRIG_EDGE) { | 123 | if (_intrmap[irq].trigtype == GIC_TRIG_EDGE) { |
| 127 | if (!gic_wedgeb2bok) | 124 | if (!gic_wedgeb2bok) |
| @@ -138,18 +135,14 @@ static void gic_mask_irq(unsigned int irq) | |||
| 138 | { | 135 | { |
| 139 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); | 136 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); |
| 140 | irq -= _irqbase; | 137 | irq -= _irqbase; |
| 141 | /* FIXME: this is wrong for !GICISWORDLITTLEENDIAN */ | 138 | GIC_CLR_INTR_MASK(irq, 1); |
| 142 | GICWRITE(GIC_REG_ADDR(SHARED, (GIC_SH_RMASK_31_0_OFS + (irq / 32))), | ||
| 143 | 1 << (irq % 32)); | ||
| 144 | } | 139 | } |
| 145 | 140 | ||
| 146 | static void gic_unmask_irq(unsigned int irq) | 141 | static void gic_unmask_irq(unsigned int irq) |
| 147 | { | 142 | { |
| 148 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); | 143 | pr_debug("CPU%d: %s: irq%d\n", smp_processor_id(), __func__, irq); |
| 149 | irq -= _irqbase; | 144 | irq -= _irqbase; |
| 150 | /* FIXME: this is wrong for !GICISWORDLITTLEENDIAN */ | 145 | GIC_SET_INTR_MASK(irq, 1); |
| 151 | GICWRITE(GIC_REG_ADDR(SHARED, (GIC_SH_SMASK_31_0_OFS + (irq / 32))), | ||
| 152 | 1 << (irq % 32)); | ||
| 153 | } | 146 | } |
| 154 | 147 | ||
| 155 | #ifdef CONFIG_SMP | 148 | #ifdef CONFIG_SMP |
| @@ -254,6 +247,10 @@ static void __init gic_basic_init(void) | |||
| 254 | if (cpu == X) | 247 | if (cpu == X) |
| 255 | continue; | 248 | continue; |
| 256 | 249 | ||
| 250 | if (cpu == 0 && i != 0 && _intrmap[i].intrnum == 0 && | ||
| 251 | _intrmap[i].ipiflag == 0) | ||
| 252 | continue; | ||
| 253 | |||
| 257 | setup_intr(_intrmap[i].intrnum, | 254 | setup_intr(_intrmap[i].intrnum, |
| 258 | _intrmap[i].cpunum, | 255 | _intrmap[i].cpunum, |
| 259 | _intrmap[i].pin, | 256 | _intrmap[i].pin, |
diff --git a/arch/mips/kernel/irq-gt641xx.c b/arch/mips/kernel/irq-gt641xx.c index 1b81b131f43c..ebcc5f7ad9c2 100644 --- a/arch/mips/kernel/irq-gt641xx.c +++ b/arch/mips/kernel/irq-gt641xx.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * GT641xx IRQ routines. | 2 | * GT641xx IRQ routines. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 0b31b9bda048..20a86e08fd58 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
| @@ -652,6 +652,8 @@ einval: li v0, -ENOSYS | |||
| 652 | sys sys_inotify_init1 1 | 652 | sys sys_inotify_init1 1 |
| 653 | sys sys_preadv 6 /* 4330 */ | 653 | sys sys_preadv 6 /* 4330 */ |
| 654 | sys sys_pwritev 6 | 654 | sys sys_pwritev 6 |
| 655 | sys sys_rt_tgsigqueueinfo 4 | ||
| 656 | sys sys_perf_counter_open 5 | ||
| 655 | .endm | 657 | .endm |
| 656 | 658 | ||
| 657 | /* We pre-compute the number of _instruction_ bytes needed to | 659 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index c647fd6e722f..b046130d4c5d 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
| @@ -489,4 +489,6 @@ sys_call_table: | |||
| 489 | PTR sys_inotify_init1 | 489 | PTR sys_inotify_init1 |
| 490 | PTR sys_preadv | 490 | PTR sys_preadv |
| 491 | PTR sys_pwritev /* 5390 */ | 491 | PTR sys_pwritev /* 5390 */ |
| 492 | PTR sys_rt_tgsigqueueinfo | ||
| 493 | PTR sys_perf_counter_open | ||
| 492 | .size sys_call_table,.-sys_call_table | 494 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 93cc672f4522..15874f9812cc 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
| @@ -415,4 +415,6 @@ EXPORT(sysn32_call_table) | |||
| 415 | PTR sys_inotify_init1 | 415 | PTR sys_inotify_init1 |
| 416 | PTR sys_preadv | 416 | PTR sys_preadv |
| 417 | PTR sys_pwritev | 417 | PTR sys_pwritev |
| 418 | PTR compat_sys_rt_tgsigqueueinfo /* 5295 */ | ||
| 419 | PTR sys_perf_counter_open | ||
| 418 | .size sysn32_call_table,.-sysn32_call_table | 420 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index a5598b2339dd..781e0f1e9533 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
| @@ -535,4 +535,6 @@ sys_call_table: | |||
| 535 | PTR sys_inotify_init1 | 535 | PTR sys_inotify_init1 |
| 536 | PTR compat_sys_preadv /* 4330 */ | 536 | PTR compat_sys_preadv /* 4330 */ |
| 537 | PTR compat_sys_pwritev | 537 | PTR compat_sys_pwritev |
| 538 | PTR compat_sys_rt_tgsigqueueinfo | ||
| 539 | PTR sys_perf_counter_open | ||
| 538 | .size sys_call_table,.-sys_call_table | 540 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c index 653be061b9ec..ad0ff5dc4d59 100644 --- a/arch/mips/kernel/smp-cmp.c +++ b/arch/mips/kernel/smp-cmp.c | |||
| @@ -37,80 +37,24 @@ | |||
| 37 | #include <asm/mipsregs.h> | 37 | #include <asm/mipsregs.h> |
| 38 | #include <asm/mipsmtregs.h> | 38 | #include <asm/mipsmtregs.h> |
| 39 | #include <asm/mips_mt.h> | 39 | #include <asm/mips_mt.h> |
| 40 | 40 | #include <asm/amon.h> | |
| 41 | /* | 41 | #include <asm/gic.h> |
| 42 | * Crude manipulation of the CPU masks to control which | ||
| 43 | * which CPU's are brought online during initialisation | ||
| 44 | * | ||
| 45 | * Beware... this needs to be called after CPU discovery | ||
| 46 | * but before CPU bringup | ||
| 47 | */ | ||
| 48 | static int __init allowcpus(char *str) | ||
| 49 | { | ||
| 50 | cpumask_t cpu_allow_map; | ||
| 51 | char buf[256]; | ||
| 52 | int len; | ||
| 53 | |||
| 54 | cpus_clear(cpu_allow_map); | ||
| 55 | if (cpulist_parse(str, &cpu_allow_map) == 0) { | ||
| 56 | cpu_set(0, cpu_allow_map); | ||
| 57 | cpus_and(cpu_possible_map, cpu_possible_map, cpu_allow_map); | ||
| 58 | len = cpulist_scnprintf(buf, sizeof(buf)-1, &cpu_possible_map); | ||
| 59 | buf[len] = '\0'; | ||
| 60 | pr_debug("Allowable CPUs: %s\n", buf); | ||
| 61 | return 1; | ||
| 62 | } else | ||
| 63 | return 0; | ||
| 64 | } | ||
| 65 | __setup("allowcpus=", allowcpus); | ||
| 66 | 42 | ||
| 67 | static void ipi_call_function(unsigned int cpu) | 43 | static void ipi_call_function(unsigned int cpu) |
| 68 | { | 44 | { |
| 69 | unsigned int action = 0; | ||
| 70 | |||
| 71 | pr_debug("CPU%d: %s cpu %d status %08x\n", | 45 | pr_debug("CPU%d: %s cpu %d status %08x\n", |
| 72 | smp_processor_id(), __func__, cpu, read_c0_status()); | 46 | smp_processor_id(), __func__, cpu, read_c0_status()); |
| 73 | 47 | ||
| 74 | switch (cpu) { | 48 | gic_send_ipi(plat_ipi_call_int_xlate(cpu)); |
| 75 | case 0: | ||
| 76 | action = GIC_IPI_EXT_INTR_CALLFNC_VPE0; | ||
| 77 | break; | ||
| 78 | case 1: | ||
| 79 | action = GIC_IPI_EXT_INTR_CALLFNC_VPE1; | ||
| 80 | break; | ||
| 81 | case 2: | ||
| 82 | action = GIC_IPI_EXT_INTR_CALLFNC_VPE2; | ||
| 83 | break; | ||
| 84 | case 3: | ||
| 85 | action = GIC_IPI_EXT_INTR_CALLFNC_VPE3; | ||
| 86 | break; | ||
| 87 | } | ||
| 88 | gic_send_ipi(action); | ||
| 89 | } | 49 | } |
| 90 | 50 | ||
| 91 | 51 | ||
| 92 | static void ipi_resched(unsigned int cpu) | 52 | static void ipi_resched(unsigned int cpu) |
| 93 | { | 53 | { |
| 94 | unsigned int action = 0; | ||
| 95 | |||
| 96 | pr_debug("CPU%d: %s cpu %d status %08x\n", | 54 | pr_debug("CPU%d: %s cpu %d status %08x\n", |
| 97 | smp_processor_id(), __func__, cpu, read_c0_status()); | 55 | smp_processor_id(), __func__, cpu, read_c0_status()); |
| 98 | 56 | ||
| 99 | switch (cpu) { | 57 | gic_send_ipi(plat_ipi_resched_int_xlate(cpu)); |
| 100 | case 0: | ||
| 101 | action = GIC_IPI_EXT_INTR_RESCHED_VPE0; | ||
| 102 | break; | ||
| 103 | case 1: | ||
| 104 | action = GIC_IPI_EXT_INTR_RESCHED_VPE1; | ||
| 105 | break; | ||
| 106 | case 2: | ||
| 107 | action = GIC_IPI_EXT_INTR_RESCHED_VPE2; | ||
| 108 | break; | ||
| 109 | case 3: | ||
| 110 | action = GIC_IPI_EXT_INTR_RESCHED_VPE3; | ||
| 111 | break; | ||
| 112 | } | ||
| 113 | gic_send_ipi(action); | ||
| 114 | } | 58 | } |
| 115 | 59 | ||
| 116 | /* | 60 | /* |
| @@ -206,7 +150,7 @@ static void cmp_boot_secondary(int cpu, struct task_struct *idle) | |||
| 206 | (unsigned long)(gp + sizeof(struct thread_info))); | 150 | (unsigned long)(gp + sizeof(struct thread_info))); |
| 207 | #endif | 151 | #endif |
| 208 | 152 | ||
| 209 | amon_cpu_start(cpu, pc, sp, gp, a0); | 153 | amon_cpu_start(cpu, pc, sp, (unsigned long)gp, a0); |
| 210 | } | 154 | } |
| 211 | 155 | ||
| 212 | /* | 156 | /* |
diff --git a/arch/mips/kernel/sync-r4k.c b/arch/mips/kernel/sync-r4k.c index 9021108eb9c1..05dd170a83f7 100644 --- a/arch/mips/kernel/sync-r4k.c +++ b/arch/mips/kernel/sync-r4k.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Count register synchronisation. | 2 | * Count register synchronisation. |
| 3 | * | 3 | * |
| 4 | * All CPUs will have their count registers synchronised to the CPU0 expirelo | 4 | * All CPUs will have their count registers synchronised to the CPU0 next time |
| 5 | * value. This can cause a small timewarp for CPU0. All other CPU's should | 5 | * value. This can cause a small timewarp for CPU0. All other CPU's should |
| 6 | * not have done anything significant (but they may have had interrupts | 6 | * not have done anything significant (but they may have had interrupts |
| 7 | * enabled briefly - prom_smp_finish() should not be responsible for enabling | 7 | * enabled briefly - prom_smp_finish() should not be responsible for enabling |
| @@ -13,21 +13,22 @@ | |||
| 13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/irqflags.h> | 15 | #include <linux/irqflags.h> |
| 16 | #include <linux/r4k-timer.h> | 16 | #include <linux/cpumask.h> |
| 17 | 17 | ||
| 18 | #include <asm/r4k-timer.h> | ||
| 18 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
| 19 | #include <asm/barrier.h> | 20 | #include <asm/barrier.h> |
| 20 | #include <asm/cpumask.h> | ||
| 21 | #include <asm/mipsregs.h> | 21 | #include <asm/mipsregs.h> |
| 22 | 22 | ||
| 23 | static atomic_t __initdata count_start_flag = ATOMIC_INIT(0); | 23 | static atomic_t __cpuinitdata count_start_flag = ATOMIC_INIT(0); |
| 24 | static atomic_t __initdata count_count_start = ATOMIC_INIT(0); | 24 | static atomic_t __cpuinitdata count_count_start = ATOMIC_INIT(0); |
| 25 | static atomic_t __initdata count_count_stop = ATOMIC_INIT(0); | 25 | static atomic_t __cpuinitdata count_count_stop = ATOMIC_INIT(0); |
| 26 | static atomic_t __cpuinitdata count_reference = ATOMIC_INIT(0); | ||
| 26 | 27 | ||
| 27 | #define COUNTON 100 | 28 | #define COUNTON 100 |
| 28 | #define NR_LOOPS 5 | 29 | #define NR_LOOPS 5 |
| 29 | 30 | ||
| 30 | void __init synchronise_count_master(void) | 31 | void __cpuinit synchronise_count_master(void) |
| 31 | { | 32 | { |
| 32 | int i; | 33 | int i; |
| 33 | unsigned long flags; | 34 | unsigned long flags; |
| @@ -42,19 +43,20 @@ void __init synchronise_count_master(void) | |||
| 42 | return; | 43 | return; |
| 43 | #endif | 44 | #endif |
| 44 | 45 | ||
| 45 | pr_info("Checking COUNT synchronization across %u CPUs: ", | 46 | printk(KERN_INFO "Synchronize counters across %u CPUs: ", |
| 46 | num_online_cpus()); | 47 | num_online_cpus()); |
| 47 | 48 | ||
| 48 | local_irq_save(flags); | 49 | local_irq_save(flags); |
| 49 | 50 | ||
| 50 | /* | 51 | /* |
| 51 | * Notify the slaves that it's time to start | 52 | * Notify the slaves that it's time to start |
| 52 | */ | 53 | */ |
| 54 | atomic_set(&count_reference, read_c0_count()); | ||
| 53 | atomic_set(&count_start_flag, 1); | 55 | atomic_set(&count_start_flag, 1); |
| 54 | smp_wmb(); | 56 | smp_wmb(); |
| 55 | 57 | ||
| 56 | /* Count will be initialised to expirelo for all CPU's */ | 58 | /* Count will be initialised to current timer for all CPU's */ |
| 57 | initcount = expirelo; | 59 | initcount = read_c0_count(); |
| 58 | 60 | ||
| 59 | /* | 61 | /* |
| 60 | * We loop a few times to get a primed instruction cache, | 62 | * We loop a few times to get a primed instruction cache, |
| @@ -106,7 +108,7 @@ void __init synchronise_count_master(void) | |||
| 106 | printk("done.\n"); | 108 | printk("done.\n"); |
| 107 | } | 109 | } |
| 108 | 110 | ||
| 109 | void __init synchronise_count_slave(void) | 111 | void __cpuinit synchronise_count_slave(void) |
| 110 | { | 112 | { |
| 111 | int i; | 113 | int i; |
| 112 | unsigned long flags; | 114 | unsigned long flags; |
| @@ -131,8 +133,8 @@ void __init synchronise_count_slave(void) | |||
| 131 | while (!atomic_read(&count_start_flag)) | 133 | while (!atomic_read(&count_start_flag)) |
| 132 | mb(); | 134 | mb(); |
| 133 | 135 | ||
| 134 | /* Count will be initialised to expirelo for all CPU's */ | 136 | /* Count will be initialised to next expire for all CPU's */ |
| 135 | initcount = expirelo; | 137 | initcount = atomic_read(&count_reference); |
| 136 | 138 | ||
| 137 | ncpus = num_online_cpus(); | 139 | ncpus = num_online_cpus(); |
| 138 | for (i = 0; i < NR_LOOPS; i++) { | 140 | for (i = 0; i < NR_LOOPS; i++) { |
| @@ -156,4 +158,3 @@ void __init synchronise_count_slave(void) | |||
| 156 | local_irq_restore(flags); | 158 | local_irq_restore(flags); |
| 157 | } | 159 | } |
| 158 | #undef NR_LOOPS | 160 | #undef NR_LOOPS |
| 159 | #endif | ||
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 3ca5f42e819d..07b9ec2c6e3d 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
| @@ -1387,7 +1387,7 @@ static ssize_t store_ntcs(struct device *dev, struct device_attribute *attr, | |||
| 1387 | return len; | 1387 | return len; |
| 1388 | 1388 | ||
| 1389 | out_einval: | 1389 | out_einval: |
| 1390 | return -EINVAL;; | 1390 | return -EINVAL; |
| 1391 | } | 1391 | } |
| 1392 | 1392 | ||
| 1393 | static struct device_attribute vpe_class_attributes[] = { | 1393 | static struct device_attribute vpe_class_attributes[] = { |
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c index 475038a141a6..27c807b67fea 100644 --- a/arch/mips/mti-malta/malta-init.c +++ b/arch/mips/mti-malta/malta-init.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <asm/cacheflush.h> | 30 | #include <asm/cacheflush.h> |
| 31 | #include <asm/traps.h> | 31 | #include <asm/traps.h> |
| 32 | 32 | ||
| 33 | #include <asm/gcmpregs.h> | ||
| 33 | #include <asm/mips-boards/prom.h> | 34 | #include <asm/mips-boards/prom.h> |
| 34 | #include <asm/mips-boards/generic.h> | 35 | #include <asm/mips-boards/generic.h> |
| 35 | #include <asm/mips-boards/bonito64.h> | 36 | #include <asm/mips-boards/bonito64.h> |
| @@ -192,6 +193,8 @@ extern struct plat_smp_ops msmtc_smp_ops; | |||
| 192 | 193 | ||
| 193 | void __init prom_init(void) | 194 | void __init prom_init(void) |
| 194 | { | 195 | { |
| 196 | int result; | ||
| 197 | |||
| 195 | prom_argc = fw_arg0; | 198 | prom_argc = fw_arg0; |
| 196 | _prom_argv = (int *) fw_arg1; | 199 | _prom_argv = (int *) fw_arg1; |
| 197 | _prom_envp = (int *) fw_arg2; | 200 | _prom_envp = (int *) fw_arg2; |
| @@ -358,12 +361,21 @@ void __init prom_init(void) | |||
| 358 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 361 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
| 359 | console_config(); | 362 | console_config(); |
| 360 | #endif | 363 | #endif |
| 364 | /* Early detection of CMP support */ | ||
| 365 | result = gcmp_probe(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ); | ||
| 366 | |||
| 361 | #ifdef CONFIG_MIPS_CMP | 367 | #ifdef CONFIG_MIPS_CMP |
| 362 | register_smp_ops(&cmp_smp_ops); | 368 | if (result) |
| 369 | register_smp_ops(&cmp_smp_ops); | ||
| 363 | #endif | 370 | #endif |
| 364 | #ifdef CONFIG_MIPS_MT_SMP | 371 | #ifdef CONFIG_MIPS_MT_SMP |
| 372 | #ifdef CONFIG_MIPS_CMP | ||
| 373 | if (!result) | ||
| 374 | register_smp_ops(&vsmp_smp_ops); | ||
| 375 | #else | ||
| 365 | register_smp_ops(&vsmp_smp_ops); | 376 | register_smp_ops(&vsmp_smp_ops); |
| 366 | #endif | 377 | #endif |
| 378 | #endif | ||
| 367 | #ifdef CONFIG_MIPS_MT_SMTC | 379 | #ifdef CONFIG_MIPS_MT_SMTC |
| 368 | register_smp_ops(&msmtc_smp_ops); | 380 | register_smp_ops(&msmtc_smp_ops); |
| 369 | #endif | 381 | #endif |
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index b4eaf137e4a7..a8756f82c31b 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
| @@ -331,6 +331,21 @@ static struct irqaction irq_call = { | |||
| 331 | .flags = IRQF_DISABLED|IRQF_PERCPU, | 331 | .flags = IRQF_DISABLED|IRQF_PERCPU, |
| 332 | .name = "IPI_call" | 332 | .name = "IPI_call" |
| 333 | }; | 333 | }; |
| 334 | |||
| 335 | static int gic_resched_int_base; | ||
| 336 | static int gic_call_int_base; | ||
| 337 | #define GIC_RESCHED_INT(cpu) (gic_resched_int_base+(cpu)) | ||
| 338 | #define GIC_CALL_INT(cpu) (gic_call_int_base+(cpu)) | ||
| 339 | |||
| 340 | unsigned int plat_ipi_call_int_xlate(unsigned int cpu) | ||
| 341 | { | ||
| 342 | return GIC_CALL_INT(cpu); | ||
| 343 | } | ||
| 344 | |||
| 345 | unsigned int plat_ipi_resched_int_xlate(unsigned int cpu) | ||
| 346 | { | ||
| 347 | return GIC_RESCHED_INT(cpu); | ||
| 348 | } | ||
| 334 | #endif /* CONFIG_MIPS_MT_SMP */ | 349 | #endif /* CONFIG_MIPS_MT_SMP */ |
| 335 | 350 | ||
| 336 | static struct irqaction i8259irq = { | 351 | static struct irqaction i8259irq = { |
| @@ -370,7 +385,7 @@ static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap); | |||
| 370 | * Interrupts and CPUs/Core Interrupts. The nature of the External | 385 | * Interrupts and CPUs/Core Interrupts. The nature of the External |
| 371 | * Interrupts is also defined here - polarity/trigger. | 386 | * Interrupts is also defined here - polarity/trigger. |
| 372 | */ | 387 | */ |
| 373 | static struct gic_intr_map gic_intr_map[] = { | 388 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { |
| 374 | { GIC_EXT_INTR(0), X, X, X, X, 0 }, | 389 | { GIC_EXT_INTR(0), X, X, X, X, 0 }, |
| 375 | { GIC_EXT_INTR(1), X, X, X, X, 0 }, | 390 | { GIC_EXT_INTR(1), X, X, X, X, 0 }, |
| 376 | { GIC_EXT_INTR(2), X, X, X, X, 0 }, | 391 | { GIC_EXT_INTR(2), X, X, X, X, 0 }, |
| @@ -387,21 +402,14 @@ static struct gic_intr_map gic_intr_map[] = { | |||
| 387 | { GIC_EXT_INTR(13), 0, GIC_MAP_TO_NMI_MSK, GIC_POL_POS, GIC_TRIG_LEVEL, 0 }, | 402 | { GIC_EXT_INTR(13), 0, GIC_MAP_TO_NMI_MSK, GIC_POL_POS, GIC_TRIG_LEVEL, 0 }, |
| 388 | { GIC_EXT_INTR(14), 0, GIC_MAP_TO_NMI_MSK, GIC_POL_POS, GIC_TRIG_LEVEL, 0 }, | 403 | { GIC_EXT_INTR(14), 0, GIC_MAP_TO_NMI_MSK, GIC_POL_POS, GIC_TRIG_LEVEL, 0 }, |
| 389 | { GIC_EXT_INTR(15), X, X, X, X, 0 }, | 404 | { GIC_EXT_INTR(15), X, X, X, X, 0 }, |
| 390 | { GIC_EXT_INTR(16), 0, GIC_CPU_INT1, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | 405 | /* This is the end of the general interrupts now we do IPI ones */ |
| 391 | { GIC_EXT_INTR(17), 0, GIC_CPU_INT2, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | ||
| 392 | { GIC_EXT_INTR(18), 1, GIC_CPU_INT1, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | ||
| 393 | { GIC_EXT_INTR(19), 1, GIC_CPU_INT2, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | ||
| 394 | { GIC_EXT_INTR(20), 2, GIC_CPU_INT1, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | ||
| 395 | { GIC_EXT_INTR(21), 2, GIC_CPU_INT2, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | ||
| 396 | { GIC_EXT_INTR(22), 3, GIC_CPU_INT1, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | ||
| 397 | { GIC_EXT_INTR(23), 3, GIC_CPU_INT2, GIC_POL_POS, GIC_TRIG_EDGE, 1 }, | ||
| 398 | }; | 406 | }; |
| 399 | #endif | 407 | #endif |
| 400 | 408 | ||
| 401 | /* | 409 | /* |
| 402 | * GCMP needs to be detected before any SMP initialisation | 410 | * GCMP needs to be detected before any SMP initialisation |
| 403 | */ | 411 | */ |
| 404 | static int __init gcmp_probe(unsigned long addr, unsigned long size) | 412 | int __init gcmp_probe(unsigned long addr, unsigned long size) |
| 405 | { | 413 | { |
| 406 | if (gcmp_present >= 0) | 414 | if (gcmp_present >= 0) |
| 407 | return gcmp_present; | 415 | return gcmp_present; |
| @@ -416,28 +424,36 @@ static int __init gcmp_probe(unsigned long addr, unsigned long size) | |||
| 416 | } | 424 | } |
| 417 | 425 | ||
| 418 | #if defined(CONFIG_MIPS_MT_SMP) | 426 | #if defined(CONFIG_MIPS_MT_SMP) |
| 427 | static void __init fill_ipi_map1(int baseintr, int cpu, int cpupin) | ||
| 428 | { | ||
| 429 | int intr = baseintr + cpu; | ||
| 430 | gic_intr_map[intr].intrnum = GIC_EXT_INTR(intr); | ||
| 431 | gic_intr_map[intr].cpunum = cpu; | ||
| 432 | gic_intr_map[intr].pin = cpupin; | ||
| 433 | gic_intr_map[intr].polarity = GIC_POL_POS; | ||
| 434 | gic_intr_map[intr].trigtype = GIC_TRIG_EDGE; | ||
| 435 | gic_intr_map[intr].ipiflag = 1; | ||
| 436 | ipi_map[cpu] |= (1 << (cpupin + 2)); | ||
| 437 | } | ||
| 438 | |||
| 419 | static void __init fill_ipi_map(void) | 439 | static void __init fill_ipi_map(void) |
| 420 | { | 440 | { |
| 421 | int i; | 441 | int cpu; |
| 422 | 442 | ||
| 423 | for (i = 0; i < ARRAY_SIZE(gic_intr_map); i++) { | 443 | for (cpu = 0; cpu < NR_CPUS; cpu++) { |
| 424 | if (gic_intr_map[i].ipiflag && (gic_intr_map[i].cpunum != X)) | 444 | fill_ipi_map1(gic_resched_int_base, cpu, GIC_CPU_INT1); |
| 425 | ipi_map[gic_intr_map[i].cpunum] |= | 445 | fill_ipi_map1(gic_call_int_base, cpu, GIC_CPU_INT2); |
| 426 | (1 << (gic_intr_map[i].pin + 2)); | ||
| 427 | } | 446 | } |
| 428 | } | 447 | } |
| 429 | #endif | 448 | #endif |
| 430 | 449 | ||
| 431 | void __init arch_init_irq(void) | 450 | void __init arch_init_irq(void) |
| 432 | { | 451 | { |
| 433 | int gic_present, gcmp_present; | ||
| 434 | |||
| 435 | init_i8259_irqs(); | 452 | init_i8259_irqs(); |
| 436 | 453 | ||
| 437 | if (!cpu_has_veic) | 454 | if (!cpu_has_veic) |
| 438 | mips_cpu_irq_init(); | 455 | mips_cpu_irq_init(); |
| 439 | 456 | ||
| 440 | gcmp_present = gcmp_probe(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ); | ||
| 441 | if (gcmp_present) { | 457 | if (gcmp_present) { |
| 442 | GCMPGCB(GICBA) = GIC_BASE_ADDR | GCMP_GCB_GICBA_EN_MSK; | 458 | GCMPGCB(GICBA) = GIC_BASE_ADDR | GCMP_GCB_GICBA_EN_MSK; |
| 443 | gic_present = 1; | 459 | gic_present = 1; |
| @@ -514,24 +530,10 @@ void __init arch_init_irq(void) | |||
| 514 | if (gic_present) { | 530 | if (gic_present) { |
| 515 | /* FIXME */ | 531 | /* FIXME */ |
| 516 | int i; | 532 | int i; |
| 517 | struct { | 533 | |
| 518 | unsigned int resched; | 534 | gic_call_int_base = GIC_NUM_INTRS - NR_CPUS; |
| 519 | unsigned int call; | 535 | gic_resched_int_base = gic_call_int_base - NR_CPUS; |
| 520 | } ipiirq[] = { | 536 | |
| 521 | { | ||
| 522 | .resched = GIC_IPI_EXT_INTR_RESCHED_VPE0, | ||
| 523 | .call = GIC_IPI_EXT_INTR_CALLFNC_VPE0}, | ||
| 524 | { | ||
| 525 | .resched = GIC_IPI_EXT_INTR_RESCHED_VPE1, | ||
| 526 | .call = GIC_IPI_EXT_INTR_CALLFNC_VPE1 | ||
| 527 | }, { | ||
| 528 | .resched = GIC_IPI_EXT_INTR_RESCHED_VPE2, | ||
| 529 | .call = GIC_IPI_EXT_INTR_CALLFNC_VPE2 | ||
| 530 | }, { | ||
| 531 | .resched = GIC_IPI_EXT_INTR_RESCHED_VPE3, | ||
| 532 | .call = GIC_IPI_EXT_INTR_CALLFNC_VPE3 | ||
| 533 | } | ||
| 534 | }; | ||
| 535 | fill_ipi_map(); | 537 | fill_ipi_map(); |
| 536 | gic_init(GIC_BASE_ADDR, GIC_ADDRSPACE_SZ, gic_intr_map, ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE); | 538 | gic_init(GIC_BASE_ADDR, GIC_ADDRSPACE_SZ, gic_intr_map, ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE); |
| 537 | if (!gcmp_present) { | 539 | if (!gcmp_present) { |
| @@ -553,12 +555,15 @@ void __init arch_init_irq(void) | |||
| 553 | printk("CPU%d: status register now %08x\n", smp_processor_id(), read_c0_status()); | 555 | printk("CPU%d: status register now %08x\n", smp_processor_id(), read_c0_status()); |
| 554 | write_c0_status(0x1100dc00); | 556 | write_c0_status(0x1100dc00); |
| 555 | printk("CPU%d: status register frc %08x\n", smp_processor_id(), read_c0_status()); | 557 | printk("CPU%d: status register frc %08x\n", smp_processor_id(), read_c0_status()); |
| 556 | for (i = 0; i < ARRAY_SIZE(ipiirq); i++) { | 558 | for (i = 0; i < NR_CPUS; i++) { |
| 557 | setup_irq(MIPS_GIC_IRQ_BASE + ipiirq[i].resched, &irq_resched); | 559 | setup_irq(MIPS_GIC_IRQ_BASE + |
| 558 | setup_irq(MIPS_GIC_IRQ_BASE + ipiirq[i].call, &irq_call); | 560 | GIC_RESCHED_INT(i), &irq_resched); |
| 559 | 561 | setup_irq(MIPS_GIC_IRQ_BASE + | |
| 560 | set_irq_handler(MIPS_GIC_IRQ_BASE + ipiirq[i].resched, handle_percpu_irq); | 562 | GIC_CALL_INT(i), &irq_call); |
| 561 | set_irq_handler(MIPS_GIC_IRQ_BASE + ipiirq[i].call, handle_percpu_irq); | 563 | set_irq_handler(MIPS_GIC_IRQ_BASE + |
| 564 | GIC_RESCHED_INT(i), handle_percpu_irq); | ||
| 565 | set_irq_handler(MIPS_GIC_IRQ_BASE + | ||
| 566 | GIC_CALL_INT(i), handle_percpu_irq); | ||
| 562 | } | 567 | } |
| 563 | } else { | 568 | } else { |
| 564 | /* set up ipi interrupts */ | 569 | /* set up ipi interrupts */ |
diff --git a/arch/mips/mti-malta/malta-reset.c b/arch/mips/mti-malta/malta-reset.c index 42dee4da37ba..f48d60e84290 100644 --- a/arch/mips/mti-malta/malta-reset.c +++ b/arch/mips/mti-malta/malta-reset.c | |||
| @@ -28,9 +28,6 @@ | |||
| 28 | #include <asm/reboot.h> | 28 | #include <asm/reboot.h> |
| 29 | #include <asm/mips-boards/generic.h> | 29 | #include <asm/mips-boards/generic.h> |
| 30 | 30 | ||
| 31 | static void mips_machine_restart(char *command); | ||
| 32 | static void mips_machine_halt(void); | ||
| 33 | |||
| 34 | static void mips_machine_restart(char *command) | 31 | static void mips_machine_restart(char *command) |
| 35 | { | 32 | { |
| 36 | unsigned int __iomem *softres_reg = | 33 | unsigned int __iomem *softres_reg = |
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index e8a97f59e066..63d8a297c58d 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
| @@ -52,3 +52,8 @@ obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o | |||
| 52 | obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o | 52 | obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o |
| 53 | obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o | 53 | obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o |
| 54 | obj-$(CONFIG_MIKROTIK_RB532) += pci-rc32434.o ops-rc32434.o fixup-rc32434.o | 54 | obj-$(CONFIG_MIKROTIK_RB532) += pci-rc32434.o ops-rc32434.o fixup-rc32434.o |
| 55 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += pci-octeon.o pcie-octeon.o | ||
| 56 | |||
| 57 | ifdef CONFIG_PCI_MSI | ||
| 58 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += msi-octeon.o | ||
| 59 | endif | ||
diff --git a/arch/mips/pci/fixup-capcella.c b/arch/mips/pci/fixup-capcella.c index 1416bca6d1a3..1c02f5737367 100644 --- a/arch/mips/pci/fixup-capcella.c +++ b/arch/mips/pci/fixup-capcella.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * fixup-cappcela.c, The ZAO Networks Capcella specific PCI fixups. | 2 | * fixup-cappcela.c, The ZAO Networks Capcella specific PCI fixups. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002,2004 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002,2004 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c index 591159625722..e08f49cb6875 100644 --- a/arch/mips/pci/fixup-mpc30x.c +++ b/arch/mips/pci/fixup-mpc30x.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * fixup-mpc30x.c, The Victor MP-C303/304 specific PCI fixups. | 2 | * fixup-mpc30x.c, The Victor MP-C303/304 specific PCI fixups. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002,2004 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002,2004 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pci/fixup-tb0219.c b/arch/mips/pci/fixup-tb0219.c index ed87733f6796..8084b17d4406 100644 --- a/arch/mips/pci/fixup-tb0219.c +++ b/arch/mips/pci/fixup-tb0219.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * fixup-tb0219.c, The TANBAC TB0219 specific PCI fixups. | 2 | * fixup-tb0219.c, The TANBAC TB0219 specific PCI fixups. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> | 4 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> |
| 5 | * Copyright (C) 2004-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 5 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pci/fixup-tb0226.c b/arch/mips/pci/fixup-tb0226.c index e3eedf4bf9bd..4196ccf3ea3d 100644 --- a/arch/mips/pci/fixup-tb0226.c +++ b/arch/mips/pci/fixup-tb0226.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups. | 2 | * fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pci/fixup-tb0287.c b/arch/mips/pci/fixup-tb0287.c index 267ab3dc3d42..2fe29db43725 100644 --- a/arch/mips/pci/fixup-tb0287.c +++ b/arch/mips/pci/fixup-tb0287.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * fixup-tb0287.c, The TANBAC TB0287 specific PCI fixups. | 2 | * fixup-tb0287.c, The TANBAC TB0287 specific PCI fixups. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cavium-octeon/msi.c b/arch/mips/pci/msi-octeon.c index 964b03b75a8f..03742e647657 100644 --- a/arch/mips/cavium-octeon/msi.c +++ b/arch/mips/pci/msi-octeon.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. | 4 | * for more details. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2005-2007 Cavium Networks | 6 | * Copyright (C) 2005-2009 Cavium Networks |
| 7 | */ | 7 | */ |
| 8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
| 9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| @@ -16,8 +16,7 @@ | |||
| 16 | #include <asm/octeon/cvmx-pci-defs.h> | 16 | #include <asm/octeon/cvmx-pci-defs.h> |
| 17 | #include <asm/octeon/cvmx-npei-defs.h> | 17 | #include <asm/octeon/cvmx-npei-defs.h> |
| 18 | #include <asm/octeon/cvmx-pexp-defs.h> | 18 | #include <asm/octeon/cvmx-pexp-defs.h> |
| 19 | 19 | #include <asm/octeon/pci-octeon.h> | |
| 20 | #include "pci-common.h" | ||
| 21 | 20 | ||
| 22 | /* | 21 | /* |
| 23 | * Each bit in msi_free_irq_bitmask represents a MSI interrupt that is | 22 | * Each bit in msi_free_irq_bitmask represents a MSI interrupt that is |
| @@ -47,8 +46,8 @@ static DEFINE_SPINLOCK(msi_free_irq_bitmask_lock); | |||
| 47 | * programming the MSI control bits [6:4] before calling | 46 | * programming the MSI control bits [6:4] before calling |
| 48 | * pci_enable_msi(). | 47 | * pci_enable_msi(). |
| 49 | * | 48 | * |
| 50 | * @param dev Device requesting MSI interrupts | 49 | * @dev: Device requesting MSI interrupts |
| 51 | * @param desc MSI descriptor | 50 | * @desc: MSI descriptor |
| 52 | * | 51 | * |
| 53 | * Returns 0 on success. | 52 | * Returns 0 on success. |
| 54 | */ | 53 | */ |
| @@ -213,14 +212,9 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
| 213 | } | 212 | } |
| 214 | 213 | ||
| 215 | 214 | ||
| 216 | /** | 215 | /* |
| 217 | * Called by the interrupt handling code when an MSI interrupt | 216 | * Called by the interrupt handling code when an MSI interrupt |
| 218 | * occurs. | 217 | * occurs. |
| 219 | * | ||
| 220 | * @param cpl | ||
| 221 | * @param dev_id | ||
| 222 | * | ||
| 223 | * @return | ||
| 224 | */ | 218 | */ |
| 225 | static irqreturn_t octeon_msi_interrupt(int cpl, void *dev_id) | 219 | static irqreturn_t octeon_msi_interrupt(int cpl, void *dev_id) |
| 226 | { | 220 | { |
| @@ -256,31 +250,37 @@ static irqreturn_t octeon_msi_interrupt(int cpl, void *dev_id) | |||
| 256 | } | 250 | } |
| 257 | 251 | ||
| 258 | 252 | ||
| 259 | /** | 253 | /* |
| 260 | * Initializes the MSI interrupt handling code | 254 | * Initializes the MSI interrupt handling code |
| 261 | * | ||
| 262 | * @return | ||
| 263 | */ | 255 | */ |
| 264 | int octeon_msi_initialize(void) | 256 | int octeon_msi_initialize(void) |
| 265 | { | 257 | { |
| 266 | int r; | ||
| 267 | if (octeon_has_feature(OCTEON_FEATURE_PCIE)) { | 258 | if (octeon_has_feature(OCTEON_FEATURE_PCIE)) { |
| 268 | r = request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, | 259 | if (request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, |
| 269 | IRQF_SHARED, | 260 | IRQF_SHARED, |
| 270 | "MSI[0:63]", octeon_msi_interrupt); | 261 | "MSI[0:63]", octeon_msi_interrupt)) |
| 262 | panic("request_irq(OCTEON_IRQ_PCI_MSI0) failed"); | ||
| 271 | } else if (octeon_is_pci_host()) { | 263 | } else if (octeon_is_pci_host()) { |
| 272 | r = request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, | 264 | if (request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, |
| 273 | IRQF_SHARED, | 265 | IRQF_SHARED, |
| 274 | "MSI[0:15]", octeon_msi_interrupt); | 266 | "MSI[0:15]", octeon_msi_interrupt)) |
| 275 | r += request_irq(OCTEON_IRQ_PCI_MSI1, octeon_msi_interrupt, | 267 | panic("request_irq(OCTEON_IRQ_PCI_MSI0) failed"); |
| 276 | IRQF_SHARED, | 268 | |
| 277 | "MSI[16:31]", octeon_msi_interrupt); | 269 | if (request_irq(OCTEON_IRQ_PCI_MSI1, octeon_msi_interrupt, |
| 278 | r += request_irq(OCTEON_IRQ_PCI_MSI2, octeon_msi_interrupt, | 270 | IRQF_SHARED, |
| 279 | IRQF_SHARED, | 271 | "MSI[16:31]", octeon_msi_interrupt)) |
| 280 | "MSI[32:47]", octeon_msi_interrupt); | 272 | panic("request_irq(OCTEON_IRQ_PCI_MSI1) failed"); |
| 281 | r += request_irq(OCTEON_IRQ_PCI_MSI3, octeon_msi_interrupt, | 273 | |
| 282 | IRQF_SHARED, | 274 | if (request_irq(OCTEON_IRQ_PCI_MSI2, octeon_msi_interrupt, |
| 283 | "MSI[48:63]", octeon_msi_interrupt); | 275 | IRQF_SHARED, |
| 276 | "MSI[32:47]", octeon_msi_interrupt)) | ||
| 277 | panic("request_irq(OCTEON_IRQ_PCI_MSI2) failed"); | ||
| 278 | |||
| 279 | if (request_irq(OCTEON_IRQ_PCI_MSI3, octeon_msi_interrupt, | ||
| 280 | IRQF_SHARED, | ||
| 281 | "MSI[48:63]", octeon_msi_interrupt)) | ||
| 282 | panic("request_irq(OCTEON_IRQ_PCI_MSI3) failed"); | ||
| 283 | |||
| 284 | } | 284 | } |
| 285 | return 0; | 285 | return 0; |
| 286 | } | 286 | } |
diff --git a/arch/mips/pci/ops-vr41xx.c b/arch/mips/pci/ops-vr41xx.c index 900c6b32576c..28962a7c6606 100644 --- a/arch/mips/pci/ops-vr41xx.c +++ b/arch/mips/pci/ops-vr41xx.c | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | * ops-vr41xx.c, PCI configuration routines for the PCIU of NEC VR4100 series. | 2 | * ops-vr41xx.c, PCI configuration routines for the PCIU of NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2001-2003 MontaVista Software Inc. | 4 | * Copyright (C) 2001-2003 MontaVista Software Inc. |
| 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
| 6 | * Copyright (C) 2004-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 6 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
| @@ -21,7 +21,7 @@ | |||
| 21 | */ | 21 | */ |
| 22 | /* | 22 | /* |
| 23 | * Changes: | 23 | * Changes: |
| 24 | * MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com> | 24 | * MontaVista Software Inc. <source@mvista.com> |
| 25 | * - New creation, NEC VR4122 and VR4131 are supported. | 25 | * - New creation, NEC VR4122 and VR4131 are supported. |
| 26 | */ | 26 | */ |
| 27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
diff --git a/arch/mips/cavium-octeon/pci.c b/arch/mips/pci/pci-octeon.c index 67c0ff5e92f1..9cb0c807f564 100644 --- a/arch/mips/cavium-octeon/pci.c +++ b/arch/mips/pci/pci-octeon.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. | 4 | * for more details. |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2005-2007 Cavium Networks | 6 | * Copyright (C) 2005-2009 Cavium Networks |
| 7 | */ | 7 | */ |
| 8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
| 9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| @@ -17,8 +17,7 @@ | |||
| 17 | #include <asm/octeon/octeon.h> | 17 | #include <asm/octeon/octeon.h> |
| 18 | #include <asm/octeon/cvmx-npi-defs.h> | 18 | #include <asm/octeon/cvmx-npi-defs.h> |
| 19 | #include <asm/octeon/cvmx-pci-defs.h> | 19 | #include <asm/octeon/cvmx-pci-defs.h> |
| 20 | 20 | #include <asm/octeon/pci-octeon.h> | |
| 21 | #include "pci-common.h" | ||
| 22 | 21 | ||
| 23 | #define USE_OCTEON_INTERNAL_ARBITER | 22 | #define USE_OCTEON_INTERNAL_ARBITER |
| 24 | 23 | ||
| @@ -54,6 +53,126 @@ union octeon_pci_address { | |||
| 54 | } s; | 53 | } s; |
| 55 | }; | 54 | }; |
| 56 | 55 | ||
| 56 | int __initdata (*octeon_pcibios_map_irq)(const struct pci_dev *dev, | ||
| 57 | u8 slot, u8 pin); | ||
| 58 | enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID; | ||
| 59 | |||
| 60 | /** | ||
| 61 | * Map a PCI device to the appropriate interrupt line | ||
| 62 | * | ||
| 63 | * @dev: The Linux PCI device structure for the device to map | ||
| 64 | * @slot: The slot number for this device on __BUS 0__. Linux | ||
| 65 | * enumerates through all the bridges and figures out the | ||
| 66 | * slot on Bus 0 where this device eventually hooks to. | ||
| 67 | * @pin: The PCI interrupt pin read from the device, then swizzled | ||
| 68 | * as it goes through each bridge. | ||
| 69 | * Returns Interrupt number for the device | ||
| 70 | */ | ||
| 71 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||
| 72 | { | ||
| 73 | if (octeon_pcibios_map_irq) | ||
| 74 | return octeon_pcibios_map_irq(dev, slot, pin); | ||
| 75 | else | ||
| 76 | panic("octeon_pcibios_map_irq not set."); | ||
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | /* | ||
| 81 | * Called to perform platform specific PCI setup | ||
| 82 | */ | ||
| 83 | int pcibios_plat_dev_init(struct pci_dev *dev) | ||
| 84 | { | ||
| 85 | uint16_t config; | ||
| 86 | uint32_t dconfig; | ||
| 87 | int pos; | ||
| 88 | /* | ||
| 89 | * Force the Cache line setting to 64 bytes. The standard | ||
| 90 | * Linux bus scan doesn't seem to set it. Octeon really has | ||
| 91 | * 128 byte lines, but Intel bridges get really upset if you | ||
| 92 | * try and set values above 64 bytes. Value is specified in | ||
| 93 | * 32bit words. | ||
| 94 | */ | ||
| 95 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 64 / 4); | ||
| 96 | /* Set latency timers for all devices */ | ||
| 97 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, 48); | ||
| 98 | |||
| 99 | /* Enable reporting System errors and parity errors on all devices */ | ||
| 100 | /* Enable parity checking and error reporting */ | ||
| 101 | pci_read_config_word(dev, PCI_COMMAND, &config); | ||
| 102 | config |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR; | ||
| 103 | pci_write_config_word(dev, PCI_COMMAND, config); | ||
| 104 | |||
| 105 | if (dev->subordinate) { | ||
| 106 | /* Set latency timers on sub bridges */ | ||
| 107 | pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, 48); | ||
| 108 | /* More bridge error detection */ | ||
| 109 | pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &config); | ||
| 110 | config |= PCI_BRIDGE_CTL_PARITY | PCI_BRIDGE_CTL_SERR; | ||
| 111 | pci_write_config_word(dev, PCI_BRIDGE_CONTROL, config); | ||
| 112 | } | ||
| 113 | |||
| 114 | /* Enable the PCIe normal error reporting */ | ||
| 115 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | ||
| 116 | if (pos) { | ||
| 117 | /* Update Device Control */ | ||
| 118 | pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &config); | ||
| 119 | /* Correctable Error Reporting */ | ||
| 120 | config |= PCI_EXP_DEVCTL_CERE; | ||
| 121 | /* Non-Fatal Error Reporting */ | ||
| 122 | config |= PCI_EXP_DEVCTL_NFERE; | ||
| 123 | /* Fatal Error Reporting */ | ||
| 124 | config |= PCI_EXP_DEVCTL_FERE; | ||
| 125 | /* Unsupported Request */ | ||
| 126 | config |= PCI_EXP_DEVCTL_URRE; | ||
| 127 | pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, config); | ||
| 128 | } | ||
| 129 | |||
| 130 | /* Find the Advanced Error Reporting capability */ | ||
| 131 | pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); | ||
| 132 | if (pos) { | ||
| 133 | /* Clear Uncorrectable Error Status */ | ||
| 134 | pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, | ||
| 135 | &dconfig); | ||
| 136 | pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, | ||
| 137 | dconfig); | ||
| 138 | /* Enable reporting of all uncorrectable errors */ | ||
| 139 | /* Uncorrectable Error Mask - turned on bits disable errors */ | ||
| 140 | pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, 0); | ||
| 141 | /* | ||
| 142 | * Leave severity at HW default. This only controls if | ||
| 143 | * errors are reported as uncorrectable or | ||
| 144 | * correctable, not if the error is reported. | ||
| 145 | */ | ||
| 146 | /* PCI_ERR_UNCOR_SEVER - Uncorrectable Error Severity */ | ||
| 147 | /* Clear Correctable Error Status */ | ||
| 148 | pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS, &dconfig); | ||
| 149 | pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, dconfig); | ||
| 150 | /* Enable reporting of all correctable errors */ | ||
| 151 | /* Correctable Error Mask - turned on bits disable errors */ | ||
| 152 | pci_write_config_dword(dev, pos + PCI_ERR_COR_MASK, 0); | ||
| 153 | /* Advanced Error Capabilities */ | ||
| 154 | pci_read_config_dword(dev, pos + PCI_ERR_CAP, &dconfig); | ||
| 155 | /* ECRC Generation Enable */ | ||
| 156 | if (config & PCI_ERR_CAP_ECRC_GENC) | ||
| 157 | config |= PCI_ERR_CAP_ECRC_GENE; | ||
| 158 | /* ECRC Check Enable */ | ||
| 159 | if (config & PCI_ERR_CAP_ECRC_CHKC) | ||
| 160 | config |= PCI_ERR_CAP_ECRC_CHKE; | ||
| 161 | pci_write_config_dword(dev, pos + PCI_ERR_CAP, dconfig); | ||
| 162 | /* PCI_ERR_HEADER_LOG - Header Log Register (16 bytes) */ | ||
| 163 | /* Report all errors to the root complex */ | ||
| 164 | pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, | ||
| 165 | PCI_ERR_ROOT_CMD_COR_EN | | ||
| 166 | PCI_ERR_ROOT_CMD_NONFATAL_EN | | ||
| 167 | PCI_ERR_ROOT_CMD_FATAL_EN); | ||
| 168 | /* Clear the Root status register */ | ||
| 169 | pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &dconfig); | ||
| 170 | pci_write_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, dconfig); | ||
| 171 | } | ||
| 172 | |||
| 173 | return 0; | ||
| 174 | } | ||
| 175 | |||
| 57 | /** | 176 | /** |
| 58 | * Return the mapping of PCI device number to IRQ line. Each | 177 | * Return the mapping of PCI device number to IRQ line. Each |
| 59 | * character in the return string represents the interrupt | 178 | * character in the return string represents the interrupt |
| @@ -136,9 +255,8 @@ int __init octeon_pci_pcibios_map_irq(const struct pci_dev *dev, | |||
| 136 | } | 255 | } |
| 137 | 256 | ||
| 138 | 257 | ||
| 139 | /** | 258 | /* |
| 140 | * Read a value from configuration space | 259 | * Read a value from configuration space |
| 141 | * | ||
| 142 | */ | 260 | */ |
| 143 | static int octeon_read_config(struct pci_bus *bus, unsigned int devfn, | 261 | static int octeon_read_config(struct pci_bus *bus, unsigned int devfn, |
| 144 | int reg, int size, u32 *val) | 262 | int reg, int size, u32 *val) |
| @@ -174,15 +292,8 @@ static int octeon_read_config(struct pci_bus *bus, unsigned int devfn, | |||
| 174 | } | 292 | } |
| 175 | 293 | ||
| 176 | 294 | ||
| 177 | /** | 295 | /* |
| 178 | * Write a value to PCI configuration space | 296 | * Write a value to PCI configuration space |
| 179 | * | ||
| 180 | * @bus: | ||
| 181 | * @devfn: | ||
| 182 | * @reg: | ||
| 183 | * @size: | ||
| 184 | * @val: | ||
| 185 | * Returns | ||
| 186 | */ | 297 | */ |
| 187 | static int octeon_write_config(struct pci_bus *bus, unsigned int devfn, | 298 | static int octeon_write_config(struct pci_bus *bus, unsigned int devfn, |
| 188 | int reg, int size, u32 val) | 299 | int reg, int size, u32 val) |
| @@ -251,10 +362,8 @@ static struct pci_controller octeon_pci_controller = { | |||
| 251 | }; | 362 | }; |
| 252 | 363 | ||
| 253 | 364 | ||
| 254 | /** | 365 | /* |
| 255 | * Low level initialize the Octeon PCI controller | 366 | * Low level initialize the Octeon PCI controller |
| 256 | * | ||
| 257 | * Returns | ||
| 258 | */ | 367 | */ |
| 259 | static void octeon_pci_initialize(void) | 368 | static void octeon_pci_initialize(void) |
| 260 | { | 369 | { |
| @@ -398,7 +507,7 @@ static void octeon_pci_initialize(void) | |||
| 398 | pci_int_arb_cfg.s.en = 1; /* Internal arbiter enable */ | 507 | pci_int_arb_cfg.s.en = 1; /* Internal arbiter enable */ |
| 399 | cvmx_write_csr(CVMX_NPI_PCI_INT_ARB_CFG, pci_int_arb_cfg.u64); | 508 | cvmx_write_csr(CVMX_NPI_PCI_INT_ARB_CFG, pci_int_arb_cfg.u64); |
| 400 | } | 509 | } |
| 401 | #endif /* USE_OCTEON_INTERNAL_ARBITER */ | 510 | #endif /* USE_OCTEON_INTERNAL_ARBITER */ |
| 402 | 511 | ||
| 403 | /* | 512 | /* |
| 404 | * Preferrably written to 1 to set MLTD. [RDSATI,TRTAE, | 513 | * Preferrably written to 1 to set MLTD. [RDSATI,TRTAE, |
| @@ -457,10 +566,8 @@ static void octeon_pci_initialize(void) | |||
| 457 | } | 566 | } |
| 458 | 567 | ||
| 459 | 568 | ||
| 460 | /** | 569 | /* |
| 461 | * Initialize the Octeon PCI controller | 570 | * Initialize the Octeon PCI controller |
| 462 | * | ||
| 463 | * Returns | ||
| 464 | */ | 571 | */ |
| 465 | static int __init octeon_pci_setup(void) | 572 | static int __init octeon_pci_setup(void) |
| 466 | { | 573 | { |
diff --git a/arch/mips/pci/pci-vr41xx.c b/arch/mips/pci/pci-vr41xx.c index d1e049b55f34..56525711f8b7 100644 --- a/arch/mips/pci/pci-vr41xx.c +++ b/arch/mips/pci/pci-vr41xx.c | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | * pci-vr41xx.c, PCI Control Unit routines for the NEC VR4100 series. | 2 | * pci-vr41xx.c, PCI Control Unit routines for the NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2001-2003 MontaVista Software Inc. | 4 | * Copyright (C) 2001-2003 MontaVista Software Inc. |
| 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
| 6 | * Copyright (C) 2004-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 6 | * Copyright (C) 2004-2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 7 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) | 7 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) |
| 8 | * | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
| @@ -22,7 +22,7 @@ | |||
| 22 | */ | 22 | */ |
| 23 | /* | 23 | /* |
| 24 | * Changes: | 24 | * Changes: |
| 25 | * MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com> | 25 | * MontaVista Software Inc. <source@mvista.com> |
| 26 | * - New creation, NEC VR4122 and VR4131 are supported. | 26 | * - New creation, NEC VR4122 and VR4131 are supported. |
| 27 | */ | 27 | */ |
| 28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
diff --git a/arch/mips/pci/pci-vr41xx.h b/arch/mips/pci/pci-vr41xx.h index 8a35e32b8376..6b1ae2eb1c06 100644 --- a/arch/mips/pci/pci-vr41xx.h +++ b/arch/mips/pci/pci-vr41xx.h | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | * pci-vr41xx.h, Include file for PCI Control Unit of the NEC VR4100 series. | 2 | * pci-vr41xx.h, Include file for PCI Control Unit of the NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002 MontaVista Software Inc. | 4 | * Copyright (C) 2002 MontaVista Software Inc. |
| 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
| 6 | * Copyright (C) 2004-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 6 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cavium-octeon/pcie.c b/arch/mips/pci/pcie-octeon.c index 49d14081b3b5..75262247f3e4 100644 --- a/arch/mips/cavium-octeon/pcie.c +++ b/arch/mips/pci/pcie-octeon.c | |||
| @@ -18,8 +18,7 @@ | |||
| 18 | #include <asm/octeon/cvmx-pescx-defs.h> | 18 | #include <asm/octeon/cvmx-pescx-defs.h> |
| 19 | #include <asm/octeon/cvmx-pexp-defs.h> | 19 | #include <asm/octeon/cvmx-pexp-defs.h> |
| 20 | #include <asm/octeon/cvmx-helper-errata.h> | 20 | #include <asm/octeon/cvmx-helper-errata.h> |
| 21 | 21 | #include <asm/octeon/pci-octeon.h> | |
| 22 | #include "pci-common.h" | ||
| 23 | 22 | ||
| 24 | union cvmx_pcie_address { | 23 | union cvmx_pcie_address { |
| 25 | uint64_t u64; | 24 | uint64_t u64; |
| @@ -976,13 +975,13 @@ static int cvmx_pcie_rc_initialize(int pcie_port) | |||
| 976 | /** | 975 | /** |
| 977 | * Map a PCI device to the appropriate interrupt line | 976 | * Map a PCI device to the appropriate interrupt line |
| 978 | * | 977 | * |
| 979 | * @param dev The Linux PCI device structure for the device to map | 978 | * @dev: The Linux PCI device structure for the device to map |
| 980 | * @param slot The slot number for this device on __BUS 0__. Linux | 979 | * @slot: The slot number for this device on __BUS 0__. Linux |
| 981 | * enumerates through all the bridges and figures out the | 980 | * enumerates through all the bridges and figures out the |
| 982 | * slot on Bus 0 where this device eventually hooks to. | 981 | * slot on Bus 0 where this device eventually hooks to. |
| 983 | * @param pin The PCI interrupt pin read from the device, then swizzled | 982 | * @pin: The PCI interrupt pin read from the device, then swizzled |
| 984 | * as it goes through each bridge. | 983 | * as it goes through each bridge. |
| 985 | * @return Interrupt number for the device | 984 | * Returns Interrupt number for the device |
| 986 | */ | 985 | */ |
| 987 | int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, | 986 | int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, |
| 988 | u8 slot, u8 pin) | 987 | u8 slot, u8 pin) |
| @@ -1025,12 +1024,12 @@ int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, | |||
| 1025 | /** | 1024 | /** |
| 1026 | * Read a value from configuration space | 1025 | * Read a value from configuration space |
| 1027 | * | 1026 | * |
| 1028 | * @param bus | 1027 | * @bus: |
| 1029 | * @param devfn | 1028 | * @devfn: |
| 1030 | * @param reg | 1029 | * @reg: |
| 1031 | * @param size | 1030 | * @size: |
| 1032 | * @param val | 1031 | * @val: |
| 1033 | * @return | 1032 | * Returns |
| 1034 | */ | 1033 | */ |
| 1035 | static inline int octeon_pcie_read_config(int pcie_port, struct pci_bus *bus, | 1034 | static inline int octeon_pcie_read_config(int pcie_port, struct pci_bus *bus, |
| 1036 | unsigned int devfn, int reg, int size, | 1035 | unsigned int devfn, int reg, int size, |
| @@ -1156,12 +1155,12 @@ static int octeon_pcie1_read_config(struct pci_bus *bus, unsigned int devfn, | |||
| 1156 | /** | 1155 | /** |
| 1157 | * Write a value to PCI configuration space | 1156 | * Write a value to PCI configuration space |
| 1158 | * | 1157 | * |
| 1159 | * @param bus | 1158 | * @bus: |
| 1160 | * @param devfn | 1159 | * @devfn: |
| 1161 | * @param reg | 1160 | * @reg: |
| 1162 | * @param size | 1161 | * @size: |
| 1163 | * @param val | 1162 | * @val: |
| 1164 | * @return | 1163 | * Returns |
| 1165 | */ | 1164 | */ |
| 1166 | static inline int octeon_pcie_write_config(int pcie_port, struct pci_bus *bus, | 1165 | static inline int octeon_pcie_write_config(int pcie_port, struct pci_bus *bus, |
| 1167 | unsigned int devfn, int reg, | 1166 | unsigned int devfn, int reg, |
| @@ -1254,7 +1253,7 @@ static struct pci_controller octeon_pcie1_controller = { | |||
| 1254 | /** | 1253 | /** |
| 1255 | * Initialize the Octeon PCIe controllers | 1254 | * Initialize the Octeon PCIe controllers |
| 1256 | * | 1255 | * |
| 1257 | * @return | 1256 | * Returns |
| 1258 | */ | 1257 | */ |
| 1259 | static int __init octeon_pcie_setup(void) | 1258 | static int __init octeon_pcie_setup(void) |
| 1260 | { | 1259 | { |
diff --git a/arch/mips/vr41xx/casio-e55/setup.c b/arch/mips/vr41xx/casio-e55/setup.c index 6d9bab890587..719f4a5b9844 100644 --- a/arch/mips/vr41xx/casio-e55/setup.c +++ b/arch/mips/vr41xx/casio-e55/setup.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * setup.c, Setup for the CASIO CASSIOPEIA E-11/15/55/65. | 2 | * setup.c, Setup for the CASIO CASSIOPEIA E-11/15/55/65. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002-2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002-2006 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/bcu.c b/arch/mips/vr41xx/common/bcu.c index d77c330a0d59..6346c59c9f9d 100644 --- a/arch/mips/vr41xx/common/bcu.c +++ b/arch/mips/vr41xx/common/bcu.c | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | * bcu.c, Bus Control Unit routines for the NEC VR4100 series. | 2 | * bcu.c, Bus Control Unit routines for the NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002 MontaVista Software Inc. | 4 | * Copyright (C) 2002 MontaVista Software Inc. |
| 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
| 6 | * Copyright (C) 2003-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 6 | * Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
| @@ -21,11 +21,11 @@ | |||
| 21 | */ | 21 | */ |
| 22 | /* | 22 | /* |
| 23 | * Changes: | 23 | * Changes: |
| 24 | * MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com> | 24 | * MontaVista Software Inc. <source@mvista.com> |
| 25 | * - New creation, NEC VR4122 and VR4131 are supported. | 25 | * - New creation, NEC VR4122 and VR4131 are supported. |
| 26 | * - Added support for NEC VR4111 and VR4121. | 26 | * - Added support for NEC VR4111 and VR4121. |
| 27 | * | 27 | * |
| 28 | * Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 28 | * Yoichi Yuasa <yuasa@linux-mips.org> |
| 29 | * - Added support for NEC VR4133. | 29 | * - Added support for NEC VR4133. |
| 30 | */ | 30 | */ |
| 31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/arch/mips/vr41xx/common/cmu.c b/arch/mips/vr41xx/common/cmu.c index ad0e8e3409d9..8ba7d04a5ec5 100644 --- a/arch/mips/vr41xx/common/cmu.c +++ b/arch/mips/vr41xx/common/cmu.c | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | * cmu.c, Clock Mask Unit routines for the NEC VR4100 series. | 2 | * cmu.c, Clock Mask Unit routines for the NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2001-2002 MontaVista Software Inc. | 4 | * Copyright (C) 2001-2002 MontaVista Software Inc. |
| 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
| 6 | * Copuright (C) 2003-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 6 | * Copuright (C) 2003-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
| @@ -21,11 +21,11 @@ | |||
| 21 | */ | 21 | */ |
| 22 | /* | 22 | /* |
| 23 | * Changes: | 23 | * Changes: |
| 24 | * MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com> | 24 | * MontaVista Software Inc. <source@mvista.com> |
| 25 | * - New creation, NEC VR4122 and VR4131 are supported. | 25 | * - New creation, NEC VR4122 and VR4131 are supported. |
| 26 | * - Added support for NEC VR4111 and VR4121. | 26 | * - Added support for NEC VR4111 and VR4121. |
| 27 | * | 27 | * |
| 28 | * Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 28 | * Yoichi Yuasa <yuasa@linux-mips.org> |
| 29 | * - Added support for NEC VR4133. | 29 | * - Added support for NEC VR4133. |
| 30 | */ | 30 | */ |
| 31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
diff --git a/arch/mips/vr41xx/common/giu.c b/arch/mips/vr41xx/common/giu.c index 2b272f1496fe..22cc6f2100a1 100644 --- a/arch/mips/vr41xx/common/giu.c +++ b/arch/mips/vr41xx/common/giu.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * NEC VR4100 series GIU platform device. | 2 | * NEC VR4100 series GIU platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c index 3f23d9fda662..6d39e222b170 100644 --- a/arch/mips/vr41xx/common/icu.c +++ b/arch/mips/vr41xx/common/icu.c | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | * icu.c, Interrupt Control Unit routines for the NEC VR4100 series. | 2 | * icu.c, Interrupt Control Unit routines for the NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2001-2002 MontaVista Software Inc. | 4 | * Copyright (C) 2001-2002 MontaVista Software Inc. |
| 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
| 6 | * Copyright (C) 2003-2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 6 | * Copyright (C) 2003-2006 Yoichi Yuasa <yuasa@linux-mips.org> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
| @@ -21,11 +21,11 @@ | |||
| 21 | */ | 21 | */ |
| 22 | /* | 22 | /* |
| 23 | * Changes: | 23 | * Changes: |
| 24 | * MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com> | 24 | * MontaVista Software Inc. <source@mvista.com> |
| 25 | * - New creation, NEC VR4122 and VR4131 are supported. | 25 | * - New creation, NEC VR4122 and VR4131 are supported. |
| 26 | * - Added support for NEC VR4111 and VR4121. | 26 | * - Added support for NEC VR4111 and VR4121. |
| 27 | * | 27 | * |
| 28 | * Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 28 | * Yoichi Yuasa <yuasa@linux-mips.org> |
| 29 | * - Coped with INTASSIGN of NEC VR4133. | 29 | * - Coped with INTASSIGN of NEC VR4133. |
| 30 | */ | 30 | */ |
| 31 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c index c64995342ba8..1386e6f081c8 100644 --- a/arch/mips/vr41xx/common/init.c +++ b/arch/mips/vr41xx/common/init.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * init.c, Common initialization routines for NEC VR4100 series. | 2 | * init.c, Common initialization routines for NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2003-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2003-2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c index 9cc389109b19..bef06872f012 100644 --- a/arch/mips/vr41xx/common/irq.c +++ b/arch/mips/vr41xx/common/irq.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Interrupt handing routines for NEC VR4100 series. | 2 | * Interrupt handing routines for NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2005-2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/pmu.c b/arch/mips/vr41xx/common/pmu.c index 028aaf75eb21..692b4e85b7fc 100644 --- a/arch/mips/vr41xx/common/pmu.c +++ b/arch/mips/vr41xx/common/pmu.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * pmu.c, Power Management Unit routines for NEC VR4100 series. | 2 | * pmu.c, Power Management Unit routines for NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2003-2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2003-2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/rtc.c b/arch/mips/vr41xx/common/rtc.c index 9f26c14edcac..ebc5dcf0ed8e 100644 --- a/arch/mips/vr41xx/common/rtc.c +++ b/arch/mips/vr41xx/common/rtc.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * NEC VR4100 series RTC platform device. | 2 | * NEC VR4100 series RTC platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/siu.c b/arch/mips/vr41xx/common/siu.c index 654dee6208be..54eae56108fb 100644 --- a/arch/mips/vr41xx/common/siu.c +++ b/arch/mips/vr41xx/common/siu.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * NEC VR4100 series SIU platform device. | 2 | * NEC VR4100 series SIU platform device. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2007-2008 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/type.c b/arch/mips/vr41xx/common/type.c index e0c1ac5e988e..ff841422b638 100644 --- a/arch/mips/vr41xx/common/type.c +++ b/arch/mips/vr41xx/common/type.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * type.c, System type for NEC VR4100 series. | 2 | * type.c, System type for NEC VR4100 series. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/ibm-workpad/setup.c b/arch/mips/vr41xx/ibm-workpad/setup.c index 9eef297eca1a..3982f378a3e6 100644 --- a/arch/mips/vr41xx/ibm-workpad/setup.c +++ b/arch/mips/vr41xx/ibm-workpad/setup.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * setup.c, Setup for the IBM WorkPad z50. | 2 | * setup.c, Setup for the IBM WorkPad z50. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2002-2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 4 | * Copyright (C) 2002-2006 Yoichi Yuasa <yuasa@linux-mips.org> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h index e58b9a46e1b1..35d2ed6396f6 100644 --- a/arch/mn10300/include/asm/pci.h +++ b/arch/mn10300/include/asm/pci.h | |||
| @@ -70,10 +70,6 @@ struct pci_dev; | |||
| 70 | */ | 70 | */ |
| 71 | #define PCI_DMA_BUS_IS_PHYS (1) | 71 | #define PCI_DMA_BUS_IS_PHYS (1) |
| 72 | 72 | ||
| 73 | |||
| 74 | /* This is always fine. */ | ||
| 75 | #define pci_dac_dma_supported(pci_dev, mask) (0) | ||
| 76 | |||
| 77 | /* Return the index of the PCI controller for device. */ | 73 | /* Return the index of the PCI controller for device. */ |
| 78 | static inline int pci_controller_num(struct pci_dev *dev) | 74 | static inline int pci_controller_num(struct pci_dev *dev) |
| 79 | { | 75 | { |
diff --git a/arch/mn10300/kernel/vmlinux.lds.S b/arch/mn10300/kernel/vmlinux.lds.S index bcebcefb4ad7..c96ba3da95ac 100644 --- a/arch/mn10300/kernel/vmlinux.lds.S +++ b/arch/mn10300/kernel/vmlinux.lds.S | |||
| @@ -61,7 +61,7 @@ SECTIONS | |||
| 61 | _edata = .; /* End of data section */ | 61 | _edata = .; /* End of data section */ |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | .data.init_task : { INIT_TASK(THREAD_SIZE); } | 64 | .data.init_task : { INIT_TASK_DATA(THREAD_SIZE); } |
| 65 | 65 | ||
| 66 | /* might get freed after init */ | 66 | /* might get freed after init */ |
| 67 | . = ALIGN(PAGE_SIZE); | 67 | . = ALIGN(PAGE_SIZE); |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 9038f39d9d73..06f8d5b5b0f9 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
| @@ -16,6 +16,8 @@ config PARISC | |||
| 16 | select RTC_DRV_GENERIC | 16 | select RTC_DRV_GENERIC |
| 17 | select INIT_ALL_POSSIBLE | 17 | select INIT_ALL_POSSIBLE |
| 18 | select BUG | 18 | select BUG |
| 19 | select HAVE_PERF_COUNTERS | ||
| 20 | select GENERIC_ATOMIC64 if !64BIT | ||
| 19 | help | 21 | help |
| 20 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 22 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
| 21 | in many of their workstations & servers (HP9000 700 and 800 series, | 23 | in many of their workstations & servers (HP9000 700 and 800 series, |
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index 7eeaff944360..8bc9e96699b2 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h | |||
| @@ -222,13 +222,13 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
| 222 | 222 | ||
| 223 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 223 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
| 224 | 224 | ||
| 225 | #define atomic_add(i,v) ((void)(__atomic_add_return( ((int)(i)),(v)))) | 225 | #define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v)))) |
| 226 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-((int)(i)),(v)))) | 226 | #define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v)))) |
| 227 | #define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) | 227 | #define atomic_inc(v) ((void)(__atomic_add_return( 1,(v)))) |
| 228 | #define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) | 228 | #define atomic_dec(v) ((void)(__atomic_add_return( -1,(v)))) |
| 229 | 229 | ||
| 230 | #define atomic_add_return(i,v) (__atomic_add_return( ((int)(i)),(v))) | 230 | #define atomic_add_return(i,v) (__atomic_add_return( (i),(v))) |
| 231 | #define atomic_sub_return(i,v) (__atomic_add_return(-((int)(i)),(v))) | 231 | #define atomic_sub_return(i,v) (__atomic_add_return(-(i),(v))) |
| 232 | #define atomic_inc_return(v) (__atomic_add_return( 1,(v))) | 232 | #define atomic_inc_return(v) (__atomic_add_return( 1,(v))) |
| 233 | #define atomic_dec_return(v) (__atomic_add_return( -1,(v))) | 233 | #define atomic_dec_return(v) (__atomic_add_return( -1,(v))) |
| 234 | 234 | ||
| @@ -336,7 +336,11 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
| 336 | 336 | ||
| 337 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) | 337 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) |
| 338 | 338 | ||
| 339 | #endif /* CONFIG_64BIT */ | 339 | #else /* CONFIG_64BIT */ |
| 340 | |||
| 341 | #include <asm-generic/atomic64.h> | ||
| 342 | |||
| 343 | #endif /* !CONFIG_64BIT */ | ||
| 340 | 344 | ||
| 341 | #include <asm-generic/atomic-long.h> | 345 | #include <asm-generic/atomic-long.h> |
| 342 | 346 | ||
diff --git a/arch/parisc/include/asm/dma.h b/arch/parisc/include/asm/dma.h index 31ad0f05af3d..f7a18f968703 100644 --- a/arch/parisc/include/asm/dma.h +++ b/arch/parisc/include/asm/dma.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* $Id: dma.h,v 1.2 1999/04/27 00:46:18 deller Exp $ | 1 | /* asm/dma.h: Defines for using and allocating dma channels. |
| 2 | * linux/include/asm/dma.h: Defines for using and allocating dma channels. | ||
| 3 | * Written by Hennus Bergman, 1992. | 2 | * Written by Hennus Bergman, 1992. |
| 4 | * High DMA channel support & info by Hannu Savolainen | 3 | * High DMA channel support & info by Hannu Savolainen |
| 5 | * and John Boyd, Nov. 1992. | 4 | * and John Boyd, Nov. 1992. |
diff --git a/arch/parisc/include/asm/perf_counter.h b/arch/parisc/include/asm/perf_counter.h new file mode 100644 index 000000000000..dc9e829f7013 --- /dev/null +++ b/arch/parisc/include/asm/perf_counter.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #ifndef __ASM_PARISC_PERF_COUNTER_H | ||
| 2 | #define __ASM_PARISC_PERF_COUNTER_H | ||
| 3 | |||
| 4 | /* parisc only supports software counters through this interface. */ | ||
| 5 | static inline void set_perf_counter_pending(void) { } | ||
| 6 | |||
| 7 | #endif /* __ASM_PARISC_PERF_COUNTER_H */ | ||
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h index 9d64df8754ba..9ce66e9d1c2b 100644 --- a/arch/parisc/include/asm/processor.h +++ b/arch/parisc/include/asm/processor.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <asm/types.h> | 18 | #include <asm/types.h> |
| 19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
| 20 | #include <asm/percpu.h> | 20 | #include <asm/percpu.h> |
| 21 | |||
| 21 | #endif /* __ASSEMBLY__ */ | 22 | #endif /* __ASSEMBLY__ */ |
| 22 | 23 | ||
| 23 | #define KERNEL_STACK_SIZE (4*PAGE_SIZE) | 24 | #define KERNEL_STACK_SIZE (4*PAGE_SIZE) |
| @@ -127,6 +128,8 @@ struct thread_struct { | |||
| 127 | unsigned long flags; | 128 | unsigned long flags; |
| 128 | }; | 129 | }; |
| 129 | 130 | ||
| 131 | #define task_pt_regs(tsk) ((struct pt_regs *)&((tsk)->thread.regs)) | ||
| 132 | |||
| 130 | /* Thread struct flags. */ | 133 | /* Thread struct flags. */ |
| 131 | #define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */ | 134 | #define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */ |
| 132 | #define PARISC_UAC_SIGBUS (1UL << 1) | 135 | #define PARISC_UAC_SIGBUS (1UL << 1) |
diff --git a/arch/parisc/include/asm/system.h b/arch/parisc/include/asm/system.h index ee80c920b464..d91357bca5b4 100644 --- a/arch/parisc/include/asm/system.h +++ b/arch/parisc/include/asm/system.h | |||
| @@ -168,8 +168,8 @@ static inline void set_eiem(unsigned long val) | |||
| 168 | /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ | 168 | /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ |
| 169 | #define __ldcw(a) ({ \ | 169 | #define __ldcw(a) ({ \ |
| 170 | unsigned __ret; \ | 170 | unsigned __ret; \ |
| 171 | __asm__ __volatile__(__LDCW " 0(%1),%0" \ | 171 | __asm__ __volatile__(__LDCW " 0(%2),%0" \ |
| 172 | : "=r" (__ret) : "r" (a)); \ | 172 | : "=r" (__ret), "+m" (*(a)) : "r" (a)); \ |
| 173 | __ret; \ | 173 | __ret; \ |
| 174 | }) | 174 | }) |
| 175 | 175 | ||
diff --git a/arch/parisc/include/asm/tlbflush.h b/arch/parisc/include/asm/tlbflush.h index 1f6fd4fc05b9..8f1a8100bf2d 100644 --- a/arch/parisc/include/asm/tlbflush.h +++ b/arch/parisc/include/asm/tlbflush.h | |||
| @@ -12,14 +12,12 @@ | |||
| 12 | * N class systems, only one PxTLB inter processor broadcast can be | 12 | * N class systems, only one PxTLB inter processor broadcast can be |
| 13 | * active at any one time on the Merced bus. This tlb purge | 13 | * active at any one time on the Merced bus. This tlb purge |
| 14 | * synchronisation is fairly lightweight and harmless so we activate | 14 | * synchronisation is fairly lightweight and harmless so we activate |
| 15 | * it on all SMP systems not just the N class. We also need to have | 15 | * it on all systems not just the N class. |
| 16 | * preemption disabled on uniprocessor machines, and spin_lock does that | ||
| 17 | * nicely. | ||
| 18 | */ | 16 | */ |
| 19 | extern spinlock_t pa_tlb_lock; | 17 | extern spinlock_t pa_tlb_lock; |
| 20 | 18 | ||
| 21 | #define purge_tlb_start(x) spin_lock(&pa_tlb_lock) | 19 | #define purge_tlb_start(flags) spin_lock_irqsave(&pa_tlb_lock, flags) |
| 22 | #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) | 20 | #define purge_tlb_end(flags) spin_unlock_irqrestore(&pa_tlb_lock, flags) |
| 23 | 21 | ||
| 24 | extern void flush_tlb_all(void); | 22 | extern void flush_tlb_all(void); |
| 25 | extern void flush_tlb_all_local(void *); | 23 | extern void flush_tlb_all_local(void *); |
| @@ -63,14 +61,16 @@ static inline void flush_tlb_mm(struct mm_struct *mm) | |||
| 63 | static inline void flush_tlb_page(struct vm_area_struct *vma, | 61 | static inline void flush_tlb_page(struct vm_area_struct *vma, |
| 64 | unsigned long addr) | 62 | unsigned long addr) |
| 65 | { | 63 | { |
| 64 | unsigned long flags; | ||
| 65 | |||
| 66 | /* For one page, it's not worth testing the split_tlb variable */ | 66 | /* For one page, it's not worth testing the split_tlb variable */ |
| 67 | 67 | ||
| 68 | mb(); | 68 | mb(); |
| 69 | mtsp(vma->vm_mm->context,1); | 69 | mtsp(vma->vm_mm->context,1); |
| 70 | purge_tlb_start(); | 70 | purge_tlb_start(flags); |
| 71 | pdtlb(addr); | 71 | pdtlb(addr); |
| 72 | pitlb(addr); | 72 | pitlb(addr); |
| 73 | purge_tlb_end(); | 73 | purge_tlb_end(flags); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | void __flush_tlb_range(unsigned long sid, | 76 | void __flush_tlb_range(unsigned long sid, |
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h index ef26b009dc5d..f3d3b8b012c4 100644 --- a/arch/parisc/include/asm/unistd.h +++ b/arch/parisc/include/asm/unistd.h | |||
| @@ -807,8 +807,12 @@ | |||
| 807 | #define __NR_dup3 (__NR_Linux + 312) | 807 | #define __NR_dup3 (__NR_Linux + 312) |
| 808 | #define __NR_pipe2 (__NR_Linux + 313) | 808 | #define __NR_pipe2 (__NR_Linux + 313) |
| 809 | #define __NR_inotify_init1 (__NR_Linux + 314) | 809 | #define __NR_inotify_init1 (__NR_Linux + 314) |
| 810 | #define __NR_preadv (__NR_Linux + 315) | ||
| 811 | #define __NR_pwritev (__NR_Linux + 316) | ||
| 812 | #define __NR_rt_tgsigqueueinfo (__NR_Linux + 317) | ||
| 813 | #define __NR_perf_counter_open (__NR_Linux + 318) | ||
| 810 | 814 | ||
| 811 | #define __NR_Linux_syscalls (__NR_inotify_init1 + 1) | 815 | #define __NR_Linux_syscalls (__NR_perf_counter_open + 1) |
| 812 | 816 | ||
| 813 | 817 | ||
| 814 | #define __IGNORE_select /* newselect */ | 818 | #define __IGNORE_select /* newselect */ |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 837530ea32e7..b6ed34de14e1 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* $Id: cache.c,v 1.4 2000/01/25 00:11:38 prumpf Exp $ | 1 | /* |
| 2 | * | ||
| 3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
| 5 | * for more details. | 4 | * for more details. |
| @@ -398,12 +397,13 @@ EXPORT_SYMBOL(flush_kernel_icache_range_asm); | |||
| 398 | 397 | ||
| 399 | void clear_user_page_asm(void *page, unsigned long vaddr) | 398 | void clear_user_page_asm(void *page, unsigned long vaddr) |
| 400 | { | 399 | { |
| 400 | unsigned long flags; | ||
| 401 | /* This function is implemented in assembly in pacache.S */ | 401 | /* This function is implemented in assembly in pacache.S */ |
| 402 | extern void __clear_user_page_asm(void *page, unsigned long vaddr); | 402 | extern void __clear_user_page_asm(void *page, unsigned long vaddr); |
| 403 | 403 | ||
| 404 | purge_tlb_start(); | 404 | purge_tlb_start(flags); |
| 405 | __clear_user_page_asm(page, vaddr); | 405 | __clear_user_page_asm(page, vaddr); |
| 406 | purge_tlb_end(); | 406 | purge_tlb_end(flags); |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | #define FLUSH_THRESHOLD 0x80000 /* 0.5MB */ | 409 | #define FLUSH_THRESHOLD 0x80000 /* 0.5MB */ |
| @@ -444,20 +444,24 @@ extern void clear_user_page_asm(void *page, unsigned long vaddr); | |||
| 444 | 444 | ||
| 445 | void clear_user_page(void *page, unsigned long vaddr, struct page *pg) | 445 | void clear_user_page(void *page, unsigned long vaddr, struct page *pg) |
| 446 | { | 446 | { |
| 447 | unsigned long flags; | ||
| 448 | |||
| 447 | purge_kernel_dcache_page((unsigned long)page); | 449 | purge_kernel_dcache_page((unsigned long)page); |
| 448 | purge_tlb_start(); | 450 | purge_tlb_start(flags); |
| 449 | pdtlb_kernel(page); | 451 | pdtlb_kernel(page); |
| 450 | purge_tlb_end(); | 452 | purge_tlb_end(flags); |
| 451 | clear_user_page_asm(page, vaddr); | 453 | clear_user_page_asm(page, vaddr); |
| 452 | } | 454 | } |
| 453 | EXPORT_SYMBOL(clear_user_page); | 455 | EXPORT_SYMBOL(clear_user_page); |
| 454 | 456 | ||
| 455 | void flush_kernel_dcache_page_addr(void *addr) | 457 | void flush_kernel_dcache_page_addr(void *addr) |
| 456 | { | 458 | { |
| 459 | unsigned long flags; | ||
| 460 | |||
| 457 | flush_kernel_dcache_page_asm(addr); | 461 | flush_kernel_dcache_page_asm(addr); |
| 458 | purge_tlb_start(); | 462 | purge_tlb_start(flags); |
| 459 | pdtlb_kernel(addr); | 463 | pdtlb_kernel(addr); |
| 460 | purge_tlb_end(); | 464 | purge_tlb_end(flags); |
| 461 | } | 465 | } |
| 462 | EXPORT_SYMBOL(flush_kernel_dcache_page_addr); | 466 | EXPORT_SYMBOL(flush_kernel_dcache_page_addr); |
| 463 | 467 | ||
| @@ -490,8 +494,10 @@ void __flush_tlb_range(unsigned long sid, unsigned long start, | |||
| 490 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ | 494 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ |
| 491 | flush_tlb_all(); | 495 | flush_tlb_all(); |
| 492 | else { | 496 | else { |
| 497 | unsigned long flags; | ||
| 498 | |||
| 493 | mtsp(sid, 1); | 499 | mtsp(sid, 1); |
| 494 | purge_tlb_start(); | 500 | purge_tlb_start(flags); |
| 495 | if (split_tlb) { | 501 | if (split_tlb) { |
| 496 | while (npages--) { | 502 | while (npages--) { |
| 497 | pdtlb(start); | 503 | pdtlb(start); |
| @@ -504,7 +510,7 @@ void __flush_tlb_range(unsigned long sid, unsigned long start, | |||
| 504 | start += PAGE_SIZE; | 510 | start += PAGE_SIZE; |
| 505 | } | 511 | } |
| 506 | } | 512 | } |
| 507 | purge_tlb_end(); | 513 | purge_tlb_end(flags); |
| 508 | } | 514 | } |
| 509 | } | 515 | } |
| 510 | 516 | ||
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c index bd1f7f1ff74e..d228d8237879 100644 --- a/arch/parisc/kernel/inventory.c +++ b/arch/parisc/kernel/inventory.c | |||
| @@ -170,23 +170,27 @@ static void __init pagezero_memconfig(void) | |||
| 170 | static int __init | 170 | static int __init |
| 171 | pat_query_module(ulong pcell_loc, ulong mod_index) | 171 | pat_query_module(ulong pcell_loc, ulong mod_index) |
| 172 | { | 172 | { |
| 173 | pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; | 173 | pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; |
| 174 | unsigned long bytecnt; | 174 | unsigned long bytecnt; |
| 175 | unsigned long temp; /* 64-bit scratch value */ | 175 | unsigned long temp; /* 64-bit scratch value */ |
| 176 | long status; /* PDC return value status */ | 176 | long status; /* PDC return value status */ |
| 177 | struct parisc_device *dev; | 177 | struct parisc_device *dev; |
| 178 | 178 | ||
| 179 | pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL); | ||
| 180 | if (!pa_pdc_cell) | ||
| 181 | panic("couldn't allocate memory for PDC_PAT_CELL!"); | ||
| 182 | |||
| 179 | /* return cell module (PA or Processor view) */ | 183 | /* return cell module (PA or Processor view) */ |
| 180 | status = pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, | 184 | status = pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, |
| 181 | PA_VIEW, &pa_pdc_cell); | 185 | PA_VIEW, pa_pdc_cell); |
| 182 | 186 | ||
| 183 | if (status != PDC_OK) { | 187 | if (status != PDC_OK) { |
| 184 | /* no more cell modules or error */ | 188 | /* no more cell modules or error */ |
| 185 | return status; | 189 | return status; |
| 186 | } | 190 | } |
| 187 | 191 | ||
| 188 | temp = pa_pdc_cell.cba; | 192 | temp = pa_pdc_cell->cba; |
| 189 | dev = alloc_pa_dev(PAT_GET_CBA(temp), &pa_pdc_cell.mod_path); | 193 | dev = alloc_pa_dev(PAT_GET_CBA(temp), &(pa_pdc_cell->mod_path)); |
| 190 | if (!dev) { | 194 | if (!dev) { |
| 191 | return PDC_OK; | 195 | return PDC_OK; |
| 192 | } | 196 | } |
| @@ -203,8 +207,8 @@ pat_query_module(ulong pcell_loc, ulong mod_index) | |||
| 203 | 207 | ||
| 204 | /* save generic info returned from the call */ | 208 | /* save generic info returned from the call */ |
| 205 | /* REVISIT: who is the consumer of this? not sure yet... */ | 209 | /* REVISIT: who is the consumer of this? not sure yet... */ |
| 206 | dev->mod_info = pa_pdc_cell.mod_info; /* pass to PAT_GET_ENTITY() */ | 210 | dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */ |
| 207 | dev->pmod_loc = pa_pdc_cell.mod_location; | 211 | dev->pmod_loc = pa_pdc_cell->mod_location; |
| 208 | 212 | ||
| 209 | register_parisc_device(dev); /* advertise device */ | 213 | register_parisc_device(dev); /* advertise device */ |
| 210 | 214 | ||
| @@ -216,14 +220,14 @@ pat_query_module(ulong pcell_loc, ulong mod_index) | |||
| 216 | 220 | ||
| 217 | case PAT_ENTITY_PROC: | 221 | case PAT_ENTITY_PROC: |
| 218 | printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n", | 222 | printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n", |
| 219 | pa_pdc_cell.mod[0]); | 223 | pa_pdc_cell->mod[0]); |
| 220 | break; | 224 | break; |
| 221 | 225 | ||
| 222 | case PAT_ENTITY_MEM: | 226 | case PAT_ENTITY_MEM: |
| 223 | printk(KERN_DEBUG | 227 | printk(KERN_DEBUG |
| 224 | "PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n", | 228 | "PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n", |
| 225 | pa_pdc_cell.mod[0], pa_pdc_cell.mod[1], | 229 | pa_pdc_cell->mod[0], pa_pdc_cell->mod[1], |
| 226 | pa_pdc_cell.mod[2]); | 230 | pa_pdc_cell->mod[2]); |
| 227 | break; | 231 | break; |
| 228 | case PAT_ENTITY_CA: | 232 | case PAT_ENTITY_CA: |
| 229 | printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc); | 233 | printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc); |
| @@ -243,23 +247,26 @@ pat_query_module(ulong pcell_loc, ulong mod_index) | |||
| 243 | print_ranges: | 247 | print_ranges: |
| 244 | pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, | 248 | pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index, |
| 245 | IO_VIEW, &io_pdc_cell); | 249 | IO_VIEW, &io_pdc_cell); |
| 246 | printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell.mod[1]); | 250 | printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell->mod[1]); |
| 247 | for (i = 0; i < pa_pdc_cell.mod[1]; i++) { | 251 | for (i = 0; i < pa_pdc_cell->mod[1]; i++) { |
| 248 | printk(KERN_DEBUG | 252 | printk(KERN_DEBUG |
| 249 | " PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", | 253 | " PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", |
| 250 | i, pa_pdc_cell.mod[2 + i * 3], /* type */ | 254 | i, pa_pdc_cell->mod[2 + i * 3], /* type */ |
| 251 | pa_pdc_cell.mod[3 + i * 3], /* start */ | 255 | pa_pdc_cell->mod[3 + i * 3], /* start */ |
| 252 | pa_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */ | 256 | pa_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */ |
| 253 | printk(KERN_DEBUG | 257 | printk(KERN_DEBUG |
| 254 | " IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", | 258 | " IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n", |
| 255 | i, io_pdc_cell.mod[2 + i * 3], /* type */ | 259 | i, io_pdc_cell->mod[2 + i * 3], /* type */ |
| 256 | io_pdc_cell.mod[3 + i * 3], /* start */ | 260 | io_pdc_cell->mod[3 + i * 3], /* start */ |
| 257 | io_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */ | 261 | io_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */ |
| 258 | } | 262 | } |
| 259 | printk(KERN_DEBUG "\n"); | 263 | printk(KERN_DEBUG "\n"); |
| 260 | break; | 264 | break; |
| 261 | } | 265 | } |
| 262 | #endif /* DEBUG_PAT */ | 266 | #endif /* DEBUG_PAT */ |
| 267 | |||
| 268 | kfree(pa_pdc_cell); | ||
| 269 | |||
| 263 | return PDC_OK; | 270 | return PDC_OK; |
| 264 | } | 271 | } |
| 265 | 272 | ||
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 8007f1e65729..330f536a9324 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
| @@ -120,7 +120,7 @@ int cpu_check_affinity(unsigned int irq, const struct cpumask *dest) | |||
| 120 | if (CHECK_IRQ_PER_CPU(irq)) { | 120 | if (CHECK_IRQ_PER_CPU(irq)) { |
| 121 | /* Bad linux design decision. The mask has already | 121 | /* Bad linux design decision. The mask has already |
| 122 | * been set; we must reset it */ | 122 | * been set; we must reset it */ |
| 123 | cpumask_setall(&irq_desc[irq].affinity); | 123 | cpumask_setall(irq_desc[irq].affinity); |
| 124 | return -EINVAL; | 124 | return -EINVAL; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| @@ -138,13 +138,13 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest) | |||
| 138 | if (cpu_dest < 0) | 138 | if (cpu_dest < 0) |
| 139 | return -1; | 139 | return -1; |
| 140 | 140 | ||
| 141 | cpumask_copy(&irq_desc[irq].affinity, dest); | 141 | cpumask_copy(irq_desc[irq].affinity, dest); |
| 142 | 142 | ||
| 143 | return 0; | 143 | return 0; |
| 144 | } | 144 | } |
| 145 | #endif | 145 | #endif |
| 146 | 146 | ||
| 147 | static struct hw_interrupt_type cpu_interrupt_type = { | 147 | static struct irq_chip cpu_interrupt_type = { |
| 148 | .typename = "CPU", | 148 | .typename = "CPU", |
| 149 | .startup = cpu_startup_irq, | 149 | .startup = cpu_startup_irq, |
| 150 | .shutdown = cpu_disable_irq, | 150 | .shutdown = cpu_disable_irq, |
| @@ -299,7 +299,7 @@ int txn_alloc_irq(unsigned int bits_wide) | |||
| 299 | unsigned long txn_affinity_addr(unsigned int irq, int cpu) | 299 | unsigned long txn_affinity_addr(unsigned int irq, int cpu) |
| 300 | { | 300 | { |
| 301 | #ifdef CONFIG_SMP | 301 | #ifdef CONFIG_SMP |
| 302 | cpumask_copy(&irq_desc[irq].affinity, cpumask_of(cpu)); | 302 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); |
| 303 | #endif | 303 | #endif |
| 304 | 304 | ||
| 305 | return per_cpu(cpu_data, cpu).txn_addr; | 305 | return per_cpu(cpu_data, cpu).txn_addr; |
| @@ -356,7 +356,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
| 356 | irq = eirr_to_irq(eirr_val); | 356 | irq = eirr_to_irq(eirr_val); |
| 357 | 357 | ||
| 358 | #ifdef CONFIG_SMP | 358 | #ifdef CONFIG_SMP |
| 359 | cpumask_copy(&dest, &irq_desc[irq].affinity); | 359 | cpumask_copy(&dest, irq_desc[irq].affinity); |
| 360 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) && | 360 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) && |
| 361 | !cpu_isset(smp_processor_id(), dest)) { | 361 | !cpu_isset(smp_processor_id(), dest)) { |
| 362 | int cpu = first_cpu(dest); | 362 | int cpu = first_cpu(dest); |
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 7d927eac932b..c07f618ff7da 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
| @@ -90,12 +90,14 @@ static inline int map_pte_uncached(pte_t * pte, | |||
| 90 | if (end > PMD_SIZE) | 90 | if (end > PMD_SIZE) |
| 91 | end = PMD_SIZE; | 91 | end = PMD_SIZE; |
| 92 | do { | 92 | do { |
| 93 | unsigned long flags; | ||
| 94 | |||
| 93 | if (!pte_none(*pte)) | 95 | if (!pte_none(*pte)) |
| 94 | printk(KERN_ERR "map_pte_uncached: page already exists\n"); | 96 | printk(KERN_ERR "map_pte_uncached: page already exists\n"); |
| 95 | set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC)); | 97 | set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC)); |
| 96 | purge_tlb_start(); | 98 | purge_tlb_start(flags); |
| 97 | pdtlb_kernel(orig_vaddr); | 99 | pdtlb_kernel(orig_vaddr); |
| 98 | purge_tlb_end(); | 100 | purge_tlb_end(flags); |
| 99 | vaddr += PAGE_SIZE; | 101 | vaddr += PAGE_SIZE; |
| 100 | orig_vaddr += PAGE_SIZE; | 102 | orig_vaddr += PAGE_SIZE; |
| 101 | (*paddr_ptr) += PAGE_SIZE; | 103 | (*paddr_ptr) += PAGE_SIZE; |
| @@ -168,11 +170,13 @@ static inline void unmap_uncached_pte(pmd_t * pmd, unsigned long vaddr, | |||
| 168 | if (end > PMD_SIZE) | 170 | if (end > PMD_SIZE) |
| 169 | end = PMD_SIZE; | 171 | end = PMD_SIZE; |
| 170 | do { | 172 | do { |
| 173 | unsigned long flags; | ||
| 171 | pte_t page = *pte; | 174 | pte_t page = *pte; |
| 175 | |||
| 172 | pte_clear(&init_mm, vaddr, pte); | 176 | pte_clear(&init_mm, vaddr, pte); |
| 173 | purge_tlb_start(); | 177 | purge_tlb_start(flags); |
| 174 | pdtlb_kernel(orig_vaddr); | 178 | pdtlb_kernel(orig_vaddr); |
| 175 | purge_tlb_end(); | 179 | purge_tlb_end(flags); |
| 176 | vaddr += PAGE_SIZE; | 180 | vaddr += PAGE_SIZE; |
| 177 | orig_vaddr += PAGE_SIZE; | 181 | orig_vaddr += PAGE_SIZE; |
| 178 | pte++; | 182 | pte++; |
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 6936386c9861..f7064abc3bb6 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* $Id: pci.c,v 1.6 2000/01/29 00:12:05 grundler Exp $ | 1 | /* |
| 2 | * | ||
| 3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
| 5 | * for more details. | 4 | * for more details. |
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index e09d0f7fb6b0..c8fb61ed32f4 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* $Id: processor.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $ | 1 | /* |
| 2 | * | ||
| 3 | * Initial setup-routines for HP 9000 based hardware. | 2 | * Initial setup-routines for HP 9000 based hardware. |
| 4 | * | 3 | * |
| 5 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
| @@ -121,22 +120,28 @@ static int __cpuinit processor_probe(struct parisc_device *dev) | |||
| 121 | if (is_pdc_pat()) { | 120 | if (is_pdc_pat()) { |
| 122 | ulong status; | 121 | ulong status; |
| 123 | unsigned long bytecnt; | 122 | unsigned long bytecnt; |
| 124 | pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; | 123 | pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; |
| 125 | #undef USE_PAT_CPUID | 124 | #undef USE_PAT_CPUID |
| 126 | #ifdef USE_PAT_CPUID | 125 | #ifdef USE_PAT_CPUID |
| 127 | struct pdc_pat_cpu_num cpu_info; | 126 | struct pdc_pat_cpu_num cpu_info; |
| 128 | #endif | 127 | #endif |
| 129 | 128 | ||
| 129 | pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL); | ||
| 130 | if (!pa_pdc_cell) | ||
| 131 | panic("couldn't allocate memory for PDC_PAT_CELL!"); | ||
| 132 | |||
| 130 | status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc, | 133 | status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc, |
| 131 | dev->mod_index, PA_VIEW, &pa_pdc_cell); | 134 | dev->mod_index, PA_VIEW, pa_pdc_cell); |
| 132 | 135 | ||
| 133 | BUG_ON(PDC_OK != status); | 136 | BUG_ON(PDC_OK != status); |
| 134 | 137 | ||
| 135 | /* verify it's the same as what do_pat_inventory() found */ | 138 | /* verify it's the same as what do_pat_inventory() found */ |
| 136 | BUG_ON(dev->mod_info != pa_pdc_cell.mod_info); | 139 | BUG_ON(dev->mod_info != pa_pdc_cell->mod_info); |
| 137 | BUG_ON(dev->pmod_loc != pa_pdc_cell.mod_location); | 140 | BUG_ON(dev->pmod_loc != pa_pdc_cell->mod_location); |
| 141 | |||
| 142 | txn_addr = pa_pdc_cell->mod[0]; /* id_eid for IO sapic */ | ||
| 138 | 143 | ||
| 139 | txn_addr = pa_pdc_cell.mod[0]; /* id_eid for IO sapic */ | 144 | kfree(pa_pdc_cell); |
| 140 | 145 | ||
| 141 | #ifdef USE_PAT_CPUID | 146 | #ifdef USE_PAT_CPUID |
| 142 | /* We need contiguous numbers for cpuid. Firmware's notion | 147 | /* We need contiguous numbers for cpuid. Firmware's notion |
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 82131ca8e05c..cb71f3dac995 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* $Id: setup.c,v 1.8 2000/02/02 04:42:38 prumpf Exp $ | 1 | /* |
| 2 | * | ||
| 3 | * Initial setup-routines for HP 9000 based hardware. | 2 | * Initial setup-routines for HP 9000 based hardware. |
| 4 | * | 3 | * |
| 5 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 1adb40c81669..92a0acaa0d12 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
| @@ -174,68 +174,6 @@ asmlinkage long sys32_sched_rr_get_interval(pid_t pid, | |||
| 174 | return ret; | 174 | return ret; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | /*** copied from mips64 ***/ | ||
| 178 | /* | ||
| 179 | * Ooo, nasty. We need here to frob 32-bit unsigned longs to | ||
| 180 | * 64-bit unsigned longs. | ||
| 181 | */ | ||
| 182 | |||
| 183 | static inline int | ||
| 184 | get_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset) | ||
| 185 | { | ||
| 186 | n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32)); | ||
| 187 | if (ufdset) { | ||
| 188 | unsigned long odd; | ||
| 189 | |||
| 190 | if (!access_ok(VERIFY_WRITE, ufdset, n*sizeof(u32))) | ||
| 191 | return -EFAULT; | ||
| 192 | |||
| 193 | odd = n & 1UL; | ||
| 194 | n &= ~1UL; | ||
| 195 | while (n) { | ||
| 196 | unsigned long h, l; | ||
| 197 | __get_user(l, ufdset); | ||
| 198 | __get_user(h, ufdset+1); | ||
| 199 | ufdset += 2; | ||
| 200 | *fdset++ = h << 32 | l; | ||
| 201 | n -= 2; | ||
| 202 | } | ||
| 203 | if (odd) | ||
| 204 | __get_user(*fdset, ufdset); | ||
| 205 | } else { | ||
| 206 | /* Tricky, must clear full unsigned long in the | ||
| 207 | * kernel fdset at the end, this makes sure that | ||
| 208 | * actually happens. | ||
| 209 | */ | ||
| 210 | memset(fdset, 0, ((n + 1) & ~1)*sizeof(u32)); | ||
| 211 | } | ||
| 212 | return 0; | ||
| 213 | } | ||
| 214 | |||
| 215 | static inline void | ||
| 216 | set_fd_set32(unsigned long n, u32 *ufdset, unsigned long *fdset) | ||
| 217 | { | ||
| 218 | unsigned long odd; | ||
| 219 | n = (n + 8*sizeof(u32) - 1) / (8*sizeof(u32)); | ||
| 220 | |||
| 221 | if (!ufdset) | ||
| 222 | return; | ||
| 223 | |||
| 224 | odd = n & 1UL; | ||
| 225 | n &= ~1UL; | ||
| 226 | while (n) { | ||
| 227 | unsigned long h, l; | ||
| 228 | l = *fdset++; | ||
| 229 | h = l >> 32; | ||
| 230 | __put_user(l, ufdset); | ||
| 231 | __put_user(h, ufdset+1); | ||
| 232 | ufdset += 2; | ||
| 233 | n -= 2; | ||
| 234 | } | ||
| 235 | if (odd) | ||
| 236 | __put_user(*fdset, ufdset); | ||
| 237 | } | ||
| 238 | |||
| 239 | struct msgbuf32 { | 177 | struct msgbuf32 { |
| 240 | int mtype; | 178 | int mtype; |
| 241 | char mtext[1]; | 179 | char mtext[1]; |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 03b9a01bc16c..cf145eb026b3 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
| @@ -413,6 +413,10 @@ | |||
| 413 | ENTRY_SAME(dup3) | 413 | ENTRY_SAME(dup3) |
| 414 | ENTRY_SAME(pipe2) | 414 | ENTRY_SAME(pipe2) |
| 415 | ENTRY_SAME(inotify_init1) | 415 | ENTRY_SAME(inotify_init1) |
| 416 | ENTRY_COMP(preadv) /* 315 */ | ||
| 417 | ENTRY_COMP(pwritev) | ||
| 418 | ENTRY_COMP(rt_tgsigqueueinfo) | ||
| 419 | ENTRY_SAME(perf_counter_open) | ||
| 416 | 420 | ||
| 417 | /* Nothing yet */ | 421 | /* Nothing yet */ |
| 418 | 422 | ||
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index d4dd05674c62..a79c6f9e7e2c 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
| @@ -56,9 +56,9 @@ static unsigned long clocktick __read_mostly; /* timer cycles per tick */ | |||
| 56 | */ | 56 | */ |
| 57 | irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) | 57 | irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) |
| 58 | { | 58 | { |
| 59 | unsigned long now; | 59 | unsigned long now, now2; |
| 60 | unsigned long next_tick; | 60 | unsigned long next_tick; |
| 61 | unsigned long cycles_elapsed, ticks_elapsed; | 61 | unsigned long cycles_elapsed, ticks_elapsed = 1; |
| 62 | unsigned long cycles_remainder; | 62 | unsigned long cycles_remainder; |
| 63 | unsigned int cpu = smp_processor_id(); | 63 | unsigned int cpu = smp_processor_id(); |
| 64 | struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu); | 64 | struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu); |
| @@ -71,44 +71,24 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) | |||
| 71 | /* Initialize next_tick to the expected tick time. */ | 71 | /* Initialize next_tick to the expected tick time. */ |
| 72 | next_tick = cpuinfo->it_value; | 72 | next_tick = cpuinfo->it_value; |
| 73 | 73 | ||
| 74 | /* Get current interval timer. | 74 | /* Get current cycle counter (Control Register 16). */ |
| 75 | * CR16 reads as 64 bits in CPU wide mode. | ||
| 76 | * CR16 reads as 32 bits in CPU narrow mode. | ||
| 77 | */ | ||
| 78 | now = mfctl(16); | 75 | now = mfctl(16); |
| 79 | 76 | ||
| 80 | cycles_elapsed = now - next_tick; | 77 | cycles_elapsed = now - next_tick; |
| 81 | 78 | ||
| 82 | if ((cycles_elapsed >> 5) < cpt) { | 79 | if ((cycles_elapsed >> 6) < cpt) { |
| 83 | /* use "cheap" math (add/subtract) instead | 80 | /* use "cheap" math (add/subtract) instead |
| 84 | * of the more expensive div/mul method | 81 | * of the more expensive div/mul method |
| 85 | */ | 82 | */ |
| 86 | cycles_remainder = cycles_elapsed; | 83 | cycles_remainder = cycles_elapsed; |
| 87 | ticks_elapsed = 1; | ||
| 88 | while (cycles_remainder > cpt) { | 84 | while (cycles_remainder > cpt) { |
| 89 | cycles_remainder -= cpt; | 85 | cycles_remainder -= cpt; |
| 90 | ticks_elapsed++; | 86 | ticks_elapsed++; |
| 91 | } | 87 | } |
| 92 | } else { | 88 | } else { |
| 89 | /* TODO: Reduce this to one fdiv op */ | ||
| 93 | cycles_remainder = cycles_elapsed % cpt; | 90 | cycles_remainder = cycles_elapsed % cpt; |
| 94 | ticks_elapsed = 1 + cycles_elapsed / cpt; | 91 | ticks_elapsed += cycles_elapsed / cpt; |
| 95 | } | ||
| 96 | |||
| 97 | /* Can we differentiate between "early CR16" (aka Scenario 1) and | ||
| 98 | * "long delay" (aka Scenario 3)? I don't think so. | ||
| 99 | * | ||
| 100 | * We expected timer_interrupt to be delivered at least a few hundred | ||
| 101 | * cycles after the IT fires. But it's arbitrary how much time passes | ||
| 102 | * before we call it "late". I've picked one second. | ||
| 103 | */ | ||
| 104 | if (unlikely(ticks_elapsed > HZ)) { | ||
| 105 | /* Scenario 3: very long delay? bad in any case */ | ||
| 106 | printk (KERN_CRIT "timer_interrupt(CPU %d): delayed!" | ||
| 107 | " cycles %lX rem %lX " | ||
| 108 | " next/now %lX/%lX\n", | ||
| 109 | cpu, | ||
| 110 | cycles_elapsed, cycles_remainder, | ||
| 111 | next_tick, now ); | ||
| 112 | } | 92 | } |
| 113 | 93 | ||
| 114 | /* convert from "division remainder" to "remainder of clock tick" */ | 94 | /* convert from "division remainder" to "remainder of clock tick" */ |
| @@ -122,18 +102,56 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) | |||
| 122 | 102 | ||
| 123 | cpuinfo->it_value = next_tick; | 103 | cpuinfo->it_value = next_tick; |
| 124 | 104 | ||
| 125 | /* Skip one clocktick on purpose if we are likely to miss next_tick. | 105 | /* Program the IT when to deliver the next interrupt. |
| 126 | * We want to avoid the new next_tick being less than CR16. | 106 | * Only bottom 32-bits of next_tick are writable in CR16! |
| 127 | * If that happened, itimer wouldn't fire until CR16 wrapped. | ||
| 128 | * We'll catch the tick we missed on the tick after that. | ||
| 129 | */ | 107 | */ |
| 130 | if (!(cycles_remainder >> 13)) | ||
| 131 | next_tick += cpt; | ||
| 132 | |||
| 133 | /* Program the IT when to deliver the next interrupt. */ | ||
| 134 | /* Only bottom 32-bits of next_tick are written to cr16. */ | ||
| 135 | mtctl(next_tick, 16); | 108 | mtctl(next_tick, 16); |
| 136 | 109 | ||
| 110 | /* Skip one clocktick on purpose if we missed next_tick. | ||
| 111 | * The new CR16 must be "later" than current CR16 otherwise | ||
| 112 | * itimer would not fire until CR16 wrapped - e.g 4 seconds | ||
| 113 | * later on a 1Ghz processor. We'll account for the missed | ||
| 114 | * tick on the next timer interrupt. | ||
| 115 | * | ||
| 116 | * "next_tick - now" will always give the difference regardless | ||
| 117 | * if one or the other wrapped. If "now" is "bigger" we'll end up | ||
| 118 | * with a very large unsigned number. | ||
| 119 | */ | ||
| 120 | now2 = mfctl(16); | ||
| 121 | if (next_tick - now2 > cpt) | ||
| 122 | mtctl(next_tick+cpt, 16); | ||
| 123 | |||
| 124 | #if 1 | ||
| 125 | /* | ||
| 126 | * GGG: DEBUG code for how many cycles programming CR16 used. | ||
| 127 | */ | ||
| 128 | if (unlikely(now2 - now > 0x3000)) /* 12K cycles */ | ||
| 129 | printk (KERN_CRIT "timer_interrupt(CPU %d): SLOW! 0x%lx cycles!" | ||
| 130 | " cyc %lX rem %lX " | ||
| 131 | " next/now %lX/%lX\n", | ||
| 132 | cpu, now2 - now, cycles_elapsed, cycles_remainder, | ||
| 133 | next_tick, now ); | ||
| 134 | #endif | ||
| 135 | |||
| 136 | /* Can we differentiate between "early CR16" (aka Scenario 1) and | ||
| 137 | * "long delay" (aka Scenario 3)? I don't think so. | ||
| 138 | * | ||
| 139 | * Timer_interrupt will be delivered at least a few hundred cycles | ||
| 140 | * after the IT fires. But it's arbitrary how much time passes | ||
| 141 | * before we call it "late". I've picked one second. | ||
| 142 | * | ||
| 143 | * It's important NO printk's are between reading CR16 and | ||
| 144 | * setting up the next value. May introduce huge variance. | ||
| 145 | */ | ||
| 146 | if (unlikely(ticks_elapsed > HZ)) { | ||
| 147 | /* Scenario 3: very long delay? bad in any case */ | ||
| 148 | printk (KERN_CRIT "timer_interrupt(CPU %d): delayed!" | ||
| 149 | " cycles %lX rem %lX " | ||
| 150 | " next/now %lX/%lX\n", | ||
| 151 | cpu, | ||
| 152 | cycles_elapsed, cycles_remainder, | ||
| 153 | next_tick, now ); | ||
| 154 | } | ||
| 137 | 155 | ||
| 138 | /* Done mucking with unreliable delivery of interrupts. | 156 | /* Done mucking with unreliable delivery of interrupts. |
| 139 | * Go do system house keeping. | 157 | * Go do system house keeping. |
| @@ -173,7 +191,7 @@ EXPORT_SYMBOL(profile_pc); | |||
| 173 | 191 | ||
| 174 | /* clock source code */ | 192 | /* clock source code */ |
| 175 | 193 | ||
| 176 | static cycle_t read_cr16(void) | 194 | static cycle_t read_cr16(struct clocksource *cs) |
| 177 | { | 195 | { |
| 178 | return get_cycles(); | 196 | return get_cycles(); |
| 179 | } | 197 | } |
diff --git a/arch/parisc/lib/checksum.c b/arch/parisc/lib/checksum.c index 462696d30d3b..ae66d31f9ecf 100644 --- a/arch/parisc/lib/checksum.c +++ b/arch/parisc/lib/checksum.c | |||
| @@ -13,8 +13,6 @@ | |||
| 13 | * modify it under the terms of the GNU General Public License | 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version | 14 | * as published by the Free Software Foundation; either version |
| 15 | * 2 of the License, or (at your option) any later version. | 15 | * 2 of the License, or (at your option) any later version. |
| 16 | * | ||
| 17 | * $Id: checksum.c,v 1.3 1997/12/01 17:57:34 ralf Exp $ | ||
| 18 | */ | 16 | */ |
| 19 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 20 | #include <linux/types.h> | 18 | #include <linux/types.h> |
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index bbda909c866e..abf41f4632a9 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c | |||
| @@ -405,7 +405,7 @@ byte_copy: | |||
| 405 | 405 | ||
| 406 | unaligned_copy: | 406 | unaligned_copy: |
| 407 | /* possibly we are aligned on a word, but not on a double... */ | 407 | /* possibly we are aligned on a word, but not on a double... */ |
| 408 | if (likely(t1 & (sizeof(unsigned int)-1)) == 0) { | 408 | if (likely((t1 & (sizeof(unsigned int)-1)) == 0)) { |
| 409 | t2 = src & (sizeof(unsigned int) - 1); | 409 | t2 = src & (sizeof(unsigned int) - 1); |
| 410 | 410 | ||
| 411 | if (unlikely(t2 != 0)) { | 411 | if (unlikely(t2 != 0)) { |
diff --git a/arch/parisc/math-emu/decode_exc.c b/arch/parisc/math-emu/decode_exc.c index 66c8a9f6a27e..3ca1c6149218 100644 --- a/arch/parisc/math-emu/decode_exc.c +++ b/arch/parisc/math-emu/decode_exc.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | * END_DESC | 40 | * END_DESC |
| 41 | */ | 41 | */ |
| 42 | 42 | ||
| 43 | 43 | #include <linux/kernel.h> | |
| 44 | #include "float.h" | 44 | #include "float.h" |
| 45 | #include "sgl_float.h" | 45 | #include "sgl_float.h" |
| 46 | #include "dbl_float.h" | 46 | #include "dbl_float.h" |
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index bfb6dd6ab380..c6afbfc95770 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* $Id: fault.c,v 1.5 2000/01/26 16:20:29 jsm Exp $ | 1 | /* |
| 2 | * | ||
| 3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
| 5 | * for more details. | 4 | * for more details. |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 4356ceb1e366..b0831d9e35cb 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
| @@ -370,34 +370,22 @@ static void __init setup_bootmem(void) | |||
| 370 | 370 | ||
| 371 | void free_initmem(void) | 371 | void free_initmem(void) |
| 372 | { | 372 | { |
| 373 | unsigned long addr, init_begin, init_end; | 373 | unsigned long addr; |
| 374 | 374 | unsigned long init_begin = (unsigned long)__init_begin; | |
| 375 | printk(KERN_INFO "Freeing unused kernel memory: "); | 375 | unsigned long init_end = (unsigned long)__init_end; |
| 376 | 376 | ||
| 377 | #ifdef CONFIG_DEBUG_KERNEL | 377 | #ifdef CONFIG_DEBUG_KERNEL |
| 378 | /* Attempt to catch anyone trying to execute code here | 378 | /* Attempt to catch anyone trying to execute code here |
| 379 | * by filling the page with BRK insns. | 379 | * by filling the page with BRK insns. |
| 380 | * | ||
| 381 | * If we disable interrupts for all CPUs, then IPI stops working. | ||
| 382 | * Kinda breaks the global cache flushing. | ||
| 383 | */ | 380 | */ |
| 384 | local_irq_disable(); | 381 | memset((void *)init_begin, 0x00, init_end - init_begin); |
| 385 | 382 | flush_icache_range(init_begin, init_end); | |
| 386 | memset(__init_begin, 0x00, | ||
| 387 | (unsigned long)__init_end - (unsigned long)__init_begin); | ||
| 388 | |||
| 389 | flush_data_cache(); | ||
| 390 | asm volatile("sync" : : ); | ||
| 391 | flush_icache_range((unsigned long)__init_begin, (unsigned long)__init_end); | ||
| 392 | asm volatile("sync" : : ); | ||
| 393 | |||
| 394 | local_irq_enable(); | ||
| 395 | #endif | 383 | #endif |
| 396 | 384 | ||
| 397 | /* align __init_begin and __init_end to page size, | 385 | /* align __init_begin and __init_end to page size, |
| 398 | ignoring linker script where we might have tried to save RAM */ | 386 | ignoring linker script where we might have tried to save RAM */ |
| 399 | init_begin = PAGE_ALIGN((unsigned long)(__init_begin)); | 387 | init_begin = PAGE_ALIGN(init_begin); |
| 400 | init_end = PAGE_ALIGN((unsigned long)(__init_end)); | 388 | init_end = PAGE_ALIGN(init_end); |
| 401 | for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) { | 389 | for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) { |
| 402 | ClearPageReserved(virt_to_page(addr)); | 390 | ClearPageReserved(virt_to_page(addr)); |
| 403 | init_page_count(virt_to_page(addr)); | 391 | init_page_count(virt_to_page(addr)); |
| @@ -409,7 +397,8 @@ void free_initmem(void) | |||
| 409 | /* set up a new led state on systems shipped LED State panel */ | 397 | /* set up a new led state on systems shipped LED State panel */ |
| 410 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); | 398 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); |
| 411 | 399 | ||
| 412 | printk("%luk freed\n", (init_end - init_begin) >> 10); | 400 | printk(KERN_INFO "Freeing unused kernel memory: %luk freed\n", |
| 401 | (init_end - init_begin) >> 10); | ||
| 413 | } | 402 | } |
| 414 | 403 | ||
| 415 | 404 | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d1430ef6b4f9..738bdc6b0f8b 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -1913,25 +1913,26 @@ config DMAR_DEFAULT_ON | |||
| 1913 | recommended you say N here while the DMAR code remains | 1913 | recommended you say N here while the DMAR code remains |
| 1914 | experimental. | 1914 | experimental. |
| 1915 | 1915 | ||
| 1916 | config DMAR_GFX_WA | 1916 | config DMAR_BROKEN_GFX_WA |
| 1917 | def_bool y | 1917 | def_bool n |
| 1918 | prompt "Support for Graphics workaround" | 1918 | prompt "Workaround broken graphics drivers (going away soon)" |
| 1919 | depends on DMAR | 1919 | depends on DMAR |
| 1920 | ---help--- | 1920 | ---help--- |
| 1921 | Current Graphics drivers tend to use physical address | 1921 | Current Graphics drivers tend to use physical address |
| 1922 | for DMA and avoid using DMA APIs. Setting this config | 1922 | for DMA and avoid using DMA APIs. Setting this config |
| 1923 | option permits the IOMMU driver to set a unity map for | 1923 | option permits the IOMMU driver to set a unity map for |
| 1924 | all the OS-visible memory. Hence the driver can continue | 1924 | all the OS-visible memory. Hence the driver can continue |
| 1925 | to use physical addresses for DMA. | 1925 | to use physical addresses for DMA, at least until this |
| 1926 | option is removed in the 2.6.32 kernel. | ||
| 1926 | 1927 | ||
| 1927 | config DMAR_FLOPPY_WA | 1928 | config DMAR_FLOPPY_WA |
| 1928 | def_bool y | 1929 | def_bool y |
| 1929 | depends on DMAR | 1930 | depends on DMAR |
| 1930 | ---help--- | 1931 | ---help--- |
| 1931 | Floppy disk drivers are know to bypass DMA API calls | 1932 | Floppy disk drivers are known to bypass DMA API calls |
| 1932 | thereby failing to work when IOMMU is enabled. This | 1933 | thereby failing to work when IOMMU is enabled. This |
| 1933 | workaround will setup a 1:1 mapping for the first | 1934 | workaround will setup a 1:1 mapping for the first |
| 1934 | 16M to make floppy (an ISA device) work. | 1935 | 16MiB to make floppy (an ISA device) work. |
| 1935 | 1936 | ||
| 1936 | config INTR_REMAP | 1937 | config INTR_REMAP |
| 1937 | bool "Support for Interrupt Remapping (EXPERIMENTAL)" | 1938 | bool "Support for Interrupt Remapping (EXPERIMENTAL)" |
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 6c327b852e23..430d5b24af7b 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
| @@ -26,6 +26,8 @@ CFLAGS_tsc.o := $(nostackp) | |||
| 26 | CFLAGS_paravirt.o := $(nostackp) | 26 | CFLAGS_paravirt.o := $(nostackp) |
| 27 | GCOV_PROFILE_vsyscall_64.o := n | 27 | GCOV_PROFILE_vsyscall_64.o := n |
| 28 | GCOV_PROFILE_hpet.o := n | 28 | GCOV_PROFILE_hpet.o := n |
| 29 | GCOV_PROFILE_tsc.o := n | ||
| 30 | GCOV_PROFILE_paravirt.o := n | ||
| 29 | 31 | ||
| 30 | obj-y := process_$(BITS).o signal.o entry_$(BITS).o | 32 | obj-y := process_$(BITS).o signal.o entry_$(BITS).o |
| 31 | obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o | 33 | obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 47630479b067..1a041bcf506b 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
| @@ -211,11 +211,11 @@ static __init int iommu_setup(char *p) | |||
| 211 | #ifdef CONFIG_SWIOTLB | 211 | #ifdef CONFIG_SWIOTLB |
| 212 | if (!strncmp(p, "soft", 4)) | 212 | if (!strncmp(p, "soft", 4)) |
| 213 | swiotlb = 1; | 213 | swiotlb = 1; |
| 214 | #endif | ||
| 214 | if (!strncmp(p, "pt", 2)) { | 215 | if (!strncmp(p, "pt", 2)) { |
| 215 | iommu_pass_through = 1; | 216 | iommu_pass_through = 1; |
| 216 | return 1; | 217 | return 1; |
| 217 | } | 218 | } |
| 218 | #endif | ||
| 219 | 219 | ||
| 220 | gart_parse_options(p); | 220 | gart_parse_options(p); |
| 221 | 221 | ||
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index b26626dc517c..1014eb4bfc37 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
| @@ -68,6 +68,10 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
| 68 | unsigned long flags; | 68 | unsigned long flags; |
| 69 | struct resource *root; | 69 | struct resource *root; |
| 70 | int max_root_bus_resources = PCI_BUS_NUM_RESOURCES; | 70 | int max_root_bus_resources = PCI_BUS_NUM_RESOURCES; |
| 71 | u64 start, end; | ||
| 72 | |||
| 73 | if (bus_has_transparent_bridge(info->bus)) | ||
| 74 | max_root_bus_resources -= 3; | ||
| 71 | 75 | ||
| 72 | status = resource_to_addr(acpi_res, &addr); | 76 | status = resource_to_addr(acpi_res, &addr); |
| 73 | if (!ACPI_SUCCESS(status)) | 77 | if (!ACPI_SUCCESS(status)) |
| @@ -84,25 +88,24 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
| 84 | } else | 88 | } else |
| 85 | return AE_OK; | 89 | return AE_OK; |
| 86 | 90 | ||
| 87 | res = &info->res[info->res_num]; | 91 | start = addr.minimum + addr.translation_offset; |
| 88 | res->name = info->name; | 92 | end = start + addr.address_length - 1; |
| 89 | res->flags = flags; | ||
| 90 | res->start = addr.minimum + addr.translation_offset; | ||
| 91 | res->end = res->start + addr.address_length - 1; | ||
| 92 | res->child = NULL; | ||
| 93 | |||
| 94 | if (bus_has_transparent_bridge(info->bus)) | ||
| 95 | max_root_bus_resources -= 3; | ||
| 96 | if (info->res_num >= max_root_bus_resources) { | 93 | if (info->res_num >= max_root_bus_resources) { |
| 97 | printk(KERN_WARNING "PCI: Failed to allocate 0x%lx-0x%lx " | 94 | printk(KERN_WARNING "PCI: Failed to allocate 0x%lx-0x%lx " |
| 98 | "from %s for %s due to _CRS returning more than " | 95 | "from %s for %s due to _CRS returning more than " |
| 99 | "%d resource descriptors\n", (unsigned long) res->start, | 96 | "%d resource descriptors\n", (unsigned long) start, |
| 100 | (unsigned long) res->end, root->name, info->name, | 97 | (unsigned long) end, root->name, info->name, |
| 101 | max_root_bus_resources); | 98 | max_root_bus_resources); |
| 102 | info->res_num++; | ||
| 103 | return AE_OK; | 99 | return AE_OK; |
| 104 | } | 100 | } |
| 105 | 101 | ||
| 102 | res = &info->res[info->res_num]; | ||
| 103 | res->name = info->name; | ||
| 104 | res->flags = flags; | ||
| 105 | res->start = start; | ||
| 106 | res->end = end; | ||
| 107 | res->child = NULL; | ||
| 108 | |||
| 106 | if (insert_resource(root, res)) { | 109 | if (insert_resource(root, res)) { |
| 107 | printk(KERN_ERR "PCI: Failed to allocate 0x%lx-0x%lx " | 110 | printk(KERN_ERR "PCI: Failed to allocate 0x%lx-0x%lx " |
| 108 | "from %s for %s\n", (unsigned long) res->start, | 111 | "from %s for %s\n", (unsigned long) res->start, |
| @@ -115,23 +118,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
| 115 | } | 118 | } |
| 116 | 119 | ||
| 117 | static void | 120 | static void |
| 118 | adjust_transparent_bridge_resources(struct pci_bus *bus) | ||
| 119 | { | ||
| 120 | struct pci_dev *dev; | ||
| 121 | |||
| 122 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
| 123 | int i; | ||
| 124 | u16 class = dev->class >> 8; | ||
| 125 | |||
| 126 | if (class == PCI_CLASS_BRIDGE_PCI && dev->transparent) { | ||
| 127 | for(i = 3; i < PCI_BUS_NUM_RESOURCES; i++) | ||
| 128 | dev->subordinate->resource[i] = | ||
| 129 | dev->bus->resource[i - 3]; | ||
| 130 | } | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | static void | ||
| 135 | get_current_resources(struct acpi_device *device, int busnum, | 121 | get_current_resources(struct acpi_device *device, int busnum, |
| 136 | int domain, struct pci_bus *bus) | 122 | int domain, struct pci_bus *bus) |
| 137 | { | 123 | { |
| @@ -158,8 +144,6 @@ get_current_resources(struct acpi_device *device, int busnum, | |||
| 158 | info.res_num = 0; | 144 | info.res_num = 0; |
| 159 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, | 145 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, |
| 160 | &info); | 146 | &info); |
| 161 | if (info.res_num) | ||
| 162 | adjust_transparent_bridge_resources(bus); | ||
| 163 | 147 | ||
| 164 | return; | 148 | return; |
| 165 | 149 | ||
| @@ -222,8 +206,15 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
| 222 | */ | 206 | */ |
| 223 | memcpy(bus->sysdata, sd, sizeof(*sd)); | 207 | memcpy(bus->sysdata, sd, sizeof(*sd)); |
| 224 | kfree(sd); | 208 | kfree(sd); |
| 225 | } else | 209 | } else { |
| 226 | bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd); | 210 | bus = pci_create_bus(NULL, busnum, &pci_root_ops, sd); |
| 211 | if (bus) { | ||
| 212 | if (pci_probe & PCI_USE__CRS) | ||
| 213 | get_current_resources(device, busnum, domain, | ||
| 214 | bus); | ||
| 215 | bus->subordinate = pci_scan_child_bus(bus); | ||
| 216 | } | ||
| 217 | } | ||
| 227 | 218 | ||
| 228 | if (!bus) | 219 | if (!bus) |
| 229 | kfree(sd); | 220 | kfree(sd); |
| @@ -238,8 +229,6 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do | |||
| 238 | #endif | 229 | #endif |
| 239 | } | 230 | } |
| 240 | 231 | ||
| 241 | if (bus && (pci_probe & PCI_USE__CRS)) | ||
| 242 | get_current_resources(device, busnum, domain, bus); | ||
| 243 | return bus; | 232 | return bus; |
| 244 | } | 233 | } |
| 245 | 234 | ||
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c index f893d6a6e803..3ffa10df20b9 100644 --- a/arch/x86/pci/amd_bus.c +++ b/arch/x86/pci/amd_bus.c | |||
| @@ -100,8 +100,9 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b) | |||
| 100 | int j; | 100 | int j; |
| 101 | struct pci_root_info *info; | 101 | struct pci_root_info *info; |
| 102 | 102 | ||
| 103 | /* don't go for it if _CRS is used */ | 103 | /* don't go for it if _CRS is used already */ |
| 104 | if (pci_probe & PCI_USE__CRS) | 104 | if (b->resource[0] != &ioport_resource || |
| 105 | b->resource[1] != &iomem_resource) | ||
| 105 | return; | 106 | return; |
| 106 | 107 | ||
| 107 | /* if only one root bus, don't need to anything */ | 108 | /* if only one root bus, don't need to anything */ |
| @@ -116,6 +117,9 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b) | |||
| 116 | if (i == pci_root_num) | 117 | if (i == pci_root_num) |
| 117 | return; | 118 | return; |
| 118 | 119 | ||
| 120 | printk(KERN_DEBUG "PCI: peer root bus %02x res updated from pci conf\n", | ||
| 121 | b->number); | ||
| 122 | |||
| 119 | info = &pci_root_info[i]; | 123 | info = &pci_root_info[i]; |
| 120 | for (j = 0; j < info->res_num; j++) { | 124 | for (j = 0; j < info->res_num; j++) { |
| 121 | struct resource *res; | 125 | struct resource *res; |
