diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-12-12 03:09:03 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-12-12 03:09:03 -0500 |
| commit | 3459f0d78ffe27a1b341c22eb158b622eaaea3fc (patch) | |
| tree | 715b0575eec541d0181876ad367ca5480cdcecf3 /include | |
| parent | 9fc81d87420d0d3fd62d5e5529972c0ad9eab9cc (diff) | |
| parent | bee2782f30f66898be3f74ad02e4d1f87a969694 (diff) | |
Merge branch 'linus' into perf/urgent, to pick up the upstream merged bits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
107 files changed, 2723 insertions, 451 deletions
diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h index 01f227e14254..b59b5a52637e 100644 --- a/include/asm-generic/futex.h +++ b/include/asm-generic/futex.h | |||
| @@ -5,6 +5,119 @@ | |||
| 5 | #include <linux/uaccess.h> | 5 | #include <linux/uaccess.h> |
| 6 | #include <asm/errno.h> | 6 | #include <asm/errno.h> |
| 7 | 7 | ||
| 8 | #ifndef CONFIG_SMP | ||
| 9 | /* | ||
| 10 | * The following implementation only for uniprocessor machines. | ||
| 11 | * For UP, it's relies on the fact that pagefault_disable() also disables | ||
| 12 | * preemption to ensure mutual exclusion. | ||
| 13 | * | ||
| 14 | */ | ||
| 15 | |||
| 16 | /** | ||
| 17 | * futex_atomic_op_inuser() - Atomic arithmetic operation with constant | ||
| 18 | * argument and comparison of the previous | ||
| 19 | * futex value with another constant. | ||
| 20 | * | ||
| 21 | * @encoded_op: encoded operation to execute | ||
| 22 | * @uaddr: pointer to user space address | ||
| 23 | * | ||
| 24 | * Return: | ||
| 25 | * 0 - On success | ||
| 26 | * <0 - On error | ||
| 27 | */ | ||
| 28 | static inline int | ||
| 29 | futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) | ||
| 30 | { | ||
| 31 | int op = (encoded_op >> 28) & 7; | ||
| 32 | int cmp = (encoded_op >> 24) & 15; | ||
| 33 | int oparg = (encoded_op << 8) >> 20; | ||
| 34 | int cmparg = (encoded_op << 20) >> 20; | ||
| 35 | int oldval, ret; | ||
| 36 | u32 tmp; | ||
| 37 | |||
| 38 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
| 39 | oparg = 1 << oparg; | ||
| 40 | |||
| 41 | pagefault_disable(); | ||
| 42 | |||
| 43 | ret = -EFAULT; | ||
| 44 | if (unlikely(get_user(oldval, uaddr) != 0)) | ||
| 45 | goto out_pagefault_enable; | ||
| 46 | |||
| 47 | ret = 0; | ||
| 48 | tmp = oldval; | ||
| 49 | |||
| 50 | switch (op) { | ||
| 51 | case FUTEX_OP_SET: | ||
| 52 | tmp = oparg; | ||
| 53 | break; | ||
| 54 | case FUTEX_OP_ADD: | ||
| 55 | tmp += oparg; | ||
| 56 | break; | ||
| 57 | case FUTEX_OP_OR: | ||
| 58 | tmp |= oparg; | ||
| 59 | break; | ||
| 60 | case FUTEX_OP_ANDN: | ||
| 61 | tmp &= ~oparg; | ||
| 62 | break; | ||
| 63 | case FUTEX_OP_XOR: | ||
| 64 | tmp ^= oparg; | ||
| 65 | break; | ||
| 66 | default: | ||
| 67 | ret = -ENOSYS; | ||
| 68 | } | ||
| 69 | |||
| 70 | if (ret == 0 && unlikely(put_user(tmp, uaddr) != 0)) | ||
| 71 | ret = -EFAULT; | ||
| 72 | |||
| 73 | out_pagefault_enable: | ||
| 74 | pagefault_enable(); | ||
| 75 | |||
| 76 | if (ret == 0) { | ||
| 77 | switch (cmp) { | ||
| 78 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
| 79 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
| 80 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
| 81 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
| 82 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
| 83 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
| 84 | default: ret = -ENOSYS; | ||
| 85 | } | ||
| 86 | } | ||
| 87 | return ret; | ||
| 88 | } | ||
| 89 | |||
| 90 | /** | ||
| 91 | * futex_atomic_cmpxchg_inatomic() - Compare and exchange the content of the | ||
| 92 | * uaddr with newval if the current value is | ||
| 93 | * oldval. | ||
| 94 | * @uval: pointer to store content of @uaddr | ||
| 95 | * @uaddr: pointer to user space address | ||
| 96 | * @oldval: old value | ||
| 97 | * @newval: new value to store to @uaddr | ||
| 98 | * | ||
| 99 | * Return: | ||
| 100 | * 0 - On success | ||
| 101 | * <0 - On error | ||
| 102 | */ | ||
| 103 | static inline int | ||
| 104 | futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | ||
| 105 | u32 oldval, u32 newval) | ||
| 106 | { | ||
| 107 | u32 val; | ||
| 108 | |||
| 109 | if (unlikely(get_user(val, uaddr) != 0)) | ||
| 110 | return -EFAULT; | ||
| 111 | |||
| 112 | if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) | ||
| 113 | return -EFAULT; | ||
| 114 | |||
| 115 | *uval = val; | ||
| 116 | |||
| 117 | return 0; | ||
| 118 | } | ||
| 119 | |||
| 120 | #else | ||
| 8 | static inline int | 121 | static inline int |
| 9 | futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) | 122 | futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr) |
| 10 | { | 123 | { |
| @@ -54,4 +167,5 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
| 54 | return -ENOSYS; | 167 | return -ENOSYS; |
| 55 | } | 168 | } |
| 56 | 169 | ||
| 170 | #endif /* CONFIG_SMP */ | ||
| 57 | #endif | 171 | #endif |
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index b8fdc57a7335..9db042304df3 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #define __ASM_GENERIC_IO_H | 12 | #define __ASM_GENERIC_IO_H |
| 13 | 13 | ||
| 14 | #include <asm/page.h> /* I/O is all done through memory accesses */ | 14 | #include <asm/page.h> /* I/O is all done through memory accesses */ |
| 15 | #include <linux/string.h> /* for memset() and memcpy() */ | ||
| 15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 16 | 17 | ||
| 17 | #ifdef CONFIG_GENERIC_IOMAP | 18 | #ifdef CONFIG_GENERIC_IOMAP |
| @@ -24,260 +25,691 @@ | |||
| 24 | #define mmiowb() do {} while (0) | 25 | #define mmiowb() do {} while (0) |
| 25 | #endif | 26 | #endif |
| 26 | 27 | ||
| 27 | /*****************************************************************************/ | ||
| 28 | /* | 28 | /* |
| 29 | * readX/writeX() are used to access memory mapped devices. On some | 29 | * __raw_{read,write}{b,w,l,q}() access memory in native endianness. |
| 30 | * architectures the memory mapped IO stuff needs to be accessed | 30 | * |
| 31 | * differently. On the simple architectures, we just read/write the | 31 | * On some architectures memory mapped IO needs to be accessed differently. |
| 32 | * memory location directly. | 32 | * On the simple architectures, we just read/write the memory location |
| 33 | * directly. | ||
| 33 | */ | 34 | */ |
| 35 | |||
| 34 | #ifndef __raw_readb | 36 | #ifndef __raw_readb |
| 37 | #define __raw_readb __raw_readb | ||
| 35 | static inline u8 __raw_readb(const volatile void __iomem *addr) | 38 | static inline u8 __raw_readb(const volatile void __iomem *addr) |
| 36 | { | 39 | { |
| 37 | return *(const volatile u8 __force *) addr; | 40 | return *(const volatile u8 __force *)addr; |
| 38 | } | 41 | } |
| 39 | #endif | 42 | #endif |
| 40 | 43 | ||
| 41 | #ifndef __raw_readw | 44 | #ifndef __raw_readw |
| 45 | #define __raw_readw __raw_readw | ||
| 42 | static inline u16 __raw_readw(const volatile void __iomem *addr) | 46 | static inline u16 __raw_readw(const volatile void __iomem *addr) |
| 43 | { | 47 | { |
| 44 | return *(const volatile u16 __force *) addr; | 48 | return *(const volatile u16 __force *)addr; |
| 45 | } | 49 | } |
| 46 | #endif | 50 | #endif |
| 47 | 51 | ||
| 48 | #ifndef __raw_readl | 52 | #ifndef __raw_readl |
| 53 | #define __raw_readl __raw_readl | ||
| 49 | static inline u32 __raw_readl(const volatile void __iomem *addr) | 54 | static inline u32 __raw_readl(const volatile void __iomem *addr) |
| 50 | { | 55 | { |
| 51 | return *(const volatile u32 __force *) addr; | 56 | return *(const volatile u32 __force *)addr; |
| 52 | } | 57 | } |
| 53 | #endif | 58 | #endif |
| 54 | 59 | ||
| 55 | #define readb __raw_readb | 60 | #ifdef CONFIG_64BIT |
| 56 | 61 | #ifndef __raw_readq | |
| 57 | #define readw readw | 62 | #define __raw_readq __raw_readq |
| 58 | static inline u16 readw(const volatile void __iomem *addr) | 63 | static inline u64 __raw_readq(const volatile void __iomem *addr) |
| 59 | { | ||
| 60 | return __le16_to_cpu(__raw_readw(addr)); | ||
| 61 | } | ||
| 62 | |||
| 63 | #define readl readl | ||
| 64 | static inline u32 readl(const volatile void __iomem *addr) | ||
| 65 | { | 64 | { |
| 66 | return __le32_to_cpu(__raw_readl(addr)); | 65 | return *(const volatile u64 __force *)addr; |
| 67 | } | 66 | } |
| 67 | #endif | ||
| 68 | #endif /* CONFIG_64BIT */ | ||
| 68 | 69 | ||
| 69 | #ifndef __raw_writeb | 70 | #ifndef __raw_writeb |
| 70 | static inline void __raw_writeb(u8 b, volatile void __iomem *addr) | 71 | #define __raw_writeb __raw_writeb |
| 72 | static inline void __raw_writeb(u8 value, volatile void __iomem *addr) | ||
| 71 | { | 73 | { |
| 72 | *(volatile u8 __force *) addr = b; | 74 | *(volatile u8 __force *)addr = value; |
| 73 | } | 75 | } |
| 74 | #endif | 76 | #endif |
| 75 | 77 | ||
| 76 | #ifndef __raw_writew | 78 | #ifndef __raw_writew |
| 77 | static inline void __raw_writew(u16 b, volatile void __iomem *addr) | 79 | #define __raw_writew __raw_writew |
| 80 | static inline void __raw_writew(u16 value, volatile void __iomem *addr) | ||
| 78 | { | 81 | { |
| 79 | *(volatile u16 __force *) addr = b; | 82 | *(volatile u16 __force *)addr = value; |
| 80 | } | 83 | } |
| 81 | #endif | 84 | #endif |
| 82 | 85 | ||
| 83 | #ifndef __raw_writel | 86 | #ifndef __raw_writel |
| 84 | static inline void __raw_writel(u32 b, volatile void __iomem *addr) | 87 | #define __raw_writel __raw_writel |
| 88 | static inline void __raw_writel(u32 value, volatile void __iomem *addr) | ||
| 85 | { | 89 | { |
| 86 | *(volatile u32 __force *) addr = b; | 90 | *(volatile u32 __force *)addr = value; |
| 87 | } | 91 | } |
| 88 | #endif | 92 | #endif |
| 89 | 93 | ||
| 90 | #define writeb __raw_writeb | ||
| 91 | #define writew(b,addr) __raw_writew(__cpu_to_le16(b),addr) | ||
| 92 | #define writel(b,addr) __raw_writel(__cpu_to_le32(b),addr) | ||
| 93 | |||
| 94 | #ifdef CONFIG_64BIT | 94 | #ifdef CONFIG_64BIT |
| 95 | #ifndef __raw_readq | 95 | #ifndef __raw_writeq |
| 96 | static inline u64 __raw_readq(const volatile void __iomem *addr) | 96 | #define __raw_writeq __raw_writeq |
| 97 | static inline void __raw_writeq(u64 value, volatile void __iomem *addr) | ||
| 97 | { | 98 | { |
| 98 | return *(const volatile u64 __force *) addr; | 99 | *(volatile u64 __force *)addr = value; |
| 99 | } | 100 | } |
| 100 | #endif | 101 | #endif |
| 102 | #endif /* CONFIG_64BIT */ | ||
| 101 | 103 | ||
| 102 | #define readq readq | 104 | /* |
| 103 | static inline u64 readq(const volatile void __iomem *addr) | 105 | * {read,write}{b,w,l,q}() access little endian memory and return result in |
| 104 | { | 106 | * native endianness. |
| 105 | return __le64_to_cpu(__raw_readq(addr)); | 107 | */ |
| 106 | } | ||
| 107 | 108 | ||
| 108 | #ifndef __raw_writeq | 109 | #ifndef readb |
| 109 | static inline void __raw_writeq(u64 b, volatile void __iomem *addr) | 110 | #define readb readb |
| 111 | static inline u8 readb(const volatile void __iomem *addr) | ||
| 110 | { | 112 | { |
| 111 | *(volatile u64 __force *) addr = b; | 113 | return __raw_readb(addr); |
| 112 | } | 114 | } |
| 113 | #endif | 115 | #endif |
| 114 | 116 | ||
| 115 | #define writeq(b, addr) __raw_writeq(__cpu_to_le64(b), addr) | 117 | #ifndef readw |
| 116 | #endif /* CONFIG_64BIT */ | 118 | #define readw readw |
| 117 | 119 | static inline u16 readw(const volatile void __iomem *addr) | |
| 118 | #ifndef PCI_IOBASE | 120 | { |
| 119 | #define PCI_IOBASE ((void __iomem *) 0) | 121 | return __le16_to_cpu(__raw_readw(addr)); |
| 122 | } | ||
| 120 | #endif | 123 | #endif |
| 121 | 124 | ||
| 122 | /*****************************************************************************/ | 125 | #ifndef readl |
| 123 | /* | 126 | #define readl readl |
| 124 | * traditional input/output functions | 127 | static inline u32 readl(const volatile void __iomem *addr) |
| 125 | */ | ||
| 126 | |||
| 127 | static inline u8 inb(unsigned long addr) | ||
| 128 | { | 128 | { |
| 129 | return readb(addr + PCI_IOBASE); | 129 | return __le32_to_cpu(__raw_readl(addr)); |
| 130 | } | 130 | } |
| 131 | #endif | ||
| 131 | 132 | ||
| 132 | static inline u16 inw(unsigned long addr) | 133 | #ifdef CONFIG_64BIT |
| 134 | #ifndef readq | ||
| 135 | #define readq readq | ||
| 136 | static inline u64 readq(const volatile void __iomem *addr) | ||
| 133 | { | 137 | { |
| 134 | return readw(addr + PCI_IOBASE); | 138 | return __le64_to_cpu(__raw_readq(addr)); |
| 135 | } | 139 | } |
| 140 | #endif | ||
| 141 | #endif /* CONFIG_64BIT */ | ||
| 136 | 142 | ||
| 137 | static inline u32 inl(unsigned long addr) | 143 | #ifndef writeb |
| 144 | #define writeb writeb | ||
| 145 | static inline void writeb(u8 value, volatile void __iomem *addr) | ||
| 138 | { | 146 | { |
| 139 | return readl(addr + PCI_IOBASE); | 147 | __raw_writeb(value, addr); |
| 140 | } | 148 | } |
| 149 | #endif | ||
| 141 | 150 | ||
| 142 | static inline void outb(u8 b, unsigned long addr) | 151 | #ifndef writew |
| 152 | #define writew writew | ||
| 153 | static inline void writew(u16 value, volatile void __iomem *addr) | ||
| 143 | { | 154 | { |
| 144 | writeb(b, addr + PCI_IOBASE); | 155 | __raw_writew(cpu_to_le16(value), addr); |
| 145 | } | 156 | } |
| 157 | #endif | ||
| 146 | 158 | ||
| 147 | static inline void outw(u16 b, unsigned long addr) | 159 | #ifndef writel |
| 160 | #define writel writel | ||
| 161 | static inline void writel(u32 value, volatile void __iomem *addr) | ||
| 148 | { | 162 | { |
| 149 | writew(b, addr + PCI_IOBASE); | 163 | __raw_writel(__cpu_to_le32(value), addr); |
| 150 | } | 164 | } |
| 165 | #endif | ||
| 151 | 166 | ||
| 152 | static inline void outl(u32 b, unsigned long addr) | 167 | #ifdef CONFIG_64BIT |
| 168 | #ifndef writeq | ||
| 169 | #define writeq writeq | ||
| 170 | static inline void writeq(u64 value, volatile void __iomem *addr) | ||
| 153 | { | 171 | { |
| 154 | writel(b, addr + PCI_IOBASE); | 172 | __raw_writeq(__cpu_to_le64(value), addr); |
| 155 | } | 173 | } |
| 174 | #endif | ||
| 175 | #endif /* CONFIG_64BIT */ | ||
| 176 | |||
| 177 | /* | ||
| 178 | * {read,write}{b,w,l,q}_relaxed() are like the regular version, but | ||
| 179 | * are not guaranteed to provide ordering against spinlocks or memory | ||
| 180 | * accesses. | ||
| 181 | */ | ||
| 182 | #ifndef readb_relaxed | ||
| 183 | #define readb_relaxed readb | ||
| 184 | #endif | ||
| 156 | 185 | ||
| 157 | #define inb_p(addr) inb(addr) | 186 | #ifndef readw_relaxed |
| 158 | #define inw_p(addr) inw(addr) | 187 | #define readw_relaxed readw |
| 159 | #define inl_p(addr) inl(addr) | 188 | #endif |
| 160 | #define outb_p(x, addr) outb((x), (addr)) | ||
| 161 | #define outw_p(x, addr) outw((x), (addr)) | ||
| 162 | #define outl_p(x, addr) outl((x), (addr)) | ||
| 163 | 189 | ||
| 164 | #ifndef insb | 190 | #ifndef readl_relaxed |
| 165 | static inline void insb(unsigned long addr, void *buffer, int count) | 191 | #define readl_relaxed readl |
| 192 | #endif | ||
| 193 | |||
| 194 | #ifndef readq_relaxed | ||
| 195 | #define readq_relaxed readq | ||
| 196 | #endif | ||
| 197 | |||
| 198 | #ifndef writeb_relaxed | ||
| 199 | #define writeb_relaxed writeb | ||
| 200 | #endif | ||
| 201 | |||
| 202 | #ifndef writew_relaxed | ||
| 203 | #define writew_relaxed writew | ||
| 204 | #endif | ||
| 205 | |||
| 206 | #ifndef writel_relaxed | ||
| 207 | #define writel_relaxed writel | ||
| 208 | #endif | ||
| 209 | |||
| 210 | #ifndef writeq_relaxed | ||
| 211 | #define writeq_relaxed writeq | ||
| 212 | #endif | ||
| 213 | |||
| 214 | /* | ||
| 215 | * {read,write}s{b,w,l,q}() repeatedly access the same memory address in | ||
| 216 | * native endianness in 8-, 16-, 32- or 64-bit chunks (@count times). | ||
| 217 | */ | ||
| 218 | #ifndef readsb | ||
| 219 | #define readsb readsb | ||
| 220 | static inline void readsb(const volatile void __iomem *addr, void *buffer, | ||
| 221 | unsigned int count) | ||
| 166 | { | 222 | { |
| 167 | if (count) { | 223 | if (count) { |
| 168 | u8 *buf = buffer; | 224 | u8 *buf = buffer; |
| 225 | |||
| 169 | do { | 226 | do { |
| 170 | u8 x = __raw_readb(addr + PCI_IOBASE); | 227 | u8 x = __raw_readb(addr); |
| 171 | *buf++ = x; | 228 | *buf++ = x; |
| 172 | } while (--count); | 229 | } while (--count); |
| 173 | } | 230 | } |
| 174 | } | 231 | } |
| 175 | #endif | 232 | #endif |
| 176 | 233 | ||
| 177 | #ifndef insw | 234 | #ifndef readsw |
| 178 | static inline void insw(unsigned long addr, void *buffer, int count) | 235 | #define readsw readsw |
| 236 | static inline void readsw(const volatile void __iomem *addr, void *buffer, | ||
| 237 | unsigned int count) | ||
| 179 | { | 238 | { |
| 180 | if (count) { | 239 | if (count) { |
| 181 | u16 *buf = buffer; | 240 | u16 *buf = buffer; |
| 241 | |||
| 182 | do { | 242 | do { |
| 183 | u16 x = __raw_readw(addr + PCI_IOBASE); | 243 | u16 x = __raw_readw(addr); |
| 184 | *buf++ = x; | 244 | *buf++ = x; |
| 185 | } while (--count); | 245 | } while (--count); |
| 186 | } | 246 | } |
| 187 | } | 247 | } |
| 188 | #endif | 248 | #endif |
| 189 | 249 | ||
| 190 | #ifndef insl | 250 | #ifndef readsl |
| 191 | static inline void insl(unsigned long addr, void *buffer, int count) | 251 | #define readsl readsl |
| 252 | static inline void readsl(const volatile void __iomem *addr, void *buffer, | ||
| 253 | unsigned int count) | ||
| 192 | { | 254 | { |
| 193 | if (count) { | 255 | if (count) { |
| 194 | u32 *buf = buffer; | 256 | u32 *buf = buffer; |
| 257 | |||
| 195 | do { | 258 | do { |
| 196 | u32 x = __raw_readl(addr + PCI_IOBASE); | 259 | u32 x = __raw_readl(addr); |
| 197 | *buf++ = x; | 260 | *buf++ = x; |
| 198 | } while (--count); | 261 | } while (--count); |
| 199 | } | 262 | } |
| 200 | } | 263 | } |
| 201 | #endif | 264 | #endif |
| 202 | 265 | ||
| 203 | #ifndef outsb | 266 | #ifdef CONFIG_64BIT |
| 204 | static inline void outsb(unsigned long addr, const void *buffer, int count) | 267 | #ifndef readsq |
| 268 | #define readsq readsq | ||
| 269 | static inline void readsq(const volatile void __iomem *addr, void *buffer, | ||
| 270 | unsigned int count) | ||
| 271 | { | ||
| 272 | if (count) { | ||
| 273 | u64 *buf = buffer; | ||
| 274 | |||
| 275 | do { | ||
| 276 | u64 x = __raw_readq(addr); | ||
| 277 | *buf++ = x; | ||
| 278 | } while (--count); | ||
| 279 | } | ||
| 280 | } | ||
| 281 | #endif | ||
| 282 | #endif /* CONFIG_64BIT */ | ||
| 283 | |||
| 284 | #ifndef writesb | ||
| 285 | #define writesb writesb | ||
| 286 | static inline void writesb(volatile void __iomem *addr, const void *buffer, | ||
| 287 | unsigned int count) | ||
| 205 | { | 288 | { |
| 206 | if (count) { | 289 | if (count) { |
| 207 | const u8 *buf = buffer; | 290 | const u8 *buf = buffer; |
| 291 | |||
| 208 | do { | 292 | do { |
| 209 | __raw_writeb(*buf++, addr + PCI_IOBASE); | 293 | __raw_writeb(*buf++, addr); |
| 210 | } while (--count); | 294 | } while (--count); |
| 211 | } | 295 | } |
| 212 | } | 296 | } |
| 213 | #endif | 297 | #endif |
| 214 | 298 | ||
| 215 | #ifndef outsw | 299 | #ifndef writesw |
| 216 | static inline void outsw(unsigned long addr, const void *buffer, int count) | 300 | #define writesw writesw |
| 301 | static inline void writesw(volatile void __iomem *addr, const void *buffer, | ||
| 302 | unsigned int count) | ||
| 217 | { | 303 | { |
| 218 | if (count) { | 304 | if (count) { |
| 219 | const u16 *buf = buffer; | 305 | const u16 *buf = buffer; |
| 306 | |||
| 220 | do { | 307 | do { |
| 221 | __raw_writew(*buf++, addr + PCI_IOBASE); | 308 | __raw_writew(*buf++, addr); |
| 222 | } while (--count); | 309 | } while (--count); |
| 223 | } | 310 | } |
| 224 | } | 311 | } |
| 225 | #endif | 312 | #endif |
| 226 | 313 | ||
| 227 | #ifndef outsl | 314 | #ifndef writesl |
| 228 | static inline void outsl(unsigned long addr, const void *buffer, int count) | 315 | #define writesl writesl |
| 316 | static inline void writesl(volatile void __iomem *addr, const void *buffer, | ||
| 317 | unsigned int count) | ||
| 229 | { | 318 | { |
| 230 | if (count) { | 319 | if (count) { |
| 231 | const u32 *buf = buffer; | 320 | const u32 *buf = buffer; |
| 321 | |||
| 232 | do { | 322 | do { |
| 233 | __raw_writel(*buf++, addr + PCI_IOBASE); | 323 | __raw_writel(*buf++, addr); |
| 234 | } while (--count); | 324 | } while (--count); |
| 235 | } | 325 | } |
| 236 | } | 326 | } |
| 237 | #endif | 327 | #endif |
| 238 | 328 | ||
| 239 | #ifndef CONFIG_GENERIC_IOMAP | 329 | #ifdef CONFIG_64BIT |
| 240 | #define ioread8(addr) readb(addr) | 330 | #ifndef writesq |
| 241 | #define ioread16(addr) readw(addr) | 331 | #define writesq writesq |
| 242 | #define ioread16be(addr) __be16_to_cpu(__raw_readw(addr)) | 332 | static inline void writesq(volatile void __iomem *addr, const void *buffer, |
| 243 | #define ioread32(addr) readl(addr) | 333 | unsigned int count) |
| 244 | #define ioread32be(addr) __be32_to_cpu(__raw_readl(addr)) | 334 | { |
| 245 | 335 | if (count) { | |
| 246 | #define iowrite8(v, addr) writeb((v), (addr)) | 336 | const u64 *buf = buffer; |
| 247 | #define iowrite16(v, addr) writew((v), (addr)) | 337 | |
| 248 | #define iowrite16be(v, addr) __raw_writew(__cpu_to_be16(v), addr) | 338 | do { |
| 249 | #define iowrite32(v, addr) writel((v), (addr)) | 339 | __raw_writeq(*buf++, addr); |
| 250 | #define iowrite32be(v, addr) __raw_writel(__cpu_to_be32(v), addr) | 340 | } while (--count); |
| 251 | 341 | } | |
| 252 | #define ioread8_rep(p, dst, count) \ | 342 | } |
| 253 | insb((unsigned long) (p), (dst), (count)) | 343 | #endif |
| 254 | #define ioread16_rep(p, dst, count) \ | 344 | #endif /* CONFIG_64BIT */ |
| 255 | insw((unsigned long) (p), (dst), (count)) | 345 | |
| 256 | #define ioread32_rep(p, dst, count) \ | 346 | #ifndef PCI_IOBASE |
| 257 | insl((unsigned long) (p), (dst), (count)) | 347 | #define PCI_IOBASE ((void __iomem *)0) |
| 258 | 348 | #endif | |
| 259 | #define iowrite8_rep(p, src, count) \ | ||
| 260 | outsb((unsigned long) (p), (src), (count)) | ||
| 261 | #define iowrite16_rep(p, src, count) \ | ||
| 262 | outsw((unsigned long) (p), (src), (count)) | ||
| 263 | #define iowrite32_rep(p, src, count) \ | ||
| 264 | outsl((unsigned long) (p), (src), (count)) | ||
| 265 | #endif /* CONFIG_GENERIC_IOMAP */ | ||
| 266 | 349 | ||
| 267 | #ifndef IO_SPACE_LIMIT | 350 | #ifndef IO_SPACE_LIMIT |
| 268 | #define IO_SPACE_LIMIT 0xffff | 351 | #define IO_SPACE_LIMIT 0xffff |
| 269 | #endif | 352 | #endif |
| 270 | 353 | ||
| 354 | /* | ||
| 355 | * {in,out}{b,w,l}() access little endian I/O. {in,out}{b,w,l}_p() can be | ||
| 356 | * implemented on hardware that needs an additional delay for I/O accesses to | ||
| 357 | * take effect. | ||
| 358 | */ | ||
| 359 | |||
| 360 | #ifndef inb | ||
| 361 | #define inb inb | ||
| 362 | static inline u8 inb(unsigned long addr) | ||
| 363 | { | ||
| 364 | return readb(PCI_IOBASE + addr); | ||
| 365 | } | ||
| 366 | #endif | ||
| 367 | |||
| 368 | #ifndef inw | ||
| 369 | #define inw inw | ||
| 370 | static inline u16 inw(unsigned long addr) | ||
| 371 | { | ||
| 372 | return readw(PCI_IOBASE + addr); | ||
| 373 | } | ||
| 374 | #endif | ||
| 375 | |||
| 376 | #ifndef inl | ||
| 377 | #define inl inl | ||
| 378 | static inline u32 inl(unsigned long addr) | ||
| 379 | { | ||
| 380 | return readl(PCI_IOBASE + addr); | ||
| 381 | } | ||
| 382 | #endif | ||
| 383 | |||
| 384 | #ifndef outb | ||
| 385 | #define outb outb | ||
| 386 | static inline void outb(u8 value, unsigned long addr) | ||
| 387 | { | ||
| 388 | writeb(value, PCI_IOBASE + addr); | ||
| 389 | } | ||
| 390 | #endif | ||
| 391 | |||
| 392 | #ifndef outw | ||
| 393 | #define outw outw | ||
| 394 | static inline void outw(u16 value, unsigned long addr) | ||
| 395 | { | ||
| 396 | writew(value, PCI_IOBASE + addr); | ||
| 397 | } | ||
| 398 | #endif | ||
| 399 | |||
| 400 | #ifndef outl | ||
| 401 | #define outl outl | ||
| 402 | static inline void outl(u32 value, unsigned long addr) | ||
| 403 | { | ||
| 404 | writel(value, PCI_IOBASE + addr); | ||
| 405 | } | ||
| 406 | #endif | ||
| 407 | |||
| 408 | #ifndef inb_p | ||
| 409 | #define inb_p inb_p | ||
| 410 | static inline u8 inb_p(unsigned long addr) | ||
| 411 | { | ||
| 412 | return inb(addr); | ||
| 413 | } | ||
| 414 | #endif | ||
| 415 | |||
| 416 | #ifndef inw_p | ||
| 417 | #define inw_p inw_p | ||
| 418 | static inline u16 inw_p(unsigned long addr) | ||
| 419 | { | ||
| 420 | return inw(addr); | ||
| 421 | } | ||
| 422 | #endif | ||
| 423 | |||
| 424 | #ifndef inl_p | ||
| 425 | #define inl_p inl_p | ||
| 426 | static inline u32 inl_p(unsigned long addr) | ||
| 427 | { | ||
| 428 | return inl(addr); | ||
| 429 | } | ||
| 430 | #endif | ||
| 431 | |||
| 432 | #ifndef outb_p | ||
| 433 | #define outb_p outb_p | ||
| 434 | static inline void outb_p(u8 value, unsigned long addr) | ||
| 435 | { | ||
| 436 | outb(value, addr); | ||
| 437 | } | ||
| 438 | #endif | ||
| 439 | |||
| 440 | #ifndef outw_p | ||
| 441 | #define outw_p outw_p | ||
| 442 | static inline void outw_p(u16 value, unsigned long addr) | ||
| 443 | { | ||
| 444 | outw(value, addr); | ||
| 445 | } | ||
| 446 | #endif | ||
| 447 | |||
| 448 | #ifndef outl_p | ||
| 449 | #define outl_p outl_p | ||
| 450 | static inline void outl_p(u32 value, unsigned long addr) | ||
| 451 | { | ||
| 452 | outl(value, addr); | ||
| 453 | } | ||
| 454 | #endif | ||
| 455 | |||
| 456 | /* | ||
| 457 | * {in,out}s{b,w,l}{,_p}() are variants of the above that repeatedly access a | ||
| 458 | * single I/O port multiple times. | ||
| 459 | */ | ||
| 460 | |||
| 461 | #ifndef insb | ||
| 462 | #define insb insb | ||
| 463 | static inline void insb(unsigned long addr, void *buffer, unsigned int count) | ||
| 464 | { | ||
| 465 | readsb(PCI_IOBASE + addr, buffer, count); | ||
| 466 | } | ||
| 467 | #endif | ||
| 468 | |||
| 469 | #ifndef insw | ||
| 470 | #define insw insw | ||
| 471 | static inline void insw(unsigned long addr, void *buffer, unsigned int count) | ||
| 472 | { | ||
| 473 | readsw(PCI_IOBASE + addr, buffer, count); | ||
| 474 | } | ||
| 475 | #endif | ||
| 476 | |||
| 477 | #ifndef insl | ||
| 478 | #define insl insl | ||
| 479 | static inline void insl(unsigned long addr, void *buffer, unsigned int count) | ||
| 480 | { | ||
| 481 | readsl(PCI_IOBASE + addr, buffer, count); | ||
| 482 | } | ||
| 483 | #endif | ||
| 484 | |||
| 485 | #ifndef outsb | ||
| 486 | #define outsb outsb | ||
| 487 | static inline void outsb(unsigned long addr, const void *buffer, | ||
| 488 | unsigned int count) | ||
| 489 | { | ||
| 490 | writesb(PCI_IOBASE + addr, buffer, count); | ||
| 491 | } | ||
| 492 | #endif | ||
| 493 | |||
| 494 | #ifndef outsw | ||
| 495 | #define outsw outsw | ||
| 496 | static inline void outsw(unsigned long addr, const void *buffer, | ||
| 497 | unsigned int count) | ||
| 498 | { | ||
| 499 | writesw(PCI_IOBASE + addr, buffer, count); | ||
| 500 | } | ||
| 501 | #endif | ||
| 502 | |||
| 503 | #ifndef outsl | ||
| 504 | #define outsl outsl | ||
| 505 | static inline void outsl(unsigned long addr, const void *buffer, | ||
| 506 | unsigned int count) | ||
| 507 | { | ||
| 508 | writesl(PCI_IOBASE + addr, buffer, count); | ||
| 509 | } | ||
| 510 | #endif | ||
| 511 | |||
| 512 | #ifndef insb_p | ||
| 513 | #define insb_p insb_p | ||
| 514 | static inline void insb_p(unsigned long addr, void *buffer, unsigned int count) | ||
| 515 | { | ||
| 516 | insb(addr, buffer, count); | ||
| 517 | } | ||
| 518 | #endif | ||
| 519 | |||
| 520 | #ifndef insw_p | ||
| 521 | #define insw_p insw_p | ||
| 522 | static inline void insw_p(unsigned long addr, void *buffer, unsigned int count) | ||
| 523 | { | ||
| 524 | insw(addr, buffer, count); | ||
| 525 | } | ||
| 526 | #endif | ||
| 527 | |||
| 528 | #ifndef insl_p | ||
| 529 | #define insl_p insl_p | ||
| 530 | static inline void insl_p(unsigned long addr, void *buffer, unsigned int count) | ||
| 531 | { | ||
| 532 | insl(addr, buffer, count); | ||
| 533 | } | ||
| 534 | #endif | ||
| 535 | |||
| 536 | #ifndef outsb_p | ||
| 537 | #define outsb_p outsb_p | ||
| 538 | static inline void outsb_p(unsigned long addr, const void *buffer, | ||
| 539 | unsigned int count) | ||
| 540 | { | ||
| 541 | outsb(addr, buffer, count); | ||
| 542 | } | ||
| 543 | #endif | ||
| 544 | |||
| 545 | #ifndef outsw_p | ||
| 546 | #define outsw_p outsw_p | ||
| 547 | static inline void outsw_p(unsigned long addr, const void *buffer, | ||
| 548 | unsigned int count) | ||
| 549 | { | ||
| 550 | outsw(addr, buffer, count); | ||
| 551 | } | ||
| 552 | #endif | ||
| 553 | |||
| 554 | #ifndef outsl_p | ||
| 555 | #define outsl_p outsl_p | ||
| 556 | static inline void outsl_p(unsigned long addr, const void *buffer, | ||
| 557 | unsigned int count) | ||
| 558 | { | ||
| 559 | outsl(addr, buffer, count); | ||
| 560 | } | ||
| 561 | #endif | ||
| 562 | |||
| 563 | #ifndef CONFIG_GENERIC_IOMAP | ||
| 564 | #ifndef ioread8 | ||
| 565 | #define ioread8 ioread8 | ||
| 566 | static inline u8 ioread8(const volatile void __iomem *addr) | ||
| 567 | { | ||
| 568 | return readb(addr); | ||
| 569 | } | ||
| 570 | #endif | ||
| 571 | |||
| 572 | #ifndef ioread16 | ||
| 573 | #define ioread16 ioread16 | ||
| 574 | static inline u16 ioread16(const volatile void __iomem *addr) | ||
| 575 | { | ||
| 576 | return readw(addr); | ||
| 577 | } | ||
| 578 | #endif | ||
| 579 | |||
| 580 | #ifndef ioread32 | ||
| 581 | #define ioread32 ioread32 | ||
| 582 | static inline u32 ioread32(const volatile void __iomem *addr) | ||
| 583 | { | ||
| 584 | return readl(addr); | ||
| 585 | } | ||
| 586 | #endif | ||
| 587 | |||
| 588 | #ifndef iowrite8 | ||
| 589 | #define iowrite8 iowrite8 | ||
| 590 | static inline void iowrite8(u8 value, volatile void __iomem *addr) | ||
| 591 | { | ||
| 592 | writeb(value, addr); | ||
| 593 | } | ||
| 594 | #endif | ||
| 595 | |||
| 596 | #ifndef iowrite16 | ||
| 597 | #define iowrite16 iowrite16 | ||
| 598 | static inline void iowrite16(u16 value, volatile void __iomem *addr) | ||
| 599 | { | ||
| 600 | writew(value, addr); | ||
| 601 | } | ||
| 602 | #endif | ||
| 603 | |||
| 604 | #ifndef iowrite32 | ||
| 605 | #define iowrite32 iowrite32 | ||
| 606 | static inline void iowrite32(u32 value, volatile void __iomem *addr) | ||
| 607 | { | ||
| 608 | writel(value, addr); | ||
| 609 | } | ||
| 610 | #endif | ||
| 611 | |||
| 612 | #ifndef ioread16be | ||
| 613 | #define ioread16be ioread16be | ||
| 614 | static inline u16 ioread16be(const volatile void __iomem *addr) | ||
| 615 | { | ||
| 616 | return __be16_to_cpu(__raw_readw(addr)); | ||
| 617 | } | ||
| 618 | #endif | ||
| 619 | |||
| 620 | #ifndef ioread32be | ||
| 621 | #define ioread32be ioread32be | ||
| 622 | static inline u32 ioread32be(const volatile void __iomem *addr) | ||
| 623 | { | ||
| 624 | return __be32_to_cpu(__raw_readl(addr)); | ||
| 625 | } | ||
| 626 | #endif | ||
| 627 | |||
| 628 | #ifndef iowrite16be | ||
| 629 | #define iowrite16be iowrite16be | ||
| 630 | static inline void iowrite16be(u16 value, void volatile __iomem *addr) | ||
| 631 | { | ||
| 632 | __raw_writew(__cpu_to_be16(value), addr); | ||
| 633 | } | ||
| 634 | #endif | ||
| 635 | |||
| 636 | #ifndef iowrite32be | ||
| 637 | #define iowrite32be iowrite32be | ||
| 638 | static inline void iowrite32be(u32 value, volatile void __iomem *addr) | ||
| 639 | { | ||
| 640 | __raw_writel(__cpu_to_be32(value), addr); | ||
| 641 | } | ||
| 642 | #endif | ||
| 643 | |||
| 644 | #ifndef ioread8_rep | ||
| 645 | #define ioread8_rep ioread8_rep | ||
| 646 | static inline void ioread8_rep(const volatile void __iomem *addr, void *buffer, | ||
| 647 | unsigned int count) | ||
| 648 | { | ||
| 649 | readsb(addr, buffer, count); | ||
| 650 | } | ||
| 651 | #endif | ||
| 652 | |||
| 653 | #ifndef ioread16_rep | ||
| 654 | #define ioread16_rep ioread16_rep | ||
| 655 | static inline void ioread16_rep(const volatile void __iomem *addr, | ||
| 656 | void *buffer, unsigned int count) | ||
| 657 | { | ||
| 658 | readsw(addr, buffer, count); | ||
| 659 | } | ||
| 660 | #endif | ||
| 661 | |||
| 662 | #ifndef ioread32_rep | ||
| 663 | #define ioread32_rep ioread32_rep | ||
| 664 | static inline void ioread32_rep(const volatile void __iomem *addr, | ||
| 665 | void *buffer, unsigned int count) | ||
| 666 | { | ||
| 667 | readsl(addr, buffer, count); | ||
| 668 | } | ||
| 669 | #endif | ||
| 670 | |||
| 671 | #ifndef iowrite8_rep | ||
| 672 | #define iowrite8_rep iowrite8_rep | ||
| 673 | static inline void iowrite8_rep(volatile void __iomem *addr, | ||
| 674 | const void *buffer, | ||
| 675 | unsigned int count) | ||
| 676 | { | ||
| 677 | writesb(addr, buffer, count); | ||
| 678 | } | ||
| 679 | #endif | ||
| 680 | |||
| 681 | #ifndef iowrite16_rep | ||
| 682 | #define iowrite16_rep iowrite16_rep | ||
| 683 | static inline void iowrite16_rep(volatile void __iomem *addr, | ||
| 684 | const void *buffer, | ||
| 685 | unsigned int count) | ||
| 686 | { | ||
| 687 | writesw(addr, buffer, count); | ||
| 688 | } | ||
| 689 | #endif | ||
| 690 | |||
| 691 | #ifndef iowrite32_rep | ||
| 692 | #define iowrite32_rep iowrite32_rep | ||
| 693 | static inline void iowrite32_rep(volatile void __iomem *addr, | ||
| 694 | const void *buffer, | ||
| 695 | unsigned int count) | ||
| 696 | { | ||
| 697 | writesl(addr, buffer, count); | ||
| 698 | } | ||
| 699 | #endif | ||
| 700 | #endif /* CONFIG_GENERIC_IOMAP */ | ||
| 701 | |||
| 271 | #ifdef __KERNEL__ | 702 | #ifdef __KERNEL__ |
| 272 | 703 | ||
| 273 | #include <linux/vmalloc.h> | 704 | #include <linux/vmalloc.h> |
| 274 | #define __io_virt(x) ((void __force *) (x)) | 705 | #define __io_virt(x) ((void __force *)(x)) |
| 275 | 706 | ||
| 276 | #ifndef CONFIG_GENERIC_IOMAP | 707 | #ifndef CONFIG_GENERIC_IOMAP |
| 277 | struct pci_dev; | 708 | struct pci_dev; |
| 278 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | 709 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); |
| 279 | 710 | ||
| 280 | #ifndef pci_iounmap | 711 | #ifndef pci_iounmap |
| 712 | #define pci_iounmap pci_iounmap | ||
| 281 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) | 713 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) |
| 282 | { | 714 | { |
| 283 | } | 715 | } |
| @@ -289,11 +721,15 @@ static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p) | |||
| 289 | * These are pretty trivial | 721 | * These are pretty trivial |
| 290 | */ | 722 | */ |
| 291 | #ifndef virt_to_phys | 723 | #ifndef virt_to_phys |
| 724 | #define virt_to_phys virt_to_phys | ||
| 292 | static inline unsigned long virt_to_phys(volatile void *address) | 725 | static inline unsigned long virt_to_phys(volatile void *address) |
| 293 | { | 726 | { |
| 294 | return __pa((unsigned long)address); | 727 | return __pa((unsigned long)address); |
| 295 | } | 728 | } |
| 729 | #endif | ||
| 296 | 730 | ||
| 731 | #ifndef phys_to_virt | ||
| 732 | #define phys_to_virt phys_to_virt | ||
| 297 | static inline void *phys_to_virt(unsigned long address) | 733 | static inline void *phys_to_virt(unsigned long address) |
| 298 | { | 734 | { |
| 299 | return __va(address); | 735 | return __va(address); |
| @@ -306,37 +742,65 @@ static inline void *phys_to_virt(unsigned long address) | |||
| 306 | * This implementation is for the no-MMU case only... if you have an MMU | 742 | * This implementation is for the no-MMU case only... if you have an MMU |
| 307 | * you'll need to provide your own definitions. | 743 | * you'll need to provide your own definitions. |
| 308 | */ | 744 | */ |
| 745 | |||
| 309 | #ifndef CONFIG_MMU | 746 | #ifndef CONFIG_MMU |
| 310 | static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) | 747 | #ifndef ioremap |
| 748 | #define ioremap ioremap | ||
| 749 | static inline void __iomem *ioremap(phys_addr_t offset, size_t size) | ||
| 311 | { | 750 | { |
| 312 | return (void __iomem*) (unsigned long)offset; | 751 | return (void __iomem *)(unsigned long)offset; |
| 313 | } | 752 | } |
| 753 | #endif | ||
| 314 | 754 | ||
| 315 | #define __ioremap(offset, size, flags) ioremap(offset, size) | 755 | #ifndef __ioremap |
| 756 | #define __ioremap __ioremap | ||
| 757 | static inline void __iomem *__ioremap(phys_addr_t offset, size_t size, | ||
| 758 | unsigned long flags) | ||
| 759 | { | ||
| 760 | return ioremap(offset, size); | ||
| 761 | } | ||
| 762 | #endif | ||
| 316 | 763 | ||
| 317 | #ifndef ioremap_nocache | 764 | #ifndef ioremap_nocache |
| 318 | #define ioremap_nocache ioremap | 765 | #define ioremap_nocache ioremap_nocache |
| 766 | static inline void __iomem *ioremap_nocache(phys_addr_t offset, size_t size) | ||
| 767 | { | ||
| 768 | return ioremap(offset, size); | ||
| 769 | } | ||
| 319 | #endif | 770 | #endif |
| 320 | 771 | ||
| 321 | #ifndef ioremap_wc | 772 | #ifndef ioremap_wc |
| 322 | #define ioremap_wc ioremap_nocache | 773 | #define ioremap_wc ioremap_wc |
| 774 | static inline void __iomem *ioremap_wc(phys_addr_t offset, size_t size) | ||
| 775 | { | ||
| 776 | return ioremap_nocache(offset, size); | ||
| 777 | } | ||
| 323 | #endif | 778 | #endif |
| 324 | 779 | ||
| 780 | #ifndef iounmap | ||
| 781 | #define iounmap iounmap | ||
| 325 | static inline void iounmap(void __iomem *addr) | 782 | static inline void iounmap(void __iomem *addr) |
| 326 | { | 783 | { |
| 327 | } | 784 | } |
| 785 | #endif | ||
| 328 | #endif /* CONFIG_MMU */ | 786 | #endif /* CONFIG_MMU */ |
| 329 | 787 | ||
| 330 | #ifdef CONFIG_HAS_IOPORT_MAP | 788 | #ifdef CONFIG_HAS_IOPORT_MAP |
| 331 | #ifndef CONFIG_GENERIC_IOMAP | 789 | #ifndef CONFIG_GENERIC_IOMAP |
| 790 | #ifndef ioport_map | ||
| 791 | #define ioport_map ioport_map | ||
| 332 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) | 792 | static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) |
| 333 | { | 793 | { |
| 334 | return PCI_IOBASE + (port & IO_SPACE_LIMIT); | 794 | return PCI_IOBASE + (port & IO_SPACE_LIMIT); |
| 335 | } | 795 | } |
| 796 | #endif | ||
| 336 | 797 | ||
| 798 | #ifndef ioport_unmap | ||
| 799 | #define ioport_unmap ioport_unmap | ||
| 337 | static inline void ioport_unmap(void __iomem *p) | 800 | static inline void ioport_unmap(void __iomem *p) |
| 338 | { | 801 | { |
| 339 | } | 802 | } |
| 803 | #endif | ||
| 340 | #else /* CONFIG_GENERIC_IOMAP */ | 804 | #else /* CONFIG_GENERIC_IOMAP */ |
| 341 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | 805 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); |
| 342 | extern void ioport_unmap(void __iomem *p); | 806 | extern void ioport_unmap(void __iomem *p); |
| @@ -344,35 +808,68 @@ extern void ioport_unmap(void __iomem *p); | |||
| 344 | #endif /* CONFIG_HAS_IOPORT_MAP */ | 808 | #endif /* CONFIG_HAS_IOPORT_MAP */ |
| 345 | 809 | ||
| 346 | #ifndef xlate_dev_kmem_ptr | 810 | #ifndef xlate_dev_kmem_ptr |
| 347 | #define xlate_dev_kmem_ptr(p) p | 811 | #define xlate_dev_kmem_ptr xlate_dev_kmem_ptr |
| 812 | static inline void *xlate_dev_kmem_ptr(void *addr) | ||
| 813 | { | ||
| 814 | return addr; | ||
| 815 | } | ||
| 348 | #endif | 816 | #endif |
| 817 | |||
| 349 | #ifndef xlate_dev_mem_ptr | 818 | #ifndef xlate_dev_mem_ptr |
| 350 | #define xlate_dev_mem_ptr(p) __va(p) | 819 | #define xlate_dev_mem_ptr xlate_dev_mem_ptr |
| 820 | static inline void *xlate_dev_mem_ptr(phys_addr_t addr) | ||
| 821 | { | ||
| 822 | return __va(addr); | ||
| 823 | } | ||
| 824 | #endif | ||
| 825 | |||
| 826 | #ifndef unxlate_dev_mem_ptr | ||
| 827 | #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr | ||
| 828 | static inline void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) | ||
| 829 | { | ||
| 830 | } | ||
| 351 | #endif | 831 | #endif |
| 352 | 832 | ||
| 353 | #ifdef CONFIG_VIRT_TO_BUS | 833 | #ifdef CONFIG_VIRT_TO_BUS |
| 354 | #ifndef virt_to_bus | 834 | #ifndef virt_to_bus |
| 355 | static inline unsigned long virt_to_bus(volatile void *address) | 835 | static inline unsigned long virt_to_bus(void *address) |
| 356 | { | 836 | { |
| 357 | return ((unsigned long) address); | 837 | return (unsigned long)address; |
| 358 | } | 838 | } |
| 359 | 839 | ||
| 360 | static inline void *bus_to_virt(unsigned long address) | 840 | static inline void *bus_to_virt(unsigned long address) |
| 361 | { | 841 | { |
| 362 | return (void *) address; | 842 | return (void *)address; |
| 363 | } | 843 | } |
| 364 | #endif | 844 | #endif |
| 365 | #endif | 845 | #endif |
| 366 | 846 | ||
| 367 | #ifndef memset_io | 847 | #ifndef memset_io |
| 368 | #define memset_io(a, b, c) memset(__io_virt(a), (b), (c)) | 848 | #define memset_io memset_io |
| 849 | static inline void memset_io(volatile void __iomem *addr, int value, | ||
| 850 | size_t size) | ||
| 851 | { | ||
| 852 | memset(__io_virt(addr), value, size); | ||
| 853 | } | ||
| 369 | #endif | 854 | #endif |
| 370 | 855 | ||
| 371 | #ifndef memcpy_fromio | 856 | #ifndef memcpy_fromio |
| 372 | #define memcpy_fromio(a, b, c) memcpy((a), __io_virt(b), (c)) | 857 | #define memcpy_fromio memcpy_fromio |
| 858 | static inline void memcpy_fromio(void *buffer, | ||
| 859 | const volatile void __iomem *addr, | ||
| 860 | size_t size) | ||
| 861 | { | ||
| 862 | memcpy(buffer, __io_virt(addr), size); | ||
| 863 | } | ||
| 373 | #endif | 864 | #endif |
| 865 | |||
| 374 | #ifndef memcpy_toio | 866 | #ifndef memcpy_toio |
| 375 | #define memcpy_toio(a, b, c) memcpy(__io_virt(a), (b), (c)) | 867 | #define memcpy_toio memcpy_toio |
| 868 | static inline void memcpy_toio(volatile void __iomem *addr, const void *buffer, | ||
| 869 | size_t size) | ||
| 870 | { | ||
| 871 | memcpy(__io_virt(addr), buffer, size); | ||
| 872 | } | ||
| 376 | #endif | 873 | #endif |
| 377 | 874 | ||
| 378 | #endif /* __KERNEL__ */ | 875 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-generic/seccomp.h b/include/asm-generic/seccomp.h new file mode 100644 index 000000000000..9fa1f653ed3b --- /dev/null +++ b/include/asm-generic/seccomp.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-generic/seccomp.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Linaro Limited | ||
| 5 | * Author: AKASHI Takahiro <takahiro.akashi@linaro.org> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #ifndef _ASM_GENERIC_SECCOMP_H | ||
| 12 | #define _ASM_GENERIC_SECCOMP_H | ||
| 13 | |||
| 14 | #include <linux/unistd.h> | ||
| 15 | |||
| 16 | #if defined(CONFIG_COMPAT) && !defined(__NR_seccomp_read_32) | ||
| 17 | #define __NR_seccomp_read_32 __NR_read | ||
| 18 | #define __NR_seccomp_write_32 __NR_write | ||
| 19 | #define __NR_seccomp_exit_32 __NR_exit | ||
| 20 | #define __NR_seccomp_sigreturn_32 __NR_rt_sigreturn | ||
| 21 | #endif /* CONFIG_COMPAT && ! already defined */ | ||
| 22 | |||
| 23 | #define __NR_seccomp_read __NR_read | ||
| 24 | #define __NR_seccomp_write __NR_write | ||
| 25 | #define __NR_seccomp_exit __NR_exit | ||
| 26 | #ifndef __NR_seccomp_sigreturn | ||
| 27 | #define __NR_seccomp_sigreturn __NR_rt_sigreturn | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #endif /* _ASM_GENERIC_SECCOMP_H */ | ||
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 5672d7ea1fa0..08848050922e 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
| @@ -96,10 +96,9 @@ struct mmu_gather { | |||
| 96 | #endif | 96 | #endif |
| 97 | unsigned long start; | 97 | unsigned long start; |
| 98 | unsigned long end; | 98 | unsigned long end; |
| 99 | unsigned int need_flush : 1, /* Did free PTEs */ | ||
| 100 | /* we are in the middle of an operation to clear | 99 | /* we are in the middle of an operation to clear |
| 101 | * a full mm and can make some optimizations */ | 100 | * a full mm and can make some optimizations */ |
| 102 | fullmm : 1, | 101 | unsigned int fullmm : 1, |
| 103 | /* we have performed an operation which | 102 | /* we have performed an operation which |
| 104 | * requires a complete flush of the tlb */ | 103 | * requires a complete flush of the tlb */ |
| 105 | need_flush_all : 1; | 104 | need_flush_all : 1; |
| @@ -128,16 +127,54 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
| 128 | tlb_flush_mmu(tlb); | 127 | tlb_flush_mmu(tlb); |
| 129 | } | 128 | } |
| 130 | 129 | ||
| 130 | static inline void __tlb_adjust_range(struct mmu_gather *tlb, | ||
| 131 | unsigned long address) | ||
| 132 | { | ||
| 133 | tlb->start = min(tlb->start, address); | ||
| 134 | tlb->end = max(tlb->end, address + PAGE_SIZE); | ||
| 135 | } | ||
| 136 | |||
| 137 | static inline void __tlb_reset_range(struct mmu_gather *tlb) | ||
| 138 | { | ||
| 139 | tlb->start = TASK_SIZE; | ||
| 140 | tlb->end = 0; | ||
| 141 | } | ||
| 142 | |||
| 143 | /* | ||
| 144 | * In the case of tlb vma handling, we can optimise these away in the | ||
| 145 | * case where we're doing a full MM flush. When we're doing a munmap, | ||
| 146 | * the vmas are adjusted to only cover the region to be torn down. | ||
| 147 | */ | ||
| 148 | #ifndef tlb_start_vma | ||
| 149 | #define tlb_start_vma(tlb, vma) do { } while (0) | ||
| 150 | #endif | ||
| 151 | |||
| 152 | #define __tlb_end_vma(tlb, vma) \ | ||
| 153 | do { \ | ||
| 154 | if (!tlb->fullmm && tlb->end) { \ | ||
| 155 | tlb_flush(tlb); \ | ||
| 156 | __tlb_reset_range(tlb); \ | ||
| 157 | } \ | ||
| 158 | } while (0) | ||
| 159 | |||
| 160 | #ifndef tlb_end_vma | ||
| 161 | #define tlb_end_vma __tlb_end_vma | ||
| 162 | #endif | ||
| 163 | |||
| 164 | #ifndef __tlb_remove_tlb_entry | ||
| 165 | #define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0) | ||
| 166 | #endif | ||
| 167 | |||
| 131 | /** | 168 | /** |
| 132 | * tlb_remove_tlb_entry - remember a pte unmapping for later tlb invalidation. | 169 | * tlb_remove_tlb_entry - remember a pte unmapping for later tlb invalidation. |
| 133 | * | 170 | * |
| 134 | * Record the fact that pte's were really umapped in ->need_flush, so we can | 171 | * Record the fact that pte's were really unmapped by updating the range, |
| 135 | * later optimise away the tlb invalidate. This helps when userspace is | 172 | * so we can later optimise away the tlb invalidate. This helps when |
| 136 | * unmapping already-unmapped pages, which happens quite a lot. | 173 | * userspace is unmapping already-unmapped pages, which happens quite a lot. |
| 137 | */ | 174 | */ |
| 138 | #define tlb_remove_tlb_entry(tlb, ptep, address) \ | 175 | #define tlb_remove_tlb_entry(tlb, ptep, address) \ |
| 139 | do { \ | 176 | do { \ |
| 140 | tlb->need_flush = 1; \ | 177 | __tlb_adjust_range(tlb, address); \ |
| 141 | __tlb_remove_tlb_entry(tlb, ptep, address); \ | 178 | __tlb_remove_tlb_entry(tlb, ptep, address); \ |
| 142 | } while (0) | 179 | } while (0) |
| 143 | 180 | ||
| @@ -151,27 +188,27 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
| 151 | 188 | ||
| 152 | #define tlb_remove_pmd_tlb_entry(tlb, pmdp, address) \ | 189 | #define tlb_remove_pmd_tlb_entry(tlb, pmdp, address) \ |
| 153 | do { \ | 190 | do { \ |
| 154 | tlb->need_flush = 1; \ | 191 | __tlb_adjust_range(tlb, address); \ |
| 155 | __tlb_remove_pmd_tlb_entry(tlb, pmdp, address); \ | 192 | __tlb_remove_pmd_tlb_entry(tlb, pmdp, address); \ |
| 156 | } while (0) | 193 | } while (0) |
| 157 | 194 | ||
| 158 | #define pte_free_tlb(tlb, ptep, address) \ | 195 | #define pte_free_tlb(tlb, ptep, address) \ |
| 159 | do { \ | 196 | do { \ |
| 160 | tlb->need_flush = 1; \ | 197 | __tlb_adjust_range(tlb, address); \ |
| 161 | __pte_free_tlb(tlb, ptep, address); \ | 198 | __pte_free_tlb(tlb, ptep, address); \ |
| 162 | } while (0) | 199 | } while (0) |
| 163 | 200 | ||
| 164 | #ifndef __ARCH_HAS_4LEVEL_HACK | 201 | #ifndef __ARCH_HAS_4LEVEL_HACK |
| 165 | #define pud_free_tlb(tlb, pudp, address) \ | 202 | #define pud_free_tlb(tlb, pudp, address) \ |
| 166 | do { \ | 203 | do { \ |
| 167 | tlb->need_flush = 1; \ | 204 | __tlb_adjust_range(tlb, address); \ |
| 168 | __pud_free_tlb(tlb, pudp, address); \ | 205 | __pud_free_tlb(tlb, pudp, address); \ |
| 169 | } while (0) | 206 | } while (0) |
| 170 | #endif | 207 | #endif |
| 171 | 208 | ||
| 172 | #define pmd_free_tlb(tlb, pmdp, address) \ | 209 | #define pmd_free_tlb(tlb, pmdp, address) \ |
| 173 | do { \ | 210 | do { \ |
| 174 | tlb->need_flush = 1; \ | 211 | __tlb_adjust_range(tlb, address); \ |
| 175 | __pmd_free_tlb(tlb, pmdp, address); \ | 212 | __pmd_free_tlb(tlb, pmdp, address); \ |
| 176 | } while (0) | 213 | } while (0) |
| 177 | 214 | ||
diff --git a/include/dt-bindings/arm/ux500_pm_domains.h b/include/dt-bindings/arm/ux500_pm_domains.h new file mode 100644 index 000000000000..398a6c0288d1 --- /dev/null +++ b/include/dt-bindings/arm/ux500_pm_domains.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Linaro Ltd. | ||
| 3 | * | ||
| 4 | * Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
| 5 | * License terms: GNU General Public License (GPL) version 2 | ||
| 6 | */ | ||
| 7 | #ifndef _DT_BINDINGS_ARM_UX500_PM_DOMAINS_H | ||
| 8 | #define _DT_BINDINGS_ARM_UX500_PM_DOMAINS_H | ||
| 9 | |||
| 10 | #define DOMAIN_VAPE 0 | ||
| 11 | |||
| 12 | /* Number of PM domains. */ | ||
| 13 | #define NR_DOMAINS (DOMAIN_VAPE + 1) | ||
| 14 | |||
| 15 | #endif | ||
diff --git a/include/dt-bindings/clock/imx5-clock.h b/include/dt-bindings/clock/imx5-clock.h index 5f2667ecd98e..f4b7478e23c8 100644 --- a/include/dt-bindings/clock/imx5-clock.h +++ b/include/dt-bindings/clock/imx5-clock.h | |||
| @@ -198,6 +198,9 @@ | |||
| 198 | #define IMX5_CLK_OCRAM 186 | 198 | #define IMX5_CLK_OCRAM 186 |
| 199 | #define IMX5_CLK_SAHARA_IPG_GATE 187 | 199 | #define IMX5_CLK_SAHARA_IPG_GATE 187 |
| 200 | #define IMX5_CLK_SATA_REF 188 | 200 | #define IMX5_CLK_SATA_REF 188 |
| 201 | #define IMX5_CLK_END 189 | 201 | #define IMX5_CLK_STEP_SEL 189 |
| 202 | #define IMX5_CLK_CPU_PODF_SEL 190 | ||
| 203 | #define IMX5_CLK_ARM 191 | ||
| 204 | #define IMX5_CLK_END 192 | ||
| 202 | 205 | ||
| 203 | #endif /* __DT_BINDINGS_CLOCK_IMX5_H */ | 206 | #endif /* __DT_BINDINGS_CLOCK_IMX5_H */ |
diff --git a/include/dt-bindings/clock/qcom,mmcc-apq8084.h b/include/dt-bindings/clock/qcom,mmcc-apq8084.h index a929f86d0ddd..d72b5b35f15e 100644 --- a/include/dt-bindings/clock/qcom,mmcc-apq8084.h +++ b/include/dt-bindings/clock/qcom,mmcc-apq8084.h | |||
| @@ -60,7 +60,7 @@ | |||
| 60 | #define ESC1_CLK_SRC 43 | 60 | #define ESC1_CLK_SRC 43 |
| 61 | #define HDMI_CLK_SRC 44 | 61 | #define HDMI_CLK_SRC 44 |
| 62 | #define VSYNC_CLK_SRC 45 | 62 | #define VSYNC_CLK_SRC 45 |
| 63 | #define RBCPR_CLK_SRC 46 | 63 | #define MMSS_RBCPR_CLK_SRC 46 |
| 64 | #define RBBMTIMER_CLK_SRC 47 | 64 | #define RBBMTIMER_CLK_SRC 47 |
| 65 | #define MAPLE_CLK_SRC 48 | 65 | #define MAPLE_CLK_SRC 48 |
| 66 | #define VDP_CLK_SRC 49 | 66 | #define VDP_CLK_SRC 49 |
diff --git a/include/dt-bindings/clock/r8a7740-clock.h b/include/dt-bindings/clock/r8a7740-clock.h index f6b4b0fe7a43..476135da0f23 100644 --- a/include/dt-bindings/clock/r8a7740-clock.h +++ b/include/dt-bindings/clock/r8a7740-clock.h | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | /* MSTP2 */ | 41 | /* MSTP2 */ |
| 42 | #define R8A7740_CLK_SCIFA6 30 | 42 | #define R8A7740_CLK_SCIFA6 30 |
| 43 | #define R8A7740_CLK_INTCA 29 | ||
| 43 | #define R8A7740_CLK_SCIFA7 22 | 44 | #define R8A7740_CLK_SCIFA7 22 |
| 44 | #define R8A7740_CLK_DMAC1 18 | 45 | #define R8A7740_CLK_DMAC1 18 |
| 45 | #define R8A7740_CLK_DMAC2 17 | 46 | #define R8A7740_CLK_DMAC2 17 |
diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h index 8ea7ab0346ad..c27b3b5133b9 100644 --- a/include/dt-bindings/clock/r8a7790-clock.h +++ b/include/dt-bindings/clock/r8a7790-clock.h | |||
| @@ -26,8 +26,18 @@ | |||
| 26 | #define R8A7790_CLK_MSIOF0 0 | 26 | #define R8A7790_CLK_MSIOF0 0 |
| 27 | 27 | ||
| 28 | /* MSTP1 */ | 28 | /* MSTP1 */ |
| 29 | #define R8A7790_CLK_JPU 6 | 29 | #define R8A7790_CLK_VCP1 0 |
| 30 | #define R8A7790_CLK_VCP0 1 | ||
| 31 | #define R8A7790_CLK_VPC1 2 | ||
| 32 | #define R8A7790_CLK_VPC0 3 | ||
| 33 | #define R8A7790_CLK_JPU 6 | ||
| 34 | #define R8A7790_CLK_SSP1 9 | ||
| 30 | #define R8A7790_CLK_TMU1 11 | 35 | #define R8A7790_CLK_TMU1 11 |
| 36 | #define R8A7790_CLK_3DG 12 | ||
| 37 | #define R8A7790_CLK_2DDMAC 15 | ||
| 38 | #define R8A7790_CLK_FDP1_2 17 | ||
| 39 | #define R8A7790_CLK_FDP1_1 18 | ||
| 40 | #define R8A7790_CLK_FDP1_0 19 | ||
| 31 | #define R8A7790_CLK_TMU3 21 | 41 | #define R8A7790_CLK_TMU3 21 |
| 32 | #define R8A7790_CLK_TMU2 22 | 42 | #define R8A7790_CLK_TMU2 22 |
| 33 | #define R8A7790_CLK_CMT0 24 | 43 | #define R8A7790_CLK_CMT0 24 |
| @@ -68,6 +78,8 @@ | |||
| 68 | #define R8A7790_CLK_USBDMAC1 31 | 78 | #define R8A7790_CLK_USBDMAC1 31 |
| 69 | 79 | ||
| 70 | /* MSTP5 */ | 80 | /* MSTP5 */ |
| 81 | #define R8A7790_CLK_AUDIO_DMAC1 1 | ||
| 82 | #define R8A7790_CLK_AUDIO_DMAC0 2 | ||
| 71 | #define R8A7790_CLK_THERMAL 22 | 83 | #define R8A7790_CLK_THERMAL 22 |
| 72 | #define R8A7790_CLK_PWM 23 | 84 | #define R8A7790_CLK_PWM 23 |
| 73 | 85 | ||
diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h index 58c3f49d068c..3ea2bbc0da3f 100644 --- a/include/dt-bindings/clock/r8a7791-clock.h +++ b/include/dt-bindings/clock/r8a7791-clock.h | |||
| @@ -25,8 +25,15 @@ | |||
| 25 | #define R8A7791_CLK_MSIOF0 0 | 25 | #define R8A7791_CLK_MSIOF0 0 |
| 26 | 26 | ||
| 27 | /* MSTP1 */ | 27 | /* MSTP1 */ |
| 28 | #define R8A7791_CLK_JPU 6 | 28 | #define R8A7791_CLK_VCP0 1 |
| 29 | #define R8A7791_CLK_VPC0 3 | ||
| 30 | #define R8A7791_CLK_JPU 6 | ||
| 31 | #define R8A7791_CLK_SSP1 9 | ||
| 29 | #define R8A7791_CLK_TMU1 11 | 32 | #define R8A7791_CLK_TMU1 11 |
| 33 | #define R8A7791_CLK_3DG 12 | ||
| 34 | #define R8A7791_CLK_2DDMAC 15 | ||
| 35 | #define R8A7791_CLK_FDP1_1 18 | ||
| 36 | #define R8A7791_CLK_FDP1_0 19 | ||
| 30 | #define R8A7791_CLK_TMU3 21 | 37 | #define R8A7791_CLK_TMU3 21 |
| 31 | #define R8A7791_CLK_TMU2 22 | 38 | #define R8A7791_CLK_TMU2 22 |
| 32 | #define R8A7791_CLK_CMT0 24 | 39 | #define R8A7791_CLK_CMT0 24 |
| @@ -62,6 +69,8 @@ | |||
| 62 | #define R8A7791_CLK_USBDMAC1 31 | 69 | #define R8A7791_CLK_USBDMAC1 31 |
| 63 | 70 | ||
| 64 | /* MSTP5 */ | 71 | /* MSTP5 */ |
| 72 | #define R8A7791_CLK_AUDIO_DMAC1 1 | ||
| 73 | #define R8A7791_CLK_AUDIO_DMAC0 2 | ||
| 65 | #define R8A7791_CLK_THERMAL 22 | 74 | #define R8A7791_CLK_THERMAL 22 |
| 66 | #define R8A7791_CLK_PWM 23 | 75 | #define R8A7791_CLK_PWM 23 |
| 67 | 76 | ||
diff --git a/include/dt-bindings/clock/r8a7794-clock.h b/include/dt-bindings/clock/r8a7794-clock.h index 9ac1043e25bc..aa9c286e60c0 100644 --- a/include/dt-bindings/clock/r8a7794-clock.h +++ b/include/dt-bindings/clock/r8a7794-clock.h | |||
| @@ -26,11 +26,18 @@ | |||
| 26 | #define R8A7794_CLK_MSIOF0 0 | 26 | #define R8A7794_CLK_MSIOF0 0 |
| 27 | 27 | ||
| 28 | /* MSTP1 */ | 28 | /* MSTP1 */ |
| 29 | #define R8A7794_CLK_VCP0 1 | ||
| 30 | #define R8A7794_CLK_VPC0 3 | ||
| 29 | #define R8A7794_CLK_TMU1 11 | 31 | #define R8A7794_CLK_TMU1 11 |
| 32 | #define R8A7794_CLK_3DG 12 | ||
| 33 | #define R8A7794_CLK_2DDMAC 15 | ||
| 34 | #define R8A7794_CLK_FDP1_0 19 | ||
| 30 | #define R8A7794_CLK_TMU3 21 | 35 | #define R8A7794_CLK_TMU3 21 |
| 31 | #define R8A7794_CLK_TMU2 22 | 36 | #define R8A7794_CLK_TMU2 22 |
| 32 | #define R8A7794_CLK_CMT0 24 | 37 | #define R8A7794_CLK_CMT0 24 |
| 33 | #define R8A7794_CLK_TMU0 25 | 38 | #define R8A7794_CLK_TMU0 25 |
| 39 | #define R8A7794_CLK_VSP1_DU0 28 | ||
| 40 | #define R8A7794_CLK_VSP1_S 31 | ||
| 34 | 41 | ||
| 35 | /* MSTP2 */ | 42 | /* MSTP2 */ |
| 36 | #define R8A7794_CLK_SCIFA2 2 | 43 | #define R8A7794_CLK_SCIFA2 2 |
| @@ -61,6 +68,8 @@ | |||
| 61 | #define R8A7794_CLK_SCIF0 21 | 68 | #define R8A7794_CLK_SCIF0 21 |
| 62 | 69 | ||
| 63 | /* MSTP8 */ | 70 | /* MSTP8 */ |
| 71 | #define R8A7794_CLK_VIN1 10 | ||
| 72 | #define R8A7794_CLK_VIN0 11 | ||
| 64 | #define R8A7794_CLK_ETHER 13 | 73 | #define R8A7794_CLK_ETHER 13 |
| 65 | 74 | ||
| 66 | /* MSTP9 */ | 75 | /* MSTP9 */ |
diff --git a/include/dt-bindings/clock/stih407-clks.h b/include/dt-bindings/clock/stih407-clks.h new file mode 100644 index 000000000000..7af2b717b3b2 --- /dev/null +++ b/include/dt-bindings/clock/stih407-clks.h | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | /* | ||
| 2 | * This header provides constants clk index STMicroelectronics | ||
| 3 | * STiH407 SoC. | ||
| 4 | */ | ||
| 5 | #ifndef _DT_BINDINGS_CLK_STIH407 | ||
| 6 | #define _DT_BINDINGS_CLK_STIH407 | ||
| 7 | |||
| 8 | /* CLOCKGEN C0 */ | ||
| 9 | #define CLK_ICN_GPU 0 | ||
| 10 | #define CLK_FDMA 1 | ||
| 11 | #define CLK_NAND 2 | ||
| 12 | #define CLK_HVA 3 | ||
| 13 | #define CLK_PROC_STFE 4 | ||
| 14 | #define CLK_PROC_TP 5 | ||
| 15 | #define CLK_RX_ICN_DMU 6 | ||
| 16 | #define CLK_RX_ICN_DISP_0 6 | ||
| 17 | #define CLK_RX_ICN_DISP_1 6 | ||
| 18 | #define CLK_RX_ICN_HVA 7 | ||
| 19 | #define CLK_RX_ICN_TS 7 | ||
| 20 | #define CLK_ICN_CPU 8 | ||
| 21 | #define CLK_TX_ICN_DMU 9 | ||
| 22 | #define CLK_TX_ICN_HVA 9 | ||
| 23 | #define CLK_TX_ICN_TS 9 | ||
| 24 | #define CLK_ICN_COMPO 9 | ||
| 25 | #define CLK_MMC_0 10 | ||
| 26 | #define CLK_MMC_1 11 | ||
| 27 | #define CLK_JPEGDEC 12 | ||
| 28 | #define CLK_ICN_REG 13 | ||
| 29 | #define CLK_TRACE_A9 13 | ||
| 30 | #define CLK_PTI_STM 13 | ||
| 31 | #define CLK_EXT2F_A9 13 | ||
| 32 | #define CLK_IC_BDISP_0 14 | ||
| 33 | #define CLK_IC_BDISP_1 15 | ||
| 34 | #define CLK_PP_DMU 16 | ||
| 35 | #define CLK_VID_DMU 17 | ||
| 36 | #define CLK_DSS_LPC 18 | ||
| 37 | #define CLK_ST231_AUD_0 19 | ||
| 38 | #define CLK_ST231_GP_0 19 | ||
| 39 | #define CLK_ST231_GP_1 20 | ||
| 40 | #define CLK_ST231_DMU 21 | ||
| 41 | #define CLK_ICN_LMI 22 | ||
| 42 | #define CLK_TX_ICN_DISP_0 23 | ||
| 43 | #define CLK_TX_ICN_DISP_1 23 | ||
| 44 | #define CLK_ICN_SBC 24 | ||
| 45 | #define CLK_STFE_FRC2 25 | ||
| 46 | #define CLK_ETH_PHY 26 | ||
| 47 | #define CLK_ETH_REF_PHYCLK 27 | ||
| 48 | #define CLK_FLASH_PROMIP 28 | ||
| 49 | #define CLK_MAIN_DISP 29 | ||
| 50 | #define CLK_AUX_DISP 30 | ||
| 51 | #define CLK_COMPO_DVP 31 | ||
| 52 | |||
| 53 | /* CLOCKGEN D0 */ | ||
| 54 | #define CLK_PCM_0 0 | ||
| 55 | #define CLK_PCM_1 1 | ||
| 56 | #define CLK_PCM_2 2 | ||
| 57 | #define CLK_SPDIFF 3 | ||
| 58 | |||
| 59 | /* CLOCKGEN D2 */ | ||
| 60 | #define CLK_PIX_MAIN_DISP 0 | ||
| 61 | #define CLK_PIX_PIP 1 | ||
| 62 | #define CLK_PIX_GDP1 2 | ||
| 63 | #define CLK_PIX_GDP2 3 | ||
| 64 | #define CLK_PIX_GDP3 4 | ||
| 65 | #define CLK_PIX_GDP4 5 | ||
| 66 | #define CLK_PIX_AUX_DISP 6 | ||
| 67 | #define CLK_DENC 7 | ||
| 68 | #define CLK_PIX_HDDAC 8 | ||
| 69 | #define CLK_HDDAC 9 | ||
| 70 | #define CLK_SDDAC 10 | ||
| 71 | #define CLK_PIX_DVO 11 | ||
| 72 | #define CLK_DVO 12 | ||
| 73 | #define CLK_PIX_HDMI 13 | ||
| 74 | #define CLK_TMDS_HDMI 14 | ||
| 75 | #define CLK_REF_HDMIPHY 15 | ||
| 76 | |||
| 77 | /* CLOCKGEN D3 */ | ||
| 78 | #define CLK_STFE_FRC1 0 | ||
| 79 | #define CLK_TSOUT_0 1 | ||
| 80 | #define CLK_TSOUT_1 2 | ||
| 81 | #define CLK_MCHI 3 | ||
| 82 | #define CLK_VSENS_COMPO 4 | ||
| 83 | #define CLK_FRC1_REMOTE 5 | ||
| 84 | #define CLK_LPC_0 6 | ||
| 85 | #define CLK_LPC_1 7 | ||
| 86 | #endif | ||
diff --git a/include/dt-bindings/clock/stih410-clks.h b/include/dt-bindings/clock/stih410-clks.h new file mode 100644 index 000000000000..2097a4bbe155 --- /dev/null +++ b/include/dt-bindings/clock/stih410-clks.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * This header provides constants clk index STMicroelectronics | ||
| 3 | * STiH410 SoC. | ||
| 4 | */ | ||
| 5 | #ifndef _DT_BINDINGS_CLK_STIH410 | ||
| 6 | #define _DT_BINDINGS_CLK_STIH410 | ||
| 7 | |||
| 8 | #include "stih407-clks.h" | ||
| 9 | |||
| 10 | /* STiH410 introduces new clock outputs compared to STiH407 */ | ||
| 11 | |||
| 12 | /* CLOCKGEN C0 */ | ||
| 13 | #define CLK_TX_ICN_HADES 32 | ||
| 14 | #define CLK_RX_ICN_HADES 33 | ||
| 15 | #define CLK_ICN_REG_16 34 | ||
| 16 | #define CLK_PP_HADES 35 | ||
| 17 | #define CLK_CLUST_HADES 36 | ||
| 18 | #define CLK_HWPE_HADES 37 | ||
| 19 | #define CLK_FC_HADES 38 | ||
| 20 | |||
| 21 | /* CLOCKGEN D0 */ | ||
| 22 | #define CLK_PCMR10_MASTER 4 | ||
| 23 | #define CLK_USB2_PHY 5 | ||
| 24 | |||
| 25 | #endif | ||
diff --git a/include/dt-bindings/clock/tegra114-car.h b/include/dt-bindings/clock/tegra114-car.h index fc12621fb432..534c03f8ad72 100644 --- a/include/dt-bindings/clock/tegra114-car.h +++ b/include/dt-bindings/clock/tegra114-car.h | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | #define TEGRA114_CLK_I2S0 30 | 49 | #define TEGRA114_CLK_I2S0 30 |
| 50 | /* 31 */ | 50 | /* 31 */ |
| 51 | 51 | ||
| 52 | /* 32 */ | 52 | #define TEGRA114_CLK_MC 32 |
| 53 | /* 33 */ | 53 | /* 33 */ |
| 54 | #define TEGRA114_CLK_APBDMA 34 | 54 | #define TEGRA114_CLK_APBDMA 34 |
| 55 | /* 35 */ | 55 | /* 35 */ |
diff --git a/include/dt-bindings/clock/tegra124-car.h b/include/dt-bindings/clock/tegra124-car.h index 6bac637fd635..af9bc9a3ddbc 100644 --- a/include/dt-bindings/clock/tegra124-car.h +++ b/include/dt-bindings/clock/tegra124-car.h | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | #define TEGRA124_CLK_I2S0 30 | 48 | #define TEGRA124_CLK_I2S0 30 |
| 49 | /* 31 */ | 49 | /* 31 */ |
| 50 | 50 | ||
| 51 | /* 32 */ | 51 | #define TEGRA124_CLK_MC 32 |
| 52 | /* 33 */ | 52 | /* 33 */ |
| 53 | #define TEGRA124_CLK_APBDMA 34 | 53 | #define TEGRA124_CLK_APBDMA 34 |
| 54 | /* 35 */ | 54 | /* 35 */ |
diff --git a/include/dt-bindings/clock/tegra20-car.h b/include/dt-bindings/clock/tegra20-car.h index 9406207cfac8..04500b243a4d 100644 --- a/include/dt-bindings/clock/tegra20-car.h +++ b/include/dt-bindings/clock/tegra20-car.h | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | /* 30 */ | 49 | /* 30 */ |
| 50 | #define TEGRA20_CLK_CACHE2 31 | 50 | #define TEGRA20_CLK_CACHE2 31 |
| 51 | 51 | ||
| 52 | #define TEGRA20_CLK_MEM 32 | 52 | #define TEGRA20_CLK_MC 32 |
| 53 | #define TEGRA20_CLK_AHBDMA 33 | 53 | #define TEGRA20_CLK_AHBDMA 33 |
| 54 | #define TEGRA20_CLK_APBDMA 34 | 54 | #define TEGRA20_CLK_APBDMA 34 |
| 55 | /* 35 */ | 55 | /* 35 */ |
diff --git a/include/dt-bindings/memory/tegra114-mc.h b/include/dt-bindings/memory/tegra114-mc.h new file mode 100644 index 000000000000..8f48985a3139 --- /dev/null +++ b/include/dt-bindings/memory/tegra114-mc.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef DT_BINDINGS_MEMORY_TEGRA114_MC_H | ||
| 2 | #define DT_BINDINGS_MEMORY_TEGRA114_MC_H | ||
| 3 | |||
| 4 | #define TEGRA_SWGROUP_PTC 0 | ||
| 5 | #define TEGRA_SWGROUP_DC 1 | ||
| 6 | #define TEGRA_SWGROUP_DCB 2 | ||
| 7 | #define TEGRA_SWGROUP_EPP 3 | ||
| 8 | #define TEGRA_SWGROUP_G2 4 | ||
| 9 | #define TEGRA_SWGROUP_AVPC 5 | ||
| 10 | #define TEGRA_SWGROUP_NV 6 | ||
| 11 | #define TEGRA_SWGROUP_HDA 7 | ||
| 12 | #define TEGRA_SWGROUP_HC 8 | ||
| 13 | #define TEGRA_SWGROUP_MSENC 9 | ||
| 14 | #define TEGRA_SWGROUP_PPCS 10 | ||
| 15 | #define TEGRA_SWGROUP_VDE 11 | ||
| 16 | #define TEGRA_SWGROUP_MPCORELP 12 | ||
| 17 | #define TEGRA_SWGROUP_MPCORE 13 | ||
| 18 | #define TEGRA_SWGROUP_VI 14 | ||
| 19 | #define TEGRA_SWGROUP_ISP 15 | ||
| 20 | #define TEGRA_SWGROUP_XUSB_HOST 16 | ||
| 21 | #define TEGRA_SWGROUP_XUSB_DEV 17 | ||
| 22 | #define TEGRA_SWGROUP_EMUCIF 18 | ||
| 23 | #define TEGRA_SWGROUP_TSEC 19 | ||
| 24 | |||
| 25 | #endif | ||
diff --git a/include/dt-bindings/memory/tegra124-mc.h b/include/dt-bindings/memory/tegra124-mc.h new file mode 100644 index 000000000000..7d8ee798f34e --- /dev/null +++ b/include/dt-bindings/memory/tegra124-mc.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #ifndef DT_BINDINGS_MEMORY_TEGRA124_MC_H | ||
| 2 | #define DT_BINDINGS_MEMORY_TEGRA124_MC_H | ||
| 3 | |||
| 4 | #define TEGRA_SWGROUP_PTC 0 | ||
| 5 | #define TEGRA_SWGROUP_DC 1 | ||
| 6 | #define TEGRA_SWGROUP_DCB 2 | ||
| 7 | #define TEGRA_SWGROUP_AFI 3 | ||
| 8 | #define TEGRA_SWGROUP_AVPC 4 | ||
| 9 | #define TEGRA_SWGROUP_HDA 5 | ||
| 10 | #define TEGRA_SWGROUP_HC 6 | ||
| 11 | #define TEGRA_SWGROUP_MSENC 7 | ||
| 12 | #define TEGRA_SWGROUP_PPCS 8 | ||
| 13 | #define TEGRA_SWGROUP_SATA 9 | ||
| 14 | #define TEGRA_SWGROUP_VDE 10 | ||
| 15 | #define TEGRA_SWGROUP_MPCORELP 11 | ||
| 16 | #define TEGRA_SWGROUP_MPCORE 12 | ||
| 17 | #define TEGRA_SWGROUP_ISP2 13 | ||
| 18 | #define TEGRA_SWGROUP_XUSB_HOST 14 | ||
| 19 | #define TEGRA_SWGROUP_XUSB_DEV 15 | ||
| 20 | #define TEGRA_SWGROUP_ISP2B 16 | ||
| 21 | #define TEGRA_SWGROUP_TSEC 17 | ||
| 22 | #define TEGRA_SWGROUP_A9AVP 18 | ||
| 23 | #define TEGRA_SWGROUP_GPU 19 | ||
| 24 | #define TEGRA_SWGROUP_SDMMC1A 20 | ||
| 25 | #define TEGRA_SWGROUP_SDMMC2A 21 | ||
| 26 | #define TEGRA_SWGROUP_SDMMC3A 22 | ||
| 27 | #define TEGRA_SWGROUP_SDMMC4A 23 | ||
| 28 | #define TEGRA_SWGROUP_VIC 24 | ||
| 29 | #define TEGRA_SWGROUP_VI 25 | ||
| 30 | |||
| 31 | #endif | ||
diff --git a/include/dt-bindings/memory/tegra30-mc.h b/include/dt-bindings/memory/tegra30-mc.h new file mode 100644 index 000000000000..502beb03d777 --- /dev/null +++ b/include/dt-bindings/memory/tegra30-mc.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #ifndef DT_BINDINGS_MEMORY_TEGRA30_MC_H | ||
| 2 | #define DT_BINDINGS_MEMORY_TEGRA30_MC_H | ||
| 3 | |||
| 4 | #define TEGRA_SWGROUP_PTC 0 | ||
| 5 | #define TEGRA_SWGROUP_DC 1 | ||
| 6 | #define TEGRA_SWGROUP_DCB 2 | ||
| 7 | #define TEGRA_SWGROUP_EPP 3 | ||
| 8 | #define TEGRA_SWGROUP_G2 4 | ||
| 9 | #define TEGRA_SWGROUP_MPE 5 | ||
| 10 | #define TEGRA_SWGROUP_VI 6 | ||
| 11 | #define TEGRA_SWGROUP_AFI 7 | ||
| 12 | #define TEGRA_SWGROUP_AVPC 8 | ||
| 13 | #define TEGRA_SWGROUP_NV 9 | ||
| 14 | #define TEGRA_SWGROUP_NV2 10 | ||
| 15 | #define TEGRA_SWGROUP_HDA 11 | ||
| 16 | #define TEGRA_SWGROUP_HC 12 | ||
| 17 | #define TEGRA_SWGROUP_PPCS 13 | ||
| 18 | #define TEGRA_SWGROUP_SATA 14 | ||
| 19 | #define TEGRA_SWGROUP_VDE 15 | ||
| 20 | #define TEGRA_SWGROUP_MPCORELP 16 | ||
| 21 | #define TEGRA_SWGROUP_MPCORE 17 | ||
| 22 | #define TEGRA_SWGROUP_ISP 18 | ||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/dt-bindings/regulator/maxim,max77802.h b/include/dt-bindings/regulator/maxim,max77802.h new file mode 100644 index 000000000000..cf28631d7109 --- /dev/null +++ b/include/dt-bindings/regulator/maxim,max77802.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Google, Inc | ||
| 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 version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | * | ||
| 8 | * Device Tree binding constants for the Maxim 77802 PMIC regulators | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _DT_BINDINGS_REGULATOR_MAXIM_MAX77802_H | ||
| 12 | #define _DT_BINDINGS_REGULATOR_MAXIM_MAX77802_H | ||
| 13 | |||
| 14 | /* Regulator operating modes */ | ||
| 15 | #define MAX77802_OPMODE_LP 1 | ||
| 16 | #define MAX77802_OPMODE_NORMAL 3 | ||
| 17 | |||
| 18 | #endif /* _DT_BINDINGS_REGULATOR_MAXIM_MAX77802_H */ | ||
diff --git a/include/dt-bindings/reset-controller/stih407-resets.h b/include/dt-bindings/reset-controller/stih407-resets.h new file mode 100644 index 000000000000..02d4328fe479 --- /dev/null +++ b/include/dt-bindings/reset-controller/stih407-resets.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* | ||
| 2 | * This header provides constants for the reset controller | ||
| 3 | * based peripheral powerdown requests on the STMicroelectronics | ||
| 4 | * STiH407 SoC. | ||
| 5 | */ | ||
| 6 | #ifndef _DT_BINDINGS_RESET_CONTROLLER_STIH407 | ||
| 7 | #define _DT_BINDINGS_RESET_CONTROLLER_STIH407 | ||
| 8 | |||
| 9 | /* Powerdown requests control 0 */ | ||
| 10 | #define STIH407_EMISS_POWERDOWN 0 | ||
| 11 | #define STIH407_NAND_POWERDOWN 1 | ||
| 12 | |||
| 13 | /* Synp GMAC PowerDown */ | ||
| 14 | #define STIH407_ETH1_POWERDOWN 2 | ||
| 15 | |||
| 16 | /* Powerdown requests control 1 */ | ||
| 17 | #define STIH407_USB3_POWERDOWN 3 | ||
| 18 | #define STIH407_USB2_PORT1_POWERDOWN 4 | ||
| 19 | #define STIH407_USB2_PORT0_POWERDOWN 5 | ||
| 20 | #define STIH407_PCIE1_POWERDOWN 6 | ||
| 21 | #define STIH407_PCIE0_POWERDOWN 7 | ||
| 22 | #define STIH407_SATA1_POWERDOWN 8 | ||
| 23 | #define STIH407_SATA0_POWERDOWN 9 | ||
| 24 | |||
| 25 | /* Reset defines */ | ||
| 26 | #define STIH407_ETH1_SOFTRESET 0 | ||
| 27 | #define STIH407_MMC1_SOFTRESET 1 | ||
| 28 | #define STIH407_PICOPHY_SOFTRESET 2 | ||
| 29 | #define STIH407_IRB_SOFTRESET 3 | ||
| 30 | #define STIH407_PCIE0_SOFTRESET 4 | ||
| 31 | #define STIH407_PCIE1_SOFTRESET 5 | ||
| 32 | #define STIH407_SATA0_SOFTRESET 6 | ||
| 33 | #define STIH407_SATA1_SOFTRESET 7 | ||
| 34 | #define STIH407_MIPHY0_SOFTRESET 8 | ||
| 35 | #define STIH407_MIPHY1_SOFTRESET 9 | ||
| 36 | #define STIH407_MIPHY2_SOFTRESET 10 | ||
| 37 | #define STIH407_SATA0_PWR_SOFTRESET 11 | ||
| 38 | #define STIH407_SATA1_PWR_SOFTRESET 12 | ||
| 39 | #define STIH407_DELTA_SOFTRESET 13 | ||
| 40 | #define STIH407_BLITTER_SOFTRESET 14 | ||
| 41 | #define STIH407_HDTVOUT_SOFTRESET 15 | ||
| 42 | #define STIH407_HDQVDP_SOFTRESET 16 | ||
| 43 | #define STIH407_VDP_AUX_SOFTRESET 17 | ||
| 44 | #define STIH407_COMPO_SOFTRESET 18 | ||
| 45 | #define STIH407_HDMI_TX_PHY_SOFTRESET 19 | ||
| 46 | #define STIH407_JPEG_DEC_SOFTRESET 20 | ||
| 47 | #define STIH407_VP8_DEC_SOFTRESET 21 | ||
| 48 | #define STIH407_GPU_SOFTRESET 22 | ||
| 49 | #define STIH407_HVA_SOFTRESET 23 | ||
| 50 | #define STIH407_ERAM_HVA_SOFTRESET 24 | ||
| 51 | #define STIH407_LPM_SOFTRESET 25 | ||
| 52 | #define STIH407_KEYSCAN_SOFTRESET 26 | ||
| 53 | #define STIH407_USB2_PORT0_SOFTRESET 27 | ||
| 54 | #define STIH407_USB2_PORT1_SOFTRESET 28 | ||
| 55 | |||
| 56 | /* Picophy reset defines */ | ||
| 57 | #define STIH407_PICOPHY0_RESET 0 | ||
| 58 | #define STIH407_PICOPHY1_RESET 1 | ||
| 59 | #define STIH407_PICOPHY2_RESET 2 | ||
| 60 | |||
| 61 | #endif /* _DT_BINDINGS_RESET_CONTROLLER_STIH407 */ | ||
diff --git a/include/linux/atmel-mci.h b/include/linux/atmel-mci.h index 91b77f8d495d..9177947bf032 100644 --- a/include/linux/atmel-mci.h +++ b/include/linux/atmel-mci.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | * @detect_pin: GPIO pin wired to the card detect switch | 11 | * @detect_pin: GPIO pin wired to the card detect switch |
| 12 | * @wp_pin: GPIO pin wired to the write protect sensor | 12 | * @wp_pin: GPIO pin wired to the write protect sensor |
| 13 | * @detect_is_active_high: The state of the detect pin when it is active | 13 | * @detect_is_active_high: The state of the detect pin when it is active |
| 14 | * @non_removable: The slot is not removable, only detect once | ||
| 14 | * | 15 | * |
| 15 | * If a given slot is not present on the board, @bus_width should be | 16 | * If a given slot is not present on the board, @bus_width should be |
| 16 | * set to 0. The other fields are ignored in this case. | 17 | * set to 0. The other fields are ignored in this case. |
| @@ -26,6 +27,7 @@ struct mci_slot_pdata { | |||
| 26 | int detect_pin; | 27 | int detect_pin; |
| 27 | int wp_pin; | 28 | int wp_pin; |
| 28 | bool detect_is_active_high; | 29 | bool detect_is_active_high; |
| 30 | bool non_removable; | ||
| 29 | }; | 31 | }; |
| 30 | 32 | ||
| 31 | /** | 33 | /** |
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index c9be1589415a..15f7034aa377 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
| @@ -167,6 +167,23 @@ struct request *blk_mq_alloc_request(struct request_queue *q, int rw, | |||
| 167 | gfp_t gfp, bool reserved); | 167 | gfp_t gfp, bool reserved); |
| 168 | struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag); | 168 | struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag); |
| 169 | 169 | ||
| 170 | enum { | ||
| 171 | BLK_MQ_UNIQUE_TAG_BITS = 16, | ||
| 172 | BLK_MQ_UNIQUE_TAG_MASK = (1 << BLK_MQ_UNIQUE_TAG_BITS) - 1, | ||
| 173 | }; | ||
| 174 | |||
| 175 | u32 blk_mq_unique_tag(struct request *rq); | ||
| 176 | |||
| 177 | static inline u16 blk_mq_unique_tag_to_hwq(u32 unique_tag) | ||
| 178 | { | ||
| 179 | return unique_tag >> BLK_MQ_UNIQUE_TAG_BITS; | ||
| 180 | } | ||
| 181 | |||
| 182 | static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag) | ||
| 183 | { | ||
| 184 | return unique_tag & BLK_MQ_UNIQUE_TAG_MASK; | ||
| 185 | } | ||
| 186 | |||
| 170 | struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index); | 187 | struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index); |
| 171 | struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int); | 188 | struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int); |
| 172 | 189 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index aac0f9ea952a..6d76b8b4aa2b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -1136,7 +1136,6 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk) | |||
| 1136 | /* | 1136 | /* |
| 1137 | * tag stuff | 1137 | * tag stuff |
| 1138 | */ | 1138 | */ |
| 1139 | #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) | ||
| 1140 | extern int blk_queue_start_tag(struct request_queue *, struct request *); | 1139 | extern int blk_queue_start_tag(struct request_queue *, struct request *); |
| 1141 | extern struct request *blk_queue_find_tag(struct request_queue *, int); | 1140 | extern struct request *blk_queue_find_tag(struct request_queue *, int); |
| 1142 | extern void blk_queue_end_tag(struct request_queue *, struct request *); | 1141 | extern void blk_queue_end_tag(struct request_queue *, struct request *); |
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index be21af149f11..2839c639f092 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -352,7 +352,6 @@ struct clk_divider { | |||
| 352 | #define CLK_DIVIDER_READ_ONLY BIT(5) | 352 | #define CLK_DIVIDER_READ_ONLY BIT(5) |
| 353 | 353 | ||
| 354 | extern const struct clk_ops clk_divider_ops; | 354 | extern const struct clk_ops clk_divider_ops; |
| 355 | extern const struct clk_ops clk_divider_ro_ops; | ||
| 356 | struct clk *clk_register_divider(struct device *dev, const char *name, | 355 | struct clk *clk_register_divider(struct device *dev, const char *name, |
| 357 | const char *parent_name, unsigned long flags, | 356 | const char *parent_name, unsigned long flags, |
| 358 | void __iomem *reg, u8 shift, u8 width, | 357 | void __iomem *reg, u8 shift, u8 width, |
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index f75acbf70e96..74e5341463c9 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h | |||
| @@ -254,13 +254,26 @@ extern const struct clk_ops ti_clk_mux_ops; | |||
| 254 | void omap2_init_clk_hw_omap_clocks(struct clk *clk); | 254 | void omap2_init_clk_hw_omap_clocks(struct clk *clk); |
| 255 | int omap3_noncore_dpll_enable(struct clk_hw *hw); | 255 | int omap3_noncore_dpll_enable(struct clk_hw *hw); |
| 256 | void omap3_noncore_dpll_disable(struct clk_hw *hw); | 256 | void omap3_noncore_dpll_disable(struct clk_hw *hw); |
| 257 | int omap3_noncore_dpll_set_parent(struct clk_hw *hw, u8 index); | ||
| 257 | int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, | 258 | int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, |
| 258 | unsigned long parent_rate); | 259 | unsigned long parent_rate); |
| 260 | int omap3_noncore_dpll_set_rate_and_parent(struct clk_hw *hw, | ||
| 261 | unsigned long rate, | ||
| 262 | unsigned long parent_rate, | ||
| 263 | u8 index); | ||
| 264 | long omap3_noncore_dpll_determine_rate(struct clk_hw *hw, | ||
| 265 | unsigned long rate, | ||
| 266 | unsigned long *best_parent_rate, | ||
| 267 | struct clk **best_parent_clk); | ||
| 259 | unsigned long omap4_dpll_regm4xen_recalc(struct clk_hw *hw, | 268 | unsigned long omap4_dpll_regm4xen_recalc(struct clk_hw *hw, |
| 260 | unsigned long parent_rate); | 269 | unsigned long parent_rate); |
| 261 | long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw, | 270 | long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw, |
| 262 | unsigned long target_rate, | 271 | unsigned long target_rate, |
| 263 | unsigned long *parent_rate); | 272 | unsigned long *parent_rate); |
| 273 | long omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw, | ||
| 274 | unsigned long rate, | ||
| 275 | unsigned long *best_parent_rate, | ||
| 276 | struct clk **best_parent_clk); | ||
| 264 | u8 omap2_init_dpll_parent(struct clk_hw *hw); | 277 | u8 omap2_init_dpll_parent(struct clk_hw *hw); |
| 265 | unsigned long omap3_dpll_recalc(struct clk_hw *hw, unsigned long parent_rate); | 278 | unsigned long omap3_dpll_recalc(struct clk_hw *hw, unsigned long parent_rate); |
| 266 | long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate, | 279 | long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate, |
| @@ -278,6 +291,8 @@ int omap2_clk_disable_autoidle_all(void); | |||
| 278 | void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks); | 291 | void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks); |
| 279 | int omap3_dpll4_set_rate(struct clk_hw *clk, unsigned long rate, | 292 | int omap3_dpll4_set_rate(struct clk_hw *clk, unsigned long rate, |
| 280 | unsigned long parent_rate); | 293 | unsigned long parent_rate); |
| 294 | int omap3_dpll4_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, | ||
| 295 | unsigned long parent_rate, u8 index); | ||
| 281 | int omap2_dflt_clk_enable(struct clk_hw *hw); | 296 | int omap2_dflt_clk_enable(struct clk_hw *hw); |
| 282 | void omap2_dflt_clk_disable(struct clk_hw *hw); | 297 | void omap2_dflt_clk_disable(struct clk_hw *hw); |
| 283 | int omap2_dflt_clk_is_enabled(struct clk_hw *hw); | 298 | int omap2_dflt_clk_is_enabled(struct clk_hw *hw); |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index e1707de043ae..ca6d2acc5eb7 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -64,6 +64,7 @@ typedef int (*dm_request_endio_fn) (struct dm_target *ti, | |||
| 64 | union map_info *map_context); | 64 | union map_info *map_context); |
| 65 | 65 | ||
| 66 | typedef void (*dm_presuspend_fn) (struct dm_target *ti); | 66 | typedef void (*dm_presuspend_fn) (struct dm_target *ti); |
| 67 | typedef void (*dm_presuspend_undo_fn) (struct dm_target *ti); | ||
| 67 | typedef void (*dm_postsuspend_fn) (struct dm_target *ti); | 68 | typedef void (*dm_postsuspend_fn) (struct dm_target *ti); |
| 68 | typedef int (*dm_preresume_fn) (struct dm_target *ti); | 69 | typedef int (*dm_preresume_fn) (struct dm_target *ti); |
| 69 | typedef void (*dm_resume_fn) (struct dm_target *ti); | 70 | typedef void (*dm_resume_fn) (struct dm_target *ti); |
| @@ -145,6 +146,7 @@ struct target_type { | |||
| 145 | dm_endio_fn end_io; | 146 | dm_endio_fn end_io; |
| 146 | dm_request_endio_fn rq_end_io; | 147 | dm_request_endio_fn rq_end_io; |
| 147 | dm_presuspend_fn presuspend; | 148 | dm_presuspend_fn presuspend; |
| 149 | dm_presuspend_undo_fn presuspend_undo; | ||
| 148 | dm_postsuspend_fn postsuspend; | 150 | dm_postsuspend_fn postsuspend; |
| 149 | dm_preresume_fn preresume; | 151 | dm_preresume_fn preresume; |
| 150 | dm_resume_fn resume; | 152 | dm_resume_fn resume; |
diff --git a/include/linux/edac.h b/include/linux/edac.h index e1e68da6f35c..da3b72e95db3 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
| @@ -194,7 +194,8 @@ static inline char *mc_event_error_type(const unsigned int err_type) | |||
| 194 | * @MEM_DDR3: DDR3 RAM | 194 | * @MEM_DDR3: DDR3 RAM |
| 195 | * @MEM_RDDR3: Registered DDR3 RAM | 195 | * @MEM_RDDR3: Registered DDR3 RAM |
| 196 | * This is a variant of the DDR3 memories. | 196 | * This is a variant of the DDR3 memories. |
| 197 | * @MEM_DDR4: DDR4 RAM | 197 | * @MEM_LRDDR3 Load-Reduced DDR3 memory. |
| 198 | * @MEM_DDR4: Unbuffered DDR4 RAM | ||
| 198 | * @MEM_RDDR4: Registered DDR4 RAM | 199 | * @MEM_RDDR4: Registered DDR4 RAM |
| 199 | * This is a variant of the DDR4 memories. | 200 | * This is a variant of the DDR4 memories. |
| 200 | */ | 201 | */ |
| @@ -216,6 +217,7 @@ enum mem_type { | |||
| 216 | MEM_XDR, | 217 | MEM_XDR, |
| 217 | MEM_DDR3, | 218 | MEM_DDR3, |
| 218 | MEM_RDDR3, | 219 | MEM_RDDR3, |
| 220 | MEM_LRDDR3, | ||
| 219 | MEM_DDR4, | 221 | MEM_DDR4, |
| 220 | MEM_RDDR4, | 222 | MEM_RDDR4, |
| 221 | }; | 223 | }; |
diff --git a/include/linux/eeprom_93cx6.h b/include/linux/eeprom_93cx6.h index e50f98b0297a..eb0b1988050a 100644 --- a/include/linux/eeprom_93cx6.h +++ b/include/linux/eeprom_93cx6.h | |||
| @@ -75,6 +75,10 @@ extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom, | |||
| 75 | const u8 word, u16 *data); | 75 | const u8 word, u16 *data); |
| 76 | extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom, | 76 | extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom, |
| 77 | const u8 word, __le16 *data, const u16 words); | 77 | const u8 word, __le16 *data, const u16 words); |
| 78 | extern void eeprom_93cx6_readb(struct eeprom_93cx6 *eeprom, | ||
| 79 | const u8 byte, u8 *data); | ||
| 80 | extern void eeprom_93cx6_multireadb(struct eeprom_93cx6 *eeprom, | ||
| 81 | const u8 byte, u8 *data, const u16 bytes); | ||
| 78 | 82 | ||
| 79 | extern void eeprom_93cx6_wren(struct eeprom_93cx6 *eeprom, bool enable); | 83 | extern void eeprom_93cx6_wren(struct eeprom_93cx6 *eeprom, bool enable); |
| 80 | 84 | ||
diff --git a/include/linux/efi.h b/include/linux/efi.h index 0949f9c7e872..0238d612750e 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -547,6 +547,9 @@ void efi_native_runtime_setup(void); | |||
| 547 | #define SMBIOS_TABLE_GUID \ | 547 | #define SMBIOS_TABLE_GUID \ |
| 548 | EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) | 548 | EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) |
| 549 | 549 | ||
| 550 | #define SMBIOS3_TABLE_GUID \ | ||
| 551 | EFI_GUID( 0xf2fd1544, 0x9794, 0x4a2c, 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 ) | ||
| 552 | |||
| 550 | #define SAL_SYSTEM_TABLE_GUID \ | 553 | #define SAL_SYSTEM_TABLE_GUID \ |
| 551 | EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) | 554 | EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) |
| 552 | 555 | ||
| @@ -810,7 +813,8 @@ extern struct efi { | |||
| 810 | unsigned long mps; /* MPS table */ | 813 | unsigned long mps; /* MPS table */ |
| 811 | unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ | 814 | unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ |
| 812 | unsigned long acpi20; /* ACPI table (ACPI 2.0) */ | 815 | unsigned long acpi20; /* ACPI table (ACPI 2.0) */ |
| 813 | unsigned long smbios; /* SM BIOS table */ | 816 | unsigned long smbios; /* SMBIOS table (32 bit entry point) */ |
| 817 | unsigned long smbios3; /* SMBIOS table (64 bit entry point) */ | ||
| 814 | unsigned long sal_systab; /* SAL system table */ | 818 | unsigned long sal_systab; /* SAL system table */ |
| 815 | unsigned long boot_info; /* boot info table */ | 819 | unsigned long boot_info; /* boot info table */ |
| 816 | unsigned long hcdp; /* HCDP table */ | 820 | unsigned long hcdp; /* HCDP table */ |
diff --git a/include/linux/i2c/pmbus.h b/include/linux/i2c/pmbus.h index 69280db02c41..ee3c2aba2a8e 100644 --- a/include/linux/i2c/pmbus.h +++ b/include/linux/i2c/pmbus.h | |||
| @@ -40,6 +40,10 @@ | |||
| 40 | 40 | ||
| 41 | struct pmbus_platform_data { | 41 | struct pmbus_platform_data { |
| 42 | u32 flags; /* Device specific flags */ | 42 | u32 flags; /* Device specific flags */ |
| 43 | |||
| 44 | /* regulator support */ | ||
| 45 | int num_regulators; | ||
| 46 | struct regulator_init_data *reg_init_data; | ||
| 43 | }; | 47 | }; |
| 44 | 48 | ||
| 45 | #endif /* _PMBUS_H_ */ | 49 | #endif /* _PMBUS_H_ */ |
diff --git a/include/linux/iio/events.h b/include/linux/iio/events.h index 8bbd7bc1043d..03fa332ad2a8 100644 --- a/include/linux/iio/events.h +++ b/include/linux/iio/events.h | |||
| @@ -72,7 +72,7 @@ struct iio_event_data { | |||
| 72 | 72 | ||
| 73 | #define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF) | 73 | #define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF) |
| 74 | 74 | ||
| 75 | #define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0xCF) | 75 | #define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0x7F) |
| 76 | 76 | ||
| 77 | #define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF) | 77 | #define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF) |
| 78 | 78 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 77fc43f8fb72..d996aef8044f 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -102,7 +102,7 @@ extern struct group_info init_groups; | |||
| 102 | #define INIT_IDS | 102 | #define INIT_IDS |
| 103 | #endif | 103 | #endif |
| 104 | 104 | ||
| 105 | #ifdef CONFIG_TREE_PREEMPT_RCU | 105 | #ifdef CONFIG_PREEMPT_RCU |
| 106 | #define INIT_TASK_RCU_TREE_PREEMPT() \ | 106 | #define INIT_TASK_RCU_TREE_PREEMPT() \ |
| 107 | .rcu_blocked_node = NULL, | 107 | .rcu_blocked_node = NULL, |
| 108 | #else | 108 | #else |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index e6a7c9ff72f2..b29a5982e1c3 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
| 23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <linux/scatterlist.h> | ||
| 25 | #include <trace/events/iommu.h> | 26 | #include <trace/events/iommu.h> |
| 26 | 27 | ||
| 27 | #define IOMMU_READ (1 << 0) | 28 | #define IOMMU_READ (1 << 0) |
| @@ -97,6 +98,8 @@ enum iommu_attr { | |||
| 97 | * @detach_dev: detach device from an iommu domain | 98 | * @detach_dev: detach device from an iommu domain |
| 98 | * @map: map a physically contiguous memory region to an iommu domain | 99 | * @map: map a physically contiguous memory region to an iommu domain |
| 99 | * @unmap: unmap a physically contiguous memory region from an iommu domain | 100 | * @unmap: unmap a physically contiguous memory region from an iommu domain |
| 101 | * @map_sg: map a scatter-gather list of physically contiguous memory chunks | ||
| 102 | * to an iommu domain | ||
| 100 | * @iova_to_phys: translate iova to physical address | 103 | * @iova_to_phys: translate iova to physical address |
| 101 | * @add_device: add device to iommu grouping | 104 | * @add_device: add device to iommu grouping |
| 102 | * @remove_device: remove device from iommu grouping | 105 | * @remove_device: remove device from iommu grouping |
| @@ -114,6 +117,8 @@ struct iommu_ops { | |||
| 114 | phys_addr_t paddr, size_t size, int prot); | 117 | phys_addr_t paddr, size_t size, int prot); |
| 115 | size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, | 118 | size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, |
| 116 | size_t size); | 119 | size_t size); |
| 120 | size_t (*map_sg)(struct iommu_domain *domain, unsigned long iova, | ||
| 121 | struct scatterlist *sg, unsigned int nents, int prot); | ||
| 117 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova); | 122 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova); |
| 118 | int (*add_device)(struct device *dev); | 123 | int (*add_device)(struct device *dev); |
| 119 | void (*remove_device)(struct device *dev); | 124 | void (*remove_device)(struct device *dev); |
| @@ -156,6 +161,9 @@ extern int iommu_map(struct iommu_domain *domain, unsigned long iova, | |||
| 156 | phys_addr_t paddr, size_t size, int prot); | 161 | phys_addr_t paddr, size_t size, int prot); |
| 157 | extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, | 162 | extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
| 158 | size_t size); | 163 | size_t size); |
| 164 | extern size_t default_iommu_map_sg(struct iommu_domain *domain, unsigned long iova, | ||
| 165 | struct scatterlist *sg,unsigned int nents, | ||
| 166 | int prot); | ||
| 159 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); | 167 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); |
| 160 | extern void iommu_set_fault_handler(struct iommu_domain *domain, | 168 | extern void iommu_set_fault_handler(struct iommu_domain *domain, |
| 161 | iommu_fault_handler_t handler, void *token); | 169 | iommu_fault_handler_t handler, void *token); |
| @@ -241,6 +249,13 @@ static inline int report_iommu_fault(struct iommu_domain *domain, | |||
| 241 | return ret; | 249 | return ret; |
| 242 | } | 250 | } |
| 243 | 251 | ||
| 252 | static inline size_t iommu_map_sg(struct iommu_domain *domain, | ||
| 253 | unsigned long iova, struct scatterlist *sg, | ||
| 254 | unsigned int nents, int prot) | ||
| 255 | { | ||
| 256 | return domain->ops->map_sg(domain, iova, sg, nents, prot); | ||
| 257 | } | ||
| 258 | |||
| 244 | #else /* CONFIG_IOMMU_API */ | 259 | #else /* CONFIG_IOMMU_API */ |
| 245 | 260 | ||
| 246 | struct iommu_ops {}; | 261 | struct iommu_ops {}; |
| @@ -293,6 +308,13 @@ static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova, | |||
| 293 | return -ENODEV; | 308 | return -ENODEV; |
| 294 | } | 309 | } |
| 295 | 310 | ||
| 311 | static inline size_t iommu_map_sg(struct iommu_domain *domain, | ||
| 312 | unsigned long iova, struct scatterlist *sg, | ||
| 313 | unsigned int nents, int prot) | ||
| 314 | { | ||
| 315 | return -ENODEV; | ||
| 316 | } | ||
| 317 | |||
| 296 | static inline int iommu_domain_window_enable(struct iommu_domain *domain, | 318 | static inline int iommu_domain_window_enable(struct iommu_domain *domain, |
| 297 | u32 wnd_nr, phys_addr_t paddr, | 319 | u32 wnd_nr, phys_addr_t paddr, |
| 298 | u64 size, int prot) | 320 | u64 size, int prot) |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ea53b04993f2..a6059bdf7b03 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -703,7 +703,7 @@ void kvm_arch_sync_events(struct kvm *kvm); | |||
| 703 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); | 703 | int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu); |
| 704 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); | 704 | void kvm_vcpu_kick(struct kvm_vcpu *vcpu); |
| 705 | 705 | ||
| 706 | bool kvm_is_mmio_pfn(pfn_t pfn); | 706 | bool kvm_is_reserved_pfn(pfn_t pfn); |
| 707 | 707 | ||
| 708 | struct kvm_irq_ack_notifier { | 708 | struct kvm_irq_ack_notifier { |
| 709 | struct hlist_node link; | 709 | struct hlist_node link; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index bd5fefeaf548..bfbc817c34ee 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -1191,9 +1191,9 @@ extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev); | |||
| 1191 | extern int ata_scsi_slave_config(struct scsi_device *sdev); | 1191 | extern int ata_scsi_slave_config(struct scsi_device *sdev); |
| 1192 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); | 1192 | extern void ata_scsi_slave_destroy(struct scsi_device *sdev); |
| 1193 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, | 1193 | extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, |
| 1194 | int queue_depth, int reason); | 1194 | int queue_depth); |
| 1195 | extern int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev, | 1195 | extern int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev, |
| 1196 | int queue_depth, int reason); | 1196 | int queue_depth); |
| 1197 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); | 1197 | extern struct ata_device *ata_dev_pair(struct ata_device *adev); |
| 1198 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); | 1198 | extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); |
| 1199 | extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap); | 1199 | extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap); |
diff --git a/include/linux/mbus.h b/include/linux/mbus.h index 550c88fb0267..611b69fa8594 100644 --- a/include/linux/mbus.h +++ b/include/linux/mbus.h | |||
| @@ -61,6 +61,7 @@ static inline const struct mbus_dram_target_info *mv_mbus_dram_info(void) | |||
| 61 | } | 61 | } |
| 62 | #endif | 62 | #endif |
| 63 | 63 | ||
| 64 | int mvebu_mbus_save_cpu_target(u32 *store_addr); | ||
| 64 | void mvebu_mbus_get_pcie_mem_aperture(struct resource *res); | 65 | void mvebu_mbus_get_pcie_mem_aperture(struct resource *res); |
| 65 | void mvebu_mbus_get_pcie_io_aperture(struct resource *res); | 66 | void mvebu_mbus_get_pcie_io_aperture(struct resource *res); |
| 66 | int mvebu_mbus_add_window_remap_by_id(unsigned int target, | 67 | int mvebu_mbus_add_window_remap_by_id(unsigned int target, |
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h index adba89d9c660..689312745b2f 100644 --- a/include/linux/mfd/abx500/ab8500-sysctrl.h +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h | |||
| @@ -12,7 +12,6 @@ | |||
| 12 | 12 | ||
| 13 | int ab8500_sysctrl_read(u16 reg, u8 *value); | 13 | int ab8500_sysctrl_read(u16 reg, u8 *value); |
| 14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); | 14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); |
| 15 | void ab8500_restart(char mode, const char *cmd); | ||
| 16 | 15 | ||
| 17 | #else | 16 | #else |
| 18 | 17 | ||
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index c0b075f6bc35..aacc10d7789c 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
| @@ -125,6 +125,8 @@ | |||
| 125 | #define ARIZONA_MIC_BIAS_CTRL_1 0x218 | 125 | #define ARIZONA_MIC_BIAS_CTRL_1 0x218 |
| 126 | #define ARIZONA_MIC_BIAS_CTRL_2 0x219 | 126 | #define ARIZONA_MIC_BIAS_CTRL_2 0x219 |
| 127 | #define ARIZONA_MIC_BIAS_CTRL_3 0x21A | 127 | #define ARIZONA_MIC_BIAS_CTRL_3 0x21A |
| 128 | #define ARIZONA_HP_CTRL_1L 0x225 | ||
| 129 | #define ARIZONA_HP_CTRL_1R 0x226 | ||
| 128 | #define ARIZONA_ACCESSORY_DETECT_MODE_1 0x293 | 130 | #define ARIZONA_ACCESSORY_DETECT_MODE_1 0x293 |
| 129 | #define ARIZONA_HEADPHONE_DETECT_1 0x29B | 131 | #define ARIZONA_HEADPHONE_DETECT_1 0x29B |
| 130 | #define ARIZONA_HEADPHONE_DETECT_2 0x29C | 132 | #define ARIZONA_HEADPHONE_DETECT_2 0x29C |
| @@ -279,8 +281,16 @@ | |||
| 279 | #define ARIZONA_AIF2_FRAME_CTRL_2 0x548 | 281 | #define ARIZONA_AIF2_FRAME_CTRL_2 0x548 |
| 280 | #define ARIZONA_AIF2_FRAME_CTRL_3 0x549 | 282 | #define ARIZONA_AIF2_FRAME_CTRL_3 0x549 |
| 281 | #define ARIZONA_AIF2_FRAME_CTRL_4 0x54A | 283 | #define ARIZONA_AIF2_FRAME_CTRL_4 0x54A |
| 284 | #define ARIZONA_AIF2_FRAME_CTRL_5 0x54B | ||
| 285 | #define ARIZONA_AIF2_FRAME_CTRL_6 0x54C | ||
| 286 | #define ARIZONA_AIF2_FRAME_CTRL_7 0x54D | ||
| 287 | #define ARIZONA_AIF2_FRAME_CTRL_8 0x54E | ||
| 282 | #define ARIZONA_AIF2_FRAME_CTRL_11 0x551 | 288 | #define ARIZONA_AIF2_FRAME_CTRL_11 0x551 |
| 283 | #define ARIZONA_AIF2_FRAME_CTRL_12 0x552 | 289 | #define ARIZONA_AIF2_FRAME_CTRL_12 0x552 |
| 290 | #define ARIZONA_AIF2_FRAME_CTRL_13 0x553 | ||
| 291 | #define ARIZONA_AIF2_FRAME_CTRL_14 0x554 | ||
| 292 | #define ARIZONA_AIF2_FRAME_CTRL_15 0x555 | ||
| 293 | #define ARIZONA_AIF2_FRAME_CTRL_16 0x556 | ||
| 284 | #define ARIZONA_AIF2_TX_ENABLES 0x559 | 294 | #define ARIZONA_AIF2_TX_ENABLES 0x559 |
| 285 | #define ARIZONA_AIF2_RX_ENABLES 0x55A | 295 | #define ARIZONA_AIF2_RX_ENABLES 0x55A |
| 286 | #define ARIZONA_AIF2_FORCE_WRITE 0x55B | 296 | #define ARIZONA_AIF2_FORCE_WRITE 0x55B |
| @@ -2245,6 +2255,46 @@ | |||
| 2245 | #define ARIZONA_MICB3_ENA_WIDTH 1 /* MICB3_ENA */ | 2255 | #define ARIZONA_MICB3_ENA_WIDTH 1 /* MICB3_ENA */ |
| 2246 | 2256 | ||
| 2247 | /* | 2257 | /* |
| 2258 | * R549 (0x225) - HP Ctrl 1L | ||
| 2259 | */ | ||
| 2260 | #define ARIZONA_RMV_SHRT_HP1L 0x4000 /* RMV_SHRT_HP1L */ | ||
| 2261 | #define ARIZONA_RMV_SHRT_HP1L_MASK 0x4000 /* RMV_SHRT_HP1L */ | ||
| 2262 | #define ARIZONA_RMV_SHRT_HP1L_SHIFT 14 /* RMV_SHRT_HP1L */ | ||
| 2263 | #define ARIZONA_RMV_SHRT_HP1L_WIDTH 1 /* RMV_SHRT_HP1L */ | ||
| 2264 | #define ARIZONA_HP1L_FLWR 0x0004 /* HP1L_FLWR */ | ||
| 2265 | #define ARIZONA_HP1L_FLWR_MASK 0x0004 /* HP1L_FLWR */ | ||
| 2266 | #define ARIZONA_HP1L_FLWR_SHIFT 2 /* HP1L_FLWR */ | ||
| 2267 | #define ARIZONA_HP1L_FLWR_WIDTH 1 /* HP1L_FLWR */ | ||
| 2268 | #define ARIZONA_HP1L_SHRTI 0x0002 /* HP1L_SHRTI */ | ||
| 2269 | #define ARIZONA_HP1L_SHRTI_MASK 0x0002 /* HP1L_SHRTI */ | ||
| 2270 | #define ARIZONA_HP1L_SHRTI_SHIFT 1 /* HP1L_SHRTI */ | ||
| 2271 | #define ARIZONA_HP1L_SHRTI_WIDTH 1 /* HP1L_SHRTI */ | ||
| 2272 | #define ARIZONA_HP1L_SHRTO 0x0001 /* HP1L_SHRTO */ | ||
| 2273 | #define ARIZONA_HP1L_SHRTO_MASK 0x0001 /* HP1L_SHRTO */ | ||
| 2274 | #define ARIZONA_HP1L_SHRTO_SHIFT 0 /* HP1L_SHRTO */ | ||
| 2275 | #define ARIZONA_HP1L_SHRTO_WIDTH 1 /* HP1L_SHRTO */ | ||
| 2276 | |||
| 2277 | /* | ||
| 2278 | * R550 (0x226) - HP Ctrl 1R | ||
| 2279 | */ | ||
| 2280 | #define ARIZONA_RMV_SHRT_HP1R 0x4000 /* RMV_SHRT_HP1R */ | ||
| 2281 | #define ARIZONA_RMV_SHRT_HP1R_MASK 0x4000 /* RMV_SHRT_HP1R */ | ||
| 2282 | #define ARIZONA_RMV_SHRT_HP1R_SHIFT 14 /* RMV_SHRT_HP1R */ | ||
| 2283 | #define ARIZONA_RMV_SHRT_HP1R_WIDTH 1 /* RMV_SHRT_HP1R */ | ||
| 2284 | #define ARIZONA_HP1R_FLWR 0x0004 /* HP1R_FLWR */ | ||
| 2285 | #define ARIZONA_HP1R_FLWR_MASK 0x0004 /* HP1R_FLWR */ | ||
| 2286 | #define ARIZONA_HP1R_FLWR_SHIFT 2 /* HP1R_FLWR */ | ||
| 2287 | #define ARIZONA_HP1R_FLWR_WIDTH 1 /* HP1R_FLWR */ | ||
| 2288 | #define ARIZONA_HP1R_SHRTI 0x0002 /* HP1R_SHRTI */ | ||
| 2289 | #define ARIZONA_HP1R_SHRTI_MASK 0x0002 /* HP1R_SHRTI */ | ||
| 2290 | #define ARIZONA_HP1R_SHRTI_SHIFT 1 /* HP1R_SHRTI */ | ||
| 2291 | #define ARIZONA_HP1R_SHRTI_WIDTH 1 /* HP1R_SHRTI */ | ||
| 2292 | #define ARIZONA_HP1R_SHRTO 0x0001 /* HP1R_SHRTO */ | ||
| 2293 | #define ARIZONA_HP1R_SHRTO_MASK 0x0001 /* HP1R_SHRTO */ | ||
| 2294 | #define ARIZONA_HP1R_SHRTO_SHIFT 0 /* HP1R_SHRTO */ | ||
| 2295 | #define ARIZONA_HP1R_SHRTO_WIDTH 1 /* HP1R_SHRTO */ | ||
| 2296 | |||
| 2297 | /* | ||
| 2248 | * R659 (0x293) - Accessory Detect Mode 1 | 2298 | * R659 (0x293) - Accessory Detect Mode 1 |
| 2249 | */ | 2299 | */ |
| 2250 | #define ARIZONA_ACCDET_SRC 0x2000 /* ACCDET_SRC */ | 2300 | #define ARIZONA_ACCDET_SRC 0x2000 /* ACCDET_SRC */ |
diff --git a/include/linux/mfd/atmel-hlcdc.h b/include/linux/mfd/atmel-hlcdc.h new file mode 100644 index 000000000000..1279ab1644b5 --- /dev/null +++ b/include/linux/mfd/atmel-hlcdc.h | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 Free Electrons | ||
| 3 | * Copyright (C) 2014 Atmel | ||
| 4 | * | ||
| 5 | * Author: Boris BREZILLON <boris.brezillon@free-electrons.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along with | ||
| 17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __LINUX_MFD_HLCDC_H | ||
| 21 | #define __LINUX_MFD_HLCDC_H | ||
| 22 | |||
| 23 | #include <linux/clk.h> | ||
| 24 | #include <linux/regmap.h> | ||
| 25 | |||
| 26 | #define ATMEL_HLCDC_CFG(i) ((i) * 0x4) | ||
| 27 | #define ATMEL_HLCDC_SIG_CFG LCDCFG(5) | ||
| 28 | #define ATMEL_HLCDC_HSPOL BIT(0) | ||
| 29 | #define ATMEL_HLCDC_VSPOL BIT(1) | ||
| 30 | #define ATMEL_HLCDC_VSPDLYS BIT(2) | ||
| 31 | #define ATMEL_HLCDC_VSPDLYE BIT(3) | ||
| 32 | #define ATMEL_HLCDC_DISPPOL BIT(4) | ||
| 33 | #define ATMEL_HLCDC_DITHER BIT(6) | ||
| 34 | #define ATMEL_HLCDC_DISPDLY BIT(7) | ||
| 35 | #define ATMEL_HLCDC_MODE_MASK GENMASK(9, 8) | ||
| 36 | #define ATMEL_HLCDC_PP BIT(10) | ||
| 37 | #define ATMEL_HLCDC_VSPSU BIT(12) | ||
| 38 | #define ATMEL_HLCDC_VSPHO BIT(13) | ||
| 39 | #define ATMEL_HLCDC_GUARDTIME_MASK GENMASK(20, 16) | ||
| 40 | |||
| 41 | #define ATMEL_HLCDC_EN 0x20 | ||
| 42 | #define ATMEL_HLCDC_DIS 0x24 | ||
| 43 | #define ATMEL_HLCDC_SR 0x28 | ||
| 44 | #define ATMEL_HLCDC_IER 0x2c | ||
| 45 | #define ATMEL_HLCDC_IDR 0x30 | ||
| 46 | #define ATMEL_HLCDC_IMR 0x34 | ||
| 47 | #define ATMEL_HLCDC_ISR 0x38 | ||
| 48 | |||
| 49 | #define ATMEL_HLCDC_CLKPOL BIT(0) | ||
| 50 | #define ATMEL_HLCDC_CLKSEL BIT(2) | ||
| 51 | #define ATMEL_HLCDC_CLKPWMSEL BIT(3) | ||
| 52 | #define ATMEL_HLCDC_CGDIS(i) BIT(8 + (i)) | ||
| 53 | #define ATMEL_HLCDC_CLKDIV_SHFT 16 | ||
| 54 | #define ATMEL_HLCDC_CLKDIV_MASK GENMASK(23, 16) | ||
| 55 | #define ATMEL_HLCDC_CLKDIV(div) ((div - 2) << ATMEL_HLCDC_CLKDIV_SHFT) | ||
| 56 | |||
| 57 | #define ATMEL_HLCDC_PIXEL_CLK BIT(0) | ||
| 58 | #define ATMEL_HLCDC_SYNC BIT(1) | ||
| 59 | #define ATMEL_HLCDC_DISP BIT(2) | ||
| 60 | #define ATMEL_HLCDC_PWM BIT(3) | ||
| 61 | #define ATMEL_HLCDC_SIP BIT(4) | ||
| 62 | |||
| 63 | #define ATMEL_HLCDC_SOF BIT(0) | ||
| 64 | #define ATMEL_HLCDC_SYNCDIS BIT(1) | ||
| 65 | #define ATMEL_HLCDC_FIFOERR BIT(4) | ||
| 66 | #define ATMEL_HLCDC_LAYER_STATUS(x) BIT((x) + 8) | ||
| 67 | |||
| 68 | /** | ||
| 69 | * Structure shared by the MFD device and its subdevices. | ||
| 70 | * | ||
| 71 | * @regmap: register map used to access HLCDC IP registers | ||
| 72 | * @periph_clk: the hlcdc peripheral clock | ||
| 73 | * @sys_clk: the hlcdc system clock | ||
| 74 | * @slow_clk: the system slow clk | ||
| 75 | * @irq: the hlcdc irq | ||
| 76 | */ | ||
| 77 | struct atmel_hlcdc { | ||
| 78 | struct regmap *regmap; | ||
| 79 | struct clk *periph_clk; | ||
| 80 | struct clk *sys_clk; | ||
| 81 | struct clk *slow_clk; | ||
| 82 | int irq; | ||
| 83 | }; | ||
| 84 | |||
| 85 | #endif /* __LINUX_MFD_HLCDC_H */ | ||
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index d0e31a2287ac..81589d176ae8 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | enum { | 14 | enum { |
| 15 | AXP202_ID = 0, | 15 | AXP202_ID = 0, |
| 16 | AXP209_ID, | 16 | AXP209_ID, |
| 17 | AXP288_ID, | ||
| 18 | NR_AXP20X_VARIANTS, | ||
| 17 | }; | 19 | }; |
| 18 | 20 | ||
| 19 | #define AXP20X_DATACACHE(m) (0x04 + (m)) | 21 | #define AXP20X_DATACACHE(m) (0x04 + (m)) |
| @@ -49,11 +51,13 @@ enum { | |||
| 49 | #define AXP20X_IRQ3_EN 0x42 | 51 | #define AXP20X_IRQ3_EN 0x42 |
| 50 | #define AXP20X_IRQ4_EN 0x43 | 52 | #define AXP20X_IRQ4_EN 0x43 |
| 51 | #define AXP20X_IRQ5_EN 0x44 | 53 | #define AXP20X_IRQ5_EN 0x44 |
| 54 | #define AXP20X_IRQ6_EN 0x45 | ||
| 52 | #define AXP20X_IRQ1_STATE 0x48 | 55 | #define AXP20X_IRQ1_STATE 0x48 |
| 53 | #define AXP20X_IRQ2_STATE 0x49 | 56 | #define AXP20X_IRQ2_STATE 0x49 |
| 54 | #define AXP20X_IRQ3_STATE 0x4a | 57 | #define AXP20X_IRQ3_STATE 0x4a |
| 55 | #define AXP20X_IRQ4_STATE 0x4b | 58 | #define AXP20X_IRQ4_STATE 0x4b |
| 56 | #define AXP20X_IRQ5_STATE 0x4c | 59 | #define AXP20X_IRQ5_STATE 0x4c |
| 60 | #define AXP20X_IRQ6_STATE 0x4d | ||
| 57 | 61 | ||
| 58 | /* ADC */ | 62 | /* ADC */ |
| 59 | #define AXP20X_ACIN_V_ADC_H 0x56 | 63 | #define AXP20X_ACIN_V_ADC_H 0x56 |
| @@ -116,6 +120,15 @@ enum { | |||
| 116 | #define AXP20X_CC_CTRL 0xb8 | 120 | #define AXP20X_CC_CTRL 0xb8 |
| 117 | #define AXP20X_FG_RES 0xb9 | 121 | #define AXP20X_FG_RES 0xb9 |
| 118 | 122 | ||
| 123 | /* AXP288 specific registers */ | ||
| 124 | #define AXP288_PMIC_ADC_H 0x56 | ||
| 125 | #define AXP288_PMIC_ADC_L 0x57 | ||
| 126 | #define AXP288_ADC_TS_PIN_CTRL 0x84 | ||
| 127 | |||
| 128 | #define AXP288_PMIC_ADC_EN 0x84 | ||
| 129 | #define AXP288_FG_TUNE5 0xed | ||
| 130 | |||
| 131 | |||
| 119 | /* Regulators IDs */ | 132 | /* Regulators IDs */ |
| 120 | enum { | 133 | enum { |
| 121 | AXP20X_LDO1 = 0, | 134 | AXP20X_LDO1 = 0, |
| @@ -169,12 +182,58 @@ enum { | |||
| 169 | AXP20X_IRQ_GPIO0_INPUT, | 182 | AXP20X_IRQ_GPIO0_INPUT, |
| 170 | }; | 183 | }; |
| 171 | 184 | ||
| 185 | enum axp288_irqs { | ||
| 186 | AXP288_IRQ_VBUS_FALL = 2, | ||
| 187 | AXP288_IRQ_VBUS_RISE, | ||
| 188 | AXP288_IRQ_OV, | ||
| 189 | AXP288_IRQ_FALLING_ALT, | ||
| 190 | AXP288_IRQ_RISING_ALT, | ||
| 191 | AXP288_IRQ_OV_ALT, | ||
| 192 | AXP288_IRQ_DONE = 10, | ||
| 193 | AXP288_IRQ_CHARGING, | ||
| 194 | AXP288_IRQ_SAFE_QUIT, | ||
| 195 | AXP288_IRQ_SAFE_ENTER, | ||
| 196 | AXP288_IRQ_ABSENT, | ||
| 197 | AXP288_IRQ_APPEND, | ||
| 198 | AXP288_IRQ_QWBTU, | ||
| 199 | AXP288_IRQ_WBTU, | ||
| 200 | AXP288_IRQ_QWBTO, | ||
| 201 | AXP288_IRQ_WBTO, | ||
| 202 | AXP288_IRQ_QCBTU, | ||
| 203 | AXP288_IRQ_CBTU, | ||
| 204 | AXP288_IRQ_QCBTO, | ||
| 205 | AXP288_IRQ_CBTO, | ||
| 206 | AXP288_IRQ_WL2, | ||
| 207 | AXP288_IRQ_WL1, | ||
| 208 | AXP288_IRQ_GPADC, | ||
| 209 | AXP288_IRQ_OT = 31, | ||
| 210 | AXP288_IRQ_GPIO0, | ||
| 211 | AXP288_IRQ_GPIO1, | ||
| 212 | AXP288_IRQ_POKO, | ||
| 213 | AXP288_IRQ_POKL, | ||
| 214 | AXP288_IRQ_POKS, | ||
| 215 | AXP288_IRQ_POKN, | ||
| 216 | AXP288_IRQ_POKP, | ||
| 217 | AXP288_IRQ_TIMER, | ||
| 218 | AXP288_IRQ_MV_CHNG, | ||
| 219 | AXP288_IRQ_BC_USB_CHNG, | ||
| 220 | }; | ||
| 221 | |||
| 222 | #define AXP288_TS_ADC_H 0x58 | ||
| 223 | #define AXP288_TS_ADC_L 0x59 | ||
| 224 | #define AXP288_GP_ADC_H 0x5a | ||
| 225 | #define AXP288_GP_ADC_L 0x5b | ||
| 226 | |||
| 172 | struct axp20x_dev { | 227 | struct axp20x_dev { |
| 173 | struct device *dev; | 228 | struct device *dev; |
| 174 | struct i2c_client *i2c_client; | 229 | struct i2c_client *i2c_client; |
| 175 | struct regmap *regmap; | 230 | struct regmap *regmap; |
| 176 | struct regmap_irq_chip_data *regmap_irqc; | 231 | struct regmap_irq_chip_data *regmap_irqc; |
| 177 | long variant; | 232 | long variant; |
| 233 | int nr_cells; | ||
| 234 | struct mfd_cell *cells; | ||
| 235 | const struct regmap_config *regmap_cfg; | ||
| 236 | const struct regmap_irq_chip *regmap_irq_chip; | ||
| 178 | }; | 237 | }; |
| 179 | 238 | ||
| 180 | #endif /* __LINUX_MFD_AXP20X_H */ | 239 | #endif /* __LINUX_MFD_AXP20X_H */ |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 73e1709d4c09..a76bc100bf97 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
| @@ -111,6 +111,13 @@ extern int mfd_add_devices(struct device *parent, int id, | |||
| 111 | struct resource *mem_base, | 111 | struct resource *mem_base, |
| 112 | int irq_base, struct irq_domain *irq_domain); | 112 | int irq_base, struct irq_domain *irq_domain); |
| 113 | 113 | ||
| 114 | static inline int mfd_add_hotplug_devices(struct device *parent, | ||
| 115 | const struct mfd_cell *cells, int n_devs) | ||
| 116 | { | ||
| 117 | return mfd_add_devices(parent, PLATFORM_DEVID_AUTO, cells, n_devs, | ||
| 118 | NULL, 0, NULL); | ||
| 119 | } | ||
| 120 | |||
| 114 | extern void mfd_remove_devices(struct device *parent); | 121 | extern void mfd_remove_devices(struct device *parent); |
| 115 | 122 | ||
| 116 | #endif | 123 | #endif |
diff --git a/include/linux/mfd/dln2.h b/include/linux/mfd/dln2.h new file mode 100644 index 000000000000..004b24576da8 --- /dev/null +++ b/include/linux/mfd/dln2.h | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | #ifndef __LINUX_USB_DLN2_H | ||
| 2 | #define __LINUX_USB_DLN2_H | ||
| 3 | |||
| 4 | #define DLN2_CMD(cmd, id) ((cmd) | ((id) << 8)) | ||
| 5 | |||
| 6 | struct dln2_platform_data { | ||
| 7 | u16 handle; /* sub-driver handle (internally used only) */ | ||
| 8 | u8 port; /* I2C/SPI port */ | ||
| 9 | }; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * dln2_event_cb_t - event callback function signature | ||
| 13 | * | ||
| 14 | * @pdev - the sub-device that registered this callback | ||
| 15 | * @echo - the echo header field received in the message | ||
| 16 | * @data - the data payload | ||
| 17 | * @len - the data payload length | ||
| 18 | * | ||
| 19 | * The callback function is called in interrupt context and the data payload is | ||
| 20 | * only valid during the call. If the user needs later access of the data, it | ||
| 21 | * must copy it. | ||
| 22 | */ | ||
| 23 | |||
| 24 | typedef void (*dln2_event_cb_t)(struct platform_device *pdev, u16 echo, | ||
| 25 | const void *data, int len); | ||
| 26 | |||
| 27 | /** | ||
| 28 | * dl2n_register_event_cb - register a callback function for an event | ||
| 29 | * | ||
| 30 | * @pdev - the sub-device that registers the callback | ||
| 31 | * @event - the event for which to register a callback | ||
| 32 | * @event_cb - the callback function | ||
| 33 | * | ||
| 34 | * @return 0 in case of success, negative value in case of error | ||
| 35 | */ | ||
| 36 | int dln2_register_event_cb(struct platform_device *pdev, u16 event, | ||
| 37 | dln2_event_cb_t event_cb); | ||
| 38 | |||
| 39 | /** | ||
| 40 | * dln2_unregister_event_cb - unregister the callback function for an event | ||
| 41 | * | ||
| 42 | * @pdev - the sub-device that registered the callback | ||
| 43 | * @event - the event for which to register a callback | ||
| 44 | */ | ||
| 45 | void dln2_unregister_event_cb(struct platform_device *pdev, u16 event); | ||
| 46 | |||
| 47 | /** | ||
| 48 | * dln2_transfer - issue a DLN2 command and wait for a response and the | ||
| 49 | * associated data | ||
| 50 | * | ||
| 51 | * @pdev - the sub-device which is issuing this transfer | ||
| 52 | * @cmd - the command to be sent to the device | ||
| 53 | * @obuf - the buffer to be sent to the device; it can be NULL if the user | ||
| 54 | * doesn't need to transmit data with this command | ||
| 55 | * @obuf_len - the size of the buffer to be sent to the device | ||
| 56 | * @ibuf - any data associated with the response will be copied here; it can be | ||
| 57 | * NULL if the user doesn't need the response data | ||
| 58 | * @ibuf_len - must be initialized to the input buffer size; it will be modified | ||
| 59 | * to indicate the actual data transferred; | ||
| 60 | * | ||
| 61 | * @return 0 for success, negative value for errors | ||
| 62 | */ | ||
| 63 | int dln2_transfer(struct platform_device *pdev, u16 cmd, | ||
| 64 | const void *obuf, unsigned obuf_len, | ||
| 65 | void *ibuf, unsigned *ibuf_len); | ||
| 66 | |||
| 67 | /** | ||
| 68 | * dln2_transfer_rx - variant of @dln2_transfer() where TX buffer is not needed | ||
| 69 | * | ||
| 70 | * @pdev - the sub-device which is issuing this transfer | ||
| 71 | * @cmd - the command to be sent to the device | ||
| 72 | * @ibuf - any data associated with the response will be copied here; it can be | ||
| 73 | * NULL if the user doesn't need the response data | ||
| 74 | * @ibuf_len - must be initialized to the input buffer size; it will be modified | ||
| 75 | * to indicate the actual data transferred; | ||
| 76 | * | ||
| 77 | * @return 0 for success, negative value for errors | ||
| 78 | */ | ||
| 79 | |||
| 80 | static inline int dln2_transfer_rx(struct platform_device *pdev, u16 cmd, | ||
| 81 | void *ibuf, unsigned *ibuf_len) | ||
| 82 | { | ||
| 83 | return dln2_transfer(pdev, cmd, NULL, 0, ibuf, ibuf_len); | ||
| 84 | } | ||
| 85 | |||
| 86 | /** | ||
| 87 | * dln2_transfer_tx - variant of @dln2_transfer() where RX buffer is not needed | ||
| 88 | * | ||
| 89 | * @pdev - the sub-device which is issuing this transfer | ||
| 90 | * @cmd - the command to be sent to the device | ||
| 91 | * @obuf - the buffer to be sent to the device; it can be NULL if the | ||
| 92 | * user doesn't need to transmit data with this command | ||
| 93 | * @obuf_len - the size of the buffer to be sent to the device | ||
| 94 | * | ||
| 95 | * @return 0 for success, negative value for errors | ||
| 96 | */ | ||
| 97 | static inline int dln2_transfer_tx(struct platform_device *pdev, u16 cmd, | ||
| 98 | const void *obuf, unsigned obuf_len) | ||
| 99 | { | ||
| 100 | return dln2_transfer(pdev, cmd, obuf, obuf_len, NULL, NULL); | ||
| 101 | } | ||
| 102 | |||
| 103 | #endif | ||
diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h index 7e6dc4b2b795..553f7d09258a 100644 --- a/include/linux/mfd/max77686.h +++ b/include/linux/mfd/max77686.h | |||
| @@ -131,13 +131,6 @@ enum max77686_opmode { | |||
| 131 | MAX77686_OPMODE_STANDBY, | 131 | MAX77686_OPMODE_STANDBY, |
| 132 | }; | 132 | }; |
| 133 | 133 | ||
| 134 | enum max77802_opmode { | ||
| 135 | MAX77802_OPMODE_OFF, | ||
| 136 | MAX77802_OPMODE_STANDBY, | ||
| 137 | MAX77802_OPMODE_LP, | ||
| 138 | MAX77802_OPMODE_NORMAL, | ||
| 139 | }; | ||
| 140 | |||
| 141 | struct max77686_opmode_data { | 134 | struct max77686_opmode_data { |
| 142 | int id; | 135 | int id; |
| 143 | int mode; | 136 | int mode; |
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 582e67f34054..08dae01258b9 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
| 28 | 28 | ||
| 29 | #define MAX77693_NUM_IRQ_MUIC_REGS 3 | ||
| 30 | #define MAX77693_REG_INVALID (0xff) | 29 | #define MAX77693_REG_INVALID (0xff) |
| 31 | 30 | ||
| 32 | /* Slave addr = 0xCC: PMIC, Charger, Flash LED */ | 31 | /* Slave addr = 0xCC: PMIC, Charger, Flash LED */ |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 74346d5e7899..0c12628e91c6 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
| @@ -558,6 +558,7 @@ | |||
| 558 | #define SD_SAMPLE_POINT_CTL 0xFDA7 | 558 | #define SD_SAMPLE_POINT_CTL 0xFDA7 |
| 559 | #define SD_PUSH_POINT_CTL 0xFDA8 | 559 | #define SD_PUSH_POINT_CTL 0xFDA8 |
| 560 | #define SD_CMD0 0xFDA9 | 560 | #define SD_CMD0 0xFDA9 |
| 561 | #define SD_CMD_START 0x40 | ||
| 561 | #define SD_CMD1 0xFDAA | 562 | #define SD_CMD1 0xFDAA |
| 562 | #define SD_CMD2 0xFDAB | 563 | #define SD_CMD2 0xFDAB |
| 563 | #define SD_CMD3 0xFDAC | 564 | #define SD_CMD3 0xFDAC |
| @@ -707,6 +708,14 @@ | |||
| 707 | #define PM_CTRL1 0xFF44 | 708 | #define PM_CTRL1 0xFF44 |
| 708 | #define PM_CTRL2 0xFF45 | 709 | #define PM_CTRL2 0xFF45 |
| 709 | #define PM_CTRL3 0xFF46 | 710 | #define PM_CTRL3 0xFF46 |
| 711 | #define SDIO_SEND_PME_EN 0x80 | ||
| 712 | #define FORCE_RC_MODE_ON 0x40 | ||
| 713 | #define FORCE_RX50_LINK_ON 0x20 | ||
| 714 | #define D3_DELINK_MODE_EN 0x10 | ||
| 715 | #define USE_PESRTB_CTL_DELINK 0x08 | ||
| 716 | #define DELAY_PIN_WAKE 0x04 | ||
| 717 | #define RESET_PIN_WAKE 0x02 | ||
| 718 | #define PM_WAKE_EN 0x01 | ||
| 710 | #define PM_CTRL4 0xFF47 | 719 | #define PM_CTRL4 0xFF47 |
| 711 | 720 | ||
| 712 | /* Memory mapping */ | 721 | /* Memory mapping */ |
| @@ -752,6 +761,14 @@ | |||
| 752 | #define PHY_DUM_REG 0x1F | 761 | #define PHY_DUM_REG 0x1F |
| 753 | 762 | ||
| 754 | #define LCTLR 0x80 | 763 | #define LCTLR 0x80 |
| 764 | #define LCTLR_EXT_SYNC 0x80 | ||
| 765 | #define LCTLR_COMMON_CLOCK_CFG 0x40 | ||
| 766 | #define LCTLR_RETRAIN_LINK 0x20 | ||
| 767 | #define LCTLR_LINK_DISABLE 0x10 | ||
| 768 | #define LCTLR_RCB 0x08 | ||
| 769 | #define LCTLR_RESERVED 0x04 | ||
| 770 | #define LCTLR_ASPM_CTL_MASK 0x03 | ||
| 771 | |||
| 755 | #define PCR_SETTING_REG1 0x724 | 772 | #define PCR_SETTING_REG1 0x724 |
| 756 | #define PCR_SETTING_REG2 0x814 | 773 | #define PCR_SETTING_REG2 0x814 |
| 757 | #define PCR_SETTING_REG3 0x747 | 774 | #define PCR_SETTING_REG3 0x747 |
| @@ -967,4 +984,24 @@ static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr) | |||
| 967 | return (u8 *)(pcr->host_cmds_ptr); | 984 | return (u8 *)(pcr->host_cmds_ptr); |
| 968 | } | 985 | } |
| 969 | 986 | ||
| 987 | static inline int rtsx_pci_update_cfg_byte(struct rtsx_pcr *pcr, int addr, | ||
| 988 | u8 mask, u8 append) | ||
| 989 | { | ||
| 990 | int err; | ||
| 991 | u8 val; | ||
| 992 | |||
| 993 | err = pci_read_config_byte(pcr->pci, addr, &val); | ||
| 994 | if (err < 0) | ||
| 995 | return err; | ||
| 996 | return pci_write_config_byte(pcr->pci, addr, (val & mask) | append); | ||
| 997 | } | ||
| 998 | |||
| 999 | static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val) | ||
| 1000 | { | ||
| 1001 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val >> 24); | ||
| 1002 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 16); | ||
| 1003 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val >> 8); | ||
| 1004 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val); | ||
| 1005 | } | ||
| 1006 | |||
| 970 | #endif | 1007 | #endif |
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 1825edacbda7..3fdb7cfbffb3 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #define MIN_800_MV 800000 | 28 | #define MIN_800_MV 800000 |
| 29 | #define MIN_750_MV 750000 | 29 | #define MIN_750_MV 750000 |
| 30 | #define MIN_600_MV 600000 | 30 | #define MIN_600_MV 600000 |
| 31 | #define MIN_500_MV 500000 | ||
| 31 | 32 | ||
| 32 | /* Macros to represent steps for LDO/BUCK */ | 33 | /* Macros to represent steps for LDO/BUCK */ |
| 33 | #define STEP_50_MV 50000 | 34 | #define STEP_50_MV 50000 |
| @@ -41,6 +42,7 @@ enum sec_device_type { | |||
| 41 | S5M8767X, | 42 | S5M8767X, |
| 42 | S2MPA01, | 43 | S2MPA01, |
| 43 | S2MPS11X, | 44 | S2MPS11X, |
| 45 | S2MPS13X, | ||
| 44 | S2MPS14X, | 46 | S2MPS14X, |
| 45 | S2MPU02, | 47 | S2MPU02, |
| 46 | }; | 48 | }; |
diff --git a/include/linux/mfd/samsung/s2mps13.h b/include/linux/mfd/samsung/s2mps13.h new file mode 100644 index 000000000000..ce5dda8958fe --- /dev/null +++ b/include/linux/mfd/samsung/s2mps13.h | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | /* | ||
| 2 | * s2mps13.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2014 Samsung Electronics Co., Ltd | ||
| 5 | * http://www.samsung.com | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __LINUX_MFD_S2MPS13_H | ||
| 20 | #define __LINUX_MFD_S2MPS13_H | ||
| 21 | |||
| 22 | /* S2MPS13 registers */ | ||
| 23 | enum s2mps13_reg { | ||
| 24 | S2MPS13_REG_ID, | ||
| 25 | S2MPS13_REG_INT1, | ||
| 26 | S2MPS13_REG_INT2, | ||
| 27 | S2MPS13_REG_INT3, | ||
| 28 | S2MPS13_REG_INT1M, | ||
| 29 | S2MPS13_REG_INT2M, | ||
| 30 | S2MPS13_REG_INT3M, | ||
| 31 | S2MPS13_REG_ST1, | ||
| 32 | S2MPS13_REG_ST2, | ||
| 33 | S2MPS13_REG_PWRONSRC, | ||
| 34 | S2MPS13_REG_OFFSRC, | ||
| 35 | S2MPS13_REG_BU_CHG, | ||
| 36 | S2MPS13_REG_RTCCTRL, | ||
| 37 | S2MPS13_REG_CTRL1, | ||
| 38 | S2MPS13_REG_CTRL2, | ||
| 39 | S2MPS13_REG_RSVD1, | ||
| 40 | S2MPS13_REG_RSVD2, | ||
| 41 | S2MPS13_REG_RSVD3, | ||
| 42 | S2MPS13_REG_RSVD4, | ||
| 43 | S2MPS13_REG_RSVD5, | ||
| 44 | S2MPS13_REG_RSVD6, | ||
| 45 | S2MPS13_REG_CTRL3, | ||
| 46 | S2MPS13_REG_RSVD7, | ||
| 47 | S2MPS13_REG_RSVD8, | ||
| 48 | S2MPS13_REG_WRSTBI, | ||
| 49 | S2MPS13_REG_B1CTRL, | ||
| 50 | S2MPS13_REG_B1OUT, | ||
| 51 | S2MPS13_REG_B2CTRL, | ||
| 52 | S2MPS13_REG_B2OUT, | ||
| 53 | S2MPS13_REG_B3CTRL, | ||
| 54 | S2MPS13_REG_B3OUT, | ||
| 55 | S2MPS13_REG_B4CTRL, | ||
| 56 | S2MPS13_REG_B4OUT, | ||
| 57 | S2MPS13_REG_B5CTRL, | ||
| 58 | S2MPS13_REG_B5OUT, | ||
| 59 | S2MPS13_REG_B6CTRL, | ||
| 60 | S2MPS13_REG_B6OUT, | ||
| 61 | S2MPS13_REG_B7CTRL, | ||
| 62 | S2MPS13_REG_B7OUT, | ||
| 63 | S2MPS13_REG_B8CTRL, | ||
| 64 | S2MPS13_REG_B8OUT, | ||
| 65 | S2MPS13_REG_B9CTRL, | ||
| 66 | S2MPS13_REG_B9OUT, | ||
| 67 | S2MPS13_REG_B10CTRL, | ||
| 68 | S2MPS13_REG_B10OUT, | ||
| 69 | S2MPS13_REG_BB1CTRL, | ||
| 70 | S2MPS13_REG_BB1OUT, | ||
| 71 | S2MPS13_REG_BUCK_RAMP1, | ||
| 72 | S2MPS13_REG_BUCK_RAMP2, | ||
| 73 | S2MPS13_REG_LDO_DVS1, | ||
| 74 | S2MPS13_REG_LDO_DVS2, | ||
| 75 | S2MPS13_REG_LDO_DVS3, | ||
| 76 | S2MPS13_REG_B6OUT2, | ||
| 77 | S2MPS13_REG_L1CTRL, | ||
| 78 | S2MPS13_REG_L2CTRL, | ||
| 79 | S2MPS13_REG_L3CTRL, | ||
| 80 | S2MPS13_REG_L4CTRL, | ||
| 81 | S2MPS13_REG_L5CTRL, | ||
| 82 | S2MPS13_REG_L6CTRL, | ||
| 83 | S2MPS13_REG_L7CTRL, | ||
| 84 | S2MPS13_REG_L8CTRL, | ||
| 85 | S2MPS13_REG_L9CTRL, | ||
| 86 | S2MPS13_REG_L10CTRL, | ||
| 87 | S2MPS13_REG_L11CTRL, | ||
| 88 | S2MPS13_REG_L12CTRL, | ||
| 89 | S2MPS13_REG_L13CTRL, | ||
| 90 | S2MPS13_REG_L14CTRL, | ||
| 91 | S2MPS13_REG_L15CTRL, | ||
| 92 | S2MPS13_REG_L16CTRL, | ||
| 93 | S2MPS13_REG_L17CTRL, | ||
| 94 | S2MPS13_REG_L18CTRL, | ||
| 95 | S2MPS13_REG_L19CTRL, | ||
| 96 | S2MPS13_REG_L20CTRL, | ||
| 97 | S2MPS13_REG_L21CTRL, | ||
| 98 | S2MPS13_REG_L22CTRL, | ||
| 99 | S2MPS13_REG_L23CTRL, | ||
| 100 | S2MPS13_REG_L24CTRL, | ||
| 101 | S2MPS13_REG_L25CTRL, | ||
| 102 | S2MPS13_REG_L26CTRL, | ||
| 103 | S2MPS13_REG_L27CTRL, | ||
| 104 | S2MPS13_REG_L28CTRL, | ||
| 105 | S2MPS13_REG_L30CTRL, | ||
| 106 | S2MPS13_REG_L31CTRL, | ||
| 107 | S2MPS13_REG_L32CTRL, | ||
| 108 | S2MPS13_REG_L33CTRL, | ||
| 109 | S2MPS13_REG_L34CTRL, | ||
| 110 | S2MPS13_REG_L35CTRL, | ||
| 111 | S2MPS13_REG_L36CTRL, | ||
| 112 | S2MPS13_REG_L37CTRL, | ||
| 113 | S2MPS13_REG_L38CTRL, | ||
| 114 | S2MPS13_REG_L39CTRL, | ||
| 115 | S2MPS13_REG_L40CTRL, | ||
| 116 | S2MPS13_REG_LDODSCH1, | ||
| 117 | S2MPS13_REG_LDODSCH2, | ||
| 118 | S2MPS13_REG_LDODSCH3, | ||
| 119 | S2MPS13_REG_LDODSCH4, | ||
| 120 | S2MPS13_REG_LDODSCH5, | ||
| 121 | }; | ||
| 122 | |||
| 123 | /* regulator ids */ | ||
| 124 | enum s2mps13_regulators { | ||
| 125 | S2MPS13_LDO1, | ||
| 126 | S2MPS13_LDO2, | ||
| 127 | S2MPS13_LDO3, | ||
| 128 | S2MPS13_LDO4, | ||
| 129 | S2MPS13_LDO5, | ||
| 130 | S2MPS13_LDO6, | ||
| 131 | S2MPS13_LDO7, | ||
| 132 | S2MPS13_LDO8, | ||
| 133 | S2MPS13_LDO9, | ||
| 134 | S2MPS13_LDO10, | ||
| 135 | S2MPS13_LDO11, | ||
| 136 | S2MPS13_LDO12, | ||
| 137 | S2MPS13_LDO13, | ||
| 138 | S2MPS13_LDO14, | ||
| 139 | S2MPS13_LDO15, | ||
| 140 | S2MPS13_LDO16, | ||
| 141 | S2MPS13_LDO17, | ||
| 142 | S2MPS13_LDO18, | ||
| 143 | S2MPS13_LDO19, | ||
| 144 | S2MPS13_LDO20, | ||
| 145 | S2MPS13_LDO21, | ||
| 146 | S2MPS13_LDO22, | ||
| 147 | S2MPS13_LDO23, | ||
| 148 | S2MPS13_LDO24, | ||
| 149 | S2MPS13_LDO25, | ||
| 150 | S2MPS13_LDO26, | ||
| 151 | S2MPS13_LDO27, | ||
| 152 | S2MPS13_LDO28, | ||
| 153 | S2MPS13_LDO29, | ||
| 154 | S2MPS13_LDO30, | ||
| 155 | S2MPS13_LDO31, | ||
| 156 | S2MPS13_LDO32, | ||
| 157 | S2MPS13_LDO33, | ||
| 158 | S2MPS13_LDO34, | ||
| 159 | S2MPS13_LDO35, | ||
| 160 | S2MPS13_LDO36, | ||
| 161 | S2MPS13_LDO37, | ||
| 162 | S2MPS13_LDO38, | ||
| 163 | S2MPS13_LDO39, | ||
| 164 | S2MPS13_LDO40, | ||
| 165 | S2MPS13_BUCK1, | ||
| 166 | S2MPS13_BUCK2, | ||
| 167 | S2MPS13_BUCK3, | ||
| 168 | S2MPS13_BUCK4, | ||
| 169 | S2MPS13_BUCK5, | ||
| 170 | S2MPS13_BUCK6, | ||
| 171 | S2MPS13_BUCK7, | ||
| 172 | S2MPS13_BUCK8, | ||
| 173 | S2MPS13_BUCK9, | ||
| 174 | S2MPS13_BUCK10, | ||
| 175 | |||
| 176 | S2MPS13_REGULATOR_MAX, | ||
| 177 | }; | ||
| 178 | |||
| 179 | /* | ||
| 180 | * Default ramp delay in uv/us. Datasheet says that ramp delay can be | ||
| 181 | * controlled however it does not specify which register is used for that. | ||
| 182 | * Let's assume that default value will be set. | ||
| 183 | */ | ||
| 184 | #define S2MPS13_BUCK_RAMP_DELAY 12500 | ||
| 185 | |||
| 186 | #endif /* __LINUX_MFD_S2MPS13_H */ | ||
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h index ff44374a1a4e..c877cad61a13 100644 --- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | |||
| @@ -395,4 +395,43 @@ | |||
| 395 | #define IMX6SL_GPR1_FEC_CLOCK_MUX1_SEL_MASK (0x3 << 17) | 395 | #define IMX6SL_GPR1_FEC_CLOCK_MUX1_SEL_MASK (0x3 << 17) |
| 396 | #define IMX6SL_GPR1_FEC_CLOCK_MUX2_SEL_MASK (0x1 << 14) | 396 | #define IMX6SL_GPR1_FEC_CLOCK_MUX2_SEL_MASK (0x1 << 14) |
| 397 | 397 | ||
| 398 | /* For imx6sx iomux gpr register field define */ | ||
| 399 | #define IMX6SX_GPR1_VDEC_SW_RST_MASK (0x1 << 20) | ||
| 400 | #define IMX6SX_GPR1_VDEC_SW_RST_RESET (0x1 << 20) | ||
| 401 | #define IMX6SX_GPR1_VDEC_SW_RST_RELEASE (0x0 << 20) | ||
| 402 | #define IMX6SX_GPR1_VADC_SW_RST_MASK (0x1 << 19) | ||
| 403 | #define IMX6SX_GPR1_VADC_SW_RST_RESET (0x1 << 19) | ||
| 404 | #define IMX6SX_GPR1_VADC_SW_RST_RELEASE (0x0 << 19) | ||
| 405 | #define IMX6SX_GPR1_FEC_CLOCK_MUX_SEL_MASK (0x3 << 13) | ||
| 406 | #define IMX6SX_GPR1_FEC_CLOCK_PAD_DIR_MASK (0x3 << 17) | ||
| 407 | #define IMX6SX_GPR1_FEC_CLOCK_MUX_SEL_EXT (0x3 << 13) | ||
| 408 | |||
| 409 | #define IMX6SX_GPR4_FEC_ENET1_STOP_REQ (0x1 << 3) | ||
| 410 | #define IMX6SX_GPR4_FEC_ENET2_STOP_REQ (0x1 << 4) | ||
| 411 | |||
| 412 | #define IMX6SX_GPR5_DISP_MUX_LDB_CTRL_MASK (0x1 << 3) | ||
| 413 | #define IMX6SX_GPR5_DISP_MUX_LDB_CTRL_LCDIF1 (0x0 << 3) | ||
| 414 | #define IMX6SX_GPR5_DISP_MUX_LDB_CTRL_LCDIF2 (0x1 << 3) | ||
| 415 | |||
| 416 | #define IMX6SX_GPR5_CSI2_MUX_CTRL_MASK (0x3 << 27) | ||
| 417 | #define IMX6SX_GPR5_CSI2_MUX_CTRL_EXT_PIN (0x0 << 27) | ||
| 418 | #define IMX6SX_GPR5_CSI2_MUX_CTRL_CVD (0x1 << 27) | ||
| 419 | #define IMX6SX_GPR5_CSI2_MUX_CTRL_VDAC_TO_CSI (0x2 << 27) | ||
| 420 | #define IMX6SX_GPR5_CSI2_MUX_CTRL_GND (0x3 << 27) | ||
| 421 | #define IMX6SX_GPR5_VADC_TO_CSI_CAPTURE_EN_MASK (0x1 << 26) | ||
| 422 | #define IMX6SX_GPR5_VADC_TO_CSI_CAPTURE_EN_ENABLE (0x1 << 26) | ||
| 423 | #define IMX6SX_GPR5_VADC_TO_CSI_CAPTURE_EN_DISABLE (0x0 << 26) | ||
| 424 | #define IMX6SX_GPR5_CSI1_MUX_CTRL_MASK (0x3 << 4) | ||
| 425 | #define IMX6SX_GPR5_CSI1_MUX_CTRL_EXT_PIN (0x0 << 4) | ||
| 426 | #define IMX6SX_GPR5_CSI1_MUX_CTRL_CVD (0x1 << 4) | ||
| 427 | #define IMX6SX_GPR5_CSI1_MUX_CTRL_VDAC_TO_CSI (0x2 << 4) | ||
| 428 | #define IMX6SX_GPR5_CSI1_MUX_CTRL_GND (0x3 << 4) | ||
| 429 | |||
| 430 | #define IMX6SX_GPR5_DISP_MUX_DCIC2_LCDIF2 (0x0 << 2) | ||
| 431 | #define IMX6SX_GPR5_DISP_MUX_DCIC2_LVDS (0x1 << 2) | ||
| 432 | #define IMX6SX_GPR5_DISP_MUX_DCIC2_MASK (0x1 << 2) | ||
| 433 | #define IMX6SX_GPR5_DISP_MUX_DCIC1_LCDIF1 (0x0 << 1) | ||
| 434 | #define IMX6SX_GPR5_DISP_MUX_DCIC1_LVDS (0x1 << 1) | ||
| 435 | #define IMX6SX_GPR5_DISP_MUX_DCIC1_MASK (0x1 << 1) | ||
| 436 | |||
| 398 | #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */ | 437 | #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */ |
diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h index e6088c2e2092..e1c12d84c26a 100644 --- a/include/linux/mfd/tc3589x.h +++ b/include/linux/mfd/tc3589x.h | |||
| @@ -164,13 +164,10 @@ struct tc3589x_keypad_platform_data { | |||
| 164 | 164 | ||
| 165 | /** | 165 | /** |
| 166 | * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data | 166 | * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data |
| 167 | * @gpio_base: first gpio number assigned to TC3589x. A maximum of | ||
| 168 | * %TC3589x_NR_GPIOS GPIOs will be allocated. | ||
| 169 | * @setup: callback for board-specific initialization | 167 | * @setup: callback for board-specific initialization |
| 170 | * @remove: callback for board-specific teardown | 168 | * @remove: callback for board-specific teardown |
| 171 | */ | 169 | */ |
| 172 | struct tc3589x_gpio_platform_data { | 170 | struct tc3589x_gpio_platform_data { |
| 173 | int gpio_base; | ||
| 174 | void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base); | 171 | void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base); |
| 175 | void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base); | 172 | void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base); |
| 176 | }; | 173 | }; |
| @@ -178,18 +175,13 @@ struct tc3589x_gpio_platform_data { | |||
| 178 | /** | 175 | /** |
| 179 | * struct tc3589x_platform_data - TC3589x platform data | 176 | * struct tc3589x_platform_data - TC3589x platform data |
| 180 | * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*) | 177 | * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*) |
| 181 | * @irq_base: base IRQ number. %TC3589x_NR_IRQS irqs will be used. | ||
| 182 | * @gpio: GPIO-specific platform data | 178 | * @gpio: GPIO-specific platform data |
| 183 | * @keypad: keypad-specific platform data | 179 | * @keypad: keypad-specific platform data |
| 184 | */ | 180 | */ |
| 185 | struct tc3589x_platform_data { | 181 | struct tc3589x_platform_data { |
| 186 | unsigned int block; | 182 | unsigned int block; |
| 187 | int irq_base; | ||
| 188 | struct tc3589x_gpio_platform_data *gpio; | 183 | struct tc3589x_gpio_platform_data *gpio; |
| 189 | const struct tc3589x_keypad_platform_data *keypad; | 184 | const struct tc3589x_keypad_platform_data *keypad; |
| 190 | }; | 185 | }; |
| 191 | 186 | ||
| 192 | #define TC3589x_NR_GPIOS 24 | ||
| 193 | #define TC3589x_NR_IRQS TC3589x_INT_GPIO(TC3589x_NR_GPIOS) | ||
| 194 | |||
| 195 | #endif | 187 | #endif |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index b0692d28f8e6..4d69c00497bd 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -88,6 +88,9 @@ struct mmc_ext_csd { | |||
| 88 | unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ | 88 | unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ |
| 89 | unsigned int boot_ro_lock; /* ro lock support */ | 89 | unsigned int boot_ro_lock; /* ro lock support */ |
| 90 | bool boot_ro_lockable; | 90 | bool boot_ro_lockable; |
| 91 | bool ffu_capable; /* Firmware upgrade support */ | ||
| 92 | #define MMC_FIRMWARE_LEN 8 | ||
| 93 | u8 fwrev[MMC_FIRMWARE_LEN]; /* FW version */ | ||
| 91 | u8 raw_exception_status; /* 54 */ | 94 | u8 raw_exception_status; /* 54 */ |
| 92 | u8 raw_partition_support; /* 160 */ | 95 | u8 raw_partition_support; /* 160 */ |
| 93 | u8 raw_rpmb_size_mult; /* 168 */ | 96 | u8 raw_rpmb_size_mult; /* 168 */ |
| @@ -509,24 +512,8 @@ static inline int mmc_card_broken_irq_polling(const struct mmc_card *c) | |||
| 509 | 512 | ||
| 510 | #define mmc_dev_to_card(d) container_of(d, struct mmc_card, dev) | 513 | #define mmc_dev_to_card(d) container_of(d, struct mmc_card, dev) |
| 511 | 514 | ||
| 512 | #define mmc_list_to_card(l) container_of(l, struct mmc_card, node) | 515 | extern int mmc_register_driver(struct device_driver *); |
| 513 | #define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) | 516 | extern void mmc_unregister_driver(struct device_driver *); |
| 514 | #define mmc_set_drvdata(c,d) dev_set_drvdata(&(c)->dev, d) | ||
| 515 | |||
| 516 | /* | ||
| 517 | * MMC device driver (e.g., Flash card, I/O card...) | ||
| 518 | */ | ||
| 519 | struct mmc_driver { | ||
| 520 | struct device_driver drv; | ||
| 521 | int (*probe)(struct mmc_card *); | ||
| 522 | void (*remove)(struct mmc_card *); | ||
| 523 | int (*suspend)(struct mmc_card *); | ||
| 524 | int (*resume)(struct mmc_card *); | ||
| 525 | void (*shutdown)(struct mmc_card *); | ||
| 526 | }; | ||
| 527 | |||
| 528 | extern int mmc_register_driver(struct mmc_driver *); | ||
| 529 | extern void mmc_unregister_driver(struct mmc_driver *); | ||
| 530 | 517 | ||
| 531 | extern void mmc_fixup_device(struct mmc_card *card, | 518 | extern void mmc_fixup_device(struct mmc_card *card, |
| 532 | const struct mmc_fixup *table); | 519 | const struct mmc_fixup *table); |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index f206e29f94d7..cb2b0400d284 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
| @@ -154,7 +154,8 @@ extern void mmc_start_bkops(struct mmc_card *card, bool from_exception); | |||
| 154 | extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, | 154 | extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, |
| 155 | bool, bool); | 155 | bool, bool); |
| 156 | extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); | 156 | extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); |
| 157 | extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd); | 157 | extern int mmc_send_tuning(struct mmc_host *host); |
| 158 | extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd); | ||
| 158 | 159 | ||
| 159 | #define MMC_ERASE_ARG 0x00000000 | 160 | #define MMC_ERASE_ARG 0x00000000 |
| 160 | #define MMC_SECURE_ERASE_ARG 0x80000000 | 161 | #define MMC_SECURE_ERASE_ARG 0x80000000 |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 001366927cf4..42b724e8d503 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
| @@ -54,6 +54,7 @@ struct mmc_data; | |||
| 54 | * transfer is in progress. | 54 | * transfer is in progress. |
| 55 | * @use_dma: Whether DMA channel is initialized or not. | 55 | * @use_dma: Whether DMA channel is initialized or not. |
| 56 | * @using_dma: Whether DMA is in use for the current transfer. | 56 | * @using_dma: Whether DMA is in use for the current transfer. |
| 57 | * @dma_64bit_address: Whether DMA supports 64-bit address mode or not. | ||
| 57 | * @sg_dma: Bus address of DMA buffer. | 58 | * @sg_dma: Bus address of DMA buffer. |
| 58 | * @sg_cpu: Virtual address of DMA buffer. | 59 | * @sg_cpu: Virtual address of DMA buffer. |
| 59 | * @dma_ops: Pointer to platform-specific DMA callbacks. | 60 | * @dma_ops: Pointer to platform-specific DMA callbacks. |
| @@ -96,6 +97,7 @@ struct mmc_data; | |||
| 96 | * @quirks: Set of quirks that apply to specific versions of the IP. | 97 | * @quirks: Set of quirks that apply to specific versions of the IP. |
| 97 | * @irq_flags: The flags to be passed to request_irq. | 98 | * @irq_flags: The flags to be passed to request_irq. |
| 98 | * @irq: The irq value to be passed to request_irq. | 99 | * @irq: The irq value to be passed to request_irq. |
| 100 | * @sdio_id0: Number of slot0 in the SDIO interrupt registers. | ||
| 99 | * | 101 | * |
| 100 | * Locking | 102 | * Locking |
| 101 | * ======= | 103 | * ======= |
| @@ -135,11 +137,11 @@ struct dw_mci { | |||
| 135 | struct mmc_command stop_abort; | 137 | struct mmc_command stop_abort; |
| 136 | unsigned int prev_blksz; | 138 | unsigned int prev_blksz; |
| 137 | unsigned char timing; | 139 | unsigned char timing; |
| 138 | struct workqueue_struct *card_workqueue; | ||
| 139 | 140 | ||
| 140 | /* DMA interface members*/ | 141 | /* DMA interface members*/ |
| 141 | int use_dma; | 142 | int use_dma; |
| 142 | int using_dma; | 143 | int using_dma; |
| 144 | int dma_64bit_address; | ||
| 143 | 145 | ||
| 144 | dma_addr_t sg_dma; | 146 | dma_addr_t sg_dma; |
| 145 | void *sg_cpu; | 147 | void *sg_cpu; |
| @@ -154,7 +156,6 @@ struct dw_mci { | |||
| 154 | u32 stop_cmdr; | 156 | u32 stop_cmdr; |
| 155 | u32 dir_status; | 157 | u32 dir_status; |
| 156 | struct tasklet_struct tasklet; | 158 | struct tasklet_struct tasklet; |
| 157 | struct work_struct card_work; | ||
| 158 | unsigned long pending_events; | 159 | unsigned long pending_events; |
| 159 | unsigned long completed_events; | 160 | unsigned long completed_events; |
| 160 | enum dw_mci_state state; | 161 | enum dw_mci_state state; |
| @@ -193,6 +194,8 @@ struct dw_mci { | |||
| 193 | bool vqmmc_enabled; | 194 | bool vqmmc_enabled; |
| 194 | unsigned long irq_flags; /* IRQ flags */ | 195 | unsigned long irq_flags; /* IRQ flags */ |
| 195 | int irq; | 196 | int irq; |
| 197 | |||
| 198 | int sdio_id0; | ||
| 196 | }; | 199 | }; |
| 197 | 200 | ||
| 198 | /* DMA ops for Internal/External DMAC interface */ | 201 | /* DMA ops for Internal/External DMAC interface */ |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index df0c15396bbf..9f322706f7cb 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -289,6 +289,7 @@ struct mmc_host { | |||
| 289 | #define MMC_CAP2_HS400_1_2V (1 << 16) /* Can support HS400 1.2V */ | 289 | #define MMC_CAP2_HS400_1_2V (1 << 16) /* Can support HS400 1.2V */ |
| 290 | #define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \ | 290 | #define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \ |
| 291 | MMC_CAP2_HS400_1_2V) | 291 | MMC_CAP2_HS400_1_2V) |
| 292 | #define MMC_CAP2_HSX00_1_2V (MMC_CAP2_HS200_1_2V_SDR | MMC_CAP2_HS400_1_2V) | ||
| 292 | #define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17) | 293 | #define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17) |
| 293 | 294 | ||
| 294 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 295 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 1cd00b3a75b9..49ad7a943638 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -296,6 +296,7 @@ struct _mmc_csd { | |||
| 296 | #define EXT_CSD_SANITIZE_START 165 /* W */ | 296 | #define EXT_CSD_SANITIZE_START 165 /* W */ |
| 297 | #define EXT_CSD_WR_REL_PARAM 166 /* RO */ | 297 | #define EXT_CSD_WR_REL_PARAM 166 /* RO */ |
| 298 | #define EXT_CSD_RPMB_MULT 168 /* RO */ | 298 | #define EXT_CSD_RPMB_MULT 168 /* RO */ |
| 299 | #define EXT_CSD_FW_CONFIG 169 /* R/W */ | ||
| 299 | #define EXT_CSD_BOOT_WP 173 /* R/W */ | 300 | #define EXT_CSD_BOOT_WP 173 /* R/W */ |
| 300 | #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ | 301 | #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ |
| 301 | #define EXT_CSD_PART_CONFIG 179 /* R/W */ | 302 | #define EXT_CSD_PART_CONFIG 179 /* R/W */ |
| @@ -332,6 +333,8 @@ struct _mmc_csd { | |||
| 332 | #define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */ | 333 | #define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */ |
| 333 | #define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ | 334 | #define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ |
| 334 | #define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */ | 335 | #define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */ |
| 336 | #define EXT_CSD_FIRMWARE_VERSION 254 /* RO, 8 bytes */ | ||
| 337 | #define EXT_CSD_SUPPORTED_MODE 493 /* RO */ | ||
| 335 | #define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */ | 338 | #define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */ |
| 336 | #define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */ | 339 | #define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */ |
| 337 | #define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */ | 340 | #define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */ |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index dba793e3a331..375af80bde7d 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
| @@ -100,6 +100,12 @@ struct sdhci_host { | |||
| 100 | #define SDHCI_QUIRK2_BROKEN_DDR50 (1<<7) | 100 | #define SDHCI_QUIRK2_BROKEN_DDR50 (1<<7) |
| 101 | /* Stop command (CMD12) can set Transfer Complete when not using MMC_RSP_BUSY */ | 101 | /* Stop command (CMD12) can set Transfer Complete when not using MMC_RSP_BUSY */ |
| 102 | #define SDHCI_QUIRK2_STOP_WITH_TC (1<<8) | 102 | #define SDHCI_QUIRK2_STOP_WITH_TC (1<<8) |
| 103 | /* Controller does not support 64-bit DMA */ | ||
| 104 | #define SDHCI_QUIRK2_BROKEN_64_BIT_DMA (1<<9) | ||
| 105 | /* need clear transfer mode register before send cmd */ | ||
| 106 | #define SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD (1<<10) | ||
| 107 | /* Capability register bit-63 indicates HS400 support */ | ||
| 108 | #define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11) | ||
| 103 | 109 | ||
| 104 | int irq; /* Device IRQ */ | 110 | int irq; /* Device IRQ */ |
| 105 | void __iomem *ioaddr; /* Mapped address */ | 111 | void __iomem *ioaddr; /* Mapped address */ |
| @@ -130,6 +136,7 @@ struct sdhci_host { | |||
| 130 | #define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ | 136 | #define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ |
| 131 | #define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */ | 137 | #define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */ |
| 132 | #define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ | 138 | #define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ |
| 139 | #define SDHCI_USE_64_BIT_DMA (1<<12) /* Use 64-bit DMA */ | ||
| 133 | 140 | ||
| 134 | unsigned int version; /* SDHCI spec. version */ | 141 | unsigned int version; /* SDHCI spec. version */ |
| 135 | 142 | ||
| @@ -155,12 +162,19 @@ struct sdhci_host { | |||
| 155 | 162 | ||
| 156 | int sg_count; /* Mapped sg entries */ | 163 | int sg_count; /* Mapped sg entries */ |
| 157 | 164 | ||
| 158 | u8 *adma_desc; /* ADMA descriptor table */ | 165 | void *adma_table; /* ADMA descriptor table */ |
| 159 | u8 *align_buffer; /* Bounce buffer */ | 166 | void *align_buffer; /* Bounce buffer */ |
| 167 | |||
| 168 | size_t adma_table_sz; /* ADMA descriptor table size */ | ||
| 169 | size_t align_buffer_sz; /* Bounce buffer size */ | ||
| 160 | 170 | ||
| 161 | dma_addr_t adma_addr; /* Mapped ADMA descr. table */ | 171 | dma_addr_t adma_addr; /* Mapped ADMA descr. table */ |
| 162 | dma_addr_t align_addr; /* Mapped bounce buffer */ | 172 | dma_addr_t align_addr; /* Mapped bounce buffer */ |
| 163 | 173 | ||
| 174 | unsigned int desc_sz; /* ADMA descriptor size */ | ||
| 175 | unsigned int align_sz; /* ADMA alignment */ | ||
| 176 | unsigned int align_mask; /* ADMA alignment mask */ | ||
| 177 | |||
| 164 | struct tasklet_struct finish_tasklet; /* Tasklet structures */ | 178 | struct tasklet_struct finish_tasklet; /* Tasklet structures */ |
| 165 | 179 | ||
| 166 | struct timer_list timer; /* Timer for timeouts */ | 180 | struct timer_list timer; /* Timer for timeouts */ |
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index 50f0bc952328..aab032a6ae61 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
| @@ -84,8 +84,6 @@ struct sdio_driver { | |||
| 84 | struct device_driver drv; | 84 | struct device_driver drv; |
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | #define to_sdio_driver(d) container_of(d, struct sdio_driver, drv) | ||
| 88 | |||
| 89 | /** | 87 | /** |
| 90 | * SDIO_DEVICE - macro used to describe a specific SDIO device | 88 | * SDIO_DEVICE - macro used to describe a specific SDIO device |
| 91 | * @vend: the 16 bit manufacturer code | 89 | * @vend: the 16 bit manufacturer code |
diff --git a/include/linux/of.h b/include/linux/of.h index 29f0adc5f3e4..c55b50018ac4 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -922,4 +922,15 @@ static inline int of_changeset_update_property(struct of_changeset *ocs, | |||
| 922 | /* CONFIG_OF_RESOLVE api */ | 922 | /* CONFIG_OF_RESOLVE api */ |
| 923 | extern int of_resolve_phandles(struct device_node *tree); | 923 | extern int of_resolve_phandles(struct device_node *tree); |
| 924 | 924 | ||
| 925 | /** | ||
| 926 | * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node | ||
| 927 | * @np: Pointer to the given device_node | ||
| 928 | * | ||
| 929 | * return true if present false otherwise | ||
| 930 | */ | ||
| 931 | static inline bool of_device_is_system_power_controller(const struct device_node *np) | ||
| 932 | { | ||
| 933 | return of_property_read_bool(np, "system-power-controller"); | ||
| 934 | } | ||
| 935 | |||
| 925 | #endif /* _LINUX_OF_H */ | 936 | #endif /* _LINUX_OF_H */ |
diff --git a/include/linux/omap-gpmc.h b/include/linux/omap-gpmc.h new file mode 100644 index 000000000000..c2080eebbb47 --- /dev/null +++ b/include/linux/omap-gpmc.h | |||
| @@ -0,0 +1,199 @@ | |||
| 1 | /* | ||
| 2 | * OMAP GPMC (General Purpose Memory Controller) defines | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms of the GNU General Public License as published by the | ||
| 6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 7 | * option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | /* Maximum Number of Chip Selects */ | ||
| 11 | #define GPMC_CS_NUM 8 | ||
| 12 | |||
| 13 | #define GPMC_CONFIG_WP 0x00000005 | ||
| 14 | |||
| 15 | #define GPMC_IRQ_FIFOEVENTENABLE 0x01 | ||
| 16 | #define GPMC_IRQ_COUNT_EVENT 0x02 | ||
| 17 | |||
| 18 | #define GPMC_BURST_4 4 /* 4 word burst */ | ||
| 19 | #define GPMC_BURST_8 8 /* 8 word burst */ | ||
| 20 | #define GPMC_BURST_16 16 /* 16 word burst */ | ||
| 21 | #define GPMC_DEVWIDTH_8BIT 1 /* 8-bit device width */ | ||
| 22 | #define GPMC_DEVWIDTH_16BIT 2 /* 16-bit device width */ | ||
| 23 | #define GPMC_MUX_AAD 1 /* Addr-Addr-Data multiplex */ | ||
| 24 | #define GPMC_MUX_AD 2 /* Addr-Data multiplex */ | ||
| 25 | |||
| 26 | /* bool type time settings */ | ||
| 27 | struct gpmc_bool_timings { | ||
| 28 | bool cycle2cyclediffcsen; | ||
| 29 | bool cycle2cyclesamecsen; | ||
| 30 | bool we_extra_delay; | ||
| 31 | bool oe_extra_delay; | ||
| 32 | bool adv_extra_delay; | ||
| 33 | bool cs_extra_delay; | ||
| 34 | bool time_para_granularity; | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* | ||
| 38 | * Note that all values in this struct are in nanoseconds except sync_clk | ||
| 39 | * (which is in picoseconds), while the register values are in gpmc_fck cycles. | ||
| 40 | */ | ||
| 41 | struct gpmc_timings { | ||
| 42 | /* Minimum clock period for synchronous mode (in picoseconds) */ | ||
| 43 | u32 sync_clk; | ||
| 44 | |||
| 45 | /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */ | ||
| 46 | u32 cs_on; /* Assertion time */ | ||
| 47 | u32 cs_rd_off; /* Read deassertion time */ | ||
| 48 | u32 cs_wr_off; /* Write deassertion time */ | ||
| 49 | |||
| 50 | /* ADV signal timings corresponding to GPMC_CONFIG3 */ | ||
| 51 | u32 adv_on; /* Assertion time */ | ||
| 52 | u32 adv_rd_off; /* Read deassertion time */ | ||
| 53 | u32 adv_wr_off; /* Write deassertion time */ | ||
| 54 | |||
| 55 | /* WE signals timings corresponding to GPMC_CONFIG4 */ | ||
| 56 | u32 we_on; /* WE assertion time */ | ||
| 57 | u32 we_off; /* WE deassertion time */ | ||
| 58 | |||
| 59 | /* OE signals timings corresponding to GPMC_CONFIG4 */ | ||
| 60 | u32 oe_on; /* OE assertion time */ | ||
| 61 | u32 oe_off; /* OE deassertion time */ | ||
| 62 | |||
| 63 | /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */ | ||
| 64 | u32 page_burst_access; /* Multiple access word delay */ | ||
| 65 | u32 access; /* Start-cycle to first data valid delay */ | ||
| 66 | u32 rd_cycle; /* Total read cycle time */ | ||
| 67 | u32 wr_cycle; /* Total write cycle time */ | ||
| 68 | |||
| 69 | u32 bus_turnaround; | ||
| 70 | u32 cycle2cycle_delay; | ||
| 71 | |||
| 72 | u32 wait_monitoring; | ||
| 73 | u32 clk_activation; | ||
| 74 | |||
| 75 | /* The following are only on OMAP3430 */ | ||
| 76 | u32 wr_access; /* WRACCESSTIME */ | ||
| 77 | u32 wr_data_mux_bus; /* WRDATAONADMUXBUS */ | ||
| 78 | |||
| 79 | struct gpmc_bool_timings bool_timings; | ||
| 80 | }; | ||
| 81 | |||
| 82 | /* Device timings in picoseconds */ | ||
| 83 | struct gpmc_device_timings { | ||
| 84 | u32 t_ceasu; /* address setup to CS valid */ | ||
| 85 | u32 t_avdasu; /* address setup to ADV valid */ | ||
| 86 | /* XXX: try to combine t_avdp_r & t_avdp_w. Issue is | ||
| 87 | * of tusb using these timings even for sync whilst | ||
| 88 | * ideally for adv_rd/(wr)_off it should have considered | ||
| 89 | * t_avdh instead. This indirectly necessitates r/w | ||
| 90 | * variations of t_avdp as it is possible to have one | ||
| 91 | * sync & other async | ||
| 92 | */ | ||
| 93 | u32 t_avdp_r; /* ADV low time (what about t_cer ?) */ | ||
| 94 | u32 t_avdp_w; | ||
| 95 | u32 t_aavdh; /* address hold time */ | ||
| 96 | u32 t_oeasu; /* address setup to OE valid */ | ||
| 97 | u32 t_aa; /* access time from ADV assertion */ | ||
| 98 | u32 t_iaa; /* initial access time */ | ||
| 99 | u32 t_oe; /* access time from OE assertion */ | ||
| 100 | u32 t_ce; /* access time from CS asertion */ | ||
| 101 | u32 t_rd_cycle; /* read cycle time */ | ||
| 102 | u32 t_cez_r; /* read CS deassertion to high Z */ | ||
| 103 | u32 t_cez_w; /* write CS deassertion to high Z */ | ||
| 104 | u32 t_oez; /* OE deassertion to high Z */ | ||
| 105 | u32 t_weasu; /* address setup to WE valid */ | ||
| 106 | u32 t_wpl; /* write assertion time */ | ||
| 107 | u32 t_wph; /* write deassertion time */ | ||
| 108 | u32 t_wr_cycle; /* write cycle time */ | ||
| 109 | |||
| 110 | u32 clk; | ||
| 111 | u32 t_bacc; /* burst access valid clock to output delay */ | ||
| 112 | u32 t_ces; /* CS setup time to clk */ | ||
| 113 | u32 t_avds; /* ADV setup time to clk */ | ||
| 114 | u32 t_avdh; /* ADV hold time from clk */ | ||
| 115 | u32 t_ach; /* address hold time from clk */ | ||
| 116 | u32 t_rdyo; /* clk to ready valid */ | ||
| 117 | |||
| 118 | u32 t_ce_rdyz; /* XXX: description ?, or use t_cez instead */ | ||
| 119 | u32 t_ce_avd; /* CS on to ADV on delay */ | ||
| 120 | |||
| 121 | /* XXX: check the possibility of combining | ||
| 122 | * cyc_aavhd_oe & cyc_aavdh_we | ||
| 123 | */ | ||
| 124 | u8 cyc_aavdh_oe;/* read address hold time in cycles */ | ||
| 125 | u8 cyc_aavdh_we;/* write address hold time in cycles */ | ||
| 126 | u8 cyc_oe; /* access time from OE assertion in cycles */ | ||
| 127 | u8 cyc_wpl; /* write deassertion time in cycles */ | ||
| 128 | u32 cyc_iaa; /* initial access time in cycles */ | ||
| 129 | |||
| 130 | /* extra delays */ | ||
| 131 | bool ce_xdelay; | ||
| 132 | bool avd_xdelay; | ||
| 133 | bool oe_xdelay; | ||
| 134 | bool we_xdelay; | ||
| 135 | }; | ||
| 136 | |||
| 137 | struct gpmc_settings { | ||
| 138 | bool burst_wrap; /* enables wrap bursting */ | ||
| 139 | bool burst_read; /* enables read page/burst mode */ | ||
| 140 | bool burst_write; /* enables write page/burst mode */ | ||
| 141 | bool device_nand; /* device is NAND */ | ||
| 142 | bool sync_read; /* enables synchronous reads */ | ||
| 143 | bool sync_write; /* enables synchronous writes */ | ||
| 144 | bool wait_on_read; /* monitor wait on reads */ | ||
| 145 | bool wait_on_write; /* monitor wait on writes */ | ||
| 146 | u32 burst_len; /* page/burst length */ | ||
| 147 | u32 device_width; /* device bus width (8 or 16 bit) */ | ||
| 148 | u32 mux_add_data; /* multiplex address & data */ | ||
| 149 | u32 wait_pin; /* wait-pin to be used */ | ||
| 150 | }; | ||
| 151 | |||
| 152 | extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t, | ||
| 153 | struct gpmc_settings *gpmc_s, | ||
| 154 | struct gpmc_device_timings *dev_t); | ||
| 155 | |||
| 156 | struct gpmc_nand_regs; | ||
| 157 | struct device_node; | ||
| 158 | |||
| 159 | extern void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs); | ||
| 160 | extern int gpmc_get_client_irq(unsigned irq_config); | ||
| 161 | |||
| 162 | extern unsigned int gpmc_ticks_to_ns(unsigned int ticks); | ||
| 163 | |||
| 164 | extern void gpmc_cs_write_reg(int cs, int idx, u32 val); | ||
| 165 | extern int gpmc_calc_divider(unsigned int sync_clk); | ||
| 166 | extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t); | ||
| 167 | extern int gpmc_cs_program_settings(int cs, struct gpmc_settings *p); | ||
| 168 | extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base); | ||
| 169 | extern void gpmc_cs_free(int cs); | ||
| 170 | extern int gpmc_configure(int cmd, int wval); | ||
| 171 | extern void gpmc_read_settings_dt(struct device_node *np, | ||
| 172 | struct gpmc_settings *p); | ||
| 173 | |||
| 174 | extern void omap3_gpmc_save_context(void); | ||
| 175 | extern void omap3_gpmc_restore_context(void); | ||
| 176 | |||
| 177 | struct gpmc_timings; | ||
| 178 | struct omap_nand_platform_data; | ||
| 179 | struct omap_onenand_platform_data; | ||
| 180 | |||
| 181 | #if IS_ENABLED(CONFIG_MTD_NAND_OMAP2) | ||
| 182 | extern int gpmc_nand_init(struct omap_nand_platform_data *d, | ||
| 183 | struct gpmc_timings *gpmc_t); | ||
| 184 | #else | ||
| 185 | static inline int gpmc_nand_init(struct omap_nand_platform_data *d, | ||
| 186 | struct gpmc_timings *gpmc_t) | ||
| 187 | { | ||
| 188 | return 0; | ||
| 189 | } | ||
| 190 | #endif | ||
| 191 | |||
| 192 | #if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2) | ||
| 193 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); | ||
| 194 | #else | ||
| 195 | #define board_onenand_data NULL | ||
| 196 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) | ||
| 197 | { | ||
| 198 | } | ||
| 199 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5be8db45e368..4c8ac5fcc224 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -331,6 +331,7 @@ struct pci_dev { | |||
| 331 | unsigned int is_added:1; | 331 | unsigned int is_added:1; |
| 332 | unsigned int is_busmaster:1; /* device is busmaster */ | 332 | unsigned int is_busmaster:1; /* device is busmaster */ |
| 333 | unsigned int no_msi:1; /* device may not use msi */ | 333 | unsigned int no_msi:1; /* device may not use msi */ |
| 334 | unsigned int no_64bit_msi:1; /* device may only use 32-bit MSIs */ | ||
| 334 | unsigned int block_cfg_access:1; /* config space access is blocked */ | 335 | unsigned int block_cfg_access:1; /* config space access is blocked */ |
| 335 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ | 336 | unsigned int broken_parity_status:1; /* Device generates false positive parity */ |
| 336 | unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */ | 337 | unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 1fa99a301817..97fb9f69aaed 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -522,6 +522,8 @@ | |||
| 522 | #define PCI_DEVICE_ID_AMD_15H_M10H_F3 0x1403 | 522 | #define PCI_DEVICE_ID_AMD_15H_M10H_F3 0x1403 |
| 523 | #define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d | 523 | #define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d |
| 524 | #define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e | 524 | #define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e |
| 525 | #define PCI_DEVICE_ID_AMD_15H_M60H_NB_F3 0x1573 | ||
| 526 | #define PCI_DEVICE_ID_AMD_15H_M60H_NB_F4 0x1574 | ||
| 525 | #define PCI_DEVICE_ID_AMD_15H_NB_F0 0x1600 | 527 | #define PCI_DEVICE_ID_AMD_15H_NB_F0 0x1600 |
| 526 | #define PCI_DEVICE_ID_AMD_15H_NB_F1 0x1601 | 528 | #define PCI_DEVICE_ID_AMD_15H_NB_F1 0x1601 |
| 527 | #define PCI_DEVICE_ID_AMD_15H_NB_F2 0x1602 | 529 | #define PCI_DEVICE_ID_AMD_15H_NB_F2 0x1602 |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 893a0d07986f..486e84ccb1f9 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -79,7 +79,7 @@ struct perf_branch_stack { | |||
| 79 | struct perf_branch_entry entries[0]; | 79 | struct perf_branch_entry entries[0]; |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | struct perf_regs_user { | 82 | struct perf_regs { |
| 83 | __u64 abi; | 83 | __u64 abi; |
| 84 | struct pt_regs *regs; | 84 | struct pt_regs *regs; |
| 85 | }; | 85 | }; |
| @@ -580,34 +580,40 @@ extern u64 perf_event_read_value(struct perf_event *event, | |||
| 580 | 580 | ||
| 581 | 581 | ||
| 582 | struct perf_sample_data { | 582 | struct perf_sample_data { |
| 583 | u64 type; | 583 | /* |
| 584 | * Fields set by perf_sample_data_init(), group so as to | ||
| 585 | * minimize the cachelines touched. | ||
| 586 | */ | ||
| 587 | u64 addr; | ||
| 588 | struct perf_raw_record *raw; | ||
| 589 | struct perf_branch_stack *br_stack; | ||
| 590 | u64 period; | ||
| 591 | u64 weight; | ||
| 592 | u64 txn; | ||
| 593 | union perf_mem_data_src data_src; | ||
| 584 | 594 | ||
| 595 | /* | ||
| 596 | * The other fields, optionally {set,used} by | ||
| 597 | * perf_{prepare,output}_sample(). | ||
| 598 | */ | ||
| 599 | u64 type; | ||
| 585 | u64 ip; | 600 | u64 ip; |
| 586 | struct { | 601 | struct { |
| 587 | u32 pid; | 602 | u32 pid; |
| 588 | u32 tid; | 603 | u32 tid; |
| 589 | } tid_entry; | 604 | } tid_entry; |
| 590 | u64 time; | 605 | u64 time; |
| 591 | u64 addr; | ||
| 592 | u64 id; | 606 | u64 id; |
| 593 | u64 stream_id; | 607 | u64 stream_id; |
| 594 | struct { | 608 | struct { |
| 595 | u32 cpu; | 609 | u32 cpu; |
| 596 | u32 reserved; | 610 | u32 reserved; |
| 597 | } cpu_entry; | 611 | } cpu_entry; |
| 598 | u64 period; | ||
| 599 | union perf_mem_data_src data_src; | ||
| 600 | struct perf_callchain_entry *callchain; | 612 | struct perf_callchain_entry *callchain; |
| 601 | struct perf_raw_record *raw; | 613 | struct perf_regs regs_user; |
| 602 | struct perf_branch_stack *br_stack; | 614 | struct perf_regs regs_intr; |
| 603 | struct perf_regs_user regs_user; | ||
| 604 | u64 stack_user_size; | 615 | u64 stack_user_size; |
| 605 | u64 weight; | 616 | } ____cacheline_aligned; |
| 606 | /* | ||
| 607 | * Transaction flags for abort events: | ||
| 608 | */ | ||
| 609 | u64 txn; | ||
| 610 | }; | ||
| 611 | 617 | ||
| 612 | /* default value for data source */ | 618 | /* default value for data source */ |
| 613 | #define PERF_MEM_NA (PERF_MEM_S(OP, NA) |\ | 619 | #define PERF_MEM_NA (PERF_MEM_S(OP, NA) |\ |
| @@ -624,9 +630,6 @@ static inline void perf_sample_data_init(struct perf_sample_data *data, | |||
| 624 | data->raw = NULL; | 630 | data->raw = NULL; |
| 625 | data->br_stack = NULL; | 631 | data->br_stack = NULL; |
| 626 | data->period = period; | 632 | data->period = period; |
| 627 | data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; | ||
| 628 | data->regs_user.regs = NULL; | ||
| 629 | data->stack_user_size = 0; | ||
| 630 | data->weight = 0; | 633 | data->weight = 0; |
| 631 | data->data_src.val = PERF_MEM_NA; | 634 | data->data_src.val = PERF_MEM_NA; |
| 632 | data->txn = 0; | 635 | data->txn = 0; |
diff --git a/include/linux/platform_data/hsmmc-omap.h b/include/linux/platform_data/hsmmc-omap.h new file mode 100644 index 000000000000..67bbcf0785f6 --- /dev/null +++ b/include/linux/platform_data/hsmmc-omap.h | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | /* | ||
| 2 | * MMC definitions for OMAP2 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Nokia Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | /* | ||
| 12 | * struct omap_hsmmc_dev_attr.flags possibilities | ||
| 13 | * | ||
| 14 | * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can | ||
| 15 | * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag | ||
| 16 | * should be set if this is the case. See for example Section 22.5.3 | ||
| 17 | * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia | ||
| 18 | * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). | ||
| 19 | * | ||
| 20 | * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers | ||
| 21 | * don't work correctly on some MMC controller instances on some | ||
| 22 | * OMAP3 SoCs; this flag should be set if this is the case. See | ||
| 23 | * for example Advisory 2.1.1.128 "MMC: Multiple Block Read | ||
| 24 | * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ | ||
| 25 | * Revision F (October 2010) (SPRZ278F). | ||
| 26 | */ | ||
| 27 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | ||
| 28 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | ||
| 29 | #define OMAP_HSMMC_SWAKEUP_MISSING BIT(2) | ||
| 30 | |||
| 31 | struct omap_hsmmc_dev_attr { | ||
| 32 | u8 flags; | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct mmc_card; | ||
| 36 | |||
| 37 | struct omap_hsmmc_platform_data { | ||
| 38 | /* back-link to device */ | ||
| 39 | struct device *dev; | ||
| 40 | |||
| 41 | /* set if your board has components or wiring that limits the | ||
| 42 | * maximum frequency on the MMC bus */ | ||
| 43 | unsigned int max_freq; | ||
| 44 | |||
| 45 | /* Integrating attributes from the omap_hwmod layer */ | ||
| 46 | u8 controller_flags; | ||
| 47 | |||
| 48 | /* Register offset deviation */ | ||
| 49 | u16 reg_offset; | ||
| 50 | |||
| 51 | /* | ||
| 52 | * 4/8 wires and any additional host capabilities | ||
| 53 | * need to OR'd all capabilities (ref. linux/mmc/host.h) | ||
| 54 | */ | ||
| 55 | u32 caps; /* Used for the MMC driver on 2430 and later */ | ||
| 56 | u32 pm_caps; /* PM capabilities of the mmc */ | ||
| 57 | |||
| 58 | /* switch pin can be for card detect (default) or card cover */ | ||
| 59 | unsigned cover:1; | ||
| 60 | |||
| 61 | /* use the internal clock */ | ||
| 62 | unsigned internal_clock:1; | ||
| 63 | |||
| 64 | /* nonremovable e.g. eMMC */ | ||
| 65 | unsigned nonremovable:1; | ||
| 66 | |||
| 67 | /* eMMC does not handle power off when not in sleep state */ | ||
| 68 | unsigned no_regulator_off_init:1; | ||
| 69 | |||
| 70 | /* we can put the features above into this variable */ | ||
| 71 | #define HSMMC_HAS_PBIAS (1 << 0) | ||
| 72 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | ||
| 73 | #define HSMMC_HAS_HSPE_SUPPORT (1 << 2) | ||
| 74 | unsigned features; | ||
| 75 | |||
| 76 | int switch_pin; /* gpio (card detect) */ | ||
| 77 | int gpio_wp; /* gpio (write protect) */ | ||
| 78 | |||
| 79 | int (*set_power)(struct device *dev, int power_on, int vdd); | ||
| 80 | void (*remux)(struct device *dev, int power_on); | ||
| 81 | /* Call back before enabling / disabling regulators */ | ||
| 82 | void (*before_set_reg)(struct device *dev, int power_on, int vdd); | ||
| 83 | /* Call back after enabling / disabling regulators */ | ||
| 84 | void (*after_set_reg)(struct device *dev, int power_on, int vdd); | ||
| 85 | /* if we have special card, init it using this callback */ | ||
| 86 | void (*init_card)(struct mmc_card *card); | ||
| 87 | |||
| 88 | const char *name; | ||
| 89 | u32 ocr_mask; | ||
| 90 | }; | ||
diff --git a/include/linux/platform_data/mmc-atmel-mci.h b/include/linux/platform_data/mmc-atmel-mci.h new file mode 100644 index 000000000000..399a2d5a14bd --- /dev/null +++ b/include/linux/platform_data/mmc-atmel-mci.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef __MMC_ATMEL_MCI_H | ||
| 2 | #define __MMC_ATMEL_MCI_H | ||
| 3 | |||
| 4 | #include <linux/platform_data/dma-atmel.h> | ||
| 5 | #include <linux/platform_data/dma-dw.h> | ||
| 6 | |||
| 7 | /** | ||
| 8 | * struct mci_dma_data - DMA data for MCI interface | ||
| 9 | */ | ||
| 10 | struct mci_dma_data { | ||
| 11 | #ifdef CONFIG_ARM | ||
| 12 | struct at_dma_slave sdata; | ||
| 13 | #else | ||
| 14 | struct dw_dma_slave sdata; | ||
| 15 | #endif | ||
| 16 | }; | ||
| 17 | |||
| 18 | /* accessor macros */ | ||
| 19 | #define slave_data_ptr(s) (&(s)->sdata) | ||
| 20 | #define find_slave_dev(s) ((s)->sdata.dma_dev) | ||
| 21 | |||
| 22 | #endif /* __MMC_ATMEL_MCI_H */ | ||
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h index 51e70cf25cbc..5c188f4e9bec 100644 --- a/include/linux/platform_data/mmc-omap.h +++ b/include/linux/platform_data/mmc-omap.h | |||
| @@ -10,32 +10,8 @@ | |||
| 10 | 10 | ||
| 11 | #define OMAP_MMC_MAX_SLOTS 2 | 11 | #define OMAP_MMC_MAX_SLOTS 2 |
| 12 | 12 | ||
| 13 | /* | ||
| 14 | * struct omap_mmc_dev_attr.flags possibilities | ||
| 15 | * | ||
| 16 | * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can | ||
| 17 | * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag | ||
| 18 | * should be set if this is the case. See for example Section 22.5.3 | ||
| 19 | * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia | ||
| 20 | * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). | ||
| 21 | * | ||
| 22 | * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers | ||
| 23 | * don't work correctly on some MMC controller instances on some | ||
| 24 | * OMAP3 SoCs; this flag should be set if this is the case. See | ||
| 25 | * for example Advisory 2.1.1.128 "MMC: Multiple Block Read | ||
| 26 | * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ | ||
| 27 | * Revision F (October 2010) (SPRZ278F). | ||
| 28 | */ | ||
| 29 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) | ||
| 30 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) | ||
| 31 | #define OMAP_HSMMC_SWAKEUP_MISSING BIT(2) | ||
| 32 | |||
| 33 | struct mmc_card; | 13 | struct mmc_card; |
| 34 | 14 | ||
| 35 | struct omap_mmc_dev_attr { | ||
| 36 | u8 flags; | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct omap_mmc_platform_data { | 15 | struct omap_mmc_platform_data { |
| 40 | /* back-link to device */ | 16 | /* back-link to device */ |
| 41 | struct device *dev; | 17 | struct device *dev; |
| @@ -106,9 +82,6 @@ struct omap_mmc_platform_data { | |||
| 106 | unsigned vcc_aux_disable_is_sleep:1; | 82 | unsigned vcc_aux_disable_is_sleep:1; |
| 107 | 83 | ||
| 108 | /* we can put the features above into this variable */ | 84 | /* we can put the features above into this variable */ |
| 109 | #define HSMMC_HAS_PBIAS (1 << 0) | ||
| 110 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | ||
| 111 | #define HSMMC_HAS_HSPE_SUPPORT (1 << 2) | ||
| 112 | #define MMC_OMAP7XX (1 << 3) | 85 | #define MMC_OMAP7XX (1 << 3) |
| 113 | #define MMC_OMAP15XX (1 << 4) | 86 | #define MMC_OMAP15XX (1 << 4) |
| 114 | #define MMC_OMAP16XX (1 << 5) | 87 | #define MMC_OMAP16XX (1 << 5) |
diff --git a/include/linux/platform_data/pxa_sdhci.h b/include/linux/platform_data/pxa_sdhci.h index 27d3156d093a..9e20c2fb4ffd 100644 --- a/include/linux/platform_data/pxa_sdhci.h +++ b/include/linux/platform_data/pxa_sdhci.h | |||
| @@ -55,9 +55,4 @@ struct sdhci_pxa_platdata { | |||
| 55 | unsigned int quirks2; | 55 | unsigned int quirks2; |
| 56 | unsigned int pm_caps; | 56 | unsigned int pm_caps; |
| 57 | }; | 57 | }; |
| 58 | |||
| 59 | struct sdhci_pxa { | ||
| 60 | u8 clk_enable; | ||
| 61 | u8 power_mode; | ||
| 62 | }; | ||
| 63 | #endif /* _PXA_SDHCI_H_ */ | 58 | #endif /* _PXA_SDHCI_H_ */ |
diff --git a/include/linux/platform_data/serial-omap.h b/include/linux/platform_data/serial-omap.h index c860c1b314c0..d09275f3cde3 100644 --- a/include/linux/platform_data/serial-omap.h +++ b/include/linux/platform_data/serial-omap.h | |||
| @@ -38,9 +38,6 @@ struct omap_uart_port_info { | |||
| 38 | unsigned int dma_rx_timeout; | 38 | unsigned int dma_rx_timeout; |
| 39 | unsigned int autosuspend_timeout; | 39 | unsigned int autosuspend_timeout; |
| 40 | unsigned int dma_rx_poll_rate; | 40 | unsigned int dma_rx_poll_rate; |
| 41 | int DTR_gpio; | ||
| 42 | int DTR_inverted; | ||
| 43 | int DTR_present; | ||
| 44 | 41 | ||
| 45 | int (*get_context_loss_count)(struct device *); | 42 | int (*get_context_loss_count)(struct device *); |
| 46 | void (*enable_wakeup)(struct device *, bool); | 43 | void (*enable_wakeup)(struct device *, bool); |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 53ff1a752d7e..ed4f5939a452 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -57,7 +57,7 @@ enum rcutorture_type { | |||
| 57 | INVALID_RCU_FLAVOR | 57 | INVALID_RCU_FLAVOR |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 60 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) |
| 61 | void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags, | 61 | void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags, |
| 62 | unsigned long *gpnum, unsigned long *completed); | 62 | unsigned long *gpnum, unsigned long *completed); |
| 63 | void rcutorture_record_test_transition(void); | 63 | void rcutorture_record_test_transition(void); |
| @@ -260,7 +260,7 @@ static inline int rcu_preempt_depth(void) | |||
| 260 | void rcu_init(void); | 260 | void rcu_init(void); |
| 261 | void rcu_sched_qs(void); | 261 | void rcu_sched_qs(void); |
| 262 | void rcu_bh_qs(void); | 262 | void rcu_bh_qs(void); |
| 263 | void rcu_check_callbacks(int cpu, int user); | 263 | void rcu_check_callbacks(int user); |
| 264 | struct notifier_block; | 264 | struct notifier_block; |
| 265 | void rcu_idle_enter(void); | 265 | void rcu_idle_enter(void); |
| 266 | void rcu_idle_exit(void); | 266 | void rcu_idle_exit(void); |
| @@ -348,8 +348,8 @@ extern struct srcu_struct tasks_rcu_exit_srcu; | |||
| 348 | */ | 348 | */ |
| 349 | #define cond_resched_rcu_qs() \ | 349 | #define cond_resched_rcu_qs() \ |
| 350 | do { \ | 350 | do { \ |
| 351 | rcu_note_voluntary_context_switch(current); \ | 351 | if (!cond_resched()) \ |
| 352 | cond_resched(); \ | 352 | rcu_note_voluntary_context_switch(current); \ |
| 353 | } while (0) | 353 | } while (0) |
| 354 | 354 | ||
| 355 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) | 355 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) |
| @@ -365,7 +365,7 @@ typedef void call_rcu_func_t(struct rcu_head *head, | |||
| 365 | void (*func)(struct rcu_head *head)); | 365 | void (*func)(struct rcu_head *head)); |
| 366 | void wait_rcu_gp(call_rcu_func_t crf); | 366 | void wait_rcu_gp(call_rcu_func_t crf); |
| 367 | 367 | ||
| 368 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 368 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) |
| 369 | #include <linux/rcutree.h> | 369 | #include <linux/rcutree.h> |
| 370 | #elif defined(CONFIG_TINY_RCU) | 370 | #elif defined(CONFIG_TINY_RCU) |
| 371 | #include <linux/rcutiny.h> | 371 | #include <linux/rcutiny.h> |
| @@ -867,7 +867,7 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 867 | * | 867 | * |
| 868 | * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU), | 868 | * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU), |
| 869 | * it is illegal to block while in an RCU read-side critical section. | 869 | * it is illegal to block while in an RCU read-side critical section. |
| 870 | * In preemptible RCU implementations (TREE_PREEMPT_RCU) in CONFIG_PREEMPT | 870 | * In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPT |
| 871 | * kernel builds, RCU read-side critical sections may be preempted, | 871 | * kernel builds, RCU read-side critical sections may be preempted, |
| 872 | * but explicit blocking is illegal. Finally, in preemptible RCU | 872 | * but explicit blocking is illegal. Finally, in preemptible RCU |
| 873 | * implementations in real-time (with -rt patchset) kernel builds, RCU | 873 | * implementations in real-time (with -rt patchset) kernel builds, RCU |
| @@ -902,7 +902,9 @@ static inline void rcu_read_lock(void) | |||
| 902 | * Unfortunately, this function acquires the scheduler's runqueue and | 902 | * Unfortunately, this function acquires the scheduler's runqueue and |
| 903 | * priority-inheritance spinlocks. This means that deadlock could result | 903 | * priority-inheritance spinlocks. This means that deadlock could result |
| 904 | * if the caller of rcu_read_unlock() already holds one of these locks or | 904 | * if the caller of rcu_read_unlock() already holds one of these locks or |
| 905 | * any lock that is ever acquired while holding them. | 905 | * any lock that is ever acquired while holding them; or any lock which |
| 906 | * can be taken from interrupt context because rcu_boost()->rt_mutex_lock() | ||
| 907 | * does not disable irqs while taking ->wait_lock. | ||
| 906 | * | 908 | * |
| 907 | * That said, RCU readers are never priority boosted unless they were | 909 | * That said, RCU readers are never priority boosted unless they were |
| 908 | * preempted. Therefore, one way to avoid deadlock is to make sure | 910 | * preempted. Therefore, one way to avoid deadlock is to make sure |
| @@ -1062,6 +1064,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 1062 | */ | 1064 | */ |
| 1063 | #define RCU_INIT_POINTER(p, v) \ | 1065 | #define RCU_INIT_POINTER(p, v) \ |
| 1064 | do { \ | 1066 | do { \ |
| 1067 | rcu_dereference_sparse(p, __rcu); \ | ||
| 1065 | p = RCU_INITIALIZER(v); \ | 1068 | p = RCU_INITIALIZER(v); \ |
| 1066 | } while (0) | 1069 | } while (0) |
| 1067 | 1070 | ||
| @@ -1118,7 +1121,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
| 1118 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) | 1121 | __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) |
| 1119 | 1122 | ||
| 1120 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL) | 1123 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL) |
| 1121 | static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies) | 1124 | static inline int rcu_needs_cpu(unsigned long *delta_jiffies) |
| 1122 | { | 1125 | { |
| 1123 | *delta_jiffies = ULONG_MAX; | 1126 | *delta_jiffies = ULONG_MAX; |
| 1124 | return 0; | 1127 | return 0; |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 38cc5b1e252d..0e5366200154 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -78,7 +78,7 @@ static inline void kfree_call_rcu(struct rcu_head *head, | |||
| 78 | call_rcu(head, func); | 78 | call_rcu(head, func); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | static inline void rcu_note_context_switch(int cpu) | 81 | static inline void rcu_note_context_switch(void) |
| 82 | { | 82 | { |
| 83 | rcu_sched_qs(); | 83 | rcu_sched_qs(); |
| 84 | } | 84 | } |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 3e2f5d432743..52953790dcca 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -30,9 +30,9 @@ | |||
| 30 | #ifndef __LINUX_RCUTREE_H | 30 | #ifndef __LINUX_RCUTREE_H |
| 31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
| 32 | 32 | ||
| 33 | void rcu_note_context_switch(int cpu); | 33 | void rcu_note_context_switch(void); |
| 34 | #ifndef CONFIG_RCU_NOCB_CPU_ALL | 34 | #ifndef CONFIG_RCU_NOCB_CPU_ALL |
| 35 | int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); | 35 | int rcu_needs_cpu(unsigned long *delta_jiffies); |
| 36 | #endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */ | 36 | #endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */ |
| 37 | void rcu_cpu_stall_reset(void); | 37 | void rcu_cpu_stall_reset(void); |
| 38 | 38 | ||
| @@ -43,7 +43,7 @@ void rcu_cpu_stall_reset(void); | |||
| 43 | */ | 43 | */ |
| 44 | static inline void rcu_virt_note_context_switch(int cpu) | 44 | static inline void rcu_virt_note_context_switch(int cpu) |
| 45 | { | 45 | { |
| 46 | rcu_note_context_switch(cpu); | 46 | rcu_note_context_switch(); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | void synchronize_rcu_bh(void); | 49 | void synchronize_rcu_bh(void); |
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index c5ed83f49c4e..4419b99d8d6e 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -27,6 +27,7 @@ struct spmi_device; | |||
| 27 | struct regmap; | 27 | struct regmap; |
| 28 | struct regmap_range_cfg; | 28 | struct regmap_range_cfg; |
| 29 | struct regmap_field; | 29 | struct regmap_field; |
| 30 | struct snd_ac97; | ||
| 30 | 31 | ||
| 31 | /* An enum of all the supported cache types */ | 32 | /* An enum of all the supported cache types */ |
| 32 | enum regcache_type { | 33 | enum regcache_type { |
| @@ -340,6 +341,8 @@ struct regmap *regmap_init_spmi_ext(struct spmi_device *dev, | |||
| 340 | struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, | 341 | struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, |
| 341 | void __iomem *regs, | 342 | void __iomem *regs, |
| 342 | const struct regmap_config *config); | 343 | const struct regmap_config *config); |
| 344 | struct regmap *regmap_init_ac97(struct snd_ac97 *ac97, | ||
| 345 | const struct regmap_config *config); | ||
| 343 | 346 | ||
| 344 | struct regmap *devm_regmap_init(struct device *dev, | 347 | struct regmap *devm_regmap_init(struct device *dev, |
| 345 | const struct regmap_bus *bus, | 348 | const struct regmap_bus *bus, |
| @@ -356,6 +359,10 @@ struct regmap *devm_regmap_init_spmi_ext(struct spmi_device *dev, | |||
| 356 | struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, | 359 | struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, |
| 357 | void __iomem *regs, | 360 | void __iomem *regs, |
| 358 | const struct regmap_config *config); | 361 | const struct regmap_config *config); |
| 362 | struct regmap *devm_regmap_init_ac97(struct snd_ac97 *ac97, | ||
| 363 | const struct regmap_config *config); | ||
| 364 | |||
| 365 | bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); | ||
| 359 | 366 | ||
| 360 | /** | 367 | /** |
| 361 | * regmap_init_mmio(): Initialise register map | 368 | * regmap_init_mmio(): Initialise register map |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index f540b1496e2f..d17e1ff7ad01 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -101,6 +101,8 @@ struct regmap; | |||
| 101 | * Data passed is "struct pre_voltage_change_data" | 101 | * Data passed is "struct pre_voltage_change_data" |
| 102 | * ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason. | 102 | * ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason. |
| 103 | * Data passed is old voltage cast to (void *). | 103 | * Data passed is old voltage cast to (void *). |
| 104 | * PRE_DISABLE Regulator is about to be disabled | ||
| 105 | * ABORT_DISABLE Regulator disable failed for some reason | ||
| 104 | * | 106 | * |
| 105 | * NOTE: These events can be OR'ed together when passed into handler. | 107 | * NOTE: These events can be OR'ed together when passed into handler. |
| 106 | */ | 108 | */ |
| @@ -115,6 +117,8 @@ struct regmap; | |||
| 115 | #define REGULATOR_EVENT_DISABLE 0x80 | 117 | #define REGULATOR_EVENT_DISABLE 0x80 |
| 116 | #define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100 | 118 | #define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100 |
| 117 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 | 119 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 |
| 120 | #define REGULATOR_EVENT_PRE_DISABLE 0x400 | ||
| 121 | #define REGULATOR_EVENT_ABORT_DISABLE 0x800 | ||
| 118 | 122 | ||
| 119 | /** | 123 | /** |
| 120 | * struct pre_voltage_change_data - Data sent with PRE_VOLTAGE_CHANGE event | 124 | * struct pre_voltage_change_data - Data sent with PRE_VOLTAGE_CHANGE event |
| @@ -284,7 +288,7 @@ devm_regulator_get(struct device *dev, const char *id) | |||
| 284 | static inline struct regulator *__must_check | 288 | static inline struct regulator *__must_check |
| 285 | regulator_get_exclusive(struct device *dev, const char *id) | 289 | regulator_get_exclusive(struct device *dev, const char *id) |
| 286 | { | 290 | { |
| 287 | return NULL; | 291 | return ERR_PTR(-ENODEV); |
| 288 | } | 292 | } |
| 289 | 293 | ||
| 290 | static inline struct regulator *__must_check | 294 | static inline struct regulator *__must_check |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index fc0ee0ce8325..5f1e9ca47417 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -243,6 +243,8 @@ enum regulator_type { | |||
| 243 | * | 243 | * |
| 244 | * @enable_time: Time taken for initial enable of regulator (in uS). | 244 | * @enable_time: Time taken for initial enable of regulator (in uS). |
| 245 | * @off_on_delay: guard time (in uS), before re-enabling a regulator | 245 | * @off_on_delay: guard time (in uS), before re-enabling a regulator |
| 246 | * | ||
| 247 | * @of_map_mode: Maps a hardware mode defined in a DeviceTree to a standard mode | ||
| 246 | */ | 248 | */ |
| 247 | struct regulator_desc { | 249 | struct regulator_desc { |
| 248 | const char *name; | 250 | const char *name; |
| @@ -285,6 +287,8 @@ struct regulator_desc { | |||
| 285 | unsigned int enable_time; | 287 | unsigned int enable_time; |
| 286 | 288 | ||
| 287 | unsigned int off_on_delay; | 289 | unsigned int off_on_delay; |
| 290 | |||
| 291 | unsigned int (*of_map_mode)(unsigned int mode); | ||
| 288 | }; | 292 | }; |
| 289 | 293 | ||
| 290 | /** | 294 | /** |
| @@ -301,6 +305,9 @@ struct regulator_desc { | |||
| 301 | * NULL). | 305 | * NULL). |
| 302 | * @regmap: regmap to use for core regmap helpers if dev_get_regulator() is | 306 | * @regmap: regmap to use for core regmap helpers if dev_get_regulator() is |
| 303 | * insufficient. | 307 | * insufficient. |
| 308 | * @ena_gpio_initialized: GPIO controlling regulator enable was properly | ||
| 309 | * initialized, meaning that >= 0 is a valid gpio | ||
| 310 | * identifier and < 0 is a non existent gpio. | ||
| 304 | * @ena_gpio: GPIO controlling regulator enable. | 311 | * @ena_gpio: GPIO controlling regulator enable. |
| 305 | * @ena_gpio_invert: Sense for GPIO enable control. | 312 | * @ena_gpio_invert: Sense for GPIO enable control. |
| 306 | * @ena_gpio_flags: Flags to use when calling gpio_request_one() | 313 | * @ena_gpio_flags: Flags to use when calling gpio_request_one() |
| @@ -312,6 +319,7 @@ struct regulator_config { | |||
| 312 | struct device_node *of_node; | 319 | struct device_node *of_node; |
| 313 | struct regmap *regmap; | 320 | struct regmap *regmap; |
| 314 | 321 | ||
| 322 | bool ena_gpio_initialized; | ||
| 315 | int ena_gpio; | 323 | int ena_gpio; |
| 316 | unsigned int ena_gpio_invert:1; | 324 | unsigned int ena_gpio_invert:1; |
| 317 | unsigned int ena_gpio_flags; | 325 | unsigned int ena_gpio_flags; |
diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h index f9217965aaa3..763953f7e3b8 100644 --- a/include/linux/regulator/of_regulator.h +++ b/include/linux/regulator/of_regulator.h | |||
| @@ -6,24 +6,29 @@ | |||
| 6 | #ifndef __LINUX_OF_REG_H | 6 | #ifndef __LINUX_OF_REG_H |
| 7 | #define __LINUX_OF_REG_H | 7 | #define __LINUX_OF_REG_H |
| 8 | 8 | ||
| 9 | struct regulator_desc; | ||
| 10 | |||
| 9 | struct of_regulator_match { | 11 | struct of_regulator_match { |
| 10 | const char *name; | 12 | const char *name; |
| 11 | void *driver_data; | 13 | void *driver_data; |
| 12 | struct regulator_init_data *init_data; | 14 | struct regulator_init_data *init_data; |
| 13 | struct device_node *of_node; | 15 | struct device_node *of_node; |
| 16 | const struct regulator_desc *desc; | ||
| 14 | }; | 17 | }; |
| 15 | 18 | ||
| 16 | #if defined(CONFIG_OF) | 19 | #if defined(CONFIG_OF) |
| 17 | extern struct regulator_init_data | 20 | extern struct regulator_init_data |
| 18 | *of_get_regulator_init_data(struct device *dev, | 21 | *of_get_regulator_init_data(struct device *dev, |
| 19 | struct device_node *node); | 22 | struct device_node *node, |
| 23 | const struct regulator_desc *desc); | ||
| 20 | extern int of_regulator_match(struct device *dev, struct device_node *node, | 24 | extern int of_regulator_match(struct device *dev, struct device_node *node, |
| 21 | struct of_regulator_match *matches, | 25 | struct of_regulator_match *matches, |
| 22 | unsigned int num_matches); | 26 | unsigned int num_matches); |
| 23 | #else | 27 | #else |
| 24 | static inline struct regulator_init_data | 28 | static inline struct regulator_init_data |
| 25 | *of_get_regulator_init_data(struct device *dev, | 29 | *of_get_regulator_init_data(struct device *dev, |
| 26 | struct device_node *node) | 30 | struct device_node *node, |
| 31 | const struct regulator_desc *desc) | ||
| 27 | { | 32 | { |
| 28 | return NULL; | 33 | return NULL; |
| 29 | } | 34 | } |
diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h index 41a4695fde08..ce6b962ffed4 100644 --- a/include/linux/reset-controller.h +++ b/include/linux/reset-controller.h | |||
| @@ -12,11 +12,13 @@ struct reset_controller_dev; | |||
| 12 | * things to reset the device | 12 | * things to reset the device |
| 13 | * @assert: manually assert the reset line, if supported | 13 | * @assert: manually assert the reset line, if supported |
| 14 | * @deassert: manually deassert the reset line, if supported | 14 | * @deassert: manually deassert the reset line, if supported |
| 15 | * @status: return the status of the reset line, if supported | ||
| 15 | */ | 16 | */ |
| 16 | struct reset_control_ops { | 17 | struct reset_control_ops { |
| 17 | int (*reset)(struct reset_controller_dev *rcdev, unsigned long id); | 18 | int (*reset)(struct reset_controller_dev *rcdev, unsigned long id); |
| 18 | int (*assert)(struct reset_controller_dev *rcdev, unsigned long id); | 19 | int (*assert)(struct reset_controller_dev *rcdev, unsigned long id); |
| 19 | int (*deassert)(struct reset_controller_dev *rcdev, unsigned long id); | 20 | int (*deassert)(struct reset_controller_dev *rcdev, unsigned long id); |
| 21 | int (*status)(struct reset_controller_dev *rcdev, unsigned long id); | ||
| 20 | }; | 22 | }; |
| 21 | 23 | ||
| 22 | struct module; | 24 | struct module; |
diff --git a/include/linux/reset.h b/include/linux/reset.h index 349f150ae12c..da5602bd77d7 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h | |||
| @@ -10,6 +10,7 @@ struct reset_control; | |||
| 10 | int reset_control_reset(struct reset_control *rstc); | 10 | int reset_control_reset(struct reset_control *rstc); |
| 11 | int reset_control_assert(struct reset_control *rstc); | 11 | int reset_control_assert(struct reset_control *rstc); |
| 12 | int reset_control_deassert(struct reset_control *rstc); | 12 | int reset_control_deassert(struct reset_control *rstc); |
| 13 | int reset_control_status(struct reset_control *rstc); | ||
| 13 | 14 | ||
| 14 | struct reset_control *reset_control_get(struct device *dev, const char *id); | 15 | struct reset_control *reset_control_get(struct device *dev, const char *id); |
| 15 | void reset_control_put(struct reset_control *rstc); | 16 | void reset_control_put(struct reset_control *rstc); |
| @@ -57,6 +58,12 @@ static inline int reset_control_deassert(struct reset_control *rstc) | |||
| 57 | return 0; | 58 | return 0; |
| 58 | } | 59 | } |
| 59 | 60 | ||
| 61 | static inline int reset_control_status(struct reset_control *rstc) | ||
| 62 | { | ||
| 63 | WARN_ON(1); | ||
| 64 | return 0; | ||
| 65 | } | ||
| 66 | |||
| 60 | static inline void reset_control_put(struct reset_control *rstc) | 67 | static inline void reset_control_put(struct reset_control *rstc) |
| 61 | { | 68 | { |
| 62 | WARN_ON(1); | 69 | WARN_ON(1); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5e344bbe63ec..706a9f744909 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1278,9 +1278,9 @@ struct task_struct { | |||
| 1278 | union rcu_special rcu_read_unlock_special; | 1278 | union rcu_special rcu_read_unlock_special; |
| 1279 | struct list_head rcu_node_entry; | 1279 | struct list_head rcu_node_entry; |
| 1280 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | 1280 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ |
| 1281 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1281 | #ifdef CONFIG_PREEMPT_RCU |
| 1282 | struct rcu_node *rcu_blocked_node; | 1282 | struct rcu_node *rcu_blocked_node; |
| 1283 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | 1283 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ |
| 1284 | #ifdef CONFIG_TASKS_RCU | 1284 | #ifdef CONFIG_TASKS_RCU |
| 1285 | unsigned long rcu_tasks_nvcsw; | 1285 | unsigned long rcu_tasks_nvcsw; |
| 1286 | bool rcu_tasks_holdout; | 1286 | bool rcu_tasks_holdout; |
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index a4c9547aae64..f8e76e08ebe4 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h | |||
| @@ -15,8 +15,6 @@ | |||
| 15 | #define _LINUX_VEXPRESS_H | 15 | #define _LINUX_VEXPRESS_H |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
| 18 | #include <linux/platform_device.h> | ||
| 19 | #include <linux/reboot.h> | ||
| 20 | #include <linux/regmap.h> | 18 | #include <linux/regmap.h> |
| 21 | 19 | ||
| 22 | #define VEXPRESS_SITE_MB 0 | 20 | #define VEXPRESS_SITE_MB 0 |
| @@ -24,13 +22,6 @@ | |||
| 24 | #define VEXPRESS_SITE_DB2 2 | 22 | #define VEXPRESS_SITE_DB2 2 |
| 25 | #define VEXPRESS_SITE_MASTER 0xf | 23 | #define VEXPRESS_SITE_MASTER 0xf |
| 26 | 24 | ||
| 27 | #define VEXPRESS_RES_FUNC(_site, _func) \ | ||
| 28 | { \ | ||
| 29 | .start = (_site), \ | ||
| 30 | .end = (_func), \ | ||
| 31 | .flags = IORESOURCE_BUS, \ | ||
| 32 | } | ||
| 33 | |||
| 34 | /* Config infrastructure */ | 25 | /* Config infrastructure */ |
| 35 | 26 | ||
| 36 | void vexpress_config_set_master(u32 site); | 27 | void vexpress_config_set_master(u32 site); |
| @@ -58,16 +49,6 @@ struct regmap *devm_regmap_init_vexpress_config(struct device *dev); | |||
| 58 | 49 | ||
| 59 | /* Platform control */ | 50 | /* Platform control */ |
| 60 | 51 | ||
| 61 | unsigned int vexpress_get_mci_cardin(struct device *dev); | ||
| 62 | u32 vexpress_get_procid(int site); | ||
| 63 | void *vexpress_get_24mhz_clock_base(void); | ||
| 64 | void vexpress_flags_set(u32 data); | 52 | void vexpress_flags_set(u32 data); |
| 65 | 53 | ||
| 66 | void vexpress_sysreg_early_init(void __iomem *base); | ||
| 67 | int vexpress_syscfg_device_register(struct platform_device *pdev); | ||
| 68 | |||
| 69 | /* Clocks */ | ||
| 70 | |||
| 71 | void vexpress_clk_init(void __iomem *sp810_base); | ||
| 72 | |||
| 73 | #endif | 54 | #endif |
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index fe7994c48b75..b2828a06a5a6 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h | |||
| @@ -37,6 +37,8 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | |||
| 37 | int inet_ctl_sock_create(struct sock **sk, unsigned short family, | 37 | int inet_ctl_sock_create(struct sock **sk, unsigned short family, |
| 38 | unsigned short type, unsigned char protocol, | 38 | unsigned short type, unsigned char protocol, |
| 39 | struct net *net); | 39 | struct net *net); |
| 40 | int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, | ||
| 41 | int *addr_len); | ||
| 40 | 42 | ||
| 41 | static inline void inet_ctl_sock_destroy(struct sock *sk) | 43 | static inline void inet_ctl_sock_destroy(struct sock *sk) |
| 42 | { | 44 | { |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 52beadf9a29b..93d14daf0994 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
| @@ -1105,8 +1105,6 @@ int fc_eh_abort(struct scsi_cmnd *); | |||
| 1105 | int fc_eh_device_reset(struct scsi_cmnd *); | 1105 | int fc_eh_device_reset(struct scsi_cmnd *); |
| 1106 | int fc_eh_host_reset(struct scsi_cmnd *); | 1106 | int fc_eh_host_reset(struct scsi_cmnd *); |
| 1107 | int fc_slave_alloc(struct scsi_device *); | 1107 | int fc_slave_alloc(struct scsi_device *); |
| 1108 | int fc_change_queue_depth(struct scsi_device *, int qdepth, int reason); | ||
| 1109 | int fc_change_queue_type(struct scsi_device *, int tag_type); | ||
| 1110 | 1108 | ||
| 1111 | /* | 1109 | /* |
| 1112 | * ELS/CT interface | 1110 | * ELS/CT interface |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 728c9ad9feb0..4d1c46aac331 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
| @@ -378,8 +378,6 @@ struct iscsi_host { | |||
| 378 | /* | 378 | /* |
| 379 | * scsi host template | 379 | * scsi host template |
| 380 | */ | 380 | */ |
| 381 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, | ||
| 382 | int reason); | ||
| 383 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); | 381 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); |
| 384 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); | 382 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); |
| 385 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); | 383 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index ef7872c20da9..832dcc9f86ec 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
| @@ -365,12 +365,6 @@ struct asd_sas_phy { | |||
| 365 | struct scsi_core { | 365 | struct scsi_core { |
| 366 | struct Scsi_Host *shost; | 366 | struct Scsi_Host *shost; |
| 367 | 367 | ||
| 368 | struct mutex task_queue_flush; | ||
| 369 | spinlock_t task_queue_lock; | ||
| 370 | struct list_head task_queue; | ||
| 371 | int task_queue_size; | ||
| 372 | |||
| 373 | struct task_struct *queue_thread; | ||
| 374 | }; | 368 | }; |
| 375 | 369 | ||
| 376 | struct sas_ha_event { | 370 | struct sas_ha_event { |
| @@ -422,9 +416,6 @@ struct sas_ha_struct { | |||
| 422 | struct asd_sas_port **sas_port; /* array of valid pointers, must be set */ | 416 | struct asd_sas_port **sas_port; /* array of valid pointers, must be set */ |
| 423 | int num_phys; /* must be set, gt 0, static */ | 417 | int num_phys; /* must be set, gt 0, static */ |
| 424 | 418 | ||
| 425 | /* The class calls this to send a task for execution. */ | ||
| 426 | int lldd_max_execute_num; | ||
| 427 | int lldd_queue_size; | ||
| 428 | int strict_wide_ports; /* both sas_addr and attached_sas_addr must match | 419 | int strict_wide_ports; /* both sas_addr and attached_sas_addr must match |
| 429 | * their siblings when forming wide ports */ | 420 | * their siblings when forming wide ports */ |
| 430 | 421 | ||
| @@ -612,7 +603,6 @@ struct sas_ssp_task { | |||
| 612 | 603 | ||
| 613 | struct sas_task { | 604 | struct sas_task { |
| 614 | struct domain_device *dev; | 605 | struct domain_device *dev; |
| 615 | struct list_head list; | ||
| 616 | 606 | ||
| 617 | spinlock_t task_state_lock; | 607 | spinlock_t task_state_lock; |
| 618 | unsigned task_state_flags; | 608 | unsigned task_state_flags; |
| @@ -665,8 +655,7 @@ struct sas_domain_function_template { | |||
| 665 | int (*lldd_dev_found)(struct domain_device *); | 655 | int (*lldd_dev_found)(struct domain_device *); |
| 666 | void (*lldd_dev_gone)(struct domain_device *); | 656 | void (*lldd_dev_gone)(struct domain_device *); |
| 667 | 657 | ||
| 668 | int (*lldd_execute_task)(struct sas_task *, int num, | 658 | int (*lldd_execute_task)(struct sas_task *, gfp_t gfp_flags); |
| 669 | gfp_t gfp_flags); | ||
| 670 | 659 | ||
| 671 | /* Task Management Functions. Must be called from process context. */ | 660 | /* Task Management Functions. Must be called from process context. */ |
| 672 | int (*lldd_abort_task)(struct sas_task *); | 661 | int (*lldd_abort_task)(struct sas_task *); |
| @@ -700,12 +689,10 @@ extern void sas_suspend_ha(struct sas_ha_struct *sas_ha); | |||
| 700 | int sas_set_phy_speed(struct sas_phy *phy, | 689 | int sas_set_phy_speed(struct sas_phy *phy, |
| 701 | struct sas_phy_linkrates *rates); | 690 | struct sas_phy_linkrates *rates); |
| 702 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); | 691 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); |
| 703 | int sas_queue_up(struct sas_task *task); | ||
| 704 | extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); | 692 | extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); |
| 705 | extern int sas_target_alloc(struct scsi_target *); | 693 | extern int sas_target_alloc(struct scsi_target *); |
| 706 | extern int sas_slave_configure(struct scsi_device *); | 694 | extern int sas_slave_configure(struct scsi_device *); |
| 707 | extern int sas_change_queue_depth(struct scsi_device *, int new_depth, | 695 | extern int sas_change_queue_depth(struct scsi_device *, int new_depth); |
| 708 | int reason); | ||
| 709 | extern int sas_change_queue_type(struct scsi_device *, int qt); | 696 | extern int sas_change_queue_type(struct scsi_device *, int qt); |
| 710 | extern int sas_bios_param(struct scsi_device *, | 697 | extern int sas_bios_param(struct scsi_device *, |
| 711 | struct block_device *, | 698 | struct block_device *, |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index d17178e6fcdd..8a7f8ad58aac 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
| @@ -128,8 +128,10 @@ enum scsi_timeouts { | |||
| 128 | #define MOVE_MEDIUM 0xa5 | 128 | #define MOVE_MEDIUM 0xa5 |
| 129 | #define EXCHANGE_MEDIUM 0xa6 | 129 | #define EXCHANGE_MEDIUM 0xa6 |
| 130 | #define READ_12 0xa8 | 130 | #define READ_12 0xa8 |
| 131 | #define SERVICE_ACTION_OUT_12 0xa9 | ||
| 131 | #define WRITE_12 0xaa | 132 | #define WRITE_12 0xaa |
| 132 | #define READ_MEDIA_SERIAL_NUMBER 0xab | 133 | #define READ_MEDIA_SERIAL_NUMBER 0xab /* Obsolete with SPC-2 */ |
| 134 | #define SERVICE_ACTION_IN_12 0xab | ||
| 133 | #define WRITE_VERIFY_12 0xae | 135 | #define WRITE_VERIFY_12 0xae |
| 134 | #define VERIFY_12 0xaf | 136 | #define VERIFY_12 0xaf |
| 135 | #define SEARCH_HIGH_12 0xb0 | 137 | #define SEARCH_HIGH_12 0xb0 |
| @@ -151,7 +153,9 @@ enum scsi_timeouts { | |||
| 151 | #define VERIFY_16 0x8f | 153 | #define VERIFY_16 0x8f |
| 152 | #define SYNCHRONIZE_CACHE_16 0x91 | 154 | #define SYNCHRONIZE_CACHE_16 0x91 |
| 153 | #define WRITE_SAME_16 0x93 | 155 | #define WRITE_SAME_16 0x93 |
| 154 | #define SERVICE_ACTION_IN 0x9e | 156 | #define SERVICE_ACTION_BIDIRECTIONAL 0x9d |
| 157 | #define SERVICE_ACTION_IN_16 0x9e | ||
| 158 | #define SERVICE_ACTION_OUT_16 0x9f | ||
| 155 | /* values for service action in */ | 159 | /* values for service action in */ |
| 156 | #define SAI_READ_CAPACITY_16 0x10 | 160 | #define SAI_READ_CAPACITY_16 0x10 |
| 157 | #define SAI_GET_LBA_STATUS 0x12 | 161 | #define SAI_GET_LBA_STATUS 0x12 |
| @@ -165,8 +169,8 @@ enum scsi_timeouts { | |||
| 165 | #define MI_REPORT_ALIASES 0x0b | 169 | #define MI_REPORT_ALIASES 0x0b |
| 166 | #define MI_REPORT_SUPPORTED_OPERATION_CODES 0x0c | 170 | #define MI_REPORT_SUPPORTED_OPERATION_CODES 0x0c |
| 167 | #define MI_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS 0x0d | 171 | #define MI_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS 0x0d |
| 168 | #define MI_REPORT_PRIORITY 0x0e | 172 | #define MI_REPORT_PRIORITY 0x0e |
| 169 | #define MI_REPORT_TIMESTAMP 0x0f | 173 | #define MI_REPORT_TIMESTAMP 0x0f |
| 170 | #define MI_MANAGEMENT_PROTOCOL_IN 0x10 | 174 | #define MI_MANAGEMENT_PROTOCOL_IN 0x10 |
| 171 | /* value for MI_REPORT_TARGET_PGS ext header */ | 175 | /* value for MI_REPORT_TARGET_PGS ext header */ |
| 172 | #define MI_EXT_HDR_PARAM_FMT 0x20 | 176 | #define MI_EXT_HDR_PARAM_FMT 0x20 |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 522a5f27f553..9fc1aecfc813 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
| @@ -53,6 +53,9 @@ struct scsi_pointer { | |||
| 53 | volatile int phase; | 53 | volatile int phase; |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | /* for scmd->flags */ | ||
| 57 | #define SCMD_TAGGED (1 << 0) | ||
| 58 | |||
| 56 | struct scsi_cmnd { | 59 | struct scsi_cmnd { |
| 57 | struct scsi_device *device; | 60 | struct scsi_device *device; |
| 58 | struct list_head list; /* scsi_cmnd participates in queue lists */ | 61 | struct list_head list; /* scsi_cmnd participates in queue lists */ |
| @@ -132,6 +135,7 @@ struct scsi_cmnd { | |||
| 132 | * to be at an address < 16Mb). */ | 135 | * to be at an address < 16Mb). */ |
| 133 | 136 | ||
| 134 | int result; /* Status code from lower level driver */ | 137 | int result; /* Status code from lower level driver */ |
| 138 | int flags; /* Command flags */ | ||
| 135 | 139 | ||
| 136 | unsigned char tag; /* SCSI-II queued command tag */ | 140 | unsigned char tag; /* SCSI-II queued command tag */ |
| 137 | }; | 141 | }; |
| @@ -159,7 +163,7 @@ extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, | |||
| 159 | size_t *offset, size_t *len); | 163 | size_t *offset, size_t *len); |
| 160 | extern void scsi_kunmap_atomic_sg(void *virt); | 164 | extern void scsi_kunmap_atomic_sg(void *virt); |
| 161 | 165 | ||
| 162 | extern int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask); | 166 | extern int scsi_init_io(struct scsi_cmnd *cmd); |
| 163 | 167 | ||
| 164 | extern int scsi_dma_map(struct scsi_cmnd *cmd); | 168 | extern int scsi_dma_map(struct scsi_cmnd *cmd); |
| 165 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); | 169 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); |
diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index e89844cc2cd3..7982795df595 100644 --- a/include/scsi/scsi_dbg.h +++ b/include/scsi/scsi_dbg.h | |||
| @@ -2,23 +2,27 @@ | |||
| 2 | #define _SCSI_SCSI_DBG_H | 2 | #define _SCSI_SCSI_DBG_H |
| 3 | 3 | ||
| 4 | struct scsi_cmnd; | 4 | struct scsi_cmnd; |
| 5 | struct scsi_device; | ||
| 5 | struct scsi_sense_hdr; | 6 | struct scsi_sense_hdr; |
| 6 | 7 | ||
| 7 | extern void scsi_print_command(struct scsi_cmnd *); | 8 | extern void scsi_print_command(struct scsi_cmnd *); |
| 8 | extern void __scsi_print_command(unsigned char *); | 9 | extern void __scsi_print_command(const unsigned char *, size_t); |
| 9 | extern void scsi_show_extd_sense(unsigned char, unsigned char); | 10 | extern void scsi_show_extd_sense(const struct scsi_device *, const char *, |
| 10 | extern void scsi_show_sense_hdr(struct scsi_sense_hdr *); | 11 | unsigned char, unsigned char); |
| 11 | extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *); | 12 | extern void scsi_show_sense_hdr(const struct scsi_device *, const char *, |
| 12 | extern void scsi_cmd_print_sense_hdr(struct scsi_cmnd *, const char *, | 13 | const struct scsi_sense_hdr *); |
| 13 | struct scsi_sense_hdr *); | 14 | extern void scsi_print_sense_hdr(const struct scsi_device *, const char *, |
| 14 | extern void scsi_print_sense(char *, struct scsi_cmnd *); | 15 | const struct scsi_sense_hdr *); |
| 15 | extern void __scsi_print_sense(const char *name, | 16 | extern void scsi_print_sense(const struct scsi_cmnd *); |
| 17 | extern void __scsi_print_sense(const struct scsi_device *, const char *name, | ||
| 16 | const unsigned char *sense_buffer, | 18 | const unsigned char *sense_buffer, |
| 17 | int sense_len); | 19 | int sense_len); |
| 18 | extern void scsi_show_result(int); | 20 | extern void scsi_print_result(struct scsi_cmnd *, const char *, int); |
| 19 | extern void scsi_print_result(struct scsi_cmnd *); | 21 | extern const char *scsi_hostbyte_string(int); |
| 20 | extern void scsi_print_status(unsigned char); | 22 | extern const char *scsi_driverbyte_string(int); |
| 23 | extern const char *scsi_mlreturn_string(int); | ||
| 21 | extern const char *scsi_sense_key_string(unsigned char); | 24 | extern const char *scsi_sense_key_string(unsigned char); |
| 22 | extern const char *scsi_extd_sense_format(unsigned char, unsigned char); | 25 | extern const char *scsi_extd_sense_format(unsigned char, unsigned char, |
| 26 | const char **); | ||
| 23 | 27 | ||
| 24 | #endif /* _SCSI_SCSI_DBG_H */ | 28 | #endif /* _SCSI_SCSI_DBG_H */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 27ecee73bd72..6364e23454dd 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
| @@ -141,7 +141,6 @@ struct scsi_device { | |||
| 141 | unsigned ppr:1; /* Device supports PPR messages */ | 141 | unsigned ppr:1; /* Device supports PPR messages */ |
| 142 | unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */ | 142 | unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */ |
| 143 | unsigned simple_tags:1; /* simple queue tag messages are enabled */ | 143 | unsigned simple_tags:1; /* simple queue tag messages are enabled */ |
| 144 | unsigned ordered_tags:1;/* ordered queue tag messages are enabled */ | ||
| 145 | unsigned was_reset:1; /* There was a bus reset on the bus for | 144 | unsigned was_reset:1; /* There was a bus reset on the bus for |
| 146 | * this device */ | 145 | * this device */ |
| 147 | unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN | 146 | unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN |
| @@ -201,11 +200,6 @@ struct scsi_device { | |||
| 201 | unsigned long sdev_data[0]; | 200 | unsigned long sdev_data[0]; |
| 202 | } __attribute__((aligned(sizeof(unsigned long)))); | 201 | } __attribute__((aligned(sizeof(unsigned long)))); |
| 203 | 202 | ||
| 204 | struct scsi_dh_devlist { | ||
| 205 | char *vendor; | ||
| 206 | char *model; | ||
| 207 | }; | ||
| 208 | |||
| 209 | typedef void (*activate_complete)(void *, int); | 203 | typedef void (*activate_complete)(void *, int); |
| 210 | struct scsi_device_handler { | 204 | struct scsi_device_handler { |
| 211 | /* Used by the infrastructure */ | 205 | /* Used by the infrastructure */ |
| @@ -214,9 +208,8 @@ struct scsi_device_handler { | |||
| 214 | /* Filled by the hardware handler */ | 208 | /* Filled by the hardware handler */ |
| 215 | struct module *module; | 209 | struct module *module; |
| 216 | const char *name; | 210 | const char *name; |
| 217 | const struct scsi_dh_devlist *devlist; | ||
| 218 | int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); | 211 | int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); |
| 219 | int (*attach)(struct scsi_device *); | 212 | struct scsi_dh_data *(*attach)(struct scsi_device *); |
| 220 | void (*detach)(struct scsi_device *); | 213 | void (*detach)(struct scsi_device *); |
| 221 | int (*activate)(struct scsi_device *, activate_complete, void *); | 214 | int (*activate)(struct scsi_device *, activate_complete, void *); |
| 222 | int (*prep_fn)(struct scsi_device *, struct request *); | 215 | int (*prep_fn)(struct scsi_device *, struct request *); |
| @@ -228,7 +221,6 @@ struct scsi_dh_data { | |||
| 228 | struct scsi_device_handler *scsi_dh; | 221 | struct scsi_device_handler *scsi_dh; |
| 229 | struct scsi_device *sdev; | 222 | struct scsi_device *sdev; |
| 230 | struct kref kref; | 223 | struct kref kref; |
| 231 | char buf[0]; | ||
| 232 | }; | 224 | }; |
| 233 | 225 | ||
| 234 | #define to_scsi_device(d) \ | 226 | #define to_scsi_device(d) \ |
| @@ -244,6 +236,15 @@ struct scsi_dh_data { | |||
| 244 | #define sdev_dbg(sdev, fmt, a...) \ | 236 | #define sdev_dbg(sdev, fmt, a...) \ |
| 245 | dev_dbg(&(sdev)->sdev_gendev, fmt, ##a) | 237 | dev_dbg(&(sdev)->sdev_gendev, fmt, ##a) |
| 246 | 238 | ||
| 239 | /* | ||
| 240 | * like scmd_printk, but the device name is passed in | ||
| 241 | * as a string pointer | ||
| 242 | */ | ||
| 243 | #define sdev_prefix_printk(l, sdev, p, fmt, a...) \ | ||
| 244 | (p) ? \ | ||
| 245 | sdev_printk(l, sdev, "[%s] " fmt, p, ##a) : \ | ||
| 246 | sdev_printk(l, sdev, fmt, ##a) | ||
| 247 | |||
| 247 | #define scmd_printk(prefix, scmd, fmt, a...) \ | 248 | #define scmd_printk(prefix, scmd, fmt, a...) \ |
| 248 | (scmd)->request->rq_disk ? \ | 249 | (scmd)->request->rq_disk ? \ |
| 249 | sdev_printk(prefix, (scmd)->device, "[%s] " fmt, \ | 250 | sdev_printk(prefix, (scmd)->device, "[%s] " fmt, \ |
| @@ -379,7 +380,7 @@ extern struct scsi_device *__scsi_iterate_devices(struct Scsi_Host *, | |||
| 379 | #define __shost_for_each_device(sdev, shost) \ | 380 | #define __shost_for_each_device(sdev, shost) \ |
| 380 | list_for_each_entry((sdev), &((shost)->__devices), siblings) | 381 | list_for_each_entry((sdev), &((shost)->__devices), siblings) |
| 381 | 382 | ||
| 382 | extern void scsi_adjust_queue_depth(struct scsi_device *, int, int); | 383 | extern int scsi_change_queue_depth(struct scsi_device *, int); |
| 383 | extern int scsi_track_queue_full(struct scsi_device *, int); | 384 | extern int scsi_track_queue_full(struct scsi_device *, int); |
| 384 | 385 | ||
| 385 | extern int scsi_set_medium_removal(struct scsi_device *, char); | 386 | extern int scsi_set_medium_removal(struct scsi_device *, char); |
diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h index c2b759809d8a..891a658aa867 100644 --- a/include/scsi/scsi_driver.h +++ b/include/scsi/scsi_driver.h | |||
| @@ -9,7 +9,6 @@ struct scsi_cmnd; | |||
| 9 | struct scsi_device; | 9 | struct scsi_device; |
| 10 | 10 | ||
| 11 | struct scsi_driver { | 11 | struct scsi_driver { |
| 12 | struct module *owner; | ||
| 13 | struct device_driver gendrv; | 12 | struct device_driver gendrv; |
| 14 | 13 | ||
| 15 | void (*rescan)(struct device *); | 14 | void (*rescan)(struct device *); |
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 06a8790893ef..1e1421b06565 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h | |||
| @@ -27,10 +27,10 @@ struct scsi_sense_hdr { /* See SPC-3 section 4.5 */ | |||
| 27 | u8 additional_length; /* always 0 for fixed sense format */ | 27 | u8 additional_length; /* always 0 for fixed sense format */ |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr) | 30 | static inline bool scsi_sense_valid(const struct scsi_sense_hdr *sshdr) |
| 31 | { | 31 | { |
| 32 | if (!sshdr) | 32 | if (!sshdr) |
| 33 | return 0; | 33 | return false; |
| 34 | 34 | ||
| 35 | return (sshdr->response_code & 0x70) == 0x70; | 35 | return (sshdr->response_code & 0x70) == 0x70; |
| 36 | } | 36 | } |
| @@ -42,12 +42,12 @@ extern void scsi_eh_flush_done_q(struct list_head *done_q); | |||
| 42 | extern void scsi_report_bus_reset(struct Scsi_Host *, int); | 42 | extern void scsi_report_bus_reset(struct Scsi_Host *, int); |
| 43 | extern void scsi_report_device_reset(struct Scsi_Host *, int, int); | 43 | extern void scsi_report_device_reset(struct Scsi_Host *, int, int); |
| 44 | extern int scsi_block_when_processing_errors(struct scsi_device *); | 44 | extern int scsi_block_when_processing_errors(struct scsi_device *); |
| 45 | extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, | 45 | extern bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len, |
| 46 | struct scsi_sense_hdr *sshdr); | 46 | struct scsi_sense_hdr *sshdr); |
| 47 | extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd, | 47 | extern bool scsi_command_normalize_sense(const struct scsi_cmnd *cmd, |
| 48 | struct scsi_sense_hdr *sshdr); | 48 | struct scsi_sense_hdr *sshdr); |
| 49 | 49 | ||
| 50 | static inline int scsi_sense_is_deferred(struct scsi_sense_hdr *sshdr) | 50 | static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) |
| 51 | { | 51 | { |
| 52 | return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); | 52 | return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); |
| 53 | } | 53 | } |
| @@ -60,15 +60,7 @@ extern int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, | |||
| 60 | 60 | ||
| 61 | extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq); | 61 | extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq); |
| 62 | 62 | ||
| 63 | /* | 63 | extern int scsi_ioctl_reset(struct scsi_device *, int __user *); |
| 64 | * Reset request from external source | ||
| 65 | */ | ||
| 66 | #define SCSI_TRY_RESET_DEVICE 1 | ||
| 67 | #define SCSI_TRY_RESET_BUS 2 | ||
| 68 | #define SCSI_TRY_RESET_HOST 3 | ||
| 69 | #define SCSI_TRY_RESET_TARGET 4 | ||
| 70 | |||
| 71 | extern int scsi_reset_provider(struct scsi_device *, int); | ||
| 72 | 64 | ||
| 73 | struct scsi_eh_save { | 65 | struct scsi_eh_save { |
| 74 | /* saved state */ | 66 | /* saved state */ |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 5e362489ee88..c8a462ef9a4e 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -46,12 +46,6 @@ struct blk_queue_tags; | |||
| 46 | #define DISABLE_CLUSTERING 0 | 46 | #define DISABLE_CLUSTERING 0 |
| 47 | #define ENABLE_CLUSTERING 1 | 47 | #define ENABLE_CLUSTERING 1 |
| 48 | 48 | ||
| 49 | enum { | ||
| 50 | SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */ | ||
| 51 | SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */ | ||
| 52 | SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshold event */ | ||
| 53 | }; | ||
| 54 | |||
| 55 | struct scsi_host_template { | 49 | struct scsi_host_template { |
| 56 | struct module *module; | 50 | struct module *module; |
| 57 | const char *name; | 51 | const char *name; |
| @@ -195,7 +189,7 @@ struct scsi_host_template { | |||
| 195 | * Things currently recommended to be handled at this time include: | 189 | * Things currently recommended to be handled at this time include: |
| 196 | * | 190 | * |
| 197 | * 1. Setting the device queue depth. Proper setting of this is | 191 | * 1. Setting the device queue depth. Proper setting of this is |
| 198 | * described in the comments for scsi_adjust_queue_depth. | 192 | * described in the comments for scsi_change_queue_depth. |
| 199 | * 2. Determining if the device supports the various synchronous | 193 | * 2. Determining if the device supports the various synchronous |
| 200 | * negotiation protocols. The device struct will already have | 194 | * negotiation protocols. The device struct will already have |
| 201 | * responded to INQUIRY and the results of the standard items | 195 | * responded to INQUIRY and the results of the standard items |
| @@ -281,7 +275,7 @@ struct scsi_host_template { | |||
| 281 | * | 275 | * |
| 282 | * Status: OPTIONAL | 276 | * Status: OPTIONAL |
| 283 | */ | 277 | */ |
| 284 | int (* change_queue_depth)(struct scsi_device *, int, int); | 278 | int (* change_queue_depth)(struct scsi_device *, int); |
| 285 | 279 | ||
| 286 | /* | 280 | /* |
| 287 | * Fill in this function to allow the changing of tag types | 281 | * Fill in this function to allow the changing of tag types |
| @@ -422,6 +416,16 @@ struct scsi_host_template { | |||
| 422 | unsigned char present; | 416 | unsigned char present; |
| 423 | 417 | ||
| 424 | /* | 418 | /* |
| 419 | * Let the block layer assigns tags to all commands. | ||
| 420 | */ | ||
| 421 | unsigned use_blk_tags:1; | ||
| 422 | |||
| 423 | /* | ||
| 424 | * Track QUEUE_FULL events and reduce queue depth on demand. | ||
| 425 | */ | ||
| 426 | unsigned track_queue_depth:1; | ||
| 427 | |||
| 428 | /* | ||
| 425 | * This specifies the mode that a LLD supports. | 429 | * This specifies the mode that a LLD supports. |
| 426 | */ | 430 | */ |
| 427 | unsigned supported_mode:2; | 431 | unsigned supported_mode:2; |
| @@ -451,11 +455,6 @@ struct scsi_host_template { | |||
| 451 | */ | 455 | */ |
| 452 | unsigned skip_settle_delay:1; | 456 | unsigned skip_settle_delay:1; |
| 453 | 457 | ||
| 454 | /* | ||
| 455 | * True if we are using ordered write support. | ||
| 456 | */ | ||
| 457 | unsigned ordered_tag:1; | ||
| 458 | |||
| 459 | /* True if the controller does not support WRITE SAME */ | 458 | /* True if the controller does not support WRITE SAME */ |
| 460 | unsigned no_write_same:1; | 459 | unsigned no_write_same:1; |
| 461 | 460 | ||
| @@ -638,6 +637,14 @@ struct Scsi_Host { | |||
| 638 | short unsigned int sg_prot_tablesize; | 637 | short unsigned int sg_prot_tablesize; |
| 639 | unsigned int max_sectors; | 638 | unsigned int max_sectors; |
| 640 | unsigned long dma_boundary; | 639 | unsigned long dma_boundary; |
| 640 | /* | ||
| 641 | * In scsi-mq mode, the number of hardware queues supported by the LLD. | ||
| 642 | * | ||
| 643 | * Note: it is assumed that each hardware queue has a queue depth of | ||
| 644 | * can_queue. In other words, the total queue depth per host | ||
| 645 | * is nr_hw_queues * can_queue. | ||
| 646 | */ | ||
| 647 | unsigned nr_hw_queues; | ||
| 641 | /* | 648 | /* |
| 642 | * Used to assign serial numbers to the cmds. | 649 | * Used to assign serial numbers to the cmds. |
| 643 | * Protected by the host lock. | 650 | * Protected by the host lock. |
| @@ -647,7 +654,6 @@ struct Scsi_Host { | |||
| 647 | unsigned active_mode:2; | 654 | unsigned active_mode:2; |
| 648 | unsigned unchecked_isa_dma:1; | 655 | unsigned unchecked_isa_dma:1; |
| 649 | unsigned use_clustering:1; | 656 | unsigned use_clustering:1; |
| 650 | unsigned use_blk_tcq:1; | ||
| 651 | 657 | ||
| 652 | /* | 658 | /* |
| 653 | * Host has requested that no further requests come through for the | 659 | * Host has requested that no further requests come through for the |
| @@ -662,11 +668,6 @@ struct Scsi_Host { | |||
| 662 | */ | 668 | */ |
| 663 | unsigned reverse_ordering:1; | 669 | unsigned reverse_ordering:1; |
| 664 | 670 | ||
| 665 | /* | ||
| 666 | * Ordered write support | ||
| 667 | */ | ||
| 668 | unsigned ordered_tag:1; | ||
| 669 | |||
| 670 | /* Task mgmt function in progress */ | 671 | /* Task mgmt function in progress */ |
| 671 | unsigned tmf_in_progress:1; | 672 | unsigned tmf_in_progress:1; |
| 672 | 673 | ||
diff --git a/include/scsi/scsi_ioctl.h b/include/scsi/scsi_ioctl.h index b9006848b813..8d19d1d233c3 100644 --- a/include/scsi/scsi_ioctl.h +++ b/include/scsi/scsi_ioctl.h | |||
| @@ -40,9 +40,9 @@ typedef struct scsi_fctargaddress { | |||
| 40 | unsigned char host_wwn[8]; // include NULL term. | 40 | unsigned char host_wwn[8]; // include NULL term. |
| 41 | } Scsi_FCTargAddress; | 41 | } Scsi_FCTargAddress; |
| 42 | 42 | ||
| 43 | int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev, | ||
| 44 | int cmd, bool ndelay); | ||
| 43 | extern int scsi_ioctl(struct scsi_device *, int, void __user *); | 45 | extern int scsi_ioctl(struct scsi_device *, int, void __user *); |
| 44 | extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, | ||
| 45 | void __user *arg, int ndelay); | ||
| 46 | 46 | ||
| 47 | #endif /* __KERNEL__ */ | 47 | #endif /* __KERNEL__ */ |
| 48 | #endif /* _SCSI_IOCTL_H */ | 48 | #endif /* _SCSI_IOCTL_H */ |
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index 56ed843969ca..fe4a70299419 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h | |||
| @@ -16,20 +16,16 @@ | |||
| 16 | 16 | ||
| 17 | #ifdef CONFIG_BLOCK | 17 | #ifdef CONFIG_BLOCK |
| 18 | 18 | ||
| 19 | int scsi_change_queue_type(struct scsi_device *sdev, int tag_type); | ||
| 20 | |||
| 19 | /** | 21 | /** |
| 20 | * scsi_get_tag_type - get the type of tag the device supports | 22 | * scsi_get_tag_type - get the type of tag the device supports |
| 21 | * @sdev: the scsi device | 23 | * @sdev: the scsi device |
| 22 | * | ||
| 23 | * Notes: | ||
| 24 | * If the drive only supports simple tags, returns MSG_SIMPLE_TAG | ||
| 25 | * if it supports all tag types, returns MSG_ORDERED_TAG. | ||
| 26 | */ | 24 | */ |
| 27 | static inline int scsi_get_tag_type(struct scsi_device *sdev) | 25 | static inline int scsi_get_tag_type(struct scsi_device *sdev) |
| 28 | { | 26 | { |
| 29 | if (!sdev->tagged_supported) | 27 | if (!sdev->tagged_supported) |
| 30 | return 0; | 28 | return 0; |
| 31 | if (sdev->ordered_tags) | ||
| 32 | return MSG_ORDERED_TAG; | ||
| 33 | if (sdev->simple_tags) | 29 | if (sdev->simple_tags) |
| 34 | return MSG_SIMPLE_TAG; | 30 | return MSG_SIMPLE_TAG; |
| 35 | return 0; | 31 | return 0; |
| @@ -39,90 +35,33 @@ static inline void scsi_set_tag_type(struct scsi_device *sdev, int tag) | |||
| 39 | { | 35 | { |
| 40 | switch (tag) { | 36 | switch (tag) { |
| 41 | case MSG_ORDERED_TAG: | 37 | case MSG_ORDERED_TAG: |
| 42 | sdev->ordered_tags = 1; | ||
| 43 | /* fall through */ | ||
| 44 | case MSG_SIMPLE_TAG: | 38 | case MSG_SIMPLE_TAG: |
| 45 | sdev->simple_tags = 1; | 39 | sdev->simple_tags = 1; |
| 46 | break; | 40 | break; |
| 47 | case 0: | 41 | case 0: |
| 48 | /* fall through */ | 42 | /* fall through */ |
| 49 | default: | 43 | default: |
| 50 | sdev->ordered_tags = 0; | ||
| 51 | sdev->simple_tags = 0; | 44 | sdev->simple_tags = 0; |
| 52 | break; | 45 | break; |
| 53 | } | 46 | } |
| 54 | } | 47 | } |
| 55 | /** | ||
| 56 | * scsi_activate_tcq - turn on tag command queueing | ||
| 57 | * @SDpnt: device to turn on TCQ for | ||
| 58 | * @depth: queue depth | ||
| 59 | * | ||
| 60 | * Notes: | ||
| 61 | * Eventually, I hope depth would be the maximum depth | ||
| 62 | * the device could cope with and the real queue depth | ||
| 63 | * would be adjustable from 0 to depth. | ||
| 64 | **/ | ||
| 65 | static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth) | ||
| 66 | { | ||
| 67 | if (!sdev->tagged_supported) | ||
| 68 | return; | ||
| 69 | |||
| 70 | if (shost_use_blk_mq(sdev->host)) | ||
| 71 | queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, sdev->request_queue); | ||
| 72 | else if (!blk_queue_tagged(sdev->request_queue)) | ||
| 73 | blk_queue_init_tags(sdev->request_queue, depth, | ||
| 74 | sdev->host->bqt); | ||
| 75 | |||
| 76 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | ||
| 77 | } | ||
| 78 | |||
| 79 | /** | ||
| 80 | * scsi_deactivate_tcq - turn off tag command queueing | ||
| 81 | * @SDpnt: device to turn off TCQ for | ||
| 82 | **/ | ||
| 83 | static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) | ||
| 84 | { | ||
| 85 | if (blk_queue_tagged(sdev->request_queue)) | ||
| 86 | blk_queue_free_tags(sdev->request_queue); | ||
| 87 | scsi_adjust_queue_depth(sdev, 0, depth); | ||
| 88 | } | ||
| 89 | |||
| 90 | /** | ||
| 91 | * scsi_populate_tag_msg - place a tag message in a buffer | ||
| 92 | * @SCpnt: pointer to the Scsi_Cmnd for the tag | ||
| 93 | * @msg: pointer to the area to place the tag | ||
| 94 | * | ||
| 95 | * Notes: | ||
| 96 | * designed to create the correct type of tag message for the | ||
| 97 | * particular request. Returns the size of the tag message. | ||
| 98 | * May return 0 if TCQ is disabled for this device. | ||
| 99 | **/ | ||
| 100 | static inline int scsi_populate_tag_msg(struct scsi_cmnd *cmd, char *msg) | ||
| 101 | { | ||
| 102 | struct request *req = cmd->request; | ||
| 103 | |||
| 104 | if (blk_rq_tagged(req)) { | ||
| 105 | *msg++ = MSG_SIMPLE_TAG; | ||
| 106 | *msg++ = req->tag; | ||
| 107 | return 2; | ||
| 108 | } | ||
| 109 | |||
| 110 | return 0; | ||
| 111 | } | ||
| 112 | 48 | ||
| 113 | static inline struct scsi_cmnd *scsi_mq_find_tag(struct Scsi_Host *shost, | 49 | static inline struct scsi_cmnd *scsi_mq_find_tag(struct Scsi_Host *shost, |
| 114 | unsigned int hw_ctx, int tag) | 50 | int unique_tag) |
| 115 | { | 51 | { |
| 116 | struct request *req; | 52 | u16 hwq = blk_mq_unique_tag_to_hwq(unique_tag); |
| 53 | struct request *req = NULL; | ||
| 117 | 54 | ||
| 118 | req = blk_mq_tag_to_rq(shost->tag_set.tags[hw_ctx], tag); | 55 | if (hwq < shost->tag_set.nr_hw_queues) |
| 56 | req = blk_mq_tag_to_rq(shost->tag_set.tags[hwq], | ||
| 57 | blk_mq_unique_tag_to_tag(unique_tag)); | ||
| 119 | return req ? (struct scsi_cmnd *)req->special : NULL; | 58 | return req ? (struct scsi_cmnd *)req->special : NULL; |
| 120 | } | 59 | } |
| 121 | 60 | ||
| 122 | /** | 61 | /** |
| 123 | * scsi_find_tag - find a tagged command by device | 62 | * scsi_find_tag - find a tagged command by device |
| 124 | * @SDpnt: pointer to the ScSI device | 63 | * @SDpnt: pointer to the ScSI device |
| 125 | * @tag: the tag number | 64 | * @tag: tag generated by blk_mq_unique_tag() |
| 126 | * | 65 | * |
| 127 | * Notes: | 66 | * Notes: |
| 128 | * Only works with tags allocated by the generic blk layer. | 67 | * Only works with tags allocated by the generic blk layer. |
| @@ -133,9 +72,9 @@ static inline struct scsi_cmnd *scsi_find_tag(struct scsi_device *sdev, int tag) | |||
| 133 | 72 | ||
| 134 | if (tag != SCSI_NO_TAG) { | 73 | if (tag != SCSI_NO_TAG) { |
| 135 | if (shost_use_blk_mq(sdev->host)) | 74 | if (shost_use_blk_mq(sdev->host)) |
| 136 | return scsi_mq_find_tag(sdev->host, 0, tag); | 75 | return scsi_mq_find_tag(sdev->host, tag); |
| 137 | 76 | ||
| 138 | req = blk_queue_find_tag(sdev->request_queue, tag); | 77 | req = blk_queue_find_tag(sdev->request_queue, tag); |
| 139 | return req ? (struct scsi_cmnd *)req->special : NULL; | 78 | return req ? (struct scsi_cmnd *)req->special : NULL; |
| 140 | } | 79 | } |
| 141 | 80 | ||
| @@ -174,7 +113,7 @@ static inline int scsi_init_shared_tag_map(struct Scsi_Host *shost, int depth) | |||
| 174 | /** | 113 | /** |
| 175 | * scsi_host_find_tag - find the tagged command by host | 114 | * scsi_host_find_tag - find the tagged command by host |
| 176 | * @shost: pointer to scsi_host | 115 | * @shost: pointer to scsi_host |
| 177 | * @tag: tag of the scsi_cmnd | 116 | * @tag: tag generated by blk_mq_unique_tag() |
| 178 | * | 117 | * |
| 179 | * Notes: | 118 | * Notes: |
| 180 | * Only works with tags allocated by the generic blk layer. | 119 | * Only works with tags allocated by the generic blk layer. |
| @@ -186,7 +125,7 @@ static inline struct scsi_cmnd *scsi_host_find_tag(struct Scsi_Host *shost, | |||
| 186 | 125 | ||
| 187 | if (tag != SCSI_NO_TAG) { | 126 | if (tag != SCSI_NO_TAG) { |
| 188 | if (shost_use_blk_mq(shost)) | 127 | if (shost_use_blk_mq(shost)) |
| 189 | return scsi_mq_find_tag(shost, 0, tag); | 128 | return scsi_mq_find_tag(shost, tag); |
| 190 | req = blk_map_queue_find_tag(shost->bqt, tag); | 129 | req = blk_map_queue_find_tag(shost->bqt, tag); |
| 191 | return req ? (struct scsi_cmnd *)req->special : NULL; | 130 | return req ? (struct scsi_cmnd *)req->special : NULL; |
| 192 | } | 131 | } |
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index 7497a383b1a4..a4fa52b4d5c5 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
| @@ -157,5 +157,6 @@ int spi_populate_width_msg(unsigned char *msg, int width); | |||
| 157 | int spi_populate_sync_msg(unsigned char *msg, int period, int offset); | 157 | int spi_populate_sync_msg(unsigned char *msg, int period, int offset); |
| 158 | int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, | 158 | int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, |
| 159 | int options); | 159 | int options); |
| 160 | int spi_populate_tag_msg(unsigned char *msg, struct scsi_cmnd *cmd); | ||
| 160 | 161 | ||
| 161 | #endif /* SCSI_TRANSPORT_SPI_H */ | 162 | #endif /* SCSI_TRANSPORT_SPI_H */ |
diff --git a/include/scsi/sg.h b/include/scsi/sg.h index 750e5db7c6bf..3afec7032448 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h | |||
| @@ -164,12 +164,15 @@ typedef struct sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */ | |||
| 164 | 164 | ||
| 165 | /* Returns -EBUSY if occupied. 3rd argument pointer to int (see next) */ | 165 | /* Returns -EBUSY if occupied. 3rd argument pointer to int (see next) */ |
| 166 | #define SG_SCSI_RESET 0x2284 | 166 | #define SG_SCSI_RESET 0x2284 |
| 167 | /* Associated values that can be given to SG_SCSI_RESET follow */ | 167 | /* Associated values that can be given to SG_SCSI_RESET follow. |
| 168 | * SG_SCSI_RESET_NO_ESCALATE may be OR-ed to the _DEVICE, _TARGET, _BUS | ||
| 169 | * or _HOST reset value so only that action is attempted. */ | ||
| 168 | #define SG_SCSI_RESET_NOTHING 0 | 170 | #define SG_SCSI_RESET_NOTHING 0 |
| 169 | #define SG_SCSI_RESET_DEVICE 1 | 171 | #define SG_SCSI_RESET_DEVICE 1 |
| 170 | #define SG_SCSI_RESET_BUS 2 | 172 | #define SG_SCSI_RESET_BUS 2 |
| 171 | #define SG_SCSI_RESET_HOST 3 | 173 | #define SG_SCSI_RESET_HOST 3 |
| 172 | #define SG_SCSI_RESET_TARGET 4 | 174 | #define SG_SCSI_RESET_TARGET 4 |
| 175 | #define SG_SCSI_RESET_NO_ESCALATE 0x100 | ||
| 173 | 176 | ||
| 174 | /* synchronous SCSI command ioctl, (only in version 3 interface) */ | 177 | /* synchronous SCSI command ioctl, (only in version 3 interface) */ |
| 175 | #define SG_IO 0x2285 /* similar effect as write() followed by read() */ | 178 | #define SG_IO 0x2285 /* similar effect as write() followed by read() */ |
diff --git a/include/soc/at91/at91rm9200_sdramc.h b/include/soc/at91/at91rm9200_sdramc.h new file mode 100644 index 000000000000..aa047f458f1b --- /dev/null +++ b/include/soc/at91/at91rm9200_sdramc.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-at91/include/mach/at91rm9200_sdramc.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
| 5 | * Copyright (C) SAN People | ||
| 6 | * | ||
| 7 | * Memory Controllers (SDRAMC only) - System peripherals registers. | ||
| 8 | * Based on AT91RM9200 datasheet revision E. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef AT91RM9200_SDRAMC_H | ||
| 17 | #define AT91RM9200_SDRAMC_H | ||
| 18 | |||
| 19 | /* SDRAM Controller registers */ | ||
| 20 | #define AT91RM9200_SDRAMC_MR 0x90 /* Mode Register */ | ||
| 21 | #define AT91RM9200_SDRAMC_MODE (0xf << 0) /* Command Mode */ | ||
| 22 | #define AT91RM9200_SDRAMC_MODE_NORMAL (0 << 0) | ||
| 23 | #define AT91RM9200_SDRAMC_MODE_NOP (1 << 0) | ||
| 24 | #define AT91RM9200_SDRAMC_MODE_PRECHARGE (2 << 0) | ||
| 25 | #define AT91RM9200_SDRAMC_MODE_LMR (3 << 0) | ||
| 26 | #define AT91RM9200_SDRAMC_MODE_REFRESH (4 << 0) | ||
| 27 | #define AT91RM9200_SDRAMC_DBW (1 << 4) /* Data Bus Width */ | ||
| 28 | #define AT91RM9200_SDRAMC_DBW_32 (0 << 4) | ||
| 29 | #define AT91RM9200_SDRAMC_DBW_16 (1 << 4) | ||
| 30 | |||
| 31 | #define AT91RM9200_SDRAMC_TR 0x94 /* Refresh Timer Register */ | ||
| 32 | #define AT91RM9200_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Count */ | ||
| 33 | |||
| 34 | #define AT91RM9200_SDRAMC_CR 0x98 /* Configuration Register */ | ||
| 35 | #define AT91RM9200_SDRAMC_NC (3 << 0) /* Number of Column Bits */ | ||
| 36 | #define AT91RM9200_SDRAMC_NC_8 (0 << 0) | ||
| 37 | #define AT91RM9200_SDRAMC_NC_9 (1 << 0) | ||
| 38 | #define AT91RM9200_SDRAMC_NC_10 (2 << 0) | ||
| 39 | #define AT91RM9200_SDRAMC_NC_11 (3 << 0) | ||
| 40 | #define AT91RM9200_SDRAMC_NR (3 << 2) /* Number of Row Bits */ | ||
| 41 | #define AT91RM9200_SDRAMC_NR_11 (0 << 2) | ||
| 42 | #define AT91RM9200_SDRAMC_NR_12 (1 << 2) | ||
| 43 | #define AT91RM9200_SDRAMC_NR_13 (2 << 2) | ||
| 44 | #define AT91RM9200_SDRAMC_NB (1 << 4) /* Number of Banks */ | ||
| 45 | #define AT91RM9200_SDRAMC_NB_2 (0 << 4) | ||
| 46 | #define AT91RM9200_SDRAMC_NB_4 (1 << 4) | ||
| 47 | #define AT91RM9200_SDRAMC_CAS (3 << 5) /* CAS Latency */ | ||
| 48 | #define AT91RM9200_SDRAMC_CAS_2 (2 << 5) | ||
| 49 | #define AT91RM9200_SDRAMC_TWR (0xf << 7) /* Write Recovery Delay */ | ||
| 50 | #define AT91RM9200_SDRAMC_TRC (0xf << 11) /* Row Cycle Delay */ | ||
| 51 | #define AT91RM9200_SDRAMC_TRP (0xf << 15) /* Row Precharge Delay */ | ||
| 52 | #define AT91RM9200_SDRAMC_TRCD (0xf << 19) /* Row to Column Delay */ | ||
| 53 | #define AT91RM9200_SDRAMC_TRAS (0xf << 23) /* Active to Precharge Delay */ | ||
| 54 | #define AT91RM9200_SDRAMC_TXSR (0xf << 27) /* Exit Self Refresh to Active Delay */ | ||
| 55 | |||
| 56 | #define AT91RM9200_SDRAMC_SRR 0x9c /* Self Refresh Register */ | ||
| 57 | #define AT91RM9200_SDRAMC_LPR 0xa0 /* Low Power Register */ | ||
| 58 | #define AT91RM9200_SDRAMC_IER 0xa4 /* Interrupt Enable Register */ | ||
| 59 | #define AT91RM9200_SDRAMC_IDR 0xa8 /* Interrupt Disable Register */ | ||
| 60 | #define AT91RM9200_SDRAMC_IMR 0xac /* Interrupt Mask Register */ | ||
| 61 | #define AT91RM9200_SDRAMC_ISR 0xb0 /* Interrupt Status Register */ | ||
| 62 | |||
| 63 | #endif | ||
diff --git a/include/soc/at91/at91sam9_ddrsdr.h b/include/soc/at91/at91sam9_ddrsdr.h new file mode 100644 index 000000000000..0210797abf2e --- /dev/null +++ b/include/soc/at91/at91sam9_ddrsdr.h | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | /* | ||
| 2 | * Header file for the Atmel DDR/SDR SDRAM Controller | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Atmel Corporation | ||
| 5 | * Nicolas Ferre <nicolas.ferre@atmel.com> | ||
| 6 | * | ||
| 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 | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | */ | ||
| 12 | #ifndef AT91SAM9_DDRSDR_H | ||
| 13 | #define AT91SAM9_DDRSDR_H | ||
| 14 | |||
| 15 | #define AT91_DDRSDRC_MR 0x00 /* Mode Register */ | ||
| 16 | #define AT91_DDRSDRC_MODE (0x7 << 0) /* Command Mode */ | ||
| 17 | #define AT91_DDRSDRC_MODE_NORMAL 0 | ||
| 18 | #define AT91_DDRSDRC_MODE_NOP 1 | ||
| 19 | #define AT91_DDRSDRC_MODE_PRECHARGE 2 | ||
| 20 | #define AT91_DDRSDRC_MODE_LMR 3 | ||
| 21 | #define AT91_DDRSDRC_MODE_REFRESH 4 | ||
| 22 | #define AT91_DDRSDRC_MODE_EXT_LMR 5 | ||
| 23 | #define AT91_DDRSDRC_MODE_DEEP 6 | ||
| 24 | |||
| 25 | #define AT91_DDRSDRC_RTR 0x04 /* Refresh Timer Register */ | ||
| 26 | #define AT91_DDRSDRC_COUNT (0xfff << 0) /* Refresh Timer Counter */ | ||
| 27 | |||
| 28 | #define AT91_DDRSDRC_CR 0x08 /* Configuration Register */ | ||
| 29 | #define AT91_DDRSDRC_NC (3 << 0) /* Number of Column Bits */ | ||
| 30 | #define AT91_DDRSDRC_NC_SDR8 (0 << 0) | ||
| 31 | #define AT91_DDRSDRC_NC_SDR9 (1 << 0) | ||
| 32 | #define AT91_DDRSDRC_NC_SDR10 (2 << 0) | ||
| 33 | #define AT91_DDRSDRC_NC_SDR11 (3 << 0) | ||
| 34 | #define AT91_DDRSDRC_NC_DDR9 (0 << 0) | ||
| 35 | #define AT91_DDRSDRC_NC_DDR10 (1 << 0) | ||
| 36 | #define AT91_DDRSDRC_NC_DDR11 (2 << 0) | ||
| 37 | #define AT91_DDRSDRC_NC_DDR12 (3 << 0) | ||
| 38 | #define AT91_DDRSDRC_NR (3 << 2) /* Number of Row Bits */ | ||
| 39 | #define AT91_DDRSDRC_NR_11 (0 << 2) | ||
| 40 | #define AT91_DDRSDRC_NR_12 (1 << 2) | ||
| 41 | #define AT91_DDRSDRC_NR_13 (2 << 2) | ||
| 42 | #define AT91_DDRSDRC_NR_14 (3 << 2) | ||
| 43 | #define AT91_DDRSDRC_CAS (7 << 4) /* CAS Latency */ | ||
| 44 | #define AT91_DDRSDRC_CAS_2 (2 << 4) | ||
| 45 | #define AT91_DDRSDRC_CAS_3 (3 << 4) | ||
| 46 | #define AT91_DDRSDRC_CAS_25 (6 << 4) | ||
| 47 | #define AT91_DDRSDRC_RST_DLL (1 << 7) /* Reset DLL */ | ||
| 48 | #define AT91_DDRSDRC_DICDS (1 << 8) /* Output impedance control */ | ||
| 49 | #define AT91_DDRSDRC_DIS_DLL (1 << 9) /* Disable DLL [SAM9 Only] */ | ||
| 50 | #define AT91_DDRSDRC_OCD (1 << 12) /* Off-Chip Driver [SAM9 Only] */ | ||
| 51 | #define AT91_DDRSDRC_DQMS (1 << 16) /* Mask Data is Shared [SAM9 Only] */ | ||
| 52 | #define AT91_DDRSDRC_ACTBST (1 << 18) /* Active Bank X to Burst Stop Read Access Bank Y [SAM9 Only] */ | ||
| 53 | |||
| 54 | #define AT91_DDRSDRC_T0PR 0x0C /* Timing 0 Register */ | ||
| 55 | #define AT91_DDRSDRC_TRAS (0xf << 0) /* Active to Precharge delay */ | ||
| 56 | #define AT91_DDRSDRC_TRCD (0xf << 4) /* Row to Column delay */ | ||
| 57 | #define AT91_DDRSDRC_TWR (0xf << 8) /* Write recovery delay */ | ||
| 58 | #define AT91_DDRSDRC_TRC (0xf << 12) /* Row cycle delay */ | ||
| 59 | #define AT91_DDRSDRC_TRP (0xf << 16) /* Row precharge delay */ | ||
| 60 | #define AT91_DDRSDRC_TRRD (0xf << 20) /* Active BankA to BankB */ | ||
| 61 | #define AT91_DDRSDRC_TWTR (0x7 << 24) /* Internal Write to Read delay */ | ||
| 62 | #define AT91_DDRSDRC_RED_WRRD (0x1 << 27) /* Reduce Write to Read Delay [SAM9 Only] */ | ||
| 63 | #define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */ | ||
| 64 | |||
| 65 | #define AT91_DDRSDRC_T1PR 0x10 /* Timing 1 Register */ | ||
| 66 | #define AT91_DDRSDRC_TRFC (0x1f << 0) /* Row Cycle Delay */ | ||
| 67 | #define AT91_DDRSDRC_TXSNR (0xff << 8) /* Exit self-refresh to non-read */ | ||
| 68 | #define AT91_DDRSDRC_TXSRD (0xff << 16) /* Exit self-refresh to read */ | ||
| 69 | #define AT91_DDRSDRC_TXP (0xf << 24) /* Exit power-down delay */ | ||
| 70 | |||
| 71 | #define AT91_DDRSDRC_T2PR 0x14 /* Timing 2 Register [SAM9 Only] */ | ||
| 72 | #define AT91_DDRSDRC_TXARD (0xf << 0) /* Exit active power down delay to read command in mode "Fast Exit" */ | ||
| 73 | #define AT91_DDRSDRC_TXARDS (0xf << 4) /* Exit active power down delay to read command in mode "Slow Exit" */ | ||
| 74 | #define AT91_DDRSDRC_TRPA (0xf << 8) /* Row Precharge All delay */ | ||
| 75 | #define AT91_DDRSDRC_TRTP (0x7 << 12) /* Read to Precharge delay */ | ||
| 76 | |||
| 77 | #define AT91_DDRSDRC_LPR 0x1C /* Low Power Register */ | ||
| 78 | #define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */ | ||
| 79 | #define AT91_DDRSDRC_LPCB_DISABLE 0 | ||
| 80 | #define AT91_DDRSDRC_LPCB_SELF_REFRESH 1 | ||
| 81 | #define AT91_DDRSDRC_LPCB_POWER_DOWN 2 | ||
| 82 | #define AT91_DDRSDRC_LPCB_DEEP_POWER_DOWN 3 | ||
| 83 | #define AT91_DDRSDRC_CLKFR (1 << 2) /* Clock Frozen */ | ||
| 84 | #define AT91_DDRSDRC_PASR (7 << 4) /* Partial Array Self Refresh */ | ||
| 85 | #define AT91_DDRSDRC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */ | ||
| 86 | #define AT91_DDRSDRC_DS (3 << 10) /* Drive Strength */ | ||
| 87 | #define AT91_DDRSDRC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */ | ||
| 88 | #define AT91_DDRSDRC_TIMEOUT_0_CLK_CYCLES (0 << 12) | ||
| 89 | #define AT91_DDRSDRC_TIMEOUT_64_CLK_CYCLES (1 << 12) | ||
| 90 | #define AT91_DDRSDRC_TIMEOUT_128_CLK_CYCLES (2 << 12) | ||
| 91 | #define AT91_DDRSDRC_APDE (1 << 16) /* Active power down exit time */ | ||
| 92 | #define AT91_DDRSDRC_UPD_MR (3 << 20) /* Update load mode register and extended mode register */ | ||
| 93 | |||
| 94 | #define AT91_DDRSDRC_MDR 0x20 /* Memory Device Register */ | ||
| 95 | #define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */ | ||
| 96 | #define AT91_DDRSDRC_MD_SDR 0 | ||
| 97 | #define AT91_DDRSDRC_MD_LOW_POWER_SDR 1 | ||
| 98 | #define AT91_DDRSDRC_MD_LOW_POWER_DDR 3 | ||
| 99 | #define AT91_DDRSDRC_MD_DDR2 6 /* [SAM9 Only] */ | ||
| 100 | #define AT91_DDRSDRC_DBW (1 << 4) /* Data Bus Width */ | ||
| 101 | #define AT91_DDRSDRC_DBW_32BITS (0 << 4) | ||
| 102 | #define AT91_DDRSDRC_DBW_16BITS (1 << 4) | ||
| 103 | |||
| 104 | #define AT91_DDRSDRC_DLL 0x24 /* DLL Information Register */ | ||
| 105 | #define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */ | ||
| 106 | #define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */ | ||
| 107 | #define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */ | ||
| 108 | #define AT91_DDRSDRC_MDVAL (0xff << 8) /* Master Delay value */ | ||
| 109 | |||
| 110 | #define AT91_DDRSDRC_HS 0x2C /* High Speed Register [SAM9 Only] */ | ||
| 111 | #define AT91_DDRSDRC_DIS_ATCP_RD (1 << 2) /* Anticip read access is disabled */ | ||
| 112 | |||
| 113 | #define AT91_DDRSDRC_DELAY(n) (0x30 + (0x4 * (n))) /* Delay I/O Register n */ | ||
| 114 | |||
| 115 | #define AT91_DDRSDRC_WPMR 0xE4 /* Write Protect Mode Register [SAM9 Only] */ | ||
| 116 | #define AT91_DDRSDRC_WP (1 << 0) /* Write protect enable */ | ||
| 117 | #define AT91_DDRSDRC_WPKEY (0xffffff << 8) /* Write protect key */ | ||
| 118 | #define AT91_DDRSDRC_KEY (0x444452 << 8) /* Write protect key = "DDR" */ | ||
| 119 | |||
| 120 | #define AT91_DDRSDRC_WPSR 0xE8 /* Write Protect Status Register [SAM9 Only] */ | ||
| 121 | #define AT91_DDRSDRC_WPVS (1 << 0) /* Write protect violation status */ | ||
| 122 | #define AT91_DDRSDRC_WPVSRC (0xffff << 8) /* Write protect violation source */ | ||
| 123 | |||
| 124 | #endif | ||
diff --git a/include/soc/at91/at91sam9_sdramc.h b/include/soc/at91/at91sam9_sdramc.h new file mode 100644 index 000000000000..3d085a9a7450 --- /dev/null +++ b/include/soc/at91/at91sam9_sdramc.h | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-at91/include/mach/at91sam9_sdramc.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007 Andrew Victor | ||
| 5 | * Copyright (C) 2007 Atmel Corporation. | ||
| 6 | * | ||
| 7 | * SDRAM Controllers (SDRAMC) - System peripherals registers. | ||
| 8 | * Based on AT91SAM9261 datasheet revision D. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #ifndef AT91SAM9_SDRAMC_H | ||
| 17 | #define AT91SAM9_SDRAMC_H | ||
| 18 | |||
| 19 | /* SDRAM Controller (SDRAMC) registers */ | ||
| 20 | #define AT91_SDRAMC_MR 0x00 /* SDRAM Controller Mode Register */ | ||
| 21 | #define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */ | ||
| 22 | #define AT91_SDRAMC_MODE_NORMAL 0 | ||
| 23 | #define AT91_SDRAMC_MODE_NOP 1 | ||
| 24 | #define AT91_SDRAMC_MODE_PRECHARGE 2 | ||
| 25 | #define AT91_SDRAMC_MODE_LMR 3 | ||
| 26 | #define AT91_SDRAMC_MODE_REFRESH 4 | ||
| 27 | #define AT91_SDRAMC_MODE_EXT_LMR 5 | ||
| 28 | #define AT91_SDRAMC_MODE_DEEP 6 | ||
| 29 | |||
| 30 | #define AT91_SDRAMC_TR 0x04 /* SDRAM Controller Refresh Timer Register */ | ||
| 31 | #define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */ | ||
| 32 | |||
| 33 | #define AT91_SDRAMC_CR 0x08 /* SDRAM Controller Configuration Register */ | ||
| 34 | #define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */ | ||
| 35 | #define AT91_SDRAMC_NC_8 (0 << 0) | ||
| 36 | #define AT91_SDRAMC_NC_9 (1 << 0) | ||
| 37 | #define AT91_SDRAMC_NC_10 (2 << 0) | ||
| 38 | #define AT91_SDRAMC_NC_11 (3 << 0) | ||
| 39 | #define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */ | ||
| 40 | #define AT91_SDRAMC_NR_11 (0 << 2) | ||
| 41 | #define AT91_SDRAMC_NR_12 (1 << 2) | ||
| 42 | #define AT91_SDRAMC_NR_13 (2 << 2) | ||
| 43 | #define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */ | ||
| 44 | #define AT91_SDRAMC_NB_2 (0 << 4) | ||
| 45 | #define AT91_SDRAMC_NB_4 (1 << 4) | ||
| 46 | #define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */ | ||
| 47 | #define AT91_SDRAMC_CAS_1 (1 << 5) | ||
| 48 | #define AT91_SDRAMC_CAS_2 (2 << 5) | ||
| 49 | #define AT91_SDRAMC_CAS_3 (3 << 5) | ||
| 50 | #define AT91_SDRAMC_DBW (1 << 7) /* Data Bus Width */ | ||
| 51 | #define AT91_SDRAMC_DBW_32 (0 << 7) | ||
| 52 | #define AT91_SDRAMC_DBW_16 (1 << 7) | ||
| 53 | #define AT91_SDRAMC_TWR (0xf << 8) /* Write Recovery Delay */ | ||
| 54 | #define AT91_SDRAMC_TRC (0xf << 12) /* Row Cycle Delay */ | ||
| 55 | #define AT91_SDRAMC_TRP (0xf << 16) /* Row Precharge Delay */ | ||
| 56 | #define AT91_SDRAMC_TRCD (0xf << 20) /* Row to Column Delay */ | ||
| 57 | #define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */ | ||
| 58 | #define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */ | ||
| 59 | |||
| 60 | #define AT91_SDRAMC_LPR 0x10 /* SDRAM Controller Low Power Register */ | ||
| 61 | #define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */ | ||
| 62 | #define AT91_SDRAMC_LPCB_DISABLE 0 | ||
| 63 | #define AT91_SDRAMC_LPCB_SELF_REFRESH 1 | ||
| 64 | #define AT91_SDRAMC_LPCB_POWER_DOWN 2 | ||
| 65 | #define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3 | ||
| 66 | #define AT91_SDRAMC_PASR (7 << 4) /* Partial Array Self Refresh */ | ||
| 67 | #define AT91_SDRAMC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */ | ||
| 68 | #define AT91_SDRAMC_DS (3 << 10) /* Drive Strength */ | ||
| 69 | #define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */ | ||
| 70 | #define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12) | ||
| 71 | #define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12) | ||
| 72 | #define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12) | ||
| 73 | |||
| 74 | #define AT91_SDRAMC_IER 0x14 /* SDRAM Controller Interrupt Enable Register */ | ||
| 75 | #define AT91_SDRAMC_IDR 0x18 /* SDRAM Controller Interrupt Disable Register */ | ||
| 76 | #define AT91_SDRAMC_IMR 0x1C /* SDRAM Controller Interrupt Mask Register */ | ||
| 77 | #define AT91_SDRAMC_ISR 0x20 /* SDRAM Controller Interrupt Status Register */ | ||
| 78 | #define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */ | ||
| 79 | |||
| 80 | #define AT91_SDRAMC_MDR 0x24 /* SDRAM Memory Device Register */ | ||
| 81 | #define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */ | ||
| 82 | #define AT91_SDRAMC_MD_SDRAM 0 | ||
| 83 | #define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1 | ||
| 84 | |||
| 85 | #endif | ||
diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h new file mode 100644 index 000000000000..63deb8d9f82a --- /dev/null +++ b/include/soc/tegra/mc.h | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2014 NVIDIA Corporation | ||
| 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 version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __SOC_TEGRA_MC_H__ | ||
| 10 | #define __SOC_TEGRA_MC_H__ | ||
| 11 | |||
| 12 | #include <linux/types.h> | ||
| 13 | |||
| 14 | struct clk; | ||
| 15 | struct device; | ||
| 16 | struct page; | ||
| 17 | |||
| 18 | struct tegra_smmu_enable { | ||
| 19 | unsigned int reg; | ||
| 20 | unsigned int bit; | ||
| 21 | }; | ||
| 22 | |||
| 23 | /* latency allowance */ | ||
| 24 | struct tegra_mc_la { | ||
| 25 | unsigned int reg; | ||
| 26 | unsigned int shift; | ||
| 27 | unsigned int mask; | ||
| 28 | unsigned int def; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct tegra_mc_client { | ||
| 32 | unsigned int id; | ||
| 33 | const char *name; | ||
| 34 | unsigned int swgroup; | ||
| 35 | |||
| 36 | unsigned int fifo_size; | ||
| 37 | |||
| 38 | struct tegra_smmu_enable smmu; | ||
| 39 | struct tegra_mc_la la; | ||
| 40 | }; | ||
| 41 | |||
| 42 | struct tegra_smmu_swgroup { | ||
| 43 | unsigned int swgroup; | ||
| 44 | unsigned int reg; | ||
| 45 | }; | ||
| 46 | |||
| 47 | struct tegra_smmu_ops { | ||
| 48 | void (*flush_dcache)(struct page *page, unsigned long offset, | ||
| 49 | size_t size); | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct tegra_smmu_soc { | ||
| 53 | const struct tegra_mc_client *clients; | ||
| 54 | unsigned int num_clients; | ||
| 55 | |||
| 56 | const struct tegra_smmu_swgroup *swgroups; | ||
| 57 | unsigned int num_swgroups; | ||
| 58 | |||
| 59 | bool supports_round_robin_arbitration; | ||
| 60 | bool supports_request_limit; | ||
| 61 | |||
| 62 | unsigned int num_asids; | ||
| 63 | |||
| 64 | const struct tegra_smmu_ops *ops; | ||
| 65 | }; | ||
| 66 | |||
| 67 | struct tegra_mc; | ||
| 68 | struct tegra_smmu; | ||
| 69 | |||
| 70 | #ifdef CONFIG_TEGRA_IOMMU_SMMU | ||
| 71 | struct tegra_smmu *tegra_smmu_probe(struct device *dev, | ||
| 72 | const struct tegra_smmu_soc *soc, | ||
| 73 | struct tegra_mc *mc); | ||
| 74 | #else | ||
| 75 | static inline struct tegra_smmu * | ||
| 76 | tegra_smmu_probe(struct device *dev, const struct tegra_smmu_soc *soc, | ||
| 77 | struct tegra_mc *mc) | ||
| 78 | { | ||
| 79 | return NULL; | ||
| 80 | } | ||
| 81 | #endif | ||
| 82 | |||
| 83 | struct tegra_mc_soc { | ||
| 84 | const struct tegra_mc_client *clients; | ||
| 85 | unsigned int num_clients; | ||
| 86 | |||
| 87 | const unsigned int *emem_regs; | ||
| 88 | unsigned int num_emem_regs; | ||
| 89 | |||
| 90 | unsigned int num_address_bits; | ||
| 91 | unsigned int atom_size; | ||
| 92 | |||
| 93 | const struct tegra_smmu_soc *smmu; | ||
| 94 | }; | ||
| 95 | |||
| 96 | struct tegra_mc { | ||
| 97 | struct device *dev; | ||
| 98 | struct tegra_smmu *smmu; | ||
| 99 | void __iomem *regs; | ||
| 100 | struct clk *clk; | ||
| 101 | int irq; | ||
| 102 | |||
| 103 | const struct tegra_mc_soc *soc; | ||
| 104 | unsigned long tick; | ||
| 105 | }; | ||
| 106 | |||
| 107 | #endif /* __SOC_TEGRA_MC_H__ */ | ||
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index e862497f7556..8bb00a27e219 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
| @@ -184,6 +184,8 @@ struct snd_pcm_ops { | |||
| 184 | #define SNDRV_PCM_FMTBIT_DSD_U8 _SNDRV_PCM_FMTBIT(DSD_U8) | 184 | #define SNDRV_PCM_FMTBIT_DSD_U8 _SNDRV_PCM_FMTBIT(DSD_U8) |
| 185 | #define SNDRV_PCM_FMTBIT_DSD_U16_LE _SNDRV_PCM_FMTBIT(DSD_U16_LE) | 185 | #define SNDRV_PCM_FMTBIT_DSD_U16_LE _SNDRV_PCM_FMTBIT(DSD_U16_LE) |
| 186 | #define SNDRV_PCM_FMTBIT_DSD_U32_LE _SNDRV_PCM_FMTBIT(DSD_U32_LE) | 186 | #define SNDRV_PCM_FMTBIT_DSD_U32_LE _SNDRV_PCM_FMTBIT(DSD_U32_LE) |
| 187 | #define SNDRV_PCM_FMTBIT_DSD_U16_BE _SNDRV_PCM_FMTBIT(DSD_U16_BE) | ||
| 188 | #define SNDRV_PCM_FMTBIT_DSD_U32_BE _SNDRV_PCM_FMTBIT(DSD_U32_BE) | ||
| 187 | 189 | ||
| 188 | #ifdef SNDRV_LITTLE_ENDIAN | 190 | #ifdef SNDRV_LITTLE_ENDIAN |
| 189 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE | 191 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE |
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index e335e7d8c6c2..c78e88ce5ea3 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
| @@ -36,7 +36,7 @@ TRACE_EVENT(rcu_utilization, | |||
| 36 | 36 | ||
| 37 | #ifdef CONFIG_RCU_TRACE | 37 | #ifdef CONFIG_RCU_TRACE |
| 38 | 38 | ||
| 39 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) | 39 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) |
| 40 | 40 | ||
| 41 | /* | 41 | /* |
| 42 | * Tracepoint for grace-period events. Takes a string identifying the | 42 | * Tracepoint for grace-period events. Takes a string identifying the |
| @@ -345,7 +345,7 @@ TRACE_EVENT(rcu_fqs, | |||
| 345 | __entry->cpu, __entry->qsevent) | 345 | __entry->cpu, __entry->qsevent) |
| 346 | ); | 346 | ); |
| 347 | 347 | ||
| 348 | #endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) */ | 348 | #endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) */ |
| 349 | 349 | ||
| 350 | /* | 350 | /* |
| 351 | * Tracepoint for dyntick-idle entry/exit events. These take a string | 351 | * Tracepoint for dyntick-idle entry/exit events. These take a string |
diff --git a/include/trace/events/scsi.h b/include/trace/events/scsi.h index db6c93510f74..079bd10a01b4 100644 --- a/include/trace/events/scsi.h +++ b/include/trace/events/scsi.h | |||
| @@ -94,7 +94,7 @@ | |||
| 94 | scsi_opcode_name(WRITE_16), \ | 94 | scsi_opcode_name(WRITE_16), \ |
| 95 | scsi_opcode_name(VERIFY_16), \ | 95 | scsi_opcode_name(VERIFY_16), \ |
| 96 | scsi_opcode_name(WRITE_SAME_16), \ | 96 | scsi_opcode_name(WRITE_SAME_16), \ |
| 97 | scsi_opcode_name(SERVICE_ACTION_IN), \ | 97 | scsi_opcode_name(SERVICE_ACTION_IN_16), \ |
| 98 | scsi_opcode_name(SAI_READ_CAPACITY_16), \ | 98 | scsi_opcode_name(SAI_READ_CAPACITY_16), \ |
| 99 | scsi_opcode_name(SAI_GET_LBA_STATUS), \ | 99 | scsi_opcode_name(SAI_GET_LBA_STATUS), \ |
| 100 | scsi_opcode_name(MI_REPORT_TARGET_PGS), \ | 100 | scsi_opcode_name(MI_REPORT_TARGET_PGS), \ |
diff --git a/include/trace/events/target.h b/include/trace/events/target.h index da9cc0f05c93..45403443dd82 100644 --- a/include/trace/events/target.h +++ b/include/trace/events/target.h | |||
| @@ -96,7 +96,7 @@ | |||
| 96 | scsi_opcode_name(WRITE_16), \ | 96 | scsi_opcode_name(WRITE_16), \ |
| 97 | scsi_opcode_name(VERIFY_16), \ | 97 | scsi_opcode_name(VERIFY_16), \ |
| 98 | scsi_opcode_name(WRITE_SAME_16), \ | 98 | scsi_opcode_name(WRITE_SAME_16), \ |
| 99 | scsi_opcode_name(SERVICE_ACTION_IN), \ | 99 | scsi_opcode_name(SERVICE_ACTION_IN_16), \ |
| 100 | scsi_opcode_name(SAI_READ_CAPACITY_16), \ | 100 | scsi_opcode_name(SAI_READ_CAPACITY_16), \ |
| 101 | scsi_opcode_name(SAI_GET_LBA_STATUS), \ | 101 | scsi_opcode_name(SAI_GET_LBA_STATUS), \ |
| 102 | scsi_opcode_name(MI_REPORT_TARGET_PGS), \ | 102 | scsi_opcode_name(MI_REPORT_TARGET_PGS), \ |
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 4c94f31a8c99..8523f9bb72f2 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -427,7 +427,7 @@ header-y += virtio_net.h | |||
| 427 | header-y += virtio_pci.h | 427 | header-y += virtio_pci.h |
| 428 | header-y += virtio_ring.h | 428 | header-y += virtio_ring.h |
| 429 | header-y += virtio_rng.h | 429 | header-y += virtio_rng.h |
| 430 | header=y += vm_sockets.h | 430 | header-y += vm_sockets.h |
| 431 | header-y += vt.h | 431 | header-y += vt.h |
| 432 | header-y += wait.h | 432 | header-y += wait.h |
| 433 | header-y += wanrouter.h | 433 | header-y += wanrouter.h |
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h index 3315ab21f728..a570d7b5796c 100644 --- a/include/uapi/linux/dm-ioctl.h +++ b/include/uapi/linux/dm-ioctl.h | |||
| @@ -267,9 +267,9 @@ enum { | |||
| 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 268 | 268 | ||
| 269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
| 270 | #define DM_VERSION_MINOR 28 | 270 | #define DM_VERSION_MINOR 29 |
| 271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
| 272 | #define DM_VERSION_EXTRA "-ioctl (2014-09-17)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2014-10-28)" |
| 273 | 273 | ||
| 274 | /* Status bits */ | 274 | /* Status bits */ |
| 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -352,4 +352,9 @@ enum { | |||
| 352 | */ | 352 | */ |
| 353 | #define DM_DEFERRED_REMOVE (1 << 17) /* In/Out */ | 353 | #define DM_DEFERRED_REMOVE (1 << 17) /* In/Out */ |
| 354 | 354 | ||
| 355 | /* | ||
| 356 | * If set, the device is suspended internally. | ||
| 357 | */ | ||
| 358 | #define DM_INTERNAL_SUSPEND_FLAG (1 << 18) /* Out */ | ||
| 359 | |||
| 355 | #endif /* _LINUX_DM_IOCTL_H */ | 360 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index aa90bc98b6e2..ae99f7743cf4 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ | 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ |
| 35 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ | 35 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ |
| 36 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ | 36 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ |
| 37 | #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ | ||
| 37 | #define EM_TI_C6000 140 /* TI C6X DSPs */ | 38 | #define EM_TI_C6000 140 /* TI C6X DSPs */ |
| 38 | #define EM_AARCH64 183 /* ARM 64 bit */ | 39 | #define EM_AARCH64 183 /* ARM 64 bit */ |
| 39 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ | 40 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ |
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index ea9bf2561b9e..71e1d0ed92f7 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h | |||
| @@ -397,6 +397,7 @@ typedef struct elf64_shdr { | |||
| 397 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ | 397 | #define NT_ARM_TLS 0x401 /* ARM TLS register */ |
| 398 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ | 398 | #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ |
| 399 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ | 399 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ |
| 400 | #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ | ||
| 400 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ | 401 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ |
| 401 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ | 402 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ |
| 402 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ | 403 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 9d845404d875..9b79abbd1ab8 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -137,8 +137,9 @@ enum perf_event_sample_format { | |||
| 137 | PERF_SAMPLE_DATA_SRC = 1U << 15, | 137 | PERF_SAMPLE_DATA_SRC = 1U << 15, |
| 138 | PERF_SAMPLE_IDENTIFIER = 1U << 16, | 138 | PERF_SAMPLE_IDENTIFIER = 1U << 16, |
| 139 | PERF_SAMPLE_TRANSACTION = 1U << 17, | 139 | PERF_SAMPLE_TRANSACTION = 1U << 17, |
| 140 | PERF_SAMPLE_REGS_INTR = 1U << 18, | ||
| 140 | 141 | ||
| 141 | PERF_SAMPLE_MAX = 1U << 18, /* non-ABI */ | 142 | PERF_SAMPLE_MAX = 1U << 19, /* non-ABI */ |
| 142 | }; | 143 | }; |
| 143 | 144 | ||
| 144 | /* | 145 | /* |
| @@ -238,6 +239,7 @@ enum perf_event_read_format { | |||
| 238 | #define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ | 239 | #define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ |
| 239 | #define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ | 240 | #define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */ |
| 240 | /* add: sample_stack_user */ | 241 | /* add: sample_stack_user */ |
| 242 | #define PERF_ATTR_SIZE_VER4 104 /* add: sample_regs_intr */ | ||
| 241 | 243 | ||
| 242 | /* | 244 | /* |
| 243 | * Hardware event_id to monitor via a performance monitoring event: | 245 | * Hardware event_id to monitor via a performance monitoring event: |
| @@ -334,6 +336,15 @@ struct perf_event_attr { | |||
| 334 | 336 | ||
| 335 | /* Align to u64. */ | 337 | /* Align to u64. */ |
| 336 | __u32 __reserved_2; | 338 | __u32 __reserved_2; |
| 339 | /* | ||
| 340 | * Defines set of regs to dump for each sample | ||
| 341 | * state captured on: | ||
| 342 | * - precise = 0: PMU interrupt | ||
| 343 | * - precise > 0: sampled instruction | ||
| 344 | * | ||
| 345 | * See asm/perf_regs.h for details. | ||
| 346 | */ | ||
| 347 | __u64 sample_regs_intr; | ||
| 337 | }; | 348 | }; |
| 338 | 349 | ||
| 339 | #define perf_flags(attr) (*(&(attr)->read_format + 1)) | 350 | #define perf_flags(attr) (*(&(attr)->read_format + 1)) |
| @@ -686,6 +697,8 @@ enum perf_event_type { | |||
| 686 | * { u64 weight; } && PERF_SAMPLE_WEIGHT | 697 | * { u64 weight; } && PERF_SAMPLE_WEIGHT |
| 687 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | 698 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC |
| 688 | * { u64 transaction; } && PERF_SAMPLE_TRANSACTION | 699 | * { u64 transaction; } && PERF_SAMPLE_TRANSACTION |
| 700 | * { u64 abi; # enum perf_sample_regs_abi | ||
| 701 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR | ||
| 689 | * }; | 702 | * }; |
| 690 | */ | 703 | */ |
| 691 | PERF_RECORD_SAMPLE = 9, | 704 | PERF_RECORD_SAMPLE = 9, |
diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 6ee586728df9..941d32f007dc 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h | |||
| @@ -220,7 +220,9 @@ typedef int __bitwise snd_pcm_format_t; | |||
| 220 | #define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */ | 220 | #define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */ |
| 221 | #define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */ | 221 | #define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */ |
| 222 | #define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */ | 222 | #define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */ |
| 223 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_LE | 223 | #define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ |
| 224 | #define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ | ||
| 225 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE | ||
| 224 | 226 | ||
| 225 | #ifdef SNDRV_LITTLE_ENDIAN | 227 | #ifdef SNDRV_LITTLE_ENDIAN |
| 226 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE | 228 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE |
