diff options
Diffstat (limited to 'include')
42 files changed, 842 insertions, 329 deletions
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h b/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h new file mode 100644 index 000000000000..f28636d61e39 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_mci.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_mci.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * MultiMedia Card Interface (MCI) registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_MCI_H | ||
17 | #define AT91RM9200_MCI_H | ||
18 | |||
19 | #define AT91_MCI_CR 0x00 /* Control Register */ | ||
20 | #define AT91_MCI_MCIEN (1 << 0) /* Multi-Media Interface Enable */ | ||
21 | #define AT91_MCI_MCIDIS (1 << 1) /* Multi-Media Interface Disable */ | ||
22 | #define AT91_MCI_PWSEN (1 << 2) /* Power Save Mode Enable */ | ||
23 | #define AT91_MCI_PWSDIS (1 << 3) /* Power Save Mode Disable */ | ||
24 | #define AT91_MCI_SWRST (1 << 7) /* Software Reset */ | ||
25 | |||
26 | #define AT91_MCI_MR 0x04 /* Mode Register */ | ||
27 | #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */ | ||
28 | #define AT91_MCI_PWSDIV (3 << 8) /* Power Saving Divider */ | ||
29 | #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */ | ||
30 | #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */ | ||
31 | #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */ | ||
32 | |||
33 | #define AT91_MCI_DTOR 0x08 /* Data Timeout Register */ | ||
34 | #define AT91_MCI_DTOCYC (0xf << 0) /* Data Timeout Cycle Number */ | ||
35 | #define AT91_MCI_DTOMUL (7 << 4) /* Data Timeout Multiplier */ | ||
36 | #define AT91_MCI_DTOMUL_1 (0 << 4) | ||
37 | #define AT91_MCI_DTOMUL_16 (1 << 4) | ||
38 | #define AT91_MCI_DTOMUL_128 (2 << 4) | ||
39 | #define AT91_MCI_DTOMUL_256 (3 << 4) | ||
40 | #define AT91_MCI_DTOMUL_1K (4 << 4) | ||
41 | #define AT91_MCI_DTOMUL_4K (5 << 4) | ||
42 | #define AT91_MCI_DTOMUL_64K (6 << 4) | ||
43 | #define AT91_MCI_DTOMUL_1M (7 << 4) | ||
44 | |||
45 | #define AT91_MCI_SDCR 0x0c /* SD Card Register */ | ||
46 | #define AT91_MCI_SDCSEL (0xf << 0) /* SD Card Selector */ | ||
47 | #define AT91_MCI_SDCBUS (1 << 7) /* 1-bit or 4-bit bus */ | ||
48 | |||
49 | #define AT91_MCI_ARGR 0x10 /* Argument Register */ | ||
50 | |||
51 | #define AT91_MCI_CMDR 0x14 /* Command Register */ | ||
52 | #define AT91_MCI_CMDNB (0x3f << 0) /* Command Number */ | ||
53 | #define AT91_MCI_RSPTYP (3 << 6) /* Response Type */ | ||
54 | #define AT91_MCI_RSPTYP_NONE (0 << 6) | ||
55 | #define AT91_MCI_RSPTYP_48 (1 << 6) | ||
56 | #define AT91_MCI_RSPTYP_136 (2 << 6) | ||
57 | #define AT91_MCI_SPCMD (7 << 8) /* Special Command */ | ||
58 | #define AT91_MCI_SPCMD_NONE (0 << 8) | ||
59 | #define AT91_MCI_SPCMD_INIT (1 << 8) | ||
60 | #define AT91_MCI_SPCMD_SYNC (2 << 8) | ||
61 | #define AT91_MCI_SPCMD_ICMD (4 << 8) | ||
62 | #define AT91_MCI_SPCMD_IRESP (5 << 8) | ||
63 | #define AT91_MCI_OPDCMD (1 << 11) /* Open Drain Command */ | ||
64 | #define AT91_MCI_MAXLAT (1 << 12) /* Max Latency for Command to Response */ | ||
65 | #define AT91_MCI_TRCMD (3 << 16) /* Transfer Command */ | ||
66 | #define AT91_MCI_TRCMD_NONE (0 << 16) | ||
67 | #define AT91_MCI_TRCMD_START (1 << 16) | ||
68 | #define AT91_MCI_TRCMD_STOP (2 << 16) | ||
69 | #define AT91_MCI_TRDIR (1 << 18) /* Transfer Direction */ | ||
70 | #define AT91_MCI_TRTYP (3 << 19) /* Transfer Type */ | ||
71 | #define AT91_MCI_TRTYP_BLOCK (0 << 19) | ||
72 | #define AT91_MCI_TRTYP_MULTIPLE (1 << 19) | ||
73 | #define AT91_MCI_TRTYP_STREAM (2 << 19) | ||
74 | |||
75 | #define AT91_MCI_RSPR(n) (0x20 + ((n) * 4)) /* Response Registers 0-3 */ | ||
76 | #define AT91_MCR_RDR 0x30 /* Receive Data Register */ | ||
77 | #define AT91_MCR_TDR 0x34 /* Transmit Data Register */ | ||
78 | |||
79 | #define AT91_MCI_SR 0x40 /* Status Register */ | ||
80 | #define AT91_MCI_CMDRDY (1 << 0) /* Command Ready */ | ||
81 | #define AT91_MCI_RXRDY (1 << 1) /* Receiver Ready */ | ||
82 | #define AT91_MCI_TXRDY (1 << 2) /* Transmit Ready */ | ||
83 | #define AT91_MCI_BLKE (1 << 3) /* Data Block Ended */ | ||
84 | #define AT91_MCI_DTIP (1 << 4) /* Data Transfer in Progress */ | ||
85 | #define AT91_MCI_NOTBUSY (1 << 5) /* Data Not Busy */ | ||
86 | #define AT91_MCI_ENDRX (1 << 6) /* End of RX Buffer */ | ||
87 | #define AT91_MCI_ENDTX (1 << 7) /* End fo TX Buffer */ | ||
88 | #define AT91_MCI_RXBUFF (1 << 14) /* RX Buffer Full */ | ||
89 | #define AT91_MCI_TXBUFE (1 << 15) /* TX Buffer Empty */ | ||
90 | #define AT91_MCI_RINDE (1 << 16) /* Response Index Error */ | ||
91 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ | ||
92 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ | ||
93 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ | ||
94 | #define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */ | ||
95 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ | ||
96 | #define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */ | ||
97 | #define AT91_MCI_OVRE (1 << 30) /* Overrun */ | ||
98 | #define AT91_MCI_UNRE (1 << 31) /* Underrun */ | ||
99 | |||
100 | #define AT91_MCI_IER 0x44 /* Interrupt Enable Register */ | ||
101 | #define AT91_MCI_IDR 0x48 /* Interrupt Disable Register */ | ||
102 | #define AT91_MCI_IMR 0x4c /* Interrupt Mask Register */ | ||
103 | |||
104 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h index 2646c01f8e97..59e6f44d3a0d 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91rm9200/hardware.h | |||
@@ -65,6 +65,9 @@ | |||
65 | /* SmartMedia */ | 65 | /* SmartMedia */ |
66 | #define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */ | 66 | #define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */ |
67 | 67 | ||
68 | /* Compact Flash */ | ||
69 | #define AT91_CF_BASE 0x50000000 /* NCS4-NCS6: Compact Flash physical base address */ | ||
70 | |||
68 | /* Multi-Master Memory controller */ | 71 | /* Multi-Master Memory controller */ |
69 | #define AT91_UHP_BASE 0x00300000 /* USB Host controller */ | 72 | #define AT91_UHP_BASE 0x00300000 /* USB Host controller */ |
70 | 73 | ||
diff --git a/include/asm-arm/arch-imx/mmc.h b/include/asm-arm/arch-imx/mmc.h new file mode 100644 index 000000000000..1937151665c7 --- /dev/null +++ b/include/asm-arm/arch-imx/mmc.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef ASMARM_ARCH_MMC_H | ||
2 | #define ASMARM_ARCH_MMC_H | ||
3 | |||
4 | #include <linux/mmc/protocol.h> | ||
5 | |||
6 | struct imxmmc_platform_data { | ||
7 | int (*card_present)(void); | ||
8 | }; | ||
9 | |||
10 | extern void imx_set_mmc_info(struct imxmmc_platform_data *info); | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index 5207758a6dd9..868c7139dbff 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
@@ -60,24 +60,10 @@ void __init pci_addr_cache_build(void); | |||
60 | * device (including config space i/o). Call eeh_add_device_late | 60 | * device (including config space i/o). Call eeh_add_device_late |
61 | * to finish the eeh setup for this device. | 61 | * to finish the eeh setup for this device. |
62 | */ | 62 | */ |
63 | void eeh_add_device_early(struct device_node *); | ||
64 | void eeh_add_device_late(struct pci_dev *dev); | ||
65 | void eeh_add_device_tree_early(struct device_node *); | 63 | void eeh_add_device_tree_early(struct device_node *); |
66 | void eeh_add_device_tree_late(struct pci_bus *); | 64 | void eeh_add_device_tree_late(struct pci_bus *); |
67 | 65 | ||
68 | /** | 66 | /** |
69 | * eeh_remove_device - undo EEH setup for the indicated pci device | ||
70 | * @dev: pci device to be removed | ||
71 | * | ||
72 | * This routine should be called when a device is removed from | ||
73 | * a running system (e.g. by hotplug or dlpar). It unregisters | ||
74 | * the PCI device from the EEH subsystem. I/O errors affecting | ||
75 | * this device will no longer be detected after this call; thus, | ||
76 | * i/o errors affecting this slot may leave this device unusable. | ||
77 | */ | ||
78 | void eeh_remove_device(struct pci_dev *); | ||
79 | |||
80 | /** | ||
81 | * eeh_remove_device_recursive - undo EEH for device & children. | 67 | * eeh_remove_device_recursive - undo EEH for device & children. |
82 | * @dev: pci device to be removed | 68 | * @dev: pci device to be removed |
83 | * | 69 | * |
@@ -116,12 +102,6 @@ static inline int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *d | |||
116 | 102 | ||
117 | static inline void pci_addr_cache_build(void) { } | 103 | static inline void pci_addr_cache_build(void) { } |
118 | 104 | ||
119 | static inline void eeh_add_device_early(struct device_node *dn) { } | ||
120 | |||
121 | static inline void eeh_add_device_late(struct pci_dev *dev) { } | ||
122 | |||
123 | static inline void eeh_remove_device(struct pci_dev *dev) { } | ||
124 | |||
125 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } | 105 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } |
126 | 106 | ||
127 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } | 107 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } |
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index b72c04f3f551..6cc7e1fb7bfd 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -4,47 +4,88 @@ | |||
4 | 4 | ||
5 | #define HVSC .long 0x44000022 | 5 | #define HVSC .long 0x44000022 |
6 | 6 | ||
7 | #define H_Success 0 | 7 | #define H_SUCCESS 0 |
8 | #define H_Busy 1 /* Hardware busy -- retry later */ | 8 | #define H_BUSY 1 /* Hardware busy -- retry later */ |
9 | #define H_Closed 2 /* Resource closed */ | 9 | #define H_CLOSED 2 /* Resource closed */ |
10 | #define H_Constrained 4 /* Resource request constrained to max allowed */ | 10 | #define H_NOT_AVAILABLE 3 |
11 | #define H_InProgress 14 /* Kind of like busy */ | 11 | #define H_CONSTRAINED 4 /* Resource request constrained to max allowed */ |
12 | #define H_Pending 17 /* returned from H_POLL_PENDING */ | 12 | #define H_PARTIAL 5 |
13 | #define H_Continue 18 /* Returned from H_Join on success */ | 13 | #define H_IN_PROGRESS 14 /* Kind of like busy */ |
14 | #define H_LongBusyStartRange 9900 /* Start of long busy range */ | 14 | #define H_PAGE_REGISTERED 15 |
15 | #define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */ | 15 | #define H_PARTIAL_STORE 16 |
16 | #define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */ | 16 | #define H_PENDING 17 /* returned from H_POLL_PENDING */ |
17 | #define H_LongBusyOrder100msec 9902 /* Long busy, hint that 100msec is a good time to retry */ | 17 | #define H_CONTINUE 18 /* Returned from H_Join on success */ |
18 | #define H_LongBusyOrder1sec 9903 /* Long busy, hint that 1sec is a good time to retry */ | 18 | #define H_LONG_BUSY_START_RANGE 9900 /* Start of long busy range */ |
19 | #define H_LongBusyOrder10sec 9904 /* Long busy, hint that 10sec is a good time to retry */ | 19 | #define H_LONG_BUSY_ORDER_1_MSEC 9900 /* Long busy, hint that 1msec \ |
20 | #define H_LongBusyOrder100sec 9905 /* Long busy, hint that 100sec is a good time to retry */ | 20 | is a good time to retry */ |
21 | #define H_LongBusyEndRange 9905 /* End of long busy range */ | 21 | #define H_LONG_BUSY_ORDER_10_MSEC 9901 /* Long busy, hint that 10msec \ |
22 | #define H_Hardware -1 /* Hardware error */ | 22 | is a good time to retry */ |
23 | #define H_Function -2 /* Function not supported */ | 23 | #define H_LONG_BUSY_ORDER_100_MSEC 9902 /* Long busy, hint that 100msec \ |
24 | #define H_Privilege -3 /* Caller not privileged */ | 24 | is a good time to retry */ |
25 | #define H_Parameter -4 /* Parameter invalid, out-of-range or conflicting */ | 25 | #define H_LONG_BUSY_ORDER_1_SEC 9903 /* Long busy, hint that 1sec \ |
26 | #define H_Bad_Mode -5 /* Illegal msr value */ | 26 | is a good time to retry */ |
27 | #define H_PTEG_Full -6 /* PTEG is full */ | 27 | #define H_LONG_BUSY_ORDER_10_SEC 9904 /* Long busy, hint that 10sec \ |
28 | #define H_Not_Found -7 /* PTE was not found" */ | 28 | is a good time to retry */ |
29 | #define H_Reserved_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ | 29 | #define H_LONG_BUSY_ORDER_100_SEC 9905 /* Long busy, hint that 100sec \ |
30 | #define H_NoMem -9 | 30 | is a good time to retry */ |
31 | #define H_Authority -10 | 31 | #define H_LONG_BUSY_END_RANGE 9905 /* End of long busy range */ |
32 | #define H_Permission -11 | 32 | #define H_HARDWARE -1 /* Hardware error */ |
33 | #define H_Dropped -12 | 33 | #define H_FUNCTION -2 /* Function not supported */ |
34 | #define H_SourceParm -13 | 34 | #define H_PRIVILEGE -3 /* Caller not privileged */ |
35 | #define H_DestParm -14 | 35 | #define H_PARAMETER -4 /* Parameter invalid, out-of-range or conflicting */ |
36 | #define H_RemoteParm -15 | 36 | #define H_BAD_MODE -5 /* Illegal msr value */ |
37 | #define H_Resource -16 | 37 | #define H_PTEG_FULL -6 /* PTEG is full */ |
38 | #define H_NOT_FOUND -7 /* PTE was not found" */ | ||
39 | #define H_RESERVED_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ | ||
40 | #define H_NO_MEM -9 | ||
41 | #define H_AUTHORITY -10 | ||
42 | #define H_PERMISSION -11 | ||
43 | #define H_DROPPED -12 | ||
44 | #define H_SOURCE_PARM -13 | ||
45 | #define H_DEST_PARM -14 | ||
46 | #define H_REMOTE_PARM -15 | ||
47 | #define H_RESOURCE -16 | ||
48 | #define H_ADAPTER_PARM -17 | ||
49 | #define H_RH_PARM -18 | ||
50 | #define H_RCQ_PARM -19 | ||
51 | #define H_SCQ_PARM -20 | ||
52 | #define H_EQ_PARM -21 | ||
53 | #define H_RT_PARM -22 | ||
54 | #define H_ST_PARM -23 | ||
55 | #define H_SIGT_PARM -24 | ||
56 | #define H_TOKEN_PARM -25 | ||
57 | #define H_MLENGTH_PARM -27 | ||
58 | #define H_MEM_PARM -28 | ||
59 | #define H_MEM_ACCESS_PARM -29 | ||
60 | #define H_ATTR_PARM -30 | ||
61 | #define H_PORT_PARM -31 | ||
62 | #define H_MCG_PARM -32 | ||
63 | #define H_VL_PARM -33 | ||
64 | #define H_TSIZE_PARM -34 | ||
65 | #define H_TRACE_PARM -35 | ||
66 | |||
67 | #define H_MASK_PARM -37 | ||
68 | #define H_MCG_FULL -38 | ||
69 | #define H_ALIAS_EXIST -39 | ||
70 | #define H_P_COUNTER -40 | ||
71 | #define H_TABLE_FULL -41 | ||
72 | #define H_ALT_TABLE -42 | ||
73 | #define H_MR_CONDITION -43 | ||
74 | #define H_NOT_ENOUGH_RESOURCES -44 | ||
75 | #define H_R_STATE -45 | ||
76 | #define H_RESCINDEND -46 | ||
77 | |||
38 | 78 | ||
39 | /* Long Busy is a condition that can be returned by the firmware | 79 | /* Long Busy is a condition that can be returned by the firmware |
40 | * when a call cannot be completed now, but the identical call | 80 | * when a call cannot be completed now, but the identical call |
41 | * should be retried later. This prevents calls blocking in the | 81 | * should be retried later. This prevents calls blocking in the |
42 | * firmware for long periods of time. Annoyingly the firmware can return | 82 | * firmware for long periods of time. Annoyingly the firmware can return |
43 | * a range of return codes, hinting at how long we should wait before | 83 | * a range of return codes, hinting at how long we should wait before |
44 | * retrying. If you don't care for the hint, the macro below is a good | 84 | * retrying. If you don't care for the hint, the macro below is a good |
45 | * way to check for the long_busy return codes | 85 | * way to check for the long_busy return codes |
46 | */ | 86 | */ |
47 | #define H_isLongBusy(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange)) | 87 | #define H_IS_LONG_BUSY(x) ((x >= H_LONG_BUSY_START_RANGE) \ |
88 | && (x <= H_LONG_BUSY_END_RANGE)) | ||
48 | 89 | ||
49 | /* Flags */ | 90 | /* Flags */ |
50 | #define H_LARGE_PAGE (1UL<<(63-16)) | 91 | #define H_LARGE_PAGE (1UL<<(63-16)) |
@@ -66,6 +107,9 @@ | |||
66 | #define H_DABRX_KERNEL (1UL<<(63-62)) | 107 | #define H_DABRX_KERNEL (1UL<<(63-62)) |
67 | #define H_DABRX_USER (1UL<<(63-63)) | 108 | #define H_DABRX_USER (1UL<<(63-63)) |
68 | 109 | ||
110 | /* Each control block has to be on a 4K bondary */ | ||
111 | #define H_CB_ALIGNMENT 4096 | ||
112 | |||
69 | /* pSeries hypervisor opcodes */ | 113 | /* pSeries hypervisor opcodes */ |
70 | #define H_REMOVE 0x04 | 114 | #define H_REMOVE 0x04 |
71 | #define H_ENTER 0x08 | 115 | #define H_ENTER 0x08 |
@@ -99,25 +143,52 @@ | |||
99 | #define H_PERFMON 0x7c | 143 | #define H_PERFMON 0x7c |
100 | #define H_MIGRATE_DMA 0x78 | 144 | #define H_MIGRATE_DMA 0x78 |
101 | #define H_REGISTER_VPA 0xDC | 145 | #define H_REGISTER_VPA 0xDC |
102 | #define H_CEDE 0xE0 | 146 | #define H_CEDE 0xE0 |
103 | #define H_CONFER 0xE4 | 147 | #define H_CONFER 0xE4 |
104 | #define H_PROD 0xE8 | 148 | #define H_PROD 0xE8 |
105 | #define H_GET_PPP 0xEC | 149 | #define H_GET_PPP 0xEC |
106 | #define H_SET_PPP 0xF0 | 150 | #define H_SET_PPP 0xF0 |
107 | #define H_PURR 0xF4 | 151 | #define H_PURR 0xF4 |
108 | #define H_PIC 0xF8 | 152 | #define H_PIC 0xF8 |
109 | #define H_REG_CRQ 0xFC | 153 | #define H_REG_CRQ 0xFC |
110 | #define H_FREE_CRQ 0x100 | 154 | #define H_FREE_CRQ 0x100 |
111 | #define H_VIO_SIGNAL 0x104 | 155 | #define H_VIO_SIGNAL 0x104 |
112 | #define H_SEND_CRQ 0x108 | 156 | #define H_SEND_CRQ 0x108 |
113 | #define H_COPY_RDMA 0x110 | 157 | #define H_COPY_RDMA 0x110 |
114 | #define H_SET_XDABR 0x134 | 158 | #define H_SET_XDABR 0x134 |
115 | #define H_STUFF_TCE 0x138 | 159 | #define H_STUFF_TCE 0x138 |
116 | #define H_PUT_TCE_INDIRECT 0x13C | 160 | #define H_PUT_TCE_INDIRECT 0x13C |
117 | #define H_VTERM_PARTNER_INFO 0x150 | 161 | #define H_VTERM_PARTNER_INFO 0x150 |
118 | #define H_REGISTER_VTERM 0x154 | 162 | #define H_REGISTER_VTERM 0x154 |
119 | #define H_FREE_VTERM 0x158 | 163 | #define H_FREE_VTERM 0x158 |
120 | #define H_POLL_PENDING 0x1D8 | 164 | #define H_RESET_EVENTS 0x15C |
165 | #define H_ALLOC_RESOURCE 0x160 | ||
166 | #define H_FREE_RESOURCE 0x164 | ||
167 | #define H_MODIFY_QP 0x168 | ||
168 | #define H_QUERY_QP 0x16C | ||
169 | #define H_REREGISTER_PMR 0x170 | ||
170 | #define H_REGISTER_SMR 0x174 | ||
171 | #define H_QUERY_MR 0x178 | ||
172 | #define H_QUERY_MW 0x17C | ||
173 | #define H_QUERY_HCA 0x180 | ||
174 | #define H_QUERY_PORT 0x184 | ||
175 | #define H_MODIFY_PORT 0x188 | ||
176 | #define H_DEFINE_AQP1 0x18C | ||
177 | #define H_GET_TRACE_BUFFER 0x190 | ||
178 | #define H_DEFINE_AQP0 0x194 | ||
179 | #define H_RESIZE_MR 0x198 | ||
180 | #define H_ATTACH_MCQP 0x19C | ||
181 | #define H_DETACH_MCQP 0x1A0 | ||
182 | #define H_CREATE_RPT 0x1A4 | ||
183 | #define H_REMOVE_RPT 0x1A8 | ||
184 | #define H_REGISTER_RPAGES 0x1AC | ||
185 | #define H_DISABLE_AND_GETC 0x1B0 | ||
186 | #define H_ERROR_DATA 0x1B4 | ||
187 | #define H_GET_HCA_INFO 0x1B8 | ||
188 | #define H_GET_PERF_COUNT 0x1BC | ||
189 | #define H_MANAGE_TRACE 0x1C0 | ||
190 | #define H_QUERY_INT_STATE 0x1E4 | ||
191 | #define H_POLL_PENDING 0x1D8 | ||
121 | #define H_JOIN 0x298 | 192 | #define H_JOIN 0x298 |
122 | #define H_ENABLE_CRQ 0x2B0 | 193 | #define H_ENABLE_CRQ 0x2B0 |
123 | 194 | ||
@@ -152,7 +223,7 @@ long plpar_hcall_norets(unsigned long opcode, ...); | |||
152 | */ | 223 | */ |
153 | long plpar_hcall_8arg_2ret(unsigned long opcode, | 224 | long plpar_hcall_8arg_2ret(unsigned long opcode, |
154 | unsigned long arg1, | 225 | unsigned long arg1, |
155 | unsigned long arg2, | 226 | unsigned long arg2, |
156 | unsigned long arg3, | 227 | unsigned long arg3, |
157 | unsigned long arg4, | 228 | unsigned long arg4, |
158 | unsigned long arg5, | 229 | unsigned long arg5, |
@@ -176,6 +247,42 @@ long plpar_hcall_4out(unsigned long opcode, | |||
176 | unsigned long *out3, | 247 | unsigned long *out3, |
177 | unsigned long *out4); | 248 | unsigned long *out4); |
178 | 249 | ||
250 | long plpar_hcall_7arg_7ret(unsigned long opcode, | ||
251 | unsigned long arg1, | ||
252 | unsigned long arg2, | ||
253 | unsigned long arg3, | ||
254 | unsigned long arg4, | ||
255 | unsigned long arg5, | ||
256 | unsigned long arg6, | ||
257 | unsigned long arg7, | ||
258 | unsigned long *out1, | ||
259 | unsigned long *out2, | ||
260 | unsigned long *out3, | ||
261 | unsigned long *out4, | ||
262 | unsigned long *out5, | ||
263 | unsigned long *out6, | ||
264 | unsigned long *out7); | ||
265 | |||
266 | long plpar_hcall_9arg_9ret(unsigned long opcode, | ||
267 | unsigned long arg1, | ||
268 | unsigned long arg2, | ||
269 | unsigned long arg3, | ||
270 | unsigned long arg4, | ||
271 | unsigned long arg5, | ||
272 | unsigned long arg6, | ||
273 | unsigned long arg7, | ||
274 | unsigned long arg8, | ||
275 | unsigned long arg9, | ||
276 | unsigned long *out1, | ||
277 | unsigned long *out2, | ||
278 | unsigned long *out3, | ||
279 | unsigned long *out4, | ||
280 | unsigned long *out5, | ||
281 | unsigned long *out6, | ||
282 | unsigned long *out7, | ||
283 | unsigned long *out8, | ||
284 | unsigned long *out9); | ||
285 | |||
179 | #endif /* __ASSEMBLY__ */ | 286 | #endif /* __ASSEMBLY__ */ |
180 | #endif /* __KERNEL__ */ | 287 | #endif /* __KERNEL__ */ |
181 | #endif /* _ASM_POWERPC_HVCALL_H */ | 288 | #endif /* _ASM_POWERPC_HVCALL_H */ |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 64ec640a40ee..264f0ebeaedc 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -180,7 +180,7 @@ | |||
180 | #define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ | 180 | #define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ |
181 | #define __NR_getdomainname 162 /* SunOS Specific */ | 181 | #define __NR_getdomainname 162 /* SunOS Specific */ |
182 | #define __NR_setdomainname 163 /* Common */ | 182 | #define __NR_setdomainname 163 /* Common */ |
183 | /* #define __NR_ni_syscall 164 ENOSYS under SunOS */ | 183 | /* #define __NR_utrap_install 164 Linux sparc64 specific */ |
184 | #define __NR_quotactl 165 /* Common */ | 184 | #define __NR_quotactl 165 /* Common */ |
185 | #define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ | 185 | #define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ |
186 | #define __NR_mount 167 /* Common */ | 186 | #define __NR_mount 167 /* Common */ |
@@ -248,7 +248,7 @@ | |||
248 | #define __NR_setfsgid 229 /* Linux Specific */ | 248 | #define __NR_setfsgid 229 /* Linux Specific */ |
249 | #define __NR__newselect 230 /* Linux Specific */ | 249 | #define __NR__newselect 230 /* Linux Specific */ |
250 | #define __NR_time 231 /* Linux Specific */ | 250 | #define __NR_time 231 /* Linux Specific */ |
251 | /* #define __NR_oldstat 232 Linux Specific */ | 251 | #define __NR_sys_splice 232 /* Linux Specific */ |
252 | #define __NR_stime 233 /* Linux Specific */ | 252 | #define __NR_stime 233 /* Linux Specific */ |
253 | #define __NR_statfs64 234 /* Linux Specific */ | 253 | #define __NR_statfs64 234 /* Linux Specific */ |
254 | #define __NR_fstatfs64 235 /* Linux Specific */ | 254 | #define __NR_fstatfs64 235 /* Linux Specific */ |
@@ -271,7 +271,7 @@ | |||
271 | #define __NR_getsid 252 | 271 | #define __NR_getsid 252 |
272 | #define __NR_fdatasync 253 | 272 | #define __NR_fdatasync 253 |
273 | #define __NR_nfsservctl 254 | 273 | #define __NR_nfsservctl 254 |
274 | #define __NR_aplib 255 | 274 | #define __NR_sys_sync_file_range 255 |
275 | #define __NR_clock_settime 256 | 275 | #define __NR_clock_settime 256 |
276 | #define __NR_clock_gettime 257 | 276 | #define __NR_clock_gettime 257 |
277 | #define __NR_clock_getres 258 | 277 | #define __NR_clock_getres 258 |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index a284986b1541..d0544b4f47b7 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -250,7 +250,7 @@ | |||
250 | #ifdef __KERNEL__ | 250 | #ifdef __KERNEL__ |
251 | #define __NR_time 231 /* Linux sparc32 */ | 251 | #define __NR_time 231 /* Linux sparc32 */ |
252 | #endif | 252 | #endif |
253 | /* #define __NR_oldstat 232 Linux Specific */ | 253 | #define __NR_sys_splice 232 /* Linux Specific */ |
254 | #define __NR_stime 233 /* Linux Specific */ | 254 | #define __NR_stime 233 /* Linux Specific */ |
255 | #define __NR_statfs64 234 /* Linux Specific */ | 255 | #define __NR_statfs64 234 /* Linux Specific */ |
256 | #define __NR_fstatfs64 235 /* Linux Specific */ | 256 | #define __NR_fstatfs64 235 /* Linux Specific */ |
@@ -273,7 +273,7 @@ | |||
273 | #define __NR_getsid 252 | 273 | #define __NR_getsid 252 |
274 | #define __NR_fdatasync 253 | 274 | #define __NR_fdatasync 253 |
275 | #define __NR_nfsservctl 254 | 275 | #define __NR_nfsservctl 254 |
276 | #define __NR_aplib 255 | 276 | #define __NR_sys_sync_file_range 255 |
277 | #define __NR_clock_settime 256 | 277 | #define __NR_clock_settime 256 |
278 | #define __NR_clock_gettime 257 | 278 | #define __NR_clock_gettime 257 |
279 | #define __NR_clock_getres 258 | 279 | #define __NR_clock_getres 258 |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4ed7e602d703..1e9ebaba07b7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -864,7 +864,7 @@ struct super_block { | |||
864 | */ | 864 | */ |
865 | struct mutex s_vfs_rename_mutex; /* Kludge */ | 865 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
866 | 866 | ||
867 | /* Granuality of c/m/atime in ns. | 867 | /* Granularity of c/m/atime in ns. |
868 | Cannot be worse than a second */ | 868 | Cannot be worse than a second */ |
869 | u32 s_time_gran; | 869 | u32 s_time_gran; |
870 | }; | 870 | }; |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 9c8e6da2393b..71e7b2847cb3 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/mutex.h> | ||
14 | #include <linux/device.h> | 15 | #include <linux/device.h> |
15 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
16 | 17 | ||
@@ -40,7 +41,7 @@ struct gameport { | |||
40 | struct gameport *parent, *child; | 41 | struct gameport *parent, *child; |
41 | 42 | ||
42 | struct gameport_driver *drv; | 43 | struct gameport_driver *drv; |
43 | struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ | 44 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
44 | 45 | ||
45 | struct device dev; | 46 | struct device dev; |
46 | unsigned int registered; /* port has been fully registered with driver core */ | 47 | unsigned int registered; /* port has been fully registered with driver core */ |
@@ -137,12 +138,12 @@ static inline void gameport_set_drvdata(struct gameport *gameport, void *data) | |||
137 | */ | 138 | */ |
138 | static inline int gameport_pin_driver(struct gameport *gameport) | 139 | static inline int gameport_pin_driver(struct gameport *gameport) |
139 | { | 140 | { |
140 | return down_interruptible(&gameport->drv_sem); | 141 | return mutex_lock_interruptible(&gameport->drv_mutex); |
141 | } | 142 | } |
142 | 143 | ||
143 | static inline void gameport_unpin_driver(struct gameport *gameport) | 144 | static inline void gameport_unpin_driver(struct gameport *gameport) |
144 | { | 145 | { |
145 | up(&gameport->drv_sem); | 146 | mutex_unlock(&gameport->drv_mutex); |
146 | } | 147 | } |
147 | 148 | ||
148 | void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); | 149 | void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index b20939287613..306acf1dc6d5 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -80,7 +80,7 @@ struct hrtimer_sleeper { | |||
80 | * @first: pointer to the timer node which expires first | 80 | * @first: pointer to the timer node which expires first |
81 | * @resolution: the resolution of the clock, in nanoseconds | 81 | * @resolution: the resolution of the clock, in nanoseconds |
82 | * @get_time: function to retrieve the current time of the clock | 82 | * @get_time: function to retrieve the current time of the clock |
83 | * @get_sofirq_time: function to retrieve the current time from the softirq | 83 | * @get_softirq_time: function to retrieve the current time from the softirq |
84 | * @curr_timer: the timer which is executing a callback right now | 84 | * @curr_timer: the timer which is executing a callback right now |
85 | * @softirq_time: the time when running the hrtimer queue in the softirq | 85 | * @softirq_time: the time when running the hrtimer queue in the softirq |
86 | */ | 86 | */ |
diff --git a/include/linux/input.h b/include/linux/input.h index 1d4e341b72e6..b0e612dda0cf 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -421,7 +421,7 @@ struct input_absinfo { | |||
421 | #define BTN_GEAR_UP 0x151 | 421 | #define BTN_GEAR_UP 0x151 |
422 | 422 | ||
423 | #define KEY_OK 0x160 | 423 | #define KEY_OK 0x160 |
424 | #define KEY_SELECT 0x161 | 424 | #define KEY_SELECT 0x161 |
425 | #define KEY_GOTO 0x162 | 425 | #define KEY_GOTO 0x162 |
426 | #define KEY_CLEAR 0x163 | 426 | #define KEY_CLEAR 0x163 |
427 | #define KEY_POWER2 0x164 | 427 | #define KEY_POWER2 0x164 |
@@ -512,6 +512,15 @@ struct input_absinfo { | |||
512 | #define KEY_FN_S 0x1e3 | 512 | #define KEY_FN_S 0x1e3 |
513 | #define KEY_FN_B 0x1e4 | 513 | #define KEY_FN_B 0x1e4 |
514 | 514 | ||
515 | #define KEY_BRL_DOT1 0x1f1 | ||
516 | #define KEY_BRL_DOT2 0x1f2 | ||
517 | #define KEY_BRL_DOT3 0x1f3 | ||
518 | #define KEY_BRL_DOT4 0x1f4 | ||
519 | #define KEY_BRL_DOT5 0x1f5 | ||
520 | #define KEY_BRL_DOT6 0x1f6 | ||
521 | #define KEY_BRL_DOT7 0x1f7 | ||
522 | #define KEY_BRL_DOT8 0x1f8 | ||
523 | |||
515 | /* We avoid low common keys in module aliases so they don't get huge. */ | 524 | /* We avoid low common keys in module aliases so they don't get huge. */ |
516 | #define KEY_MIN_INTERESTING KEY_MUTE | 525 | #define KEY_MIN_INTERESTING KEY_MUTE |
517 | #define KEY_MAX 0x1ff | 526 | #define KEY_MAX 0x1ff |
@@ -929,7 +938,7 @@ struct input_dev { | |||
929 | 938 | ||
930 | struct input_handle *grab; | 939 | struct input_handle *grab; |
931 | 940 | ||
932 | struct semaphore sem; /* serializes open and close operations */ | 941 | struct mutex mutex; /* serializes open and close operations */ |
933 | unsigned int users; | 942 | unsigned int users; |
934 | 943 | ||
935 | struct class_device cdev; | 944 | struct class_device cdev; |
@@ -995,11 +1004,6 @@ static inline void init_input_dev(struct input_dev *dev) | |||
995 | 1004 | ||
996 | struct input_dev *input_allocate_device(void); | 1005 | struct input_dev *input_allocate_device(void); |
997 | 1006 | ||
998 | static inline void input_free_device(struct input_dev *dev) | ||
999 | { | ||
1000 | kfree(dev); | ||
1001 | } | ||
1002 | |||
1003 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1007 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
1004 | { | 1008 | { |
1005 | return to_input_dev(class_device_get(&dev->cdev)); | 1009 | return to_input_dev(class_device_get(&dev->cdev)); |
@@ -1010,6 +1014,11 @@ static inline void input_put_device(struct input_dev *dev) | |||
1010 | class_device_put(&dev->cdev); | 1014 | class_device_put(&dev->cdev); |
1011 | } | 1015 | } |
1012 | 1016 | ||
1017 | static inline void input_free_device(struct input_dev *dev) | ||
1018 | { | ||
1019 | input_put_device(dev); | ||
1020 | } | ||
1021 | |||
1013 | int input_register_device(struct input_dev *); | 1022 | int input_register_device(struct input_dev *); |
1014 | void input_unregister_device(struct input_dev *); | 1023 | void input_unregister_device(struct input_dev *); |
1015 | 1024 | ||
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index e87c32a5c86a..4eb851ece080 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -135,6 +135,8 @@ static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag) | |||
135 | 135 | ||
136 | #define U(x) ((x) ^ 0xf000) | 136 | #define U(x) ((x) ^ 0xf000) |
137 | 137 | ||
138 | #define BRL_UC_ROW 0x2800 | ||
139 | |||
138 | /* keyboard.c */ | 140 | /* keyboard.c */ |
139 | 141 | ||
140 | struct console; | 142 | struct console; |
diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index 08488042d74a..de76843bbe8a 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h | |||
@@ -44,6 +44,7 @@ extern unsigned short plain_map[NR_KEYS]; | |||
44 | #define KT_ASCII 9 | 44 | #define KT_ASCII 9 |
45 | #define KT_LOCK 10 | 45 | #define KT_LOCK 10 |
46 | #define KT_SLOCK 12 | 46 | #define KT_SLOCK 12 |
47 | #define KT_BRL 14 | ||
47 | 48 | ||
48 | #define K(t,v) (((t)<<8)|(v)) | 49 | #define K(t,v) (((t)<<8)|(v)) |
49 | #define KTYP(x) ((x) >> 8) | 50 | #define KTYP(x) ((x) >> 8) |
@@ -427,5 +428,17 @@ extern unsigned short plain_map[NR_KEYS]; | |||
427 | 428 | ||
428 | #define NR_LOCK 8 | 429 | #define NR_LOCK 8 |
429 | 430 | ||
431 | #define K_BRL_BLANK K(KT_BRL, 0) | ||
432 | #define K_BRL_DOT1 K(KT_BRL, 1) | ||
433 | #define K_BRL_DOT2 K(KT_BRL, 2) | ||
434 | #define K_BRL_DOT3 K(KT_BRL, 3) | ||
435 | #define K_BRL_DOT4 K(KT_BRL, 4) | ||
436 | #define K_BRL_DOT5 K(KT_BRL, 5) | ||
437 | #define K_BRL_DOT6 K(KT_BRL, 6) | ||
438 | #define K_BRL_DOT7 K(KT_BRL, 7) | ||
439 | #define K_BRL_DOT8 K(KT_BRL, 8) | ||
440 | |||
441 | #define NR_BRL 9 | ||
442 | |||
430 | #define MAX_DIACR 256 | 443 | #define MAX_DIACR 256 |
431 | #endif | 444 | #endif |
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index a710bddda4eb..08a450a9dbf7 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h | |||
@@ -28,7 +28,7 @@ struct ps2dev { | |||
28 | struct serio *serio; | 28 | struct serio *serio; |
29 | 29 | ||
30 | /* Ensures that only one command is executing at a time */ | 30 | /* Ensures that only one command is executing at a time */ |
31 | struct semaphore cmd_sem; | 31 | struct mutex cmd_mutex; |
32 | 32 | ||
33 | /* Used to signal completion from interrupt handler */ | 33 | /* Used to signal completion from interrupt handler */ |
34 | wait_queue_head_t wait; | 34 | wait_queue_head_t wait; |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 1350e47b0234..f6bdef82a322 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -142,6 +142,12 @@ struct xt_counters_info | |||
142 | #define ASSERT_WRITE_LOCK(x) | 142 | #define ASSERT_WRITE_LOCK(x) |
143 | #include <linux/netfilter_ipv4/listhelp.h> | 143 | #include <linux/netfilter_ipv4/listhelp.h> |
144 | 144 | ||
145 | #ifdef CONFIG_COMPAT | ||
146 | #define COMPAT_TO_USER 1 | ||
147 | #define COMPAT_FROM_USER -1 | ||
148 | #define COMPAT_CALC_SIZE 0 | ||
149 | #endif | ||
150 | |||
145 | struct xt_match | 151 | struct xt_match |
146 | { | 152 | { |
147 | struct list_head list; | 153 | struct list_head list; |
@@ -175,6 +181,9 @@ struct xt_match | |||
175 | void (*destroy)(const struct xt_match *match, void *matchinfo, | 181 | void (*destroy)(const struct xt_match *match, void *matchinfo, |
176 | unsigned int matchinfosize); | 182 | unsigned int matchinfosize); |
177 | 183 | ||
184 | /* Called when userspace align differs from kernel space one */ | ||
185 | int (*compat)(void *match, void **dstptr, int *size, int convert); | ||
186 | |||
178 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 187 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
179 | struct module *me; | 188 | struct module *me; |
180 | 189 | ||
@@ -220,6 +229,9 @@ struct xt_target | |||
220 | void (*destroy)(const struct xt_target *target, void *targinfo, | 229 | void (*destroy)(const struct xt_target *target, void *targinfo, |
221 | unsigned int targinfosize); | 230 | unsigned int targinfosize); |
222 | 231 | ||
232 | /* Called when userspace align differs from kernel space one */ | ||
233 | int (*compat)(void *target, void **dstptr, int *size, int convert); | ||
234 | |||
223 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 235 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
224 | struct module *me; | 236 | struct module *me; |
225 | 237 | ||
@@ -314,6 +326,61 @@ extern void xt_proto_fini(int af); | |||
314 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 326 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
315 | extern void xt_free_table_info(struct xt_table_info *info); | 327 | extern void xt_free_table_info(struct xt_table_info *info); |
316 | 328 | ||
329 | #ifdef CONFIG_COMPAT | ||
330 | #include <net/compat.h> | ||
331 | |||
332 | struct compat_xt_entry_match | ||
333 | { | ||
334 | union { | ||
335 | struct { | ||
336 | u_int16_t match_size; | ||
337 | char name[XT_FUNCTION_MAXNAMELEN - 1]; | ||
338 | u_int8_t revision; | ||
339 | } user; | ||
340 | u_int16_t match_size; | ||
341 | } u; | ||
342 | unsigned char data[0]; | ||
343 | }; | ||
344 | |||
345 | struct compat_xt_entry_target | ||
346 | { | ||
347 | union { | ||
348 | struct { | ||
349 | u_int16_t target_size; | ||
350 | char name[XT_FUNCTION_MAXNAMELEN - 1]; | ||
351 | u_int8_t revision; | ||
352 | } user; | ||
353 | u_int16_t target_size; | ||
354 | } u; | ||
355 | unsigned char data[0]; | ||
356 | }; | ||
357 | |||
358 | /* FIXME: this works only on 32 bit tasks | ||
359 | * need to change whole approach in order to calculate align as function of | ||
360 | * current task alignment */ | ||
361 | |||
362 | struct compat_xt_counters | ||
363 | { | ||
364 | u_int32_t cnt[4]; | ||
365 | }; | ||
366 | |||
367 | struct compat_xt_counters_info | ||
368 | { | ||
369 | char name[XT_TABLE_MAXNAMELEN]; | ||
370 | compat_uint_t num_counters; | ||
371 | struct compat_xt_counters counters[0]; | ||
372 | }; | ||
373 | |||
374 | #define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \ | ||
375 | & ~(__alignof__(struct compat_xt_counters)-1)) | ||
376 | |||
377 | extern void xt_compat_lock(int af); | ||
378 | extern void xt_compat_unlock(int af); | ||
379 | extern int xt_compat_match(void *match, void **dstptr, int *size, int convert); | ||
380 | extern int xt_compat_target(void *target, void **dstptr, int *size, | ||
381 | int convert); | ||
382 | |||
383 | #endif /* CONFIG_COMPAT */ | ||
317 | #endif /* __KERNEL__ */ | 384 | #endif /* __KERNEL__ */ |
318 | 385 | ||
319 | #endif /* _X_TABLES_H */ | 386 | #endif /* _X_TABLES_H */ |
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h new file mode 100644 index 000000000000..9380fb1c27da --- /dev/null +++ b/include/linux/netfilter/xt_esp.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _XT_ESP_H | ||
2 | #define _XT_ESP_H | ||
3 | |||
4 | struct xt_esp | ||
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | |||
10 | /* Values for "invflags" field in struct xt_esp. */ | ||
11 | #define XT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
12 | #define XT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
13 | |||
14 | #endif /*_XT_ESP_H*/ | ||
diff --git a/include/linux/netfilter/xt_multiport.h b/include/linux/netfilter/xt_multiport.h new file mode 100644 index 000000000000..d49ee4183710 --- /dev/null +++ b/include/linux/netfilter/xt_multiport.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef _XT_MULTIPORT_H | ||
2 | #define _XT_MULTIPORT_H | ||
3 | |||
4 | enum xt_multiport_flags | ||
5 | { | ||
6 | XT_MULTIPORT_SOURCE, | ||
7 | XT_MULTIPORT_DESTINATION, | ||
8 | XT_MULTIPORT_EITHER | ||
9 | }; | ||
10 | |||
11 | #define XT_MULTI_PORTS 15 | ||
12 | |||
13 | /* Must fit inside union xt_matchinfo: 16 bytes */ | ||
14 | struct xt_multiport | ||
15 | { | ||
16 | u_int8_t flags; /* Type of comparison */ | ||
17 | u_int8_t count; /* Number of ports */ | ||
18 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | ||
19 | }; | ||
20 | |||
21 | struct xt_multiport_v1 | ||
22 | { | ||
23 | u_int8_t flags; /* Type of comparison */ | ||
24 | u_int8_t count; /* Number of ports */ | ||
25 | u_int16_t ports[XT_MULTI_PORTS]; /* Ports */ | ||
26 | u_int8_t pflags[XT_MULTI_PORTS]; /* Port flags */ | ||
27 | u_int8_t invert; /* Invert flag */ | ||
28 | }; | ||
29 | |||
30 | #endif /*_XT_MULTIPORT_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index d5b8c0d6a12b..c0dac16e1902 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -316,5 +316,23 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb, | |||
316 | void *userdata); | 316 | void *userdata); |
317 | 317 | ||
318 | #define IPT_ALIGN(s) XT_ALIGN(s) | 318 | #define IPT_ALIGN(s) XT_ALIGN(s) |
319 | |||
320 | #ifdef CONFIG_COMPAT | ||
321 | #include <net/compat.h> | ||
322 | |||
323 | struct compat_ipt_entry | ||
324 | { | ||
325 | struct ipt_ip ip; | ||
326 | compat_uint_t nfcache; | ||
327 | u_int16_t target_offset; | ||
328 | u_int16_t next_offset; | ||
329 | compat_uint_t comefrom; | ||
330 | struct compat_xt_counters counters; | ||
331 | unsigned char elems[0]; | ||
332 | }; | ||
333 | |||
334 | #define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s) | ||
335 | |||
336 | #endif /* CONFIG_COMPAT */ | ||
319 | #endif /*__KERNEL__*/ | 337 | #endif /*__KERNEL__*/ |
320 | #endif /* _IPTABLES_H */ | 338 | #endif /* _IPTABLES_H */ |
diff --git a/include/linux/netfilter_ipv4/ipt_esp.h b/include/linux/netfilter_ipv4/ipt_esp.h index c782a83e53e0..78296e7eeff9 100644 --- a/include/linux/netfilter_ipv4/ipt_esp.h +++ b/include/linux/netfilter_ipv4/ipt_esp.h | |||
@@ -1,16 +1,10 @@ | |||
1 | #ifndef _IPT_ESP_H | 1 | #ifndef _IPT_ESP_H |
2 | #define _IPT_ESP_H | 2 | #define _IPT_ESP_H |
3 | 3 | ||
4 | struct ipt_esp | 4 | #include <linux/netfilter/xt_esp.h> |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | 5 | ||
10 | 6 | #define ipt_esp xt_esp | |
11 | 7 | #define IPT_ESP_INV_SPI XT_ESP_INV_SPI | |
12 | /* Values for "invflags" field in struct ipt_esp. */ | 8 | #define IPT_ESP_INV_MASK XT_ESP_INV_MASK |
13 | #define IPT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
14 | #define IPT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
15 | 9 | ||
16 | #endif /*_IPT_ESP_H*/ | 10 | #endif /*_IPT_ESP_H*/ |
diff --git a/include/linux/netfilter_ipv4/ipt_multiport.h b/include/linux/netfilter_ipv4/ipt_multiport.h index e6b6fff811df..55fe85eca88c 100644 --- a/include/linux/netfilter_ipv4/ipt_multiport.h +++ b/include/linux/netfilter_ipv4/ipt_multiport.h | |||
@@ -1,30 +1,15 @@ | |||
1 | #ifndef _IPT_MULTIPORT_H | 1 | #ifndef _IPT_MULTIPORT_H |
2 | #define _IPT_MULTIPORT_H | 2 | #define _IPT_MULTIPORT_H |
3 | #include <linux/netfilter_ipv4/ip_tables.h> | ||
4 | 3 | ||
5 | enum ipt_multiport_flags | 4 | #include <linux/netfilter/xt_multiport.h> |
6 | { | ||
7 | IPT_MULTIPORT_SOURCE, | ||
8 | IPT_MULTIPORT_DESTINATION, | ||
9 | IPT_MULTIPORT_EITHER | ||
10 | }; | ||
11 | 5 | ||
12 | #define IPT_MULTI_PORTS 15 | 6 | #define IPT_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE |
7 | #define IPT_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IPT_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
13 | 9 | ||
14 | /* Must fit inside union ipt_matchinfo: 16 bytes */ | 10 | #define IPT_MULTI_PORTS XT_MULTI_PORTS |
15 | struct ipt_multiport | 11 | |
16 | { | 12 | #define ipt_multiport xt_multiport |
17 | u_int8_t flags; /* Type of comparison */ | 13 | #define ipt_multiport_v1 xt_multiport_v1 |
18 | u_int8_t count; /* Number of ports */ | ||
19 | u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ | ||
20 | }; | ||
21 | 14 | ||
22 | struct ipt_multiport_v1 | ||
23 | { | ||
24 | u_int8_t flags; /* Type of comparison */ | ||
25 | u_int8_t count; /* Number of ports */ | ||
26 | u_int16_t ports[IPT_MULTI_PORTS]; /* Ports */ | ||
27 | u_int8_t pflags[IPT_MULTI_PORTS]; /* Port flags */ | ||
28 | u_int8_t invert; /* Invert flag */ | ||
29 | }; | ||
30 | #endif /*_IPT_MULTIPORT_H*/ | 15 | #endif /*_IPT_MULTIPORT_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6t_esp.h b/include/linux/netfilter_ipv6/ip6t_esp.h index a91b6abc8079..f62eaf53c16c 100644 --- a/include/linux/netfilter_ipv6/ip6t_esp.h +++ b/include/linux/netfilter_ipv6/ip6t_esp.h | |||
@@ -1,14 +1,10 @@ | |||
1 | #ifndef _IP6T_ESP_H | 1 | #ifndef _IP6T_ESP_H |
2 | #define _IP6T_ESP_H | 2 | #define _IP6T_ESP_H |
3 | 3 | ||
4 | struct ip6t_esp | 4 | #include <linux/netfilter/xt_esp.h> |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
7 | u_int8_t invflags; /* Inverse flags */ | ||
8 | }; | ||
9 | 5 | ||
10 | /* Values for "invflags" field in struct ip6t_esp. */ | 6 | #define ip6t_esp xt_esp |
11 | #define IP6T_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | 7 | #define IP6T_ESP_INV_SPI XT_ESP_INV_SPI |
12 | #define IP6T_ESP_INV_MASK 0x01 /* All possible flags. */ | 8 | #define IP6T_ESP_INV_MASK XT_ESP_INV_MASK |
13 | 9 | ||
14 | #endif /*_IP6T_ESP_H*/ | 10 | #endif /*_IP6T_ESP_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6t_multiport.h b/include/linux/netfilter_ipv6/ip6t_multiport.h index efe4954a8681..042c92661cee 100644 --- a/include/linux/netfilter_ipv6/ip6t_multiport.h +++ b/include/linux/netfilter_ipv6/ip6t_multiport.h | |||
@@ -1,21 +1,14 @@ | |||
1 | #ifndef _IP6T_MULTIPORT_H | 1 | #ifndef _IP6T_MULTIPORT_H |
2 | #define _IP6T_MULTIPORT_H | 2 | #define _IP6T_MULTIPORT_H |
3 | #include <linux/netfilter_ipv6/ip6_tables.h> | ||
4 | 3 | ||
5 | enum ip6t_multiport_flags | 4 | #include <linux/netfilter/xt_multiport.h> |
6 | { | ||
7 | IP6T_MULTIPORT_SOURCE, | ||
8 | IP6T_MULTIPORT_DESTINATION, | ||
9 | IP6T_MULTIPORT_EITHER | ||
10 | }; | ||
11 | 5 | ||
12 | #define IP6T_MULTI_PORTS 15 | 6 | #define IP6T_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE |
7 | #define IP6T_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IP6T_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
13 | 9 | ||
14 | /* Must fit inside union ip6t_matchinfo: 16 bytes */ | 10 | #define IP6T_MULTI_PORTS XT_MULTI_PORTS |
15 | struct ip6t_multiport | 11 | |
16 | { | 12 | #define ip6t_multiport xt_multiport |
17 | u_int8_t flags; /* Type of comparison */ | 13 | |
18 | u_int8_t count; /* Number of ports */ | 14 | #endif /*_IP6T_MULTIPORT_H*/ |
19 | u_int16_t ports[IP6T_MULTI_PORTS]; /* Ports */ | ||
20 | }; | ||
21 | #endif /*_IPT_MULTIPORT_H*/ | ||
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 75c7f55023ab..d218fc729319 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -60,5 +60,8 @@ void free_pipe_info(struct inode* inode); | |||
60 | * add the splice flags here. | 60 | * add the splice flags here. |
61 | */ | 61 | */ |
62 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | 62 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ |
63 | #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ | ||
64 | /* we may still block on the fd we splice */ | ||
65 | /* from/to, of course */ | ||
63 | 66 | ||
64 | #endif | 67 | #endif |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 690aabca8ed0..6348e8330897 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/mutex.h> | ||
21 | #include <linux/device.h> | 22 | #include <linux/device.h> |
22 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
23 | 24 | ||
@@ -42,7 +43,7 @@ struct serio { | |||
42 | struct serio *parent, *child; | 43 | struct serio *parent, *child; |
43 | 44 | ||
44 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ | 45 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ |
45 | struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ | 46 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
46 | 47 | ||
47 | struct device dev; | 48 | struct device dev; |
48 | unsigned int registered; /* port has been fully registered with driver core */ | 49 | unsigned int registered; /* port has been fully registered with driver core */ |
@@ -151,17 +152,17 @@ static inline void serio_continue_rx(struct serio *serio) | |||
151 | */ | 152 | */ |
152 | static inline int serio_pin_driver(struct serio *serio) | 153 | static inline int serio_pin_driver(struct serio *serio) |
153 | { | 154 | { |
154 | return down_interruptible(&serio->drv_sem); | 155 | return mutex_lock_interruptible(&serio->drv_mutex); |
155 | } | 156 | } |
156 | 157 | ||
157 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) | 158 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) |
158 | { | 159 | { |
159 | down(&serio->drv_sem); | 160 | mutex_lock(&serio->drv_mutex); |
160 | } | 161 | } |
161 | 162 | ||
162 | static inline void serio_unpin_driver(struct serio *serio) | 163 | static inline void serio_unpin_driver(struct serio *serio) |
163 | { | 164 | { |
164 | up(&serio->drv_sem); | 165 | mutex_unlock(&serio->drv_mutex); |
165 | } | 166 | } |
166 | 167 | ||
167 | 168 | ||
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 0ff7ca68e5c5..7168302f9844 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | * | 21 | * |
22 | * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> | 22 | * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> |
23 | * | 23 | * |
24 | * Changes/Revisions: | 24 | * Changes/Revisions: |
25 | * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) | 25 | * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) |
26 | * - added force feedback support | 26 | * - added force feedback support |
@@ -51,7 +51,7 @@ struct uinput_request { | |||
51 | 51 | ||
52 | struct uinput_device { | 52 | struct uinput_device { |
53 | struct input_dev *dev; | 53 | struct input_dev *dev; |
54 | struct semaphore sem; | 54 | struct mutex mutex; |
55 | enum uinput_state state; | 55 | enum uinput_state state; |
56 | wait_queue_head_t waitq; | 56 | wait_queue_head_t waitq; |
57 | unsigned char ready; | 57 | unsigned char ready; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index af2d6155d3fe..d7670ec1ec1e 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -966,66 +966,17 @@ struct v4l2_sliced_vbi_format | |||
966 | 966 | ||
967 | /* Teletext World System Teletext | 967 | /* Teletext World System Teletext |
968 | (WST), defined on ITU-R BT.653-2 */ | 968 | (WST), defined on ITU-R BT.653-2 */ |
969 | #define V4L2_SLICED_TELETEXT_PAL_B (0x000001) | 969 | #define V4L2_SLICED_TELETEXT_B (0x0001) |
970 | #define V4L2_SLICED_TELETEXT_PAL_C (0x000002) | ||
971 | #define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) | ||
972 | #define V4L2_SLICED_TELETEXT_SECAM (0x000020) | ||
973 | |||
974 | /* Teletext North American Broadcast Teletext Specification | ||
975 | (NABTS), defined on ITU-R BT.653-2 */ | ||
976 | #define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) | ||
977 | #define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) | ||
978 | |||
979 | /* Video Program System, defined on ETS 300 231*/ | 970 | /* Video Program System, defined on ETS 300 231*/ |
980 | #define V4L2_SLICED_VPS (0x000400) | 971 | #define V4L2_SLICED_VPS (0x0400) |
981 | |||
982 | /* Closed Caption, defined on EIA-608 */ | 972 | /* Closed Caption, defined on EIA-608 */ |
983 | #define V4L2_SLICED_CAPTION_525 (0x001000) | 973 | #define V4L2_SLICED_CAPTION_525 (0x1000) |
984 | #define V4L2_SLICED_CAPTION_625 (0x002000) | ||
985 | |||
986 | /* Wide Screen System, defined on ITU-R BT1119.1 */ | 974 | /* Wide Screen System, defined on ITU-R BT1119.1 */ |
987 | #define V4L2_SLICED_WSS_625 (0x004000) | 975 | #define V4L2_SLICED_WSS_625 (0x4000) |
988 | 976 | ||
989 | /* Wide Screen System, defined on IEC 61880 */ | 977 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) |
990 | #define V4L2_SLICED_WSS_525 (0x008000) | 978 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) |
991 | 979 | ||
992 | /* Vertical Interval Timecode (VITC), defined on SMPTE 12M */ | ||
993 | #define V4l2_SLICED_VITC_625 (0x010000) | ||
994 | #define V4l2_SLICED_VITC_525 (0x020000) | ||
995 | |||
996 | #define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
997 | V4L2_SLICED_TELETEXT_NTSC_B) | ||
998 | |||
999 | #define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1000 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1001 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1002 | V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1003 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1004 | V4L2_SLICED_TELETEXT_NTSC_D) | ||
1005 | |||
1006 | #define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\ | ||
1007 | V4L2_SLICED_CAPTION_625) | ||
1008 | |||
1009 | #define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\ | ||
1010 | V4L2_SLICED_WSS_625) | ||
1011 | |||
1012 | #define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\ | ||
1013 | V4L2_SLICED_VITC_625) | ||
1014 | |||
1015 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ | ||
1016 | V4L2_SLICED_TELETEXT_NTSC_C |\ | ||
1017 | V4L2_SLICED_TELETEXT_NTSC_D |\ | ||
1018 | V4L2_SLICED_CAPTION_525 |\ | ||
1019 | V4L2_SLICED_WSS_525 |\ | ||
1020 | V4l2_SLICED_VITC_525) | ||
1021 | |||
1022 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_PAL_B |\ | ||
1023 | V4L2_SLICED_TELETEXT_PAL_C |\ | ||
1024 | V4L2_SLICED_TELETEXT_SECAM |\ | ||
1025 | V4L2_SLICED_VPS |\ | ||
1026 | V4L2_SLICED_CAPTION_625 |\ | ||
1027 | V4L2_SLICED_WSS_625 |\ | ||
1028 | V4l2_SLICED_VITC_625) | ||
1029 | 980 | ||
1030 | struct v4l2_sliced_vbi_cap | 981 | struct v4l2_sliced_vbi_cap |
1031 | { | 982 | { |
diff --git a/include/media/cx25840.h b/include/media/cx25840.h new file mode 100644 index 000000000000..8e7e52d659a0 --- /dev/null +++ b/include/media/cx25840.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | cx25840.h - definition for cx25840/1/2/3 inputs | ||
3 | |||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | ||
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; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _CX25840_H_ | ||
22 | #define _CX25840_H_ | ||
23 | |||
24 | enum cx25840_video_input { | ||
25 | /* Composite video inputs In1-In8 */ | ||
26 | CX25840_COMPOSITE1 = 1, | ||
27 | CX25840_COMPOSITE2, | ||
28 | CX25840_COMPOSITE3, | ||
29 | CX25840_COMPOSITE4, | ||
30 | CX25840_COMPOSITE5, | ||
31 | CX25840_COMPOSITE6, | ||
32 | CX25840_COMPOSITE7, | ||
33 | CX25840_COMPOSITE8, | ||
34 | |||
35 | /* S-Video inputs consist of one luma input (In1-In4) ORed with one | ||
36 | chroma input (In5-In8) */ | ||
37 | CX25840_SVIDEO_LUMA1 = 0x10, | ||
38 | CX25840_SVIDEO_LUMA2 = 0x20, | ||
39 | CX25840_SVIDEO_LUMA3 = 0x30, | ||
40 | CX25840_SVIDEO_LUMA4 = 0x40, | ||
41 | CX25840_SVIDEO_CHROMA4 = 0x400, | ||
42 | CX25840_SVIDEO_CHROMA5 = 0x500, | ||
43 | CX25840_SVIDEO_CHROMA6 = 0x600, | ||
44 | CX25840_SVIDEO_CHROMA7 = 0x700, | ||
45 | CX25840_SVIDEO_CHROMA8 = 0x800, | ||
46 | |||
47 | /* S-Video aliases for common luma/chroma combinations */ | ||
48 | CX25840_SVIDEO1 = 0x510, | ||
49 | CX25840_SVIDEO2 = 0x620, | ||
50 | CX25840_SVIDEO3 = 0x730, | ||
51 | CX25840_SVIDEO4 = 0x840, | ||
52 | }; | ||
53 | |||
54 | enum cx25840_audio_input { | ||
55 | /* Audio inputs: serial or In4-In8 */ | ||
56 | CX25840_AUDIO_SERIAL, | ||
57 | CX25840_AUDIO4 = 4, | ||
58 | CX25840_AUDIO5, | ||
59 | CX25840_AUDIO6, | ||
60 | CX25840_AUDIO7, | ||
61 | CX25840_AUDIO8, | ||
62 | }; | ||
63 | |||
64 | #endif | ||
diff --git a/include/media/msp3400.h b/include/media/msp3400.h index 0be61a021d45..6ab854931c05 100644 --- a/include/media/msp3400.h +++ b/include/media/msp3400.h | |||
@@ -80,16 +80,16 @@ | |||
80 | */ | 80 | */ |
81 | 81 | ||
82 | /* SCART input to DSP selection */ | 82 | /* SCART input to DSP selection */ |
83 | #define MSP_IN_SCART_1 0 /* Pin SC1_IN */ | 83 | #define MSP_IN_SCART1 0 /* Pin SC1_IN */ |
84 | #define MSP_IN_SCART_2 1 /* Pin SC2_IN */ | 84 | #define MSP_IN_SCART2 1 /* Pin SC2_IN */ |
85 | #define MSP_IN_SCART_3 2 /* Pin SC3_IN */ | 85 | #define MSP_IN_SCART3 2 /* Pin SC3_IN */ |
86 | #define MSP_IN_SCART_4 3 /* Pin SC4_IN */ | 86 | #define MSP_IN_SCART4 3 /* Pin SC4_IN */ |
87 | #define MSP_IN_MONO 6 /* Pin MONO_IN */ | 87 | #define MSP_IN_MONO 6 /* Pin MONO_IN */ |
88 | #define MSP_IN_MUTE 7 /* Mute DSP input */ | 88 | #define MSP_IN_MUTE 7 /* Mute DSP input */ |
89 | #define MSP_SCART_TO_DSP(in) (in) | 89 | #define MSP_SCART_TO_DSP(in) (in) |
90 | /* Tuner input to demodulator and DSP selection */ | 90 | /* Tuner input to demodulator and DSP selection */ |
91 | #define MSP_IN_TUNER_1 0 /* Analog Sound IF input pin ANA_IN1 */ | 91 | #define MSP_IN_TUNER1 0 /* Analog Sound IF input pin ANA_IN1 */ |
92 | #define MSP_IN_TUNER_2 1 /* Analog Sound IF input pin ANA_IN2 */ | 92 | #define MSP_IN_TUNER2 1 /* Analog Sound IF input pin ANA_IN2 */ |
93 | #define MSP_TUNER_TO_DSP(in) ((in) << 3) | 93 | #define MSP_TUNER_TO_DSP(in) ((in) << 3) |
94 | 94 | ||
95 | /* The msp has up to 5 DSP outputs, each output can independently select | 95 | /* The msp has up to 5 DSP outputs, each output can independently select |
@@ -109,14 +109,14 @@ | |||
109 | DSP. This is currently not implemented. Also not implemented is the | 109 | DSP. This is currently not implemented. Also not implemented is the |
110 | multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate | 110 | multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate |
111 | a need for one of those features then additional support can be added. */ | 111 | a need for one of those features then additional support can be added. */ |
112 | #define MSP_DSP_OUT_TUNER 0 /* Tuner output */ | 112 | #define MSP_DSP_IN_TUNER 0 /* Tuner DSP input */ |
113 | #define MSP_DSP_OUT_SCART 2 /* SCART output */ | 113 | #define MSP_DSP_IN_SCART 2 /* SCART DSP input */ |
114 | #define MSP_DSP_OUT_I2S1 5 /* I2S1 output */ | 114 | #define MSP_DSP_IN_I2S1 5 /* I2S1 DSP input */ |
115 | #define MSP_DSP_OUT_I2S2 6 /* I2S2 output */ | 115 | #define MSP_DSP_IN_I2S2 6 /* I2S2 DSP input */ |
116 | #define MSP_DSP_OUT_I2S3 7 /* I2S3 output */ | 116 | #define MSP_DSP_IN_I2S3 7 /* I2S3 DSP input */ |
117 | #define MSP_DSP_OUT_MAIN_AVC 11 /* MAIN AVC processed output */ | 117 | #define MSP_DSP_IN_MAIN_AVC 11 /* MAIN AVC processed DSP input */ |
118 | #define MSP_DSP_OUT_MAIN 12 /* MAIN output */ | 118 | #define MSP_DSP_IN_MAIN 12 /* MAIN DSP input */ |
119 | #define MSP_DSP_OUT_AUX 13 /* AUX output */ | 119 | #define MSP_DSP_IN_AUX 13 /* AUX DSP input */ |
120 | #define MSP_DSP_TO_MAIN(in) ((in) << 4) | 120 | #define MSP_DSP_TO_MAIN(in) ((in) << 4) |
121 | #define MSP_DSP_TO_AUX(in) ((in) << 8) | 121 | #define MSP_DSP_TO_AUX(in) ((in) << 8) |
122 | #define MSP_DSP_TO_SCART1(in) ((in) << 12) | 122 | #define MSP_DSP_TO_SCART1(in) ((in) << 12) |
@@ -125,16 +125,16 @@ | |||
125 | 125 | ||
126 | /* Output SCART select: the SCART outputs can select which input | 126 | /* Output SCART select: the SCART outputs can select which input |
127 | to use. */ | 127 | to use. */ |
128 | #define MSP_OUT_SCART1 0 /* SCART1 input, bypassing the DSP */ | 128 | #define MSP_SC_IN_SCART1 0 /* SCART1 input, bypassing the DSP */ |
129 | #define MSP_OUT_SCART2 1 /* SCART2 input, bypassing the DSP */ | 129 | #define MSP_SC_IN_SCART2 1 /* SCART2 input, bypassing the DSP */ |
130 | #define MSP_OUT_SCART3 2 /* SCART3 input, bypassing the DSP */ | 130 | #define MSP_SC_IN_SCART3 2 /* SCART3 input, bypassing the DSP */ |
131 | #define MSP_OUT_SCART4 3 /* SCART4 input, bypassing the DSP */ | 131 | #define MSP_SC_IN_SCART4 3 /* SCART4 input, bypassing the DSP */ |
132 | #define MSP_OUT_SCART1_DA 4 /* DSP SCART1 output */ | 132 | #define MSP_SC_IN_DSP_SCART1 4 /* DSP SCART1 input */ |
133 | #define MSP_OUT_SCART2_DA 5 /* DSP SCART2 output */ | 133 | #define MSP_SC_IN_DSP_SCART2 5 /* DSP SCART2 input */ |
134 | #define MSP_OUT_MONO 6 /* MONO input, bypassing the DSP */ | 134 | #define MSP_SC_IN_MONO 6 /* MONO input, bypassing the DSP */ |
135 | #define MSP_OUT_MUTE 7 /* MUTE output */ | 135 | #define MSP_SC_IN_MUTE 7 /* MUTE output */ |
136 | #define MSP_OUT_TO_SCART1(in) (in) | 136 | #define MSP_SC_TO_SCART1(in) (in) |
137 | #define MSP_OUT_TO_SCART2(in) ((in) << 4) | 137 | #define MSP_SC_TO_SCART2(in) ((in) << 4) |
138 | 138 | ||
139 | /* Shortcut macros */ | 139 | /* Shortcut macros */ |
140 | #define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \ | 140 | #define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \ |
@@ -145,14 +145,14 @@ | |||
145 | MSP_DSP_TO_SCART1(sc_i2s_src) | \ | 145 | MSP_DSP_TO_SCART1(sc_i2s_src) | \ |
146 | MSP_DSP_TO_SCART2(sc_i2s_src) | \ | 146 | MSP_DSP_TO_SCART2(sc_i2s_src) | \ |
147 | MSP_DSP_TO_I2S(sc_i2s_src)) | 147 | MSP_DSP_TO_I2S(sc_i2s_src)) |
148 | #define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, \ | 148 | #define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \ |
149 | MSP_DSP_OUT_TUNER, MSP_DSP_OUT_TUNER) | 149 | MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER) |
150 | #define MSP_OUTPUT(sc) \ | 150 | #define MSP_OUTPUT(sc) \ |
151 | (MSP_OUT_TO_SCART1(sc) | \ | 151 | (MSP_SC_TO_SCART1(sc) | \ |
152 | MSP_OUT_TO_SCART2(sc)) | 152 | MSP_SC_TO_SCART2(sc)) |
153 | /* This equals the RESET position of the msp3400 ACB register */ | 153 | /* This equals the RESET position of the msp3400 ACB register */ |
154 | #define MSP_OUTPUT_DEFAULT (MSP_OUT_TO_SCART1(MSP_OUT_SCART3) | \ | 154 | #define MSP_OUTPUT_DEFAULT (MSP_SC_TO_SCART1(MSP_SC_IN_SCART3) | \ |
155 | MSP_OUT_TO_SCART2(MSP_OUT_SCART1_DA)) | 155 | MSP_SC_TO_SCART2(MSP_SC_IN_DSP_SCART1)) |
156 | 156 | ||
157 | /* Tuner inputs vs. msp version */ | 157 | /* Tuner inputs vs. msp version */ |
158 | /* Chip TUNER_1 TUNER_2 | 158 | /* Chip TUNER_1 TUNER_2 |
diff --git a/include/media/saa7115.h b/include/media/saa7115.h new file mode 100644 index 000000000000..6b4836f3f057 --- /dev/null +++ b/include/media/saa7115.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | saa7115.h - definition for saa7113/4/5 inputs | ||
3 | |||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | ||
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; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _SAA7115_H_ | ||
22 | #define _SAA7115_H_ | ||
23 | |||
24 | /* SAA7113/4/5 HW inputs */ | ||
25 | #define SAA7115_COMPOSITE0 0 | ||
26 | #define SAA7115_COMPOSITE1 1 | ||
27 | #define SAA7115_COMPOSITE2 2 | ||
28 | #define SAA7115_COMPOSITE3 3 | ||
29 | #define SAA7115_COMPOSITE4 4 /* not available for the saa7113 */ | ||
30 | #define SAA7115_COMPOSITE5 5 /* not available for the saa7113 */ | ||
31 | #define SAA7115_SVIDEO0 6 | ||
32 | #define SAA7115_SVIDEO1 7 | ||
33 | #define SAA7115_SVIDEO2 8 | ||
34 | #define SAA7115_SVIDEO3 9 | ||
35 | |||
36 | #endif | ||
37 | |||
diff --git a/include/media/saa7127.h b/include/media/saa7127.h new file mode 100644 index 000000000000..bbcf862141af --- /dev/null +++ b/include/media/saa7127.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | saa7127.h - definition for saa7126/7/8/9 inputs/outputs | ||
3 | |||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | ||
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; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _SAA7127_H_ | ||
22 | #define _SAA7127_H_ | ||
23 | |||
24 | /* Enumeration for the supported input types */ | ||
25 | enum saa7127_input_type { | ||
26 | SAA7127_INPUT_TYPE_NORMAL, | ||
27 | SAA7127_INPUT_TYPE_TEST_IMAGE | ||
28 | }; | ||
29 | |||
30 | /* Enumeration for the supported output signal types */ | ||
31 | enum saa7127_output_type { | ||
32 | SAA7127_OUTPUT_TYPE_BOTH, | ||
33 | SAA7127_OUTPUT_TYPE_COMPOSITE, | ||
34 | SAA7127_OUTPUT_TYPE_SVIDEO, | ||
35 | SAA7127_OUTPUT_TYPE_RGB, | ||
36 | SAA7127_OUTPUT_TYPE_YUV_C, | ||
37 | SAA7127_OUTPUT_TYPE_YUV_V | ||
38 | }; | ||
39 | |||
40 | #endif | ||
41 | |||
diff --git a/include/media/upd64031a.h b/include/media/upd64031a.h new file mode 100644 index 000000000000..3ad6a32e1bce --- /dev/null +++ b/include/media/upd64031a.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * upd64031a - NEC Electronics Ghost Reduction input defines | ||
3 | * | ||
4 | * 2006 by Hans Verkuil (hverkuil@xs4all.nl) | ||
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 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _UPD64031A_H_ | ||
22 | #define _UPD64031A_H_ | ||
23 | |||
24 | /* Ghost reduction modes */ | ||
25 | #define UPD64031A_GR_ON 0 | ||
26 | #define UPD64031A_GR_OFF 1 | ||
27 | #define UPD64031A_GR_THROUGH 3 | ||
28 | |||
29 | /* Direct 3D/YCS Connection */ | ||
30 | #define UPD64031A_3DYCS_DISABLE (0 << 2) | ||
31 | #define UPD64031A_3DYCS_COMPOSITE (2 << 2) | ||
32 | #define UPD64031A_3DYCS_SVIDEO (3 << 2) | ||
33 | |||
34 | /* Composite sync digital separation circuit */ | ||
35 | #define UPD64031A_COMPOSITE_EXTERNAL (1 << 4) | ||
36 | |||
37 | /* Vertical sync digital separation circuit */ | ||
38 | #define UPD64031A_VERTICAL_EXTERNAL (1 << 5) | ||
39 | |||
40 | #endif | ||
diff --git a/include/media/upd64083.h b/include/media/upd64083.h new file mode 100644 index 000000000000..59b6f32ba300 --- /dev/null +++ b/include/media/upd64083.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * upd6408x - NEC Electronics 3-Dimensional Y/C separation input defines | ||
3 | * | ||
4 | * 2006 by Hans Verkuil (hverkuil@xs4all.nl) | ||
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 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _UPD64083_H_ | ||
22 | #define _UPD64083_H_ | ||
23 | |||
24 | /* There are two bits of information that the driver needs in order | ||
25 | to select the correct routing: the operating mode and the selection | ||
26 | of the Y input (external or internal). | ||
27 | |||
28 | The first two operating modes expect a composite signal on the Y input, | ||
29 | the second two operating modes use both the Y and C inputs. | ||
30 | |||
31 | Normally YCS_MODE is used for tuner and composite inputs, and the | ||
32 | YCNR mode is used for S-Video inputs. | ||
33 | |||
34 | The external Y-ADC is selected when the composite input comes from a | ||
35 | upd64031a ghost reduction device. If this device is not present, or | ||
36 | the input is a S-Video signal, then the internal Y-ADC input should | ||
37 | be used. */ | ||
38 | |||
39 | /* Operating modes: */ | ||
40 | |||
41 | /* YCS mode: Y/C separation (burst locked clocking) */ | ||
42 | #define UPD64083_YCS_MODE 0 | ||
43 | /* YCS+ mode: 2D Y/C separation and YCNR (burst locked clocking) */ | ||
44 | #define UPD64083_YCS_PLUS_MODE 1 | ||
45 | |||
46 | /* Note: the following two modes cannot be used in combination with the | ||
47 | external Y-ADC. */ | ||
48 | /* MNNR mode: frame comb type YNR+C delay (line locked clocking) */ | ||
49 | #define UPD64083_MNNR_MODE 2 | ||
50 | /* YCNR mode: frame recursive YCNR (burst locked clocking) */ | ||
51 | #define UPD64083_YCNR_MODE 3 | ||
52 | |||
53 | /* Select external Y-ADC: this should be set if this device is used in | ||
54 | combination with the upd64031a ghost reduction device. | ||
55 | Otherwise leave at 0 (use internal Y-ADC). */ | ||
56 | #define UPD64083_EXT_Y_ADC (1 << 2) | ||
57 | |||
58 | #endif | ||
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index e100291e43f4..0d5529c382e8 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -242,7 +242,6 @@ extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo); | |||
242 | 242 | ||
243 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); | 243 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); |
244 | 244 | ||
245 | struct xfrm_decap_state; | ||
246 | struct xfrm_type | 245 | struct xfrm_type |
247 | { | 246 | { |
248 | char *description; | 247 | char *description; |
@@ -251,7 +250,7 @@ struct xfrm_type | |||
251 | 250 | ||
252 | int (*init_state)(struct xfrm_state *x); | 251 | int (*init_state)(struct xfrm_state *x); |
253 | void (*destructor)(struct xfrm_state *); | 252 | void (*destructor)(struct xfrm_state *); |
254 | int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); | 253 | int (*input)(struct xfrm_state *, struct sk_buff *skb); |
255 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); | 254 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); |
256 | /* Estimate maximal size of result of transformation of a dgram */ | 255 | /* Estimate maximal size of result of transformation of a dgram */ |
257 | u32 (*get_max_size)(struct xfrm_state *, int size); | 256 | u32 (*get_max_size)(struct xfrm_state *, int size); |
@@ -606,25 +605,11 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) | |||
606 | 605 | ||
607 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); | 606 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); |
608 | 607 | ||
609 | /* Decapsulation state, used by the input to store data during | ||
610 | * decapsulation procedure, to be used later (during the policy | ||
611 | * check | ||
612 | */ | ||
613 | struct xfrm_decap_state { | ||
614 | char decap_data[20]; | ||
615 | __u16 decap_type; | ||
616 | }; | ||
617 | |||
618 | struct sec_decap_state { | ||
619 | struct xfrm_state *xvec; | ||
620 | struct xfrm_decap_state decap; | ||
621 | }; | ||
622 | |||
623 | struct sec_path | 608 | struct sec_path |
624 | { | 609 | { |
625 | atomic_t refcnt; | 610 | atomic_t refcnt; |
626 | int len; | 611 | int len; |
627 | struct sec_decap_state x[XFRM_MAX_DEPTH]; | 612 | struct xfrm_state *xvec[XFRM_MAX_DEPTH]; |
628 | }; | 613 | }; |
629 | 614 | ||
630 | static inline struct sec_path * | 615 | static inline struct sec_path * |
diff --git a/include/pcmcia/bulkmem.h b/include/pcmcia/bulkmem.h index b53b78d497ba..6bc7472293b2 100644 --- a/include/pcmcia/bulkmem.h +++ b/include/pcmcia/bulkmem.h | |||
@@ -35,7 +35,7 @@ typedef struct region_info_t { | |||
35 | #define REGION_BAR_MASK 0xe000 | 35 | #define REGION_BAR_MASK 0xe000 |
36 | #define REGION_BAR_SHIFT 13 | 36 | #define REGION_BAR_SHIFT 13 |
37 | 37 | ||
38 | int pcmcia_get_first_region(client_handle_t handle, region_info_t *rgn); | 38 | int pcmcia_get_first_region(struct pcmcia_device *handle, region_info_t *rgn); |
39 | int pcmcia_get_next_region(client_handle_t handle, region_info_t *rgn); | 39 | int pcmcia_get_next_region(struct pcmcia_device *handle, region_info_t *rgn); |
40 | 40 | ||
41 | #endif /* _LINUX_BULKMEM_H */ | 41 | #endif /* _LINUX_BULKMEM_H */ |
diff --git a/include/pcmcia/ciscode.h b/include/pcmcia/ciscode.h index da19c297dd65..c1da8558339a 100644 --- a/include/pcmcia/ciscode.h +++ b/include/pcmcia/ciscode.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * ciscode.h -- Definitions for bulk memory services | 2 | * ciscode.h |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
@@ -122,4 +122,7 @@ | |||
122 | 122 | ||
123 | #define MANFID_XIRCOM 0x0105 | 123 | #define MANFID_XIRCOM 0x0105 |
124 | 124 | ||
125 | #define MANFID_POSSIO 0x030c | ||
126 | #define PRODID_POSSIO_GCC 0x0003 | ||
127 | |||
125 | #endif /* _LINUX_CISCODE_H */ | 128 | #endif /* _LINUX_CISCODE_H */ |
diff --git a/include/pcmcia/cistpl.h b/include/pcmcia/cistpl.h index c6a069554fd7..d3bbb19caf81 100644 --- a/include/pcmcia/cistpl.h +++ b/include/pcmcia/cistpl.h | |||
@@ -586,12 +586,7 @@ typedef struct cisdump_t { | |||
586 | cisdata_t Data[CISTPL_MAX_CIS_SIZE]; | 586 | cisdata_t Data[CISTPL_MAX_CIS_SIZE]; |
587 | } cisdump_t; | 587 | } cisdump_t; |
588 | 588 | ||
589 | int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple); | ||
590 | int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple); | ||
591 | int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple); | ||
592 | int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse); | ||
593 | 589 | ||
594 | int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info); | ||
595 | int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); | 590 | int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis); |
596 | 591 | ||
597 | /* don't use outside of PCMCIA core yet */ | 592 | /* don't use outside of PCMCIA core yet */ |
@@ -602,4 +597,20 @@ int pccard_parse_tuple(tuple_t *tuple, cisparse_t *parse); | |||
602 | 597 | ||
603 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); | 598 | int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_t *info); |
604 | 599 | ||
600 | /* ... but use these wrappers instead */ | ||
601 | #define pcmcia_get_first_tuple(p_dev, tuple) \ | ||
602 | pccard_get_first_tuple(p_dev->socket, p_dev->func, tuple) | ||
603 | |||
604 | #define pcmcia_get_next_tuple(p_dev, tuple) \ | ||
605 | pccard_get_next_tuple(p_dev->socket, p_dev->func, tuple) | ||
606 | |||
607 | #define pcmcia_get_tuple_data(p_dev, tuple) \ | ||
608 | pccard_get_tuple_data(p_dev->socket, tuple) | ||
609 | |||
610 | #define pcmcia_parse_tuple(p_dev, tuple, parse) \ | ||
611 | pccard_parse_tuple(tuple, parse) | ||
612 | |||
613 | #define pcmcia_validate_cis(p_dev, info) \ | ||
614 | pccard_validate_cis(p_dev->socket, p_dev->func, info) | ||
615 | |||
605 | #endif /* LINUX_CISTPL_H */ | 616 | #endif /* LINUX_CISTPL_H */ |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 52660f32663d..d5838c30d20f 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
@@ -109,17 +109,6 @@ typedef struct client_req_t { | |||
109 | 109 | ||
110 | #define CLIENT_THIS_SOCKET 0x01 | 110 | #define CLIENT_THIS_SOCKET 0x01 |
111 | 111 | ||
112 | /* For RegisterClient */ | ||
113 | typedef struct client_reg_t { | ||
114 | dev_info_t *dev_info; | ||
115 | u_int Attributes; /* UNUSED */ | ||
116 | u_int EventMask; | ||
117 | int (*event_handler)(event_t event, int priority, | ||
118 | event_callback_args_t *); | ||
119 | event_callback_args_t event_callback_args; | ||
120 | u_int Version; | ||
121 | } client_reg_t; | ||
122 | |||
123 | /* ModifyConfiguration */ | 112 | /* ModifyConfiguration */ |
124 | typedef struct modconf_t { | 113 | typedef struct modconf_t { |
125 | u_int Attributes; | 114 | u_int Attributes; |
@@ -127,15 +116,16 @@ typedef struct modconf_t { | |||
127 | } modconf_t; | 116 | } modconf_t; |
128 | 117 | ||
129 | /* Attributes for ModifyConfiguration */ | 118 | /* Attributes for ModifyConfiguration */ |
130 | #define CONF_IRQ_CHANGE_VALID 0x100 | 119 | #define CONF_IRQ_CHANGE_VALID 0x0100 |
131 | #define CONF_VCC_CHANGE_VALID 0x200 | 120 | #define CONF_VCC_CHANGE_VALID 0x0200 |
132 | #define CONF_VPP1_CHANGE_VALID 0x400 | 121 | #define CONF_VPP1_CHANGE_VALID 0x0400 |
133 | #define CONF_VPP2_CHANGE_VALID 0x800 | 122 | #define CONF_VPP2_CHANGE_VALID 0x0800 |
123 | #define CONF_IO_CHANGE_WIDTH 0x1000 | ||
134 | 124 | ||
135 | /* For RequestConfiguration */ | 125 | /* For RequestConfiguration */ |
136 | typedef struct config_req_t { | 126 | typedef struct config_req_t { |
137 | u_int Attributes; | 127 | u_int Attributes; |
138 | u_int Vcc, Vpp1, Vpp2; | 128 | u_int Vpp; /* both Vpp1 and Vpp2 */ |
139 | u_int IntType; | 129 | u_int IntType; |
140 | u_int ConfigBase; | 130 | u_int ConfigBase; |
141 | u_char Status, Pin, Copy, ExtStatus; | 131 | u_char Status, Pin, Copy, ExtStatus; |
@@ -389,23 +379,27 @@ int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status); | |||
389 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); | 379 | int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); |
390 | int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); | 380 | int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); |
391 | int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); | 381 | int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); |
392 | int pcmcia_release_configuration(struct pcmcia_device *p_dev); | ||
393 | int pcmcia_release_io(struct pcmcia_device *p_dev, io_req_t *req); | ||
394 | int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req); | ||
395 | int pcmcia_release_window(window_handle_t win); | 382 | int pcmcia_release_window(window_handle_t win); |
396 | int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); | 383 | int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); |
397 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); | 384 | int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); |
398 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); | 385 | int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); |
399 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); | 386 | int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); |
400 | int pcmcia_reset_card(struct pcmcia_device *p_dev, client_req_t *req); | ||
401 | int pcmcia_suspend_card(struct pcmcia_socket *skt); | 387 | int pcmcia_suspend_card(struct pcmcia_socket *skt); |
402 | int pcmcia_resume_card(struct pcmcia_socket *skt); | 388 | int pcmcia_resume_card(struct pcmcia_socket *skt); |
403 | int pcmcia_eject_card(struct pcmcia_socket *skt); | 389 | int pcmcia_eject_card(struct pcmcia_socket *skt); |
404 | int pcmcia_insert_card(struct pcmcia_socket *skt); | 390 | int pcmcia_insert_card(struct pcmcia_socket *skt); |
391 | int pccard_reset_card(struct pcmcia_socket *skt); | ||
392 | |||
393 | struct pcmcia_device * pcmcia_dev_present(struct pcmcia_device *p_dev); | ||
394 | void pcmcia_disable_device(struct pcmcia_device *p_dev); | ||
405 | 395 | ||
406 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); | 396 | struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); |
407 | void pcmcia_put_socket(struct pcmcia_socket *skt); | 397 | void pcmcia_put_socket(struct pcmcia_socket *skt); |
408 | 398 | ||
399 | /* compatibility functions */ | ||
400 | #define pcmcia_reset_card(p_dev, req) \ | ||
401 | pccard_reset_card(p_dev->socket) | ||
402 | |||
409 | #endif /* __KERNEL__ */ | 403 | #endif /* __KERNEL__ */ |
410 | 404 | ||
411 | #endif /* _LINUX_CS_H */ | 405 | #endif /* _LINUX_CS_H */ |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 8e2a96396478..8c339f5678cf 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -39,7 +39,7 @@ typedef struct win_info_t { | |||
39 | typedef struct bind_info_t { | 39 | typedef struct bind_info_t { |
40 | dev_info_t dev_info; | 40 | dev_info_t dev_info; |
41 | u_char function; | 41 | u_char function; |
42 | struct dev_link_t *instance; | 42 | struct pcmcia_device *instance; |
43 | char name[DEV_NAME_LEN]; | 43 | char name[DEV_NAME_LEN]; |
44 | u_short major, minor; | 44 | u_short major, minor; |
45 | void *next; | 45 | void *next; |
@@ -96,6 +96,7 @@ typedef union ds_ioctl_arg_t { | |||
96 | 96 | ||
97 | #ifdef __KERNEL__ | 97 | #ifdef __KERNEL__ |
98 | #include <linux/device.h> | 98 | #include <linux/device.h> |
99 | #include <pcmcia/ss.h> | ||
99 | 100 | ||
100 | typedef struct dev_node_t { | 101 | typedef struct dev_node_t { |
101 | char dev_name[DEV_NAME_LEN]; | 102 | char dev_name[DEV_NAME_LEN]; |
@@ -103,34 +104,9 @@ typedef struct dev_node_t { | |||
103 | struct dev_node_t *next; | 104 | struct dev_node_t *next; |
104 | } dev_node_t; | 105 | } dev_node_t; |
105 | 106 | ||
106 | typedef struct dev_link_t { | ||
107 | dev_node_t *dev; | ||
108 | u_int state, open; | ||
109 | wait_queue_head_t pending; | ||
110 | client_handle_t handle; | ||
111 | io_req_t io; | ||
112 | irq_req_t irq; | ||
113 | config_req_t conf; | ||
114 | window_handle_t win; | ||
115 | void *priv; | ||
116 | struct dev_link_t *next; | ||
117 | } dev_link_t; | ||
118 | |||
119 | /* Flags for device state */ | ||
120 | #define DEV_PRESENT 0x01 | ||
121 | #define DEV_CONFIG 0x02 | ||
122 | #define DEV_STALE_CONFIG 0x04 /* release on close */ | ||
123 | #define DEV_STALE_LINK 0x08 /* detach on release */ | ||
124 | #define DEV_CONFIG_PENDING 0x10 | ||
125 | #define DEV_RELEASE_PENDING 0x20 | ||
126 | #define DEV_SUSPEND 0x40 | ||
127 | #define DEV_BUSY 0x80 | ||
128 | |||
129 | #define DEV_OK(l) \ | ||
130 | ((l) && ((l->state & ~DEV_BUSY) == (DEV_CONFIG|DEV_PRESENT))) | ||
131 | |||
132 | 107 | ||
133 | struct pcmcia_socket; | 108 | struct pcmcia_socket; |
109 | struct config_t; | ||
134 | 110 | ||
135 | struct pcmcia_driver { | 111 | struct pcmcia_driver { |
136 | int (*probe) (struct pcmcia_device *dev); | 112 | int (*probe) (struct pcmcia_device *dev); |
@@ -148,6 +124,7 @@ struct pcmcia_driver { | |||
148 | int pcmcia_register_driver(struct pcmcia_driver *driver); | 124 | int pcmcia_register_driver(struct pcmcia_driver *driver); |
149 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); | 125 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); |
150 | 126 | ||
127 | |||
151 | struct pcmcia_device { | 128 | struct pcmcia_device { |
152 | /* the socket and the device_no [for multifunction devices] | 129 | /* the socket and the device_no [for multifunction devices] |
153 | uniquely define a pcmcia_device */ | 130 | uniquely define a pcmcia_device */ |
@@ -160,21 +137,40 @@ struct pcmcia_device { | |||
160 | /* the hardware "function" device; certain subdevices can | 137 | /* the hardware "function" device; certain subdevices can |
161 | * share one hardware "function" device. */ | 138 | * share one hardware "function" device. */ |
162 | u8 func; | 139 | u8 func; |
140 | struct config_t* function_config; | ||
163 | 141 | ||
164 | struct list_head socket_device_list; | 142 | struct list_head socket_device_list; |
165 | 143 | ||
166 | /* deprecated, a cleaned up version will be moved into this | 144 | /* deprecated, will be cleaned up soon */ |
167 | struct soon */ | 145 | dev_node_t *dev_node; |
168 | dev_link_t *instance; | 146 | u_int open; |
169 | u_int state; | 147 | io_req_t io; |
148 | irq_req_t irq; | ||
149 | config_req_t conf; | ||
150 | window_handle_t win; | ||
151 | |||
152 | /* Is the device suspended, or in the process of | ||
153 | * being removed? */ | ||
154 | u16 suspended:1; | ||
155 | u16 _removed:1; | ||
156 | |||
157 | /* Flags whether io, irq, win configurations were | ||
158 | * requested, and whether the configuration is "locked" */ | ||
159 | u16 _irq:1; | ||
160 | u16 _io:1; | ||
161 | u16 _win:4; | ||
162 | u16 _locked:1; | ||
163 | |||
164 | /* Flag whether a "fuzzy" func_id based match is | ||
165 | * allowed. */ | ||
166 | u16 allow_func_id_match:1; | ||
170 | 167 | ||
171 | /* information about this device */ | 168 | /* information about this device */ |
172 | u8 has_manf_id:1; | 169 | u16 has_manf_id:1; |
173 | u8 has_card_id:1; | 170 | u16 has_card_id:1; |
174 | u8 has_func_id:1; | 171 | u16 has_func_id:1; |
175 | 172 | ||
176 | u8 allow_func_id_match:1; | 173 | u16 reserved:3; |
177 | u8 reserved:4; | ||
178 | 174 | ||
179 | u8 func_id; | 175 | u8 func_id; |
180 | u16 manf_id; | 176 | u16 manf_id; |
@@ -182,22 +178,24 @@ struct pcmcia_device { | |||
182 | 178 | ||
183 | char * prod_id[4]; | 179 | char * prod_id[4]; |
184 | 180 | ||
181 | struct device dev; | ||
182 | |||
183 | #ifdef CONFIG_PCMCIA_IOCTL | ||
185 | /* device driver wanted by cardmgr */ | 184 | /* device driver wanted by cardmgr */ |
186 | struct pcmcia_driver * cardmgr; | 185 | struct pcmcia_driver * cardmgr; |
186 | #endif | ||
187 | 187 | ||
188 | struct device dev; | 188 | /* data private to drivers */ |
189 | void *priv; | ||
189 | }; | 190 | }; |
190 | 191 | ||
191 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) | 192 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) |
192 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) | 193 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) |
193 | 194 | ||
194 | #define handle_to_pdev(handle) (handle) | ||
195 | #define handle_to_dev(handle) (handle->dev) | 195 | #define handle_to_dev(handle) (handle->dev) |
196 | 196 | ||
197 | #define dev_to_instance(dev) (dev->instance) | ||
198 | |||
199 | /* error reporting */ | 197 | /* error reporting */ |
200 | void cs_error(client_handle_t handle, int func, int ret); | 198 | void cs_error(struct pcmcia_device *handle, int func, int ret); |
201 | 199 | ||
202 | #endif /* __KERNEL__ */ | 200 | #endif /* __KERNEL__ */ |
203 | #endif /* _LINUX_DS_H */ | 201 | #endif /* _LINUX_DS_H */ |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 2889a69a7a8f..5e0a01ab2216 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/config.h> | 18 | #include <linux/config.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/sched.h> /* task_struct, completion */ | 20 | #include <linux/sched.h> /* task_struct, completion */ |
21 | #include <linux/mutex.h> | ||
21 | 22 | ||
22 | #include <pcmcia/cs_types.h> | 23 | #include <pcmcia/cs_types.h> |
23 | #include <pcmcia/cs.h> | 24 | #include <pcmcia/cs.h> |
@@ -146,14 +147,15 @@ extern struct pccard_resource_ops pccard_static_ops; | |||
146 | /* !SS_CAP_STATIC_MAP */ | 147 | /* !SS_CAP_STATIC_MAP */ |
147 | extern struct pccard_resource_ops pccard_nonstatic_ops; | 148 | extern struct pccard_resource_ops pccard_nonstatic_ops; |
148 | 149 | ||
150 | /* static mem, dynamic IO sockets */ | ||
151 | extern struct pccard_resource_ops pccard_iodyn_ops; | ||
152 | |||
149 | /* | 153 | /* |
150 | * Calls to set up low-level "Socket Services" drivers | 154 | * Calls to set up low-level "Socket Services" drivers |
151 | */ | 155 | */ |
152 | struct pcmcia_socket; | 156 | struct pcmcia_socket; |
153 | 157 | ||
154 | typedef struct io_window_t { | 158 | typedef struct io_window_t { |
155 | u_int Attributes; | ||
156 | kio_addr_t BasePort, NumPorts; | ||
157 | kio_addr_t InUse, Config; | 159 | kio_addr_t InUse, Config; |
158 | struct resource *res; | 160 | struct resource *res; |
159 | } io_window_t; | 161 | } io_window_t; |
@@ -162,7 +164,7 @@ typedef struct io_window_t { | |||
162 | typedef struct window_t { | 164 | typedef struct window_t { |
163 | u_short magic; | 165 | u_short magic; |
164 | u_short index; | 166 | u_short index; |
165 | client_handle_t handle; | 167 | struct pcmcia_device *handle; |
166 | struct pcmcia_socket *sock; | 168 | struct pcmcia_socket *sock; |
167 | pccard_mem_map ctl; | 169 | pccard_mem_map ctl; |
168 | } window_t; | 170 | } window_t; |
@@ -186,7 +188,6 @@ struct pcmcia_socket { | |||
186 | u_short lock_count; | 188 | u_short lock_count; |
187 | pccard_mem_map cis_mem; | 189 | pccard_mem_map cis_mem; |
188 | void __iomem *cis_virt; | 190 | void __iomem *cis_virt; |
189 | struct config_t *config; | ||
190 | struct { | 191 | struct { |
191 | u_int AssignedIRQ; | 192 | u_int AssignedIRQ; |
192 | u_int Config; | 193 | u_int Config; |
@@ -241,7 +242,7 @@ struct pcmcia_socket { | |||
241 | #endif | 242 | #endif |
242 | 243 | ||
243 | /* state thread */ | 244 | /* state thread */ |
244 | struct semaphore skt_sem; /* protects socket h/w state */ | 245 | struct mutex skt_mutex; /* protects socket h/w state */ |
245 | 246 | ||
246 | struct task_struct *thread; | 247 | struct task_struct *thread; |
247 | struct completion thread_done; | 248 | struct completion thread_done; |
diff --git a/include/sound/core.h b/include/sound/core.h index 7f32c12b4a0a..d1d043f6cb80 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -170,7 +170,7 @@ static inline void snd_power_change_state(struct snd_card *card, unsigned int st | |||
170 | } | 170 | } |
171 | 171 | ||
172 | /* init.c */ | 172 | /* init.c */ |
173 | int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file); | 173 | int snd_power_wait(struct snd_card *card, unsigned int power_state); |
174 | 174 | ||
175 | #else /* ! CONFIG_PM */ | 175 | #else /* ! CONFIG_PM */ |
176 | 176 | ||
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 15b885660bf0..66b1f08b42b9 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -369,6 +369,7 @@ struct snd_pcm_substream { | |||
369 | /* -- assigned files -- */ | 369 | /* -- assigned files -- */ |
370 | struct snd_pcm_file *file; | 370 | struct snd_pcm_file *file; |
371 | struct file *ffile; | 371 | struct file *ffile; |
372 | void (*pcm_release)(struct snd_pcm_substream *); | ||
372 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 373 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |
373 | /* -- OSS things -- */ | 374 | /* -- OSS things -- */ |
374 | struct snd_pcm_oss_substream oss; | 375 | struct snd_pcm_oss_substream oss; |
@@ -381,13 +382,10 @@ struct snd_pcm_substream { | |||
381 | struct snd_info_entry *proc_prealloc_entry; | 382 | struct snd_info_entry *proc_prealloc_entry; |
382 | /* misc flags */ | 383 | /* misc flags */ |
383 | unsigned int no_mmap_ctrl: 1; | 384 | unsigned int no_mmap_ctrl: 1; |
385 | unsigned int hw_opened: 1; | ||
384 | }; | 386 | }; |
385 | 387 | ||
386 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | ||
387 | #define SUBSTREAM_BUSY(substream) ((substream)->file != NULL || ((substream)->oss.file != NULL)) | ||
388 | #else | ||
389 | #define SUBSTREAM_BUSY(substream) ((substream)->file != NULL) | 388 | #define SUBSTREAM_BUSY(substream) ((substream)->file != NULL) |
390 | #endif | ||
391 | 389 | ||
392 | 390 | ||
393 | struct snd_pcm_str { | 391 | struct snd_pcm_str { |
@@ -460,7 +458,6 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream, | |||
460 | struct snd_pcm_info __user *info); | 458 | struct snd_pcm_info __user *info); |
461 | int snd_pcm_status(struct snd_pcm_substream *substream, | 459 | int snd_pcm_status(struct snd_pcm_substream *substream, |
462 | struct snd_pcm_status *status); | 460 | struct snd_pcm_status *status); |
463 | int snd_pcm_prepare(struct snd_pcm_substream *substream); | ||
464 | int snd_pcm_start(struct snd_pcm_substream *substream); | 461 | int snd_pcm_start(struct snd_pcm_substream *substream); |
465 | int snd_pcm_stop(struct snd_pcm_substream *substream, int status); | 462 | int snd_pcm_stop(struct snd_pcm_substream *substream, int status); |
466 | int snd_pcm_drain_done(struct snd_pcm_substream *substream); | 463 | int snd_pcm_drain_done(struct snd_pcm_substream *substream); |
@@ -468,11 +465,13 @@ int snd_pcm_drain_done(struct snd_pcm_substream *substream); | |||
468 | int snd_pcm_suspend(struct snd_pcm_substream *substream); | 465 | int snd_pcm_suspend(struct snd_pcm_substream *substream); |
469 | int snd_pcm_suspend_all(struct snd_pcm *pcm); | 466 | int snd_pcm_suspend_all(struct snd_pcm *pcm); |
470 | #endif | 467 | #endif |
471 | int snd_pcm_kernel_playback_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); | ||
472 | int snd_pcm_kernel_capture_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); | ||
473 | int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); | 468 | int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg); |
474 | int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct snd_pcm_substream **rsubstream); | 469 | int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct file *file, |
470 | struct snd_pcm_substream **rsubstream); | ||
475 | void snd_pcm_release_substream(struct snd_pcm_substream *substream); | 471 | void snd_pcm_release_substream(struct snd_pcm_substream *substream); |
472 | int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, struct file *file, | ||
473 | struct snd_pcm_substream **rsubstream); | ||
474 | void snd_pcm_detach_substream(struct snd_pcm_substream *substream); | ||
476 | void snd_pcm_vma_notify_data(void *client, void *data); | 475 | void snd_pcm_vma_notify_data(void *client, void *data); |
477 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); | 476 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); |
478 | 477 | ||
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index bff0778e1969..39df2baca18a 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h | |||
@@ -69,8 +69,7 @@ struct snd_pcm_oss_file { | |||
69 | 69 | ||
70 | struct snd_pcm_oss_substream { | 70 | struct snd_pcm_oss_substream { |
71 | unsigned oss: 1; /* oss mode */ | 71 | unsigned oss: 1; /* oss mode */ |
72 | struct snd_pcm_oss_setup *setup; /* active setup */ | 72 | struct snd_pcm_oss_setup setup; /* active setup */ |
73 | struct snd_pcm_oss_file *file; | ||
74 | }; | 73 | }; |
75 | 74 | ||
76 | struct snd_pcm_oss_stream { | 75 | struct snd_pcm_oss_stream { |