diff options
Diffstat (limited to 'include')
60 files changed, 983 insertions, 954 deletions
diff --git a/include/asm-arm/plat-s3c24xx/regs-iis.h b/include/asm-arm/plat-s3c24xx/regs-iis.h deleted file mode 100644 index a6f1d5df13b4..000000000000 --- a/include/asm-arm/plat-s3c24xx/regs-iis.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/regs-iis.h | ||
2 | * | ||
3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
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 | * S3C2410 IIS register definition | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_IIS_H | ||
14 | #define __ASM_ARCH_REGS_IIS_H | ||
15 | |||
16 | #define S3C2410_IISCON (0x00) | ||
17 | |||
18 | #define S3C2410_IISCON_LRINDEX (1<<8) | ||
19 | #define S3C2410_IISCON_TXFIFORDY (1<<7) | ||
20 | #define S3C2410_IISCON_RXFIFORDY (1<<6) | ||
21 | #define S3C2410_IISCON_TXDMAEN (1<<5) | ||
22 | #define S3C2410_IISCON_RXDMAEN (1<<4) | ||
23 | #define S3C2410_IISCON_TXIDLE (1<<3) | ||
24 | #define S3C2410_IISCON_RXIDLE (1<<2) | ||
25 | #define S3C2410_IISCON_PSCEN (1<<1) | ||
26 | #define S3C2410_IISCON_IISEN (1<<0) | ||
27 | |||
28 | #define S3C2410_IISMOD (0x04) | ||
29 | |||
30 | #define S3C2440_IISMOD_MPLL (1<<9) | ||
31 | #define S3C2410_IISMOD_SLAVE (1<<8) | ||
32 | #define S3C2410_IISMOD_NOXFER (0<<6) | ||
33 | #define S3C2410_IISMOD_RXMODE (1<<6) | ||
34 | #define S3C2410_IISMOD_TXMODE (2<<6) | ||
35 | #define S3C2410_IISMOD_TXRXMODE (3<<6) | ||
36 | #define S3C2410_IISMOD_LR_LLOW (0<<5) | ||
37 | #define S3C2410_IISMOD_LR_RLOW (1<<5) | ||
38 | #define S3C2410_IISMOD_IIS (0<<4) | ||
39 | #define S3C2410_IISMOD_MSB (1<<4) | ||
40 | #define S3C2410_IISMOD_8BIT (0<<3) | ||
41 | #define S3C2410_IISMOD_16BIT (1<<3) | ||
42 | #define S3C2410_IISMOD_BITMASK (1<<3) | ||
43 | #define S3C2410_IISMOD_256FS (0<<2) | ||
44 | #define S3C2410_IISMOD_384FS (1<<2) | ||
45 | #define S3C2410_IISMOD_16FS (0<<0) | ||
46 | #define S3C2410_IISMOD_32FS (1<<0) | ||
47 | #define S3C2410_IISMOD_48FS (2<<0) | ||
48 | #define S3C2410_IISMOD_FS_MASK (3<<0) | ||
49 | |||
50 | #define S3C2410_IISPSR (0x08) | ||
51 | #define S3C2410_IISPSR_INTMASK (31<<5) | ||
52 | #define S3C2410_IISPSR_INTSHIFT (5) | ||
53 | #define S3C2410_IISPSR_EXTMASK (31<<0) | ||
54 | #define S3C2410_IISPSR_EXTSHFIT (0) | ||
55 | |||
56 | #define S3C2410_IISFCON (0x0c) | ||
57 | |||
58 | #define S3C2410_IISFCON_TXDMA (1<<15) | ||
59 | #define S3C2410_IISFCON_RXDMA (1<<14) | ||
60 | #define S3C2410_IISFCON_TXENABLE (1<<13) | ||
61 | #define S3C2410_IISFCON_RXENABLE (1<<12) | ||
62 | #define S3C2410_IISFCON_TXMASK (0x3f << 6) | ||
63 | #define S3C2410_IISFCON_TXSHIFT (6) | ||
64 | #define S3C2410_IISFCON_RXMASK (0x3f) | ||
65 | #define S3C2410_IISFCON_RXSHIFT (0) | ||
66 | |||
67 | #define S3C2400_IISFCON_TXDMA (1<<11) | ||
68 | #define S3C2400_IISFCON_RXDMA (1<<10) | ||
69 | #define S3C2400_IISFCON_TXENABLE (1<<9) | ||
70 | #define S3C2400_IISFCON_RXENABLE (1<<8) | ||
71 | #define S3C2400_IISFCON_TXMASK (0x07 << 4) | ||
72 | #define S3C2400_IISFCON_TXSHIFT (4) | ||
73 | #define S3C2400_IISFCON_RXMASK (0x07) | ||
74 | #define S3C2400_IISFCON_RXSHIFT (0) | ||
75 | |||
76 | #define S3C2410_IISFIFO (0x10) | ||
77 | #endif /* __ASM_ARCH_REGS_IIS_H */ | ||
diff --git a/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h b/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h deleted file mode 100644 index 25d4058bcfed..000000000000 --- a/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h | ||
2 | * | ||
3 | * Copyright 2007 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://armlinux.simtec.co.uk/ | ||
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 | * S3C2412 IIS register definition | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_S3C2412_IIS_H | ||
14 | #define __ASM_ARCH_REGS_S3C2412_IIS_H | ||
15 | |||
16 | #define S3C2412_IISCON (0x00) | ||
17 | #define S3C2412_IISMOD (0x04) | ||
18 | #define S3C2412_IISFIC (0x08) | ||
19 | #define S3C2412_IISPSR (0x0C) | ||
20 | #define S3C2412_IISTXD (0x10) | ||
21 | #define S3C2412_IISRXD (0x14) | ||
22 | |||
23 | #define S3C2412_IISCON_LRINDEX (1 << 11) | ||
24 | #define S3C2412_IISCON_TXFIFO_EMPTY (1 << 10) | ||
25 | #define S3C2412_IISCON_RXFIFO_EMPTY (1 << 9) | ||
26 | #define S3C2412_IISCON_TXFIFO_FULL (1 << 8) | ||
27 | #define S3C2412_IISCON_RXFIFO_FULL (1 << 7) | ||
28 | #define S3C2412_IISCON_TXDMA_PAUSE (1 << 6) | ||
29 | #define S3C2412_IISCON_RXDMA_PAUSE (1 << 5) | ||
30 | #define S3C2412_IISCON_TXCH_PAUSE (1 << 4) | ||
31 | #define S3C2412_IISCON_RXCH_PAUSE (1 << 3) | ||
32 | #define S3C2412_IISCON_TXDMA_ACTIVE (1 << 2) | ||
33 | #define S3C2412_IISCON_RXDMA_ACTIVE (1 << 1) | ||
34 | #define S3C2412_IISCON_IIS_ACTIVE (1 << 0) | ||
35 | |||
36 | #define S3C2412_IISMOD_MASTER_INTERNAL (0 << 10) | ||
37 | #define S3C2412_IISMOD_MASTER_EXTERNAL (1 << 10) | ||
38 | #define S3C2412_IISMOD_SLAVE (2 << 10) | ||
39 | #define S3C2412_IISMOD_MASTER_MASK (3 << 10) | ||
40 | #define S3C2412_IISMOD_MODE_TXONLY (0 << 8) | ||
41 | #define S3C2412_IISMOD_MODE_RXONLY (1 << 8) | ||
42 | #define S3C2412_IISMOD_MODE_TXRX (2 << 8) | ||
43 | #define S3C2412_IISMOD_MODE_MASK (3 << 8) | ||
44 | #define S3C2412_IISMOD_LR_LLOW (0 << 7) | ||
45 | #define S3C2412_IISMOD_LR_RLOW (1 << 7) | ||
46 | #define S3C2412_IISMOD_SDF_IIS (0 << 5) | ||
47 | #define S3C2412_IISMOD_SDF_MSB (0 << 5) | ||
48 | #define S3C2412_IISMOD_SDF_LSB (0 << 5) | ||
49 | #define S3C2412_IISMOD_SDF_MASK (3 << 5) | ||
50 | #define S3C2412_IISMOD_RCLK_256FS (0 << 3) | ||
51 | #define S3C2412_IISMOD_RCLK_512FS (1 << 3) | ||
52 | #define S3C2412_IISMOD_RCLK_384FS (2 << 3) | ||
53 | #define S3C2412_IISMOD_RCLK_768FS (3 << 3) | ||
54 | #define S3C2412_IISMOD_RCLK_MASK (3 << 3) | ||
55 | #define S3C2412_IISMOD_BCLK_32FS (0 << 1) | ||
56 | #define S3C2412_IISMOD_BCLK_48FS (1 << 1) | ||
57 | #define S3C2412_IISMOD_BCLK_16FS (2 << 1) | ||
58 | #define S3C2412_IISMOD_BCLK_24FS (3 << 1) | ||
59 | #define S3C2412_IISMOD_BCLK_MASK (3 << 1) | ||
60 | #define S3C2412_IISMOD_8BIT (1 << 0) | ||
61 | |||
62 | #define S3C2412_IISPSR_PSREN (1 << 15) | ||
63 | |||
64 | #define S3C2412_IISFIC_TXFLUSH (1 << 15) | ||
65 | #define S3C2412_IISFIC_RXFLUSH (1 << 7) | ||
66 | #define S3C2412_IISFIC_TXCOUNT(x) (((x) >> 8) & 0xf) | ||
67 | #define S3C2412_IISFIC_RXCOUNT(x) (((x) >> 0) & 0xf) | ||
68 | |||
69 | |||
70 | |||
71 | #endif /* __ASM_ARCH_REGS_S3C2412_IIS_H */ | ||
72 | |||
diff --git a/include/asm-frv/ide.h b/include/asm-frv/ide.h deleted file mode 100644 index 361076611855..000000000000 --- a/include/asm-frv/ide.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* ide.h: FRV IDE declarations | ||
2 | * | ||
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_IDE_H | ||
13 | #define _ASM_IDE_H | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <asm/setup.h> | ||
18 | #include <asm/io.h> | ||
19 | #include <asm/irq.h> | ||
20 | |||
21 | #include <asm-generic/ide_iops.h> | ||
22 | |||
23 | #endif /* __KERNEL__ */ | ||
24 | #endif /* _ASM_IDE_H */ | ||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index c61fab1dd2f8..aca40b93bd28 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -80,6 +80,11 @@ | |||
80 | VMLINUX_SYMBOL(__start___tracepoints) = .; \ | 80 | VMLINUX_SYMBOL(__start___tracepoints) = .; \ |
81 | *(__tracepoints) \ | 81 | *(__tracepoints) \ |
82 | VMLINUX_SYMBOL(__stop___tracepoints) = .; \ | 82 | VMLINUX_SYMBOL(__stop___tracepoints) = .; \ |
83 | /* implement dynamic printk debug */ \ | ||
84 | . = ALIGN(8); \ | ||
85 | VMLINUX_SYMBOL(__start___verbose) = .; \ | ||
86 | *(__verbose) \ | ||
87 | VMLINUX_SYMBOL(__stop___verbose) = .; \ | ||
83 | LIKELY_PROFILE() \ | 88 | LIKELY_PROFILE() \ |
84 | BRANCH_PROFILE() | 89 | BRANCH_PROFILE() |
85 | 90 | ||
@@ -309,15 +314,7 @@ | |||
309 | CPU_DISCARD(init.data) \ | 314 | CPU_DISCARD(init.data) \ |
310 | CPU_DISCARD(init.rodata) \ | 315 | CPU_DISCARD(init.rodata) \ |
311 | MEM_DISCARD(init.data) \ | 316 | MEM_DISCARD(init.data) \ |
312 | MEM_DISCARD(init.rodata) \ | 317 | MEM_DISCARD(init.rodata) |
313 | /* implement dynamic printk debug */ \ | ||
314 | VMLINUX_SYMBOL(__start___verbose_strings) = .; \ | ||
315 | *(__verbose_strings) \ | ||
316 | VMLINUX_SYMBOL(__stop___verbose_strings) = .; \ | ||
317 | . = ALIGN(8); \ | ||
318 | VMLINUX_SYMBOL(__start___verbose) = .; \ | ||
319 | *(__verbose) \ | ||
320 | VMLINUX_SYMBOL(__stop___verbose) = .; | ||
321 | 318 | ||
322 | #define INIT_TEXT \ | 319 | #define INIT_TEXT \ |
323 | *(.init.text) \ | 320 | *(.init.text) \ |
diff --git a/include/asm-mn10300/ide.h b/include/asm-mn10300/ide.h deleted file mode 100644 index 6adcdd92e83d..000000000000 --- a/include/asm-mn10300/ide.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* MN10300 Arch-specific IDE code | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * - Derived from include/asm-i386/ide.h | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public Licence | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the Licence, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef _ASM_IDE_H | ||
14 | #define _ASM_IDE_H | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | #include <asm/intctl-regs.h> | ||
19 | |||
20 | #undef SUPPORT_SLOW_DATA_PORTS | ||
21 | #define SUPPORT_SLOW_DATA_PORTS 0 | ||
22 | |||
23 | #undef SUPPORT_VLB_SYNC | ||
24 | #define SUPPORT_VLB_SYNC 0 | ||
25 | |||
26 | /* | ||
27 | * some bits needed for parts of the IDE subsystem to compile | ||
28 | */ | ||
29 | #define __ide_mm_insw(port, addr, n) \ | ||
30 | insw((unsigned long) (port), (addr), (n)) | ||
31 | #define __ide_mm_insl(port, addr, n) \ | ||
32 | insl((unsigned long) (port), (addr), (n)) | ||
33 | #define __ide_mm_outsw(port, addr, n) \ | ||
34 | outsw((unsigned long) (port), (addr), (n)) | ||
35 | #define __ide_mm_outsl(port, addr, n) \ | ||
36 | outsl((unsigned long) (port), (addr), (n)) | ||
37 | |||
38 | #endif /* __KERNEL__ */ | ||
39 | #endif /* _ASM_IDE_H */ | ||
diff --git a/include/asm-mn10300/pci.h b/include/asm-mn10300/pci.h index cd9cc5c89cea..0517b45313d8 100644 --- a/include/asm-mn10300/pci.h +++ b/include/asm-mn10300/pci.h | |||
@@ -121,4 +121,9 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res) | |||
121 | 121 | ||
122 | #define pcibios_scan_all_fns(a, b) 0 | 122 | #define pcibios_scan_all_fns(a, b) 0 |
123 | 123 | ||
124 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | ||
125 | { | ||
126 | return channel ? 15 : 14; | ||
127 | } | ||
128 | |||
124 | #endif /* _ASM_PCI_H */ | 129 | #endif /* _ASM_PCI_H */ |
diff --git a/include/crypto/aes.h b/include/crypto/aes.h index 656a4c66a568..7524ba3b6f3c 100644 --- a/include/crypto/aes.h +++ b/include/crypto/aes.h | |||
@@ -17,10 +17,14 @@ | |||
17 | #define AES_MAX_KEYLENGTH (15 * 16) | 17 | #define AES_MAX_KEYLENGTH (15 * 16) |
18 | #define AES_MAX_KEYLENGTH_U32 (AES_MAX_KEYLENGTH / sizeof(u32)) | 18 | #define AES_MAX_KEYLENGTH_U32 (AES_MAX_KEYLENGTH / sizeof(u32)) |
19 | 19 | ||
20 | /* | ||
21 | * Please ensure that the first two fields are 16-byte aligned | ||
22 | * relative to the start of the structure, i.e., don't move them! | ||
23 | */ | ||
20 | struct crypto_aes_ctx { | 24 | struct crypto_aes_ctx { |
21 | u32 key_length; | ||
22 | u32 key_enc[AES_MAX_KEYLENGTH_U32]; | 25 | u32 key_enc[AES_MAX_KEYLENGTH_U32]; |
23 | u32 key_dec[AES_MAX_KEYLENGTH_U32]; | 26 | u32 key_dec[AES_MAX_KEYLENGTH_U32]; |
27 | u32 key_length; | ||
24 | }; | 28 | }; |
25 | 29 | ||
26 | extern const u32 crypto_ft_tab[4][256]; | 30 | extern const u32 crypto_ft_tab[4][256]; |
diff --git a/include/crypto/compress.h b/include/crypto/compress.h new file mode 100644 index 000000000000..86163ef24219 --- /dev/null +++ b/include/crypto/compress.h | |||
@@ -0,0 +1,145 @@ | |||
1 | /* | ||
2 | * Compress: Compression algorithms under the cryptographic API. | ||
3 | * | ||
4 | * Copyright 2008 Sony 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 as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program. | ||
17 | * If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef _CRYPTO_COMPRESS_H | ||
21 | #define _CRYPTO_COMPRESS_H | ||
22 | |||
23 | #include <linux/crypto.h> | ||
24 | |||
25 | |||
26 | struct comp_request { | ||
27 | const void *next_in; /* next input byte */ | ||
28 | void *next_out; /* next output byte */ | ||
29 | unsigned int avail_in; /* bytes available at next_in */ | ||
30 | unsigned int avail_out; /* bytes available at next_out */ | ||
31 | }; | ||
32 | |||
33 | enum zlib_comp_params { | ||
34 | ZLIB_COMP_LEVEL = 1, /* e.g. Z_DEFAULT_COMPRESSION */ | ||
35 | ZLIB_COMP_METHOD, /* e.g. Z_DEFLATED */ | ||
36 | ZLIB_COMP_WINDOWBITS, /* e.g. MAX_WBITS */ | ||
37 | ZLIB_COMP_MEMLEVEL, /* e.g. DEF_MEM_LEVEL */ | ||
38 | ZLIB_COMP_STRATEGY, /* e.g. Z_DEFAULT_STRATEGY */ | ||
39 | __ZLIB_COMP_MAX, | ||
40 | }; | ||
41 | |||
42 | #define ZLIB_COMP_MAX (__ZLIB_COMP_MAX - 1) | ||
43 | |||
44 | |||
45 | enum zlib_decomp_params { | ||
46 | ZLIB_DECOMP_WINDOWBITS = 1, /* e.g. DEF_WBITS */ | ||
47 | __ZLIB_DECOMP_MAX, | ||
48 | }; | ||
49 | |||
50 | #define ZLIB_DECOMP_MAX (__ZLIB_DECOMP_MAX - 1) | ||
51 | |||
52 | |||
53 | struct crypto_pcomp { | ||
54 | struct crypto_tfm base; | ||
55 | }; | ||
56 | |||
57 | struct pcomp_alg { | ||
58 | int (*compress_setup)(struct crypto_pcomp *tfm, void *params, | ||
59 | unsigned int len); | ||
60 | int (*compress_init)(struct crypto_pcomp *tfm); | ||
61 | int (*compress_update)(struct crypto_pcomp *tfm, | ||
62 | struct comp_request *req); | ||
63 | int (*compress_final)(struct crypto_pcomp *tfm, | ||
64 | struct comp_request *req); | ||
65 | int (*decompress_setup)(struct crypto_pcomp *tfm, void *params, | ||
66 | unsigned int len); | ||
67 | int (*decompress_init)(struct crypto_pcomp *tfm); | ||
68 | int (*decompress_update)(struct crypto_pcomp *tfm, | ||
69 | struct comp_request *req); | ||
70 | int (*decompress_final)(struct crypto_pcomp *tfm, | ||
71 | struct comp_request *req); | ||
72 | |||
73 | struct crypto_alg base; | ||
74 | }; | ||
75 | |||
76 | extern struct crypto_pcomp *crypto_alloc_pcomp(const char *alg_name, u32 type, | ||
77 | u32 mask); | ||
78 | |||
79 | static inline struct crypto_tfm *crypto_pcomp_tfm(struct crypto_pcomp *tfm) | ||
80 | { | ||
81 | return &tfm->base; | ||
82 | } | ||
83 | |||
84 | static inline void crypto_free_pcomp(struct crypto_pcomp *tfm) | ||
85 | { | ||
86 | crypto_destroy_tfm(tfm, crypto_pcomp_tfm(tfm)); | ||
87 | } | ||
88 | |||
89 | static inline struct pcomp_alg *__crypto_pcomp_alg(struct crypto_alg *alg) | ||
90 | { | ||
91 | return container_of(alg, struct pcomp_alg, base); | ||
92 | } | ||
93 | |||
94 | static inline struct pcomp_alg *crypto_pcomp_alg(struct crypto_pcomp *tfm) | ||
95 | { | ||
96 | return __crypto_pcomp_alg(crypto_pcomp_tfm(tfm)->__crt_alg); | ||
97 | } | ||
98 | |||
99 | static inline int crypto_compress_setup(struct crypto_pcomp *tfm, | ||
100 | void *params, unsigned int len) | ||
101 | { | ||
102 | return crypto_pcomp_alg(tfm)->compress_setup(tfm, params, len); | ||
103 | } | ||
104 | |||
105 | static inline int crypto_compress_init(struct crypto_pcomp *tfm) | ||
106 | { | ||
107 | return crypto_pcomp_alg(tfm)->compress_init(tfm); | ||
108 | } | ||
109 | |||
110 | static inline int crypto_compress_update(struct crypto_pcomp *tfm, | ||
111 | struct comp_request *req) | ||
112 | { | ||
113 | return crypto_pcomp_alg(tfm)->compress_update(tfm, req); | ||
114 | } | ||
115 | |||
116 | static inline int crypto_compress_final(struct crypto_pcomp *tfm, | ||
117 | struct comp_request *req) | ||
118 | { | ||
119 | return crypto_pcomp_alg(tfm)->compress_final(tfm, req); | ||
120 | } | ||
121 | |||
122 | static inline int crypto_decompress_setup(struct crypto_pcomp *tfm, | ||
123 | void *params, unsigned int len) | ||
124 | { | ||
125 | return crypto_pcomp_alg(tfm)->decompress_setup(tfm, params, len); | ||
126 | } | ||
127 | |||
128 | static inline int crypto_decompress_init(struct crypto_pcomp *tfm) | ||
129 | { | ||
130 | return crypto_pcomp_alg(tfm)->decompress_init(tfm); | ||
131 | } | ||
132 | |||
133 | static inline int crypto_decompress_update(struct crypto_pcomp *tfm, | ||
134 | struct comp_request *req) | ||
135 | { | ||
136 | return crypto_pcomp_alg(tfm)->decompress_update(tfm, req); | ||
137 | } | ||
138 | |||
139 | static inline int crypto_decompress_final(struct crypto_pcomp *tfm, | ||
140 | struct comp_request *req) | ||
141 | { | ||
142 | return crypto_pcomp_alg(tfm)->decompress_final(tfm, req); | ||
143 | } | ||
144 | |||
145 | #endif /* _CRYPTO_COMPRESS_H */ | ||
diff --git a/include/crypto/cryptd.h b/include/crypto/cryptd.h new file mode 100644 index 000000000000..55fa7bbdbc71 --- /dev/null +++ b/include/crypto/cryptd.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Software async crypto daemon | ||
3 | */ | ||
4 | |||
5 | #ifndef _CRYPTO_CRYPT_H | ||
6 | #define _CRYPTO_CRYPT_H | ||
7 | |||
8 | #include <linux/crypto.h> | ||
9 | #include <linux/kernel.h> | ||
10 | |||
11 | struct cryptd_ablkcipher { | ||
12 | struct crypto_ablkcipher base; | ||
13 | }; | ||
14 | |||
15 | static inline struct cryptd_ablkcipher *__cryptd_ablkcipher_cast( | ||
16 | struct crypto_ablkcipher *tfm) | ||
17 | { | ||
18 | return (struct cryptd_ablkcipher *)tfm; | ||
19 | } | ||
20 | |||
21 | /* alg_name should be algorithm to be cryptd-ed */ | ||
22 | struct cryptd_ablkcipher *cryptd_alloc_ablkcipher(const char *alg_name, | ||
23 | u32 type, u32 mask); | ||
24 | struct crypto_blkcipher *cryptd_ablkcipher_child(struct cryptd_ablkcipher *tfm); | ||
25 | void cryptd_free_ablkcipher(struct cryptd_ablkcipher *tfm); | ||
26 | |||
27 | #endif | ||
diff --git a/include/crypto/crypto_wq.h b/include/crypto/crypto_wq.h new file mode 100644 index 000000000000..a7d252daf91b --- /dev/null +++ b/include/crypto/crypto_wq.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef CRYPTO_WQ_H | ||
2 | #define CRYPTO_WQ_H | ||
3 | |||
4 | #include <linux/workqueue.h> | ||
5 | |||
6 | extern struct workqueue_struct *kcrypto_wq; | ||
7 | #endif | ||
diff --git a/include/crypto/hash.h b/include/crypto/hash.h index d797e119e3d5..d56bb71617c3 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h | |||
@@ -231,6 +231,11 @@ static inline unsigned int crypto_shash_alignmask( | |||
231 | return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm)); | 231 | return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm)); |
232 | } | 232 | } |
233 | 233 | ||
234 | static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm) | ||
235 | { | ||
236 | return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm)); | ||
237 | } | ||
238 | |||
234 | static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg) | 239 | static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg) |
235 | { | 240 | { |
236 | return container_of(alg, struct shash_alg, base); | 241 | return container_of(alg, struct shash_alg, base); |
diff --git a/include/crypto/internal/compress.h b/include/crypto/internal/compress.h new file mode 100644 index 000000000000..178a888d1d93 --- /dev/null +++ b/include/crypto/internal/compress.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Compress: Compression algorithms under the cryptographic API. | ||
3 | * | ||
4 | * Copyright 2008 Sony 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 as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program. | ||
17 | * If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef _CRYPTO_INTERNAL_COMPRESS_H | ||
21 | #define _CRYPTO_INTERNAL_COMPRESS_H | ||
22 | |||
23 | #include <crypto/compress.h> | ||
24 | |||
25 | extern int crypto_register_pcomp(struct pcomp_alg *alg); | ||
26 | extern int crypto_unregister_pcomp(struct pcomp_alg *alg); | ||
27 | |||
28 | #endif /* _CRYPTO_INTERNAL_COMPRESS_H */ | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 9a061accd8b8..68132c4a0e91 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -244,8 +244,6 @@ enum { | |||
244 | ATA_CMD_MEDIA_UNLOCK = 0xDF, | 244 | ATA_CMD_MEDIA_UNLOCK = 0xDF, |
245 | /* marked obsolete in the ATA/ATAPI-7 spec */ | 245 | /* marked obsolete in the ATA/ATAPI-7 spec */ |
246 | ATA_CMD_RESTORE = 0x10, | 246 | ATA_CMD_RESTORE = 0x10, |
247 | /* EXABYTE specific */ | ||
248 | ATA_EXABYTE_ENABLE_NEST = 0xF0, | ||
249 | 247 | ||
250 | /* READ_LOG_EXT pages */ | 248 | /* READ_LOG_EXT pages */ |
251 | ATA_LOG_SATA_NCQ = 0x10, | 249 | ATA_LOG_SATA_NCQ = 0x10, |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 67e5dbfc2961..4fa2810b675e 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -36,7 +36,8 @@ | |||
36 | * 1500 - 1599 kernel LSPP events | 36 | * 1500 - 1599 kernel LSPP events |
37 | * 1600 - 1699 kernel crypto events | 37 | * 1600 - 1699 kernel crypto events |
38 | * 1700 - 1799 kernel anomaly records | 38 | * 1700 - 1799 kernel anomaly records |
39 | * 1800 - 1999 future kernel use (maybe integrity labels and related events) | 39 | * 1800 - 1899 kernel integrity events |
40 | * 1900 - 1999 future kernel use | ||
40 | * 2000 is for otherwise unclassified kernel audit messages (legacy) | 41 | * 2000 is for otherwise unclassified kernel audit messages (legacy) |
41 | * 2001 - 2099 unused (kernel) | 42 | * 2001 - 2099 unused (kernel) |
42 | * 2100 - 2199 user space anomaly records | 43 | * 2100 - 2199 user space anomaly records |
@@ -125,6 +126,12 @@ | |||
125 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 | 126 | #define AUDIT_LAST_KERN_ANOM_MSG 1799 |
126 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ | 127 | #define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */ |
127 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ | 128 | #define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */ |
129 | #define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */ | ||
130 | #define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */ | ||
131 | #define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */ | ||
132 | #define AUDIT_INTEGRITY_HASH 1803 /* Integrity HASH type */ | ||
133 | #define AUDIT_INTEGRITY_PCR 1804 /* PCR invalidation msgs */ | ||
134 | #define AUDIT_INTEGRITY_RULE 1805 /* policy rule */ | ||
128 | 135 | ||
129 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ | 136 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ |
130 | 137 | ||
diff --git a/include/linux/console.h b/include/linux/console.h index a67a90cf8268..dcca5339ceb3 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -137,8 +137,8 @@ extern void resume_console(void); | |||
137 | int mda_console_init(void); | 137 | int mda_console_init(void); |
138 | void prom_con_init(void); | 138 | void prom_con_init(void); |
139 | 139 | ||
140 | void vcs_make_sysfs(struct tty_struct *tty); | 140 | void vcs_make_sysfs(int index); |
141 | void vcs_remove_sysfs(struct tty_struct *tty); | 141 | void vcs_remove_sysfs(int index); |
142 | 142 | ||
143 | /* Some debug stub to catch some of the obvious races in the VT code */ | 143 | /* Some debug stub to catch some of the obvious races in the VT code */ |
144 | #if 1 | 144 | #if 1 |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 1f2e9020acc6..ec29fa268b94 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #define CRYPTO_ALG_TYPE_SHASH 0x00000009 | 40 | #define CRYPTO_ALG_TYPE_SHASH 0x00000009 |
41 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a | 41 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a |
42 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c | 42 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c |
43 | #define CRYPTO_ALG_TYPE_PCOMPRESS 0x0000000f | ||
43 | 44 | ||
44 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e | 45 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e |
45 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c | 46 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c |
@@ -548,9 +549,6 @@ struct crypto_attr_u32 { | |||
548 | * Transform user interface. | 549 | * Transform user interface. |
549 | */ | 550 | */ |
550 | 551 | ||
551 | struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, | ||
552 | const struct crypto_type *frontend, | ||
553 | u32 type, u32 mask); | ||
554 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); | 552 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); |
555 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); | 553 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); |
556 | 554 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 47f343c7bdda..2918c0e8fdfd 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define BUS_ID_SIZE 20 | 28 | #define BUS_ID_SIZE 20 |
29 | 29 | ||
30 | struct device; | 30 | struct device; |
31 | struct device_private; | ||
31 | struct device_driver; | 32 | struct device_driver; |
32 | struct driver_private; | 33 | struct driver_private; |
33 | struct class; | 34 | struct class; |
@@ -147,7 +148,7 @@ extern void put_driver(struct device_driver *drv); | |||
147 | extern struct device_driver *driver_find(const char *name, | 148 | extern struct device_driver *driver_find(const char *name, |
148 | struct bus_type *bus); | 149 | struct bus_type *bus); |
149 | extern int driver_probe_done(void); | 150 | extern int driver_probe_done(void); |
150 | extern int wait_for_device_probe(void); | 151 | extern void wait_for_device_probe(void); |
151 | 152 | ||
152 | 153 | ||
153 | /* sysfs interface for exporting driver attributes */ | 154 | /* sysfs interface for exporting driver attributes */ |
@@ -367,15 +368,11 @@ struct device_dma_parameters { | |||
367 | }; | 368 | }; |
368 | 369 | ||
369 | struct device { | 370 | struct device { |
370 | struct klist klist_children; | ||
371 | struct klist_node knode_parent; /* node in sibling list */ | ||
372 | struct klist_node knode_driver; | ||
373 | struct klist_node knode_bus; | ||
374 | struct device *parent; | 371 | struct device *parent; |
375 | 372 | ||
373 | struct device_private *p; | ||
374 | |||
376 | struct kobject kobj; | 375 | struct kobject kobj; |
377 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | ||
378 | unsigned uevent_suppress:1; | ||
379 | const char *init_name; /* initial name of the device */ | 376 | const char *init_name; /* initial name of the device */ |
380 | struct device_type *type; | 377 | struct device_type *type; |
381 | 378 | ||
@@ -387,8 +384,13 @@ struct device { | |||
387 | struct device_driver *driver; /* which driver has allocated this | 384 | struct device_driver *driver; /* which driver has allocated this |
388 | device */ | 385 | device */ |
389 | void *driver_data; /* data private to the driver */ | 386 | void *driver_data; /* data private to the driver */ |
390 | void *platform_data; /* Platform specific data, device | 387 | |
391 | core doesn't touch it */ | 388 | void *platform_data; /* We will remove platform_data |
389 | field if all platform devices | ||
390 | pass its platform specific data | ||
391 | from platform_device->platform_data, | ||
392 | other kind of devices should not | ||
393 | use platform_data. */ | ||
392 | struct dev_pm_info power; | 394 | struct dev_pm_info power; |
393 | 395 | ||
394 | #ifdef CONFIG_NUMA | 396 | #ifdef CONFIG_NUMA |
@@ -427,8 +429,7 @@ struct device { | |||
427 | 429 | ||
428 | static inline const char *dev_name(const struct device *dev) | 430 | static inline const char *dev_name(const struct device *dev) |
429 | { | 431 | { |
430 | /* will be changed into kobject_name(&dev->kobj) in the near future */ | 432 | return kobject_name(&dev->kobj); |
431 | return dev->bus_id; | ||
432 | } | 433 | } |
433 | 434 | ||
434 | extern int dev_set_name(struct device *dev, const char *name, ...) | 435 | extern int dev_set_name(struct device *dev, const char *name, ...) |
@@ -463,6 +464,16 @@ static inline void dev_set_drvdata(struct device *dev, void *data) | |||
463 | dev->driver_data = data; | 464 | dev->driver_data = data; |
464 | } | 465 | } |
465 | 466 | ||
467 | static inline unsigned int dev_get_uevent_suppress(const struct device *dev) | ||
468 | { | ||
469 | return dev->kobj.uevent_suppress; | ||
470 | } | ||
471 | |||
472 | static inline void dev_set_uevent_suppress(struct device *dev, int val) | ||
473 | { | ||
474 | dev->kobj.uevent_suppress = val; | ||
475 | } | ||
476 | |||
466 | static inline int device_is_registered(struct device *dev) | 477 | static inline int device_is_registered(struct device *dev) |
467 | { | 478 | { |
468 | return dev->kobj.state_in_sysfs; | 479 | return dev->kobj.state_in_sysfs; |
@@ -483,7 +494,8 @@ extern int device_for_each_child(struct device *dev, void *data, | |||
483 | extern struct device *device_find_child(struct device *dev, void *data, | 494 | extern struct device *device_find_child(struct device *dev, void *data, |
484 | int (*match)(struct device *dev, void *data)); | 495 | int (*match)(struct device *dev, void *data)); |
485 | extern int device_rename(struct device *dev, char *new_name); | 496 | extern int device_rename(struct device *dev, char *new_name); |
486 | extern int device_move(struct device *dev, struct device *new_parent); | 497 | extern int device_move(struct device *dev, struct device *new_parent, |
498 | enum dpm_order dpm_order); | ||
487 | 499 | ||
488 | /* | 500 | /* |
489 | * Root device objects for grouping under /sys/devices | 501 | * Root device objects for grouping under /sys/devices |
@@ -570,7 +582,7 @@ extern const char *dev_driver_string(const struct device *dev); | |||
570 | #if defined(DEBUG) | 582 | #if defined(DEBUG) |
571 | #define dev_dbg(dev, format, arg...) \ | 583 | #define dev_dbg(dev, format, arg...) \ |
572 | dev_printk(KERN_DEBUG , dev , format , ## arg) | 584 | dev_printk(KERN_DEBUG , dev , format , ## arg) |
573 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 585 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
574 | #define dev_dbg(dev, format, ...) do { \ | 586 | #define dev_dbg(dev, format, ...) do { \ |
575 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ | 587 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ |
576 | } while (0) | 588 | } while (0) |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h new file mode 100644 index 000000000000..baabf33be244 --- /dev/null +++ b/include/linux/dynamic_debug.h | |||
@@ -0,0 +1,88 @@ | |||
1 | #ifndef _DYNAMIC_DEBUG_H | ||
2 | #define _DYNAMIC_DEBUG_H | ||
3 | |||
4 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | ||
5 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | ||
6 | * use independent hash functions, to reduce the chance of false positives. | ||
7 | */ | ||
8 | extern long long dynamic_debug_enabled; | ||
9 | extern long long dynamic_debug_enabled2; | ||
10 | |||
11 | /* | ||
12 | * An instance of this structure is created in a special | ||
13 | * ELF section at every dynamic debug callsite. At runtime, | ||
14 | * the special section is treated as an array of these. | ||
15 | */ | ||
16 | struct _ddebug { | ||
17 | /* | ||
18 | * These fields are used to drive the user interface | ||
19 | * for selecting and displaying debug callsites. | ||
20 | */ | ||
21 | const char *modname; | ||
22 | const char *function; | ||
23 | const char *filename; | ||
24 | const char *format; | ||
25 | char primary_hash; | ||
26 | char secondary_hash; | ||
27 | unsigned int lineno:24; | ||
28 | /* | ||
29 | * The flags field controls the behaviour at the callsite. | ||
30 | * The bits here are changed dynamically when the user | ||
31 | * writes commands to <debugfs>/dynamic_debug/ddebug | ||
32 | */ | ||
33 | #define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ | ||
34 | #define _DPRINTK_FLAGS_DEFAULT 0 | ||
35 | unsigned int flags:8; | ||
36 | } __attribute__((aligned(8))); | ||
37 | |||
38 | |||
39 | int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
40 | const char *modname); | ||
41 | |||
42 | #if defined(CONFIG_DYNAMIC_DEBUG) | ||
43 | extern int ddebug_remove_module(char *mod_name); | ||
44 | |||
45 | #define __dynamic_dbg_enabled(dd) ({ \ | ||
46 | int __ret = 0; \ | ||
47 | if (unlikely((dynamic_debug_enabled & (1LL << DEBUG_HASH)) && \ | ||
48 | (dynamic_debug_enabled2 & (1LL << DEBUG_HASH2)))) \ | ||
49 | if (unlikely(dd.flags)) \ | ||
50 | __ret = 1; \ | ||
51 | __ret; }) | ||
52 | |||
53 | #define dynamic_pr_debug(fmt, ...) do { \ | ||
54 | static struct _ddebug descriptor \ | ||
55 | __used \ | ||
56 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
57 | { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ | ||
58 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | ||
59 | if (__dynamic_dbg_enabled(descriptor)) \ | ||
60 | printk(KERN_DEBUG KBUILD_MODNAME ":" pr_fmt(fmt), \ | ||
61 | ##__VA_ARGS__); \ | ||
62 | } while (0) | ||
63 | |||
64 | |||
65 | #define dynamic_dev_dbg(dev, fmt, ...) do { \ | ||
66 | static struct _ddebug descriptor \ | ||
67 | __used \ | ||
68 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
69 | { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ | ||
70 | DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ | ||
71 | if (__dynamic_dbg_enabled(descriptor)) \ | ||
72 | dev_printk(KERN_DEBUG, dev, \ | ||
73 | KBUILD_MODNAME ": " pr_fmt(fmt),\ | ||
74 | ##__VA_ARGS__); \ | ||
75 | } while (0) | ||
76 | |||
77 | #else | ||
78 | |||
79 | static inline int ddebug_remove_module(char *mod) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | #define dynamic_pr_debug(fmt, ...) do { } while (0) | ||
85 | #define dynamic_dev_dbg(dev, format, ...) do { } while (0) | ||
86 | #endif | ||
87 | |||
88 | #endif | ||
diff --git a/include/linux/dynamic_printk.h b/include/linux/dynamic_printk.h deleted file mode 100644 index 2d528d009074..000000000000 --- a/include/linux/dynamic_printk.h +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | #ifndef _DYNAMIC_PRINTK_H | ||
2 | #define _DYNAMIC_PRINTK_H | ||
3 | |||
4 | #define DYNAMIC_DEBUG_HASH_BITS 6 | ||
5 | #define DEBUG_HASH_TABLE_SIZE (1 << DYNAMIC_DEBUG_HASH_BITS) | ||
6 | |||
7 | #define TYPE_BOOLEAN 1 | ||
8 | |||
9 | #define DYNAMIC_ENABLED_ALL 0 | ||
10 | #define DYNAMIC_ENABLED_NONE 1 | ||
11 | #define DYNAMIC_ENABLED_SOME 2 | ||
12 | |||
13 | extern int dynamic_enabled; | ||
14 | |||
15 | /* dynamic_printk_enabled, and dynamic_printk_enabled2 are bitmasks in which | ||
16 | * bit n is set to 1 if any modname hashes into the bucket n, 0 otherwise. They | ||
17 | * use independent hash functions, to reduce the chance of false positives. | ||
18 | */ | ||
19 | extern long long dynamic_printk_enabled; | ||
20 | extern long long dynamic_printk_enabled2; | ||
21 | |||
22 | struct mod_debug { | ||
23 | char *modname; | ||
24 | char *logical_modname; | ||
25 | char *flag_names; | ||
26 | int type; | ||
27 | int hash; | ||
28 | int hash2; | ||
29 | } __attribute__((aligned(8))); | ||
30 | |||
31 | int register_dynamic_debug_module(char *mod_name, int type, char *share_name, | ||
32 | char *flags, int hash, int hash2); | ||
33 | |||
34 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | ||
35 | extern int unregister_dynamic_debug_module(char *mod_name); | ||
36 | extern int __dynamic_dbg_enabled_helper(char *modname, int type, | ||
37 | int value, int hash); | ||
38 | |||
39 | #define __dynamic_dbg_enabled(module, type, value, level, hash) ({ \ | ||
40 | int __ret = 0; \ | ||
41 | if (unlikely((dynamic_printk_enabled & (1LL << DEBUG_HASH)) && \ | ||
42 | (dynamic_printk_enabled2 & (1LL << DEBUG_HASH2)))) \ | ||
43 | __ret = __dynamic_dbg_enabled_helper(module, type, \ | ||
44 | value, hash);\ | ||
45 | __ret; }) | ||
46 | |||
47 | #define dynamic_pr_debug(fmt, ...) do { \ | ||
48 | static char mod_name[] \ | ||
49 | __attribute__((section("__verbose_strings"))) \ | ||
50 | = KBUILD_MODNAME; \ | ||
51 | static struct mod_debug descriptor \ | ||
52 | __used \ | ||
53 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
54 | { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\ | ||
55 | if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \ | ||
56 | 0, 0, DEBUG_HASH)) \ | ||
57 | printk(KERN_DEBUG KBUILD_MODNAME ":" fmt, \ | ||
58 | ##__VA_ARGS__); \ | ||
59 | } while (0) | ||
60 | |||
61 | #define dynamic_dev_dbg(dev, format, ...) do { \ | ||
62 | static char mod_name[] \ | ||
63 | __attribute__((section("__verbose_strings"))) \ | ||
64 | = KBUILD_MODNAME; \ | ||
65 | static struct mod_debug descriptor \ | ||
66 | __used \ | ||
67 | __attribute__((section("__verbose"), aligned(8))) = \ | ||
68 | { mod_name, mod_name, NULL, TYPE_BOOLEAN, DEBUG_HASH, DEBUG_HASH2 };\ | ||
69 | if (__dynamic_dbg_enabled(KBUILD_MODNAME, TYPE_BOOLEAN, \ | ||
70 | 0, 0, DEBUG_HASH)) \ | ||
71 | dev_printk(KERN_DEBUG, dev, \ | ||
72 | KBUILD_MODNAME ": " format, \ | ||
73 | ##__VA_ARGS__); \ | ||
74 | } while (0) | ||
75 | |||
76 | #else | ||
77 | |||
78 | static inline int unregister_dynamic_debug_module(const char *mod_name) | ||
79 | { | ||
80 | return 0; | ||
81 | } | ||
82 | static inline int __dynamic_dbg_enabled_helper(char *modname, int type, | ||
83 | int value, int hash) | ||
84 | { | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | #define __dynamic_dbg_enabled(module, type, value, level, hash) ({ 0; }) | ||
89 | #define dynamic_pr_debug(fmt, ...) do { } while (0) | ||
90 | #define dynamic_dev_dbg(dev, format, ...) do { } while (0) | ||
91 | #endif | ||
92 | |||
93 | #endif | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 92734c0012e6..5bc81c4a98c1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -141,6 +141,7 @@ struct inodes_stat_t { | |||
141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ | 141 | #define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */ |
142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ | 142 | #define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ |
143 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ | 143 | #define MS_I_VERSION (1<<23) /* Update inode I_version field */ |
144 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ | ||
144 | #define MS_ACTIVE (1<<30) | 145 | #define MS_ACTIVE (1<<30) |
145 | #define MS_NOUSER (1<<31) | 146 | #define MS_NOUSER (1<<31) |
146 | 147 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 25087aead657..854eba8b2ba3 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
27 | #include <asm/mutex.h> | 27 | #include <asm/mutex.h> |
28 | 28 | ||
29 | #if defined(CONFIG_CRIS) || defined(CONFIG_FRV) | 29 | #if defined(CONFIG_CRIS) || defined(CONFIG_FRV) || defined(CONFIG_MN10300) |
30 | # define SUPPORT_VLB_SYNC 0 | 30 | # define SUPPORT_VLB_SYNC 0 |
31 | #else | 31 | #else |
32 | # define SUPPORT_VLB_SYNC 1 | 32 | # define SUPPORT_VLB_SYNC 1 |
@@ -193,24 +193,8 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
193 | hw->io_ports.ctl_addr = ctl_addr; | 193 | hw->io_ports.ctl_addr = ctl_addr; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* for IDE PCI controllers in legacy mode, temporary */ | 196 | #if defined(CONFIG_ARM) || defined(CONFIG_M68K) || defined(CONFIG_MIPS) || \ |
197 | static inline int __ide_default_irq(unsigned long base) | 197 | defined(CONFIG_PARISC) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) |
198 | { | ||
199 | switch (base) { | ||
200 | #ifdef CONFIG_IA64 | ||
201 | case 0x1f0: return isa_irq_to_vector(14); | ||
202 | case 0x170: return isa_irq_to_vector(15); | ||
203 | #else | ||
204 | case 0x1f0: return 14; | ||
205 | case 0x170: return 15; | ||
206 | #endif | ||
207 | } | ||
208 | return 0; | ||
209 | } | ||
210 | |||
211 | #if defined(CONFIG_ARM) || defined(CONFIG_FRV) || defined(CONFIG_M68K) || \ | ||
212 | defined(CONFIG_MIPS) || defined(CONFIG_MN10300) || defined(CONFIG_PARISC) \ | ||
213 | || defined(CONFIG_PPC) || defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) | ||
214 | #include <asm/ide.h> | 198 | #include <asm/ide.h> |
215 | #else | 199 | #else |
216 | #include <asm-generic/ide_iops.h> | 200 | #include <asm-generic/ide_iops.h> |
@@ -866,7 +850,7 @@ struct ide_host { | |||
866 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; | 850 | ide_hwif_t *ports[MAX_HOST_PORTS + 1]; |
867 | unsigned int n_ports; | 851 | unsigned int n_ports; |
868 | struct device *dev[2]; | 852 | struct device *dev[2]; |
869 | unsigned int (*init_chipset)(struct pci_dev *); | 853 | int (*init_chipset)(struct pci_dev *); |
870 | irq_handler_t irq_handler; | 854 | irq_handler_t irq_handler; |
871 | unsigned long host_flags; | 855 | unsigned long host_flags; |
872 | void *host_priv; | 856 | void *host_priv; |
@@ -1146,11 +1130,14 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l | |||
1146 | extern int ide_vlb_clk; | 1130 | extern int ide_vlb_clk; |
1147 | extern int ide_pci_clk; | 1131 | extern int ide_pci_clk; |
1148 | 1132 | ||
1149 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 1133 | int ide_end_request(ide_drive_t *, int, int); |
1150 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 1134 | int ide_end_dequeued_request(ide_drive_t *, struct request *, int, int); |
1151 | int uptodate, int nr_sectors); | 1135 | void ide_kill_rq(ide_drive_t *, struct request *); |
1152 | 1136 | ||
1153 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); | 1137 | void __ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int, |
1138 | ide_expiry_t *); | ||
1139 | void ide_set_handler(ide_drive_t *, ide_handler_t *, unsigned int, | ||
1140 | ide_expiry_t *); | ||
1154 | 1141 | ||
1155 | void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int, | 1142 | void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int, |
1156 | ide_expiry_t *); | 1143 | ide_expiry_t *); |
@@ -1169,13 +1156,14 @@ int ide_busy_sleep(ide_hwif_t *, unsigned long, int); | |||
1169 | 1156 | ||
1170 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1157 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
1171 | 1158 | ||
1159 | ide_startstop_t ide_do_park_unpark(ide_drive_t *, struct request *); | ||
1160 | ide_startstop_t ide_do_devset(ide_drive_t *, struct request *); | ||
1161 | |||
1172 | extern ide_startstop_t ide_do_reset (ide_drive_t *); | 1162 | extern ide_startstop_t ide_do_reset (ide_drive_t *); |
1173 | 1163 | ||
1174 | extern int ide_devset_execute(ide_drive_t *drive, | 1164 | extern int ide_devset_execute(ide_drive_t *drive, |
1175 | const struct ide_devset *setting, int arg); | 1165 | const struct ide_devset *setting, int arg); |
1176 | 1166 | ||
1177 | extern void ide_do_drive_cmd(ide_drive_t *, struct request *); | ||
1178 | |||
1179 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | 1167 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); |
1180 | 1168 | ||
1181 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1169 | void ide_tf_dump(const char *, struct ide_taskfile *); |
@@ -1200,10 +1188,6 @@ void SELECT_MASK(ide_drive_t *, int); | |||
1200 | u8 ide_read_error(ide_drive_t *); | 1188 | u8 ide_read_error(ide_drive_t *); |
1201 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | 1189 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); |
1202 | 1190 | ||
1203 | extern int drive_is_ready(ide_drive_t *); | ||
1204 | |||
1205 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | ||
1206 | |||
1207 | int ide_check_atapi_device(ide_drive_t *, const char *); | 1191 | int ide_check_atapi_device(ide_drive_t *, const char *); |
1208 | 1192 | ||
1209 | void ide_init_pc(struct ide_atapi_pc *); | 1193 | void ide_init_pc(struct ide_atapi_pc *); |
@@ -1251,6 +1235,8 @@ int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | |||
1251 | 1235 | ||
1252 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); | 1236 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); |
1253 | 1237 | ||
1238 | int ide_dev_read_id(ide_drive_t *, u8, u16 *); | ||
1239 | |||
1254 | extern int ide_driveid_update(ide_drive_t *); | 1240 | extern int ide_driveid_update(ide_drive_t *); |
1255 | extern int ide_config_drive_speed(ide_drive_t *, u8); | 1241 | extern int ide_config_drive_speed(ide_drive_t *, u8); |
1256 | extern u8 eighty_ninty_three (ide_drive_t *); | 1242 | extern u8 eighty_ninty_three (ide_drive_t *); |
@@ -1280,7 +1266,7 @@ static inline int ide_pci_is_in_compatibility_mode(struct pci_dev *dev) | |||
1280 | return 0; | 1266 | return 0; |
1281 | } | 1267 | } |
1282 | 1268 | ||
1283 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, | 1269 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, |
1284 | hw_regs_t *, hw_regs_t **); | 1270 | hw_regs_t *, hw_regs_t **); |
1285 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1271 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1286 | 1272 | ||
@@ -1349,10 +1335,6 @@ enum { | |||
1349 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), | 1335 | IDE_HFLAG_ERROR_STOPS_FIFO = (1 << 19), |
1350 | /* serialize ports */ | 1336 | /* serialize ports */ |
1351 | IDE_HFLAG_SERIALIZE = (1 << 20), | 1337 | IDE_HFLAG_SERIALIZE = (1 << 20), |
1352 | /* use legacy IRQs */ | ||
1353 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | ||
1354 | /* force use of legacy IRQs */ | ||
1355 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), | ||
1356 | /* host is TRM290 */ | 1338 | /* host is TRM290 */ |
1357 | IDE_HFLAG_TRM290 = (1 << 23), | 1339 | IDE_HFLAG_TRM290 = (1 << 23), |
1358 | /* use 32-bit I/O ops */ | 1340 | /* use 32-bit I/O ops */ |
@@ -1380,7 +1362,7 @@ enum { | |||
1380 | 1362 | ||
1381 | struct ide_port_info { | 1363 | struct ide_port_info { |
1382 | char *name; | 1364 | char *name; |
1383 | unsigned int (*init_chipset)(struct pci_dev *); | 1365 | int (*init_chipset)(struct pci_dev *); |
1384 | void (*init_iops)(ide_hwif_t *); | 1366 | void (*init_iops)(ide_hwif_t *); |
1385 | void (*init_hwif)(ide_hwif_t *); | 1367 | void (*init_hwif)(ide_hwif_t *); |
1386 | int (*init_dma)(ide_hwif_t *, | 1368 | int (*init_dma)(ide_hwif_t *, |
@@ -1471,6 +1453,7 @@ static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | |||
1471 | 1453 | ||
1472 | void ide_dma_lost_irq(ide_drive_t *); | 1454 | void ide_dma_lost_irq(ide_drive_t *); |
1473 | void ide_dma_timeout(ide_drive_t *); | 1455 | void ide_dma_timeout(ide_drive_t *); |
1456 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | ||
1474 | 1457 | ||
1475 | #else | 1458 | #else |
1476 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | 1459 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } |
@@ -1482,21 +1465,24 @@ static inline void ide_dma_on(ide_drive_t *drive) { ; } | |||
1482 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | 1465 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } |
1483 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | 1466 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } |
1484 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } | 1467 | static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } |
1468 | static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; } | ||
1485 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } | 1469 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } |
1486 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1470 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
1487 | 1471 | ||
1488 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1472 | #ifdef CONFIG_BLK_DEV_IDEACPI |
1473 | int ide_acpi_init(void); | ||
1489 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | 1474 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); |
1490 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1475 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
1491 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1476 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
1492 | extern void ide_acpi_init(ide_hwif_t *hwif); | 1477 | void ide_acpi_init_port(ide_hwif_t *); |
1493 | void ide_acpi_port_init_devices(ide_hwif_t *); | 1478 | void ide_acpi_port_init_devices(ide_hwif_t *); |
1494 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | 1479 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); |
1495 | #else | 1480 | #else |
1481 | static inline int ide_acpi_init(void) { return 0; } | ||
1496 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1482 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
1497 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1483 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
1498 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1484 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
1499 | static inline void ide_acpi_init(ide_hwif_t *hwif) { ; } | 1485 | static inline void ide_acpi_init_port(ide_hwif_t *hwif) { ; } |
1500 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } | 1486 | static inline void ide_acpi_port_init_devices(ide_hwif_t *hwif) { ; } |
1501 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} | 1487 | static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} |
1502 | #endif | 1488 | #endif |
@@ -1530,9 +1516,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1530 | hwif->hwif_data = data; | 1516 | hwif->hwif_data = data; |
1531 | } | 1517 | } |
1532 | 1518 | ||
1533 | const char *ide_xfer_verbose(u8 mode); | ||
1534 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1519 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1535 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | ||
1536 | 1520 | ||
1537 | u64 ide_get_lba_addr(struct ide_taskfile *, int); | 1521 | u64 ide_get_lba_addr(struct ide_taskfile *, int); |
1538 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1522 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
@@ -1571,14 +1555,18 @@ void ide_timing_merge(struct ide_timing *, struct ide_timing *, | |||
1571 | struct ide_timing *, unsigned int); | 1555 | struct ide_timing *, unsigned int); |
1572 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | 1556 | int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); |
1573 | 1557 | ||
1558 | #ifdef CONFIG_IDE_XFER_MODE | ||
1574 | int ide_scan_pio_blacklist(char *); | 1559 | int ide_scan_pio_blacklist(char *); |
1575 | 1560 | const char *ide_xfer_verbose(u8); | |
1576 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1561 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1577 | |||
1578 | int ide_set_pio_mode(ide_drive_t *, u8); | 1562 | int ide_set_pio_mode(ide_drive_t *, u8); |
1579 | int ide_set_dma_mode(ide_drive_t *, u8); | 1563 | int ide_set_dma_mode(ide_drive_t *, u8); |
1580 | |||
1581 | void ide_set_pio(ide_drive_t *, u8); | 1564 | void ide_set_pio(ide_drive_t *, u8); |
1565 | int ide_set_xfer_rate(ide_drive_t *, u8); | ||
1566 | #else | ||
1567 | static inline void ide_set_pio(ide_drive_t *drive, u8 pio) { ; } | ||
1568 | static inline int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) { return -1; } | ||
1569 | #endif | ||
1582 | 1570 | ||
1583 | static inline void ide_set_max_pio(ide_drive_t *drive) | 1571 | static inline void ide_set_max_pio(ide_drive_t *drive) |
1584 | { | 1572 | { |
@@ -1611,6 +1599,10 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | |||
1611 | #define ide_port_for_each_dev(i, dev, port) \ | 1599 | #define ide_port_for_each_dev(i, dev, port) \ |
1612 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | 1600 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) |
1613 | 1601 | ||
1602 | #define ide_port_for_each_present_dev(i, dev, port) \ | ||
1603 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) \ | ||
1604 | if ((dev)->dev_flags & IDE_DFLAG_PRESENT) | ||
1605 | |||
1614 | #define ide_host_for_each_port(i, port, host) \ | 1606 | #define ide_host_for_each_port(i, port, host) \ |
1615 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) | 1607 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) |
1616 | 1608 | ||
diff --git a/include/linux/ima.h b/include/linux/ima.h new file mode 100644 index 000000000000..0e2aa45cb0ce --- /dev/null +++ b/include/linux/ima.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 IBM Corporation | ||
3 | * Author: Mimi Zohar <zohar@us.ibm.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation, version 2 of the License. | ||
8 | */ | ||
9 | |||
10 | #ifndef _LINUX_IMA_H | ||
11 | #define _LINUX_IMA_H | ||
12 | |||
13 | #include <linux/fs.h> | ||
14 | struct linux_binprm; | ||
15 | |||
16 | #ifdef CONFIG_IMA | ||
17 | extern int ima_bprm_check(struct linux_binprm *bprm); | ||
18 | extern int ima_inode_alloc(struct inode *inode); | ||
19 | extern void ima_inode_free(struct inode *inode); | ||
20 | extern int ima_path_check(struct path *path, int mask); | ||
21 | extern void ima_file_free(struct file *file); | ||
22 | extern int ima_file_mmap(struct file *file, unsigned long prot); | ||
23 | extern void ima_shm_check(struct file *file); | ||
24 | |||
25 | #else | ||
26 | static inline int ima_bprm_check(struct linux_binprm *bprm) | ||
27 | { | ||
28 | return 0; | ||
29 | } | ||
30 | |||
31 | static inline int ima_inode_alloc(struct inode *inode) | ||
32 | { | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static inline void ima_inode_free(struct inode *inode) | ||
37 | { | ||
38 | return; | ||
39 | } | ||
40 | |||
41 | static inline int ima_path_check(struct path *path, int mask) | ||
42 | { | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static inline void ima_file_free(struct file *file) | ||
47 | { | ||
48 | return; | ||
49 | } | ||
50 | |||
51 | static inline int ima_file_mmap(struct file *file, unsigned long prot) | ||
52 | { | ||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | static inline void ima_shm_check(struct file *file) | ||
57 | { | ||
58 | return; | ||
59 | } | ||
60 | #endif /* CONFIG_IMA_H */ | ||
61 | #endif /* _LINUX_IMA_H */ | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 1249a0c20a38..6b28048fc568 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -661,6 +661,7 @@ struct input_absinfo { | |||
661 | #define SW_DOCK 0x05 /* set = plugged into dock */ | 661 | #define SW_DOCK 0x05 /* set = plugged into dock */ |
662 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ | 662 | #define SW_LINEOUT_INSERT 0x06 /* set = inserted */ |
663 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ | 663 | #define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */ |
664 | #define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */ | ||
664 | #define SW_MAX 0x0f | 665 | #define SW_MAX 0x0f |
665 | #define SW_CNT (SW_MAX+1) | 666 | #define SW_CNT (SW_MAX+1) |
666 | 667 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7fa371898e3e..914918abfdd1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/log2.h> | 16 | #include <linux/log2.h> |
17 | #include <linux/typecheck.h> | 17 | #include <linux/typecheck.h> |
18 | #include <linux/ratelimit.h> | 18 | #include <linux/ratelimit.h> |
19 | #include <linux/dynamic_printk.h> | 19 | #include <linux/dynamic_debug.h> |
20 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
21 | #include <asm/bug.h> | 21 | #include <asm/bug.h> |
22 | 22 | ||
@@ -358,9 +358,10 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
358 | #if defined(DEBUG) | 358 | #if defined(DEBUG) |
359 | #define pr_debug(fmt, ...) \ | 359 | #define pr_debug(fmt, ...) \ |
360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
361 | #elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 361 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
362 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
362 | #define pr_debug(fmt, ...) do { \ | 363 | #define pr_debug(fmt, ...) do { \ |
363 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 364 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ |
364 | } while (0) | 365 | } while (0) |
365 | #else | 366 | #else |
366 | #define pr_debug(fmt, ...) \ | 367 | #define pr_debug(fmt, ...) \ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 5437ac0276e2..58ae8e00fcdd 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -68,10 +68,13 @@ struct kobject { | |||
68 | unsigned int state_in_sysfs:1; | 68 | unsigned int state_in_sysfs:1; |
69 | unsigned int state_add_uevent_sent:1; | 69 | unsigned int state_add_uevent_sent:1; |
70 | unsigned int state_remove_uevent_sent:1; | 70 | unsigned int state_remove_uevent_sent:1; |
71 | unsigned int uevent_suppress:1; | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) | 74 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) |
74 | __attribute__((format(printf, 2, 3))); | 75 | __attribute__((format(printf, 2, 3))); |
76 | extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, | ||
77 | va_list vargs); | ||
75 | 78 | ||
76 | static inline const char *kobject_name(const struct kobject *kobj) | 79 | static inline const char *kobject_name(const struct kobject *kobj) |
77 | { | 80 | { |
diff --git a/include/linux/lm_interface.h b/include/linux/lm_interface.h deleted file mode 100644 index 2ed8fa1b762b..000000000000 --- a/include/linux/lm_interface.h +++ /dev/null | |||
@@ -1,277 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | ||
3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | ||
4 | * | ||
5 | * This copyrighted material is made available to anyone wishing to use, | ||
6 | * modify, copy, or redistribute it subject to the terms and conditions | ||
7 | * of the GNU General Public License version 2. | ||
8 | */ | ||
9 | |||
10 | #ifndef __LM_INTERFACE_DOT_H__ | ||
11 | #define __LM_INTERFACE_DOT_H__ | ||
12 | |||
13 | |||
14 | typedef void (*lm_callback_t) (void *ptr, unsigned int type, void *data); | ||
15 | |||
16 | /* | ||
17 | * lm_mount() flags | ||
18 | * | ||
19 | * LM_MFLAG_SPECTATOR | ||
20 | * GFS is asking to join the filesystem's lockspace, but it doesn't want to | ||
21 | * modify the filesystem. The lock module shouldn't assign a journal to the FS | ||
22 | * mount. It shouldn't send recovery callbacks to the FS mount. If the node | ||
23 | * dies or withdraws, all locks can be wiped immediately. | ||
24 | * | ||
25 | * LM_MFLAG_CONV_NODROP | ||
26 | * Do not allow the dlm to internally resolve conversion deadlocks by demoting | ||
27 | * the lock to unlocked and then reacquiring it in the requested mode. Instead, | ||
28 | * it should cancel the request and return LM_OUT_CONV_DEADLK. | ||
29 | */ | ||
30 | |||
31 | #define LM_MFLAG_SPECTATOR 0x00000001 | ||
32 | #define LM_MFLAG_CONV_NODROP 0x00000002 | ||
33 | |||
34 | /* | ||
35 | * lm_lockstruct flags | ||
36 | * | ||
37 | * LM_LSFLAG_LOCAL | ||
38 | * The lock_nolock module returns LM_LSFLAG_LOCAL to GFS, indicating that GFS | ||
39 | * can make single-node optimizations. | ||
40 | */ | ||
41 | |||
42 | #define LM_LSFLAG_LOCAL 0x00000001 | ||
43 | |||
44 | /* | ||
45 | * lm_lockname types | ||
46 | */ | ||
47 | |||
48 | #define LM_TYPE_RESERVED 0x00 | ||
49 | #define LM_TYPE_NONDISK 0x01 | ||
50 | #define LM_TYPE_INODE 0x02 | ||
51 | #define LM_TYPE_RGRP 0x03 | ||
52 | #define LM_TYPE_META 0x04 | ||
53 | #define LM_TYPE_IOPEN 0x05 | ||
54 | #define LM_TYPE_FLOCK 0x06 | ||
55 | #define LM_TYPE_PLOCK 0x07 | ||
56 | #define LM_TYPE_QUOTA 0x08 | ||
57 | #define LM_TYPE_JOURNAL 0x09 | ||
58 | |||
59 | /* | ||
60 | * lm_lock() states | ||
61 | * | ||
62 | * SHARED is compatible with SHARED, not with DEFERRED or EX. | ||
63 | * DEFERRED is compatible with DEFERRED, not with SHARED or EX. | ||
64 | */ | ||
65 | |||
66 | #define LM_ST_UNLOCKED 0 | ||
67 | #define LM_ST_EXCLUSIVE 1 | ||
68 | #define LM_ST_DEFERRED 2 | ||
69 | #define LM_ST_SHARED 3 | ||
70 | |||
71 | /* | ||
72 | * lm_lock() flags | ||
73 | * | ||
74 | * LM_FLAG_TRY | ||
75 | * Don't wait to acquire the lock if it can't be granted immediately. | ||
76 | * | ||
77 | * LM_FLAG_TRY_1CB | ||
78 | * Send one blocking callback if TRY is set and the lock is not granted. | ||
79 | * | ||
80 | * LM_FLAG_NOEXP | ||
81 | * GFS sets this flag on lock requests it makes while doing journal recovery. | ||
82 | * These special requests should not be blocked due to the recovery like | ||
83 | * ordinary locks would be. | ||
84 | * | ||
85 | * LM_FLAG_ANY | ||
86 | * A SHARED request may also be granted in DEFERRED, or a DEFERRED request may | ||
87 | * also be granted in SHARED. The preferred state is whichever is compatible | ||
88 | * with other granted locks, or the specified state if no other locks exist. | ||
89 | * | ||
90 | * LM_FLAG_PRIORITY | ||
91 | * Override fairness considerations. Suppose a lock is held in a shared state | ||
92 | * and there is a pending request for the deferred state. A shared lock | ||
93 | * request with the priority flag would be allowed to bypass the deferred | ||
94 | * request and directly join the other shared lock. A shared lock request | ||
95 | * without the priority flag might be forced to wait until the deferred | ||
96 | * requested had acquired and released the lock. | ||
97 | */ | ||
98 | |||
99 | #define LM_FLAG_TRY 0x00000001 | ||
100 | #define LM_FLAG_TRY_1CB 0x00000002 | ||
101 | #define LM_FLAG_NOEXP 0x00000004 | ||
102 | #define LM_FLAG_ANY 0x00000008 | ||
103 | #define LM_FLAG_PRIORITY 0x00000010 | ||
104 | |||
105 | /* | ||
106 | * lm_lock() and lm_async_cb return flags | ||
107 | * | ||
108 | * LM_OUT_ST_MASK | ||
109 | * Masks the lower two bits of lock state in the returned value. | ||
110 | * | ||
111 | * LM_OUT_CACHEABLE | ||
112 | * The lock hasn't been released so GFS can continue to cache data for it. | ||
113 | * | ||
114 | * LM_OUT_CANCELED | ||
115 | * The lock request was canceled. | ||
116 | * | ||
117 | * LM_OUT_ASYNC | ||
118 | * The result of the request will be returned in an LM_CB_ASYNC callback. | ||
119 | * | ||
120 | * LM_OUT_CONV_DEADLK | ||
121 | * The lock request was canceled do to a conversion deadlock. | ||
122 | */ | ||
123 | |||
124 | #define LM_OUT_ST_MASK 0x00000003 | ||
125 | #define LM_OUT_CANCELED 0x00000008 | ||
126 | #define LM_OUT_ASYNC 0x00000080 | ||
127 | #define LM_OUT_ERROR 0x00000100 | ||
128 | |||
129 | /* | ||
130 | * lm_callback_t types | ||
131 | * | ||
132 | * LM_CB_NEED_E LM_CB_NEED_D LM_CB_NEED_S | ||
133 | * Blocking callback, a remote node is requesting the given lock in | ||
134 | * EXCLUSIVE, DEFERRED, or SHARED. | ||
135 | * | ||
136 | * LM_CB_NEED_RECOVERY | ||
137 | * The given journal needs to be recovered. | ||
138 | * | ||
139 | * LM_CB_ASYNC | ||
140 | * The given lock has been granted. | ||
141 | */ | ||
142 | |||
143 | #define LM_CB_NEED_E 257 | ||
144 | #define LM_CB_NEED_D 258 | ||
145 | #define LM_CB_NEED_S 259 | ||
146 | #define LM_CB_NEED_RECOVERY 260 | ||
147 | #define LM_CB_ASYNC 262 | ||
148 | |||
149 | /* | ||
150 | * lm_recovery_done() messages | ||
151 | */ | ||
152 | |||
153 | #define LM_RD_GAVEUP 308 | ||
154 | #define LM_RD_SUCCESS 309 | ||
155 | |||
156 | |||
157 | struct lm_lockname { | ||
158 | u64 ln_number; | ||
159 | unsigned int ln_type; | ||
160 | }; | ||
161 | |||
162 | #define lm_name_equal(name1, name2) \ | ||
163 | (((name1)->ln_number == (name2)->ln_number) && \ | ||
164 | ((name1)->ln_type == (name2)->ln_type)) \ | ||
165 | |||
166 | struct lm_async_cb { | ||
167 | struct lm_lockname lc_name; | ||
168 | int lc_ret; | ||
169 | }; | ||
170 | |||
171 | struct lm_lockstruct; | ||
172 | |||
173 | struct lm_lockops { | ||
174 | const char *lm_proto_name; | ||
175 | |||
176 | /* | ||
177 | * Mount/Unmount | ||
178 | */ | ||
179 | |||
180 | int (*lm_mount) (char *table_name, char *host_data, | ||
181 | lm_callback_t cb, void *cb_data, | ||
182 | unsigned int min_lvb_size, int flags, | ||
183 | struct lm_lockstruct *lockstruct, | ||
184 | struct kobject *fskobj); | ||
185 | |||
186 | void (*lm_others_may_mount) (void *lockspace); | ||
187 | |||
188 | void (*lm_unmount) (void *lockspace); | ||
189 | |||
190 | void (*lm_withdraw) (void *lockspace); | ||
191 | |||
192 | /* | ||
193 | * Lock oriented operations | ||
194 | */ | ||
195 | |||
196 | int (*lm_get_lock) (void *lockspace, struct lm_lockname *name, void **lockp); | ||
197 | |||
198 | void (*lm_put_lock) (void *lock); | ||
199 | |||
200 | unsigned int (*lm_lock) (void *lock, unsigned int cur_state, | ||
201 | unsigned int req_state, unsigned int flags); | ||
202 | |||
203 | unsigned int (*lm_unlock) (void *lock, unsigned int cur_state); | ||
204 | |||
205 | void (*lm_cancel) (void *lock); | ||
206 | |||
207 | int (*lm_hold_lvb) (void *lock, char **lvbp); | ||
208 | void (*lm_unhold_lvb) (void *lock, char *lvb); | ||
209 | |||
210 | /* | ||
211 | * Posix Lock oriented operations | ||
212 | */ | ||
213 | |||
214 | int (*lm_plock_get) (void *lockspace, struct lm_lockname *name, | ||
215 | struct file *file, struct file_lock *fl); | ||
216 | |||
217 | int (*lm_plock) (void *lockspace, struct lm_lockname *name, | ||
218 | struct file *file, int cmd, struct file_lock *fl); | ||
219 | |||
220 | int (*lm_punlock) (void *lockspace, struct lm_lockname *name, | ||
221 | struct file *file, struct file_lock *fl); | ||
222 | |||
223 | /* | ||
224 | * Client oriented operations | ||
225 | */ | ||
226 | |||
227 | void (*lm_recovery_done) (void *lockspace, unsigned int jid, | ||
228 | unsigned int message); | ||
229 | |||
230 | struct module *lm_owner; | ||
231 | }; | ||
232 | |||
233 | /* | ||
234 | * lm_mount() return values | ||
235 | * | ||
236 | * ls_jid - the journal ID this node should use | ||
237 | * ls_first - this node is the first to mount the file system | ||
238 | * ls_lvb_size - size in bytes of lock value blocks | ||
239 | * ls_lockspace - lock module's context for this file system | ||
240 | * ls_ops - lock module's functions | ||
241 | * ls_flags - lock module features | ||
242 | */ | ||
243 | |||
244 | struct lm_lockstruct { | ||
245 | unsigned int ls_jid; | ||
246 | unsigned int ls_first; | ||
247 | unsigned int ls_lvb_size; | ||
248 | void *ls_lockspace; | ||
249 | const struct lm_lockops *ls_ops; | ||
250 | int ls_flags; | ||
251 | }; | ||
252 | |||
253 | /* | ||
254 | * Lock module bottom interface. A lock module makes itself available to GFS | ||
255 | * with these functions. | ||
256 | */ | ||
257 | |||
258 | int gfs2_register_lockproto(const struct lm_lockops *proto); | ||
259 | void gfs2_unregister_lockproto(const struct lm_lockops *proto); | ||
260 | |||
261 | /* | ||
262 | * Lock module top interface. GFS calls these functions when mounting or | ||
263 | * unmounting a file system. | ||
264 | */ | ||
265 | |||
266 | int gfs2_mount_lockproto(char *proto_name, char *table_name, char *host_data, | ||
267 | lm_callback_t cb, void *cb_data, | ||
268 | unsigned int min_lvb_size, int flags, | ||
269 | struct lm_lockstruct *lockstruct, | ||
270 | struct kobject *fskobj); | ||
271 | |||
272 | void gfs2_unmount_lockproto(struct lm_lockstruct *lockstruct); | ||
273 | |||
274 | void gfs2_withdraw_lockproto(struct lm_lockstruct *lockstruct); | ||
275 | |||
276 | #endif /* __LM_INTERFACE_DOT_H__ */ | ||
277 | |||
diff --git a/include/linux/maple.h b/include/linux/maple.h index c23d3f51ba40..d9a51b9b3300 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h | |||
@@ -8,33 +8,49 @@ extern struct bus_type maple_bus_type; | |||
8 | 8 | ||
9 | /* Maple Bus command and response codes */ | 9 | /* Maple Bus command and response codes */ |
10 | enum maple_code { | 10 | enum maple_code { |
11 | MAPLE_RESPONSE_FILEERR = -5, | 11 | MAPLE_RESPONSE_FILEERR = -5, |
12 | MAPLE_RESPONSE_AGAIN = -4, /* request should be retransmitted */ | 12 | MAPLE_RESPONSE_AGAIN, /* retransmit */ |
13 | MAPLE_RESPONSE_BADCMD = -3, | 13 | MAPLE_RESPONSE_BADCMD, |
14 | MAPLE_RESPONSE_BADFUNC = -2, | 14 | MAPLE_RESPONSE_BADFUNC, |
15 | MAPLE_RESPONSE_NONE = -1, /* unit didn't respond at all */ | 15 | MAPLE_RESPONSE_NONE, /* unit didn't respond*/ |
16 | MAPLE_COMMAND_DEVINFO = 1, | 16 | MAPLE_COMMAND_DEVINFO = 1, |
17 | MAPLE_COMMAND_ALLINFO = 2, | 17 | MAPLE_COMMAND_ALLINFO, |
18 | MAPLE_COMMAND_RESET = 3, | 18 | MAPLE_COMMAND_RESET, |
19 | MAPLE_COMMAND_KILL = 4, | 19 | MAPLE_COMMAND_KILL, |
20 | MAPLE_RESPONSE_DEVINFO = 5, | 20 | MAPLE_RESPONSE_DEVINFO, |
21 | MAPLE_RESPONSE_ALLINFO = 6, | 21 | MAPLE_RESPONSE_ALLINFO, |
22 | MAPLE_RESPONSE_OK = 7, | 22 | MAPLE_RESPONSE_OK, |
23 | MAPLE_RESPONSE_DATATRF = 8, | 23 | MAPLE_RESPONSE_DATATRF, |
24 | MAPLE_COMMAND_GETCOND = 9, | 24 | MAPLE_COMMAND_GETCOND, |
25 | MAPLE_COMMAND_GETMINFO = 10, | 25 | MAPLE_COMMAND_GETMINFO, |
26 | MAPLE_COMMAND_BREAD = 11, | 26 | MAPLE_COMMAND_BREAD, |
27 | MAPLE_COMMAND_BWRITE = 12, | 27 | MAPLE_COMMAND_BWRITE, |
28 | MAPLE_COMMAND_SETCOND = 14 | 28 | MAPLE_COMMAND_BSYNC, |
29 | MAPLE_COMMAND_SETCOND, | ||
30 | MAPLE_COMMAND_MICCONTROL | ||
31 | }; | ||
32 | |||
33 | enum maple_file_errors { | ||
34 | MAPLE_FILEERR_INVALID_PARTITION = 0x01000000, | ||
35 | MAPLE_FILEERR_PHASE_ERROR = 0x02000000, | ||
36 | MAPLE_FILEERR_INVALID_BLOCK = 0x04000000, | ||
37 | MAPLE_FILEERR_WRITE_ERROR = 0x08000000, | ||
38 | MAPLE_FILEERR_INVALID_WRITE_LENGTH = 0x10000000, | ||
39 | MAPLE_FILEERR_BAD_CRC = 0x20000000 | ||
40 | }; | ||
41 | |||
42 | struct maple_buffer { | ||
43 | char bufx[0x400]; | ||
44 | void *buf; | ||
29 | }; | 45 | }; |
30 | 46 | ||
31 | struct mapleq { | 47 | struct mapleq { |
32 | struct list_head list; | 48 | struct list_head list; |
33 | struct maple_device *dev; | 49 | struct maple_device *dev; |
34 | void *sendbuf, *recvbuf, *recvbufdcsp; | 50 | struct maple_buffer *recvbuf; |
51 | void *sendbuf, *recvbuf_p2; | ||
35 | unsigned char length; | 52 | unsigned char length; |
36 | enum maple_code command; | 53 | enum maple_code command; |
37 | struct mutex mutex; | ||
38 | }; | 54 | }; |
39 | 55 | ||
40 | struct maple_devinfo { | 56 | struct maple_devinfo { |
@@ -52,11 +68,15 @@ struct maple_device { | |||
52 | struct maple_driver *driver; | 68 | struct maple_driver *driver; |
53 | struct mapleq *mq; | 69 | struct mapleq *mq; |
54 | void (*callback) (struct mapleq * mq); | 70 | void (*callback) (struct mapleq * mq); |
71 | void (*fileerr_handler)(struct maple_device *mdev, void *recvbuf); | ||
72 | int (*can_unload)(struct maple_device *mdev); | ||
55 | unsigned long when, interval, function; | 73 | unsigned long when, interval, function; |
56 | struct maple_devinfo devinfo; | 74 | struct maple_devinfo devinfo; |
57 | unsigned char port, unit; | 75 | unsigned char port, unit; |
58 | char product_name[32]; | 76 | char product_name[32]; |
59 | char product_licence[64]; | 77 | char product_licence[64]; |
78 | atomic_t busy; | ||
79 | wait_queue_head_t maple_wait; | ||
60 | struct device dev; | 80 | struct device dev; |
61 | }; | 81 | }; |
62 | 82 | ||
@@ -72,7 +92,7 @@ void maple_getcond_callback(struct maple_device *dev, | |||
72 | int maple_driver_register(struct maple_driver *); | 92 | int maple_driver_register(struct maple_driver *); |
73 | void maple_driver_unregister(struct maple_driver *); | 93 | void maple_driver_unregister(struct maple_driver *); |
74 | 94 | ||
75 | int maple_add_packet_sleeps(struct maple_device *mdev, u32 function, | 95 | int maple_add_packet(struct maple_device *mdev, u32 function, |
76 | u32 command, u32 length, void *data); | 96 | u32 command, u32 length, void *data); |
77 | void maple_clear_dev(struct maple_device *mdev); | 97 | void maple_clear_dev(struct maple_device *mdev); |
78 | 98 | ||
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index af95a1d2f3a1..d899dc0223ba 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
@@ -490,6 +490,7 @@ | |||
490 | /* | 490 | /* |
491 | * R231 (0xE7) - Jack Status | 491 | * R231 (0xE7) - Jack Status |
492 | */ | 492 | */ |
493 | #define WM8350_JACK_L_LVL 0x0800 | ||
493 | #define WM8350_JACK_R_LVL 0x0400 | 494 | #define WM8350_JACK_R_LVL 0x0400 |
494 | 495 | ||
495 | /* | 496 | /* |
diff --git a/include/linux/mfd/wm8400-audio.h b/include/linux/mfd/wm8400-audio.h index b6640e018046..e06ed3eb1d0a 100644 --- a/include/linux/mfd/wm8400-audio.h +++ b/include/linux/mfd/wm8400-audio.h | |||
@@ -1181,6 +1181,7 @@ | |||
1181 | #define WM8400_FLL_OUTDIV_SHIFT 0 /* FLL_OUTDIV - [2:0] */ | 1181 | #define WM8400_FLL_OUTDIV_SHIFT 0 /* FLL_OUTDIV - [2:0] */ |
1182 | #define WM8400_FLL_OUTDIV_WIDTH 3 /* FLL_OUTDIV - [2:0] */ | 1182 | #define WM8400_FLL_OUTDIV_WIDTH 3 /* FLL_OUTDIV - [2:0] */ |
1183 | 1183 | ||
1184 | struct wm8400; | ||
1184 | void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400); | 1185 | void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400); |
1185 | 1186 | ||
1186 | #endif | 1187 | #endif |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index fde86671f48f..1bf5900ffe43 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -454,4 +454,13 @@ struct dmi_system_id { | |||
454 | 454 | ||
455 | #define DMI_MATCH(a, b) { a, b } | 455 | #define DMI_MATCH(a, b) { a, b } |
456 | 456 | ||
457 | #define PLATFORM_NAME_SIZE 20 | ||
458 | #define PLATFORM_MODULE_PREFIX "platform:" | ||
459 | |||
460 | struct platform_device_id { | ||
461 | char name[PLATFORM_NAME_SIZE]; | ||
462 | kernel_ulong_t driver_data | ||
463 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
464 | }; | ||
465 | |||
457 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 466 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index cab2a85e2ee8..51f55f903aff 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -27,6 +27,7 @@ struct mnt_namespace; | |||
27 | #define MNT_NODIRATIME 0x10 | 27 | #define MNT_NODIRATIME 0x10 |
28 | #define MNT_RELATIME 0x20 | 28 | #define MNT_RELATIME 0x20 |
29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ | 29 | #define MNT_READONLY 0x40 /* does the user want this to be r/o? */ |
30 | #define MNT_STRICTATIME 0x80 | ||
30 | 31 | ||
31 | #define MNT_SHRINKABLE 0x100 | 32 | #define MNT_SHRINKABLE 0x100 |
32 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ | 33 | #define MNT_IMBALANCED_WRITE_COUNT 0x200 /* just for debugging */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index aca8c458aa8a..02c18b903986 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2112,6 +2112,8 @@ | |||
2112 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c | 2112 | #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c |
2113 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 | 2113 | #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274 |
2114 | 2114 | ||
2115 | #define PCI_VENDOR_ID_DFI 0x15bd | ||
2116 | |||
2115 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 | 2117 | #define PCI_VENDOR_ID_QUICKNET 0x15e2 |
2116 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 | 2118 | #define PCI_DEVICE_ID_QUICKNET_XJ 0x0500 |
2117 | 2119 | ||
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 9a342699c607..76e470a299bf 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define _PLATFORM_DEVICE_H_ | 12 | #define _PLATFORM_DEVICE_H_ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/mod_devicetable.h> | ||
15 | 16 | ||
16 | struct platform_device { | 17 | struct platform_device { |
17 | const char * name; | 18 | const char * name; |
@@ -19,8 +20,13 @@ struct platform_device { | |||
19 | struct device dev; | 20 | struct device dev; |
20 | u32 num_resources; | 21 | u32 num_resources; |
21 | struct resource * resource; | 22 | struct resource * resource; |
23 | void *platform_data; | ||
24 | |||
25 | struct platform_device_id *id_entry; | ||
22 | }; | 26 | }; |
23 | 27 | ||
28 | #define platform_get_device_id(pdev) ((pdev)->id_entry) | ||
29 | |||
24 | #define to_platform_device(x) container_of((x), struct platform_device, dev) | 30 | #define to_platform_device(x) container_of((x), struct platform_device, dev) |
25 | 31 | ||
26 | extern int platform_device_register(struct platform_device *); | 32 | extern int platform_device_register(struct platform_device *); |
@@ -56,6 +62,7 @@ struct platform_driver { | |||
56 | int (*resume_early)(struct platform_device *); | 62 | int (*resume_early)(struct platform_device *); |
57 | int (*resume)(struct platform_device *); | 63 | int (*resume)(struct platform_device *); |
58 | struct device_driver driver; | 64 | struct device_driver driver; |
65 | struct platform_device_id *id_table; | ||
59 | }; | 66 | }; |
60 | 67 | ||
61 | extern int platform_driver_register(struct platform_driver *); | 68 | extern int platform_driver_register(struct platform_driver *); |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 24ba5f67b3a3..1d4e2d289821 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -400,6 +400,9 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
400 | 400 | ||
401 | #else /* !CONFIG_PM_SLEEP */ | 401 | #else /* !CONFIG_PM_SLEEP */ |
402 | 402 | ||
403 | #define device_pm_lock() do {} while (0) | ||
404 | #define device_pm_unlock() do {} while (0) | ||
405 | |||
403 | static inline int device_suspend(pm_message_t state) | 406 | static inline int device_suspend(pm_message_t state) |
404 | { | 407 | { |
405 | return 0; | 408 | return 0; |
@@ -409,6 +412,14 @@ static inline int device_suspend(pm_message_t state) | |||
409 | 412 | ||
410 | #endif /* !CONFIG_PM_SLEEP */ | 413 | #endif /* !CONFIG_PM_SLEEP */ |
411 | 414 | ||
415 | /* How to reorder dpm_list after device_move() */ | ||
416 | enum dpm_order { | ||
417 | DPM_ORDER_NONE, | ||
418 | DPM_ORDER_DEV_AFTER_PARENT, | ||
419 | DPM_ORDER_PARENT_BEFORE_DEV, | ||
420 | DPM_ORDER_DEV_LAST, | ||
421 | }; | ||
422 | |||
412 | /* | 423 | /* |
413 | * Global Power Management flags | 424 | * Global Power Management flags |
414 | * Used to keep APM and ACPI from both being active | 425 | * Used to keep APM and ACPI from both being active |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 011db2f4c94c..2c36f62e7544 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1175,6 +1175,8 @@ struct task_struct { | |||
1175 | /* ??? */ | 1175 | /* ??? */ |
1176 | unsigned int personality; | 1176 | unsigned int personality; |
1177 | unsigned did_exec:1; | 1177 | unsigned did_exec:1; |
1178 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | ||
1179 | * execve */ | ||
1178 | pid_t pid; | 1180 | pid_t pid; |
1179 | pid_t tgid; | 1181 | pid_t tgid; |
1180 | 1182 | ||
diff --git a/include/linux/sh_cmt.h b/include/linux/sh_cmt.h new file mode 100644 index 000000000000..68cacde5954f --- /dev/null +++ b/include/linux/sh_cmt.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __SH_CMT_H__ | ||
2 | #define __SH_CMT_H__ | ||
3 | |||
4 | struct sh_cmt_config { | ||
5 | char *name; | ||
6 | unsigned long channel_offset; | ||
7 | int timer_bit; | ||
8 | char *clk; | ||
9 | unsigned long clockevent_rating; | ||
10 | unsigned long clocksource_rating; | ||
11 | }; | ||
12 | |||
13 | #endif /* __SH_CMT_H__ */ | ||
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 68e212ff9dde..eb1423a0078d 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -85,6 +85,7 @@ struct intc_desc symbol __initdata = { \ | |||
85 | } | 85 | } |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | unsigned int intc_evt2irq(unsigned int vector); | ||
88 | void __init register_intc_controller(struct intc_desc *desc); | 89 | void __init register_intc_controller(struct intc_desc *desc); |
89 | int intc_set_priority(unsigned int irq, unsigned int prio); | 90 | int intc_set_priority(unsigned int irq, unsigned int prio); |
90 | 91 | ||
diff --git a/include/linux/timeriomem-rng.h b/include/linux/timeriomem-rng.h new file mode 100644 index 000000000000..dd253177f65f --- /dev/null +++ b/include/linux/timeriomem-rng.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * linux/include/linux/timeriomem-rng.h | ||
3 | * | ||
4 | * Copyright (c) 2009 Alexander Clouter <alex@digriz.org.uk> | ||
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 | #include <linux/completion.h> | ||
12 | |||
13 | struct timeriomem_rng_data { | ||
14 | struct completion completion; | ||
15 | unsigned int present:1; | ||
16 | |||
17 | u32 __iomem *address; | ||
18 | |||
19 | /* measures in usecs */ | ||
20 | unsigned int period; | ||
21 | }; | ||
diff --git a/include/linux/tpm.h b/include/linux/tpm.h new file mode 100644 index 000000000000..3338b3f5c21a --- /dev/null +++ b/include/linux/tpm.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004,2007,2008 IBM Corporation | ||
3 | * | ||
4 | * Authors: | ||
5 | * Leendert van Doorn <leendert@watson.ibm.com> | ||
6 | * Dave Safford <safford@watson.ibm.com> | ||
7 | * Reiner Sailer <sailer@watson.ibm.com> | ||
8 | * Kylene Hall <kjhall@us.ibm.com> | ||
9 | * Debora Velarde <dvelarde@us.ibm.com> | ||
10 | * | ||
11 | * Maintained by: <tpmdd_devel@lists.sourceforge.net> | ||
12 | * | ||
13 | * Device driver for TCG/TCPA TPM (trusted platform module). | ||
14 | * Specifications at www.trustedcomputinggroup.org | ||
15 | * | ||
16 | * This program is free software; you can redistribute it and/or | ||
17 | * modify it under the terms of the GNU General Public License as | ||
18 | * published by the Free Software Foundation, version 2 of the | ||
19 | * License. | ||
20 | * | ||
21 | */ | ||
22 | #ifndef __LINUX_TPM_H__ | ||
23 | #define __LINUX_TPM_H__ | ||
24 | |||
25 | /* | ||
26 | * Chip num is this value or a valid tpm idx | ||
27 | */ | ||
28 | #define TPM_ANY_NUM 0xFFFF | ||
29 | |||
30 | #if defined(CONFIG_TCG_TPM) | ||
31 | |||
32 | extern int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf); | ||
33 | extern int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash); | ||
34 | #endif | ||
35 | #endif | ||
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index a0bb6bd2e5c1..5dcc9ff72f69 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
@@ -22,6 +22,7 @@ struct uio_map; | |||
22 | 22 | ||
23 | /** | 23 | /** |
24 | * struct uio_mem - description of a UIO memory region | 24 | * struct uio_mem - description of a UIO memory region |
25 | * @name: name of the memory region for identification | ||
25 | * @addr: address of the device's memory | 26 | * @addr: address of the device's memory |
26 | * @size: size of IO | 27 | * @size: size of IO |
27 | * @memtype: type of memory addr points to | 28 | * @memtype: type of memory addr points to |
@@ -29,6 +30,7 @@ struct uio_map; | |||
29 | * @map: for use by the UIO core only. | 30 | * @map: for use by the UIO core only. |
30 | */ | 31 | */ |
31 | struct uio_mem { | 32 | struct uio_mem { |
33 | const char *name; | ||
32 | unsigned long addr; | 34 | unsigned long addr; |
33 | unsigned long size; | 35 | unsigned long size; |
34 | int memtype; | 36 | int memtype; |
@@ -42,12 +44,14 @@ struct uio_portio; | |||
42 | 44 | ||
43 | /** | 45 | /** |
44 | * struct uio_port - description of a UIO port region | 46 | * struct uio_port - description of a UIO port region |
47 | * @name: name of the port region for identification | ||
45 | * @start: start of port region | 48 | * @start: start of port region |
46 | * @size: size of port region | 49 | * @size: size of port region |
47 | * @porttype: type of port (see UIO_PORT_* below) | 50 | * @porttype: type of port (see UIO_PORT_* below) |
48 | * @portio: for use by the UIO core only. | 51 | * @portio: for use by the UIO core only. |
49 | */ | 52 | */ |
50 | struct uio_port { | 53 | struct uio_port { |
54 | const char *name; | ||
51 | unsigned long start; | 55 | unsigned long start; |
52 | unsigned long size; | 56 | unsigned long size; |
53 | int porttype; | 57 | int porttype; |
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index ba0c49399a83..c703e0340423 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
@@ -178,7 +178,7 @@ void __d_head(char *head, size_t head_size, | |||
178 | WARN_ON(1); | 178 | WARN_ON(1); |
179 | } else | 179 | } else |
180 | snprintf(head, head_size, "%s %s: ", | 180 | snprintf(head, head_size, "%s %s: ", |
181 | dev_driver_string(dev), dev->bus_id); | 181 | dev_driver_string(dev), dev_name(dev)); |
182 | } | 182 | } |
183 | 183 | ||
184 | 184 | ||
diff --git a/include/sound/ad1816a.h b/include/sound/ad1816a.h index b3aa62ee3c8d..d010858c33c2 100644 --- a/include/sound/ad1816a.h +++ b/include/sound/ad1816a.h | |||
@@ -169,5 +169,7 @@ extern int snd_ad1816a_create(struct snd_card *card, unsigned long port, | |||
169 | 169 | ||
170 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); | 170 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); |
171 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); | 171 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); |
172 | extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, | ||
173 | struct snd_timer **rtimer); | ||
172 | 174 | ||
173 | #endif /* __SOUND_AD1816A_H */ | 175 | #endif /* __SOUND_AD1816A_H */ |
diff --git a/include/sound/asound.h b/include/sound/asound.h index 1c02ed1d7c4a..fad3e0c7b932 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -126,12 +126,10 @@ struct snd_hwdep_dsp_image { | |||
126 | unsigned long driver_data; /* W: driver-specific data */ | 126 | unsigned long driver_data; /* W: driver-specific data */ |
127 | }; | 127 | }; |
128 | 128 | ||
129 | enum { | 129 | #define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int) |
130 | SNDRV_HWDEP_IOCTL_PVERSION = _IOR ('H', 0x00, int), | 130 | #define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info) |
131 | SNDRV_HWDEP_IOCTL_INFO = _IOR ('H', 0x01, struct snd_hwdep_info), | 131 | #define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status) |
132 | SNDRV_HWDEP_IOCTL_DSP_STATUS = _IOR('H', 0x02, struct snd_hwdep_dsp_status), | 132 | #define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) |
133 | SNDRV_HWDEP_IOCTL_DSP_LOAD = _IOW('H', 0x03, struct snd_hwdep_dsp_image) | ||
134 | }; | ||
135 | 133 | ||
136 | /***************************************************************************** | 134 | /***************************************************************************** |
137 | * * | 135 | * * |
@@ -451,40 +449,35 @@ enum { | |||
451 | SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, | 449 | SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, |
452 | }; | 450 | }; |
453 | 451 | ||
454 | enum { | 452 | #define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) |
455 | SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int), | 453 | #define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) |
456 | SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct snd_pcm_info), | 454 | #define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) |
457 | SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int), | 455 | #define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int) |
458 | SNDRV_PCM_IOCTL_TTSTAMP = _IOW('A', 0x03, int), | 456 | #define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params) |
459 | SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct snd_pcm_hw_params), | 457 | #define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params) |
460 | SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct snd_pcm_hw_params), | 458 | #define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12) |
461 | SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12), | 459 | #define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params) |
462 | SNDRV_PCM_IOCTL_SW_PARAMS = _IOWR('A', 0x13, struct snd_pcm_sw_params), | 460 | #define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status) |
463 | SNDRV_PCM_IOCTL_STATUS = _IOR('A', 0x20, struct snd_pcm_status), | 461 | #define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) |
464 | SNDRV_PCM_IOCTL_DELAY = _IOR('A', 0x21, snd_pcm_sframes_t), | 462 | #define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) |
465 | SNDRV_PCM_IOCTL_HWSYNC = _IO('A', 0x22), | 463 | #define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) |
466 | SNDRV_PCM_IOCTL_SYNC_PTR = _IOWR('A', 0x23, struct snd_pcm_sync_ptr), | 464 | #define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) |
467 | SNDRV_PCM_IOCTL_CHANNEL_INFO = _IOR('A', 0x32, struct snd_pcm_channel_info), | 465 | #define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) |
468 | SNDRV_PCM_IOCTL_PREPARE = _IO('A', 0x40), | 466 | #define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) |
469 | SNDRV_PCM_IOCTL_RESET = _IO('A', 0x41), | 467 | #define SNDRV_PCM_IOCTL_START _IO('A', 0x42) |
470 | SNDRV_PCM_IOCTL_START = _IO('A', 0x42), | 468 | #define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43) |
471 | SNDRV_PCM_IOCTL_DROP = _IO('A', 0x43), | 469 | #define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44) |
472 | SNDRV_PCM_IOCTL_DRAIN = _IO('A', 0x44), | 470 | #define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int) |
473 | SNDRV_PCM_IOCTL_PAUSE = _IOW('A', 0x45, int), | 471 | #define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t) |
474 | SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, snd_pcm_uframes_t), | 472 | #define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47) |
475 | SNDRV_PCM_IOCTL_RESUME = _IO('A', 0x47), | 473 | #define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48) |
476 | SNDRV_PCM_IOCTL_XRUN = _IO('A', 0x48), | 474 | #define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t) |
477 | SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, snd_pcm_uframes_t), | 475 | #define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi) |
478 | SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct snd_xferi), | 476 | #define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi) |
479 | SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct snd_xferi), | 477 | #define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern) |
480 | SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct snd_xfern), | 478 | #define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern) |
481 | SNDRV_PCM_IOCTL_READN_FRAMES = _IOR('A', 0x53, struct snd_xfern), | 479 | #define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int) |
482 | SNDRV_PCM_IOCTL_LINK = _IOW('A', 0x60, int), | 480 | #define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) |
483 | SNDRV_PCM_IOCTL_UNLINK = _IO('A', 0x61), | ||
484 | }; | ||
485 | |||
486 | /* Trick to make alsa-lib/acinclude.m4 happy */ | ||
487 | #define SNDRV_PCM_IOCTL_REWIND SNDRV_PCM_IOCTL_REWIND | ||
488 | 481 | ||
489 | /***************************************************************************** | 482 | /***************************************************************************** |
490 | * * | 483 | * * |
@@ -538,14 +531,12 @@ struct snd_rawmidi_status { | |||
538 | unsigned char reserved[16]; /* reserved for future use */ | 531 | unsigned char reserved[16]; /* reserved for future use */ |
539 | }; | 532 | }; |
540 | 533 | ||
541 | enum { | 534 | #define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int) |
542 | SNDRV_RAWMIDI_IOCTL_PVERSION = _IOR('W', 0x00, int), | 535 | #define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info) |
543 | SNDRV_RAWMIDI_IOCTL_INFO = _IOR('W', 0x01, struct snd_rawmidi_info), | 536 | #define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params) |
544 | SNDRV_RAWMIDI_IOCTL_PARAMS = _IOWR('W', 0x10, struct snd_rawmidi_params), | 537 | #define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status) |
545 | SNDRV_RAWMIDI_IOCTL_STATUS = _IOWR('W', 0x20, struct snd_rawmidi_status), | 538 | #define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int) |
546 | SNDRV_RAWMIDI_IOCTL_DROP = _IOW('W', 0x30, int), | 539 | #define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int) |
547 | SNDRV_RAWMIDI_IOCTL_DRAIN = _IOW('W', 0x31, int), | ||
548 | }; | ||
549 | 540 | ||
550 | /* | 541 | /* |
551 | * Timer section - /dev/snd/timer | 542 | * Timer section - /dev/snd/timer |
@@ -654,23 +645,21 @@ struct snd_timer_status { | |||
654 | unsigned char reserved[64]; /* reserved */ | 645 | unsigned char reserved[64]; /* reserved */ |
655 | }; | 646 | }; |
656 | 647 | ||
657 | enum { | 648 | #define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int) |
658 | SNDRV_TIMER_IOCTL_PVERSION = _IOR('T', 0x00, int), | 649 | #define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id) |
659 | SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct snd_timer_id), | 650 | #define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int) |
660 | SNDRV_TIMER_IOCTL_TREAD = _IOW('T', 0x02, int), | 651 | #define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo) |
661 | SNDRV_TIMER_IOCTL_GINFO = _IOWR('T', 0x03, struct snd_timer_ginfo), | 652 | #define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams) |
662 | SNDRV_TIMER_IOCTL_GPARAMS = _IOW('T', 0x04, struct snd_timer_gparams), | 653 | #define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus) |
663 | SNDRV_TIMER_IOCTL_GSTATUS = _IOWR('T', 0x05, struct snd_timer_gstatus), | 654 | #define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select) |
664 | SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct snd_timer_select), | 655 | #define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info) |
665 | SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct snd_timer_info), | 656 | #define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params) |
666 | SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct snd_timer_params), | 657 | #define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status) |
667 | SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct snd_timer_status), | 658 | /* The following four ioctls are changed since 1.0.9 due to confliction */ |
668 | /* The following four ioctls are changed since 1.0.9 due to confliction */ | 659 | #define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0) |
669 | SNDRV_TIMER_IOCTL_START = _IO('T', 0xa0), | 660 | #define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1) |
670 | SNDRV_TIMER_IOCTL_STOP = _IO('T', 0xa1), | 661 | #define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2) |
671 | SNDRV_TIMER_IOCTL_CONTINUE = _IO('T', 0xa2), | 662 | #define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3) |
672 | SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0xa3), | ||
673 | }; | ||
674 | 663 | ||
675 | struct snd_timer_read { | 664 | struct snd_timer_read { |
676 | unsigned int resolution; | 665 | unsigned int resolution; |
@@ -847,33 +836,31 @@ struct snd_ctl_tlv { | |||
847 | unsigned int tlv[0]; /* first TLV */ | 836 | unsigned int tlv[0]; /* first TLV */ |
848 | }; | 837 | }; |
849 | 838 | ||
850 | enum { | 839 | #define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) |
851 | SNDRV_CTL_IOCTL_PVERSION = _IOR('U', 0x00, int), | 840 | #define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info) |
852 | SNDRV_CTL_IOCTL_CARD_INFO = _IOR('U', 0x01, struct snd_ctl_card_info), | 841 | #define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list) |
853 | SNDRV_CTL_IOCTL_ELEM_LIST = _IOWR('U', 0x10, struct snd_ctl_elem_list), | 842 | #define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info) |
854 | SNDRV_CTL_IOCTL_ELEM_INFO = _IOWR('U', 0x11, struct snd_ctl_elem_info), | 843 | #define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value) |
855 | SNDRV_CTL_IOCTL_ELEM_READ = _IOWR('U', 0x12, struct snd_ctl_elem_value), | 844 | #define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value) |
856 | SNDRV_CTL_IOCTL_ELEM_WRITE = _IOWR('U', 0x13, struct snd_ctl_elem_value), | 845 | #define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id) |
857 | SNDRV_CTL_IOCTL_ELEM_LOCK = _IOW('U', 0x14, struct snd_ctl_elem_id), | 846 | #define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id) |
858 | SNDRV_CTL_IOCTL_ELEM_UNLOCK = _IOW('U', 0x15, struct snd_ctl_elem_id), | 847 | #define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int) |
859 | SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS = _IOWR('U', 0x16, int), | 848 | #define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info) |
860 | SNDRV_CTL_IOCTL_ELEM_ADD = _IOWR('U', 0x17, struct snd_ctl_elem_info), | 849 | #define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info) |
861 | SNDRV_CTL_IOCTL_ELEM_REPLACE = _IOWR('U', 0x18, struct snd_ctl_elem_info), | 850 | #define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id) |
862 | SNDRV_CTL_IOCTL_ELEM_REMOVE = _IOWR('U', 0x19, struct snd_ctl_elem_id), | 851 | #define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv) |
863 | SNDRV_CTL_IOCTL_TLV_READ = _IOWR('U', 0x1a, struct snd_ctl_tlv), | 852 | #define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv) |
864 | SNDRV_CTL_IOCTL_TLV_WRITE = _IOWR('U', 0x1b, struct snd_ctl_tlv), | 853 | #define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv) |
865 | SNDRV_CTL_IOCTL_TLV_COMMAND = _IOWR('U', 0x1c, struct snd_ctl_tlv), | 854 | #define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int) |
866 | SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE = _IOWR('U', 0x20, int), | 855 | #define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info) |
867 | SNDRV_CTL_IOCTL_HWDEP_INFO = _IOR('U', 0x21, struct snd_hwdep_info), | 856 | #define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int) |
868 | SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE = _IOR('U', 0x30, int), | 857 | #define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info) |
869 | SNDRV_CTL_IOCTL_PCM_INFO = _IOWR('U', 0x31, struct snd_pcm_info), | 858 | #define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int) |
870 | SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE = _IOW('U', 0x32, int), | 859 | #define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) |
871 | SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE = _IOWR('U', 0x40, int), | 860 | #define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info) |
872 | SNDRV_CTL_IOCTL_RAWMIDI_INFO = _IOWR('U', 0x41, struct snd_rawmidi_info), | 861 | #define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) |
873 | SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE = _IOW('U', 0x42, int), | 862 | #define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) |
874 | SNDRV_CTL_IOCTL_POWER = _IOWR('U', 0xd0, int), | 863 | #define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) |
875 | SNDRV_CTL_IOCTL_POWER_STATE = _IOR('U', 0xd1, int), | ||
876 | }; | ||
877 | 864 | ||
878 | /* | 865 | /* |
879 | * Read interface. | 866 | * Read interface. |
@@ -919,18 +906,4 @@ struct snd_ctl_event { | |||
919 | #define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" | 906 | #define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" |
920 | #define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what | 907 | #define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what |
921 | 908 | ||
922 | /* | ||
923 | * | ||
924 | */ | ||
925 | |||
926 | struct snd_xferv { | ||
927 | const struct iovec *vector; | ||
928 | unsigned long count; | ||
929 | }; | ||
930 | |||
931 | enum { | ||
932 | SNDRV_IOCTL_READV = _IOW('K', 0x00, struct snd_xferv), | ||
933 | SNDRV_IOCTL_WRITEV = _IOW('K', 0x01, struct snd_xferv), | ||
934 | }; | ||
935 | |||
936 | #endif /* __SOUND_ASOUND_H */ | 909 | #endif /* __SOUND_ASOUND_H */ |
diff --git a/include/sound/atmel-abdac.h b/include/sound/atmel-abdac.h new file mode 100644 index 000000000000..edff6a8ba1b5 --- /dev/null +++ b/include/sound/atmel-abdac.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Driver for the Atmel Audio Bitstream DAC (ABDAC) | ||
3 | * | ||
4 | * Copyright (C) 2009 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __INCLUDE_SOUND_ATMEL_ABDAC_H | ||
11 | #define __INCLUDE_SOUND_ATMEL_ABDAC_H | ||
12 | |||
13 | #include <linux/dw_dmac.h> | ||
14 | |||
15 | /** | ||
16 | * struct atmel_abdac_pdata - board specific ABDAC configuration | ||
17 | * @dws: DMA slave interface to use for sound playback. | ||
18 | */ | ||
19 | struct atmel_abdac_pdata { | ||
20 | struct dw_dma_slave dws; | ||
21 | }; | ||
22 | |||
23 | #endif /* __INCLUDE_SOUND_ATMEL_ABDAC_H */ | ||
diff --git a/include/sound/atmel-ac97c.h b/include/sound/atmel-ac97c.h new file mode 100644 index 000000000000..e6aabdb45865 --- /dev/null +++ b/include/sound/atmel-ac97c.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Driver for the Atmel AC97C controller | ||
3 | * | ||
4 | * Copyright (C) 2005-2009 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __INCLUDE_SOUND_ATMEL_AC97C_H | ||
11 | #define __INCLUDE_SOUND_ATMEL_AC97C_H | ||
12 | |||
13 | #include <linux/dw_dmac.h> | ||
14 | |||
15 | #define AC97C_CAPTURE 0x01 | ||
16 | #define AC97C_PLAYBACK 0x02 | ||
17 | #define AC97C_BOTH (AC97C_CAPTURE | AC97C_PLAYBACK) | ||
18 | |||
19 | /** | ||
20 | * struct atmel_ac97c_pdata - board specific AC97C configuration | ||
21 | * @rx_dws: DMA slave interface to use for sound capture. | ||
22 | * @tx_dws: DMA slave interface to use for sound playback. | ||
23 | * @reset_pin: GPIO pin wired to the reset input on the external AC97 codec, | ||
24 | * optional to use, set to -ENODEV if not in use. AC97 layer will | ||
25 | * try to do a software reset of the external codec anyway. | ||
26 | * @flags: Flags for which directions should be enabled. | ||
27 | * | ||
28 | * If the user do not want to use a DMA channel for playback or capture, i.e. | ||
29 | * only one feature is required on the board. The slave for playback or capture | ||
30 | * can be set to NULL. The AC97C driver will take use of this when setting up | ||
31 | * the sound streams. | ||
32 | */ | ||
33 | struct ac97c_platform_data { | ||
34 | struct dw_dma_slave rx_dws; | ||
35 | struct dw_dma_slave tx_dws; | ||
36 | unsigned int flags; | ||
37 | int reset_pin; | ||
38 | }; | ||
39 | |||
40 | #endif /* __INCLUDE_SOUND_ATMEL_AC97C_H */ | ||
diff --git a/include/sound/control.h b/include/sound/control.h index 4721b4bba053..ef96f07aa03b 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -171,6 +171,54 @@ int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, | |||
171 | */ | 171 | */ |
172 | struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, | 172 | struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, |
173 | const unsigned int *tlv); | 173 | const unsigned int *tlv); |
174 | int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave); | 174 | int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, |
175 | 175 | unsigned int flags); | |
176 | /* optional flags for slave */ | ||
177 | #define SND_CTL_SLAVE_NEED_UPDATE (1 << 0) | ||
178 | |||
179 | /** | ||
180 | * snd_ctl_add_slave - Add a virtual slave control | ||
181 | * @master: vmaster element | ||
182 | * @slave: slave element to add | ||
183 | * | ||
184 | * Add a virtual slave control to the given master element created via | ||
185 | * snd_ctl_create_virtual_master() beforehand. | ||
186 | * Returns zero if successful or a negative error code. | ||
187 | * | ||
188 | * All slaves must be the same type (returning the same information | ||
189 | * via info callback). The fucntion doesn't check it, so it's your | ||
190 | * responsibility. | ||
191 | * | ||
192 | * Also, some additional limitations: | ||
193 | * at most two channels, | ||
194 | * logarithmic volume control (dB level) thus no linear volume, | ||
195 | * master can only attenuate the volume without gain | ||
196 | */ | ||
197 | static inline int | ||
198 | snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) | ||
199 | { | ||
200 | return _snd_ctl_add_slave(master, slave, 0); | ||
201 | } | ||
202 | |||
203 | /** | ||
204 | * snd_ctl_add_slave_uncached - Add a virtual slave control | ||
205 | * @master: vmaster element | ||
206 | * @slave: slave element to add | ||
207 | * | ||
208 | * Add a virtual slave control to the given master. | ||
209 | * Unlike snd_ctl_add_slave(), the element added via this function | ||
210 | * is supposed to have volatile values, and get callback is called | ||
211 | * at each time quried from the master. | ||
212 | * | ||
213 | * When the control peeks the hardware values directly and the value | ||
214 | * can be changed by other means than the put callback of the element, | ||
215 | * this function should be used to keep the value always up-to-date. | ||
216 | */ | ||
217 | static inline int | ||
218 | snd_ctl_add_slave_uncached(struct snd_kcontrol *master, | ||
219 | struct snd_kcontrol *slave) | ||
220 | { | ||
221 | return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); | ||
222 | } | ||
223 | |||
176 | #endif /* __SOUND_CONTROL_H */ | 224 | #endif /* __SOUND_CONTROL_H */ |
diff --git a/include/sound/core.h b/include/sound/core.h index f632484bc743..3dea79829acc 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -97,9 +97,9 @@ struct snd_device { | |||
97 | 97 | ||
98 | struct snd_monitor_file { | 98 | struct snd_monitor_file { |
99 | struct file *file; | 99 | struct file *file; |
100 | struct snd_monitor_file *next; | ||
101 | const struct file_operations *disconnected_f_op; | 100 | const struct file_operations *disconnected_f_op; |
102 | struct list_head shutdown_list; | 101 | struct list_head shutdown_list; /* still need to shutdown */ |
102 | struct list_head list; /* link of monitor files */ | ||
103 | }; | 103 | }; |
104 | 104 | ||
105 | /* main structure for soundcard */ | 105 | /* main structure for soundcard */ |
@@ -134,7 +134,7 @@ struct snd_card { | |||
134 | struct snd_info_entry *proc_id; /* the card id */ | 134 | struct snd_info_entry *proc_id; /* the card id */ |
135 | struct proc_dir_entry *proc_root_link; /* number link to real id */ | 135 | struct proc_dir_entry *proc_root_link; /* number link to real id */ |
136 | 136 | ||
137 | struct snd_monitor_file *files; /* all files associated to this card */ | 137 | struct list_head files_list; /* all files associated to this card */ |
138 | struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown | 138 | struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown |
139 | state */ | 139 | state */ |
140 | spinlock_t files_lock; /* lock the files for this card */ | 140 | spinlock_t files_lock; /* lock the files for this card */ |
@@ -296,8 +296,20 @@ int snd_card_locked(int card); | |||
296 | extern int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int cmd); | 296 | extern int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int cmd); |
297 | #endif | 297 | #endif |
298 | 298 | ||
299 | int snd_card_create(int idx, const char *id, | ||
300 | struct module *module, int extra_size, | ||
301 | struct snd_card **card_ret); | ||
302 | |||
303 | static inline __deprecated | ||
299 | struct snd_card *snd_card_new(int idx, const char *id, | 304 | struct snd_card *snd_card_new(int idx, const char *id, |
300 | struct module *module, int extra_size); | 305 | struct module *module, int extra_size) |
306 | { | ||
307 | struct snd_card *card; | ||
308 | if (snd_card_create(idx, id, module, extra_size, &card) < 0) | ||
309 | return NULL; | ||
310 | return card; | ||
311 | } | ||
312 | |||
301 | int snd_card_disconnect(struct snd_card *card); | 313 | int snd_card_disconnect(struct snd_card *card); |
302 | int snd_card_free(struct snd_card *card); | 314 | int snd_card_free(struct snd_card *card); |
303 | int snd_card_free_when_closed(struct snd_card *card); | 315 | int snd_card_free_when_closed(struct snd_card *card); |
@@ -446,21 +458,33 @@ static inline int __snd_bug_on(int cond) | |||
446 | struct snd_pci_quirk { | 458 | struct snd_pci_quirk { |
447 | unsigned short subvendor; /* PCI subvendor ID */ | 459 | unsigned short subvendor; /* PCI subvendor ID */ |
448 | unsigned short subdevice; /* PCI subdevice ID */ | 460 | unsigned short subdevice; /* PCI subdevice ID */ |
461 | unsigned short subdevice_mask; /* bitmask to match */ | ||
449 | int value; /* value */ | 462 | int value; /* value */ |
450 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 463 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
451 | const char *name; /* name of the device (optional) */ | 464 | const char *name; /* name of the device (optional) */ |
452 | #endif | 465 | #endif |
453 | }; | 466 | }; |
454 | 467 | ||
455 | #define _SND_PCI_QUIRK_ID(vend,dev) \ | 468 | #define _SND_PCI_QUIRK_ID_MASK(vend, mask, dev) \ |
456 | .subvendor = (vend), .subdevice = (dev) | 469 | .subvendor = (vend), .subdevice = (dev), .subdevice_mask = (mask) |
470 | #define _SND_PCI_QUIRK_ID(vend, dev) \ | ||
471 | _SND_PCI_QUIRK_ID_MASK(vend, 0xffff, dev) | ||
457 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} | 472 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} |
458 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 473 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
459 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | 474 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ |
460 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} | 475 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} |
476 | #define SND_PCI_QUIRK_VENDOR(vend, xname, val) \ | ||
477 | {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val), .name = (xname)} | ||
478 | #define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \ | ||
479 | {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), \ | ||
480 | .value = (val), .name = (xname)} | ||
461 | #else | 481 | #else |
462 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | 482 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ |
463 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)} | 483 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)} |
484 | #define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \ | ||
485 | {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), .value = (val)} | ||
486 | #define SND_PCI_QUIRK_VENDOR(vend, xname, val) \ | ||
487 | {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)} | ||
464 | #endif | 488 | #endif |
465 | 489 | ||
466 | const struct snd_pci_quirk * | 490 | const struct snd_pci_quirk * |
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h index d9eea013c753..8c05e47a4090 100644 --- a/include/sound/hwdep.h +++ b/include/sound/hwdep.h | |||
@@ -27,18 +27,28 @@ | |||
27 | 27 | ||
28 | struct snd_hwdep; | 28 | struct snd_hwdep; |
29 | 29 | ||
30 | /* hwdep file ops; all ops can be NULL */ | ||
30 | struct snd_hwdep_ops { | 31 | struct snd_hwdep_ops { |
31 | long long (*llseek) (struct snd_hwdep *hw, struct file * file, long long offset, int orig); | 32 | long long (*llseek)(struct snd_hwdep *hw, struct file *file, |
32 | long (*read) (struct snd_hwdep *hw, char __user *buf, long count, loff_t *offset); | 33 | long long offset, int orig); |
33 | long (*write) (struct snd_hwdep *hw, const char __user *buf, long count, loff_t *offset); | 34 | long (*read)(struct snd_hwdep *hw, char __user *buf, |
34 | int (*open) (struct snd_hwdep * hw, struct file * file); | 35 | long count, loff_t *offset); |
35 | int (*release) (struct snd_hwdep *hw, struct file * file); | 36 | long (*write)(struct snd_hwdep *hw, const char __user *buf, |
36 | unsigned int (*poll) (struct snd_hwdep *hw, struct file * file, poll_table * wait); | 37 | long count, loff_t *offset); |
37 | int (*ioctl) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg); | 38 | int (*open)(struct snd_hwdep *hw, struct file * file); |
38 | int (*ioctl_compat) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg); | 39 | int (*release)(struct snd_hwdep *hw, struct file * file); |
39 | int (*mmap) (struct snd_hwdep *hw, struct file * file, struct vm_area_struct * vma); | 40 | unsigned int (*poll)(struct snd_hwdep *hw, struct file *file, |
40 | int (*dsp_status) (struct snd_hwdep *hw, struct snd_hwdep_dsp_status *status); | 41 | poll_table *wait); |
41 | int (*dsp_load) (struct snd_hwdep *hw, struct snd_hwdep_dsp_image *image); | 42 | int (*ioctl)(struct snd_hwdep *hw, struct file *file, |
43 | unsigned int cmd, unsigned long arg); | ||
44 | int (*ioctl_compat)(struct snd_hwdep *hw, struct file *file, | ||
45 | unsigned int cmd, unsigned long arg); | ||
46 | int (*mmap)(struct snd_hwdep *hw, struct file *file, | ||
47 | struct vm_area_struct *vma); | ||
48 | int (*dsp_status)(struct snd_hwdep *hw, | ||
49 | struct snd_hwdep_dsp_status *status); | ||
50 | int (*dsp_load)(struct snd_hwdep *hw, | ||
51 | struct snd_hwdep_dsp_image *image); | ||
42 | }; | 52 | }; |
43 | 53 | ||
44 | struct snd_hwdep { | 54 | struct snd_hwdep { |
@@ -61,9 +71,9 @@ struct snd_hwdep { | |||
61 | void (*private_free) (struct snd_hwdep *hwdep); | 71 | void (*private_free) (struct snd_hwdep *hwdep); |
62 | 72 | ||
63 | struct mutex open_mutex; | 73 | struct mutex open_mutex; |
64 | int used; | 74 | int used; /* reference counter */ |
65 | unsigned int dsp_loaded; | 75 | unsigned int dsp_loaded; /* bit fields of loaded dsp indices */ |
66 | unsigned int exclusive: 1; | 76 | unsigned int exclusive:1; /* exclusive access mode */ |
67 | }; | 77 | }; |
68 | 78 | ||
69 | extern int snd_hwdep_new(struct snd_card *card, char *id, int device, | 79 | extern int snd_hwdep_new(struct snd_card *card, char *id, int device, |
diff --git a/include/sound/jack.h b/include/sound/jack.h index 2e0315cdd0d6..6b013c6f6a04 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h | |||
@@ -30,6 +30,9 @@ struct input_dev; | |||
30 | /** | 30 | /** |
31 | * Jack types which can be reported. These values are used as a | 31 | * Jack types which can be reported. These values are used as a |
32 | * bitmask. | 32 | * bitmask. |
33 | * | ||
34 | * Note that this must be kept in sync with the lookup table in | ||
35 | * sound/core/jack.c. | ||
33 | */ | 36 | */ |
34 | enum snd_jack_types { | 37 | enum snd_jack_types { |
35 | SND_JACK_HEADPHONE = 0x0001, | 38 | SND_JACK_HEADPHONE = 0x0001, |
@@ -37,6 +40,8 @@ enum snd_jack_types { | |||
37 | SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE, | 40 | SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE, |
38 | SND_JACK_LINEOUT = 0x0004, | 41 | SND_JACK_LINEOUT = 0x0004, |
39 | SND_JACK_MECHANICAL = 0x0008, /* If detected separately */ | 42 | SND_JACK_MECHANICAL = 0x0008, /* If detected separately */ |
43 | SND_JACK_VIDEOOUT = 0x0010, | ||
44 | SND_JACK_AVOUT = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT, | ||
40 | }; | 45 | }; |
41 | 46 | ||
42 | struct snd_jack { | 47 | struct snd_jack { |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 40c5a6fa6bcd..8904b1900d7f 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -364,7 +364,6 @@ struct snd_pcm_substream { | |||
364 | /* -- timer section -- */ | 364 | /* -- timer section -- */ |
365 | struct snd_timer *timer; /* timer */ | 365 | struct snd_timer *timer; /* timer */ |
366 | unsigned timer_running: 1; /* time is running */ | 366 | unsigned timer_running: 1; /* time is running */ |
367 | spinlock_t timer_lock; | ||
368 | /* -- next substream -- */ | 367 | /* -- next substream -- */ |
369 | struct snd_pcm_substream *next; | 368 | struct snd_pcm_substream *next; |
370 | /* -- linked substreams -- */ | 369 | /* -- linked substreams -- */ |
@@ -451,7 +450,7 @@ struct snd_pcm_notify { | |||
451 | 450 | ||
452 | extern const struct file_operations snd_pcm_f_ops[2]; | 451 | extern const struct file_operations snd_pcm_f_ops[2]; |
453 | 452 | ||
454 | int snd_pcm_new(struct snd_card *card, char *id, int device, | 453 | int snd_pcm_new(struct snd_card *card, const char *id, int device, |
455 | int playback_count, int capture_count, | 454 | int playback_count, int capture_count, |
456 | struct snd_pcm **rpcm); | 455 | struct snd_pcm **rpcm); |
457 | int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count); | 456 | int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count); |
diff --git a/include/sound/pxa2xx-lib.h b/include/sound/pxa2xx-lib.h index 2fd3d251d9a5..2c894b600e5b 100644 --- a/include/sound/pxa2xx-lib.h +++ b/include/sound/pxa2xx-lib.h | |||
@@ -42,4 +42,19 @@ extern int pxa2xx_ac97_hw_resume(void); | |||
42 | extern int pxa2xx_ac97_hw_probe(struct platform_device *dev); | 42 | extern int pxa2xx_ac97_hw_probe(struct platform_device *dev); |
43 | extern void pxa2xx_ac97_hw_remove(struct platform_device *dev); | 43 | extern void pxa2xx_ac97_hw_remove(struct platform_device *dev); |
44 | 44 | ||
45 | /* AC97 platform_data */ | ||
46 | /** | ||
47 | * struct pxa2xx_ac97_platform_data - pxa ac97 platform data | ||
48 | * @reset_gpio: AC97 reset gpio (normally gpio113 or gpio95) | ||
49 | * a -1 value means no gpio will be used for reset | ||
50 | * | ||
51 | * Platform data should only be specified for pxa27x CPUs where a silicon bug | ||
52 | * prevents correct operation of the reset line. If not specified, the default | ||
53 | * behaviour is to consider gpio 113 as the AC97 reset line, which is the | ||
54 | * default on most boards. | ||
55 | */ | ||
56 | struct pxa2xx_ac97_platform_data { | ||
57 | int reset_gpio; | ||
58 | }; | ||
59 | |||
45 | #endif | 60 | #endif |
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h index b550a416d075..c23c26585700 100644 --- a/include/sound/rawmidi.h +++ b/include/sound/rawmidi.h | |||
@@ -42,7 +42,6 @@ | |||
42 | #define SNDRV_RAWMIDI_LFLG_INPUT (1<<1) | 42 | #define SNDRV_RAWMIDI_LFLG_INPUT (1<<1) |
43 | #define SNDRV_RAWMIDI_LFLG_OPEN (3<<0) | 43 | #define SNDRV_RAWMIDI_LFLG_OPEN (3<<0) |
44 | #define SNDRV_RAWMIDI_LFLG_APPEND (1<<2) | 44 | #define SNDRV_RAWMIDI_LFLG_APPEND (1<<2) |
45 | #define SNDRV_RAWMIDI_LFLG_NOOPENLOCK (1<<3) | ||
46 | 45 | ||
47 | struct snd_rawmidi; | 46 | struct snd_rawmidi; |
48 | struct snd_rawmidi_substream; | 47 | struct snd_rawmidi_substream; |
diff --git a/include/sound/sb.h b/include/sound/sb.h index 85f93c5fe1e4..4e62ee1e4115 100644 --- a/include/sound/sb.h +++ b/include/sound/sb.h | |||
@@ -249,6 +249,7 @@ struct snd_sb { | |||
249 | #define SB_ALS4000_3D_AUTO_MUTE 0x52 | 249 | #define SB_ALS4000_3D_AUTO_MUTE 0x52 |
250 | #define SB_ALS4000_ANALOG_BLOCK_CTRL 0x53 | 250 | #define SB_ALS4000_ANALOG_BLOCK_CTRL 0x53 |
251 | #define SB_ALS4000_3D_DELAYLINE_PATTERN 0x54 | 251 | #define SB_ALS4000_3D_DELAYLINE_PATTERN 0x54 |
252 | #define SB_ALS4000_CR3_CONFIGURATION 0xc3 /* bit 7 is Digital Loop Enable */ | ||
252 | #define SB_ALS4000_QSOUND 0xdb | 253 | #define SB_ALS4000_QSOUND 0xdb |
253 | 254 | ||
254 | /* IRQ setting bitmap */ | 255 | /* IRQ setting bitmap */ |
@@ -330,7 +331,8 @@ enum { | |||
330 | SB_MIX_DOUBLE, | 331 | SB_MIX_DOUBLE, |
331 | SB_MIX_INPUT_SW, | 332 | SB_MIX_INPUT_SW, |
332 | SB_MIX_CAPTURE_PRO, | 333 | SB_MIX_CAPTURE_PRO, |
333 | SB_MIX_CAPTURE_DT019X | 334 | SB_MIX_CAPTURE_DT019X, |
335 | SB_MIX_MONO_CAPTURE_ALS4K | ||
334 | }; | 336 | }; |
335 | 337 | ||
336 | #define SB_MIXVAL_DOUBLE(left_reg, right_reg, left_shift, right_shift, mask) \ | 338 | #define SB_MIXVAL_DOUBLE(left_reg, right_reg, left_shift, right_shift, mask) \ |
diff --git a/include/sound/sfnt_info.h b/include/sound/sfnt_info.h index 5d1ab9c4950f..1bce7fd1725f 100644 --- a/include/sound/sfnt_info.h +++ b/include/sound/sfnt_info.h | |||
@@ -202,13 +202,11 @@ struct snd_emux_misc_mode { | |||
202 | int value2; /* reserved */ | 202 | int value2; /* reserved */ |
203 | }; | 203 | }; |
204 | 204 | ||
205 | enum { | 205 | #define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int) |
206 | SNDRV_EMUX_IOCTL_VERSION = _IOR('H', 0x80, unsigned int), | 206 | #define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info) |
207 | SNDRV_EMUX_IOCTL_LOAD_PATCH = _IOWR('H', 0x81, struct soundfont_patch_info), | 207 | #define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82) |
208 | SNDRV_EMUX_IOCTL_RESET_SAMPLES = _IO('H', 0x82), | 208 | #define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83) |
209 | SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES = _IO('H', 0x83), | 209 | #define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int) |
210 | SNDRV_EMUX_IOCTL_MEM_AVAIL = _IOW('H', 0x84, int), | 210 | #define SNDRV_EMUX_IOCTL_MISC_MODE _IOWR('H', 0x84, struct snd_emux_misc_mode) |
211 | SNDRV_EMUX_IOCTL_MISC_MODE = _IOWR('H', 0x84, struct snd_emux_misc_mode), | ||
212 | }; | ||
213 | 211 | ||
214 | #endif /* __SOUND_SFNT_INFO_H */ | 212 | #endif /* __SOUND_SFNT_INFO_H */ |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 24247f763608..13676472ddfc 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -203,7 +203,7 @@ struct snd_soc_dai { | |||
203 | int (*resume)(struct snd_soc_dai *dai); | 203 | int (*resume)(struct snd_soc_dai *dai); |
204 | 204 | ||
205 | /* ops */ | 205 | /* ops */ |
206 | struct snd_soc_dai_ops ops; | 206 | struct snd_soc_dai_ops *ops; |
207 | 207 | ||
208 | /* DAI capabilities */ | 208 | /* DAI capabilities */ |
209 | struct snd_soc_pcm_stream capture; | 209 | struct snd_soc_pcm_stream capture; |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index dfa804958820..a7def6a9a030 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -76,6 +76,11 @@ | |||
76 | wcontrols, wncontrols)\ | 76 | wcontrols, wncontrols)\ |
77 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 77 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
78 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} | 78 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} |
79 | #define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ | ||
80 | wcontrols, wncontrols)\ | ||
81 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | ||
82 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | ||
83 | .num_kcontrols = wncontrols} | ||
79 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ | 84 | #define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ |
80 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 85 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
81 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} | 86 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} |
@@ -101,6 +106,11 @@ | |||
101 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | 106 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ |
102 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ | 107 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ |
103 | .event = wevent, .event_flags = wflags} | 108 | .event = wevent, .event_flags = wflags} |
109 | #define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ | ||
110 | wcontrols, wncontrols, wevent, wflags) \ | ||
111 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
112 | .invert = winvert, .kcontrols = wcontrols, \ | ||
113 | .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} | ||
104 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ | 114 | #define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ |
105 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ | 115 | { .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ |
106 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ | 116 | .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ |
@@ -182,6 +192,12 @@ | |||
182 | .get = snd_soc_dapm_get_value_enum_double, \ | 192 | .get = snd_soc_dapm_get_value_enum_double, \ |
183 | .put = snd_soc_dapm_put_value_enum_double, \ | 193 | .put = snd_soc_dapm_put_value_enum_double, \ |
184 | .private_value = (unsigned long)&xenum } | 194 | .private_value = (unsigned long)&xenum } |
195 | #define SOC_DAPM_PIN_SWITCH(xname) \ | ||
196 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname " Switch", \ | ||
197 | .info = snd_soc_dapm_info_pin_switch, \ | ||
198 | .get = snd_soc_dapm_get_pin_switch, \ | ||
199 | .put = snd_soc_dapm_put_pin_switch, \ | ||
200 | .private_value = (unsigned long)xname } | ||
185 | 201 | ||
186 | /* dapm stream operations */ | 202 | /* dapm stream operations */ |
187 | #define SND_SOC_DAPM_STREAM_NOP 0x0 | 203 | #define SND_SOC_DAPM_STREAM_NOP 0x0 |
@@ -228,6 +244,12 @@ int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, | |||
228 | struct snd_ctl_elem_value *ucontrol); | 244 | struct snd_ctl_elem_value *ucontrol); |
229 | int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, | 245 | int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, |
230 | struct snd_ctl_elem_value *ucontrol); | 246 | struct snd_ctl_elem_value *ucontrol); |
247 | int snd_soc_dapm_info_pin_switch(struct snd_kcontrol *kcontrol, | ||
248 | struct snd_ctl_elem_info *uinfo); | ||
249 | int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol, | ||
250 | struct snd_ctl_elem_value *uncontrol); | ||
251 | int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, | ||
252 | struct snd_ctl_elem_value *uncontrol); | ||
231 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, | 253 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, |
232 | const struct snd_soc_dapm_widget *widget); | 254 | const struct snd_soc_dapm_widget *widget); |
233 | int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, | 255 | int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, |
@@ -250,10 +272,10 @@ int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev, | |||
250 | int snd_soc_dapm_sys_add(struct device *dev); | 272 | int snd_soc_dapm_sys_add(struct device *dev); |
251 | 273 | ||
252 | /* dapm audio pin control and status */ | 274 | /* dapm audio pin control and status */ |
253 | int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, char *pin); | 275 | int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, const char *pin); |
254 | int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin); | 276 | int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, const char *pin); |
255 | int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, char *pin); | 277 | int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, const char *pin); |
256 | int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin); | 278 | int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, const char *pin); |
257 | int snd_soc_dapm_sync(struct snd_soc_codec *codec); | 279 | int snd_soc_dapm_sync(struct snd_soc_codec *codec); |
258 | 280 | ||
259 | /* dapm widget types */ | 281 | /* dapm widget types */ |
@@ -263,6 +285,7 @@ enum snd_soc_dapm_type { | |||
263 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ | 285 | snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */ |
264 | snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */ | 286 | snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */ |
265 | snd_soc_dapm_mixer, /* mixes several analog signals together */ | 287 | snd_soc_dapm_mixer, /* mixes several analog signals together */ |
288 | snd_soc_dapm_mixer_named_ctl, /* mixer with named controls */ | ||
266 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ | 289 | snd_soc_dapm_pga, /* programmable gain/attenuation (volume) */ |
267 | snd_soc_dapm_adc, /* analog to digital converter */ | 290 | snd_soc_dapm_adc, /* analog to digital converter */ |
268 | snd_soc_dapm_dac, /* digital to analog converter */ | 291 | snd_soc_dapm_dac, /* digital to analog converter */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 24593ac3ea19..a40bc6f316fc 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/kernel.h> | ||
19 | #include <sound/core.h> | 21 | #include <sound/core.h> |
20 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
21 | #include <sound/control.h> | 23 | #include <sound/control.h> |
@@ -154,6 +156,8 @@ enum snd_soc_bias_level { | |||
154 | SND_SOC_BIAS_OFF, | 156 | SND_SOC_BIAS_OFF, |
155 | }; | 157 | }; |
156 | 158 | ||
159 | struct snd_jack; | ||
160 | struct snd_soc_card; | ||
157 | struct snd_soc_device; | 161 | struct snd_soc_device; |
158 | struct snd_soc_pcm_stream; | 162 | struct snd_soc_pcm_stream; |
159 | struct snd_soc_ops; | 163 | struct snd_soc_ops; |
@@ -164,6 +168,11 @@ struct snd_soc_platform; | |||
164 | struct snd_soc_codec; | 168 | struct snd_soc_codec; |
165 | struct soc_enum; | 169 | struct soc_enum; |
166 | struct snd_soc_ac97_ops; | 170 | struct snd_soc_ac97_ops; |
171 | struct snd_soc_jack; | ||
172 | struct snd_soc_jack_pin; | ||
173 | #ifdef CONFIG_GPIOLIB | ||
174 | struct snd_soc_jack_gpio; | ||
175 | #endif | ||
167 | 176 | ||
168 | typedef int (*hw_write_t)(void *,const char* ,int); | 177 | typedef int (*hw_write_t)(void *,const char* ,int); |
169 | typedef int (*hw_read_t)(void *,char* ,int); | 178 | typedef int (*hw_read_t)(void *,char* ,int); |
@@ -184,6 +193,19 @@ int snd_soc_init_card(struct snd_soc_device *socdev); | |||
184 | int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, | 193 | int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, |
185 | const struct snd_pcm_hardware *hw); | 194 | const struct snd_pcm_hardware *hw); |
186 | 195 | ||
196 | /* Jack reporting */ | ||
197 | int snd_soc_jack_new(struct snd_soc_card *card, const char *id, int type, | ||
198 | struct snd_soc_jack *jack); | ||
199 | void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask); | ||
200 | int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count, | ||
201 | struct snd_soc_jack_pin *pins); | ||
202 | #ifdef CONFIG_GPIOLIB | ||
203 | int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | ||
204 | struct snd_soc_jack_gpio *gpios); | ||
205 | void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, | ||
206 | struct snd_soc_jack_gpio *gpios); | ||
207 | #endif | ||
208 | |||
187 | /* codec IO */ | 209 | /* codec IO */ |
188 | #define snd_soc_read(codec, reg) codec->read(codec, reg) | 210 | #define snd_soc_read(codec, reg) codec->read(codec, reg) |
189 | #define snd_soc_write(codec, reg, value) codec->write(codec, reg, value) | 211 | #define snd_soc_write(codec, reg, value) codec->write(codec, reg, value) |
@@ -203,6 +225,8 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | |||
203 | */ | 225 | */ |
204 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, | 226 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, |
205 | void *data, char *long_name); | 227 | void *data, char *long_name); |
228 | int snd_soc_add_controls(struct snd_soc_codec *codec, | ||
229 | const struct snd_kcontrol_new *controls, int num_controls); | ||
206 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, | 230 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, |
207 | struct snd_ctl_elem_info *uinfo); | 231 | struct snd_ctl_elem_info *uinfo); |
208 | int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, | 232 | int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, |
@@ -237,6 +261,48 @@ int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, | |||
237 | int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, | 261 | int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, |
238 | struct snd_ctl_elem_value *ucontrol); | 262 | struct snd_ctl_elem_value *ucontrol); |
239 | 263 | ||
264 | /** | ||
265 | * struct snd_soc_jack_pin - Describes a pin to update based on jack detection | ||
266 | * | ||
267 | * @pin: name of the pin to update | ||
268 | * @mask: bits to check for in reported jack status | ||
269 | * @invert: if non-zero then pin is enabled when status is not reported | ||
270 | */ | ||
271 | struct snd_soc_jack_pin { | ||
272 | struct list_head list; | ||
273 | const char *pin; | ||
274 | int mask; | ||
275 | bool invert; | ||
276 | }; | ||
277 | |||
278 | /** | ||
279 | * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection | ||
280 | * | ||
281 | * @gpio: gpio number | ||
282 | * @name: gpio name | ||
283 | * @report: value to report when jack detected | ||
284 | * @invert: report presence in low state | ||
285 | * @debouce_time: debouce time in ms | ||
286 | */ | ||
287 | #ifdef CONFIG_GPIOLIB | ||
288 | struct snd_soc_jack_gpio { | ||
289 | unsigned int gpio; | ||
290 | const char *name; | ||
291 | int report; | ||
292 | int invert; | ||
293 | int debounce_time; | ||
294 | struct snd_soc_jack *jack; | ||
295 | struct work_struct work; | ||
296 | }; | ||
297 | #endif | ||
298 | |||
299 | struct snd_soc_jack { | ||
300 | struct snd_jack *jack; | ||
301 | struct snd_soc_card *card; | ||
302 | struct list_head pins; | ||
303 | int status; | ||
304 | }; | ||
305 | |||
240 | /* SoC PCM stream information */ | 306 | /* SoC PCM stream information */ |
241 | struct snd_soc_pcm_stream { | 307 | struct snd_soc_pcm_stream { |
242 | char *stream_name; | 308 | char *stream_name; |
@@ -384,6 +450,8 @@ struct snd_soc_card { | |||
384 | 450 | ||
385 | struct snd_soc_device *socdev; | 451 | struct snd_soc_device *socdev; |
386 | 452 | ||
453 | struct snd_soc_codec *codec; | ||
454 | |||
387 | struct snd_soc_platform *platform; | 455 | struct snd_soc_platform *platform; |
388 | struct delayed_work delayed_work; | 456 | struct delayed_work delayed_work; |
389 | struct work_struct deferred_resume_work; | 457 | struct work_struct deferred_resume_work; |
@@ -393,7 +461,6 @@ struct snd_soc_card { | |||
393 | struct snd_soc_device { | 461 | struct snd_soc_device { |
394 | struct device *dev; | 462 | struct device *dev; |
395 | struct snd_soc_card *card; | 463 | struct snd_soc_card *card; |
396 | struct snd_soc_codec *codec; | ||
397 | struct snd_soc_codec_device *codec_dev; | 464 | struct snd_soc_codec_device *codec_dev; |
398 | void *codec_data; | 465 | void *codec_data; |
399 | }; | 466 | }; |
diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h deleted file mode 100644 index 110d5dc3a2be..000000000000 --- a/include/sound/uda1341.h +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/linux/l3/uda1341.h | ||
3 | * | ||
4 | * Philips UDA1341 mixer device driver for ALSA | ||
5 | * | ||
6 | * Copyright (c) 2002 Tomas Kasparek <tomas.kasparek@seznam.cz> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License. | ||
10 | * | ||
11 | * History: | ||
12 | * | ||
13 | * 2002-03-13 Tomas Kasparek Initial release - based on uda1341.h from OSS | ||
14 | * 2002-03-30 Tomas Kasparek Proc filesystem support, complete mixer and DSP | ||
15 | * features support | ||
16 | */ | ||
17 | |||
18 | #define UDA1341_ALSA_NAME "snd-uda1341" | ||
19 | |||
20 | /* | ||
21 | * Default rate set after inicialization | ||
22 | */ | ||
23 | #define AUDIO_RATE_DEFAULT 44100 | ||
24 | |||
25 | /* | ||
26 | * UDA1341 L3 address and command types | ||
27 | */ | ||
28 | #define UDA1341_L3ADDR 5 | ||
29 | #define UDA1341_DATA0 (UDA1341_L3ADDR << 2 | 0) | ||
30 | #define UDA1341_DATA1 (UDA1341_L3ADDR << 2 | 1) | ||
31 | #define UDA1341_STATUS (UDA1341_L3ADDR << 2 | 2) | ||
32 | |||
33 | enum uda1341_onoff { | ||
34 | OFF=0, | ||
35 | ON, | ||
36 | }; | ||
37 | |||
38 | enum uda1341_format { | ||
39 | I2S=0, | ||
40 | LSB16, | ||
41 | LSB18, | ||
42 | LSB20, | ||
43 | MSB, | ||
44 | LSB16MSB, | ||
45 | LSB18MSB, | ||
46 | LSB20MSB, | ||
47 | }; | ||
48 | |||
49 | enum uda1341_fs { | ||
50 | F512=0, | ||
51 | F384, | ||
52 | F256, | ||
53 | Funused, | ||
54 | }; | ||
55 | |||
56 | enum uda1341_peak { | ||
57 | BEFORE=0, | ||
58 | AFTER, | ||
59 | }; | ||
60 | |||
61 | enum uda1341_filter { | ||
62 | FLAT=0, | ||
63 | MIN, | ||
64 | MIN2, | ||
65 | MAX, | ||
66 | }; | ||
67 | |||
68 | enum uda1341_mixer { | ||
69 | DOUBLE, | ||
70 | LINE, | ||
71 | MIC, | ||
72 | MIXER, | ||
73 | }; | ||
74 | |||
75 | enum uda1341_deemp { | ||
76 | NONE, | ||
77 | D32, | ||
78 | D44, | ||
79 | D48, | ||
80 | }; | ||
81 | |||
82 | enum uda1341_config { | ||
83 | CMD_READ_REG = 0, | ||
84 | CMD_RESET, | ||
85 | CMD_FS, | ||
86 | CMD_FORMAT, | ||
87 | CMD_OGAIN, | ||
88 | CMD_IGAIN, | ||
89 | CMD_DAC, | ||
90 | CMD_ADC, | ||
91 | CMD_VOLUME, | ||
92 | CMD_BASS, | ||
93 | CMD_TREBBLE, | ||
94 | CMD_PEAK, | ||
95 | CMD_DEEMP, | ||
96 | CMD_MUTE, | ||
97 | CMD_FILTER, | ||
98 | CMD_CH1, | ||
99 | CMD_CH2, | ||
100 | CMD_MIC, | ||
101 | CMD_MIXER, | ||
102 | CMD_AGC, | ||
103 | CMD_IG, | ||
104 | CMD_AGC_TIME, | ||
105 | CMD_AGC_LEVEL, | ||
106 | #ifdef CONFIG_PM | ||
107 | CMD_SUSPEND, | ||
108 | CMD_RESUME, | ||
109 | #endif | ||
110 | CMD_LAST, | ||
111 | }; | ||
112 | |||
113 | enum write_through { | ||
114 | //used in update_bits (write_cfg) to avoid l3_write - just update local copy of regs. | ||
115 | REGS_ONLY=0, | ||
116 | //update local regs and write value to uda1341 - do l3_write | ||
117 | FLUSH, | ||
118 | }; | ||
119 | |||
120 | int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt); | ||
121 | |||
122 | /* | ||
123 | * Local variables: | ||
124 | * indent-tabs-mode: t | ||
125 | * End: | ||
126 | */ | ||
diff --git a/include/sound/version.h b/include/sound/version.h index 2b48237e23bf..a7e74e23ad2e 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h */ | 1 | /* include/version.h */ |
2 | #define CONFIG_SND_VERSION "1.0.18a" | 2 | #define CONFIG_SND_VERSION "1.0.19" |
3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |
diff --git a/include/sound/wss.h b/include/sound/wss.h index fd01f22825cd..6d65f322f1d5 100644 --- a/include/sound/wss.h +++ b/include/sound/wss.h | |||
@@ -154,6 +154,7 @@ int snd_wss_create(struct snd_card *card, | |||
154 | unsigned short hardware, | 154 | unsigned short hardware, |
155 | unsigned short hwshare, | 155 | unsigned short hwshare, |
156 | struct snd_wss **rchip); | 156 | struct snd_wss **rchip); |
157 | int snd_wss_free(struct snd_wss *chip); | ||
157 | int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); | 158 | int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); |
158 | int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); | 159 | int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); |
159 | int snd_wss_mixer(struct snd_wss *chip); | 160 | int snd_wss_mixer(struct snd_wss *chip); |