diff options
Diffstat (limited to 'Documentation')
143 files changed, 4479 insertions, 275 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index ceb1ff735469..8afe64fb2009 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -136,8 +136,6 @@ fault-injection/ | |||
136 | - dir with docs about the fault injection capabilities infrastructure. | 136 | - dir with docs about the fault injection capabilities infrastructure. |
137 | fb/ | 137 | fb/ |
138 | - directory with info on the frame buffer graphics abstraction layer. | 138 | - directory with info on the frame buffer graphics abstraction layer. |
139 | feature-removal-schedule.txt | ||
140 | - list of files and features that are going to be removed. | ||
141 | filesystems/ | 139 | filesystems/ |
142 | - info on the vfs and the various filesystems that Linux supports. | 140 | - info on the vfs and the various filesystems that Linux supports. |
143 | firmware_class/ | 141 | firmware_class/ |
diff --git a/Documentation/ABI/README b/Documentation/ABI/README index 9feaf16f1617..10069828568b 100644 --- a/Documentation/ABI/README +++ b/Documentation/ABI/README | |||
@@ -36,9 +36,6 @@ The different levels of stability are: | |||
36 | the kernel, but are marked to be removed at some later point in | 36 | the kernel, but are marked to be removed at some later point in |
37 | time. The description of the interface will document the reason | 37 | time. The description of the interface will document the reason |
38 | why it is obsolete and when it can be expected to be removed. | 38 | why it is obsolete and when it can be expected to be removed. |
39 | The file Documentation/feature-removal-schedule.txt may describe | ||
40 | some of these interfaces, giving a schedule for when they will | ||
41 | be removed. | ||
42 | 39 | ||
43 | removed/ | 40 | removed/ |
44 | This directory contains a list of the old interfaces that have | 41 | This directory contains a list of the old interfaces that have |
diff --git a/Documentation/ABI/stable/sysfs-devices-node b/Documentation/ABI/stable/sysfs-devices-node index 49b82cad7003..ce259c13c36a 100644 --- a/Documentation/ABI/stable/sysfs-devices-node +++ b/Documentation/ABI/stable/sysfs-devices-node | |||
@@ -1,7 +1,101 @@ | |||
1 | What: /sys/devices/system/node/possible | ||
2 | Date: October 2002 | ||
3 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
4 | Description: | ||
5 | Nodes that could be possibly become online at some point. | ||
6 | |||
7 | What: /sys/devices/system/node/online | ||
8 | Date: October 2002 | ||
9 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
10 | Description: | ||
11 | Nodes that are online. | ||
12 | |||
13 | What: /sys/devices/system/node/has_normal_memory | ||
14 | Date: October 2002 | ||
15 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
16 | Description: | ||
17 | Nodes that have regular memory. | ||
18 | |||
19 | What: /sys/devices/system/node/has_cpu | ||
20 | Date: October 2002 | ||
21 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
22 | Description: | ||
23 | Nodes that have one or more CPUs. | ||
24 | |||
25 | What: /sys/devices/system/node/has_high_memory | ||
26 | Date: October 2002 | ||
27 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
28 | Description: | ||
29 | Nodes that have regular or high memory. | ||
30 | Depends on CONFIG_HIGHMEM. | ||
31 | |||
1 | What: /sys/devices/system/node/nodeX | 32 | What: /sys/devices/system/node/nodeX |
2 | Date: October 2002 | 33 | Date: October 2002 |
3 | Contact: Linux Memory Management list <linux-mm@kvack.org> | 34 | Contact: Linux Memory Management list <linux-mm@kvack.org> |
4 | Description: | 35 | Description: |
5 | When CONFIG_NUMA is enabled, this is a directory containing | 36 | When CONFIG_NUMA is enabled, this is a directory containing |
6 | information on node X such as what CPUs are local to the | 37 | information on node X such as what CPUs are local to the |
7 | node. | 38 | node. Each file is detailed next. |
39 | |||
40 | What: /sys/devices/system/node/nodeX/cpumap | ||
41 | Date: October 2002 | ||
42 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
43 | Description: | ||
44 | The node's cpumap. | ||
45 | |||
46 | What: /sys/devices/system/node/nodeX/cpulist | ||
47 | Date: October 2002 | ||
48 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
49 | Description: | ||
50 | The CPUs associated to the node. | ||
51 | |||
52 | What: /sys/devices/system/node/nodeX/meminfo | ||
53 | Date: October 2002 | ||
54 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
55 | Description: | ||
56 | Provides information about the node's distribution and memory | ||
57 | utilization. Similar to /proc/meminfo, see Documentation/filesystems/proc.txt | ||
58 | |||
59 | What: /sys/devices/system/node/nodeX/numastat | ||
60 | Date: October 2002 | ||
61 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
62 | Description: | ||
63 | The node's hit/miss statistics, in units of pages. | ||
64 | See Documentation/numastat.txt | ||
65 | |||
66 | What: /sys/devices/system/node/nodeX/distance | ||
67 | Date: October 2002 | ||
68 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
69 | Description: | ||
70 | Distance between the node and all the other nodes | ||
71 | in the system. | ||
72 | |||
73 | What: /sys/devices/system/node/nodeX/vmstat | ||
74 | Date: October 2002 | ||
75 | Contact: Linux Memory Management list <linux-mm@kvack.org> | ||
76 | Description: | ||
77 | The node's zoned virtual memory statistics. | ||
78 | This is a superset of numastat. | ||
79 | |||
80 | What: /sys/devices/system/node/nodeX/compact | ||
81 | Date: February 2010 | ||
82 | Contact: Mel Gorman <mel@csn.ul.ie> | ||
83 | Description: | ||
84 | When this file is written to, all memory within that node | ||
85 | will be compacted. When it completes, memory will be freed | ||
86 | into blocks which have as many contiguous pages as possible | ||
87 | |||
88 | What: /sys/devices/system/node/nodeX/scan_unevictable_pages | ||
89 | Date: October 2008 | ||
90 | Contact: Lee Schermerhorn <lee.schermerhorn@hp.com> | ||
91 | Description: | ||
92 | When set, it triggers scanning the node's unevictable lists | ||
93 | and move any pages that have become evictable onto the respective | ||
94 | zone's inactive list. See mm/vmscan.c | ||
95 | |||
96 | What: /sys/devices/system/node/nodeX/hugepages/hugepages-<size>/ | ||
97 | Date: December 2009 | ||
98 | Contact: Lee Schermerhorn <lee.schermerhorn@hp.com> | ||
99 | Description: | ||
100 | The node's huge page size control/query attributes. | ||
101 | See Documentation/vm/hugetlbpage.txt \ No newline at end of file | ||
diff --git a/Documentation/ABI/stable/sysfs-driver-ib_srp b/Documentation/ABI/stable/sysfs-driver-ib_srp new file mode 100644 index 000000000000..481aae95c7d1 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-driver-ib_srp | |||
@@ -0,0 +1,156 @@ | |||
1 | What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/add_target | ||
2 | Date: January 2, 2006 | ||
3 | KernelVersion: 2.6.15 | ||
4 | Contact: linux-rdma@vger.kernel.org | ||
5 | Description: Interface for making ib_srp connect to a new target. | ||
6 | One can request ib_srp to connect to a new target by writing | ||
7 | a comma-separated list of login parameters to this sysfs | ||
8 | attribute. The supported parameters are: | ||
9 | * id_ext, a 16-digit hexadecimal number specifying the eight | ||
10 | byte identifier extension in the 16-byte SRP target port | ||
11 | identifier. The target port identifier is sent by ib_srp | ||
12 | to the target in the SRP_LOGIN_REQ request. | ||
13 | * ioc_guid, a 16-digit hexadecimal number specifying the eight | ||
14 | byte I/O controller GUID portion of the 16-byte target port | ||
15 | identifier. | ||
16 | * dgid, a 32-digit hexadecimal number specifying the | ||
17 | destination GID. | ||
18 | * pkey, a four-digit hexadecimal number specifying the | ||
19 | InfiniBand partition key. | ||
20 | * service_id, a 16-digit hexadecimal number specifying the | ||
21 | InfiniBand service ID used to establish communication with | ||
22 | the SRP target. How to find out the value of the service ID | ||
23 | is specified in the documentation of the SRP target. | ||
24 | * max_sect, a decimal number specifying the maximum number of | ||
25 | 512-byte sectors to be transferred via a single SCSI command. | ||
26 | * max_cmd_per_lun, a decimal number specifying the maximum | ||
27 | number of outstanding commands for a single LUN. | ||
28 | * io_class, a hexadecimal number specifying the SRP I/O class. | ||
29 | Must be either 0xff00 (rev 10) or 0x0100 (rev 16a). The I/O | ||
30 | class defines the format of the SRP initiator and target | ||
31 | port identifiers. | ||
32 | * initiator_ext, a 16-digit hexadecimal number specifying the | ||
33 | identifier extension portion of the SRP initiator port | ||
34 | identifier. This data is sent by the initiator to the target | ||
35 | in the SRP_LOGIN_REQ request. | ||
36 | * cmd_sg_entries, a number in the range 1..255 that specifies | ||
37 | the maximum number of data buffer descriptors stored in the | ||
38 | SRP_CMD information unit itself. With allow_ext_sg=0 the | ||
39 | parameter cmd_sg_entries defines the maximum S/G list length | ||
40 | for a single SRP_CMD, and commands whose S/G list length | ||
41 | exceeds this limit after S/G list collapsing will fail. | ||
42 | * allow_ext_sg, whether ib_srp is allowed to include a partial | ||
43 | memory descriptor list in an SRP_CMD instead of the entire | ||
44 | list. If a partial memory descriptor list has been included | ||
45 | in an SRP_CMD the remaining memory descriptors are | ||
46 | communicated from initiator to target via an additional RDMA | ||
47 | transfer. Setting allow_ext_sg to 1 increases the maximum | ||
48 | amount of data that can be transferred between initiator and | ||
49 | target via a single SCSI command. Since not all SRP target | ||
50 | implementations support partial memory descriptor lists the | ||
51 | default value for this option is 0. | ||
52 | * sg_tablesize, a number in the range 1..2048 specifying the | ||
53 | maximum S/G list length the SCSI layer is allowed to pass to | ||
54 | ib_srp. Specifying a value that exceeds cmd_sg_entries is | ||
55 | only safe with partial memory descriptor list support enabled | ||
56 | (allow_ext_sg=1). | ||
57 | |||
58 | What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/ibdev | ||
59 | Date: January 2, 2006 | ||
60 | KernelVersion: 2.6.15 | ||
61 | Contact: linux-rdma@vger.kernel.org | ||
62 | Description: HCA name (<hca>). | ||
63 | |||
64 | What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/port | ||
65 | Date: January 2, 2006 | ||
66 | KernelVersion: 2.6.15 | ||
67 | Contact: linux-rdma@vger.kernel.org | ||
68 | Description: HCA port number (<port_number>). | ||
69 | |||
70 | What: /sys/class/scsi_host/host<n>/allow_ext_sg | ||
71 | Date: May 19, 2011 | ||
72 | KernelVersion: 2.6.39 | ||
73 | Contact: linux-rdma@vger.kernel.org | ||
74 | Description: Whether ib_srp is allowed to include a partial memory | ||
75 | descriptor list in an SRP_CMD when communicating with an SRP | ||
76 | target. | ||
77 | |||
78 | What: /sys/class/scsi_host/host<n>/cmd_sg_entries | ||
79 | Date: May 19, 2011 | ||
80 | KernelVersion: 2.6.39 | ||
81 | Contact: linux-rdma@vger.kernel.org | ||
82 | Description: Maximum number of data buffer descriptors that may be sent to | ||
83 | the target in a single SRP_CMD request. | ||
84 | |||
85 | What: /sys/class/scsi_host/host<n>/dgid | ||
86 | Date: June 17, 2006 | ||
87 | KernelVersion: 2.6.17 | ||
88 | Contact: linux-rdma@vger.kernel.org | ||
89 | Description: InfiniBand destination GID used for communication with the SRP | ||
90 | target. Differs from orig_dgid if port redirection has happened. | ||
91 | |||
92 | What: /sys/class/scsi_host/host<n>/id_ext | ||
93 | Date: June 17, 2006 | ||
94 | KernelVersion: 2.6.17 | ||
95 | Contact: linux-rdma@vger.kernel.org | ||
96 | Description: Eight-byte identifier extension portion of the 16-byte target | ||
97 | port identifier. | ||
98 | |||
99 | What: /sys/class/scsi_host/host<n>/ioc_guid | ||
100 | Date: June 17, 2006 | ||
101 | KernelVersion: 2.6.17 | ||
102 | Contact: linux-rdma@vger.kernel.org | ||
103 | Description: Eight-byte I/O controller GUID portion of the 16-byte target | ||
104 | port identifier. | ||
105 | |||
106 | What: /sys/class/scsi_host/host<n>/local_ib_device | ||
107 | Date: November 29, 2006 | ||
108 | KernelVersion: 2.6.19 | ||
109 | Contact: linux-rdma@vger.kernel.org | ||
110 | Description: Name of the InfiniBand HCA used for communicating with the | ||
111 | SRP target. | ||
112 | |||
113 | What: /sys/class/scsi_host/host<n>/local_ib_port | ||
114 | Date: November 29, 2006 | ||
115 | KernelVersion: 2.6.19 | ||
116 | Contact: linux-rdma@vger.kernel.org | ||
117 | Description: Number of the HCA port used for communicating with the | ||
118 | SRP target. | ||
119 | |||
120 | What: /sys/class/scsi_host/host<n>/orig_dgid | ||
121 | Date: June 17, 2006 | ||
122 | KernelVersion: 2.6.17 | ||
123 | Contact: linux-rdma@vger.kernel.org | ||
124 | Description: InfiniBand destination GID specified in the parameters | ||
125 | written to the add_target sysfs attribute. | ||
126 | |||
127 | What: /sys/class/scsi_host/host<n>/pkey | ||
128 | Date: June 17, 2006 | ||
129 | KernelVersion: 2.6.17 | ||
130 | Contact: linux-rdma@vger.kernel.org | ||
131 | Description: A 16-bit number representing the InfiniBand partition key used | ||
132 | for communication with the SRP target. | ||
133 | |||
134 | What: /sys/class/scsi_host/host<n>/req_lim | ||
135 | Date: October 20, 2010 | ||
136 | KernelVersion: 2.6.36 | ||
137 | Contact: linux-rdma@vger.kernel.org | ||
138 | Description: Number of requests ib_srp can send to the target before it has | ||
139 | to wait for more credits. For more information see also the | ||
140 | SRP credit algorithm in the SRP specification. | ||
141 | |||
142 | What: /sys/class/scsi_host/host<n>/service_id | ||
143 | Date: June 17, 2006 | ||
144 | KernelVersion: 2.6.17 | ||
145 | Contact: linux-rdma@vger.kernel.org | ||
146 | Description: InfiniBand service ID used for establishing communication with | ||
147 | the SRP target. | ||
148 | |||
149 | What: /sys/class/scsi_host/host<n>/zero_req_lim | ||
150 | Date: September 20, 2006 | ||
151 | KernelVersion: 2.6.18 | ||
152 | Contact: linux-rdma@vger.kernel.org | ||
153 | Description: Number of times the initiator had to wait before sending a | ||
154 | request to the target because it ran out of credits. For more | ||
155 | information see also the SRP credit algorithm in the SRP | ||
156 | specification. | ||
diff --git a/Documentation/ABI/stable/sysfs-transport-srp b/Documentation/ABI/stable/sysfs-transport-srp new file mode 100644 index 000000000000..b36fb0dc13c8 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-transport-srp | |||
@@ -0,0 +1,19 @@ | |||
1 | What: /sys/class/srp_remote_ports/port-<h>:<n>/delete | ||
2 | Date: June 1, 2012 | ||
3 | KernelVersion: 3.7 | ||
4 | Contact: linux-scsi@vger.kernel.org, linux-rdma@vger.kernel.org | ||
5 | Description: Instructs an SRP initiator to disconnect from a target and to | ||
6 | remove all LUNs imported from that target. | ||
7 | |||
8 | What: /sys/class/srp_remote_ports/port-<h>:<n>/port_id | ||
9 | Date: June 27, 2007 | ||
10 | KernelVersion: 2.6.24 | ||
11 | Contact: linux-scsi@vger.kernel.org | ||
12 | Description: 16-byte local SRP port identifier in hexadecimal format. An | ||
13 | example: 4c:49:4e:55:58:20:56:49:4f:00:00:00:00:00:00:00. | ||
14 | |||
15 | What: /sys/class/srp_remote_ports/port-<h>:<n>/roles | ||
16 | Date: June 27, 2007 | ||
17 | KernelVersion: 2.6.24 | ||
18 | Contact: linux-scsi@vger.kernel.org | ||
19 | Description: Role of the remote port. Either "SRP Initiator" or "SRP Target". | ||
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy index 986946613542..ec0a38ef3145 100644 --- a/Documentation/ABI/testing/ima_policy +++ b/Documentation/ABI/testing/ima_policy | |||
@@ -23,7 +23,7 @@ Description: | |||
23 | lsm: [[subj_user=] [subj_role=] [subj_type=] | 23 | lsm: [[subj_user=] [subj_role=] [subj_type=] |
24 | [obj_user=] [obj_role=] [obj_type=]] | 24 | [obj_user=] [obj_role=] [obj_type=]] |
25 | 25 | ||
26 | base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK] | 26 | base: func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK][MODULE_CHECK] |
27 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] | 27 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] |
28 | fsmagic:= hex value | 28 | fsmagic:= hex value |
29 | uid:= decimal value | 29 | uid:= decimal value |
@@ -53,6 +53,7 @@ Description: | |||
53 | measure func=BPRM_CHECK | 53 | measure func=BPRM_CHECK |
54 | measure func=FILE_MMAP mask=MAY_EXEC | 54 | measure func=FILE_MMAP mask=MAY_EXEC |
55 | measure func=FILE_CHECK mask=MAY_READ uid=0 | 55 | measure func=FILE_CHECK mask=MAY_READ uid=0 |
56 | measure func=MODULE_CHECK uid=0 | ||
56 | appraise fowner=0 | 57 | appraise fowner=0 |
57 | 58 | ||
58 | The default policy measures all executables in bprm_check, | 59 | The default policy measures all executables in bprm_check, |
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index dff1f48d252d..1ce5ae329c04 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -222,3 +222,37 @@ Description: | |||
222 | satisfied too. Reading this attribute will show the current | 222 | satisfied too. Reading this attribute will show the current |
223 | value of d3cold_allowed bit. Writing this attribute will set | 223 | value of d3cold_allowed bit. Writing this attribute will set |
224 | the value of d3cold_allowed bit. | 224 | the value of d3cold_allowed bit. |
225 | |||
226 | What: /sys/bus/pci/devices/.../sriov_totalvfs | ||
227 | Date: November 2012 | ||
228 | Contact: Donald Dutile <ddutile@redhat.com> | ||
229 | Description: | ||
230 | This file appears when a physical PCIe device supports SR-IOV. | ||
231 | Userspace applications can read this file to determine the | ||
232 | maximum number of Virtual Functions (VFs) a PCIe physical | ||
233 | function (PF) can support. Typically, this is the value reported | ||
234 | in the PF's SR-IOV extended capability structure's TotalVFs | ||
235 | element. Drivers have the ability at probe time to reduce the | ||
236 | value read from this file via the pci_sriov_set_totalvfs() | ||
237 | function. | ||
238 | |||
239 | What: /sys/bus/pci/devices/.../sriov_numvfs | ||
240 | Date: November 2012 | ||
241 | Contact: Donald Dutile <ddutile@redhat.com> | ||
242 | Description: | ||
243 | This file appears when a physical PCIe device supports SR-IOV. | ||
244 | Userspace applications can read and write to this file to | ||
245 | determine and control the enablement or disablement of Virtual | ||
246 | Functions (VFs) on the physical function (PF). A read of this | ||
247 | file will return the number of VFs that are enabled on this PF. | ||
248 | A number written to this file will enable the specified | ||
249 | number of VFs. A userspace application would typically read the | ||
250 | file and check that the value is zero, and then write the number | ||
251 | of VFs that should be enabled on the PF; the value written | ||
252 | should be less than or equal to the value in the sriov_totalvfs | ||
253 | file. A userspace application wanting to disable the VFs would | ||
254 | write a zero to this file. The core ensures that valid values | ||
255 | are written to this file, and returns errors when values are not | ||
256 | valid. For example, writing a 2 to this file when sriov_numvfs | ||
257 | is not 0 and not 2 already will return an error. Writing a 10 | ||
258 | when the value of sriov_totalvfs is 8 will return an error. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd index 1cf2adf46b11..cd9213ccf3dc 100644 --- a/Documentation/ABI/testing/sysfs-bus-rbd +++ b/Documentation/ABI/testing/sysfs-bus-rbd | |||
@@ -70,6 +70,10 @@ snap_* | |||
70 | 70 | ||
71 | A directory per each snapshot | 71 | A directory per each snapshot |
72 | 72 | ||
73 | parent | ||
74 | |||
75 | Information identifying the pool, image, and snapshot id for | ||
76 | the parent image in a layered rbd image (format 2 only). | ||
73 | 77 | ||
74 | Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> | 78 | Entries under /sys/bus/rbd/devices/<dev-id>/snap_<snap-name> |
75 | ------------------------------------------------------------- | 79 | ------------------------------------------------------------- |
diff --git a/Documentation/ABI/testing/sysfs-devices-node b/Documentation/ABI/testing/sysfs-devices-node deleted file mode 100644 index 453a210c3ceb..000000000000 --- a/Documentation/ABI/testing/sysfs-devices-node +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | What: /sys/devices/system/node/nodeX/compact | ||
2 | Date: February 2010 | ||
3 | Contact: Mel Gorman <mel@csn.ul.ie> | ||
4 | Description: | ||
5 | When this file is written to, all memory within that node | ||
6 | will be compacted. When it completes, memory will be freed | ||
7 | into blocks which have as many contiguous pages as possible | ||
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index a0b6250add79..4a4fb295ceef 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
@@ -468,11 +468,46 @@ To map a single region, you do: | |||
468 | size_t size = buffer->len; | 468 | size_t size = buffer->len; |
469 | 469 | ||
470 | dma_handle = dma_map_single(dev, addr, size, direction); | 470 | dma_handle = dma_map_single(dev, addr, size, direction); |
471 | if (dma_mapping_error(dma_handle)) { | ||
472 | /* | ||
473 | * reduce current DMA mapping usage, | ||
474 | * delay and try again later or | ||
475 | * reset driver. | ||
476 | */ | ||
477 | goto map_error_handling; | ||
478 | } | ||
471 | 479 | ||
472 | and to unmap it: | 480 | and to unmap it: |
473 | 481 | ||
474 | dma_unmap_single(dev, dma_handle, size, direction); | 482 | dma_unmap_single(dev, dma_handle, size, direction); |
475 | 483 | ||
484 | You should call dma_mapping_error() as dma_map_single() could fail and return | ||
485 | error. Not all dma implementations support dma_mapping_error() interface. | ||
486 | However, it is a good practice to call dma_mapping_error() interface, which | ||
487 | will invoke the generic mapping error check interface. Doing so will ensure | ||
488 | that the mapping code will work correctly on all dma implementations without | ||
489 | any dependency on the specifics of the underlying implementation. Using the | ||
490 | returned address without checking for errors could result in failures ranging | ||
491 | from panics to silent data corruption. Couple of example of incorrect ways to | ||
492 | check for errors that make assumptions about the underlying dma implementation | ||
493 | are as follows and these are applicable to dma_map_page() as well. | ||
494 | |||
495 | Incorrect example 1: | ||
496 | dma_addr_t dma_handle; | ||
497 | |||
498 | dma_handle = dma_map_single(dev, addr, size, direction); | ||
499 | if ((dma_handle & 0xffff != 0) || (dma_handle >= 0x1000000)) { | ||
500 | goto map_error; | ||
501 | } | ||
502 | |||
503 | Incorrect example 2: | ||
504 | dma_addr_t dma_handle; | ||
505 | |||
506 | dma_handle = dma_map_single(dev, addr, size, direction); | ||
507 | if (dma_handle == DMA_ERROR_CODE) { | ||
508 | goto map_error; | ||
509 | } | ||
510 | |||
476 | You should call dma_unmap_single when the DMA activity is finished, e.g. | 511 | You should call dma_unmap_single when the DMA activity is finished, e.g. |
477 | from the interrupt which told you that the DMA transfer is done. | 512 | from the interrupt which told you that the DMA transfer is done. |
478 | 513 | ||
@@ -489,6 +524,14 @@ Specifically: | |||
489 | size_t size = buffer->len; | 524 | size_t size = buffer->len; |
490 | 525 | ||
491 | dma_handle = dma_map_page(dev, page, offset, size, direction); | 526 | dma_handle = dma_map_page(dev, page, offset, size, direction); |
527 | if (dma_mapping_error(dma_handle)) { | ||
528 | /* | ||
529 | * reduce current DMA mapping usage, | ||
530 | * delay and try again later or | ||
531 | * reset driver. | ||
532 | */ | ||
533 | goto map_error_handling; | ||
534 | } | ||
492 | 535 | ||
493 | ... | 536 | ... |
494 | 537 | ||
@@ -496,6 +539,12 @@ Specifically: | |||
496 | 539 | ||
497 | Here, "offset" means byte offset within the given page. | 540 | Here, "offset" means byte offset within the given page. |
498 | 541 | ||
542 | You should call dma_mapping_error() as dma_map_page() could fail and return | ||
543 | error as outlined under the dma_map_single() discussion. | ||
544 | |||
545 | You should call dma_unmap_page when the DMA activity is finished, e.g. | ||
546 | from the interrupt which told you that the DMA transfer is done. | ||
547 | |||
499 | With scatterlists, you map a region gathered from several regions by: | 548 | With scatterlists, you map a region gathered from several regions by: |
500 | 549 | ||
501 | int i, count = dma_map_sg(dev, sglist, nents, direction); | 550 | int i, count = dma_map_sg(dev, sglist, nents, direction); |
@@ -578,6 +627,14 @@ to use the dma_sync_*() interfaces. | |||
578 | dma_addr_t mapping; | 627 | dma_addr_t mapping; |
579 | 628 | ||
580 | mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE); | 629 | mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE); |
630 | if (dma_mapping_error(dma_handle)) { | ||
631 | /* | ||
632 | * reduce current DMA mapping usage, | ||
633 | * delay and try again later or | ||
634 | * reset driver. | ||
635 | */ | ||
636 | goto map_error_handling; | ||
637 | } | ||
581 | 638 | ||
582 | cp->rx_buf = buffer; | 639 | cp->rx_buf = buffer; |
583 | cp->rx_len = len; | 640 | cp->rx_len = len; |
@@ -658,6 +715,75 @@ failure can be determined by: | |||
658 | * delay and try again later or | 715 | * delay and try again later or |
659 | * reset driver. | 716 | * reset driver. |
660 | */ | 717 | */ |
718 | goto map_error_handling; | ||
719 | } | ||
720 | |||
721 | - unmap pages that are already mapped, when mapping error occurs in the middle | ||
722 | of a multiple page mapping attempt. These example are applicable to | ||
723 | dma_map_page() as well. | ||
724 | |||
725 | Example 1: | ||
726 | dma_addr_t dma_handle1; | ||
727 | dma_addr_t dma_handle2; | ||
728 | |||
729 | dma_handle1 = dma_map_single(dev, addr, size, direction); | ||
730 | if (dma_mapping_error(dev, dma_handle1)) { | ||
731 | /* | ||
732 | * reduce current DMA mapping usage, | ||
733 | * delay and try again later or | ||
734 | * reset driver. | ||
735 | */ | ||
736 | goto map_error_handling1; | ||
737 | } | ||
738 | dma_handle2 = dma_map_single(dev, addr, size, direction); | ||
739 | if (dma_mapping_error(dev, dma_handle2)) { | ||
740 | /* | ||
741 | * reduce current DMA mapping usage, | ||
742 | * delay and try again later or | ||
743 | * reset driver. | ||
744 | */ | ||
745 | goto map_error_handling2; | ||
746 | } | ||
747 | |||
748 | ... | ||
749 | |||
750 | map_error_handling2: | ||
751 | dma_unmap_single(dma_handle1); | ||
752 | map_error_handling1: | ||
753 | |||
754 | Example 2: (if buffers are allocated a loop, unmap all mapped buffers when | ||
755 | mapping error is detected in the middle) | ||
756 | |||
757 | dma_addr_t dma_addr; | ||
758 | dma_addr_t array[DMA_BUFFERS]; | ||
759 | int save_index = 0; | ||
760 | |||
761 | for (i = 0; i < DMA_BUFFERS; i++) { | ||
762 | |||
763 | ... | ||
764 | |||
765 | dma_addr = dma_map_single(dev, addr, size, direction); | ||
766 | if (dma_mapping_error(dev, dma_addr)) { | ||
767 | /* | ||
768 | * reduce current DMA mapping usage, | ||
769 | * delay and try again later or | ||
770 | * reset driver. | ||
771 | */ | ||
772 | goto map_error_handling; | ||
773 | } | ||
774 | array[i].dma_addr = dma_addr; | ||
775 | save_index++; | ||
776 | } | ||
777 | |||
778 | ... | ||
779 | |||
780 | map_error_handling: | ||
781 | |||
782 | for (i = 0; i < save_index; i++) { | ||
783 | |||
784 | ... | ||
785 | |||
786 | dma_unmap_single(array[i].dma_addr); | ||
661 | } | 787 | } |
662 | 788 | ||
663 | Networking drivers must call dev_kfree_skb to free the socket buffer | 789 | Networking drivers must call dev_kfree_skb to free the socket buffer |
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 66bd97a95f10..78a6c569d204 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -678,3 +678,15 @@ out of dma_debug_entries. These entries are preallocated at boot. The number | |||
678 | of preallocated entries is defined per architecture. If it is too low for you | 678 | of preallocated entries is defined per architecture. If it is too low for you |
679 | boot with 'dma_debug_entries=<your_desired_number>' to overwrite the | 679 | boot with 'dma_debug_entries=<your_desired_number>' to overwrite the |
680 | architectural default. | 680 | architectural default. |
681 | |||
682 | void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr); | ||
683 | |||
684 | dma-debug interface debug_dma_mapping_error() to debug drivers that fail | ||
685 | to check dma mapping errors on addresses returned by dma_map_single() and | ||
686 | dma_map_page() interfaces. This interface clears a flag set by | ||
687 | debug_dma_map_page() to indicate that dma_mapping_error() has been called by | ||
688 | the driver. When driver does unmap, debug_dma_unmap() checks the flag and if | ||
689 | this flag is still set, prints warning message that includes call trace that | ||
690 | leads up to the unmap. This interface can be called from dma_mapping_error() | ||
691 | routines to enable dma mapping error check debugging. | ||
692 | |||
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt index f50309081ac7..e59480db9ee0 100644 --- a/Documentation/DMA-attributes.txt +++ b/Documentation/DMA-attributes.txt | |||
@@ -91,3 +91,12 @@ transferred to 'device' domain. This attribute can be also used for | |||
91 | dma_unmap_{single,page,sg} functions family to force buffer to stay in | 91 | dma_unmap_{single,page,sg} functions family to force buffer to stay in |
92 | device domain after releasing a mapping for it. Use this attribute with | 92 | device domain after releasing a mapping for it. Use this attribute with |
93 | care! | 93 | care! |
94 | |||
95 | DMA_ATTR_FORCE_CONTIGUOUS | ||
96 | ------------------------- | ||
97 | |||
98 | By default DMA-mapping subsystem is allowed to assemble the buffer | ||
99 | allocated by dma_alloc_attrs() function from individual pages if it can | ||
100 | be mapped as contiguous chunk into device dma address space. By | ||
101 | specifing this attribute the allocated buffer is forced to be contiguous | ||
102 | also in physical memory. | ||
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index b0300529ab13..4ee2304f82f9 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
@@ -1141,23 +1141,13 @@ int max_width, max_height;</synopsis> | |||
1141 | the <methodname>page_flip</methodname> operation will be called with a | 1141 | the <methodname>page_flip</methodname> operation will be called with a |
1142 | non-NULL <parameter>event</parameter> argument pointing to a | 1142 | non-NULL <parameter>event</parameter> argument pointing to a |
1143 | <structname>drm_pending_vblank_event</structname> instance. Upon page | 1143 | <structname>drm_pending_vblank_event</structname> instance. Upon page |
1144 | flip completion the driver must fill the | 1144 | flip completion the driver must call <methodname>drm_send_vblank_event</methodname> |
1145 | <parameter>event</parameter>::<structfield>event</structfield> | 1145 | to fill in the event and send to wake up any waiting processes. |
1146 | <structfield>sequence</structfield>, <structfield>tv_sec</structfield> | 1146 | This can be performed with |
1147 | and <structfield>tv_usec</structfield> fields with the associated | ||
1148 | vertical blanking count and timestamp, add the event to the | ||
1149 | <parameter>drm_file</parameter> list of events to be signaled, and wake | ||
1150 | up any waiting process. This can be performed with | ||
1151 | <programlisting><![CDATA[ | 1147 | <programlisting><![CDATA[ |
1152 | struct timeval now; | ||
1153 | |||
1154 | event->event.sequence = drm_vblank_count_and_time(..., &now); | ||
1155 | event->event.tv_sec = now.tv_sec; | ||
1156 | event->event.tv_usec = now.tv_usec; | ||
1157 | |||
1158 | spin_lock_irqsave(&dev->event_lock, flags); | 1148 | spin_lock_irqsave(&dev->event_lock, flags); |
1159 | list_add_tail(&event->base.link, &event->base.file_priv->event_list); | 1149 | ... |
1160 | wake_up_interruptible(&event->base.file_priv->event_wait); | 1150 | drm_send_vblank_event(dev, pipe, event); |
1161 | spin_unlock_irqrestore(&dev->event_lock, flags); | 1151 | spin_unlock_irqrestore(&dev->event_lock, flags); |
1162 | ]]></programlisting> | 1152 | ]]></programlisting> |
1163 | </para> | 1153 | </para> |
@@ -1621,10 +1611,10 @@ void intel_crt_init(struct drm_device *dev) | |||
1621 | </sect2> | 1611 | </sect2> |
1622 | </sect1> | 1612 | </sect1> |
1623 | 1613 | ||
1624 | <!-- Internals: mid-layer helper functions --> | 1614 | <!-- Internals: kms helper functions --> |
1625 | 1615 | ||
1626 | <sect1> | 1616 | <sect1> |
1627 | <title>Mid-layer Helper Functions</title> | 1617 | <title>Mode Setting Helper Functions</title> |
1628 | <para> | 1618 | <para> |
1629 | The CRTC, encoder and connector functions provided by the drivers | 1619 | The CRTC, encoder and connector functions provided by the drivers |
1630 | implement the DRM API. They're called by the DRM core and ioctl handlers | 1620 | implement the DRM API. They're called by the DRM core and ioctl handlers |
@@ -2106,6 +2096,21 @@ void intel_crt_init(struct drm_device *dev) | |||
2106 | </listitem> | 2096 | </listitem> |
2107 | </itemizedlist> | 2097 | </itemizedlist> |
2108 | </sect2> | 2098 | </sect2> |
2099 | <sect2> | ||
2100 | <title>Modeset Helper Functions Reference</title> | ||
2101 | !Edrivers/gpu/drm/drm_crtc_helper.c | ||
2102 | </sect2> | ||
2103 | <sect2> | ||
2104 | <title>fbdev Helper Functions Reference</title> | ||
2105 | !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers | ||
2106 | !Edrivers/gpu/drm/drm_fb_helper.c | ||
2107 | </sect2> | ||
2108 | <sect2> | ||
2109 | <title>Display Port Helper Functions Reference</title> | ||
2110 | !Pdrivers/gpu/drm/drm_dp_helper.c dp helpers | ||
2111 | !Iinclude/drm/drm_dp_helper.h | ||
2112 | !Edrivers/gpu/drm/drm_dp_helper.c | ||
2113 | </sect2> | ||
2109 | </sect1> | 2114 | </sect1> |
2110 | 2115 | ||
2111 | <!-- Internals: vertical blanking --> | 2116 | <!-- Internals: vertical blanking --> |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 00687ee9d363..f75ab4c1b281 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -58,6 +58,9 @@ | |||
58 | 58 | ||
59 | <sect1><title>String Conversions</title> | 59 | <sect1><title>String Conversions</title> |
60 | !Elib/vsprintf.c | 60 | !Elib/vsprintf.c |
61 | !Finclude/linux/kernel.h kstrtol | ||
62 | !Finclude/linux/kernel.h kstrtoul | ||
63 | !Elib/kstrtox.c | ||
61 | </sect1> | 64 | </sect1> |
62 | <sect1><title>String Manipulation</title> | 65 | <sect1><title>String Manipulation</title> |
63 | <!-- All functions are exported at now | 66 | <!-- All functions are exported at now |
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 4fdf6b562d1c..3dd9e78815d1 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
@@ -2586,6 +2586,13 @@ ioctls.</para> | |||
2586 | <para>Vendor and device specific media bus pixel formats. | 2586 | <para>Vendor and device specific media bus pixel formats. |
2587 | <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para> | 2587 | <xref linkend="v4l2-mbus-vendor-spec-fmts" />.</para> |
2588 | </listitem> | 2588 | </listitem> |
2589 | <listitem> | ||
2590 | <para>Importing DMABUF file descriptors as a new IO method described | ||
2591 | in <xref linkend="dmabuf" />.</para> | ||
2592 | </listitem> | ||
2593 | <listitem> | ||
2594 | <para>Exporting DMABUF files using &VIDIOC-EXPBUF; ioctl.</para> | ||
2595 | </listitem> | ||
2589 | </itemizedlist> | 2596 | </itemizedlist> |
2590 | </section> | 2597 | </section> |
2591 | 2598 | ||
diff --git a/Documentation/DocBook/media/v4l/driver.xml b/Documentation/DocBook/media/v4l/driver.xml index eacafe312cd2..7c6638bacedb 100644 --- a/Documentation/DocBook/media/v4l/driver.xml +++ b/Documentation/DocBook/media/v4l/driver.xml | |||
@@ -116,7 +116,7 @@ my_suspend (struct pci_dev * pci_dev, | |||
116 | return 0; /* a negative value on error, 0 on success. */ | 116 | return 0; /* a negative value on error, 0 on success. */ |
117 | } | 117 | } |
118 | 118 | ||
119 | static void __devexit | 119 | static void |
120 | my_remove (struct pci_dev * pci_dev) | 120 | my_remove (struct pci_dev * pci_dev) |
121 | { | 121 | { |
122 | my_device *my = pci_get_drvdata (pci_dev); | 122 | my_device *my = pci_get_drvdata (pci_dev); |
@@ -124,7 +124,7 @@ my_remove (struct pci_dev * pci_dev) | |||
124 | /* Describe me. */ | 124 | /* Describe me. */ |
125 | } | 125 | } |
126 | 126 | ||
127 | static int __devinit | 127 | static int |
128 | my_probe (struct pci_dev * pci_dev, | 128 | my_probe (struct pci_dev * pci_dev, |
129 | const struct pci_device_id * pci_id) | 129 | const struct pci_device_id * pci_id) |
130 | { | 130 | { |
@@ -157,7 +157,7 @@ my_pci_driver = { | |||
157 | .id_table = my_pci_device_ids, | 157 | .id_table = my_pci_device_ids, |
158 | 158 | ||
159 | .probe = my_probe, | 159 | .probe = my_probe, |
160 | .remove = __devexit_p (my_remove), | 160 | .remove = my_remove, |
161 | 161 | ||
162 | /* Power management functions. */ | 162 | /* Power management functions. */ |
163 | .suspend = my_suspend, | 163 | .suspend = my_suspend, |
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index b5d1cbdc558b..388a34032653 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
@@ -331,7 +331,7 @@ application until one or more buffers can be dequeued. By default | |||
331 | outgoing queue. When the <constant>O_NONBLOCK</constant> flag was | 331 | outgoing queue. When the <constant>O_NONBLOCK</constant> flag was |
332 | given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> | 332 | given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> |
333 | returns immediately with an &EAGAIN; when no buffer is available. The | 333 | returns immediately with an &EAGAIN; when no buffer is available. The |
334 | &func-select; or &func-poll; function are always available.</para> | 334 | &func-select; or &func-poll; functions are always available.</para> |
335 | 335 | ||
336 | <para>To start and stop capturing or output applications call the | 336 | <para>To start and stop capturing or output applications call the |
337 | &VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note | 337 | &VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note |
@@ -472,6 +472,165 @@ rest should be evident.</para> | |||
472 | </footnote></para> | 472 | </footnote></para> |
473 | </section> | 473 | </section> |
474 | 474 | ||
475 | <section id="dmabuf"> | ||
476 | <title>Streaming I/O (DMA buffer importing)</title> | ||
477 | |||
478 | <note> | ||
479 | <title>Experimental</title> | ||
480 | <para>This is an <link linkend="experimental"> experimental </link> | ||
481 | interface and may change in the future.</para> | ||
482 | </note> | ||
483 | |||
484 | <para>The DMABUF framework provides a generic method for sharing buffers | ||
485 | between multiple devices. Device drivers that support DMABUF can export a DMA | ||
486 | buffer to userspace as a file descriptor (known as the exporter role), import a | ||
487 | DMA buffer from userspace using a file descriptor previously exported for a | ||
488 | different or the same device (known as the importer role), or both. This | ||
489 | section describes the DMABUF importer role API in V4L2.</para> | ||
490 | |||
491 | <para>Refer to <link linked="vidioc-expbuf"> DMABUF exporting </link> for | ||
492 | details about exporting V4L2 buffers as DMABUF file descriptors.</para> | ||
493 | |||
494 | <para>Input and output devices support the streaming I/O method when the | ||
495 | <constant>V4L2_CAP_STREAMING</constant> flag in the | ||
496 | <structfield>capabilities</structfield> field of &v4l2-capability; returned by | ||
497 | the &VIDIOC-QUERYCAP; ioctl is set. Whether importing DMA buffers through | ||
498 | DMABUF file descriptors is supported is determined by calling the | ||
499 | &VIDIOC-REQBUFS; ioctl with the memory type set to | ||
500 | <constant>V4L2_MEMORY_DMABUF</constant>.</para> | ||
501 | |||
502 | <para>This I/O method is dedicated to sharing DMA buffers between different | ||
503 | devices, which may be V4L devices or other video-related devices (e.g. DRM). | ||
504 | Buffers (planes) are allocated by a driver on behalf of an application. Next, | ||
505 | these buffers are exported to the application as file descriptors using an API | ||
506 | which is specific for an allocator driver. Only such file descriptor are | ||
507 | exchanged. The descriptors and meta-information are passed in &v4l2-buffer; (or | ||
508 | in &v4l2-plane; in the multi-planar API case). The driver must be switched | ||
509 | into DMABUF I/O mode by calling the &VIDIOC-REQBUFS; with the desired buffer | ||
510 | type.</para> | ||
511 | |||
512 | <example> | ||
513 | <title>Initiating streaming I/O with DMABUF file descriptors</title> | ||
514 | |||
515 | <programlisting> | ||
516 | &v4l2-requestbuffers; reqbuf; | ||
517 | |||
518 | memset(&reqbuf, 0, sizeof (reqbuf)); | ||
519 | reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
520 | reqbuf.memory = V4L2_MEMORY_DMABUF; | ||
521 | reqbuf.count = 1; | ||
522 | |||
523 | if (ioctl(fd, &VIDIOC-REQBUFS;, &reqbuf) == -1) { | ||
524 | if (errno == EINVAL) | ||
525 | printf("Video capturing or DMABUF streaming is not supported\n"); | ||
526 | else | ||
527 | perror("VIDIOC_REQBUFS"); | ||
528 | |||
529 | exit(EXIT_FAILURE); | ||
530 | } | ||
531 | </programlisting> | ||
532 | </example> | ||
533 | |||
534 | <para>The buffer (plane) file descriptor is passed on the fly with the | ||
535 | &VIDIOC-QBUF; ioctl. In case of multiplanar buffers, every plane can be | ||
536 | associated with a different DMABUF descriptor. Although buffers are commonly | ||
537 | cycled, applications can pass a different DMABUF descriptor at each | ||
538 | <constant>VIDIOC_QBUF</constant> call.</para> | ||
539 | |||
540 | <example> | ||
541 | <title>Queueing DMABUF using single plane API</title> | ||
542 | |||
543 | <programlisting> | ||
544 | int buffer_queue(int v4lfd, int index, int dmafd) | ||
545 | { | ||
546 | &v4l2-buffer; buf; | ||
547 | |||
548 | memset(&buf, 0, sizeof buf); | ||
549 | buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
550 | buf.memory = V4L2_MEMORY_DMABUF; | ||
551 | buf.index = index; | ||
552 | buf.m.fd = dmafd; | ||
553 | |||
554 | if (ioctl(v4lfd, &VIDIOC-QBUF;, &buf) == -1) { | ||
555 | perror("VIDIOC_QBUF"); | ||
556 | return -1; | ||
557 | } | ||
558 | |||
559 | return 0; | ||
560 | } | ||
561 | </programlisting> | ||
562 | </example> | ||
563 | |||
564 | <example> | ||
565 | <title>Queueing DMABUF using multi plane API</title> | ||
566 | |||
567 | <programlisting> | ||
568 | int buffer_queue_mp(int v4lfd, int index, int dmafd[], int n_planes) | ||
569 | { | ||
570 | &v4l2-buffer; buf; | ||
571 | &v4l2-plane; planes[VIDEO_MAX_PLANES]; | ||
572 | int i; | ||
573 | |||
574 | memset(&buf, 0, sizeof buf); | ||
575 | buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | ||
576 | buf.memory = V4L2_MEMORY_DMABUF; | ||
577 | buf.index = index; | ||
578 | buf.m.planes = planes; | ||
579 | buf.length = n_planes; | ||
580 | |||
581 | memset(&planes, 0, sizeof planes); | ||
582 | |||
583 | for (i = 0; i < n_planes; ++i) | ||
584 | buf.m.planes[i].m.fd = dmafd[i]; | ||
585 | |||
586 | if (ioctl(v4lfd, &VIDIOC-QBUF;, &buf) == -1) { | ||
587 | perror("VIDIOC_QBUF"); | ||
588 | return -1; | ||
589 | } | ||
590 | |||
591 | return 0; | ||
592 | } | ||
593 | </programlisting> | ||
594 | </example> | ||
595 | |||
596 | <para>Captured or displayed buffers are dequeued with the | ||
597 | &VIDIOC-DQBUF; ioctl. The driver can unlock the buffer at any | ||
598 | time between the completion of the DMA and this ioctl. The memory is | ||
599 | also unlocked when &VIDIOC-STREAMOFF; is called, &VIDIOC-REQBUFS;, or | ||
600 | when the device is closed.</para> | ||
601 | |||
602 | <para>For capturing applications it is customary to enqueue a | ||
603 | number of empty buffers, to start capturing and enter the read loop. | ||
604 | Here the application waits until a filled buffer can be dequeued, and | ||
605 | re-enqueues the buffer when the data is no longer needed. Output | ||
606 | applications fill and enqueue buffers, when enough buffers are stacked | ||
607 | up output is started. In the write loop, when the application | ||
608 | runs out of free buffers it must wait until an empty buffer can be | ||
609 | dequeued and reused. Two methods exist to suspend execution of the | ||
610 | application until one or more buffers can be dequeued. By default | ||
611 | <constant>VIDIOC_DQBUF</constant> blocks when no buffer is in the | ||
612 | outgoing queue. When the <constant>O_NONBLOCK</constant> flag was | ||
613 | given to the &func-open; function, <constant>VIDIOC_DQBUF</constant> | ||
614 | returns immediately with an &EAGAIN; when no buffer is available. The | ||
615 | &func-select; and &func-poll; functions are always available.</para> | ||
616 | |||
617 | <para>To start and stop capturing or displaying applications call the | ||
618 | &VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctls. Note that | ||
619 | <constant>VIDIOC_STREAMOFF</constant> removes all buffers from both queues and | ||
620 | unlocks all buffers as a side effect. Since there is no notion of doing | ||
621 | anything "now" on a multitasking system, if an application needs to synchronize | ||
622 | with another event it should examine the &v4l2-buffer; | ||
623 | <structfield>timestamp</structfield> of captured buffers, or set the field | ||
624 | before enqueuing buffers for output.</para> | ||
625 | |||
626 | <para>Drivers implementing DMABUF importing I/O must support the | ||
627 | <constant>VIDIOC_REQBUFS</constant>, <constant>VIDIOC_QBUF</constant>, | ||
628 | <constant>VIDIOC_DQBUF</constant>, <constant>VIDIOC_STREAMON</constant> and | ||
629 | <constant>VIDIOC_STREAMOFF</constant> ioctls, and the | ||
630 | <function>select()</function> and <function>poll()</function> functions.</para> | ||
631 | |||
632 | </section> | ||
633 | |||
475 | <section id="async"> | 634 | <section id="async"> |
476 | <title>Asynchronous I/O</title> | 635 | <title>Asynchronous I/O</title> |
477 | 636 | ||
@@ -673,6 +832,14 @@ memory, set by the application. See <xref linkend="userp" /> for details. | |||
673 | <structname>v4l2_buffer</structname> structure.</entry> | 832 | <structname>v4l2_buffer</structname> structure.</entry> |
674 | </row> | 833 | </row> |
675 | <row> | 834 | <row> |
835 | <entry></entry> | ||
836 | <entry>int</entry> | ||
837 | <entry><structfield>fd</structfield></entry> | ||
838 | <entry>For the single-plane API and when | ||
839 | <structfield>memory</structfield> is <constant>V4L2_MEMORY_DMABUF</constant> this | ||
840 | is the file descriptor associated with a DMABUF buffer.</entry> | ||
841 | </row> | ||
842 | <row> | ||
676 | <entry>__u32</entry> | 843 | <entry>__u32</entry> |
677 | <entry><structfield>length</structfield></entry> | 844 | <entry><structfield>length</structfield></entry> |
678 | <entry></entry> | 845 | <entry></entry> |
@@ -744,6 +911,15 @@ should set this to 0.</entry> | |||
744 | </entry> | 911 | </entry> |
745 | </row> | 912 | </row> |
746 | <row> | 913 | <row> |
914 | <entry></entry> | ||
915 | <entry>int</entry> | ||
916 | <entry><structfield>fd</structfield></entry> | ||
917 | <entry>When the memory type in the containing &v4l2-buffer; is | ||
918 | <constant>V4L2_MEMORY_DMABUF</constant>, this is a file | ||
919 | descriptor associated with a DMABUF buffer, similar to the | ||
920 | <structfield>fd</structfield> field in &v4l2-buffer;.</entry> | ||
921 | </row> | ||
922 | <row> | ||
747 | <entry>__u32</entry> | 923 | <entry>__u32</entry> |
748 | <entry><structfield>data_offset</structfield></entry> | 924 | <entry><structfield>data_offset</structfield></entry> |
749 | <entry></entry> | 925 | <entry></entry> |
@@ -923,7 +1099,7 @@ application. Drivers set or clear this flag when the | |||
923 | </row> | 1099 | </row> |
924 | <row> | 1100 | <row> |
925 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> | 1101 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant></entry> |
926 | <entry>0x0400</entry> | 1102 | <entry>0x0800</entry> |
927 | <entry>Caches do not have to be invalidated for this buffer. | 1103 | <entry>Caches do not have to be invalidated for this buffer. |
928 | Typically applications shall use this flag if the data captured in the buffer | 1104 | Typically applications shall use this flag if the data captured in the buffer |
929 | is not going to be touched by the CPU, instead the buffer will, probably, be | 1105 | is not going to be touched by the CPU, instead the buffer will, probably, be |
@@ -932,7 +1108,7 @@ passed on to a DMA-capable hardware unit for further processing or output. | |||
932 | </row> | 1108 | </row> |
933 | <row> | 1109 | <row> |
934 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> | 1110 | <entry><constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant></entry> |
935 | <entry>0x0800</entry> | 1111 | <entry>0x1000</entry> |
936 | <entry>Caches do not have to be cleaned for this buffer. | 1112 | <entry>Caches do not have to be cleaned for this buffer. |
937 | Typically applications shall use this flag for output buffers if the data | 1113 | Typically applications shall use this flag for output buffers if the data |
938 | in this buffer has not been created by the CPU but by some DMA-capable unit, | 1114 | in this buffer has not been created by the CPU but by some DMA-capable unit, |
@@ -964,6 +1140,12 @@ pointer</link> I/O.</entry> | |||
964 | <entry>3</entry> | 1140 | <entry>3</entry> |
965 | <entry>[to do]</entry> | 1141 | <entry>[to do]</entry> |
966 | </row> | 1142 | </row> |
1143 | <row> | ||
1144 | <entry><constant>V4L2_MEMORY_DMABUF</constant></entry> | ||
1145 | <entry>4</entry> | ||
1146 | <entry>The buffer is used for <link linkend="dmabuf">DMA shared | ||
1147 | buffer</link> I/O.</entry> | ||
1148 | </row> | ||
967 | </tbody> | 1149 | </tbody> |
968 | </tgroup> | 1150 | </tgroup> |
969 | </table> | 1151 | </table> |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 10ccde9d16d0..4d110b1ad3e9 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -543,6 +543,7 @@ and discussions on the V4L mailing list.</revremark> | |||
543 | &sub-enuminput; | 543 | &sub-enuminput; |
544 | &sub-enumoutput; | 544 | &sub-enumoutput; |
545 | &sub-enumstd; | 545 | &sub-enumstd; |
546 | &sub-expbuf; | ||
546 | &sub-g-audio; | 547 | &sub-g-audio; |
547 | &sub-g-audioout; | 548 | &sub-g-audioout; |
548 | &sub-g-crop; | 549 | &sub-g-crop; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml index a8cda1acacd9..cd9943672434 100644 --- a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml +++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml | |||
@@ -6,7 +6,8 @@ | |||
6 | 6 | ||
7 | <refnamediv> | 7 | <refnamediv> |
8 | <refname>VIDIOC_CREATE_BUFS</refname> | 8 | <refname>VIDIOC_CREATE_BUFS</refname> |
9 | <refpurpose>Create buffers for Memory Mapped or User Pointer I/O</refpurpose> | 9 | <refpurpose>Create buffers for Memory Mapped or User Pointer or DMA Buffer |
10 | I/O</refpurpose> | ||
10 | </refnamediv> | 11 | </refnamediv> |
11 | 12 | ||
12 | <refsynopsisdiv> | 13 | <refsynopsisdiv> |
@@ -55,11 +56,11 @@ | |||
55 | </note> | 56 | </note> |
56 | 57 | ||
57 | <para>This ioctl is used to create buffers for <link linkend="mmap">memory | 58 | <para>This ioctl is used to create buffers for <link linkend="mmap">memory |
58 | mapped</link> or <link linkend="userp">user pointer</link> | 59 | mapped</link> or <link linkend="userp">user pointer</link> or <link |
59 | I/O. It can be used as an alternative or in addition to the | 60 | linkend="dmabuf">DMA buffer</link> I/O. It can be used as an alternative or in |
60 | <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter control over buffers | 61 | addition to the <constant>VIDIOC_REQBUFS</constant> ioctl, when a tighter |
61 | is required. This ioctl can be called multiple times to create buffers of | 62 | control over buffers is required. This ioctl can be called multiple times to |
62 | different sizes.</para> | 63 | create buffers of different sizes.</para> |
63 | 64 | ||
64 | <para>To allocate device buffers applications initialize relevant fields of | 65 | <para>To allocate device buffers applications initialize relevant fields of |
65 | the <structname>v4l2_create_buffers</structname> structure. They set the | 66 | the <structname>v4l2_create_buffers</structname> structure. They set the |
@@ -109,7 +110,8 @@ information.</para> | |||
109 | <entry>__u32</entry> | 110 | <entry>__u32</entry> |
110 | <entry><structfield>memory</structfield></entry> | 111 | <entry><structfield>memory</structfield></entry> |
111 | <entry>Applications set this field to | 112 | <entry>Applications set this field to |
112 | <constant>V4L2_MEMORY_MMAP</constant> or | 113 | <constant>V4L2_MEMORY_MMAP</constant>, |
114 | <constant>V4L2_MEMORY_DMABUF</constant> or | ||
113 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" | 115 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" |
114 | /></entry> | 116 | /></entry> |
115 | </row> | 117 | </row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml new file mode 100644 index 000000000000..72dfbd20a802 --- /dev/null +++ b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml | |||
@@ -0,0 +1,212 @@ | |||
1 | <refentry id="vidioc-expbuf"> | ||
2 | |||
3 | <refmeta> | ||
4 | <refentrytitle>ioctl VIDIOC_EXPBUF</refentrytitle> | ||
5 | &manvol; | ||
6 | </refmeta> | ||
7 | |||
8 | <refnamediv> | ||
9 | <refname>VIDIOC_EXPBUF</refname> | ||
10 | <refpurpose>Export a buffer as a DMABUF file descriptor.</refpurpose> | ||
11 | </refnamediv> | ||
12 | |||
13 | <refsynopsisdiv> | ||
14 | <funcsynopsis> | ||
15 | <funcprototype> | ||
16 | <funcdef>int <function>ioctl</function></funcdef> | ||
17 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
18 | <paramdef>int <parameter>request</parameter></paramdef> | ||
19 | <paramdef>struct v4l2_exportbuffer *<parameter>argp</parameter></paramdef> | ||
20 | </funcprototype> | ||
21 | </funcsynopsis> | ||
22 | </refsynopsisdiv> | ||
23 | |||
24 | <refsect1> | ||
25 | <title>Arguments</title> | ||
26 | |||
27 | <variablelist> | ||
28 | <varlistentry> | ||
29 | <term><parameter>fd</parameter></term> | ||
30 | <listitem> | ||
31 | <para>&fd;</para> | ||
32 | </listitem> | ||
33 | </varlistentry> | ||
34 | <varlistentry> | ||
35 | <term><parameter>request</parameter></term> | ||
36 | <listitem> | ||
37 | <para>VIDIOC_EXPBUF</para> | ||
38 | </listitem> | ||
39 | </varlistentry> | ||
40 | <varlistentry> | ||
41 | <term><parameter>argp</parameter></term> | ||
42 | <listitem> | ||
43 | <para></para> | ||
44 | </listitem> | ||
45 | </varlistentry> | ||
46 | </variablelist> | ||
47 | </refsect1> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | |||
52 | <note> | ||
53 | <title>Experimental</title> | ||
54 | <para>This is an <link linkend="experimental"> experimental </link> | ||
55 | interface and may change in the future.</para> | ||
56 | </note> | ||
57 | |||
58 | <para>This ioctl is an extension to the <link linkend="mmap">memory | ||
59 | mapping</link> I/O method, therefore it is available only for | ||
60 | <constant>V4L2_MEMORY_MMAP</constant> buffers. It can be used to export a | ||
61 | buffer as a DMABUF file at any time after buffers have been allocated with the | ||
62 | &VIDIOC-REQBUFS; ioctl.</para> | ||
63 | |||
64 | <para> To export a buffer, applications fill &v4l2-exportbuffer;. The | ||
65 | <structfield> type </structfield> field is set to the same buffer type as was | ||
66 | previously used with &v4l2-requestbuffers;<structfield> type </structfield>. | ||
67 | Applications must also set the <structfield> index </structfield> field. Valid | ||
68 | index numbers range from zero to the number of buffers allocated with | ||
69 | &VIDIOC-REQBUFS; (&v4l2-requestbuffers;<structfield> count </structfield>) | ||
70 | minus one. For the multi-planar API, applications set the <structfield> plane | ||
71 | </structfield> field to the index of the plane to be exported. Valid planes | ||
72 | range from zero to the maximal number of valid planes for the currently active | ||
73 | format. For the single-planar API, applications must set <structfield> plane | ||
74 | </structfield> to zero. Additional flags may be posted in the <structfield> | ||
75 | flags </structfield> field. Refer to a manual for open() for details. | ||
76 | Currently only O_CLOEXEC is supported. All other fields must be set to zero. | ||
77 | In the case of multi-planar API, every plane is exported separately using | ||
78 | multiple <constant> VIDIOC_EXPBUF </constant> calls. </para> | ||
79 | |||
80 | <para> After calling <constant>VIDIOC_EXPBUF</constant> the <structfield> fd | ||
81 | </structfield> field will be set by a driver. This is a DMABUF file | ||
82 | descriptor. The application may pass it to other DMABUF-aware devices. Refer to | ||
83 | <link linkend="dmabuf">DMABUF importing</link> for details about importing | ||
84 | DMABUF files into V4L2 nodes. It is recommended to close a DMABUF file when it | ||
85 | is no longer used to allow the associated memory to be reclaimed. </para> | ||
86 | |||
87 | </refsect1> | ||
88 | <refsect1> | ||
89 | <section> | ||
90 | <title>Examples</title> | ||
91 | |||
92 | <example> | ||
93 | <title>Exporting a buffer.</title> | ||
94 | <programlisting> | ||
95 | int buffer_export(int v4lfd, &v4l2-buf-type; bt, int index, int *dmafd) | ||
96 | { | ||
97 | &v4l2-exportbuffer; expbuf; | ||
98 | |||
99 | memset(&expbuf, 0, sizeof(expbuf)); | ||
100 | expbuf.type = bt; | ||
101 | expbuf.index = index; | ||
102 | if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &expbuf) == -1) { | ||
103 | perror("VIDIOC_EXPBUF"); | ||
104 | return -1; | ||
105 | } | ||
106 | |||
107 | *dmafd = expbuf.fd; | ||
108 | |||
109 | return 0; | ||
110 | } | ||
111 | </programlisting> | ||
112 | </example> | ||
113 | |||
114 | <example> | ||
115 | <title>Exporting a buffer using the multi-planar API.</title> | ||
116 | <programlisting> | ||
117 | int buffer_export_mp(int v4lfd, &v4l2-buf-type; bt, int index, | ||
118 | int dmafd[], int n_planes) | ||
119 | { | ||
120 | int i; | ||
121 | |||
122 | for (i = 0; i < n_planes; ++i) { | ||
123 | &v4l2-exportbuffer; expbuf; | ||
124 | |||
125 | memset(&expbuf, 0, sizeof(expbuf)); | ||
126 | expbuf.type = bt; | ||
127 | expbuf.index = index; | ||
128 | expbuf.plane = i; | ||
129 | if (ioctl(v4lfd, &VIDIOC-EXPBUF;, &expbuf) == -1) { | ||
130 | perror("VIDIOC_EXPBUF"); | ||
131 | while (i) | ||
132 | close(dmafd[--i]); | ||
133 | return -1; | ||
134 | } | ||
135 | dmafd[i] = expbuf.fd; | ||
136 | } | ||
137 | |||
138 | return 0; | ||
139 | } | ||
140 | </programlisting> | ||
141 | </example> | ||
142 | </section> | ||
143 | </refsect1> | ||
144 | |||
145 | <refsect1> | ||
146 | <table pgwide="1" frame="none" id="v4l2-exportbuffer"> | ||
147 | <title>struct <structname>v4l2_exportbuffer</structname></title> | ||
148 | <tgroup cols="3"> | ||
149 | &cs-str; | ||
150 | <tbody valign="top"> | ||
151 | <row> | ||
152 | <entry>__u32</entry> | ||
153 | <entry><structfield>type</structfield></entry> | ||
154 | <entry>Type of the buffer, same as &v4l2-format; | ||
155 | <structfield>type</structfield> or &v4l2-requestbuffers; | ||
156 | <structfield>type</structfield>, set by the application. See <xref | ||
157 | linkend="v4l2-buf-type" /></entry> | ||
158 | </row> | ||
159 | <row> | ||
160 | <entry>__u32</entry> | ||
161 | <entry><structfield>index</structfield></entry> | ||
162 | <entry>Number of the buffer, set by the application. This field is | ||
163 | only used for <link linkend="mmap">memory mapping</link> I/O and can range from | ||
164 | zero to the number of buffers allocated with the &VIDIOC-REQBUFS; and/or | ||
165 | &VIDIOC-CREATE-BUFS; ioctls. </entry> | ||
166 | </row> | ||
167 | <row> | ||
168 | <entry>__u32</entry> | ||
169 | <entry><structfield>plane</structfield></entry> | ||
170 | <entry>Index of the plane to be exported when using the | ||
171 | multi-planar API. Otherwise this value must be set to zero. </entry> | ||
172 | </row> | ||
173 | <row> | ||
174 | <entry>__u32</entry> | ||
175 | <entry><structfield>flags</structfield></entry> | ||
176 | <entry>Flags for the newly created file, currently only <constant> | ||
177 | O_CLOEXEC </constant> is supported, refer to the manual of open() for more | ||
178 | details.</entry> | ||
179 | </row> | ||
180 | <row> | ||
181 | <entry>__s32</entry> | ||
182 | <entry><structfield>fd</structfield></entry> | ||
183 | <entry>The DMABUF file descriptor associated with a buffer. Set by | ||
184 | the driver.</entry> | ||
185 | </row> | ||
186 | <row> | ||
187 | <entry>__u32</entry> | ||
188 | <entry><structfield>reserved[11]</structfield></entry> | ||
189 | <entry>Reserved field for future use. Must be set to zero.</entry> | ||
190 | </row> | ||
191 | </tbody> | ||
192 | </tgroup> | ||
193 | </table> | ||
194 | |||
195 | </refsect1> | ||
196 | |||
197 | <refsect1> | ||
198 | &return-value; | ||
199 | <variablelist> | ||
200 | <varlistentry> | ||
201 | <term><errorcode>EINVAL</errorcode></term> | ||
202 | <listitem> | ||
203 | <para>A queue is not in MMAP mode or DMABUF exporting is not | ||
204 | supported or <structfield> flags </structfield> or <structfield> type | ||
205 | </structfield> or <structfield> index </structfield> or <structfield> plane | ||
206 | </structfield> fields are invalid.</para> | ||
207 | </listitem> | ||
208 | </varlistentry> | ||
209 | </variablelist> | ||
210 | </refsect1> | ||
211 | |||
212 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml index 2d37abefce13..3504a7f2f382 100644 --- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml +++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml | |||
@@ -109,6 +109,23 @@ they cannot be swapped out to disk. Buffers remain locked until | |||
109 | dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is | 109 | dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is |
110 | called, or until the device is closed.</para> | 110 | called, or until the device is closed.</para> |
111 | 111 | ||
112 | <para>To enqueue a <link linkend="dmabuf">DMABUF</link> buffer applications | ||
113 | set the <structfield>memory</structfield> field to | ||
114 | <constant>V4L2_MEMORY_DMABUF</constant> and the <structfield>m.fd</structfield> | ||
115 | field to a file descriptor associated with a DMABUF buffer. When the | ||
116 | multi-planar API is used the <structfield>m.fd</structfield> fields of the | ||
117 | passed array of &v4l2-plane; have to be used instead. When | ||
118 | <constant>VIDIOC_QBUF</constant> is called with a pointer to this structure the | ||
119 | driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the | ||
120 | <constant>V4L2_BUF_FLAG_MAPPED</constant> and | ||
121 | <constant>V4L2_BUF_FLAG_DONE</constant> flags in the | ||
122 | <structfield>flags</structfield> field, or it returns an error code. This | ||
123 | ioctl locks the buffer. Locking a buffer means passing it to a driver for a | ||
124 | hardware access (usually DMA). If an application accesses (reads/writes) a | ||
125 | locked buffer then the result is undefined. Buffers remain locked until | ||
126 | dequeued, until the &VIDIOC-STREAMOFF; or &VIDIOC-REQBUFS; ioctl is called, or | ||
127 | until the device is closed.</para> | ||
128 | |||
112 | <para>Applications call the <constant>VIDIOC_DQBUF</constant> | 129 | <para>Applications call the <constant>VIDIOC_DQBUF</constant> |
113 | ioctl to dequeue a filled (capturing) or displayed (output) buffer | 130 | ioctl to dequeue a filled (capturing) or displayed (output) buffer |
114 | from the driver's outgoing queue. They just set the | 131 | from the driver's outgoing queue. They just set the |
diff --git a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml index 2b50ef2007f3..78a06a9a5ece 100644 --- a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml +++ b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml | |||
@@ -48,28 +48,30 @@ | |||
48 | <refsect1> | 48 | <refsect1> |
49 | <title>Description</title> | 49 | <title>Description</title> |
50 | 50 | ||
51 | <para>This ioctl is used to initiate <link linkend="mmap">memory | 51 | <para>This ioctl is used to initiate <link linkend="mmap">memory mapped</link>, |
52 | mapped</link> or <link linkend="userp">user pointer</link> | 52 | <link linkend="userp">user pointer</link> or <link |
53 | I/O. Memory mapped buffers are located in device memory and must be | 53 | linkend="dmabuf">DMABUF</link> based I/O. Memory mapped buffers are located in |
54 | allocated with this ioctl before they can be mapped into the | 54 | device memory and must be allocated with this ioctl before they can be mapped |
55 | application's address space. User buffers are allocated by | 55 | into the application's address space. User buffers are allocated by |
56 | applications themselves, and this ioctl is merely used to switch the | 56 | applications themselves, and this ioctl is merely used to switch the driver |
57 | driver into user pointer I/O mode and to setup some internal structures.</para> | 57 | into user pointer I/O mode and to setup some internal structures. |
58 | Similarly, DMABUF buffers are allocated by applications through a device | ||
59 | driver, and this ioctl only configures the driver into DMABUF I/O mode without | ||
60 | performing any direct allocation.</para> | ||
58 | 61 | ||
59 | <para>To allocate device buffers applications initialize all | 62 | <para>To allocate device buffers applications initialize all fields of the |
60 | fields of the <structname>v4l2_requestbuffers</structname> structure. | 63 | <structname>v4l2_requestbuffers</structname> structure. They set the |
61 | They set the <structfield>type</structfield> field to the respective | 64 | <structfield>type</structfield> field to the respective stream or buffer type, |
62 | stream or buffer type, the <structfield>count</structfield> field to | 65 | the <structfield>count</structfield> field to the desired number of buffers, |
63 | the desired number of buffers, <structfield>memory</structfield> | 66 | <structfield>memory</structfield> must be set to the requested I/O method and |
64 | must be set to the requested I/O method and the <structfield>reserved</structfield> array | 67 | the <structfield>reserved</structfield> array must be zeroed. When the ioctl is |
65 | must be zeroed. When the ioctl | 68 | called with a pointer to this structure the driver will attempt to allocate the |
66 | is called with a pointer to this structure the driver will attempt to allocate | 69 | requested number of buffers and it stores the actual number allocated in the |
67 | the requested number of buffers and it stores the actual number | 70 | <structfield>count</structfield> field. It can be smaller than the number |
68 | allocated in the <structfield>count</structfield> field. It can be | 71 | requested, even zero, when the driver runs out of free memory. A larger number |
69 | smaller than the number requested, even zero, when the driver runs out | 72 | is also possible when the driver requires more buffers to function correctly. |
70 | of free memory. A larger number is also possible when the driver requires | 73 | For example video output requires at least two buffers, one displayed and one |
71 | more buffers to function correctly. For example video output requires at least two buffers, | 74 | filled by the application.</para> |
72 | one displayed and one filled by the application.</para> | ||
73 | <para>When the I/O method is not supported the ioctl | 75 | <para>When the I/O method is not supported the ioctl |
74 | returns an &EINVAL;.</para> | 76 | returns an &EINVAL;.</para> |
75 | 77 | ||
@@ -102,7 +104,8 @@ as the &v4l2-format; <structfield>type</structfield> field. See <xref | |||
102 | <entry>__u32</entry> | 104 | <entry>__u32</entry> |
103 | <entry><structfield>memory</structfield></entry> | 105 | <entry><structfield>memory</structfield></entry> |
104 | <entry>Applications set this field to | 106 | <entry>Applications set this field to |
105 | <constant>V4L2_MEMORY_MMAP</constant> or | 107 | <constant>V4L2_MEMORY_MMAP</constant>, |
108 | <constant>V4L2_MEMORY_DMABUF</constant> or | ||
106 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" | 109 | <constant>V4L2_MEMORY_USERPTR</constant>. See <xref linkend="v4l2-memory" |
107 | />.</entry> | 110 | />.</entry> |
108 | </row> | 111 | </row> |
diff --git a/Documentation/PCI/pci-iov-howto.txt b/Documentation/PCI/pci-iov-howto.txt index fc73ef5d65b8..86551cc72e03 100644 --- a/Documentation/PCI/pci-iov-howto.txt +++ b/Documentation/PCI/pci-iov-howto.txt | |||
@@ -2,6 +2,9 @@ | |||
2 | Copyright (C) 2009 Intel Corporation | 2 | Copyright (C) 2009 Intel Corporation |
3 | Yu Zhao <yu.zhao@intel.com> | 3 | Yu Zhao <yu.zhao@intel.com> |
4 | 4 | ||
5 | Update: November 2012 | ||
6 | -- sysfs-based SRIOV enable-/disable-ment | ||
7 | Donald Dutile <ddutile@redhat.com> | ||
5 | 8 | ||
6 | 1. Overview | 9 | 1. Overview |
7 | 10 | ||
@@ -24,10 +27,21 @@ real existing PCI device. | |||
24 | 27 | ||
25 | 2.1 How can I enable SR-IOV capability | 28 | 2.1 How can I enable SR-IOV capability |
26 | 29 | ||
27 | The device driver (PF driver) will control the enabling and disabling | 30 | Multiple methods are available for SR-IOV enablement. |
28 | of the capability via API provided by SR-IOV core. If the hardware | 31 | In the first method, the device driver (PF driver) will control the |
29 | has SR-IOV capability, loading its PF driver would enable it and all | 32 | enabling and disabling of the capability via API provided by SR-IOV core. |
30 | VFs associated with the PF. | 33 | If the hardware has SR-IOV capability, loading its PF driver would |
34 | enable it and all VFs associated with the PF. Some PF drivers require | ||
35 | a module parameter to be set to determine the number of VFs to enable. | ||
36 | In the second method, a write to the sysfs file sriov_numvfs will | ||
37 | enable and disable the VFs associated with a PCIe PF. This method | ||
38 | enables per-PF, VF enable/disable values versus the first method, | ||
39 | which applies to all PFs of the same device. Additionally, the | ||
40 | PCI SRIOV core support ensures that enable/disable operations are | ||
41 | valid to reduce duplication in multiple drivers for the same | ||
42 | checks, e.g., check numvfs == 0 if enabling VFs, ensure | ||
43 | numvfs <= totalvfs. | ||
44 | The second method is the recommended method for new/future VF devices. | ||
31 | 45 | ||
32 | 2.2 How can I use the Virtual Functions | 46 | 2.2 How can I use the Virtual Functions |
33 | 47 | ||
@@ -40,20 +54,29 @@ requires device driver that is same as a normal PCI device's. | |||
40 | 3.1 SR-IOV API | 54 | 3.1 SR-IOV API |
41 | 55 | ||
42 | To enable SR-IOV capability: | 56 | To enable SR-IOV capability: |
57 | (a) For the first method, in the driver: | ||
43 | int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | 58 | int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); |
44 | 'nr_virtfn' is number of VFs to be enabled. | 59 | 'nr_virtfn' is number of VFs to be enabled. |
60 | (b) For the second method, from sysfs: | ||
61 | echo 'nr_virtfn' > \ | ||
62 | /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs | ||
45 | 63 | ||
46 | To disable SR-IOV capability: | 64 | To disable SR-IOV capability: |
65 | (a) For the first method, in the driver: | ||
47 | void pci_disable_sriov(struct pci_dev *dev); | 66 | void pci_disable_sriov(struct pci_dev *dev); |
67 | (b) For the second method, from sysfs: | ||
68 | echo 0 > \ | ||
69 | /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_numvfs | ||
48 | 70 | ||
49 | To notify SR-IOV core of Virtual Function Migration: | 71 | To notify SR-IOV core of Virtual Function Migration: |
72 | (a) In the driver: | ||
50 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); | 73 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); |
51 | 74 | ||
52 | 3.2 Usage example | 75 | 3.2 Usage example |
53 | 76 | ||
54 | Following piece of code illustrates the usage of the SR-IOV API. | 77 | Following piece of code illustrates the usage of the SR-IOV API. |
55 | 78 | ||
56 | static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id *id) | 79 | static int dev_probe(struct pci_dev *dev, const struct pci_device_id *id) |
57 | { | 80 | { |
58 | pci_enable_sriov(dev, NR_VIRTFN); | 81 | pci_enable_sriov(dev, NR_VIRTFN); |
59 | 82 | ||
@@ -62,7 +85,7 @@ static int __devinit dev_probe(struct pci_dev *dev, const struct pci_device_id * | |||
62 | return 0; | 85 | return 0; |
63 | } | 86 | } |
64 | 87 | ||
65 | static void __devexit dev_remove(struct pci_dev *dev) | 88 | static void dev_remove(struct pci_dev *dev) |
66 | { | 89 | { |
67 | pci_disable_sriov(dev); | 90 | pci_disable_sriov(dev); |
68 | 91 | ||
@@ -88,12 +111,29 @@ static void dev_shutdown(struct pci_dev *dev) | |||
88 | ... | 111 | ... |
89 | } | 112 | } |
90 | 113 | ||
114 | static int dev_sriov_configure(struct pci_dev *dev, int numvfs) | ||
115 | { | ||
116 | if (numvfs > 0) { | ||
117 | ... | ||
118 | pci_enable_sriov(dev, numvfs); | ||
119 | ... | ||
120 | return numvfs; | ||
121 | } | ||
122 | if (numvfs == 0) { | ||
123 | .... | ||
124 | pci_disable_sriov(dev); | ||
125 | ... | ||
126 | return 0; | ||
127 | } | ||
128 | } | ||
129 | |||
91 | static struct pci_driver dev_driver = { | 130 | static struct pci_driver dev_driver = { |
92 | .name = "SR-IOV Physical Function driver", | 131 | .name = "SR-IOV Physical Function driver", |
93 | .id_table = dev_id_table, | 132 | .id_table = dev_id_table, |
94 | .probe = dev_probe, | 133 | .probe = dev_probe, |
95 | .remove = __devexit_p(dev_remove), | 134 | .remove = dev_remove, |
96 | .suspend = dev_suspend, | 135 | .suspend = dev_suspend, |
97 | .resume = dev_resume, | 136 | .resume = dev_resume, |
98 | .shutdown = dev_shutdown, | 137 | .shutdown = dev_shutdown, |
138 | .sriov_configure = dev_sriov_configure, | ||
99 | }; | 139 | }; |
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt index aa09e5476bba..bccf602a87f5 100644 --- a/Documentation/PCI/pci.txt +++ b/Documentation/PCI/pci.txt | |||
@@ -183,12 +183,6 @@ Please mark the initialization and cleanup functions where appropriate | |||
183 | initializes. | 183 | initializes. |
184 | __exit Exit code. Ignored for non-modular drivers. | 184 | __exit Exit code. Ignored for non-modular drivers. |
185 | 185 | ||
186 | |||
187 | __devinit Device initialization code. | ||
188 | Identical to __init if the kernel is not compiled | ||
189 | with CONFIG_HOTPLUG, normal function otherwise. | ||
190 | __devexit The same for __exit. | ||
191 | |||
192 | Tips on when/where to use the above attributes: | 186 | Tips on when/where to use the above attributes: |
193 | o The module_init()/module_exit() functions (and all | 187 | o The module_init()/module_exit() functions (and all |
194 | initialization functions called _only_ from these) | 188 | initialization functions called _only_ from these) |
@@ -196,20 +190,6 @@ Tips on when/where to use the above attributes: | |||
196 | 190 | ||
197 | o Do not mark the struct pci_driver. | 191 | o Do not mark the struct pci_driver. |
198 | 192 | ||
199 | o The ID table array should be marked __devinitconst; this is done | ||
200 | automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE(). | ||
201 | |||
202 | o The probe() and remove() functions should be marked __devinit | ||
203 | and __devexit respectively. All initialization functions | ||
204 | exclusively called by the probe() routine, can be marked __devinit. | ||
205 | Ditto for remove() and __devexit. | ||
206 | |||
207 | o If mydriver_remove() is marked with __devexit(), then all address | ||
208 | references to mydriver_remove must use __devexit_p(mydriver_remove) | ||
209 | (in the struct pci_driver declaration for example). | ||
210 | __devexit_p() will generate the function name _or_ NULL if the | ||
211 | function will be discarded. For an example, see drivers/net/tg3.c. | ||
212 | |||
213 | o Do NOT mark a function if you are not sure which mark to use. | 193 | o Do NOT mark a function if you are not sure which mark to use. |
214 | Better to not mark the function than mark the function wrong. | 194 | Better to not mark the function than mark the function wrong. |
215 | 195 | ||
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index 4f27785ca0c8..54469bc81b1c 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt | |||
@@ -185,7 +185,7 @@ input driver: | |||
185 | .acpi_match_table ACPI_PTR(mpu3050_acpi_match), | 185 | .acpi_match_table ACPI_PTR(mpu3050_acpi_match), |
186 | }, | 186 | }, |
187 | .probe = mpu3050_probe, | 187 | .probe = mpu3050_probe, |
188 | .remove = __devexit_p(mpu3050_remove), | 188 | .remove = mpu3050_remove, |
189 | .id_table = mpu3050_ids, | 189 | .id_table = mpu3050_ids, |
190 | }; | 190 | }; |
191 | 191 | ||
diff --git a/Documentation/acpi/initrd_table_override.txt b/Documentation/acpi/initrd_table_override.txt new file mode 100644 index 000000000000..35c3f5415476 --- /dev/null +++ b/Documentation/acpi/initrd_table_override.txt | |||
@@ -0,0 +1,94 @@ | |||
1 | Overriding ACPI tables via initrd | ||
2 | ================================= | ||
3 | |||
4 | 1) Introduction (What is this about) | ||
5 | 2) What is this for | ||
6 | 3) How does it work | ||
7 | 4) References (Where to retrieve userspace tools) | ||
8 | |||
9 | 1) What is this about | ||
10 | --------------------- | ||
11 | |||
12 | If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible to | ||
13 | override nearly any ACPI table provided by the BIOS with an instrumented, | ||
14 | modified one. | ||
15 | |||
16 | For a full list of ACPI tables that can be overridden, take a look at | ||
17 | the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in drivers/acpi/osl.c | ||
18 | All ACPI tables iasl (Intel's ACPI compiler and disassembler) knows should | ||
19 | be overridable, except: | ||
20 | - ACPI_SIG_RSDP (has a signature of 6 bytes) | ||
21 | - ACPI_SIG_FACS (does not have an ordinary ACPI table header) | ||
22 | Both could get implemented as well. | ||
23 | |||
24 | |||
25 | 2) What is this for | ||
26 | ------------------- | ||
27 | |||
28 | Please keep in mind that this is a debug option. | ||
29 | ACPI tables should not get overridden for productive use. | ||
30 | If BIOS ACPI tables are overridden the kernel will get tainted with the | ||
31 | TAINT_OVERRIDDEN_ACPI_TABLE flag. | ||
32 | Complain to your platform/BIOS vendor if you find a bug which is so sever | ||
33 | that a workaround is not accepted in the Linux kernel. | ||
34 | |||
35 | Still, it can and should be enabled in any kernel, because: | ||
36 | - There is no functional change with not instrumented initrds | ||
37 | - It provides a powerful feature to easily debug and test ACPI BIOS table | ||
38 | compatibility with the Linux kernel. | ||
39 | |||
40 | |||
41 | 3) How does it work | ||
42 | ------------------- | ||
43 | |||
44 | # Extract the machine's ACPI tables: | ||
45 | cd /tmp | ||
46 | acpidump >acpidump | ||
47 | acpixtract -a acpidump | ||
48 | # Disassemble, modify and recompile them: | ||
49 | iasl -d *.dat | ||
50 | # For example add this statement into a _PRT (PCI Routing Table) function | ||
51 | # of the DSDT: | ||
52 | Store("HELLO WORLD", debug) | ||
53 | iasl -sa dsdt.dsl | ||
54 | # Add the raw ACPI tables to an uncompressed cpio archive. | ||
55 | # They must be put into a /kernel/firmware/acpi directory inside the | ||
56 | # cpio archive. | ||
57 | # The uncompressed cpio archive must be the first. | ||
58 | # Other, typically compressed cpio archives, must be | ||
59 | # concatenated on top of the uncompressed one. | ||
60 | mkdir -p kernel/firmware/acpi | ||
61 | cp dsdt.aml kernel/firmware/acpi | ||
62 | # A maximum of: #define ACPI_OVERRIDE_TABLES 10 | ||
63 | # tables are currently allowed (see osl.c): | ||
64 | iasl -sa facp.dsl | ||
65 | iasl -sa ssdt1.dsl | ||
66 | cp facp.aml kernel/firmware/acpi | ||
67 | cp ssdt1.aml kernel/firmware/acpi | ||
68 | # Create the uncompressed cpio archive and concatenate the original initrd | ||
69 | # on top: | ||
70 | find kernel | cpio -H newc --create > /boot/instrumented_initrd | ||
71 | cat /boot/initrd >>/boot/instrumented_initrd | ||
72 | # reboot with increased acpi debug level, e.g. boot params: | ||
73 | acpi.debug_level=0x2 acpi.debug_layer=0xFFFFFFFF | ||
74 | # and check your syslog: | ||
75 | [ 1.268089] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] | ||
76 | [ 1.272091] [ACPI Debug] String [0x0B] "HELLO WORLD" | ||
77 | |||
78 | iasl is able to disassemble and recompile quite a lot different, | ||
79 | also static ACPI tables. | ||
80 | |||
81 | |||
82 | 4) Where to retrieve userspace tools | ||
83 | ------------------------------------ | ||
84 | |||
85 | iasl and acpixtract are part of Intel's ACPICA project: | ||
86 | http://acpica.org/ | ||
87 | and should be packaged by distributions (for example in the acpica package | ||
88 | on SUSE). | ||
89 | |||
90 | acpidump can be found in Len Browns pmtools: | ||
91 | ftp://kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools/acpidump | ||
92 | This tool is also part of the acpica package on SUSE. | ||
93 | Alternatively, used ACPI tables can be retrieved via sysfs in latest kernels: | ||
94 | /sys/firmware/acpi/tables | ||
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt index bfc9cb19abcd..c71487d399d1 100644 --- a/Documentation/aoe/aoe.txt +++ b/Documentation/aoe/aoe.txt | |||
@@ -125,7 +125,9 @@ DRIVER OPTIONS | |||
125 | The aoe_deadsecs module parameter determines the maximum number of | 125 | The aoe_deadsecs module parameter determines the maximum number of |
126 | seconds that the driver will wait for an AoE device to provide a | 126 | seconds that the driver will wait for an AoE device to provide a |
127 | response to an AoE command. After aoe_deadsecs seconds have | 127 | response to an AoE command. After aoe_deadsecs seconds have |
128 | elapsed, the AoE device will be marked as "down". | 128 | elapsed, the AoE device will be marked as "down". A value of zero |
129 | is supported for testing purposes and makes the aoe driver keep | ||
130 | trying AoE commands forever. | ||
129 | 131 | ||
130 | The aoe_maxout module parameter has a default of 128. This is the | 132 | The aoe_maxout module parameter has a default of 128. This is the |
131 | maximum number of unresponded packets that will be sent to an AoE | 133 | maximum number of unresponded packets that will be sent to an AoE |
diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/OMAP/DSS index a564ceea9e98..4484e021290e 100644 --- a/Documentation/arm/OMAP/DSS +++ b/Documentation/arm/OMAP/DSS | |||
@@ -285,7 +285,10 @@ FB0 +-- GFX ---- LCD ---- LCD | |||
285 | Misc notes | 285 | Misc notes |
286 | ---------- | 286 | ---------- |
287 | 287 | ||
288 | OMAP FB allocates the framebuffer memory using the OMAP VRAM allocator. | 288 | OMAP FB allocates the framebuffer memory using the standard dma allocator. You |
289 | can enable Contiguous Memory Allocator (CONFIG_CMA) to improve the dma | ||
290 | allocator, and if CMA is enabled, you use "cma=" kernel parameter to increase | ||
291 | the global memory area for CMA. | ||
289 | 292 | ||
290 | Using DSI DPLL to generate pixel clock it is possible produce the pixel clock | 293 | Using DSI DPLL to generate pixel clock it is possible produce the pixel clock |
291 | of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI. | 294 | of 86.5MHz (max possible), and with that you get 1280x1024@57 output from DVI. |
@@ -301,11 +304,6 @@ framebuffer parameters. | |||
301 | Kernel boot arguments | 304 | Kernel boot arguments |
302 | --------------------- | 305 | --------------------- |
303 | 306 | ||
304 | vram=<size>[,<physaddr>] | ||
305 | - Amount of total VRAM to preallocate and optionally a physical start | ||
306 | memory address. For example, "10M". omapfb allocates memory for | ||
307 | framebuffers from VRAM. | ||
308 | |||
309 | omapfb.mode=<display>:<mode>[,...] | 307 | omapfb.mode=<display>:<mode>[,...] |
310 | - Default video mode for specified displays. For example, | 308 | - Default video mode for specified displays. For example, |
311 | "dvi:800x400MR-24@60". See drivers/video/modedb.c. | 309 | "dvi:800x400MR-24@60". See drivers/video/modedb.c. |
diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt index f5e4caafab7d..1529394cfe8b 100644 --- a/Documentation/backlight/lp855x-driver.txt +++ b/Documentation/backlight/lp855x-driver.txt | |||
@@ -35,11 +35,8 @@ For supporting platform specific data, the lp855x platform data can be used. | |||
35 | * mode : Brightness control mode. PWM or register based. | 35 | * mode : Brightness control mode. PWM or register based. |
36 | * device_control : Value of DEVICE CONTROL register. | 36 | * device_control : Value of DEVICE CONTROL register. |
37 | * initial_brightness : Initial value of backlight brightness. | 37 | * initial_brightness : Initial value of backlight brightness. |
38 | * pwm_data : Platform specific pwm generation functions. | 38 | * period_ns : Platform specific PWM period value. unit is nano. |
39 | Only valid when brightness is pwm input mode. | 39 | Only valid when brightness is pwm input mode. |
40 | Functions should be implemented by PWM driver. | ||
41 | - pwm_set_intensity() : set duty of PWM | ||
42 | - pwm_get_intensity() : get current duty of PWM | ||
43 | * load_new_rom_data : | 40 | * load_new_rom_data : |
44 | 0 : use default configuration data | 41 | 0 : use default configuration data |
45 | 1 : update values of eeprom or eprom registers on loading driver | 42 | 1 : update values of eeprom or eprom registers on loading driver |
@@ -71,8 +68,5 @@ static struct lp855x_platform_data lp8556_pdata = { | |||
71 | .mode = PWM_BASED, | 68 | .mode = PWM_BASED, |
72 | .device_control = PWM_CONFIG(LP8556), | 69 | .device_control = PWM_CONFIG(LP8556), |
73 | .initial_brightness = INITIAL_BRT, | 70 | .initial_brightness = INITIAL_BRT, |
74 | .pwm_data = { | 71 | .period_ns = 1000000, |
75 | .pwm_set_intensity = platform_pwm_set_intensity, | ||
76 | .pwm_get_intensity = platform_pwm_get_intensity, | ||
77 | }, | ||
78 | }; | 72 | }; |
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index cefd3d8bbd11..12e01d432bfe 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
@@ -218,7 +218,7 @@ and name space for cpusets, with a minimum of additional kernel code. | |||
218 | The cpus and mems files in the root (top_cpuset) cpuset are | 218 | The cpus and mems files in the root (top_cpuset) cpuset are |
219 | read-only. The cpus file automatically tracks the value of | 219 | read-only. The cpus file automatically tracks the value of |
220 | cpu_online_mask using a CPU hotplug notifier, and the mems file | 220 | cpu_online_mask using a CPU hotplug notifier, and the mems file |
221 | automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e., | 221 | automatically tracks the value of node_states[N_MEMORY]--i.e., |
222 | nodes with memory--using the cpuset_track_online_nodes() hook. | 222 | nodes with memory--using the cpuset_track_online_nodes() hook. |
223 | 223 | ||
224 | 224 | ||
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index a25cb3fafeba..8b8c28b9864c 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -71,6 +71,11 @@ Brief summary of control files. | |||
71 | memory.oom_control # set/show oom controls. | 71 | memory.oom_control # set/show oom controls. |
72 | memory.numa_stat # show the number of memory usage per numa node | 72 | memory.numa_stat # show the number of memory usage per numa node |
73 | 73 | ||
74 | memory.kmem.limit_in_bytes # set/show hard limit for kernel memory | ||
75 | memory.kmem.usage_in_bytes # show current kernel memory allocation | ||
76 | memory.kmem.failcnt # show the number of kernel memory usage hits limits | ||
77 | memory.kmem.max_usage_in_bytes # show max kernel memory usage recorded | ||
78 | |||
74 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory | 79 | memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory |
75 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation | 80 | memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation |
76 | memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits | 81 | memory.kmem.tcp.failcnt # show the number of tcp buf memory usage hits limits |
@@ -268,20 +273,73 @@ the amount of kernel memory used by the system. Kernel memory is fundamentally | |||
268 | different than user memory, since it can't be swapped out, which makes it | 273 | different than user memory, since it can't be swapped out, which makes it |
269 | possible to DoS the system by consuming too much of this precious resource. | 274 | possible to DoS the system by consuming too much of this precious resource. |
270 | 275 | ||
276 | Kernel memory won't be accounted at all until limit on a group is set. This | ||
277 | allows for existing setups to continue working without disruption. The limit | ||
278 | cannot be set if the cgroup have children, or if there are already tasks in the | ||
279 | cgroup. Attempting to set the limit under those conditions will return -EBUSY. | ||
280 | When use_hierarchy == 1 and a group is accounted, its children will | ||
281 | automatically be accounted regardless of their limit value. | ||
282 | |||
283 | After a group is first limited, it will be kept being accounted until it | ||
284 | is removed. The memory limitation itself, can of course be removed by writing | ||
285 | -1 to memory.kmem.limit_in_bytes. In this case, kmem will be accounted, but not | ||
286 | limited. | ||
287 | |||
271 | Kernel memory limits are not imposed for the root cgroup. Usage for the root | 288 | Kernel memory limits are not imposed for the root cgroup. Usage for the root |
272 | cgroup may or may not be accounted. | 289 | cgroup may or may not be accounted. The memory used is accumulated into |
290 | memory.kmem.usage_in_bytes, or in a separate counter when it makes sense. | ||
291 | (currently only for tcp). | ||
292 | The main "kmem" counter is fed into the main counter, so kmem charges will | ||
293 | also be visible from the user counter. | ||
273 | 294 | ||
274 | Currently no soft limit is implemented for kernel memory. It is future work | 295 | Currently no soft limit is implemented for kernel memory. It is future work |
275 | to trigger slab reclaim when those limits are reached. | 296 | to trigger slab reclaim when those limits are reached. |
276 | 297 | ||
277 | 2.7.1 Current Kernel Memory resources accounted | 298 | 2.7.1 Current Kernel Memory resources accounted |
278 | 299 | ||
300 | * stack pages: every process consumes some stack pages. By accounting into | ||
301 | kernel memory, we prevent new processes from being created when the kernel | ||
302 | memory usage is too high. | ||
303 | |||
304 | * slab pages: pages allocated by the SLAB or SLUB allocator are tracked. A copy | ||
305 | of each kmem_cache is created everytime the cache is touched by the first time | ||
306 | from inside the memcg. The creation is done lazily, so some objects can still be | ||
307 | skipped while the cache is being created. All objects in a slab page should | ||
308 | belong to the same memcg. This only fails to hold when a task is migrated to a | ||
309 | different memcg during the page allocation by the cache. | ||
310 | |||
279 | * sockets memory pressure: some sockets protocols have memory pressure | 311 | * sockets memory pressure: some sockets protocols have memory pressure |
280 | thresholds. The Memory Controller allows them to be controlled individually | 312 | thresholds. The Memory Controller allows them to be controlled individually |
281 | per cgroup, instead of globally. | 313 | per cgroup, instead of globally. |
282 | 314 | ||
283 | * tcp memory pressure: sockets memory pressure for the tcp protocol. | 315 | * tcp memory pressure: sockets memory pressure for the tcp protocol. |
284 | 316 | ||
317 | 2.7.3 Common use cases | ||
318 | |||
319 | Because the "kmem" counter is fed to the main user counter, kernel memory can | ||
320 | never be limited completely independently of user memory. Say "U" is the user | ||
321 | limit, and "K" the kernel limit. There are three possible ways limits can be | ||
322 | set: | ||
323 | |||
324 | U != 0, K = unlimited: | ||
325 | This is the standard memcg limitation mechanism already present before kmem | ||
326 | accounting. Kernel memory is completely ignored. | ||
327 | |||
328 | U != 0, K < U: | ||
329 | Kernel memory is a subset of the user memory. This setup is useful in | ||
330 | deployments where the total amount of memory per-cgroup is overcommited. | ||
331 | Overcommiting kernel memory limits is definitely not recommended, since the | ||
332 | box can still run out of non-reclaimable memory. | ||
333 | In this case, the admin could set up K so that the sum of all groups is | ||
334 | never greater than the total memory, and freely set U at the cost of his | ||
335 | QoS. | ||
336 | |||
337 | U != 0, K >= U: | ||
338 | Since kmem charges will also be fed to the user counter and reclaim will be | ||
339 | triggered for the cgroup for both kinds of memory. This setup gives the | ||
340 | admin a unified view of memory, and it is also useful for people who just | ||
341 | want to track kernel memory usage. | ||
342 | |||
285 | 3. User Interface | 343 | 3. User Interface |
286 | 344 | ||
287 | 0. Configuration | 345 | 0. Configuration |
@@ -290,6 +348,7 @@ a. Enable CONFIG_CGROUPS | |||
290 | b. Enable CONFIG_RESOURCE_COUNTERS | 348 | b. Enable CONFIG_RESOURCE_COUNTERS |
291 | c. Enable CONFIG_MEMCG | 349 | c. Enable CONFIG_MEMCG |
292 | d. Enable CONFIG_MEMCG_SWAP (to use swap extension) | 350 | d. Enable CONFIG_MEMCG_SWAP (to use swap extension) |
351 | d. Enable CONFIG_MEMCG_KMEM (to use kmem extension) | ||
293 | 352 | ||
294 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) | 353 | 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) |
295 | # mount -t tmpfs none /sys/fs/cgroup | 354 | # mount -t tmpfs none /sys/fs/cgroup |
@@ -406,6 +465,11 @@ About use_hierarchy, see Section 6. | |||
406 | Because rmdir() moves all pages to parent, some out-of-use page caches can be | 465 | Because rmdir() moves all pages to parent, some out-of-use page caches can be |
407 | moved to the parent. If you want to avoid that, force_empty will be useful. | 466 | moved to the parent. If you want to avoid that, force_empty will be useful. |
408 | 467 | ||
468 | Also, note that when memory.kmem.limit_in_bytes is set the charges due to | ||
469 | kernel pages will still be seen. This is not considered a failure and the | ||
470 | write will still return success. In this case, it is expected that | ||
471 | memory.kmem.usage_in_bytes == memory.usage_in_bytes. | ||
472 | |||
409 | About use_hierarchy, see Section 6. | 473 | About use_hierarchy, see Section 6. |
410 | 474 | ||
411 | 5.2 stat file | 475 | 5.2 stat file |
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt index 0c4a344e78fa..c4d99ed0b418 100644 --- a/Documentation/cgroups/resource_counter.txt +++ b/Documentation/cgroups/resource_counter.txt | |||
@@ -83,16 +83,17 @@ to work with it. | |||
83 | res_counter->lock internally (it must be called with res_counter->lock | 83 | res_counter->lock internally (it must be called with res_counter->lock |
84 | held). The force parameter indicates whether we can bypass the limit. | 84 | held). The force parameter indicates whether we can bypass the limit. |
85 | 85 | ||
86 | e. void res_counter_uncharge[_locked] | 86 | e. u64 res_counter_uncharge[_locked] |
87 | (struct res_counter *rc, unsigned long val) | 87 | (struct res_counter *rc, unsigned long val) |
88 | 88 | ||
89 | When a resource is released (freed) it should be de-accounted | 89 | When a resource is released (freed) it should be de-accounted |
90 | from the resource counter it was accounted to. This is called | 90 | from the resource counter it was accounted to. This is called |
91 | "uncharging". | 91 | "uncharging". The return value of this function indicate the amount |
92 | of charges still present in the counter. | ||
92 | 93 | ||
93 | The _locked routines imply that the res_counter->lock is taken. | 94 | The _locked routines imply that the res_counter->lock is taken. |
94 | 95 | ||
95 | f. void res_counter_uncharge_until | 96 | f. u64 res_counter_uncharge_until |
96 | (struct res_counter *rc, struct res_counter *top, | 97 | (struct res_counter *rc, struct res_counter *top, |
97 | unsinged long val) | 98 | unsinged long val) |
98 | 99 | ||
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt index 728c38c242d6..56fb62b09fc5 100644 --- a/Documentation/device-mapper/dm-raid.txt +++ b/Documentation/device-mapper/dm-raid.txt | |||
@@ -141,3 +141,4 @@ Version History | |||
141 | 1.2.0 Handle creation of arrays that contain failed devices. | 141 | 1.2.0 Handle creation of arrays that contain failed devices. |
142 | 1.3.0 Added support for RAID 10 | 142 | 1.3.0 Added support for RAID 10 |
143 | 1.3.1 Allow device replacement/rebuild for RAID 10 | 143 | 1.3.1 Allow device replacement/rebuild for RAID 10 |
144 | 1.3.2 Fix/improve redundancy checking for RAID10 | ||
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt new file mode 100644 index 000000000000..ecdb57d69dbf --- /dev/null +++ b/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Altera SOCFPGA Reset Manager | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "altr,rst-mgr" | ||
5 | - reg : Should contain 1 register ranges(address and length) | ||
6 | |||
7 | Example: | ||
8 | rstmgr@ffd05000 { | ||
9 | compatible = "altr,rst-mgr"; | ||
10 | reg = <0xffd05000 0x1000>; | ||
11 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt new file mode 100644 index 000000000000..07c65e3cdcbe --- /dev/null +++ b/Documentation/devicetree/bindings/arm/altera/socfpga-system.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Altera SOCFPGA System Manager | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "altr,sys-mgr" | ||
5 | - reg : Should contain 1 register ranges(address and length) | ||
6 | |||
7 | Example: | ||
8 | sysmgr@ffd08000 { | ||
9 | compatible = "altr,sys-mgr"; | ||
10 | reg = <0xffd08000 0x1000>; | ||
11 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt index 70c0dc5f00ed..61df564c0d23 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt | |||
@@ -6,9 +6,15 @@ Required properties: | |||
6 | - interrupt-controller: Identifies the node as an interrupt controller. | 6 | - interrupt-controller: Identifies the node as an interrupt controller. |
7 | - #interrupt-cells: The number of cells to define the interrupts. Should be 1. | 7 | - #interrupt-cells: The number of cells to define the interrupts. Should be 1. |
8 | The cell is the IRQ number | 8 | The cell is the IRQ number |
9 | |||
9 | - reg: Should contain PMIC registers location and length. First pair | 10 | - reg: Should contain PMIC registers location and length. First pair |
10 | for the main interrupt registers, second pair for the per-CPU | 11 | for the main interrupt registers, second pair for the per-CPU |
11 | interrupt registers | 12 | interrupt registers. For this last pair, to be compliant with SMP |
13 | support, the "virtual" must be use (For the record, these registers | ||
14 | automatically map to the interrupt controller registers of the | ||
15 | current CPU) | ||
16 | |||
17 | |||
12 | 18 | ||
13 | Example: | 19 | Example: |
14 | 20 | ||
@@ -18,6 +24,6 @@ Example: | |||
18 | #address-cells = <1>; | 24 | #address-cells = <1>; |
19 | #size-cells = <1>; | 25 | #size-cells = <1>; |
20 | interrupt-controller; | 26 | interrupt-controller; |
21 | reg = <0xd0020000 0x1000>, | 27 | reg = <0xd0020a00 0x1d0>, |
22 | <0xd0021000 0x1000>; | 28 | <0xd0021070 0x58>; |
23 | }; | 29 | }; |
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt new file mode 100644 index 000000000000..926b4d6aae7e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Power Management Service Unit(PMSU) | ||
2 | ----------------------------------- | ||
3 | Available on Marvell SOCs: Armada 370 and Armada XP | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible: "marvell,armada-370-xp-pmsu" | ||
8 | |||
9 | - reg: Should contain PMSU registers location and length. First pair | ||
10 | for the per-CPU SW Reset Control registers, second pair for the | ||
11 | Power Management Service Unit. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | armada-370-xp-pmsu@d0022000 { | ||
16 | compatible = "marvell,armada-370-xp-pmsu"; | ||
17 | reg = <0xd0022100 0x430>, | ||
18 | <0xd0020800 0x20>; | ||
19 | }; | ||
20 | |||
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt index 8b6ea2267c94..64830118b013 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-timer.txt | |||
@@ -5,6 +5,7 @@ Required properties: | |||
5 | - compatible: Should be "marvell,armada-370-xp-timer" | 5 | - compatible: Should be "marvell,armada-370-xp-timer" |
6 | - interrupts: Should contain the list of Global Timer interrupts | 6 | - interrupts: Should contain the list of Global Timer interrupts |
7 | - reg: Should contain the base address of the Global Timer registers | 7 | - reg: Should contain the base address of the Global Timer registers |
8 | - clocks: clock driving the timer hardware | ||
8 | 9 | ||
9 | Optional properties: | 10 | Optional properties: |
10 | - marvell,timer-25Mhz: Tells whether the Global timer supports the 25 | 11 | - marvell,timer-25Mhz: Tells whether the Global timer supports the 25 |
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt new file mode 100644 index 000000000000..17d8cd107559 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Coherency fabric | ||
2 | ---------------- | ||
3 | Available on Marvell SOCs: Armada 370 and Armada XP | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible: "marvell,coherency-fabric" | ||
8 | |||
9 | - reg: Should contain coherency fabric registers location and | ||
10 | length. First pair for the coherency fabric registers, second pair | ||
11 | for the per-CPU fabric registers registers. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | coherency-fabric@d0020200 { | ||
16 | compatible = "marvell,coherency-fabric"; | ||
17 | reg = <0xd0020200 0xb0>, | ||
18 | <0xd0021810 0x1c>; | ||
19 | |||
20 | }; | ||
21 | |||
diff --git a/Documentation/devicetree/bindings/arm/davinci/nand.txt b/Documentation/devicetree/bindings/arm/davinci/nand.txt index 49fc7ada929a..3545ea704b50 100644 --- a/Documentation/devicetree/bindings/arm/davinci/nand.txt +++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt | |||
@@ -23,6 +23,9 @@ Recommended properties : | |||
23 | - ti,davinci-nand-buswidth: buswidth 8 or 16 | 23 | - ti,davinci-nand-buswidth: buswidth 8 or 16 |
24 | - ti,davinci-nand-use-bbt: use flash based bad block table support. | 24 | - ti,davinci-nand-use-bbt: use flash based bad block table support. |
25 | 25 | ||
26 | nand device bindings may contain additional sub-nodes describing | ||
27 | partitions of the address space. See partition.txt for more detail. | ||
28 | |||
26 | Example(da850 EVM ): | 29 | Example(da850 EVM ): |
27 | nand_cs3@62000000 { | 30 | nand_cs3@62000000 { |
28 | compatible = "ti,davinci-nand"; | 31 | compatible = "ti,davinci-nand"; |
@@ -35,4 +38,9 @@ nand_cs3@62000000 { | |||
35 | ti,davinci-ecc-mode = "hw"; | 38 | ti,davinci-ecc-mode = "hw"; |
36 | ti,davinci-ecc-bits = <4>; | 39 | ti,davinci-ecc-bits = <4>; |
37 | ti,davinci-nand-use-bbt; | 40 | ti,davinci-nand-use-bbt; |
41 | |||
42 | partition@180000 { | ||
43 | label = "ubifs"; | ||
44 | reg = <0x180000 0x7e80000>; | ||
45 | }; | ||
38 | }; | 46 | }; |
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt index 7c3ee3aeb7b7..cbef09b5c8a7 100644 --- a/Documentation/devicetree/bindings/arm/l2cc.txt +++ b/Documentation/devicetree/bindings/arm/l2cc.txt | |||
@@ -10,6 +10,12 @@ Required properties: | |||
10 | "arm,pl310-cache" | 10 | "arm,pl310-cache" |
11 | "arm,l220-cache" | 11 | "arm,l220-cache" |
12 | "arm,l210-cache" | 12 | "arm,l210-cache" |
13 | "marvell,aurora-system-cache": Marvell Controller designed to be | ||
14 | compatible with the ARM one, with system cache mode (meaning | ||
15 | maintenance operations on L1 are broadcasted to the L2 and L2 | ||
16 | performs the same operation). | ||
17 | "marvell,"aurora-outer-cache: Marvell Controller designed to be | ||
18 | compatible with the ARM one with outer cache mode. | ||
13 | - cache-unified : Specifies the cache is a unified cache. | 19 | - cache-unified : Specifies the cache is a unified cache. |
14 | - cache-level : Should be set to 2 for a level 2 cache. | 20 | - cache-level : Should be set to 2 for a level 2 cache. |
15 | - reg : Physical base address and size of cache controller's memory mapped | 21 | - reg : Physical base address and size of cache controller's memory mapped |
@@ -29,6 +35,9 @@ Optional properties: | |||
29 | filter. Addresses in the filter window are directed to the M1 port. Other | 35 | filter. Addresses in the filter window are directed to the M1 port. Other |
30 | addresses will go to the M0 port. | 36 | addresses will go to the M0 port. |
31 | - interrupts : 1 combined interrupt. | 37 | - interrupts : 1 combined interrupt. |
38 | - cache-id-part: cache id part number to be used if it is not present | ||
39 | on hardware | ||
40 | - wt-override: If present then L2 is forced to Write through mode | ||
32 | 41 | ||
33 | Example: | 42 | Example: |
34 | 43 | ||
diff --git a/Documentation/devicetree/bindings/arm/spear/shirq.txt b/Documentation/devicetree/bindings/arm/spear/shirq.txt new file mode 100644 index 000000000000..13fbb8866bd6 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/spear/shirq.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | * SPEAr Shared IRQ layer (shirq) | ||
2 | |||
3 | SPEAr3xx architecture includes shared/multiplexed irqs for certain set | ||
4 | of devices. The multiplexor provides a single interrupt to parent | ||
5 | interrupt controller (VIC) on behalf of a group of devices. | ||
6 | |||
7 | There can be multiple groups available on SPEAr3xx variants but not | ||
8 | exceeding 4. The number of devices in a group can differ, further they | ||
9 | may share same set of status/mask registers spanning across different | ||
10 | bit masks. Also in some cases the group may not have enable or other | ||
11 | registers. This makes software little complex. | ||
12 | |||
13 | A single node in the device tree is used to describe the shared | ||
14 | interrupt multiplexor (one node for all groups). A group in the | ||
15 | interrupt controller shares config/control registers with other groups. | ||
16 | For example, a 32-bit interrupt enable/disable config register can | ||
17 | accommodate upto 4 interrupt groups. | ||
18 | |||
19 | Required properties: | ||
20 | - compatible: should be, either of | ||
21 | - "st,spear300-shirq" | ||
22 | - "st,spear310-shirq" | ||
23 | - "st,spear320-shirq" | ||
24 | - interrupt-controller: Identifies the node as an interrupt controller. | ||
25 | - #interrupt-cells: should be <1> which basically contains the offset | ||
26 | (starting from 0) of interrupts for all the groups. | ||
27 | - reg: Base address and size of shirq registers. | ||
28 | - interrupts: The list of interrupts generated by the groups which are | ||
29 | then connected to a parent interrupt controller. Each group is | ||
30 | associated with one of the interrupts, hence number of interrupts (to | ||
31 | parent) is equal to number of groups. The format of the interrupt | ||
32 | specifier depends in the interrupt parent controller. | ||
33 | |||
34 | Optional properties: | ||
35 | - interrupt-parent: pHandle of the parent interrupt controller, if not | ||
36 | inherited from the parent node. | ||
37 | |||
38 | Example: | ||
39 | |||
40 | The following is an example from the SPEAr320 SoC dtsi file. | ||
41 | |||
42 | shirq: interrupt-controller@0xb3000000 { | ||
43 | compatible = "st,spear320-shirq"; | ||
44 | reg = <0xb3000000 0x1000>; | ||
45 | interrupts = <28 29 30 1>; | ||
46 | #interrupt-cells = <1>; | ||
47 | interrupt-controller; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx23-clock.txt b/Documentation/devicetree/bindings/clock/imx23-clock.txt index baadbb11fe98..5083c0b834b2 100644 --- a/Documentation/devicetree/bindings/clock/imx23-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx23-clock.txt | |||
@@ -60,11 +60,6 @@ clks: clkctrl@80040000 { | |||
60 | compatible = "fsl,imx23-clkctrl"; | 60 | compatible = "fsl,imx23-clkctrl"; |
61 | reg = <0x80040000 0x2000>; | 61 | reg = <0x80040000 0x2000>; |
62 | #clock-cells = <1>; | 62 | #clock-cells = <1>; |
63 | clock-output-names = | ||
64 | ... | ||
65 | "uart", /* 32 */ | ||
66 | ... | ||
67 | "end_of_list"; | ||
68 | }; | 63 | }; |
69 | 64 | ||
70 | auart0: serial@8006c000 { | 65 | auart0: serial@8006c000 { |
diff --git a/Documentation/devicetree/bindings/clock/imx25-clock.txt b/Documentation/devicetree/bindings/clock/imx25-clock.txt index c2a3525ecb4e..db4f2f05c4d0 100644 --- a/Documentation/devicetree/bindings/clock/imx25-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx25-clock.txt | |||
@@ -146,10 +146,6 @@ clks: ccm@53f80000 { | |||
146 | compatible = "fsl,imx25-ccm"; | 146 | compatible = "fsl,imx25-ccm"; |
147 | reg = <0x53f80000 0x4000>; | 147 | reg = <0x53f80000 0x4000>; |
148 | interrupts = <31>; | 148 | interrupts = <31>; |
149 | clock-output-names = ... | ||
150 | "uart_ipg", | ||
151 | "uart_serial", | ||
152 | ...; | ||
153 | }; | 149 | }; |
154 | 150 | ||
155 | uart1: serial@43f90000 { | 151 | uart1: serial@43f90000 { |
diff --git a/Documentation/devicetree/bindings/clock/imx28-clock.txt b/Documentation/devicetree/bindings/clock/imx28-clock.txt index 52a49a4a50b3..e6587af62ff0 100644 --- a/Documentation/devicetree/bindings/clock/imx28-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx28-clock.txt | |||
@@ -83,11 +83,6 @@ clks: clkctrl@80040000 { | |||
83 | compatible = "fsl,imx28-clkctrl"; | 83 | compatible = "fsl,imx28-clkctrl"; |
84 | reg = <0x80040000 0x2000>; | 84 | reg = <0x80040000 0x2000>; |
85 | #clock-cells = <1>; | 85 | #clock-cells = <1>; |
86 | clock-output-names = | ||
87 | ... | ||
88 | "uart", /* 45 */ | ||
89 | ... | ||
90 | "end_of_list"; | ||
91 | }; | 86 | }; |
92 | 87 | ||
93 | auart0: serial@8006a000 { | 88 | auart0: serial@8006a000 { |
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index d77b4e68dc42..f73fdf595568 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
@@ -211,10 +211,6 @@ clks: ccm@020c4000 { | |||
211 | reg = <0x020c4000 0x4000>; | 211 | reg = <0x020c4000 0x4000>; |
212 | interrupts = <0 87 0x04 0 88 0x04>; | 212 | interrupts = <0 87 0x04 0 88 0x04>; |
213 | #clock-cells = <1>; | 213 | #clock-cells = <1>; |
214 | clock-output-names = ... | ||
215 | "uart_ipg", | ||
216 | "uart_serial", | ||
217 | ...; | ||
218 | }; | 214 | }; |
219 | 215 | ||
220 | uart1: serial@02020000 { | 216 | uart1: serial@02020000 { |
diff --git a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt new file mode 100644 index 000000000000..1e662948661e --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | * Core Clock bindings for Marvell MVEBU SoCs | ||
2 | |||
3 | Marvell MVEBU SoCs usually allow to determine core clock frequencies by | ||
4 | reading the Sample-At-Reset (SAR) register. The core clock consumer should | ||
5 | specify the desired clock by having the clock ID in its "clocks" phandle cell. | ||
6 | |||
7 | The following is a list of provided IDs and clock names on Armada 370/XP: | ||
8 | 0 = tclk (Internal Bus clock) | ||
9 | 1 = cpuclk (CPU clock) | ||
10 | 2 = nbclk (L2 Cache clock) | ||
11 | 3 = hclk (DRAM control clock) | ||
12 | 4 = dramclk (DDR clock) | ||
13 | |||
14 | The following is a list of provided IDs and clock names on Kirkwood and Dove: | ||
15 | 0 = tclk (Internal Bus clock) | ||
16 | 1 = cpuclk (CPU0 clock) | ||
17 | 2 = l2clk (L2 Cache clock derived from CPU0 clock) | ||
18 | 3 = ddrclk (DDR controller clock derived from CPU0 clock) | ||
19 | |||
20 | Required properties: | ||
21 | - compatible : shall be one of the following: | ||
22 | "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks | ||
23 | "marvell,armada-xp-core-clock" - For Armada XP SoC core clocks | ||
24 | "marvell,dove-core-clock" - for Dove SoC core clocks | ||
25 | "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) | ||
26 | "marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC | ||
27 | - reg : shall be the register address of the Sample-At-Reset (SAR) register | ||
28 | - #clock-cells : from common clock binding; shall be set to 1 | ||
29 | |||
30 | Optional properties: | ||
31 | - clock-output-names : from common clock binding; allows overwrite default clock | ||
32 | output names ("tclk", "cpuclk", "l2clk", "ddrclk") | ||
33 | |||
34 | Example: | ||
35 | |||
36 | core_clk: core-clocks@d0214 { | ||
37 | compatible = "marvell,dove-core-clock"; | ||
38 | reg = <0xd0214 0x4>; | ||
39 | #clock-cells = <1>; | ||
40 | }; | ||
41 | |||
42 | spi0: spi@10600 { | ||
43 | compatible = "marvell,orion-spi"; | ||
44 | /* ... */ | ||
45 | /* get tclk from core clock provider */ | ||
46 | clocks = <&core_clk 0>; | ||
47 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt new file mode 100644 index 000000000000..feb830130714 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mvebu-cpu-clock.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Device Tree Clock bindings for cpu clock of Marvell EBU platforms | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : shall be one of the following: | ||
5 | "marvell,armada-xp-cpu-clock" - cpu clocks for Armada XP | ||
6 | - reg : Address and length of the clock complex register set | ||
7 | - #clock-cells : should be set to 1. | ||
8 | - clocks : shall be the input parent clock phandle for the clock. | ||
9 | |||
10 | cpuclk: clock-complex@d0018700 { | ||
11 | #clock-cells = <1>; | ||
12 | compatible = "marvell,armada-xp-cpu-clock"; | ||
13 | reg = <0xd0018700 0xA0>; | ||
14 | clocks = <&coreclk 1>; | ||
15 | } | ||
16 | |||
17 | cpu@0 { | ||
18 | compatible = "marvell,sheeva-v7"; | ||
19 | reg = <0>; | ||
20 | clocks = <&cpuclk 0>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt new file mode 100644 index 000000000000..7337005ef5e1 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt | |||
@@ -0,0 +1,119 @@ | |||
1 | * Gated Clock bindings for Marvell Orion SoCs | ||
2 | |||
3 | Marvell Dove and Kirkwood allow some peripheral clocks to be gated to save | ||
4 | some power. The clock consumer should specify the desired clock by having | ||
5 | the clock ID in its "clocks" phandle cell. The clock ID is directly mapped to | ||
6 | the corresponding clock gating control bit in HW to ease manual clock lookup | ||
7 | in datasheet. | ||
8 | |||
9 | The following is a list of provided IDs for Armada 370: | ||
10 | ID Clock Peripheral | ||
11 | ----------------------------------- | ||
12 | 0 Audio AC97 Cntrl | ||
13 | 1 pex0_en PCIe 0 Clock out | ||
14 | 2 pex1_en PCIe 1 Clock out | ||
15 | 3 ge1 Gigabit Ethernet 1 | ||
16 | 4 ge0 Gigabit Ethernet 0 | ||
17 | 5 pex0 PCIe Cntrl 0 | ||
18 | 9 pex1 PCIe Cntrl 1 | ||
19 | 15 sata0 SATA Host 0 | ||
20 | 17 sdio SDHCI Host | ||
21 | 25 tdm Time Division Mplx | ||
22 | 28 ddr DDR Cntrl | ||
23 | 30 sata1 SATA Host 0 | ||
24 | |||
25 | The following is a list of provided IDs for Armada XP: | ||
26 | ID Clock Peripheral | ||
27 | ----------------------------------- | ||
28 | 0 audio Audio Cntrl | ||
29 | 1 ge3 Gigabit Ethernet 3 | ||
30 | 2 ge2 Gigabit Ethernet 2 | ||
31 | 3 ge1 Gigabit Ethernet 1 | ||
32 | 4 ge0 Gigabit Ethernet 0 | ||
33 | 5 pex0 PCIe Cntrl 0 | ||
34 | 6 pex1 PCIe Cntrl 1 | ||
35 | 7 pex2 PCIe Cntrl 2 | ||
36 | 8 pex3 PCIe Cntrl 3 | ||
37 | 13 bp | ||
38 | 14 sata0lnk | ||
39 | 15 sata0 SATA Host 0 | ||
40 | 16 lcd LCD Cntrl | ||
41 | 17 sdio SDHCI Host | ||
42 | 18 usb0 USB Host 0 | ||
43 | 19 usb1 USB Host 1 | ||
44 | 20 usb2 USB Host 2 | ||
45 | 22 xor0 XOR DMA 0 | ||
46 | 23 crypto CESA engine | ||
47 | 25 tdm Time Division Mplx | ||
48 | 28 xor1 XOR DMA 1 | ||
49 | 29 sata1lnk | ||
50 | 30 sata1 SATA Host 0 | ||
51 | |||
52 | The following is a list of provided IDs for Dove: | ||
53 | ID Clock Peripheral | ||
54 | ----------------------------------- | ||
55 | 0 usb0 USB Host 0 | ||
56 | 1 usb1 USB Host 1 | ||
57 | 2 ge Gigabit Ethernet | ||
58 | 3 sata SATA Host | ||
59 | 4 pex0 PCIe Cntrl 0 | ||
60 | 5 pex1 PCIe Cntrl 1 | ||
61 | 8 sdio0 SDHCI Host 0 | ||
62 | 9 sdio1 SDHCI Host 1 | ||
63 | 10 nand NAND Cntrl | ||
64 | 11 camera Camera Cntrl | ||
65 | 12 i2s0 I2S Cntrl 0 | ||
66 | 13 i2s1 I2S Cntrl 1 | ||
67 | 15 crypto CESA engine | ||
68 | 21 ac97 AC97 Cntrl | ||
69 | 22 pdma Peripheral DMA | ||
70 | 23 xor0 XOR DMA 0 | ||
71 | 24 xor1 XOR DMA 1 | ||
72 | 30 gephy Gigabit Ethernel PHY | ||
73 | Note: gephy(30) is implemented as a parent clock of ge(2) | ||
74 | |||
75 | The following is a list of provided IDs for Kirkwood: | ||
76 | ID Clock Peripheral | ||
77 | ----------------------------------- | ||
78 | 0 ge0 Gigabit Ethernet 0 | ||
79 | 2 pex0 PCIe Cntrl 0 | ||
80 | 3 usb0 USB Host 0 | ||
81 | 4 sdio SDIO Cntrl | ||
82 | 5 tsu Transp. Stream Unit | ||
83 | 6 dunit SDRAM Cntrl | ||
84 | 7 runit Runit | ||
85 | 8 xor0 XOR DMA 0 | ||
86 | 9 audio I2S Cntrl 0 | ||
87 | 14 sata0 SATA Host 0 | ||
88 | 15 sata1 SATA Host 1 | ||
89 | 16 xor1 XOR DMA 1 | ||
90 | 17 crypto CESA engine | ||
91 | 18 pex1 PCIe Cntrl 1 | ||
92 | 19 ge1 Gigabit Ethernet 0 | ||
93 | 20 tdm Time Division Mplx | ||
94 | |||
95 | Required properties: | ||
96 | - compatible : shall be one of the following: | ||
97 | "marvell,dove-gating-clock" - for Dove SoC clock gating | ||
98 | "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating | ||
99 | - reg : shall be the register address of the Clock Gating Control register | ||
100 | - #clock-cells : from common clock binding; shall be set to 1 | ||
101 | |||
102 | Optional properties: | ||
103 | - clocks : default parent clock phandle (e.g. tclk) | ||
104 | |||
105 | Example: | ||
106 | |||
107 | gate_clk: clock-gating-control@d0038 { | ||
108 | compatible = "marvell,dove-gating-clock"; | ||
109 | reg = <0xd0038 0x4>; | ||
110 | /* default parent clock is tclk */ | ||
111 | clocks = <&core_clk 0>; | ||
112 | #clock-cells = <1>; | ||
113 | }; | ||
114 | |||
115 | sdio0: sdio@92000 { | ||
116 | compatible = "marvell,dove-sdhci"; | ||
117 | /* get clk gate bit 8 (sdio0) */ | ||
118 | clocks = <&gate_clk 8>; | ||
119 | }; | ||
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt index bd7ce120bc13..fc9ce6f1688c 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt +++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt | |||
@@ -54,7 +54,8 @@ PROPERTIES | |||
54 | - compatible | 54 | - compatible |
55 | Usage: required | 55 | Usage: required |
56 | Value type: <string> | 56 | Value type: <string> |
57 | Definition: Must include "fsl,sec-v4.0" | 57 | Definition: Must include "fsl,sec-v4.0". Also includes SEC |
58 | ERA versions (optional) with which the device is compatible. | ||
58 | 59 | ||
59 | - #address-cells | 60 | - #address-cells |
60 | Usage: required | 61 | Usage: required |
@@ -106,7 +107,7 @@ PROPERTIES | |||
106 | 107 | ||
107 | EXAMPLE | 108 | EXAMPLE |
108 | crypto@300000 { | 109 | crypto@300000 { |
109 | compatible = "fsl,sec-v4.0"; | 110 | compatible = "fsl,sec-v4.0", "fsl,sec-era-v2.0"; |
110 | #address-cells = <1>; | 111 | #address-cells = <1>; |
111 | #size-cells = <1>; | 112 | #size-cells = <1>; |
112 | reg = <0x300000 0x10000>; | 113 | reg = <0x300000 0x10000>; |
diff --git a/Documentation/devicetree/bindings/dma/mv-xor.txt b/Documentation/devicetree/bindings/dma/mv-xor.txt new file mode 100644 index 000000000000..7c6cb7fcecd2 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/mv-xor.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | * Marvell XOR engines | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "marvell,orion-xor" | ||
5 | - reg: Should contain registers location and length (two sets) | ||
6 | the first set is the low registers, the second set the high | ||
7 | registers for the XOR engine. | ||
8 | - clocks: pointer to the reference clock | ||
9 | |||
10 | The DT node must also contains sub-nodes for each XOR channel that the | ||
11 | XOR engine has. Those sub-nodes have the following required | ||
12 | properties: | ||
13 | - interrupts: interrupt of the XOR channel | ||
14 | |||
15 | And the following optional properties: | ||
16 | - dmacap,memcpy to indicate that the XOR channel is capable of memcpy operations | ||
17 | - dmacap,memset to indicate that the XOR channel is capable of memset operations | ||
18 | - dmacap,xor to indicate that the XOR channel is capable of xor operations | ||
19 | |||
20 | Example: | ||
21 | |||
22 | xor@d0060900 { | ||
23 | compatible = "marvell,orion-xor"; | ||
24 | reg = <0xd0060900 0x100 | ||
25 | 0xd0060b00 0x100>; | ||
26 | clocks = <&coreclk 0>; | ||
27 | status = "okay"; | ||
28 | |||
29 | xor00 { | ||
30 | interrupts = <51>; | ||
31 | dmacap,memcpy; | ||
32 | dmacap,xor; | ||
33 | }; | ||
34 | xor01 { | ||
35 | interrupts = <52>; | ||
36 | dmacap,memcpy; | ||
37 | dmacap,xor; | ||
38 | dmacap,memset; | ||
39 | }; | ||
40 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt index 558cdf3c9abc..d4eab9227ea4 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-poweroff.txt | |||
@@ -1,4 +1,19 @@ | |||
1 | GPIO line that should be set high/low to power off a device | 1 | Driver a GPIO line that can be used to turn the power off. |
2 | |||
3 | The driver supports both level triggered and edge triggered power off. | ||
4 | At driver load time, the driver will request the given gpio line and | ||
5 | install a pm_power_off handler. If the optional properties 'input' is | ||
6 | not found, the GPIO line will be driven in the inactive | ||
7 | state. Otherwise its configured as an input. | ||
8 | |||
9 | When the pm_power_off is called, the gpio is configured as an output, | ||
10 | and drive active, so triggering a level triggered power off | ||
11 | condition. This will also cause an inactive->active edge condition, so | ||
12 | triggering positive edge triggered power off. After a delay of 100ms, | ||
13 | the GPIO is set to inactive, thus causing an active->inactive edge, | ||
14 | triggering negative edge triggered power off. After another 100ms | ||
15 | delay the GPIO is driver active again. If the power is still on and | ||
16 | the CPU still running after a 3000ms delay, a WARN_ON(1) is emitted. | ||
2 | 17 | ||
3 | Required properties: | 18 | Required properties: |
4 | - compatible : should be "gpio-poweroff". | 19 | - compatible : should be "gpio-poweroff". |
@@ -13,10 +28,9 @@ Optional properties: | |||
13 | property is not specified, the GPIO is initialized as an output in its | 28 | property is not specified, the GPIO is initialized as an output in its |
14 | inactive state. | 29 | inactive state. |
15 | 30 | ||
16 | |||
17 | Examples: | 31 | Examples: |
18 | 32 | ||
19 | gpio-poweroff { | 33 | gpio-poweroff { |
20 | compatible = "gpio-poweroff"; | 34 | compatible = "gpio-poweroff"; |
21 | gpios = <&gpio 4 0>; /* GPIO 4 Active Low */ | 35 | gpios = <&gpio 4 0>; |
22 | }; | 36 | }; |
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt new file mode 100644 index 000000000000..b4fa934ae3a2 --- /dev/null +++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | |||
@@ -0,0 +1,191 @@ | |||
1 | NVIDIA Tegra host1x | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "nvidia,tegra<chip>-host1x" | ||
5 | - reg: Physical base address and length of the controller's registers. | ||
6 | - interrupts: The interrupt outputs from the controller. | ||
7 | - #address-cells: The number of cells used to represent physical base addresses | ||
8 | in the host1x address space. Should be 1. | ||
9 | - #size-cells: The number of cells used to represent the size of an address | ||
10 | range in the host1x address space. Should be 1. | ||
11 | - ranges: The mapping of the host1x address space to the CPU address space. | ||
12 | |||
13 | The host1x top-level node defines a number of children, each representing one | ||
14 | of the following host1x client modules: | ||
15 | |||
16 | - mpe: video encoder | ||
17 | |||
18 | Required properties: | ||
19 | - compatible: "nvidia,tegra<chip>-mpe" | ||
20 | - reg: Physical base address and length of the controller's registers. | ||
21 | - interrupts: The interrupt outputs from the controller. | ||
22 | |||
23 | - vi: video input | ||
24 | |||
25 | Required properties: | ||
26 | - compatible: "nvidia,tegra<chip>-vi" | ||
27 | - reg: Physical base address and length of the controller's registers. | ||
28 | - interrupts: The interrupt outputs from the controller. | ||
29 | |||
30 | - epp: encoder pre-processor | ||
31 | |||
32 | Required properties: | ||
33 | - compatible: "nvidia,tegra<chip>-epp" | ||
34 | - reg: Physical base address and length of the controller's registers. | ||
35 | - interrupts: The interrupt outputs from the controller. | ||
36 | |||
37 | - isp: image signal processor | ||
38 | |||
39 | Required properties: | ||
40 | - compatible: "nvidia,tegra<chip>-isp" | ||
41 | - reg: Physical base address and length of the controller's registers. | ||
42 | - interrupts: The interrupt outputs from the controller. | ||
43 | |||
44 | - gr2d: 2D graphics engine | ||
45 | |||
46 | Required properties: | ||
47 | - compatible: "nvidia,tegra<chip>-gr2d" | ||
48 | - reg: Physical base address and length of the controller's registers. | ||
49 | - interrupts: The interrupt outputs from the controller. | ||
50 | |||
51 | - gr3d: 3D graphics engine | ||
52 | |||
53 | Required properties: | ||
54 | - compatible: "nvidia,tegra<chip>-gr3d" | ||
55 | - reg: Physical base address and length of the controller's registers. | ||
56 | |||
57 | - dc: display controller | ||
58 | |||
59 | Required properties: | ||
60 | - compatible: "nvidia,tegra<chip>-dc" | ||
61 | - reg: Physical base address and length of the controller's registers. | ||
62 | - interrupts: The interrupt outputs from the controller. | ||
63 | |||
64 | Each display controller node has a child node, named "rgb", that represents | ||
65 | the RGB output associated with the controller. It can take the following | ||
66 | optional properties: | ||
67 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | ||
68 | - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection | ||
69 | - nvidia,edid: supplies a binary EDID blob | ||
70 | |||
71 | - hdmi: High Definition Multimedia Interface | ||
72 | |||
73 | Required properties: | ||
74 | - compatible: "nvidia,tegra<chip>-hdmi" | ||
75 | - reg: Physical base address and length of the controller's registers. | ||
76 | - interrupts: The interrupt outputs from the controller. | ||
77 | - vdd-supply: regulator for supply voltage | ||
78 | - pll-supply: regulator for PLL | ||
79 | |||
80 | Optional properties: | ||
81 | - nvidia,ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing | ||
82 | - nvidia,hpd-gpio: specifies a GPIO used for hotplug detection | ||
83 | - nvidia,edid: supplies a binary EDID blob | ||
84 | |||
85 | - tvo: TV encoder output | ||
86 | |||
87 | Required properties: | ||
88 | - compatible: "nvidia,tegra<chip>-tvo" | ||
89 | - reg: Physical base address and length of the controller's registers. | ||
90 | - interrupts: The interrupt outputs from the controller. | ||
91 | |||
92 | - dsi: display serial interface | ||
93 | |||
94 | Required properties: | ||
95 | - compatible: "nvidia,tegra<chip>-dsi" | ||
96 | - reg: Physical base address and length of the controller's registers. | ||
97 | |||
98 | Example: | ||
99 | |||
100 | / { | ||
101 | ... | ||
102 | |||
103 | host1x { | ||
104 | compatible = "nvidia,tegra20-host1x", "simple-bus"; | ||
105 | reg = <0x50000000 0x00024000>; | ||
106 | interrupts = <0 65 0x04 /* mpcore syncpt */ | ||
107 | 0 67 0x04>; /* mpcore general */ | ||
108 | |||
109 | #address-cells = <1>; | ||
110 | #size-cells = <1>; | ||
111 | |||
112 | ranges = <0x54000000 0x54000000 0x04000000>; | ||
113 | |||
114 | mpe { | ||
115 | compatible = "nvidia,tegra20-mpe"; | ||
116 | reg = <0x54040000 0x00040000>; | ||
117 | interrupts = <0 68 0x04>; | ||
118 | }; | ||
119 | |||
120 | vi { | ||
121 | compatible = "nvidia,tegra20-vi"; | ||
122 | reg = <0x54080000 0x00040000>; | ||
123 | interrupts = <0 69 0x04>; | ||
124 | }; | ||
125 | |||
126 | epp { | ||
127 | compatible = "nvidia,tegra20-epp"; | ||
128 | reg = <0x540c0000 0x00040000>; | ||
129 | interrupts = <0 70 0x04>; | ||
130 | }; | ||
131 | |||
132 | isp { | ||
133 | compatible = "nvidia,tegra20-isp"; | ||
134 | reg = <0x54100000 0x00040000>; | ||
135 | interrupts = <0 71 0x04>; | ||
136 | }; | ||
137 | |||
138 | gr2d { | ||
139 | compatible = "nvidia,tegra20-gr2d"; | ||
140 | reg = <0x54140000 0x00040000>; | ||
141 | interrupts = <0 72 0x04>; | ||
142 | }; | ||
143 | |||
144 | gr3d { | ||
145 | compatible = "nvidia,tegra20-gr3d"; | ||
146 | reg = <0x54180000 0x00040000>; | ||
147 | }; | ||
148 | |||
149 | dc@54200000 { | ||
150 | compatible = "nvidia,tegra20-dc"; | ||
151 | reg = <0x54200000 0x00040000>; | ||
152 | interrupts = <0 73 0x04>; | ||
153 | |||
154 | rgb { | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | }; | ||
158 | |||
159 | dc@54240000 { | ||
160 | compatible = "nvidia,tegra20-dc"; | ||
161 | reg = <0x54240000 0x00040000>; | ||
162 | interrupts = <0 74 0x04>; | ||
163 | |||
164 | rgb { | ||
165 | status = "disabled"; | ||
166 | }; | ||
167 | }; | ||
168 | |||
169 | hdmi { | ||
170 | compatible = "nvidia,tegra20-hdmi"; | ||
171 | reg = <0x54280000 0x00040000>; | ||
172 | interrupts = <0 75 0x04>; | ||
173 | status = "disabled"; | ||
174 | }; | ||
175 | |||
176 | tvo { | ||
177 | compatible = "nvidia,tegra20-tvo"; | ||
178 | reg = <0x542c0000 0x00040000>; | ||
179 | interrupts = <0 76 0x04>; | ||
180 | status = "disabled"; | ||
181 | }; | ||
182 | |||
183 | dsi { | ||
184 | compatible = "nvidia,tegra20-dsi"; | ||
185 | reg = <0x54300000 0x00040000>; | ||
186 | status = "disabled"; | ||
187 | }; | ||
188 | }; | ||
189 | |||
190 | ... | ||
191 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt b/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt new file mode 100644 index 000000000000..8ce9cd2855b5 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-cbus-gpio.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | Device tree bindings for i2c-cbus-gpio driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible = "i2c-cbus-gpio"; | ||
5 | - gpios: clk, dat, sel | ||
6 | - #address-cells = <1>; | ||
7 | - #size-cells = <0>; | ||
8 | |||
9 | Optional properties: | ||
10 | - child nodes conforming to i2c bus binding | ||
11 | |||
12 | Example: | ||
13 | |||
14 | i2c@0 { | ||
15 | compatible = "i2c-cbus-gpio"; | ||
16 | gpios = <&gpio 66 0 /* clk */ | ||
17 | &gpio 65 0 /* dat */ | ||
18 | &gpio 64 0 /* sel */ | ||
19 | >; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <0>; | ||
22 | |||
23 | retu-mfd: retu@1 { | ||
24 | compatible = "retu-mfd"; | ||
25 | reg = <0x1>; | ||
26 | }; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt new file mode 100644 index 000000000000..66709a825541 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt | |||
@@ -0,0 +1,81 @@ | |||
1 | GPIO-based I2C Bus Mux | ||
2 | |||
3 | This binding describes an I2C bus multiplexer that uses GPIOs to | ||
4 | route the I2C signals. | ||
5 | |||
6 | +-----+ +-----+ | ||
7 | | dev | | dev | | ||
8 | +------------+ +-----+ +-----+ | ||
9 | | SoC | | | | ||
10 | | | /--------+--------+ | ||
11 | | +------+ | +------+ child bus A, on GPIO value set to 0 | ||
12 | | | I2C |-|--| Mux | | ||
13 | | +------+ | +--+---+ child bus B, on GPIO value set to 1 | ||
14 | | | | \----------+--------+--------+ | ||
15 | | +------+ | | | | | | ||
16 | | | GPIO |-|-----+ +-----+ +-----+ +-----+ | ||
17 | | +------+ | | dev | | dev | | dev | | ||
18 | +------------+ +-----+ +-----+ +-----+ | ||
19 | |||
20 | Required properties: | ||
21 | - compatible: i2c-mux-gpio | ||
22 | - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side | ||
23 | port is connected to. | ||
24 | - mux-gpios: list of gpios used to control the muxer | ||
25 | * Standard I2C mux properties. See mux.txt in this directory. | ||
26 | * I2C child bus nodes. See mux.txt in this directory. | ||
27 | |||
28 | Optional properties: | ||
29 | - idle-state: value to set the muxer to when idle. When no value is | ||
30 | given, it defaults to the last value used. | ||
31 | |||
32 | For each i2c child node, an I2C child bus will be created. They will | ||
33 | be numbered based on their order in the device tree. | ||
34 | |||
35 | Whenever an access is made to a device on a child bus, the value set | ||
36 | in the revelant node's reg property will be output using the list of | ||
37 | GPIOs, the first in the list holding the least-significant value. | ||
38 | |||
39 | If an idle state is defined, using the idle-state (optional) property, | ||
40 | whenever an access is not being made to a device on a child bus, the | ||
41 | GPIOs will be set according to the idle value. | ||
42 | |||
43 | If an idle state is not defined, the most recently used value will be | ||
44 | left programmed into hardware whenever no access is being made to a | ||
45 | device on a child bus. | ||
46 | |||
47 | Example: | ||
48 | i2cmux { | ||
49 | compatible = "i2c-mux-gpio"; | ||
50 | #address-cells = <1>; | ||
51 | #size-cells = <0>; | ||
52 | mux-gpios = <&gpio1 22 0 &gpio1 23 0>; | ||
53 | i2c-parent = <&i2c1>; | ||
54 | |||
55 | i2c@1 { | ||
56 | reg = <1>; | ||
57 | #address-cells = <1>; | ||
58 | #size-cells = <0>; | ||
59 | |||
60 | ssd1307: oled@3c { | ||
61 | compatible = "solomon,ssd1307fb-i2c"; | ||
62 | reg = <0x3c>; | ||
63 | pwms = <&pwm 4 3000>; | ||
64 | reset-gpios = <&gpio2 7 1>; | ||
65 | reset-active-low; | ||
66 | }; | ||
67 | }; | ||
68 | |||
69 | i2c@3 { | ||
70 | reg = <3>; | ||
71 | #address-cells = <1>; | ||
72 | #size-cells = <0>; | ||
73 | |||
74 | pca9555: pca9555@20 { | ||
75 | compatible = "nxp,pca9555"; | ||
76 | gpio-controller; | ||
77 | #gpio-cells = <2>; | ||
78 | reg = <0x20>; | ||
79 | }; | ||
80 | }; | ||
81 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt index c15781f4dc8c..1637c298a1b3 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Device tree configuration for i2c-ocores | 1 | Device tree configuration for i2c-ocores |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "opencores,i2c-ocores" | 4 | - compatible : "opencores,i2c-ocores" or "aeroflexgaisler,i2cmst" |
5 | - reg : bus address start and address range size of device | 5 | - reg : bus address start and address range size of device |
6 | - interrupts : interrupt number | 6 | - interrupts : interrupt number |
7 | - clock-frequency : frequency of bus clock in Hz | 7 | - clock-frequency : frequency of bus clock in Hz |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt index b6cb5a12c672..e9611ace8792 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt | |||
@@ -13,11 +13,17 @@ Required properties: | |||
13 | - interrupts: interrupt number to the cpu. | 13 | - interrupts: interrupt number to the cpu. |
14 | - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. | 14 | - samsung,i2c-sda-delay: Delay (in ns) applied to data line (SDA) edges. |
15 | 15 | ||
16 | Required for all cases except "samsung,s3c2440-hdmiphy-i2c": | ||
17 | - Samsung GPIO variant (deprecated): | ||
18 | - gpios: The order of the gpios should be the following: <SDA, SCL>. | ||
19 | The gpio specifier depends on the gpio controller. Required in all | ||
20 | cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output | ||
21 | lines are permanently wired to the respective clienta | ||
22 | - Pinctrl variant (preferred, if available): | ||
23 | - pinctrl-0: Pin control group to be used for this controller. | ||
24 | - pinctrl-names: Should contain only one value - "default". | ||
25 | |||
16 | Optional properties: | 26 | Optional properties: |
17 | - gpios: The order of the gpios should be the following: <SDA, SCL>. | ||
18 | The gpio specifier depends on the gpio controller. Required in all | ||
19 | cases except for "samsung,s3c2440-hdmiphy-i2c" whose input/output | ||
20 | lines are permanently wired to the respective client | ||
21 | - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not | 27 | - samsung,i2c-slave-addr: Slave address in multi-master enviroment. If not |
22 | specified, default value is 0. | 28 | specified, default value is 0. |
23 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not | 29 | - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not |
@@ -31,8 +37,14 @@ Example: | |||
31 | interrupts = <345>; | 37 | interrupts = <345>; |
32 | samsung,i2c-sda-delay = <100>; | 38 | samsung,i2c-sda-delay = <100>; |
33 | samsung,i2c-max-bus-freq = <100000>; | 39 | samsung,i2c-max-bus-freq = <100000>; |
40 | /* Samsung GPIO variant begins here */ | ||
34 | gpios = <&gpd1 2 0 /* SDA */ | 41 | gpios = <&gpd1 2 0 /* SDA */ |
35 | &gpd1 3 0 /* SCL */>; | 42 | &gpd1 3 0 /* SCL */>; |
43 | /* Samsung GPIO variant ends here */ | ||
44 | /* Pinctrl variant begins here */ | ||
45 | pinctrl-0 = <&i2c3_bus>; | ||
46 | pinctrl-names = "default"; | ||
47 | /* Pinctrl variant ends here */ | ||
36 | #address-cells = <1>; | 48 | #address-cells = <1>; |
37 | #size-cells = <0>; | 49 | #size-cells = <0>; |
38 | 50 | ||
diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt new file mode 100644 index 000000000000..ead641c65e0a --- /dev/null +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | * GPIO driven matrix keypad device tree bindings | ||
2 | |||
3 | GPIO driven matrix keypad is used to interface a SoC with a matrix keypad. | ||
4 | The matrix keypad supports multiple row and column lines, a key can be | ||
5 | placed at each intersection of a unique row and a unique column. The matrix | ||
6 | keypad can sense a key-press and key-release by means of GPIO lines and | ||
7 | report the event using GPIO interrupts to the cpu. | ||
8 | |||
9 | Required Properties: | ||
10 | - compatible: Should be "gpio-matrix-keypad" | ||
11 | - row-gpios: List of gpios used as row lines. The gpio specifier | ||
12 | for this property depends on the gpio controller to | ||
13 | which these row lines are connected. | ||
14 | - col-gpios: List of gpios used as column lines. The gpio specifier | ||
15 | for this property depends on the gpio controller to | ||
16 | which these column lines are connected. | ||
17 | - linux,keymap: The definition can be found at | ||
18 | bindings/input/matrix-keymap.txt | ||
19 | |||
20 | Optional Properties: | ||
21 | - linux,no-autorepeat: do no enable autorepeat feature. | ||
22 | - linux,wakeup: use any event on keypad as wakeup event. | ||
23 | - debounce-delay-ms: debounce interval in milliseconds | ||
24 | - col-scan-delay-us: delay, measured in microseconds, that is needed | ||
25 | before we can scan keypad after activating column gpio | ||
26 | |||
27 | Example: | ||
28 | matrix-keypad { | ||
29 | compatible = "gpio-matrix-keypad"; | ||
30 | debounce-delay-ms = <5>; | ||
31 | col-scan-delay-us = <2>; | ||
32 | |||
33 | row-gpios = <&gpio2 25 0 | ||
34 | &gpio2 26 0 | ||
35 | &gpio2 27 0>; | ||
36 | |||
37 | col-gpios = <&gpio2 21 0 | ||
38 | &gpio2 22 0>; | ||
39 | |||
40 | linux,keymap = <0x0000008B | ||
41 | 0x0100009E | ||
42 | 0x02000069 | ||
43 | 0x0001006A | ||
44 | 0x0101001C | ||
45 | 0x0201006C>; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/pwm-beeper.txt b/Documentation/devicetree/bindings/input/pwm-beeper.txt new file mode 100644 index 000000000000..be332ae4f2d6 --- /dev/null +++ b/Documentation/devicetree/bindings/input/pwm-beeper.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | * PWM beeper device tree bindings | ||
2 | |||
3 | Registers a PWM device as beeper. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: should be "pwm-beeper" | ||
7 | - pwms: phandle to the physical PWM device | ||
diff --git a/Documentation/devicetree/bindings/input/stmpe-keypad.txt b/Documentation/devicetree/bindings/input/stmpe-keypad.txt new file mode 100644 index 000000000000..1b97222e8a0b --- /dev/null +++ b/Documentation/devicetree/bindings/input/stmpe-keypad.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | * STMPE Keypad | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "st,stmpe-keypad" | ||
5 | - linux,keymap : See ./matrix-keymap.txt | ||
6 | |||
7 | Optional properties: | ||
8 | - debounce-interval : Debouncing interval time in milliseconds | ||
9 | - st,scan-count : Scanning cycles elapsed before key data is updated | ||
10 | - st,no-autorepeat : If specified device will not autorepeat | ||
11 | |||
12 | Example: | ||
13 | |||
14 | stmpe_keypad { | ||
15 | compatible = "st,stmpe-keypad"; | ||
16 | |||
17 | debounce-interval = <64>; | ||
18 | st,scan-count = <8>; | ||
19 | st,no-autorepeat; | ||
20 | |||
21 | linux,keymap = <0x205006b | ||
22 | 0x4010074 | ||
23 | 0x3050072 | ||
24 | 0x1030004 | ||
25 | 0x502006a | ||
26 | 0x500000a | ||
27 | 0x5008b | ||
28 | 0x706001c | ||
29 | 0x405000b | ||
30 | 0x6070003 | ||
31 | 0x3040067 | ||
32 | 0x303006c | ||
33 | 0x60400e7 | ||
34 | 0x602009e | ||
35 | 0x4020073 | ||
36 | 0x5050002 | ||
37 | 0x4030069 | ||
38 | 0x3020008>; | ||
39 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/tca8418_keypad.txt b/Documentation/devicetree/bindings/input/tca8418_keypad.txt new file mode 100644 index 000000000000..2a1538f0053f --- /dev/null +++ b/Documentation/devicetree/bindings/input/tca8418_keypad.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | |||
2 | Required properties: | ||
3 | - compatible: "ti,tca8418" | ||
4 | - reg: the I2C address | ||
5 | - interrupts: IRQ line number, should trigger on falling edge | ||
6 | - keypad,num-rows: The number of rows | ||
7 | - keypad,num-columns: The number of columns | ||
8 | - linux,keymap: Keys definitions, see keypad-matrix. | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/mms114.txt b/Documentation/devicetree/bindings/input/touchscreen/mms114.txt new file mode 100644 index 000000000000..89d4c56c5671 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/mms114.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | * MELFAS MMS114 touchscreen controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "melfas,mms114" | ||
5 | - reg: I2C address of the chip | ||
6 | - interrupts: interrupt to which the chip is connected | ||
7 | - x-size: horizontal resolution of touchscreen | ||
8 | - y-size: vertical resolution of touchscreen | ||
9 | |||
10 | Optional properties: | ||
11 | - contact-threshold: | ||
12 | - moving-threshold: | ||
13 | - x-invert: invert X axis | ||
14 | - y-invert: invert Y axis | ||
15 | |||
16 | Example: | ||
17 | |||
18 | i2c@00000000 { | ||
19 | /* ... */ | ||
20 | |||
21 | touchscreen@48 { | ||
22 | compatible = "melfas,mms114"; | ||
23 | reg = <0x48>; | ||
24 | interrupts = <39 0>; | ||
25 | x-size = <720>; | ||
26 | y-size = <1280>; | ||
27 | contact-threshold = <10>; | ||
28 | moving-threshold = <10>; | ||
29 | x-invert; | ||
30 | y-invert; | ||
31 | }; | ||
32 | |||
33 | /* ... */ | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt new file mode 100644 index 000000000000..127baa31a77a --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | STMPE Touchscreen | ||
2 | ---------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "st,stmpe-ts" | ||
6 | |||
7 | Optional properties: | ||
8 | - st,sample-time: ADC converstion time in number of clock. (0 -> 36 clocks, 1 -> | ||
9 | 44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, 5 -> 96 clocks, 6 | ||
10 | -> 144 clocks), recommended is 4. | ||
11 | - st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC) | ||
12 | - st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external | ||
13 | reference) | ||
14 | - st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz) | ||
15 | - st,ave-ctrl: Sample average control (0 -> 1 sample, 1 -> 2 samples, 2 -> 4 | ||
16 | samples, 3 -> 8 samples) | ||
17 | - st,touch-det-delay: Touch detect interrupt delay (0 -> 10 us, 1 -> 50 us, 2 -> | ||
18 | 100 us, 3 -> 500 us, 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms) recommended | ||
19 | is 3 | ||
20 | - st,settling: Panel driver settling time (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3 | ||
21 | -> 1 ms, 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) recommended is 2 | ||
22 | - st,fraction-z: Length of the fractional part in z (fraction-z ([0..7]) = Count of | ||
23 | the fractional part) recommended is 7 | ||
24 | - st,i-drive: current limit value of the touchscreen drivers (0 -> 20 mA typical 35 | ||
25 | mA max, 1 -> 50 mA typical 80 mA max) | ||
26 | |||
27 | Node name must be stmpe_touchscreen and should be child node of stmpe node to | ||
28 | which it belongs. | ||
29 | |||
30 | Example: | ||
31 | |||
32 | stmpe_touchscreen { | ||
33 | compatible = "st,stmpe-ts"; | ||
34 | st,sample-time = <4>; | ||
35 | st,mod-12b = <1>; | ||
36 | st,ref-sel = <0>; | ||
37 | st,adc-freq = <1>; | ||
38 | st,ave-ctrl = <1>; | ||
39 | st,touch-det-delay = <2>; | ||
40 | st,settling = <2>; | ||
41 | st,fraction-z = <7>; | ||
42 | st,i-drive = <1>; | ||
43 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt index ce83c8d3c00e..13b707b7355c 100644 --- a/Documentation/devicetree/bindings/mfd/ab8500.txt +++ b/Documentation/devicetree/bindings/mfd/ab8500.txt | |||
@@ -24,7 +24,32 @@ ab8500-bm : : : Battery Manager | |||
24 | ab8500-btemp : : : Battery Temperature | 24 | ab8500-btemp : : : Battery Temperature |
25 | ab8500-charger : : : Battery Charger | 25 | ab8500-charger : : : Battery Charger |
26 | ab8500-codec : : : Audio Codec | 26 | ab8500-codec : : : Audio Codec |
27 | ab8500-fg : : : Fuel Gauge | 27 | ab8500-fg : : vddadc : Fuel Gauge |
28 | : NCONV_ACCU : : Accumulate N Sample Conversion | ||
29 | : BATT_OVV : : Battery Over Voltage | ||
30 | : LOW_BAT_F : : LOW threshold battery voltage | ||
31 | : CC_INT_CALIB : : Coulomb Counter Internal Calibration | ||
32 | : CCEOC : : Coulomb Counter End of Conversion | ||
33 | ab8500-btemp : : vtvout : Battery Temperature | ||
34 | : BAT_CTRL_INDB : : Battery Removal Indicator | ||
35 | : BTEMP_LOW : : Btemp < BtempLow, if battery temperature is lower than -10°C | ||
36 | : BTEMP_LOW_MEDIUM : : BtempLow < Btemp < BtempMedium,if battery temperature is between -10 and 0°C | ||
37 | : BTEMP_MEDIUM_HIGH : : BtempMedium < Btemp < BtempHigh,if battery temperature is between 0°C and“MaxTemp | ||
38 | : BTEMP_HIGH : : Btemp > BtempHigh, if battery temperature is higher than “MaxTemp | ||
39 | ab8500-charger : : vddadc : Charger interface | ||
40 | : MAIN_CH_UNPLUG_DET : : main charger unplug detection management (not in 8505) | ||
41 | : MAIN_CHARGE_PLUG_DET : : main charger plug detection management (not in 8505) | ||
42 | : MAIN_EXT_CH_NOT_OK : : main charger not OK | ||
43 | : MAIN_CH_TH_PROT_R : : Die temp is above main charger | ||
44 | : MAIN_CH_TH_PROT_F : : Die temp is below main charger | ||
45 | : VBUS_DET_F : : VBUS falling detected | ||
46 | : VBUS_DET_R : : VBUS rising detected | ||
47 | : USB_LINK_STATUS : : USB link status has changed | ||
48 | : USB_CH_TH_PROT_R : : Die temp is above usb charger | ||
49 | : USB_CH_TH_PROT_F : : Die temp is below usb charger | ||
50 | : USB_CHARGER_NOT_OKR : : allowed USB charger not ok detection | ||
51 | : VBUS_OVV : : Overvoltage on Vbus ball detected (USB charge is stopped) | ||
52 | : CH_WD_EXP : : Charger watchdog detected | ||
28 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter | 53 | ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter |
29 | SW_CONV_END : : | 54 | SW_CONV_END : : |
30 | ab8500-gpio : : : GPIO Controller | 55 | ab8500-gpio : : : GPIO Controller |
diff --git a/Documentation/devicetree/bindings/mfd/stmpe.txt b/Documentation/devicetree/bindings/mfd/stmpe.txt new file mode 100644 index 000000000000..56edb5520685 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/stmpe.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | * ST Microelectronics STMPE Multi-Functional Device | ||
2 | |||
3 | STMPE is an MFD device which may expose the following inbuilt devices: gpio, | ||
4 | keypad, touchscreen, adc, pwm, rotator. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : "st,stmpe[610|801|811|1601|2401|2403]" | ||
8 | - reg : I2C/SPI address of the device | ||
9 | |||
10 | Optional properties: | ||
11 | - interrupts : The interrupt outputs from the controller | ||
12 | - interrupt-controller : Marks the device node as an interrupt controller | ||
13 | - interrupt-parent : Specifies which IRQ controller we're connected to | ||
14 | - wakeup-source : Marks the input device as wakable | ||
15 | - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024 | ||
16 | |||
17 | Example: | ||
18 | |||
19 | stmpe1601: stmpe1601@40 { | ||
20 | compatible = "st,stmpe1601"; | ||
21 | reg = <0x40>; | ||
22 | interrupts = <26 0x4>; | ||
23 | interrupt-parent = <&gpio6>; | ||
24 | interrupt-controller; | ||
25 | |||
26 | wakeup-source; | ||
27 | st,autosleep-timeout = <1024>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/denali-nand.txt b/Documentation/devicetree/bindings/mtd/denali-nand.txt new file mode 100644 index 000000000000..b04d03a1d499 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/denali-nand.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Denali NAND controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "denali,denali-nand-dt" | ||
5 | - reg : should contain registers location and length for data and reg. | ||
6 | - reg-names: Should contain the reg names "nand_data" and "denali_reg" | ||
7 | - interrupts : The interrupt number. | ||
8 | - dm-mask : DMA bit mask | ||
9 | |||
10 | The device tree may optionally contain sub-nodes describing partitions of the | ||
11 | address space. See partition.txt for more detail. | ||
12 | |||
13 | Examples: | ||
14 | |||
15 | nand: nand@ff900000 { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <1>; | ||
18 | compatible = "denali,denali-nand-dt"; | ||
19 | reg = <0xff900000 0x100000>, <0xffb80000 0x10000>; | ||
20 | reg-names = "nand_data", "denali_reg"; | ||
21 | interrupts = <0 144 4>; | ||
22 | dma-mask = <0xffffffff>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/flctl-nand.txt b/Documentation/devicetree/bindings/mtd/flctl-nand.txt new file mode 100644 index 000000000000..427f46dc60ad --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/flctl-nand.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | FLCTL NAND controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "renesas,shmobile-flctl-sh7372" | ||
5 | - reg : Address range of the FLCTL | ||
6 | - interrupts : flste IRQ number | ||
7 | - nand-bus-width : bus width to NAND chip | ||
8 | |||
9 | Optional properties: | ||
10 | - dmas: DMA specifier(s) | ||
11 | - dma-names: name for each DMA specifier. Valid names are | ||
12 | "data_tx", "data_rx", "ecc_tx", "ecc_rx" | ||
13 | |||
14 | The DMA fields are not used yet in the driver but are listed here for | ||
15 | completing the bindings. | ||
16 | |||
17 | The device tree may optionally contain sub-nodes describing partitions of the | ||
18 | address space. See partition.txt for more detail. | ||
19 | |||
20 | Example: | ||
21 | |||
22 | flctl@e6a30000 { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | compatible = "renesas,shmobile-flctl-sh7372"; | ||
26 | reg = <0xe6a30000 0x100>; | ||
27 | interrupts = <0x0d80>; | ||
28 | |||
29 | nand-bus-width = <16>; | ||
30 | |||
31 | dmas = <&dmac 1 /* data_tx */ | ||
32 | &dmac 2;> /* data_rx */ | ||
33 | dma-names = "data_tx", "data_rx"; | ||
34 | |||
35 | system@0 { | ||
36 | label = "system"; | ||
37 | reg = <0x0 0x8000000>; | ||
38 | }; | ||
39 | |||
40 | userdata@8000000 { | ||
41 | label = "userdata"; | ||
42 | reg = <0x8000000 0x10000000>; | ||
43 | }; | ||
44 | |||
45 | cache@18000000 { | ||
46 | label = "cache"; | ||
47 | reg = <0x18000000 0x8000000>; | ||
48 | }; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt index e2c663b354d2..e3ea32e7de3e 100644 --- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt +++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt | |||
@@ -3,9 +3,7 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible : "st,spear600-fsmc-nand" | 4 | - compatible : "st,spear600-fsmc-nand" |
5 | - reg : Address range of the mtd chip | 5 | - reg : Address range of the mtd chip |
6 | - reg-names: Should contain the reg names "fsmc_regs" and "nand_data" | 6 | - reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd" |
7 | - st,ale-off : Chip specific offset to ALE | ||
8 | - st,cle-off : Chip specific offset to CLE | ||
9 | 7 | ||
10 | Optional properties: | 8 | Optional properties: |
11 | - bank-width : Width (in bytes) of the device. If not present, the width | 9 | - bank-width : Width (in bytes) of the device. If not present, the width |
@@ -19,10 +17,10 @@ Example: | |||
19 | #address-cells = <1>; | 17 | #address-cells = <1>; |
20 | #size-cells = <1>; | 18 | #size-cells = <1>; |
21 | reg = <0xd1800000 0x1000 /* FSMC Register */ | 19 | reg = <0xd1800000 0x1000 /* FSMC Register */ |
22 | 0xd2000000 0x4000>; /* NAND Base */ | 20 | 0xd2000000 0x0010 /* NAND Base DATA */ |
23 | reg-names = "fsmc_regs", "nand_data"; | 21 | 0xd2020000 0x0010 /* NAND Base ADDR */ |
24 | st,ale-off = <0x20000>; | 22 | 0xd2010000 0x0010>; /* NAND Base CMD */ |
25 | st,cle-off = <0x10000>; | 23 | reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd"; |
26 | 24 | ||
27 | bank-width = <1>; | 25 | bank-width = <1>; |
28 | nand-skip-bbtscan; | 26 | nand-skip-bbtscan; |
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt new file mode 100644 index 000000000000..6d3d57609470 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * MTD SPI driver for ST M25Pxx (and similar) serial flash chips | ||
2 | |||
3 | Required properties: | ||
4 | - #address-cells, #size-cells : Must be present if the device has sub-nodes | ||
5 | representing partitions. | ||
6 | - compatible : Should be the manufacturer and the name of the chip. Bear in mind | ||
7 | the DT binding is not Linux-only, but in case of Linux, see the | ||
8 | "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of | ||
9 | supported chips. | ||
10 | - reg : Chip-Select number | ||
11 | - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at | ||
12 | |||
13 | Optional properties: | ||
14 | - m25p,fast-read : Use the "fast read" opcode to read data from the chip instead | ||
15 | of the usual "read" opcode. This opcode is not supported by | ||
16 | all chips and support for it can not be detected at runtime. | ||
17 | Refer to your chips' datasheet to check if this is supported | ||
18 | by your chip. | ||
19 | |||
20 | Example: | ||
21 | |||
22 | flash: m25p80@0 { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | compatible = "spansion,m25p80"; | ||
26 | reg = <0>; | ||
27 | spi-max-frequency = <40000000>; | ||
28 | m25p,fast-read; | ||
29 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt index 94de19b8f16b..dab7847fc800 100644 --- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt +++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt | |||
@@ -23,6 +23,9 @@ file systems on embedded devices. | |||
23 | unaligned accesses as implemented in the JFFS2 code via memcpy(). | 23 | unaligned accesses as implemented in the JFFS2 code via memcpy(). |
24 | By defining "no-unaligned-direct-access", the flash will not be | 24 | By defining "no-unaligned-direct-access", the flash will not be |
25 | exposed directly to the MTD users (e.g. JFFS2) any more. | 25 | exposed directly to the MTD users (e.g. JFFS2) any more. |
26 | - linux,mtd-name: allow to specify the mtd name for retro capability with | ||
27 | physmap-flash drivers as boot loader pass the mtd partition via the old | ||
28 | device name physmap-flash. | ||
26 | 29 | ||
27 | For JEDEC compatible devices, the following additional properties | 30 | For JEDEC compatible devices, the following additional properties |
28 | are defined: | 31 | are defined: |
diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt new file mode 100644 index 000000000000..859a6fa7569c --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Marvell Armada 370 / Armada XP Ethernet Controller (NETA) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "marvell,armada-370-neta". | ||
5 | - reg: address and length of the register set for the device. | ||
6 | - interrupts: interrupt for the device | ||
7 | - phy: A phandle to a phy node defining the PHY address (as the reg | ||
8 | property, a single integer). | ||
9 | - phy-mode: The interface between the SoC and the PHY (a string that | ||
10 | of_get_phy_mode() can understand) | ||
11 | - clocks: a pointer to the reference clock for this device. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | ethernet@d0070000 { | ||
16 | compatible = "marvell,armada-370-neta"; | ||
17 | reg = <0xd0070000 0x2500>; | ||
18 | interrupts = <8>; | ||
19 | clocks = <&gate_clk 4>; | ||
20 | status = "okay"; | ||
21 | phy = <&phy0>; | ||
22 | phy-mode = "rgmii-id"; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt new file mode 100644 index 000000000000..34e7aafa321c --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell-orion-mdio.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | * Marvell MDIO Ethernet Controller interface | ||
2 | |||
3 | The Ethernet controllers of the Marvel Kirkwood, Dove, Orion5x, | ||
4 | MV78xx0, Armada 370 and Armada XP have an identical unit that provides | ||
5 | an interface with the MDIO bus. This driver handles this MDIO | ||
6 | interface. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible: "marvell,orion-mdio" | ||
10 | - reg: address and length of the SMI register | ||
11 | |||
12 | The child nodes of the MDIO driver are the individual PHY devices | ||
13 | connected to this MDIO bus. They must have a "reg" property given the | ||
14 | PHY address on the MDIO bus. | ||
15 | |||
16 | Example at the SoC level: | ||
17 | |||
18 | mdio { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | compatible = "marvell,orion-mdio"; | ||
22 | reg = <0xd0072004 0x4>; | ||
23 | }; | ||
24 | |||
25 | And at the board level: | ||
26 | |||
27 | mdio { | ||
28 | phy0: ethernet-phy@0 { | ||
29 | reg = <0>; | ||
30 | }; | ||
31 | |||
32 | phy1: ethernet-phy@1 { | ||
33 | reg = <1>; | ||
34 | }; | ||
35 | } | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt index 3a268127b054..bc50899e0c81 100644 --- a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt | |||
@@ -81,7 +81,8 @@ PA31 TXD4 | |||
81 | Required properties for pin configuration node: | 81 | Required properties for pin configuration node: |
82 | - atmel,pins: 4 integers array, represents a group of pins mux and config | 82 | - atmel,pins: 4 integers array, represents a group of pins mux and config |
83 | setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>. | 83 | setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>. |
84 | The PERIPH 0 means gpio. | 84 | The PERIPH 0 means gpio, PERIPH 1 is periph A, PERIPH 2 is periph B... |
85 | PIN_BANK 0 is pioA, PIN_BANK 1 is pioB... | ||
85 | 86 | ||
86 | Bits used for CONFIG: | 87 | Bits used for CONFIG: |
87 | PULL_UP (1 << 0): indicate this pin need a pull up. | 88 | PULL_UP (1 << 0): indicate this pin need a pull up. |
@@ -126,7 +127,7 @@ pinctrl@fffff400 { | |||
126 | pinctrl_dbgu: dbgu-0 { | 127 | pinctrl_dbgu: dbgu-0 { |
127 | atmel,pins = | 128 | atmel,pins = |
128 | <1 14 0x1 0x0 /* PB14 periph A */ | 129 | <1 14 0x1 0x0 /* PB14 periph A */ |
129 | 1 15 0x1 0x1>; /* PB15 periph with pullup */ | 130 | 1 15 0x1 0x1>; /* PB15 periph A with pullup */ |
130 | }; | 131 | }; |
131 | }; | 132 | }; |
132 | }; | 133 | }; |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt new file mode 100644 index 000000000000..c596a6ad3285 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | CSR SiRFprimaII pinmux controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "sirf,prima2-pinctrl" | ||
5 | - reg : Address range of the pinctrl registers | ||
6 | - interrupts : Interrupts used by every GPIO group | ||
7 | - gpio-controller : Indicates this device is a GPIO controller | ||
8 | - interrupt-controller : Marks the device node as an interrupt controller | ||
9 | Optional properties: | ||
10 | - sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m | ||
11 | - sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m | ||
12 | |||
13 | Please refer to pinctrl-bindings.txt in this directory for details of the common | ||
14 | pinctrl bindings used by client devices. | ||
15 | |||
16 | SiRFprimaII's pinmux nodes act as a container for an abitrary number of subnodes. | ||
17 | Each of these subnodes represents some desired configuration for a group of pins. | ||
18 | |||
19 | Required subnode-properties: | ||
20 | - sirf,pins : An array of strings. Each string contains the name of a group. | ||
21 | - sirf,function: A string containing the name of the function to mux to the | ||
22 | group. | ||
23 | |||
24 | Valid values for group and function names can be found from looking at the | ||
25 | group and function arrays in driver files: | ||
26 | drivers/pinctrl/pinctrl-sirf.c | ||
27 | |||
28 | For example, pinctrl might have subnodes like the following: | ||
29 | uart2_pins_a: uart2@0 { | ||
30 | uart { | ||
31 | sirf,pins = "uart2grp"; | ||
32 | sirf,function = "uart2"; | ||
33 | }; | ||
34 | }; | ||
35 | uart2_noflow_pins_a: uart2@1 { | ||
36 | uart { | ||
37 | sirf,pins = "uart2_nostreamctrlgrp"; | ||
38 | sirf,function = "uart2_nostreamctrl"; | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | For a specific board, if it wants to use uart2 without hardware flow control, | ||
43 | it can add the following to its board-specific .dts file. | ||
44 | uart2: uart@0xb0070000 { | ||
45 | pinctrl-names = "default"; | ||
46 | pinctrl-0 = <&uart2_noflow_pins_a>; | ||
47 | } | ||
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt b/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt new file mode 100644 index 000000000000..0ba1bcc7f33a --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/btemp.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | === AB8500 Battery Temperature Monitor Driver === | ||
2 | |||
3 | The properties below describes the node for btemp driver. | ||
4 | |||
5 | Required Properties: | ||
6 | - compatible = Shall be: "stericsson,ab8500-btemp" | ||
7 | - battery = Shall be battery specific information | ||
8 | |||
9 | Example: | ||
10 | ab8500_btemp { | ||
11 | compatible = "stericsson,ab8500-btemp"; | ||
12 | battery = <&ab8500_battery>; | ||
13 | }; | ||
14 | |||
15 | For information on battery specific node, Ref: | ||
16 | Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | ||
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt b/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt new file mode 100644 index 000000000000..ef5328371122 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/chargalg.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | === AB8500 Charging Algorithm Driver === | ||
2 | |||
3 | The properties below describes the node for chargalg driver. | ||
4 | |||
5 | Required Properties: | ||
6 | - compatible = Shall be: "stericsson,ab8500-chargalg" | ||
7 | - battery = Shall be battery specific information | ||
8 | |||
9 | Example: | ||
10 | ab8500_chargalg { | ||
11 | compatible = "stericsson,ab8500-chargalg"; | ||
12 | battery = <&ab8500_battery>; | ||
13 | }; | ||
14 | |||
15 | For information on battery specific node, Ref: | ||
16 | Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | ||
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt b/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt new file mode 100644 index 000000000000..6bdbb08ea9e0 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/charger.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | === AB8500 Charger Driver === | ||
2 | |||
3 | Required Properties: | ||
4 | - compatible = Shall be "stericsson,ab8500-charger" | ||
5 | - battery = Shall be battery specific information | ||
6 | Example: | ||
7 | ab8500_charger { | ||
8 | compatible = "stericsson,ab8500-charger"; | ||
9 | battery = <&ab8500_battery>; | ||
10 | }; | ||
11 | |||
12 | - vddadc-supply: Supply for USB and Main charger | ||
13 | Example: | ||
14 | ab8500-charger { | ||
15 | vddadc-supply = <&ab8500_ldo_tvout_reg>; | ||
16 | } | ||
17 | - autopower_cfg: | ||
18 | Boolean value depicting the presence of 'automatic poweron after powerloss' | ||
19 | Example: | ||
20 | ab8500-charger { | ||
21 | autopower_cfg; | ||
22 | }; | ||
23 | |||
24 | For information on battery specific node, Ref: | ||
25 | Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | ||
diff --git a/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt b/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt new file mode 100644 index 000000000000..ccafcb9112fb --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/ab8500/fg.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | === AB8500 Fuel Gauge Driver === | ||
2 | |||
3 | AB8500 is a mixed signal multimedia and power management | ||
4 | device comprising: power and energy-management-module, | ||
5 | wall-charger, usb-charger, audio codec, general purpose adc, | ||
6 | tvout, clock management and sim card interface. | ||
7 | |||
8 | Fuelgauge support is part of energy-management-modules, other | ||
9 | components of this module are: | ||
10 | main-charger, usb-combo-charger and battery-temperature-monitoring. | ||
11 | |||
12 | The properties below describes the node for fuelgauge driver. | ||
13 | |||
14 | Required Properties: | ||
15 | - compatible = This shall be: "stericsson,ab8500-fg" | ||
16 | - battery = Shall be battery specific information | ||
17 | Example: | ||
18 | ab8500_fg { | ||
19 | compatible = "stericsson,ab8500-fg"; | ||
20 | battery = <&ab8500_battery>; | ||
21 | }; | ||
22 | |||
23 | dependent node: | ||
24 | ab8500_battery: ab8500_battery { | ||
25 | }; | ||
26 | This node will provide information on 'thermistor interface' and | ||
27 | 'battery technology type' used. | ||
28 | |||
29 | Properties of this node are: | ||
30 | thermistor-on-batctrl: | ||
31 | A boolean value indicating thermistor interface to battery | ||
32 | |||
33 | Note: | ||
34 | 'btemp' and 'batctrl' are the pins interfaced for battery temperature | ||
35 | measurement, 'btemp' signal is used when NTC(negative temperature | ||
36 | coefficient) resister is interfaced external to battery whereas | ||
37 | 'batctrl' pin is used when NTC resister is internal to battery. | ||
38 | |||
39 | Example: | ||
40 | ab8500_battery: ab8500_battery { | ||
41 | thermistor-on-batctrl; | ||
42 | }; | ||
43 | indicates: NTC resister is internal to battery, 'batctrl' is used | ||
44 | for thermal measurement. | ||
45 | |||
46 | The absence of property 'thermal-on-batctrl' indicates | ||
47 | NTC resister is external to battery and 'btemp' signal is used | ||
48 | for thermal measurement. | ||
49 | |||
50 | battery-type: | ||
51 | This shall be the battery manufacturing technology type, | ||
52 | allowed types are: | ||
53 | "UNKNOWN" "NiMH" "LION" "LIPO" "LiFe" "NiCd" "LiMn" | ||
54 | Example: | ||
55 | ab8500_battery: ab8500_battery { | ||
56 | stericsson,battery-type = "LIPO"; | ||
57 | } | ||
58 | |||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt new file mode 100644 index 000000000000..4ad29b9ac2ac --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt | |||
@@ -0,0 +1,81 @@ | |||
1 | * Freescale 85xx RAID Engine nodes | ||
2 | |||
3 | RAID Engine nodes are defined to describe on-chip RAID accelerators. Each RAID | ||
4 | Engine should have a separate node. | ||
5 | |||
6 | Supported chips: | ||
7 | P5020, P5040 | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible: Should contain "fsl,raideng-v1.0" as the value | ||
12 | This identifies RAID Engine block. 1 in 1.0 represents | ||
13 | major number whereas 0 represents minor number. The | ||
14 | version matches the hardware IP version. | ||
15 | - reg: offset and length of the register set for the device | ||
16 | - ranges: standard ranges property specifying the translation | ||
17 | between child address space and parent address space | ||
18 | |||
19 | Example: | ||
20 | /* P5020 */ | ||
21 | raideng: raideng@320000 { | ||
22 | compatible = "fsl,raideng-v1.0"; | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | reg = <0x320000 0x10000>; | ||
26 | ranges = <0 0x320000 0x10000>; | ||
27 | }; | ||
28 | |||
29 | |||
30 | There must be a sub-node for each job queue present in RAID Engine | ||
31 | This node must be a sub-node of the main RAID Engine node | ||
32 | |||
33 | - compatible: Should contain "fsl,raideng-v1.0-job-queue" as the value | ||
34 | This identifies the job queue interface | ||
35 | - reg: offset and length of the register set for job queue | ||
36 | - ranges: standard ranges property specifying the translation | ||
37 | between child address space and parent address space | ||
38 | |||
39 | Example: | ||
40 | /* P5020 */ | ||
41 | raideng_jq0@1000 { | ||
42 | compatible = "fsl,raideng-v1.0-job-queue"; | ||
43 | reg = <0x1000 0x1000>; | ||
44 | ranges = <0x0 0x1000 0x1000>; | ||
45 | }; | ||
46 | |||
47 | |||
48 | There must be a sub-node for each job ring present in RAID Engine | ||
49 | This node must be a sub-node of job queue node | ||
50 | |||
51 | - compatible: Must contain "fsl,raideng-v1.0-job-ring" as the value | ||
52 | This identifies job ring. Should contain either | ||
53 | "fsl,raideng-v1.0-hp-ring" or "fsl,raideng-v1.0-lp-ring" | ||
54 | depending upon whether ring has high or low priority | ||
55 | - reg: offset and length of the register set for job ring | ||
56 | - interrupts: interrupt mapping for job ring IRQ | ||
57 | |||
58 | Optional property: | ||
59 | |||
60 | - fsl,liodn: Specifies the LIODN to be used for Job Ring. This | ||
61 | property is normally set by firmware. Value | ||
62 | is of 12-bits which is the LIODN number for this JR. | ||
63 | This property is used by the IOMMU (PAMU) to distinquish | ||
64 | transactions from this JR and than be able to do address | ||
65 | translation & protection accordingly. | ||
66 | |||
67 | Example: | ||
68 | /* P5020 */ | ||
69 | raideng_jq0@1000 { | ||
70 | compatible = "fsl,raideng-v1.0-job-queue"; | ||
71 | reg = <0x1000 0x1000>; | ||
72 | ranges = <0x0 0x1000 0x1000>; | ||
73 | |||
74 | raideng_jr0: jr@0 { | ||
75 | compatible = "fsl,raideng-v1.0-job-ring", "fsl,raideng-v1.0-hp-ring"; | ||
76 | reg = <0x0 0x400>; | ||
77 | interrupts = <139 2 0 0>; | ||
78 | interrupt-parent = <&mpic>; | ||
79 | fsl,liodn = <0x41>; | ||
80 | }; | ||
81 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt new file mode 100644 index 000000000000..131e8c11d26f --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-tiecap.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | TI SOC ECAP based APWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "ti,am33xx-ecap" | ||
5 | - #pwm-cells: Should be 3. Number of cells being used to specify PWM property. | ||
6 | First cell specifies the per-chip index of the PWM to use, the second | ||
7 | cell is the period in nanoseconds and bit 0 in the third cell is used to | ||
8 | encode the polarity of PWM output. Set bit 0 of the third in PWM specifier | ||
9 | to 1 for inverse polarity & set to 0 for normal polarity. | ||
10 | - reg: physical base address and size of the registers map. | ||
11 | |||
12 | Optional properties: | ||
13 | - ti,hwmods: Name of the hwmod associated to the ECAP: | ||
14 | "ecap<x>", <x> being the 0-based instance number from the HW spec | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ecap0: ecap@0 { | ||
19 | compatible = "ti,am33xx-ecap"; | ||
20 | #pwm-cells = <3>; | ||
21 | reg = <0x48300100 0x80>; | ||
22 | ti,hwmods = "ecap0"; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt new file mode 100644 index 000000000000..4fc7079d822e --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | TI SOC EHRPWM based PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Must be "ti,am33xx-ehrpwm" | ||
5 | - #pwm-cells: Should be 3. Number of cells being used to specify PWM property. | ||
6 | First cell specifies the per-chip index of the PWM to use, the second | ||
7 | cell is the period in nanoseconds and bit 0 in the third cell is used to | ||
8 | encode the polarity of PWM output. Set bit 0 of the third in PWM specifier | ||
9 | to 1 for inverse polarity & set to 0 for normal polarity. | ||
10 | - reg: physical base address and size of the registers map. | ||
11 | |||
12 | Optional properties: | ||
13 | - ti,hwmods: Name of the hwmod associated to the EHRPWM: | ||
14 | "ehrpwm<x>", <x> being the 0-based instance number from the HW spec | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ehrpwm0: ehrpwm@0 { | ||
19 | compatible = "ti,am33xx-ehrpwm"; | ||
20 | #pwm-cells = <3>; | ||
21 | reg = <0x48300200 0x100>; | ||
22 | ti,hwmods = "ehrpwm0"; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt new file mode 100644 index 000000000000..f7eae77f8354 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | TI SOC based PWM Subsystem | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "ti,am33xx-pwmss"; | ||
5 | - reg: physical base address and size of the registers map. | ||
6 | - address-cells: Specify the number of u32 entries needed in child nodes. | ||
7 | Should set to 1. | ||
8 | - size-cells: specify number of u32 entries needed to specify child nodes size | ||
9 | in reg property. Should set to 1. | ||
10 | - ranges: describes the address mapping of a memory-mapped bus. Should set to | ||
11 | physical address map of child's base address, physical address within | ||
12 | parent's address space and length of the address map. For am33xx, | ||
13 | 3 set of child register maps present, ECAP register space, EQEP | ||
14 | register space, EHRPWM register space. | ||
15 | |||
16 | Also child nodes should also populated under PWMSS DT node. | ||
17 | |||
18 | Example: | ||
19 | pwmss0: pwmss@48300000 { | ||
20 | compatible = "ti,am33xx-pwmss"; | ||
21 | reg = <0x48300000 0x10>; | ||
22 | ti,hwmods = "epwmss0"; | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <1>; | ||
25 | status = "disabled"; | ||
26 | ranges = <0x48300100 0x48300100 0x80 /* ECAP */ | ||
27 | 0x48300180 0x48300180 0x80 /* EQEP */ | ||
28 | 0x48300200 0x48300200 0x80>; /* EHRPWM */ | ||
29 | |||
30 | /* child nodes go here */ | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/pwm.txt b/Documentation/devicetree/bindings/pwm/pwm.txt index 73ec962bfe8c..06e67247859a 100644 --- a/Documentation/devicetree/bindings/pwm/pwm.txt +++ b/Documentation/devicetree/bindings/pwm/pwm.txt | |||
@@ -37,10 +37,21 @@ device: | |||
37 | pwm-names = "backlight"; | 37 | pwm-names = "backlight"; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | Note that in the example above, specifying the "pwm-names" is redundant | ||
41 | because the name "backlight" would be used as fallback anyway. | ||
42 | |||
40 | pwm-specifier typically encodes the chip-relative PWM number and the PWM | 43 | pwm-specifier typically encodes the chip-relative PWM number and the PWM |
41 | period in nanoseconds. Note that in the example above, specifying the | 44 | period in nanoseconds. |
42 | "pwm-names" is redundant because the name "backlight" would be used as | 45 | |
43 | fallback anyway. | 46 | Optionally, the pwm-specifier can encode a number of flags in a third cell: |
47 | - bit 0: PWM signal polarity (0: normal polarity, 1: inverse polarity) | ||
48 | |||
49 | Example with optional PWM specifier for inverse polarity | ||
50 | |||
51 | bl: backlight { | ||
52 | pwms = <&pwm 0 5000000 1>; | ||
53 | pwm-names = "backlight"; | ||
54 | }; | ||
44 | 55 | ||
45 | 2) PWM controller nodes | 56 | 2) PWM controller nodes |
46 | ----------------------- | 57 | ----------------------- |
diff --git a/Documentation/devicetree/bindings/pwm/spear-pwm.txt b/Documentation/devicetree/bindings/pwm/spear-pwm.txt new file mode 100644 index 000000000000..3ac779d83386 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/spear-pwm.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | == ST SPEAr SoC PWM controller == | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be one of: | ||
5 | - "st,spear320-pwm" | ||
6 | - "st,spear1340-pwm" | ||
7 | - reg: physical base address and length of the controller's registers | ||
8 | - #pwm-cells: number of cells used to specify PWM which is fixed to 2 on | ||
9 | SPEAr. The first cell specifies the per-chip index of the PWM to use and | ||
10 | the second cell is the period in nanoseconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | pwm: pwm@a8000000 { | ||
15 | compatible ="st,spear320-pwm"; | ||
16 | reg = <0xa8000000 0x1000>; | ||
17 | #pwm-cells = <2>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt new file mode 100644 index 000000000000..2943ee5fce00 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Texas Instruments TWL series PWM drivers | ||
2 | |||
3 | Supported PWMs: | ||
4 | On TWL4030 series: PWM1 and PWM2 | ||
5 | On TWL6030 series: PWM0 and PWM1 | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "ti,twl4030-pwm" or "ti,twl6030-pwm" | ||
9 | - #pwm-cells: should be 2. The first cell specifies the per-chip index | ||
10 | of the PWM to use and the second cell is the period in nanoseconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | twl_pwm: pwm { | ||
15 | compatible = "ti,twl6030-pwm"; | ||
16 | #pwm-cells = <2>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt new file mode 100644 index 000000000000..cb64f3acc10f --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Texas Instruments TWL series PWM drivers connected to LED terminals | ||
2 | |||
3 | Supported PWMs: | ||
4 | On TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB terminals) | ||
5 | On TWL6030 series: LED PWM (mainly used as charging indicator LED) | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "ti,twl4030-pwmled" or "ti,twl6030-pwmled" | ||
9 | - #pwm-cells: should be 2. The first cell specifies the per-chip index | ||
10 | of the PWM to use and the second cell is the period in nanoseconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | twl_pwmled: pwmled { | ||
15 | compatible = "ti,twl6030-pwmled"; | ||
16 | #pwm-cells = <2>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt b/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt new file mode 100644 index 000000000000..bcc63678a9a5 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/vt8500-pwm.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | VIA/Wondermedia VT8500/WM8xxx series SoC PWM controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "via,vt8500-pwm" | ||
5 | - reg: physical base address and length of the controller's registers | ||
6 | - #pwm-cells: should be 2. The first cell specifies the per-chip index | ||
7 | of the PWM to use and the second cell is the period in nanoseconds. | ||
8 | - clocks: phandle to the PWM source clock | ||
9 | |||
10 | Example: | ||
11 | |||
12 | pwm1: pwm@d8220000 { | ||
13 | #pwm-cells = <2>; | ||
14 | compatible = "via,vt8500-pwm"; | ||
15 | reg = <0xd8220000 0x1000>; | ||
16 | clocks = <&clkpwm>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt new file mode 100644 index 000000000000..63c659800c03 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt | |||
@@ -0,0 +1,37 @@ | |||
1 | GPIO controlled regulators | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Must be "regulator-gpio". | ||
5 | - states : Selection of available voltages and GPIO configs. | ||
6 | if there are no states, then use a fixed regulator | ||
7 | |||
8 | Optional properties: | ||
9 | - enable-gpio : GPIO to use to enable/disable the regulator. | ||
10 | - gpios : GPIO group used to control voltage. | ||
11 | - startup-delay-us : Startup time in microseconds. | ||
12 | - enable-active-high : Polarity of GPIO is active high (default is low). | ||
13 | |||
14 | Any property defined as part of the core regulator binding defined in | ||
15 | regulator.txt can also be used. | ||
16 | |||
17 | Example: | ||
18 | |||
19 | mmciv: gpio-regulator { | ||
20 | compatible = "regulator-gpio"; | ||
21 | |||
22 | regulator-name = "mmci-gpio-supply"; | ||
23 | regulator-min-microvolt = <1800000>; | ||
24 | regulator-max-microvolt = <2600000>; | ||
25 | regulator-boot-on; | ||
26 | |||
27 | enable-gpio = <&gpio0 23 0x4>; | ||
28 | gpios = <&gpio0 24 0x4 | ||
29 | &gpio0 25 0x4>; | ||
30 | states = <1800000 0x3 | ||
31 | 2200000 0x2 | ||
32 | 2600000 0x1 | ||
33 | 2900000 0x0>; | ||
34 | |||
35 | startup-delay-us = <100000>; | ||
36 | enable-active-high; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/max8925-regulator.txt b/Documentation/devicetree/bindings/regulator/max8925-regulator.txt new file mode 100644 index 000000000000..0057695aae8f --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/max8925-regulator.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | Max8925 Voltage regulators | ||
2 | |||
3 | Required nodes: | ||
4 | -nodes: | ||
5 | - SDV1 for SDV SDV1 | ||
6 | - SDV2 for SDV SDV2 | ||
7 | - SDV3 for SDV SDV3 | ||
8 | - LDO1 for LDO LDO1 | ||
9 | - LDO2 for LDO LDO2 | ||
10 | - LDO3 for LDO LDO3 | ||
11 | - LDO4 for LDO LDO4 | ||
12 | - LDO5 for LDO LDO5 | ||
13 | - LDO6 for LDO LDO6 | ||
14 | - LDO7 for LDO LDO7 | ||
15 | - LDO8 for LDO LDO8 | ||
16 | - LDO9 for LDO LDO9 | ||
17 | - LDO10 for LDO LDO10 | ||
18 | - LDO11 for LDO LDO11 | ||
19 | - LDO12 for LDO LDO12 | ||
20 | - LDO13 for LDO LDO13 | ||
21 | - LDO14 for LDO LDO14 | ||
22 | - LDO15 for LDO LDO15 | ||
23 | - LDO16 for LDO LDO16 | ||
24 | - LDO17 for LDO LDO17 | ||
25 | - LDO18 for LDO LDO18 | ||
26 | - LDO19 for LDO LDO19 | ||
27 | - LDO20 for LDO LDO20 | ||
28 | |||
29 | Optional properties: | ||
30 | - Any optional property defined in bindings/regulator/regulator.txt | ||
31 | |||
32 | Example: | ||
33 | |||
34 | SDV1 { | ||
35 | regulator-min-microvolt = <637500>; | ||
36 | regulator-max-microvolt = <1425000>; | ||
37 | regulator-boot-on; | ||
38 | regulator-always-on; | ||
39 | }; | ||
40 | |||
diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt new file mode 100644 index 000000000000..9fd69a18b0ba --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt | |||
@@ -0,0 +1,146 @@ | |||
1 | * Maxim MAX8997 Voltage and Current Regulator | ||
2 | |||
3 | The Maxim MAX8997 is a multi-function device which includes volatage and | ||
4 | current regulators, rtc, charger controller and other sub-blocks. It is | ||
5 | interfaced to the host controller using a i2c interface. Each sub-block is | ||
6 | addressed by the host system using different i2c slave address. This document | ||
7 | describes the bindings for 'pmic' sub-block of max8997. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible: Should be "maxim,max8997-pmic". | ||
11 | - reg: Specifies the i2c slave address of the pmic block. It should be 0x66. | ||
12 | |||
13 | - max8997,pmic-buck1-dvs-voltage: A set of 8 voltage values in micro-volt (uV) | ||
14 | units for buck1 when changing voltage using gpio dvs. Refer to [1] below | ||
15 | for additional information. | ||
16 | |||
17 | - max8997,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV) | ||
18 | units for buck2 when changing voltage using gpio dvs. Refer to [1] below | ||
19 | for additional information. | ||
20 | |||
21 | - max8997,pmic-buck5-dvs-voltage: A set of 8 voltage values in micro-volt (uV) | ||
22 | units for buck5 when changing voltage using gpio dvs. Refer to [1] below | ||
23 | for additional information. | ||
24 | |||
25 | [1] If none of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional | ||
26 | property is specified, the 'max8997,pmic-buck[1/2/5]-dvs-voltage' | ||
27 | property should specify atleast one voltage level (which would be a | ||
28 | safe operating voltage). | ||
29 | |||
30 | If either of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional | ||
31 | property is specified, then all the eigth voltage values for the | ||
32 | 'max8997,pmic-buck[1/2/5]-dvs-voltage' should be specified. | ||
33 | |||
34 | Optional properties: | ||
35 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | ||
36 | the interrupts from max8997 are delivered to. | ||
37 | - interrupts: Interrupt specifiers for two interrupt sources. | ||
38 | - First interrupt specifier is for 'irq1' interrupt. | ||
39 | - Second interrupt specifier is for 'alert' interrupt. | ||
40 | - max8997,pmic-buck1-uses-gpio-dvs: 'buck1' can be controlled by gpio dvs. | ||
41 | - max8997,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs. | ||
42 | - max8997,pmic-buck5-uses-gpio-dvs: 'buck5' can be controlled by gpio dvs. | ||
43 | |||
44 | Additional properties required if either of the optional properties are used: | ||
45 | - max8997,pmic-ignore-gpiodvs-side-effect: When GPIO-DVS mode is used for | ||
46 | multiple bucks, changing the voltage value of one of the bucks may affect | ||
47 | that of another buck, which is the side effect of the change (set_voltage). | ||
48 | Use this property to ignore such side effects and change the voltage. | ||
49 | |||
50 | - max8997,pmic-buck125-default-dvs-idx: Default voltage setting selected from | ||
51 | the possible 8 options selectable by the dvs gpios. The value of this | ||
52 | property should be between 0 and 7. If not specified or if out of range, the | ||
53 | default value of this property is set to 0. | ||
54 | |||
55 | - max8997,pmic-buck125-dvs-gpios: GPIO specifiers for three host gpio's used | ||
56 | for dvs. The format of the gpio specifier depends in the gpio controller. | ||
57 | |||
58 | Regulators: The regulators of max8997 that have to be instantiated should be | ||
59 | included in a sub-node named 'regulators'. Regulator nodes included in this | ||
60 | sub-node should be of the format as listed below. | ||
61 | |||
62 | regulator_name { | ||
63 | standard regulator bindings here | ||
64 | }; | ||
65 | |||
66 | The following are the names of the regulators that the max8997 pmic block | ||
67 | supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number | ||
68 | as per the datasheet of max8997. | ||
69 | |||
70 | - LDOn | ||
71 | - valid values for n are 1 to 18 and 21 | ||
72 | - Example: LDO0, LD01, LDO2, LDO21 | ||
73 | - BUCKn | ||
74 | - valid values for n are 1 to 7. | ||
75 | - Example: BUCK1, BUCK2, BUCK3, BUCK7 | ||
76 | |||
77 | - ENVICHG: Battery Charging Current Monitor Output. This is a fixed | ||
78 | voltage type regulator | ||
79 | |||
80 | - ESAFEOUT1: (ldo19) | ||
81 | - ESAFEOUT2: (ld020) | ||
82 | |||
83 | - CHARGER_CV: main battery charger voltage control | ||
84 | - CHARGER: main battery charger current control | ||
85 | - CHARGER_TOPOFF: end of charge current threshold level | ||
86 | |||
87 | The bindings inside the regulator nodes use the standard regulator bindings | ||
88 | which are documented elsewhere. | ||
89 | |||
90 | Example: | ||
91 | |||
92 | max8997_pmic@66 { | ||
93 | compatible = "maxim,max8997-pmic"; | ||
94 | interrupt-parent = <&wakeup_eint>; | ||
95 | reg = <0x66>; | ||
96 | interrupts = <4 0>, <3 0>; | ||
97 | |||
98 | max8997,pmic-buck1-uses-gpio-dvs; | ||
99 | max8997,pmic-buck2-uses-gpio-dvs; | ||
100 | max8997,pmic-buck5-uses-gpio-dvs; | ||
101 | |||
102 | max8997,pmic-ignore-gpiodvs-side-effect; | ||
103 | max8997,pmic-buck125-default-dvs-idx = <0>; | ||
104 | |||
105 | max8997,pmic-buck125-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */ | ||
106 | <&gpx0 1 1 0 0>, /* SET2 */ | ||
107 | <&gpx0 2 1 0 0>; /* SET3 */ | ||
108 | |||
109 | max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>, | ||
110 | <1250000>, <1200000>, | ||
111 | <1150000>, <1100000>, | ||
112 | <1000000>, <950000>; | ||
113 | |||
114 | max8997,pmic-buck2-dvs-voltage = <1100000>, <1100000>, | ||
115 | <1100000>, <1100000>, | ||
116 | <1000000>, <1000000>, | ||
117 | <1000000>, <1000000>; | ||
118 | |||
119 | max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>, | ||
120 | <1200000>, <1200000>, | ||
121 | <1200000>, <1200000>, | ||
122 | <1200000>, <1200000>; | ||
123 | |||
124 | regulators { | ||
125 | ldo1_reg: LDO1 { | ||
126 | regulator-name = "VDD_ABB_3.3V"; | ||
127 | regulator-min-microvolt = <3300000>; | ||
128 | regulator-max-microvolt = <3300000>; | ||
129 | }; | ||
130 | |||
131 | ldo2_reg: LDO2 { | ||
132 | regulator-name = "VDD_ALIVE_1.1V"; | ||
133 | regulator-min-microvolt = <1100000>; | ||
134 | regulator-max-microvolt = <1100000>; | ||
135 | regulator-always-on; | ||
136 | }; | ||
137 | |||
138 | buck1_reg: BUCK1 { | ||
139 | regulator-name = "VDD_ARM_1.2V"; | ||
140 | regulator-min-microvolt = <950000>; | ||
141 | regulator-max-microvolt = <1350000>; | ||
142 | regulator-always-on; | ||
143 | regulator-boot-on; | ||
144 | }; | ||
145 | }; | ||
146 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/tps65217.txt b/Documentation/devicetree/bindings/regulator/tps65217.txt index d316fb895daf..4f05d208c95c 100644 --- a/Documentation/devicetree/bindings/regulator/tps65217.txt +++ b/Documentation/devicetree/bindings/regulator/tps65217.txt | |||
@@ -11,6 +11,9 @@ Required properties: | |||
11 | using the standard binding for regulators found at | 11 | using the standard binding for regulators found at |
12 | Documentation/devicetree/bindings/regulator/regulator.txt. | 12 | Documentation/devicetree/bindings/regulator/regulator.txt. |
13 | 13 | ||
14 | Optional properties: | ||
15 | - ti,pmic-shutdown-controller: Telling the PMIC to shutdown on PWR_EN toggle. | ||
16 | |||
14 | The valid names for regulators are: | 17 | The valid names for regulators are: |
15 | tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4 | 18 | tps65217: dcdc1, dcdc2, dcdc3, ldo1, ldo2, ldo3 and ldo4 |
16 | 19 | ||
@@ -20,6 +23,7 @@ Example: | |||
20 | 23 | ||
21 | tps: tps@24 { | 24 | tps: tps@24 { |
22 | compatible = "ti,tps65217"; | 25 | compatible = "ti,tps65217"; |
26 | ti,pmic-shutdown-controller; | ||
23 | 27 | ||
24 | regulators { | 28 | regulators { |
25 | dcdc1_reg: dcdc1 { | 29 | dcdc1_reg: dcdc1 { |
diff --git a/Documentation/devicetree/bindings/regulator/vexpress.txt b/Documentation/devicetree/bindings/regulator/vexpress.txt new file mode 100644 index 000000000000..d775f72487aa --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/vexpress.txt | |||
@@ -0,0 +1,32 @@ | |||
1 | Versatile Express voltage regulators | ||
2 | ------------------------------------ | ||
3 | |||
4 | Requires node properties: | ||
5 | - "compatible" value: "arm,vexpress-volt" | ||
6 | - "arm,vexpress-sysreg,func" when controlled via vexpress-sysreg | ||
7 | (see Documentation/devicetree/bindings/arm/vexpress-sysreg.txt | ||
8 | for more details) | ||
9 | |||
10 | Required regulator properties: | ||
11 | - "regulator-name" | ||
12 | - "regulator-always-on" | ||
13 | |||
14 | Optional regulator properties: | ||
15 | - "regulator-min-microvolt" | ||
16 | - "regulator-max-microvolt" | ||
17 | |||
18 | See Documentation/devicetree/bindings/regulator/regulator.txt | ||
19 | for more details about the regulator properties. | ||
20 | |||
21 | When no "regulator-[min|max]-microvolt" properties are defined, | ||
22 | the device is treated as fixed (or rather "read-only") regulator. | ||
23 | |||
24 | Example: | ||
25 | volt@0 { | ||
26 | compatible = "arm,vexpress-volt"; | ||
27 | arm,vexpress-sysreg,func = <2 0>; | ||
28 | regulator-name = "Cores"; | ||
29 | regulator-min-microvolt = <800000>; | ||
30 | regulator-max-microvolt = <1050000>; | ||
31 | regulator-always-on; | ||
32 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt new file mode 100644 index 000000000000..c9d80d7da141 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | * i.MX25 Real Time Clock controller | ||
2 | |||
3 | This binding supports the following chips: i.MX25, i.MX53 | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: should be: "fsl,imx25-rtc" | ||
7 | - reg: physical base address of the controller and length of memory mapped | ||
8 | region. | ||
9 | - interrupts: rtc alarm interrupt | ||
10 | |||
11 | Example: | ||
12 | |||
13 | rtc@80056000 { | ||
14 | compatible = "fsl,imx53-rtc", "fsl,imx25-rtc"; | ||
15 | reg = <0x80056000 2000>; | ||
16 | interrupts = <29>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt new file mode 100644 index 000000000000..b47aa415c820 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | TI Real Time Clock | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,da830-rtc" | ||
5 | - reg: Address range of rtc register set | ||
6 | - interrupts: rtc timer, alarm interrupts in order | ||
7 | - interrupt-parent: phandle for the interrupt controller | ||
8 | |||
9 | Example: | ||
10 | |||
11 | rtc@1c23000 { | ||
12 | compatible = "ti,da830-rtc"; | ||
13 | reg = <0x23000 0x1000>; | ||
14 | interrupts = <19 | ||
15 | 19>; | ||
16 | interrupt-parent = <&intc>; | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt new file mode 100644 index 000000000000..7b53da5cb75b --- /dev/null +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-sflash.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | NVIDIA Tegra20 SFLASH controller. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "nvidia,tegra20-sflash". | ||
5 | - reg: Should contain SFLASH registers location and length. | ||
6 | - interrupts: Should contain SFLASH interrupts. | ||
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | ||
8 | request selector for this SFLASH controller. | ||
9 | |||
10 | Recommended properties: | ||
11 | - spi-max-frequency: Definition as per | ||
12 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
13 | |||
14 | Example: | ||
15 | |||
16 | spi@7000c380 { | ||
17 | compatible = "nvidia,tegra20-sflash"; | ||
18 | reg = <0x7000c380 0x80>; | ||
19 | interrupts = <0 39 0x04>; | ||
20 | nvidia,dma-request-selector = <&apbdma 16>; | ||
21 | spi-max-frequency = <25000000>; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | status = "disabled"; | ||
25 | }; | ||
26 | |||
diff --git a/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt new file mode 100644 index 000000000000..eefe15e3d95e --- /dev/null +++ b/Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | NVIDIA Tegra20/Tegra30 SLINK controller. | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "nvidia,tegra20-slink", "nvidia,tegra30-slink". | ||
5 | - reg: Should contain SLINK registers location and length. | ||
6 | - interrupts: Should contain SLINK interrupts. | ||
7 | - nvidia,dma-request-selector : The Tegra DMA controller's phandle and | ||
8 | request selector for this SLINK controller. | ||
9 | |||
10 | Recommended properties: | ||
11 | - spi-max-frequency: Definition as per | ||
12 | Documentation/devicetree/bindings/spi/spi-bus.txt | ||
13 | |||
14 | Example: | ||
15 | |||
16 | spi@7000d600 { | ||
17 | compatible = "nvidia,tegra20-slink"; | ||
18 | reg = <0x7000d600 0x200>; | ||
19 | interrupts = <0 82 0x04>; | ||
20 | nvidia,dma-request-selector = <&apbdma 16>; | ||
21 | spi-max-frequency = <25000000>; | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | status = "disabled"; | ||
25 | }; | ||
26 | |||
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt index 81df374adbb9..938809c6829b 100644 --- a/Documentation/devicetree/bindings/spi/omap-spi.txt +++ b/Documentation/devicetree/bindings/spi/omap-spi.txt | |||
@@ -6,7 +6,9 @@ Required properties: | |||
6 | - "ti,omap4-spi" for OMAP4+. | 6 | - "ti,omap4-spi" for OMAP4+. |
7 | - ti,spi-num-cs : Number of chipselect supported by the instance. | 7 | - ti,spi-num-cs : Number of chipselect supported by the instance. |
8 | - ti,hwmods: Name of the hwmod associated to the McSPI | 8 | - ti,hwmods: Name of the hwmod associated to the McSPI |
9 | 9 | - ti,pindir-d0-out-d1-in: Select the D0 pin as output and D1 as | |
10 | input. The default is D0 as input and | ||
11 | D1 as output. | ||
10 | 12 | ||
11 | Example: | 13 | Example: |
12 | 14 | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt index d2c33d0f533e..296015e3c632 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt | |||
@@ -12,6 +12,7 @@ The SPI master node requires the following properties: | |||
12 | - #size-cells - should be zero. | 12 | - #size-cells - should be zero. |
13 | - compatible - name of SPI bus controller following generic names | 13 | - compatible - name of SPI bus controller following generic names |
14 | recommended practice. | 14 | recommended practice. |
15 | - cs-gpios - (optional) gpios chip select. | ||
15 | No other properties are required in the SPI bus node. It is assumed | 16 | No other properties are required in the SPI bus node. It is assumed |
16 | that a driver for an SPI bus device will understand that it is an SPI bus. | 17 | that a driver for an SPI bus device will understand that it is an SPI bus. |
17 | However, the binding does not attempt to define the specific method for | 18 | However, the binding does not attempt to define the specific method for |
@@ -24,6 +25,22 @@ support describing the chip select layout. | |||
24 | Optional property: | 25 | Optional property: |
25 | - num-cs : total number of chipselects | 26 | - num-cs : total number of chipselects |
26 | 27 | ||
28 | If cs-gpios is used the number of chip select will automatically increased | ||
29 | with max(cs-gpios > hw cs) | ||
30 | |||
31 | So if for example the controller has 2 CS lines, and the cs-gpios | ||
32 | property looks like this: | ||
33 | |||
34 | cs-gpios = <&gpio1 0 0> <0> <&gpio1 1 0> <&gpio1 2 0>; | ||
35 | |||
36 | Then it should be configured so that num_chipselect = 4 with the | ||
37 | following mapping: | ||
38 | |||
39 | cs0 : &gpio1 0 0 | ||
40 | cs1 : native | ||
41 | cs2 : &gpio1 1 0 | ||
42 | cs3 : &gpio1 2 0 | ||
43 | |||
27 | SPI slave nodes must be children of the SPI master node and can | 44 | SPI slave nodes must be children of the SPI master node and can |
28 | contain the following properties. | 45 | contain the following properties. |
29 | - reg - (required) chip select address of device. | 46 | - reg - (required) chip select address of device. |
@@ -36,6 +53,11 @@ contain the following properties. | |||
36 | shifted clock phase (CPHA) mode | 53 | shifted clock phase (CPHA) mode |
37 | - spi-cs-high - (optional) Empty property indicating device requires | 54 | - spi-cs-high - (optional) Empty property indicating device requires |
38 | chip select active high | 55 | chip select active high |
56 | - spi-3wire - (optional) Empty property indicating device requires | ||
57 | 3-wire mode. | ||
58 | |||
59 | If a gpio chipselect is used for the SPI slave the gpio number will be passed | ||
60 | via the cs_gpio | ||
39 | 61 | ||
40 | SPI example for an MPC5200 SPI bus: | 62 | SPI example for an MPC5200 SPI bus: |
41 | spi@f00 { | 63 | spi@f00 { |
diff --git a/Documentation/devicetree/bindings/spi/spi_atmel.txt b/Documentation/devicetree/bindings/spi/spi_atmel.txt new file mode 100644 index 000000000000..07e04cdc0c9e --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi_atmel.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Atmel SPI device | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "atmel,at91rm9200-spi". | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - interrupts: Should contain spi interrupt | ||
7 | - cs-gpios: chipselects | ||
8 | |||
9 | Example: | ||
10 | |||
11 | spi1: spi@fffcc000 { | ||
12 | compatible = "atmel,at91rm9200-spi"; | ||
13 | reg = <0xfffcc000 0x4000>; | ||
14 | interrupts = <13 4 5>; | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <0>; | ||
17 | cs-gpios = <&pioB 3 0>; | ||
18 | status = "okay"; | ||
19 | |||
20 | mmc-slot@0 { | ||
21 | compatible = "mmc-spi-slot"; | ||
22 | reg = <0>; | ||
23 | gpios = <&pioC 4 0>; /* CD */ | ||
24 | spi-max-frequency = <25000000>; | ||
25 | }; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt new file mode 100644 index 000000000000..c60da67a5d76 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt | |||
@@ -0,0 +1,80 @@ | |||
1 | The Exynos display port interface should be configured based on | ||
2 | the type of panel connected to it. | ||
3 | |||
4 | We use two nodes: | ||
5 | -dp-controller node | ||
6 | -dptx-phy node(defined inside dp-controller node) | ||
7 | |||
8 | For the DP-PHY initialization, we use the dptx-phy node. | ||
9 | Required properties for dptx-phy: | ||
10 | -reg: | ||
11 | Base address of DP PHY register. | ||
12 | -samsung,enable-mask: | ||
13 | The bit-mask used to enable/disable DP PHY. | ||
14 | |||
15 | For the Panel initialization, we read data from dp-controller node. | ||
16 | Required properties for dp-controller: | ||
17 | -compatible: | ||
18 | should be "samsung,exynos5-dp". | ||
19 | -reg: | ||
20 | physical base address of the controller and length | ||
21 | of memory mapped region. | ||
22 | -interrupts: | ||
23 | interrupt combiner values. | ||
24 | -interrupt-parent: | ||
25 | phandle to Interrupt combiner node. | ||
26 | -samsung,color-space: | ||
27 | input video data format. | ||
28 | COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 | ||
29 | -samsung,dynamic-range: | ||
30 | dynamic range for input video data. | ||
31 | VESA = 0, CEA = 1 | ||
32 | -samsung,ycbcr-coeff: | ||
33 | YCbCr co-efficients for input video. | ||
34 | COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1 | ||
35 | -samsung,color-depth: | ||
36 | number of bits per colour component. | ||
37 | COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3 | ||
38 | -samsung,link-rate: | ||
39 | link rate supported by the panel. | ||
40 | LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A | ||
41 | -samsung,lane-count: | ||
42 | number of lanes supported by the panel. | ||
43 | LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 | ||
44 | |||
45 | Optional properties for dp-controller: | ||
46 | -interlaced: | ||
47 | interlace scan mode. | ||
48 | Progressive if defined, Interlaced if not defined | ||
49 | -vsync-active-high: | ||
50 | VSYNC polarity configuration. | ||
51 | High if defined, Low if not defined | ||
52 | -hsync-active-high: | ||
53 | HSYNC polarity configuration. | ||
54 | High if defined, Low if not defined | ||
55 | |||
56 | Example: | ||
57 | |||
58 | SOC specific portion: | ||
59 | dp-controller { | ||
60 | compatible = "samsung,exynos5-dp"; | ||
61 | reg = <0x145b0000 0x10000>; | ||
62 | interrupts = <10 3>; | ||
63 | interrupt-parent = <&combiner>; | ||
64 | |||
65 | dptx-phy { | ||
66 | reg = <0x10040720>; | ||
67 | samsung,enable-mask = <1>; | ||
68 | }; | ||
69 | |||
70 | }; | ||
71 | |||
72 | Board Specific portion: | ||
73 | dp-controller { | ||
74 | samsung,color-space = <0>; | ||
75 | samsung,dynamic-range = <0>; | ||
76 | samsung,ycbcr-coeff = <0>; | ||
77 | samsung,color-depth = <1>; | ||
78 | samsung,link-rate = <0x0a>; | ||
79 | samsung,lane-count = <4>; | ||
80 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/video/ssd1307fb.txt new file mode 100644 index 000000000000..3d0060cff062 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * Solomon SSD1307 Framebuffer Driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for | ||
5 | now is i2c. | ||
6 | - reg: Should contain address of the controller on the I2C bus. Most likely | ||
7 | 0x3c or 0x3d | ||
8 | - pwm: Should contain the pwm to use according to the OF device tree PWM | ||
9 | specification [0] | ||
10 | - reset-gpios: Should contain the GPIO used to reset the OLED display | ||
11 | |||
12 | Optional properties: | ||
13 | - reset-active-low: Is the reset gpio is active on physical low? | ||
14 | |||
15 | [0]: Documentation/devicetree/bindings/pwm/pwm.txt | ||
16 | |||
17 | Examples: | ||
18 | ssd1307: oled@3c { | ||
19 | compatible = "solomon,ssd1307fb-i2c"; | ||
20 | reg = <0x3c>; | ||
21 | pwms = <&pwm 4 3000>; | ||
22 | reset-gpios = <&gpio2 7>; | ||
23 | reset-active-low; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt new file mode 100644 index 000000000000..75558ccd9a05 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | DaVinci Watchdog Timer (WDT) Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "ti,davinci-wdt" | ||
5 | - reg : Should contain WDT registers location and length | ||
6 | |||
7 | Examples: | ||
8 | |||
9 | wdt: wdt@2320000 { | ||
10 | compatible = "ti,davinci-wdt"; | ||
11 | reg = <0x02320000 0x80>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt new file mode 100644 index 000000000000..80a37193c0b8 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | Device tree bindings for twl4030-wdt driver (TWL4030 watchdog) | ||
2 | |||
3 | Required properties: | ||
4 | compatible = "ti,twl4030-wdt"; | ||
5 | |||
6 | Example: | ||
7 | |||
8 | watchdog { | ||
9 | compatible = "ti,twl4030-wdt"; | ||
10 | }; | ||
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 8c624a18f67d..8042050eb265 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX | |||
@@ -38,6 +38,8 @@ dnotify_test.c | |||
38 | - example program for dnotify | 38 | - example program for dnotify |
39 | ecryptfs.txt | 39 | ecryptfs.txt |
40 | - docs on eCryptfs: stacked cryptographic filesystem for Linux. | 40 | - docs on eCryptfs: stacked cryptographic filesystem for Linux. |
41 | efivarfs.txt | ||
42 | - info for the efivarfs filesystem. | ||
41 | exofs.txt | 43 | exofs.txt |
42 | - info, usage, mount options, design about EXOFS. | 44 | - info, usage, mount options, design about EXOFS. |
43 | ext2.txt | 45 | ext2.txt |
@@ -48,6 +50,8 @@ ext4.txt | |||
48 | - info, mount options and specifications for the Ext4 filesystem. | 50 | - info, mount options and specifications for the Ext4 filesystem. |
49 | files.txt | 51 | files.txt |
50 | - info on file management in the Linux kernel. | 52 | - info on file management in the Linux kernel. |
53 | f2fs.txt | ||
54 | - info and mount options for the F2FS filesystem. | ||
51 | fuse.txt | 55 | fuse.txt |
52 | - info on the Filesystem in User SpacE including mount options. | 56 | - info on the Filesystem in User SpacE including mount options. |
53 | gfs2.txt | 57 | gfs2.txt |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index e540a24e5d06..f48e0c6b4c42 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -80,7 +80,6 @@ rename: yes (all) (see below) | |||
80 | readlink: no | 80 | readlink: no |
81 | follow_link: no | 81 | follow_link: no |
82 | put_link: no | 82 | put_link: no |
83 | truncate: yes (see below) | ||
84 | setattr: yes | 83 | setattr: yes |
85 | permission: no (may not block if called in rcu-walk mode) | 84 | permission: no (may not block if called in rcu-walk mode) |
86 | get_acl: no | 85 | get_acl: no |
@@ -96,11 +95,6 @@ atomic_open: yes | |||
96 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 95 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
97 | victim. | 96 | victim. |
98 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. | 97 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. |
99 | ->truncate() is never called directly - it's a callback, not a | ||
100 | method. It's called by vmtruncate() - deprecated library function used by | ||
101 | ->setattr(). Locking information above applies to that call (i.e. is | ||
102 | inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been | ||
103 | passed). | ||
104 | 98 | ||
105 | See Documentation/filesystems/directory-locking for more detailed discussion | 99 | See Documentation/filesystems/directory-locking for more detailed discussion |
106 | of the locking scheme for directory operations. | 100 | of the locking scheme for directory operations. |
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt index 382d52cdaf2d..d78bab9622c6 100644 --- a/Documentation/filesystems/caching/backend-api.txt +++ b/Documentation/filesystems/caching/backend-api.txt | |||
@@ -308,6 +308,18 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
308 | obtained by calling object->cookie->def->get_aux()/get_attr(). | 308 | obtained by calling object->cookie->def->get_aux()/get_attr(). |
309 | 309 | ||
310 | 310 | ||
311 | (*) Invalidate data object [mandatory]: | ||
312 | |||
313 | int (*invalidate_object)(struct fscache_operation *op) | ||
314 | |||
315 | This is called to invalidate a data object (as pointed to by op->object). | ||
316 | All the data stored for this object should be discarded and an | ||
317 | attr_changed operation should be performed. The caller will follow up | ||
318 | with an object update operation. | ||
319 | |||
320 | fscache_op_complete() must be called on op before returning. | ||
321 | |||
322 | |||
311 | (*) Discard object [mandatory]: | 323 | (*) Discard object [mandatory]: |
312 | 324 | ||
313 | void (*drop_object)(struct fscache_object *object) | 325 | void (*drop_object)(struct fscache_object *object) |
@@ -419,7 +431,10 @@ performed on the denizens of the cache. These are held in a structure of type: | |||
419 | 431 | ||
420 | If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS | 432 | If an I/O error occurs, fscache_io_error() should be called and -ENOBUFS |
421 | returned if possible or fscache_end_io() called with a suitable error | 433 | returned if possible or fscache_end_io() called with a suitable error |
422 | code.. | 434 | code. |
435 | |||
436 | fscache_put_retrieval() should be called after a page or pages are dealt | ||
437 | with. This will complete the operation when all pages are dealt with. | ||
423 | 438 | ||
424 | 439 | ||
425 | (*) Request pages be read from cache [mandatory]: | 440 | (*) Request pages be read from cache [mandatory]: |
@@ -526,6 +541,27 @@ FS-Cache provides some utilities that a cache backend may make use of: | |||
526 | error value should be 0 if successful and an error otherwise. | 541 | error value should be 0 if successful and an error otherwise. |
527 | 542 | ||
528 | 543 | ||
544 | (*) Record that one or more pages being retrieved or allocated have been dealt | ||
545 | with: | ||
546 | |||
547 | void fscache_retrieval_complete(struct fscache_retrieval *op, | ||
548 | int n_pages); | ||
549 | |||
550 | This is called to record the fact that one or more pages have been dealt | ||
551 | with and are no longer the concern of this operation. When the number of | ||
552 | pages remaining in the operation reaches 0, the operation will be | ||
553 | completed. | ||
554 | |||
555 | |||
556 | (*) Record operation completion: | ||
557 | |||
558 | void fscache_op_complete(struct fscache_operation *op); | ||
559 | |||
560 | This is called to record the completion of an operation. This deducts | ||
561 | this operation from the parent object's run state, potentially permitting | ||
562 | one or more pending operations to start running. | ||
563 | |||
564 | |||
529 | (*) Set highest store limit: | 565 | (*) Set highest store limit: |
530 | 566 | ||
531 | void fscache_set_store_limit(struct fscache_object *object, | 567 | void fscache_set_store_limit(struct fscache_object *object, |
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt index 7cc6bf2871eb..97e6c0ecc5ef 100644 --- a/Documentation/filesystems/caching/netfs-api.txt +++ b/Documentation/filesystems/caching/netfs-api.txt | |||
@@ -35,8 +35,9 @@ This document contains the following sections: | |||
35 | (12) Index and data file update | 35 | (12) Index and data file update |
36 | (13) Miscellaneous cookie operations | 36 | (13) Miscellaneous cookie operations |
37 | (14) Cookie unregistration | 37 | (14) Cookie unregistration |
38 | (15) Index and data file invalidation | 38 | (15) Index invalidation |
39 | (16) FS-Cache specific page flags. | 39 | (16) Data file invalidation |
40 | (17) FS-Cache specific page flags. | ||
40 | 41 | ||
41 | 42 | ||
42 | ============================= | 43 | ============================= |
@@ -767,13 +768,42 @@ the cookies for "child" indices, objects and pages have been relinquished | |||
767 | first. | 768 | first. |
768 | 769 | ||
769 | 770 | ||
770 | ================================ | 771 | ================== |
771 | INDEX AND DATA FILE INVALIDATION | 772 | INDEX INVALIDATION |
772 | ================================ | 773 | ================== |
774 | |||
775 | There is no direct way to invalidate an index subtree. To do this, the caller | ||
776 | should relinquish and retire the cookie they have, and then acquire a new one. | ||
777 | |||
778 | |||
779 | ====================== | ||
780 | DATA FILE INVALIDATION | ||
781 | ====================== | ||
782 | |||
783 | Sometimes it will be necessary to invalidate an object that contains data. | ||
784 | Typically this will be necessary when the server tells the netfs of a foreign | ||
785 | change - at which point the netfs has to throw away all the state it had for an | ||
786 | inode and reload from the server. | ||
787 | |||
788 | To indicate that a cache object should be invalidated, the following function | ||
789 | can be called: | ||
790 | |||
791 | void fscache_invalidate(struct fscache_cookie *cookie); | ||
792 | |||
793 | This can be called with spinlocks held as it defers the work to a thread pool. | ||
794 | All extant storage, retrieval and attribute change ops at this point are | ||
795 | cancelled and discarded. Some future operations will be rejected until the | ||
796 | cache has had a chance to insert a barrier in the operations queue. After | ||
797 | that, operations will be queued again behind the invalidation operation. | ||
798 | |||
799 | The invalidation operation will perform an attribute change operation and an | ||
800 | auxiliary data update operation as it is very likely these will have changed. | ||
801 | |||
802 | Using the following function, the netfs can wait for the invalidation operation | ||
803 | to have reached a point at which it can start submitting ordinary operations | ||
804 | once again: | ||
773 | 805 | ||
774 | There is no direct way to invalidate an index subtree or a data file. To do | 806 | void fscache_wait_on_invalidate(struct fscache_cookie *cookie); |
775 | this, the caller should relinquish and retire the cookie they have, and then | ||
776 | acquire a new one. | ||
777 | 807 | ||
778 | 808 | ||
779 | =========================== | 809 | =========================== |
diff --git a/Documentation/filesystems/caching/object.txt b/Documentation/filesystems/caching/object.txt index 58313348da87..100ff41127e4 100644 --- a/Documentation/filesystems/caching/object.txt +++ b/Documentation/filesystems/caching/object.txt | |||
@@ -216,7 +216,14 @@ servicing netfs requests: | |||
216 | The normal running state. In this state, requests the netfs makes will be | 216 | The normal running state. In this state, requests the netfs makes will be |
217 | passed on to the cache. | 217 | passed on to the cache. |
218 | 218 | ||
219 | (6) State FSCACHE_OBJECT_UPDATING. | 219 | (6) State FSCACHE_OBJECT_INVALIDATING. |
220 | |||
221 | The object is undergoing invalidation. When the state comes here, it | ||
222 | discards all pending read, write and attribute change operations as it is | ||
223 | going to clear out the cache entirely and reinitialise it. It will then | ||
224 | continue to the FSCACHE_OBJECT_UPDATING state. | ||
225 | |||
226 | (7) State FSCACHE_OBJECT_UPDATING. | ||
220 | 227 | ||
221 | The state machine comes here to update the object in the cache from the | 228 | The state machine comes here to update the object in the cache from the |
222 | netfs's records. This involves updating the auxiliary data that is used | 229 | netfs's records. This involves updating the auxiliary data that is used |
@@ -225,13 +232,13 @@ servicing netfs requests: | |||
225 | And there are terminal states in which an object cleans itself up, deallocates | 232 | And there are terminal states in which an object cleans itself up, deallocates |
226 | memory and potentially deletes stuff from disk: | 233 | memory and potentially deletes stuff from disk: |
227 | 234 | ||
228 | (7) State FSCACHE_OBJECT_LC_DYING. | 235 | (8) State FSCACHE_OBJECT_LC_DYING. |
229 | 236 | ||
230 | The object comes here if it is dying because of a lookup or creation | 237 | The object comes here if it is dying because of a lookup or creation |
231 | error. This would be due to a disk error or system error of some sort. | 238 | error. This would be due to a disk error or system error of some sort. |
232 | Temporary data is cleaned up, and the parent is released. | 239 | Temporary data is cleaned up, and the parent is released. |
233 | 240 | ||
234 | (8) State FSCACHE_OBJECT_DYING. | 241 | (9) State FSCACHE_OBJECT_DYING. |
235 | 242 | ||
236 | The object comes here if it is dying due to an error, because its parent | 243 | The object comes here if it is dying due to an error, because its parent |
237 | cookie has been relinquished by the netfs or because the cache is being | 244 | cookie has been relinquished by the netfs or because the cache is being |
@@ -241,27 +248,27 @@ memory and potentially deletes stuff from disk: | |||
241 | can destroy themselves. This object waits for all its children to go away | 248 | can destroy themselves. This object waits for all its children to go away |
242 | before advancing to the next state. | 249 | before advancing to the next state. |
243 | 250 | ||
244 | (9) State FSCACHE_OBJECT_ABORT_INIT. | 251 | (10) State FSCACHE_OBJECT_ABORT_INIT. |
245 | 252 | ||
246 | The object comes to this state if it was waiting on its parent in | 253 | The object comes to this state if it was waiting on its parent in |
247 | FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself | 254 | FSCACHE_OBJECT_INIT, but its parent died. The object will destroy itself |
248 | so that the parent may proceed from the FSCACHE_OBJECT_DYING state. | 255 | so that the parent may proceed from the FSCACHE_OBJECT_DYING state. |
249 | 256 | ||
250 | (10) State FSCACHE_OBJECT_RELEASING. | 257 | (11) State FSCACHE_OBJECT_RELEASING. |
251 | (11) State FSCACHE_OBJECT_RECYCLING. | 258 | (12) State FSCACHE_OBJECT_RECYCLING. |
252 | 259 | ||
253 | The object comes to one of these two states when dying once it is rid of | 260 | The object comes to one of these two states when dying once it is rid of |
254 | all its children, if it is dying because the netfs relinquished its | 261 | all its children, if it is dying because the netfs relinquished its |
255 | cookie. In the first state, the cached data is expected to persist, and | 262 | cookie. In the first state, the cached data is expected to persist, and |
256 | in the second it will be deleted. | 263 | in the second it will be deleted. |
257 | 264 | ||
258 | (12) State FSCACHE_OBJECT_WITHDRAWING. | 265 | (13) State FSCACHE_OBJECT_WITHDRAWING. |
259 | 266 | ||
260 | The object transits to this state if the cache decides it wants to | 267 | The object transits to this state if the cache decides it wants to |
261 | withdraw the object from service, perhaps to make space, but also due to | 268 | withdraw the object from service, perhaps to make space, but also due to |
262 | error or just because the whole cache is being withdrawn. | 269 | error or just because the whole cache is being withdrawn. |
263 | 270 | ||
264 | (13) State FSCACHE_OBJECT_DEAD. | 271 | (14) State FSCACHE_OBJECT_DEAD. |
265 | 272 | ||
266 | The object transits to this state when the in-memory object record is | 273 | The object transits to this state when the in-memory object record is |
267 | ready to be deleted. The object processor shouldn't ever see an object in | 274 | ready to be deleted. The object processor shouldn't ever see an object in |
diff --git a/Documentation/filesystems/caching/operations.txt b/Documentation/filesystems/caching/operations.txt index b6b070c57cbf..bee2a5f93d60 100644 --- a/Documentation/filesystems/caching/operations.txt +++ b/Documentation/filesystems/caching/operations.txt | |||
@@ -174,7 +174,7 @@ Operations are used through the following procedure: | |||
174 | necessary (the object might have died whilst the thread was waiting). | 174 | necessary (the object might have died whilst the thread was waiting). |
175 | 175 | ||
176 | When it has finished doing its processing, it should call | 176 | When it has finished doing its processing, it should call |
177 | fscache_put_operation() on it. | 177 | fscache_op_complete() and fscache_put_operation() on it. |
178 | 178 | ||
179 | (4) The operation holds an effective lock upon the object, preventing other | 179 | (4) The operation holds an effective lock upon the object, preventing other |
180 | exclusive ops conflicting until it is released. The operation can be | 180 | exclusive ops conflicting until it is released. The operation can be |
diff --git a/Documentation/filesystems/efivarfs.txt b/Documentation/filesystems/efivarfs.txt new file mode 100644 index 000000000000..c477af086e65 --- /dev/null +++ b/Documentation/filesystems/efivarfs.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | efivarfs - a (U)EFI variable filesystem | ||
3 | |||
4 | The efivarfs filesystem was created to address the shortcomings of | ||
5 | using entries in sysfs to maintain EFI variables. The old sysfs EFI | ||
6 | variables code only supported variables of up to 1024 bytes. This | ||
7 | limitation existed in version 0.99 of the EFI specification, but was | ||
8 | removed before any full releases. Since variables can now be larger | ||
9 | than a single page, sysfs isn't the best interface for this. | ||
10 | |||
11 | Variables can be created, deleted and modified with the efivarfs | ||
12 | filesystem. | ||
13 | |||
14 | efivarfs is typically mounted like this, | ||
15 | |||
16 | mount -t efivarfs none /sys/firmware/efi/efivars | ||
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 104322bf378c..34ea4f1fa6ea 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -200,12 +200,9 @@ inode_readahead_blks=n This tuning parameter controls the maximum | |||
200 | table readahead algorithm will pre-read into | 200 | table readahead algorithm will pre-read into |
201 | the buffer cache. The default value is 32 blocks. | 201 | the buffer cache. The default value is 32 blocks. |
202 | 202 | ||
203 | nouser_xattr Disables Extended User Attributes. If you have extended | 203 | nouser_xattr Disables Extended User Attributes. See the |
204 | attribute support enabled in the kernel configuration | 204 | attr(5) manual page and http://acl.bestbits.at/ |
205 | (CONFIG_EXT4_FS_XATTR), extended attribute support | 205 | for more information about extended attributes. |
206 | is enabled by default on mount. See the attr(5) manual | ||
207 | page and http://acl.bestbits.at/ for more information | ||
208 | about extended attributes. | ||
209 | 206 | ||
210 | noacl This option disables POSIX Access Control List | 207 | noacl This option disables POSIX Access Control List |
211 | support. If ACL support is enabled in the kernel | 208 | support. If ACL support is enabled in the kernel |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt new file mode 100644 index 000000000000..dcf338e62b71 --- /dev/null +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -0,0 +1,421 @@ | |||
1 | ================================================================================ | ||
2 | WHAT IS Flash-Friendly File System (F2FS)? | ||
3 | ================================================================================ | ||
4 | |||
5 | NAND flash memory-based storage devices, such as SSD, eMMC, and SD cards, have | ||
6 | been equipped on a variety systems ranging from mobile to server systems. Since | ||
7 | they are known to have different characteristics from the conventional rotating | ||
8 | disks, a file system, an upper layer to the storage device, should adapt to the | ||
9 | changes from the sketch in the design level. | ||
10 | |||
11 | F2FS is a file system exploiting NAND flash memory-based storage devices, which | ||
12 | is based on Log-structured File System (LFS). The design has been focused on | ||
13 | addressing the fundamental issues in LFS, which are snowball effect of wandering | ||
14 | tree and high cleaning overhead. | ||
15 | |||
16 | Since a NAND flash memory-based storage device shows different characteristic | ||
17 | according to its internal geometry or flash memory management scheme, namely FTL, | ||
18 | F2FS and its tools support various parameters not only for configuring on-disk | ||
19 | layout, but also for selecting allocation and cleaning algorithms. | ||
20 | |||
21 | The file system formatting tool, "mkfs.f2fs", is available from the following | ||
22 | git tree: | ||
23 | >> git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git | ||
24 | |||
25 | For reporting bugs and sending patches, please use the following mailing list: | ||
26 | >> linux-f2fs-devel@lists.sourceforge.net | ||
27 | |||
28 | ================================================================================ | ||
29 | BACKGROUND AND DESIGN ISSUES | ||
30 | ================================================================================ | ||
31 | |||
32 | Log-structured File System (LFS) | ||
33 | -------------------------------- | ||
34 | "A log-structured file system writes all modifications to disk sequentially in | ||
35 | a log-like structure, thereby speeding up both file writing and crash recovery. | ||
36 | The log is the only structure on disk; it contains indexing information so that | ||
37 | files can be read back from the log efficiently. In order to maintain large free | ||
38 | areas on disk for fast writing, we divide the log into segments and use a | ||
39 | segment cleaner to compress the live information from heavily fragmented | ||
40 | segments." from Rosenblum, M. and Ousterhout, J. K., 1992, "The design and | ||
41 | implementation of a log-structured file system", ACM Trans. Computer Systems | ||
42 | 10, 1, 26–52. | ||
43 | |||
44 | Wandering Tree Problem | ||
45 | ---------------------- | ||
46 | In LFS, when a file data is updated and written to the end of log, its direct | ||
47 | pointer block is updated due to the changed location. Then the indirect pointer | ||
48 | block is also updated due to the direct pointer block update. In this manner, | ||
49 | the upper index structures such as inode, inode map, and checkpoint block are | ||
50 | also updated recursively. This problem is called as wandering tree problem [1], | ||
51 | and in order to enhance the performance, it should eliminate or relax the update | ||
52 | propagation as much as possible. | ||
53 | |||
54 | [1] Bityutskiy, A. 2005. JFFS3 design issues. http://www.linux-mtd.infradead.org/ | ||
55 | |||
56 | Cleaning Overhead | ||
57 | ----------------- | ||
58 | Since LFS is based on out-of-place writes, it produces so many obsolete blocks | ||
59 | scattered across the whole storage. In order to serve new empty log space, it | ||
60 | needs to reclaim these obsolete blocks seamlessly to users. This job is called | ||
61 | as a cleaning process. | ||
62 | |||
63 | The process consists of three operations as follows. | ||
64 | 1. A victim segment is selected through referencing segment usage table. | ||
65 | 2. It loads parent index structures of all the data in the victim identified by | ||
66 | segment summary blocks. | ||
67 | 3. It checks the cross-reference between the data and its parent index structure. | ||
68 | 4. It moves valid data selectively. | ||
69 | |||
70 | This cleaning job may cause unexpected long delays, so the most important goal | ||
71 | is to hide the latencies to users. And also definitely, it should reduce the | ||
72 | amount of valid data to be moved, and move them quickly as well. | ||
73 | |||
74 | ================================================================================ | ||
75 | KEY FEATURES | ||
76 | ================================================================================ | ||
77 | |||
78 | Flash Awareness | ||
79 | --------------- | ||
80 | - Enlarge the random write area for better performance, but provide the high | ||
81 | spatial locality | ||
82 | - Align FS data structures to the operational units in FTL as best efforts | ||
83 | |||
84 | Wandering Tree Problem | ||
85 | ---------------------- | ||
86 | - Use a term, “node”, that represents inodes as well as various pointer blocks | ||
87 | - Introduce Node Address Table (NAT) containing the locations of all the “node” | ||
88 | blocks; this will cut off the update propagation. | ||
89 | |||
90 | Cleaning Overhead | ||
91 | ----------------- | ||
92 | - Support a background cleaning process | ||
93 | - Support greedy and cost-benefit algorithms for victim selection policies | ||
94 | - Support multi-head logs for static/dynamic hot and cold data separation | ||
95 | - Introduce adaptive logging for efficient block allocation | ||
96 | |||
97 | ================================================================================ | ||
98 | MOUNT OPTIONS | ||
99 | ================================================================================ | ||
100 | |||
101 | background_gc_off Turn off cleaning operations, namely garbage collection, | ||
102 | triggered in background when I/O subsystem is idle. | ||
103 | disable_roll_forward Disable the roll-forward recovery routine | ||
104 | discard Issue discard/TRIM commands when a segment is cleaned. | ||
105 | no_heap Disable heap-style segment allocation which finds free | ||
106 | segments for data from the beginning of main area, while | ||
107 | for node from the end of main area. | ||
108 | nouser_xattr Disable Extended User Attributes. Note: xattr is enabled | ||
109 | by default if CONFIG_F2FS_FS_XATTR is selected. | ||
110 | noacl Disable POSIX Access Control List. Note: acl is enabled | ||
111 | by default if CONFIG_F2FS_FS_POSIX_ACL is selected. | ||
112 | active_logs=%u Support configuring the number of active logs. In the | ||
113 | current design, f2fs supports only 2, 4, and 6 logs. | ||
114 | Default number is 6. | ||
115 | disable_ext_identify Disable the extension list configured by mkfs, so f2fs | ||
116 | does not aware of cold files such as media files. | ||
117 | |||
118 | ================================================================================ | ||
119 | DEBUGFS ENTRIES | ||
120 | ================================================================================ | ||
121 | |||
122 | /sys/kernel/debug/f2fs/ contains information about all the partitions mounted as | ||
123 | f2fs. Each file shows the whole f2fs information. | ||
124 | |||
125 | /sys/kernel/debug/f2fs/status includes: | ||
126 | - major file system information managed by f2fs currently | ||
127 | - average SIT information about whole segments | ||
128 | - current memory footprint consumed by f2fs. | ||
129 | |||
130 | ================================================================================ | ||
131 | USAGE | ||
132 | ================================================================================ | ||
133 | |||
134 | 1. Download userland tools and compile them. | ||
135 | |||
136 | 2. Skip, if f2fs was compiled statically inside kernel. | ||
137 | Otherwise, insert the f2fs.ko module. | ||
138 | # insmod f2fs.ko | ||
139 | |||
140 | 3. Create a directory trying to mount | ||
141 | # mkdir /mnt/f2fs | ||
142 | |||
143 | 4. Format the block device, and then mount as f2fs | ||
144 | # mkfs.f2fs -l label /dev/block_device | ||
145 | # mount -t f2fs /dev/block_device /mnt/f2fs | ||
146 | |||
147 | Format options | ||
148 | -------------- | ||
149 | -l [label] : Give a volume label, up to 256 unicode name. | ||
150 | -a [0 or 1] : Split start location of each area for heap-based allocation. | ||
151 | 1 is set by default, which performs this. | ||
152 | -o [int] : Set overprovision ratio in percent over volume size. | ||
153 | 5 is set by default. | ||
154 | -s [int] : Set the number of segments per section. | ||
155 | 1 is set by default. | ||
156 | -z [int] : Set the number of sections per zone. | ||
157 | 1 is set by default. | ||
158 | -e [str] : Set basic extension list. e.g. "mp3,gif,mov" | ||
159 | |||
160 | ================================================================================ | ||
161 | DESIGN | ||
162 | ================================================================================ | ||
163 | |||
164 | On-disk Layout | ||
165 | -------------- | ||
166 | |||
167 | F2FS divides the whole volume into a number of segments, each of which is fixed | ||
168 | to 2MB in size. A section is composed of consecutive segments, and a zone | ||
169 | consists of a set of sections. By default, section and zone sizes are set to one | ||
170 | segment size identically, but users can easily modify the sizes by mkfs. | ||
171 | |||
172 | F2FS splits the entire volume into six areas, and all the areas except superblock | ||
173 | consists of multiple segments as described below. | ||
174 | |||
175 | align with the zone size <-| | ||
176 | |-> align with the segment size | ||
177 | _________________________________________________________________________ | ||
178 | | | | Segment | Node | Segment | | | ||
179 | | Superblock | Checkpoint | Info. | Address | Summary | Main | | ||
180 | | (SB) | (CP) | Table (SIT) | Table (NAT) | Area (SSA) | | | ||
181 | |____________|_____2______|______N______|______N______|______N_____|__N___| | ||
182 | . . | ||
183 | . . | ||
184 | . . | ||
185 | ._________________________________________. | ||
186 | |_Segment_|_..._|_Segment_|_..._|_Segment_| | ||
187 | . . | ||
188 | ._________._________ | ||
189 | |_section_|__...__|_ | ||
190 | . . | ||
191 | .________. | ||
192 | |__zone__| | ||
193 | |||
194 | - Superblock (SB) | ||
195 | : It is located at the beginning of the partition, and there exist two copies | ||
196 | to avoid file system crash. It contains basic partition information and some | ||
197 | default parameters of f2fs. | ||
198 | |||
199 | - Checkpoint (CP) | ||
200 | : It contains file system information, bitmaps for valid NAT/SIT sets, orphan | ||
201 | inode lists, and summary entries of current active segments. | ||
202 | |||
203 | - Segment Information Table (SIT) | ||
204 | : It contains segment information such as valid block count and bitmap for the | ||
205 | validity of all the blocks. | ||
206 | |||
207 | - Node Address Table (NAT) | ||
208 | : It is composed of a block address table for all the node blocks stored in | ||
209 | Main area. | ||
210 | |||
211 | - Segment Summary Area (SSA) | ||
212 | : It contains summary entries which contains the owner information of all the | ||
213 | data and node blocks stored in Main area. | ||
214 | |||
215 | - Main Area | ||
216 | : It contains file and directory data including their indices. | ||
217 | |||
218 | In order to avoid misalignment between file system and flash-based storage, F2FS | ||
219 | aligns the start block address of CP with the segment size. Also, it aligns the | ||
220 | start block address of Main area with the zone size by reserving some segments | ||
221 | in SSA area. | ||
222 | |||
223 | Reference the following survey for additional technical details. | ||
224 | https://wiki.linaro.org/WorkingGroups/Kernel/Projects/FlashCardSurvey | ||
225 | |||
226 | File System Metadata Structure | ||
227 | ------------------------------ | ||
228 | |||
229 | F2FS adopts the checkpointing scheme to maintain file system consistency. At | ||
230 | mount time, F2FS first tries to find the last valid checkpoint data by scanning | ||
231 | CP area. In order to reduce the scanning time, F2FS uses only two copies of CP. | ||
232 | One of them always indicates the last valid data, which is called as shadow copy | ||
233 | mechanism. In addition to CP, NAT and SIT also adopt the shadow copy mechanism. | ||
234 | |||
235 | For file system consistency, each CP points to which NAT and SIT copies are | ||
236 | valid, as shown as below. | ||
237 | |||
238 | +--------+----------+---------+ | ||
239 | | CP | SIT | NAT | | ||
240 | +--------+----------+---------+ | ||
241 | . . . . | ||
242 | . . . . | ||
243 | . . . . | ||
244 | +-------+-------+--------+--------+--------+--------+ | ||
245 | | CP #0 | CP #1 | SIT #0 | SIT #1 | NAT #0 | NAT #1 | | ||
246 | +-------+-------+--------+--------+--------+--------+ | ||
247 | | ^ ^ | ||
248 | | | | | ||
249 | `----------------------------------------' | ||
250 | |||
251 | Index Structure | ||
252 | --------------- | ||
253 | |||
254 | The key data structure to manage the data locations is a "node". Similar to | ||
255 | traditional file structures, F2FS has three types of node: inode, direct node, | ||
256 | indirect node. F2FS assigns 4KB to an inode block which contains 923 data block | ||
257 | indices, two direct node pointers, two indirect node pointers, and one double | ||
258 | indirect node pointer as described below. One direct node block contains 1018 | ||
259 | data blocks, and one indirect node block contains also 1018 node blocks. Thus, | ||
260 | one inode block (i.e., a file) covers: | ||
261 | |||
262 | 4KB * (923 + 2 * 1018 + 2 * 1018 * 1018 + 1018 * 1018 * 1018) := 3.94TB. | ||
263 | |||
264 | Inode block (4KB) | ||
265 | |- data (923) | ||
266 | |- direct node (2) | ||
267 | | `- data (1018) | ||
268 | |- indirect node (2) | ||
269 | | `- direct node (1018) | ||
270 | | `- data (1018) | ||
271 | `- double indirect node (1) | ||
272 | `- indirect node (1018) | ||
273 | `- direct node (1018) | ||
274 | `- data (1018) | ||
275 | |||
276 | Note that, all the node blocks are mapped by NAT which means the location of | ||
277 | each node is translated by the NAT table. In the consideration of the wandering | ||
278 | tree problem, F2FS is able to cut off the propagation of node updates caused by | ||
279 | leaf data writes. | ||
280 | |||
281 | Directory Structure | ||
282 | ------------------- | ||
283 | |||
284 | A directory entry occupies 11 bytes, which consists of the following attributes. | ||
285 | |||
286 | - hash hash value of the file name | ||
287 | - ino inode number | ||
288 | - len the length of file name | ||
289 | - type file type such as directory, symlink, etc | ||
290 | |||
291 | A dentry block consists of 214 dentry slots and file names. Therein a bitmap is | ||
292 | used to represent whether each dentry is valid or not. A dentry block occupies | ||
293 | 4KB with the following composition. | ||
294 | |||
295 | Dentry Block(4 K) = bitmap (27 bytes) + reserved (3 bytes) + | ||
296 | dentries(11 * 214 bytes) + file name (8 * 214 bytes) | ||
297 | |||
298 | [Bucket] | ||
299 | +--------------------------------+ | ||
300 | |dentry block 1 | dentry block 2 | | ||
301 | +--------------------------------+ | ||
302 | . . | ||
303 | . . | ||
304 | . [Dentry Block Structure: 4KB] . | ||
305 | +--------+----------+----------+------------+ | ||
306 | | bitmap | reserved | dentries | file names | | ||
307 | +--------+----------+----------+------------+ | ||
308 | [Dentry Block: 4KB] . . | ||
309 | . . | ||
310 | . . | ||
311 | +------+------+-----+------+ | ||
312 | | hash | ino | len | type | | ||
313 | +------+------+-----+------+ | ||
314 | [Dentry Structure: 11 bytes] | ||
315 | |||
316 | F2FS implements multi-level hash tables for directory structure. Each level has | ||
317 | a hash table with dedicated number of hash buckets as shown below. Note that | ||
318 | "A(2B)" means a bucket includes 2 data blocks. | ||
319 | |||
320 | ---------------------- | ||
321 | A : bucket | ||
322 | B : block | ||
323 | N : MAX_DIR_HASH_DEPTH | ||
324 | ---------------------- | ||
325 | |||
326 | level #0 | A(2B) | ||
327 | | | ||
328 | level #1 | A(2B) - A(2B) | ||
329 | | | ||
330 | level #2 | A(2B) - A(2B) - A(2B) - A(2B) | ||
331 | . | . . . . | ||
332 | level #N/2 | A(2B) - A(2B) - A(2B) - A(2B) - A(2B) - ... - A(2B) | ||
333 | . | . . . . | ||
334 | level #N | A(4B) - A(4B) - A(4B) - A(4B) - A(4B) - ... - A(4B) | ||
335 | |||
336 | The number of blocks and buckets are determined by, | ||
337 | |||
338 | ,- 2, if n < MAX_DIR_HASH_DEPTH / 2, | ||
339 | # of blocks in level #n = | | ||
340 | `- 4, Otherwise | ||
341 | |||
342 | ,- 2^n, if n < MAX_DIR_HASH_DEPTH / 2, | ||
343 | # of buckets in level #n = | | ||
344 | `- 2^((MAX_DIR_HASH_DEPTH / 2) - 1), Otherwise | ||
345 | |||
346 | When F2FS finds a file name in a directory, at first a hash value of the file | ||
347 | name is calculated. Then, F2FS scans the hash table in level #0 to find the | ||
348 | dentry consisting of the file name and its inode number. If not found, F2FS | ||
349 | scans the next hash table in level #1. In this way, F2FS scans hash tables in | ||
350 | each levels incrementally from 1 to N. In each levels F2FS needs to scan only | ||
351 | one bucket determined by the following equation, which shows O(log(# of files)) | ||
352 | complexity. | ||
353 | |||
354 | bucket number to scan in level #n = (hash value) % (# of buckets in level #n) | ||
355 | |||
356 | In the case of file creation, F2FS finds empty consecutive slots that cover the | ||
357 | file name. F2FS searches the empty slots in the hash tables of whole levels from | ||
358 | 1 to N in the same way as the lookup operation. | ||
359 | |||
360 | The following figure shows an example of two cases holding children. | ||
361 | --------------> Dir <-------------- | ||
362 | | | | ||
363 | child child | ||
364 | |||
365 | child - child [hole] - child | ||
366 | |||
367 | child - child - child [hole] - [hole] - child | ||
368 | |||
369 | Case 1: Case 2: | ||
370 | Number of children = 6, Number of children = 3, | ||
371 | File size = 7 File size = 7 | ||
372 | |||
373 | Default Block Allocation | ||
374 | ------------------------ | ||
375 | |||
376 | At runtime, F2FS manages six active logs inside "Main" area: Hot/Warm/Cold node | ||
377 | and Hot/Warm/Cold data. | ||
378 | |||
379 | - Hot node contains direct node blocks of directories. | ||
380 | - Warm node contains direct node blocks except hot node blocks. | ||
381 | - Cold node contains indirect node blocks | ||
382 | - Hot data contains dentry blocks | ||
383 | - Warm data contains data blocks except hot and cold data blocks | ||
384 | - Cold data contains multimedia data or migrated data blocks | ||
385 | |||
386 | LFS has two schemes for free space management: threaded log and copy-and-compac- | ||
387 | tion. The copy-and-compaction scheme which is known as cleaning, is well-suited | ||
388 | for devices showing very good sequential write performance, since free segments | ||
389 | are served all the time for writing new data. However, it suffers from cleaning | ||
390 | overhead under high utilization. Contrarily, the threaded log scheme suffers | ||
391 | from random writes, but no cleaning process is needed. F2FS adopts a hybrid | ||
392 | scheme where the copy-and-compaction scheme is adopted by default, but the | ||
393 | policy is dynamically changed to the threaded log scheme according to the file | ||
394 | system status. | ||
395 | |||
396 | In order to align F2FS with underlying flash-based storage, F2FS allocates a | ||
397 | segment in a unit of section. F2FS expects that the section size would be the | ||
398 | same as the unit size of garbage collection in FTL. Furthermore, with respect | ||
399 | to the mapping granularity in FTL, F2FS allocates each section of the active | ||
400 | logs from different zones as much as possible, since FTL can write the data in | ||
401 | the active logs into one allocation unit according to its mapping granularity. | ||
402 | |||
403 | Cleaning process | ||
404 | ---------------- | ||
405 | |||
406 | F2FS does cleaning both on demand and in the background. On-demand cleaning is | ||
407 | triggered when there are not enough free segments to serve VFS calls. Background | ||
408 | cleaner is operated by a kernel thread, and triggers the cleaning job when the | ||
409 | system is idle. | ||
410 | |||
411 | F2FS supports two victim selection policies: greedy and cost-benefit algorithms. | ||
412 | In the greedy algorithm, F2FS selects a victim segment having the smallest number | ||
413 | of valid blocks. In the cost-benefit algorithm, F2FS selects a victim segment | ||
414 | according to the segment age and the number of valid blocks in order to address | ||
415 | log block thrashing problem in the greedy algorithm. F2FS adopts the greedy | ||
416 | algorithm for on-demand cleaner, while background cleaner adopts cost-benefit | ||
417 | algorithm. | ||
418 | |||
419 | In order to identify whether the data in the victim segment are valid or not, | ||
420 | F2FS manages a bitmap. Each bit represents the validity of a block, and the | ||
421 | bitmap is composed of a bit stream covering whole blocks in main area. | ||
diff --git a/Documentation/filesystems/nfs/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt index 092fad92a3f0..01c2db769791 100644 --- a/Documentation/filesystems/nfs/nfs41-server.txt +++ b/Documentation/filesystems/nfs/nfs41-server.txt | |||
@@ -39,21 +39,10 @@ interoperability problems with future clients. Known issues: | |||
39 | from a linux client are possible, but we aren't really | 39 | from a linux client are possible, but we aren't really |
40 | conformant with the spec (for example, we don't use kerberos | 40 | conformant with the spec (for example, we don't use kerberos |
41 | on the backchannel correctly). | 41 | on the backchannel correctly). |
42 | - Incomplete backchannel support: incomplete backchannel gss | ||
43 | support and no support for BACKCHANNEL_CTL mean that | ||
44 | callbacks (hence delegations and layouts) may not be | ||
45 | available and clients confused by the incomplete | ||
46 | implementation may fail. | ||
47 | - We do not support SSV, which provides security for shared | 42 | - We do not support SSV, which provides security for shared |
48 | client-server state (thus preventing unauthorized tampering | 43 | client-server state (thus preventing unauthorized tampering |
49 | with locks and opens, for example). It is mandatory for | 44 | with locks and opens, for example). It is mandatory for |
50 | servers to support this, though no clients use it yet. | 45 | servers to support this, though no clients use it yet. |
51 | - Mandatory operations which we do not support, such as | ||
52 | DESTROY_CLIENTID, are not currently used by clients, but will be | ||
53 | (and the spec recommends their uses in common cases), and | ||
54 | clients should not be expected to know how to recover from the | ||
55 | case where they are not supported. This will eventually cause | ||
56 | interoperability failures. | ||
57 | 46 | ||
58 | In addition, some limitations are inherited from the current NFSv4 | 47 | In addition, some limitations are inherited from the current NFSv4 |
59 | implementation: | 48 | implementation: |
@@ -89,7 +78,7 @@ Operations | |||
89 | | | MNI | or OPT) | | | 78 | | | MNI | or OPT) | | |
90 | +----------------------+------------+--------------+----------------+ | 79 | +----------------------+------------+--------------+----------------+ |
91 | | ACCESS | REQ | | Section 18.1 | | 80 | | ACCESS | REQ | | Section 18.1 | |
92 | NS | BACKCHANNEL_CTL | REQ | | Section 18.33 | | 81 | I | BACKCHANNEL_CTL | REQ | | Section 18.33 | |
93 | I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 | | 82 | I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 | |
94 | | CLOSE | REQ | | Section 18.2 | | 83 | | CLOSE | REQ | | Section 18.2 | |
95 | | COMMIT | REQ | | Section 18.3 | | 84 | | COMMIT | REQ | | Section 18.3 | |
@@ -99,7 +88,7 @@ NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 | | |||
99 | | DELEGRETURN | OPT | FDELG, | Section 18.6 | | 88 | | DELEGRETURN | OPT | FDELG, | Section 18.6 | |
100 | | | | DDELG, pNFS | | | 89 | | | | DDELG, pNFS | | |
101 | | | | (REQ) | | | 90 | | | | (REQ) | | |
102 | NS | DESTROY_CLIENTID | REQ | | Section 18.50 | | 91 | I | DESTROY_CLIENTID | REQ | | Section 18.50 | |
103 | I | DESTROY_SESSION | REQ | | Section 18.37 | | 92 | I | DESTROY_SESSION | REQ | | Section 18.37 | |
104 | I | EXCHANGE_ID | REQ | | Section 18.35 | | 93 | I | EXCHANGE_ID | REQ | | Section 18.35 | |
105 | I | FREE_STATEID | REQ | | Section 18.38 | | 94 | I | FREE_STATEID | REQ | | Section 18.38 | |
@@ -192,7 +181,6 @@ EXCHANGE_ID: | |||
192 | 181 | ||
193 | CREATE_SESSION: | 182 | CREATE_SESSION: |
194 | * backchannel attributes are ignored | 183 | * backchannel attributes are ignored |
195 | * backchannel security parameters are ignored | ||
196 | 184 | ||
197 | SEQUENCE: | 185 | SEQUENCE: |
198 | * no support for dynamic slot table renegotiation (optional) | 186 | * no support for dynamic slot table renegotiation (optional) |
@@ -202,7 +190,7 @@ Nonstandard compound limitations: | |||
202 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may | 190 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may |
203 | fail to live up to the promise we made in CREATE_SESSION fore channel | 191 | fail to live up to the promise we made in CREATE_SESSION fore channel |
204 | negotiation. | 192 | negotiation. |
205 | * No more than one IO operation (read, write, readdir) allowed per | 193 | * No more than one read-like operation allowed per compound; encoding |
206 | compound. | 194 | replies that cross page boundaries (except for read data) not handled. |
207 | 195 | ||
208 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. | 196 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 0742feebc6e2..0472c31c163b 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -281,7 +281,7 @@ ext2_write_failed and callers for an example. | |||
281 | 281 | ||
282 | [mandatory] | 282 | [mandatory] |
283 | 283 | ||
284 | ->truncate is going away. The whole truncate sequence needs to be | 284 | ->truncate is gone. The whole truncate sequence needs to be |
285 | implemented in ->setattr, which is now mandatory for filesystems | 285 | implemented in ->setattr, which is now mandatory for filesystems |
286 | implementing on-disk size changes. Start with a copy of the old inode_setattr | 286 | implementing on-disk size changes. Start with a copy of the old inode_setattr |
287 | and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to | 287 | and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 3844d21d6ca3..fd8d0d594fc7 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -41,6 +41,7 @@ Table of Contents | |||
41 | 3.5 /proc/<pid>/mountinfo - Information about mounts | 41 | 3.5 /proc/<pid>/mountinfo - Information about mounts |
42 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm | 42 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm |
43 | 3.7 /proc/<pid>/task/<tid>/children - Information about task children | 43 | 3.7 /proc/<pid>/task/<tid>/children - Information about task children |
44 | 3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file | ||
44 | 45 | ||
45 | 4 Configuring procfs | 46 | 4 Configuring procfs |
46 | 4.1 Mount options | 47 | 4.1 Mount options |
@@ -142,7 +143,7 @@ Table 1-1: Process specific entries in /proc | |||
142 | pagemap Page table | 143 | pagemap Page table |
143 | stack Report full stack trace, enable via CONFIG_STACKTRACE | 144 | stack Report full stack trace, enable via CONFIG_STACKTRACE |
144 | smaps a extension based on maps, showing the memory consumption of | 145 | smaps a extension based on maps, showing the memory consumption of |
145 | each mapping | 146 | each mapping and flags associated with it |
146 | .............................................................................. | 147 | .............................................................................. |
147 | 148 | ||
148 | For example, to get the status information of a process, all you have to do is | 149 | For example, to get the status information of a process, all you have to do is |
@@ -181,6 +182,7 @@ read the file /proc/PID/status: | |||
181 | CapPrm: 0000000000000000 | 182 | CapPrm: 0000000000000000 |
182 | CapEff: 0000000000000000 | 183 | CapEff: 0000000000000000 |
183 | CapBnd: ffffffffffffffff | 184 | CapBnd: ffffffffffffffff |
185 | Seccomp: 0 | ||
184 | voluntary_ctxt_switches: 0 | 186 | voluntary_ctxt_switches: 0 |
185 | nonvoluntary_ctxt_switches: 1 | 187 | nonvoluntary_ctxt_switches: 1 |
186 | 188 | ||
@@ -237,6 +239,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7) | |||
237 | CapPrm bitmap of permitted capabilities | 239 | CapPrm bitmap of permitted capabilities |
238 | CapEff bitmap of effective capabilities | 240 | CapEff bitmap of effective capabilities |
239 | CapBnd bitmap of capabilities bounding set | 241 | CapBnd bitmap of capabilities bounding set |
242 | Seccomp seccomp mode, like prctl(PR_GET_SECCOMP, ...) | ||
240 | Cpus_allowed mask of CPUs on which this process may run | 243 | Cpus_allowed mask of CPUs on which this process may run |
241 | Cpus_allowed_list Same as previous, but in "list format" | 244 | Cpus_allowed_list Same as previous, but in "list format" |
242 | Mems_allowed mask of memory nodes allowed to this process | 245 | Mems_allowed mask of memory nodes allowed to this process |
@@ -415,8 +418,9 @@ Swap: 0 kB | |||
415 | KernelPageSize: 4 kB | 418 | KernelPageSize: 4 kB |
416 | MMUPageSize: 4 kB | 419 | MMUPageSize: 4 kB |
417 | Locked: 374 kB | 420 | Locked: 374 kB |
421 | VmFlags: rd ex mr mw me de | ||
418 | 422 | ||
419 | The first of these lines shows the same information as is displayed for the | 423 | the first of these lines shows the same information as is displayed for the |
420 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping | 424 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping |
421 | (size), the amount of the mapping that is currently resident in RAM (RSS), the | 425 | (size), the amount of the mapping that is currently resident in RAM (RSS), the |
422 | process' proportional share of this mapping (PSS), the number of clean and | 426 | process' proportional share of this mapping (PSS), the number of clean and |
@@ -430,6 +434,41 @@ and a page is modified, the file page is replaced by a private anonymous copy. | |||
430 | "Swap" shows how much would-be-anonymous memory is also used, but out on | 434 | "Swap" shows how much would-be-anonymous memory is also used, but out on |
431 | swap. | 435 | swap. |
432 | 436 | ||
437 | "VmFlags" field deserves a separate description. This member represents the kernel | ||
438 | flags associated with the particular virtual memory area in two letter encoded | ||
439 | manner. The codes are the following: | ||
440 | rd - readable | ||
441 | wr - writeable | ||
442 | ex - executable | ||
443 | sh - shared | ||
444 | mr - may read | ||
445 | mw - may write | ||
446 | me - may execute | ||
447 | ms - may share | ||
448 | gd - stack segment growns down | ||
449 | pf - pure PFN range | ||
450 | dw - disabled write to the mapped file | ||
451 | lo - pages are locked in memory | ||
452 | io - memory mapped I/O area | ||
453 | sr - sequential read advise provided | ||
454 | rr - random read advise provided | ||
455 | dc - do not copy area on fork | ||
456 | de - do not expand area on remapping | ||
457 | ac - area is accountable | ||
458 | nr - swap space is not reserved for the area | ||
459 | ht - area uses huge tlb pages | ||
460 | nl - non-linear mapping | ||
461 | ar - architecture specific flag | ||
462 | dd - do not include area into core dump | ||
463 | mm - mixed map area | ||
464 | hg - huge page advise flag | ||
465 | nh - no-huge page advise flag | ||
466 | mg - mergable advise flag | ||
467 | |||
468 | Note that there is no guarantee that every flag and associated mnemonic will | ||
469 | be present in all further kernel releases. Things get changed, the flags may | ||
470 | be vanished or the reverse -- new added. | ||
471 | |||
433 | This file is only present if the CONFIG_MMU kernel configuration option is | 472 | This file is only present if the CONFIG_MMU kernel configuration option is |
434 | enabled. | 473 | enabled. |
435 | 474 | ||
@@ -1595,6 +1634,93 @@ pids, so one need to either stop or freeze processes being inspected | |||
1595 | if precise results are needed. | 1634 | if precise results are needed. |
1596 | 1635 | ||
1597 | 1636 | ||
1637 | 3.7 /proc/<pid>/fdinfo/<fd> - Information about opened file | ||
1638 | --------------------------------------------------------------- | ||
1639 | This file provides information associated with an opened file. The regular | ||
1640 | files have at least two fields -- 'pos' and 'flags'. The 'pos' represents | ||
1641 | the current offset of the opened file in decimal form [see lseek(2) for | ||
1642 | details] and 'flags' denotes the octal O_xxx mask the file has been | ||
1643 | created with [see open(2) for details]. | ||
1644 | |||
1645 | A typical output is | ||
1646 | |||
1647 | pos: 0 | ||
1648 | flags: 0100002 | ||
1649 | |||
1650 | The files such as eventfd, fsnotify, signalfd, epoll among the regular pos/flags | ||
1651 | pair provide additional information particular to the objects they represent. | ||
1652 | |||
1653 | Eventfd files | ||
1654 | ~~~~~~~~~~~~~ | ||
1655 | pos: 0 | ||
1656 | flags: 04002 | ||
1657 | eventfd-count: 5a | ||
1658 | |||
1659 | where 'eventfd-count' is hex value of a counter. | ||
1660 | |||
1661 | Signalfd files | ||
1662 | ~~~~~~~~~~~~~~ | ||
1663 | pos: 0 | ||
1664 | flags: 04002 | ||
1665 | sigmask: 0000000000000200 | ||
1666 | |||
1667 | where 'sigmask' is hex value of the signal mask associated | ||
1668 | with a file. | ||
1669 | |||
1670 | Epoll files | ||
1671 | ~~~~~~~~~~~ | ||
1672 | pos: 0 | ||
1673 | flags: 02 | ||
1674 | tfd: 5 events: 1d data: ffffffffffffffff | ||
1675 | |||
1676 | where 'tfd' is a target file descriptor number in decimal form, | ||
1677 | 'events' is events mask being watched and the 'data' is data | ||
1678 | associated with a target [see epoll(7) for more details]. | ||
1679 | |||
1680 | Fsnotify files | ||
1681 | ~~~~~~~~~~~~~~ | ||
1682 | For inotify files the format is the following | ||
1683 | |||
1684 | pos: 0 | ||
1685 | flags: 02000000 | ||
1686 | inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:7e9e0000640d1b6d | ||
1687 | |||
1688 | where 'wd' is a watch descriptor in decimal form, ie a target file | ||
1689 | descriptor number, 'ino' and 'sdev' are inode and device where the | ||
1690 | target file resides and the 'mask' is the mask of events, all in hex | ||
1691 | form [see inotify(7) for more details]. | ||
1692 | |||
1693 | If the kernel was built with exportfs support, the path to the target | ||
1694 | file is encoded as a file handle. The file handle is provided by three | ||
1695 | fields 'fhandle-bytes', 'fhandle-type' and 'f_handle', all in hex | ||
1696 | format. | ||
1697 | |||
1698 | If the kernel is built without exportfs support the file handle won't be | ||
1699 | printed out. | ||
1700 | |||
1701 | If there is no inotify mark attached yet the 'inotify' line will be omitted. | ||
1702 | |||
1703 | For fanotify files the format is | ||
1704 | |||
1705 | pos: 0 | ||
1706 | flags: 02 | ||
1707 | fanotify flags:10 event-flags:0 | ||
1708 | fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003 | ||
1709 | fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4 | ||
1710 | |||
1711 | where fanotify 'flags' and 'event-flags' are values used in fanotify_init | ||
1712 | call, 'mnt_id' is the mount point identifier, 'mflags' is the value of | ||
1713 | flags associated with mark which are tracked separately from events | ||
1714 | mask. 'ino', 'sdev' are target inode and device, 'mask' is the events | ||
1715 | mask and 'ignored_mask' is the mask of events which are to be ignored. | ||
1716 | All in hex format. Incorporation of 'mflags', 'mask' and 'ignored_mask' | ||
1717 | does provide information about flags and mask used in fanotify_mark | ||
1718 | call [see fsnotify manpage for details]. | ||
1719 | |||
1720 | While the first three lines are mandatory and always printed, the rest is | ||
1721 | optional and may be omitted if no marks created yet. | ||
1722 | |||
1723 | |||
1598 | ------------------------------------------------------------------------------ | 1724 | ------------------------------------------------------------------------------ |
1599 | Configuring procfs | 1725 | Configuring procfs |
1600 | ------------------------------------------------------------------------------ | 1726 | ------------------------------------------------------------------------------ |
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt index de1e6c4dccff..d230dd9c99b0 100644 --- a/Documentation/filesystems/vfat.txt +++ b/Documentation/filesystems/vfat.txt | |||
@@ -111,6 +111,15 @@ tz=UTC -- Interpret timestamps as UTC rather than local time. | |||
111 | useful when mounting devices (like digital cameras) | 111 | useful when mounting devices (like digital cameras) |
112 | that are set to UTC in order to avoid the pitfalls of | 112 | that are set to UTC in order to avoid the pitfalls of |
113 | local time. | 113 | local time. |
114 | time_offset=minutes | ||
115 | -- Set offset for conversion of timestamps from local time | ||
116 | used by FAT to UTC. I.e. <minutes> minutes will be subtracted | ||
117 | from each timestamp to convert it to UTC used internally by | ||
118 | Linux. This is useful when time zone set in sys_tz is | ||
119 | not the time zone used by the filesystem. Note that this | ||
120 | option still does not provide correct time stamps in all | ||
121 | cases in presence of DST - time stamps in a different DST | ||
122 | setting will be off by one hour. | ||
114 | 123 | ||
115 | showexec -- If set, the execute permission bits of the file will be | 124 | showexec -- If set, the execute permission bits of the file will be |
116 | allowed only if the extension part of the name is .EXE, | 125 | allowed only if the extension part of the name is .EXE, |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 2ee133e030c3..e3869098163e 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -350,7 +350,6 @@ struct inode_operations { | |||
350 | int (*readlink) (struct dentry *, char __user *,int); | 350 | int (*readlink) (struct dentry *, char __user *,int); |
351 | void * (*follow_link) (struct dentry *, struct nameidata *); | 351 | void * (*follow_link) (struct dentry *, struct nameidata *); |
352 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 352 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
353 | void (*truncate) (struct inode *); | ||
354 | int (*permission) (struct inode *, int); | 353 | int (*permission) (struct inode *, int); |
355 | int (*get_acl)(struct inode *, int); | 354 | int (*get_acl)(struct inode *, int); |
356 | int (*setattr) (struct dentry *, struct iattr *); | 355 | int (*setattr) (struct dentry *, struct iattr *); |
@@ -431,16 +430,6 @@ otherwise noted. | |||
431 | started might not be in the page cache at the end of the | 430 | started might not be in the page cache at the end of the |
432 | walk). | 431 | walk). |
433 | 432 | ||
434 | truncate: Deprecated. This will not be called if ->setsize is defined. | ||
435 | Called by the VFS to change the size of a file. The | ||
436 | i_size field of the inode is set to the desired size by the | ||
437 | VFS before this method is called. This method is called by | ||
438 | the truncate(2) system call and related functionality. | ||
439 | |||
440 | Note: ->truncate and vmtruncate are deprecated. Do not add new | ||
441 | instances/calls of these. Filesystems should be converted to do their | ||
442 | truncate sequence via ->setattr(). | ||
443 | |||
444 | permission: called by the VFS to check for access rights on a POSIX-like | 433 | permission: called by the VFS to check for access rights on a POSIX-like |
445 | filesystem. | 434 | filesystem. |
446 | 435 | ||
diff --git a/Documentation/hid/hid-sensor.txt b/Documentation/hid/hid-sensor.txt index 948b0989c433..948b0989c433 100755..100644 --- a/Documentation/hid/hid-sensor.txt +++ b/Documentation/hid/hid-sensor.txt | |||
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87 index 87850d86c559..8386aadc0a82 100644 --- a/Documentation/hwmon/it87 +++ b/Documentation/hwmon/it87 | |||
@@ -209,3 +209,13 @@ doesn't use CPU cycles. | |||
209 | Trip points must be set properly before switching to automatic fan speed | 209 | Trip points must be set properly before switching to automatic fan speed |
210 | control mode. The driver will perform basic integrity checks before | 210 | control mode. The driver will perform basic integrity checks before |
211 | actually switching to automatic control mode. | 211 | actually switching to automatic control mode. |
212 | |||
213 | |||
214 | Temperature offset attributes | ||
215 | ----------------------------- | ||
216 | |||
217 | The driver supports temp[1-3]_offset sysfs attributes to adjust the reported | ||
218 | temperature for thermal diodes or diode-connected thermal transistors. | ||
219 | If a temperature sensor is configured for thermistors, the attribute values | ||
220 | are ignored. If the thermal sensor type is Intel PECI, the temperature offset | ||
221 | must be programmed to the critical CPU temperature. | ||
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices index abf63615ee05..22182660dda7 100644 --- a/Documentation/i2c/instantiating-devices +++ b/Documentation/i2c/instantiating-devices | |||
@@ -91,7 +91,7 @@ Example (from the nxp OHCI driver): | |||
91 | 91 | ||
92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; | 92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; |
93 | 93 | ||
94 | static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev) | 94 | static int usb_hcd_nxp_probe(struct platform_device *pdev) |
95 | { | 95 | { |
96 | (...) | 96 | (...) |
97 | struct i2c_adapter *i2c_adap; | 97 | struct i2c_adapter *i2c_adap; |
diff --git a/Documentation/i2c/smbus-protocol b/Documentation/i2c/smbus-protocol index 49f5b680809d..d1f22618e14b 100644 --- a/Documentation/i2c/smbus-protocol +++ b/Documentation/i2c/smbus-protocol | |||
@@ -23,6 +23,12 @@ don't match these function names. For some of the operations which pass a | |||
23 | single data byte, the functions using SMBus protocol operation names execute | 23 | single data byte, the functions using SMBus protocol operation names execute |
24 | a different protocol operation entirely. | 24 | a different protocol operation entirely. |
25 | 25 | ||
26 | Each transaction type corresponds to a functionality flag. Before calling a | ||
27 | transaction function, a device driver should always check (just once) for | ||
28 | the corresponding functionality flag to ensure that the underlying I2C | ||
29 | adapter supports the transaction in question. See | ||
30 | <file:Documentation/i2c/functionality> for the details. | ||
31 | |||
26 | 32 | ||
27 | Key to symbols | 33 | Key to symbols |
28 | ============== | 34 | ============== |
@@ -49,6 +55,8 @@ This sends a single bit to the device, at the place of the Rd/Wr bit. | |||
49 | 55 | ||
50 | A Addr Rd/Wr [A] P | 56 | A Addr Rd/Wr [A] P |
51 | 57 | ||
58 | Functionality flag: I2C_FUNC_SMBUS_QUICK | ||
59 | |||
52 | 60 | ||
53 | SMBus Receive Byte: i2c_smbus_read_byte() | 61 | SMBus Receive Byte: i2c_smbus_read_byte() |
54 | ========================================== | 62 | ========================================== |
@@ -60,6 +68,8 @@ the previous SMBus command. | |||
60 | 68 | ||
61 | S Addr Rd [A] [Data] NA P | 69 | S Addr Rd [A] [Data] NA P |
62 | 70 | ||
71 | Functionality flag: I2C_FUNC_SMBUS_READ_BYTE | ||
72 | |||
63 | 73 | ||
64 | SMBus Send Byte: i2c_smbus_write_byte() | 74 | SMBus Send Byte: i2c_smbus_write_byte() |
65 | ======================================== | 75 | ======================================== |
@@ -69,6 +79,8 @@ to a device. See Receive Byte for more information. | |||
69 | 79 | ||
70 | S Addr Wr [A] Data [A] P | 80 | S Addr Wr [A] Data [A] P |
71 | 81 | ||
82 | Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE | ||
83 | |||
72 | 84 | ||
73 | SMBus Read Byte: i2c_smbus_read_byte_data() | 85 | SMBus Read Byte: i2c_smbus_read_byte_data() |
74 | ============================================ | 86 | ============================================ |
@@ -78,6 +90,8 @@ The register is specified through the Comm byte. | |||
78 | 90 | ||
79 | S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P | 91 | S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P |
80 | 92 | ||
93 | Functionality flag: I2C_FUNC_SMBUS_READ_BYTE_DATA | ||
94 | |||
81 | 95 | ||
82 | SMBus Read Word: i2c_smbus_read_word_data() | 96 | SMBus Read Word: i2c_smbus_read_word_data() |
83 | ============================================ | 97 | ============================================ |
@@ -88,6 +102,8 @@ byte. But this time, the data is a complete word (16 bits). | |||
88 | 102 | ||
89 | S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P | 103 | S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P |
90 | 104 | ||
105 | Functionality flag: I2C_FUNC_SMBUS_READ_WORD_DATA | ||
106 | |||
91 | Note the convenience function i2c_smbus_read_word_swapped is | 107 | Note the convenience function i2c_smbus_read_word_swapped is |
92 | available for reads where the two data bytes are the other way | 108 | available for reads where the two data bytes are the other way |
93 | around (not SMBus compliant, but very popular.) | 109 | around (not SMBus compliant, but very popular.) |
@@ -102,6 +118,8 @@ the Read Byte operation. | |||
102 | 118 | ||
103 | S Addr Wr [A] Comm [A] Data [A] P | 119 | S Addr Wr [A] Comm [A] Data [A] P |
104 | 120 | ||
121 | Functionality flag: I2C_FUNC_SMBUS_WRITE_BYTE_DATA | ||
122 | |||
105 | 123 | ||
106 | SMBus Write Word: i2c_smbus_write_word_data() | 124 | SMBus Write Word: i2c_smbus_write_word_data() |
107 | ============================================== | 125 | ============================================== |
@@ -112,6 +130,8 @@ specified through the Comm byte. | |||
112 | 130 | ||
113 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P | 131 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P |
114 | 132 | ||
133 | Functionality flag: I2C_FUNC_SMBUS_WRITE_WORD_DATA | ||
134 | |||
115 | Note the convenience function i2c_smbus_write_word_swapped is | 135 | Note the convenience function i2c_smbus_write_word_swapped is |
116 | available for writes where the two data bytes are the other way | 136 | available for writes where the two data bytes are the other way |
117 | around (not SMBus compliant, but very popular.) | 137 | around (not SMBus compliant, but very popular.) |
@@ -126,6 +146,8 @@ This command selects a device register (through the Comm byte), sends | |||
126 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] | 146 | S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] |
127 | S Addr Rd [A] [DataLow] A [DataHigh] NA P | 147 | S Addr Rd [A] [DataLow] A [DataHigh] NA P |
128 | 148 | ||
149 | Functionality flag: I2C_FUNC_SMBUS_PROC_CALL | ||
150 | |||
129 | 151 | ||
130 | SMBus Block Read: i2c_smbus_read_block_data() | 152 | SMBus Block Read: i2c_smbus_read_block_data() |
131 | ============================================== | 153 | ============================================== |
@@ -137,6 +159,8 @@ of data is specified by the device in the Count byte. | |||
137 | S Addr Wr [A] Comm [A] | 159 | S Addr Wr [A] Comm [A] |
138 | S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P | 160 | S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P |
139 | 161 | ||
162 | Functionality flag: I2C_FUNC_SMBUS_READ_BLOCK_DATA | ||
163 | |||
140 | 164 | ||
141 | SMBus Block Write: i2c_smbus_write_block_data() | 165 | SMBus Block Write: i2c_smbus_write_block_data() |
142 | ================================================ | 166 | ================================================ |
@@ -147,6 +171,8 @@ Comm byte. The amount of data is specified in the Count byte. | |||
147 | 171 | ||
148 | S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P | 172 | S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P |
149 | 173 | ||
174 | Functionality flag: I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | ||
175 | |||
150 | 176 | ||
151 | SMBus Block Write - Block Read Process Call | 177 | SMBus Block Write - Block Read Process Call |
152 | =========================================== | 178 | =========================================== |
@@ -160,6 +186,8 @@ This command selects a device register (through the Comm byte), sends | |||
160 | S Addr Wr [A] Comm [A] Count [A] Data [A] ... | 186 | S Addr Wr [A] Comm [A] Count [A] Data [A] ... |
161 | S Addr Rd [A] [Count] A [Data] ... A P | 187 | S Addr Rd [A] [Count] A [Data] ... A P |
162 | 188 | ||
189 | Functionality flag: I2C_FUNC_SMBUS_BLOCK_PROC_CALL | ||
190 | |||
163 | 191 | ||
164 | SMBus Host Notify | 192 | SMBus Host Notify |
165 | ================= | 193 | ================= |
@@ -229,15 +257,7 @@ designated register that is specified through the Comm byte. | |||
229 | S Addr Wr [A] Comm [A] | 257 | S Addr Wr [A] Comm [A] |
230 | S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P | 258 | S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P |
231 | 259 | ||
232 | 260 | Functionality flag: I2C_FUNC_SMBUS_READ_I2C_BLOCK | |
233 | I2C Block Read (2 Comm bytes) | ||
234 | ============================= | ||
235 | |||
236 | This command reads a block of bytes from a device, from a | ||
237 | designated register that is specified through the two Comm bytes. | ||
238 | |||
239 | S Addr Wr [A] Comm1 [A] Comm2 [A] | ||
240 | S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P | ||
241 | 261 | ||
242 | 262 | ||
243 | I2C Block Write: i2c_smbus_write_i2c_block_data() | 263 | I2C Block Write: i2c_smbus_write_i2c_block_data() |
@@ -249,3 +269,5 @@ Comm byte. Note that command lengths of 0, 2, or more bytes are | |||
249 | supported as they are indistinguishable from data. | 269 | supported as they are indistinguishable from data. |
250 | 270 | ||
251 | S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P | 271 | S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P |
272 | |||
273 | Functionality flag: I2C_FUNC_SMBUS_WRITE_I2C_BLOCK | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 20e248cc03a9..363e348bff9b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -446,12 +446,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
446 | possible to determine what the correct size should be. | 446 | possible to determine what the correct size should be. |
447 | This option provides an override for these situations. | 447 | This option provides an override for these situations. |
448 | 448 | ||
449 | capability.disable= | ||
450 | [SECURITY] Disable capabilities. This would normally | ||
451 | be used only if an alternative security model is to be | ||
452 | configured. Potentially dangerous and should only be | ||
453 | used if you are entirely sure of the consequences. | ||
454 | |||
455 | ccw_timeout_log [S390] | 449 | ccw_timeout_log [S390] |
456 | See Documentation/s390/CommonIO for details. | 450 | See Documentation/s390/CommonIO for details. |
457 | 451 | ||
@@ -1503,9 +1497,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1503 | mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory | 1497 | mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory |
1504 | Amount of memory to be used when the kernel is not able | 1498 | Amount of memory to be used when the kernel is not able |
1505 | to see the whole system memory or for test. | 1499 | to see the whole system memory or for test. |
1506 | [X86-32] Use together with memmap= to avoid physical | 1500 | [X86] Work as limiting max address. Use together |
1507 | address space collisions. Without memmap= PCI devices | 1501 | with memmap= to avoid physical address space collisions. |
1508 | could be placed at addresses belonging to unused RAM. | 1502 | Without memmap= PCI devices could be placed at addresses |
1503 | belonging to unused RAM. | ||
1509 | 1504 | ||
1510 | mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel | 1505 | mem=nopentium [BUGS=X86-32] Disable usage of 4MB pages for kernel |
1511 | memory. | 1506 | memory. |
@@ -2032,6 +2027,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2032 | 2027 | ||
2033 | nr_uarts= [SERIAL] maximum number of UARTs to be registered. | 2028 | nr_uarts= [SERIAL] maximum number of UARTs to be registered. |
2034 | 2029 | ||
2030 | numa_balancing= [KNL,X86] Enable or disable automatic NUMA balancing. | ||
2031 | Allowed values are enable and disable | ||
2032 | |||
2035 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. | 2033 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. |
2036 | one of ['zone', 'node', 'default'] can be specified | 2034 | one of ['zone', 'node', 'default'] can be specified |
2037 | This can be set from sysctl after boot. | 2035 | This can be set from sysctl after boot. |
diff --git a/Documentation/kref.txt b/Documentation/kref.txt index 48ba715d5a63..ddf85a5dde0c 100644 --- a/Documentation/kref.txt +++ b/Documentation/kref.txt | |||
@@ -213,3 +213,91 @@ presentation on krefs, which can be found at: | |||
213 | and: | 213 | and: |
214 | http://www.kroah.com/linux/talks/ols_2004_kref_talk/ | 214 | http://www.kroah.com/linux/talks/ols_2004_kref_talk/ |
215 | 215 | ||
216 | |||
217 | The above example could also be optimized using kref_get_unless_zero() in | ||
218 | the following way: | ||
219 | |||
220 | static struct my_data *get_entry() | ||
221 | { | ||
222 | struct my_data *entry = NULL; | ||
223 | mutex_lock(&mutex); | ||
224 | if (!list_empty(&q)) { | ||
225 | entry = container_of(q.next, struct my_data, link); | ||
226 | if (!kref_get_unless_zero(&entry->refcount)) | ||
227 | entry = NULL; | ||
228 | } | ||
229 | mutex_unlock(&mutex); | ||
230 | return entry; | ||
231 | } | ||
232 | |||
233 | static void release_entry(struct kref *ref) | ||
234 | { | ||
235 | struct my_data *entry = container_of(ref, struct my_data, refcount); | ||
236 | |||
237 | mutex_lock(&mutex); | ||
238 | list_del(&entry->link); | ||
239 | mutex_unlock(&mutex); | ||
240 | kfree(entry); | ||
241 | } | ||
242 | |||
243 | static void put_entry(struct my_data *entry) | ||
244 | { | ||
245 | kref_put(&entry->refcount, release_entry); | ||
246 | } | ||
247 | |||
248 | Which is useful to remove the mutex lock around kref_put() in put_entry(), but | ||
249 | it's important that kref_get_unless_zero is enclosed in the same critical | ||
250 | section that finds the entry in the lookup table, | ||
251 | otherwise kref_get_unless_zero may reference already freed memory. | ||
252 | Note that it is illegal to use kref_get_unless_zero without checking its | ||
253 | return value. If you are sure (by already having a valid pointer) that | ||
254 | kref_get_unless_zero() will return true, then use kref_get() instead. | ||
255 | |||
256 | The function kref_get_unless_zero also makes it possible to use rcu | ||
257 | locking for lookups in the above example: | ||
258 | |||
259 | struct my_data | ||
260 | { | ||
261 | struct rcu_head rhead; | ||
262 | . | ||
263 | struct kref refcount; | ||
264 | . | ||
265 | . | ||
266 | }; | ||
267 | |||
268 | static struct my_data *get_entry_rcu() | ||
269 | { | ||
270 | struct my_data *entry = NULL; | ||
271 | rcu_read_lock(); | ||
272 | if (!list_empty(&q)) { | ||
273 | entry = container_of(q.next, struct my_data, link); | ||
274 | if (!kref_get_unless_zero(&entry->refcount)) | ||
275 | entry = NULL; | ||
276 | } | ||
277 | rcu_read_unlock(); | ||
278 | return entry; | ||
279 | } | ||
280 | |||
281 | static void release_entry_rcu(struct kref *ref) | ||
282 | { | ||
283 | struct my_data *entry = container_of(ref, struct my_data, refcount); | ||
284 | |||
285 | mutex_lock(&mutex); | ||
286 | list_del_rcu(&entry->link); | ||
287 | mutex_unlock(&mutex); | ||
288 | kfree_rcu(entry, rhead); | ||
289 | } | ||
290 | |||
291 | static void put_entry(struct my_data *entry) | ||
292 | { | ||
293 | kref_put(&entry->refcount, release_entry_rcu); | ||
294 | } | ||
295 | |||
296 | But note that the struct kref member needs to remain in valid memory for a | ||
297 | rcu grace period after release_entry_rcu was called. That can be accomplished | ||
298 | by using kfree_rcu(entry, rhead) as done above, or by calling synchronize_rcu() | ||
299 | before using kfree, but note that synchronize_rcu() may sleep for a | ||
300 | substantial amount of time. | ||
301 | |||
302 | |||
303 | Thomas Hellstrom <thellstrom@vmware.com> | ||
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt index c6f993d491b5..8e5eacbdcfa3 100644 --- a/Documentation/memory-hotplug.txt +++ b/Documentation/memory-hotplug.txt | |||
@@ -390,6 +390,7 @@ struct memory_notify { | |||
390 | unsigned long start_pfn; | 390 | unsigned long start_pfn; |
391 | unsigned long nr_pages; | 391 | unsigned long nr_pages; |
392 | int status_change_nid_normal; | 392 | int status_change_nid_normal; |
393 | int status_change_nid_high; | ||
393 | int status_change_nid; | 394 | int status_change_nid; |
394 | } | 395 | } |
395 | 396 | ||
@@ -397,7 +398,9 @@ start_pfn is start_pfn of online/offline memory. | |||
397 | nr_pages is # of pages of online/offline memory. | 398 | nr_pages is # of pages of online/offline memory. |
398 | status_change_nid_normal is set node id when N_NORMAL_MEMORY of nodemask | 399 | status_change_nid_normal is set node id when N_NORMAL_MEMORY of nodemask |
399 | is (will be) set/clear, if this is -1, then nodemask status is not changed. | 400 | is (will be) set/clear, if this is -1, then nodemask status is not changed. |
400 | status_change_nid is set node id when N_HIGH_MEMORY of nodemask is (will be) | 401 | status_change_nid_high is set node id when N_HIGH_MEMORY of nodemask |
402 | is (will be) set/clear, if this is -1, then nodemask status is not changed. | ||
403 | status_change_nid is set node id when N_MEMORY of nodemask is (will be) | ||
401 | set/clear. It means a new(memoryless) node gets new memory by online and a | 404 | set/clear. It means a new(memoryless) node gets new memory by online and a |
402 | node loses all memory. If this is -1, then nodemask status is not changed. | 405 | node loses all memory. If this is -1, then nodemask status is not changed. |
403 | If status_changed_nid* >= 0, callback should create/discard structures for the | 406 | If status_changed_nid* >= 0, callback should create/discard structures for the |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index dd52d516cb89..dbca66182089 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -36,7 +36,7 @@ neigh/default/unres_qlen_bytes - INTEGER | |||
36 | The maximum number of bytes which may be used by packets | 36 | The maximum number of bytes which may be used by packets |
37 | queued for each unresolved address by other network layers. | 37 | queued for each unresolved address by other network layers. |
38 | (added in linux 3.3) | 38 | (added in linux 3.3) |
39 | Seting negative value is meaningless and will retrun error. | 39 | Setting negative value is meaningless and will return error. |
40 | Default: 65536 Bytes(64KB) | 40 | Default: 65536 Bytes(64KB) |
41 | 41 | ||
42 | neigh/default/unres_qlen - INTEGER | 42 | neigh/default/unres_qlen - INTEGER |
@@ -215,7 +215,7 @@ tcp_ecn - INTEGER | |||
215 | Possible values are: | 215 | Possible values are: |
216 | 0 Disable ECN. Neither initiate nor accept ECN. | 216 | 0 Disable ECN. Neither initiate nor accept ECN. |
217 | 1 Always request ECN on outgoing connection attempts. | 217 | 1 Always request ECN on outgoing connection attempts. |
218 | 2 Enable ECN when requested by incomming connections | 218 | 2 Enable ECN when requested by incoming connections |
219 | but do not request ECN on outgoing connections. | 219 | but do not request ECN on outgoing connections. |
220 | Default: 2 | 220 | Default: 2 |
221 | 221 | ||
@@ -503,7 +503,7 @@ tcp_fastopen - INTEGER | |||
503 | tcp_syn_retries - INTEGER | 503 | tcp_syn_retries - INTEGER |
504 | Number of times initial SYNs for an active TCP connection attempt | 504 | Number of times initial SYNs for an active TCP connection attempt |
505 | will be retransmitted. Should not be higher than 255. Default value | 505 | will be retransmitted. Should not be higher than 255. Default value |
506 | is 6, which corresponds to 63seconds till the last restransmission | 506 | is 6, which corresponds to 63seconds till the last retransmission |
507 | with the current initial RTO of 1second. With this the final timeout | 507 | with the current initial RTO of 1second. With this the final timeout |
508 | for an active TCP connection attempt will happen after 127seconds. | 508 | for an active TCP connection attempt will happen after 127seconds. |
509 | 509 | ||
@@ -1331,6 +1331,12 @@ force_tllao - BOOLEAN | |||
1331 | race condition where the sender deletes the cached link-layer address | 1331 | race condition where the sender deletes the cached link-layer address |
1332 | prior to receiving a response to a previous solicitation." | 1332 | prior to receiving a response to a previous solicitation." |
1333 | 1333 | ||
1334 | ndisc_notify - BOOLEAN | ||
1335 | Define mode for notification of address and device changes. | ||
1336 | 0 - (default): do nothing | ||
1337 | 1 - Generate unsolicited neighbour advertisements when device is brought | ||
1338 | up or hardware address changes. | ||
1339 | |||
1334 | icmp/*: | 1340 | icmp/*: |
1335 | ratelimit - INTEGER | 1341 | ratelimit - INTEGER |
1336 | Limit the maximal rates for sending ICMPv6 packets. | 1342 | Limit the maximal rates for sending ICMPv6 packets. |
@@ -1530,7 +1536,7 @@ cookie_hmac_alg - STRING | |||
1530 | * sha1 | 1536 | * sha1 |
1531 | * none | 1537 | * none |
1532 | Ability to assign md5 or sha1 as the selected alg is predicated on the | 1538 | Ability to assign md5 or sha1 as the selected alg is predicated on the |
1533 | configuarion of those algorithms at build time (CONFIG_CRYPTO_MD5 and | 1539 | configuration of those algorithms at build time (CONFIG_CRYPTO_MD5 and |
1534 | CONFIG_CRYPTO_SHA1). | 1540 | CONFIG_CRYPTO_SHA1). |
1535 | 1541 | ||
1536 | Default: Dependent on configuration. MD5 if available, else SHA1 if | 1542 | Default: Dependent on configuration. MD5 if available, else SHA1 if |
@@ -1548,7 +1554,7 @@ rcvbuf_policy - INTEGER | |||
1548 | blocking. | 1554 | blocking. |
1549 | 1555 | ||
1550 | 1: rcvbuf space is per association | 1556 | 1: rcvbuf space is per association |
1551 | 0: recbuf space is per socket | 1557 | 0: rcvbuf space is per socket |
1552 | 1558 | ||
1553 | Default: 0 | 1559 | Default: 0 |
1554 | 1560 | ||
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt index 9c647bd7c5a9..3f10b39b0346 100644 --- a/Documentation/power/power_supply_class.txt +++ b/Documentation/power/power_supply_class.txt | |||
@@ -123,6 +123,9 @@ CONSTANT_CHARGE_VOLTAGE - constant charge voltage programmed by charger. | |||
123 | CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the | 123 | CONSTANT_CHARGE_VOLTAGE_MAX - maximum charge voltage supported by the |
124 | power supply object. | 124 | power supply object. |
125 | 125 | ||
126 | CHARGE_CONTROL_LIMIT - current charge control limit setting | ||
127 | CHARGE_CONTROL_LIMIT_MAX - maximum charge control limit setting | ||
128 | |||
126 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. | 129 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. |
127 | 130 | ||
128 | CAPACITY - capacity in percents. | 131 | CAPACITY - capacity in percents. |
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 4abe83e1045a..03591a750f99 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -642,12 +642,13 @@ out the following operations: | |||
642 | * During system suspend it calls pm_runtime_get_noresume() and | 642 | * During system suspend it calls pm_runtime_get_noresume() and |
643 | pm_runtime_barrier() for every device right before executing the | 643 | pm_runtime_barrier() for every device right before executing the |
644 | subsystem-level .suspend() callback for it. In addition to that it calls | 644 | subsystem-level .suspend() callback for it. In addition to that it calls |
645 | pm_runtime_disable() for every device right after executing the | 645 | __pm_runtime_disable() with 'false' as the second argument for every device |
646 | subsystem-level .suspend() callback for it. | 646 | right before executing the subsystem-level .suspend_late() callback for it. |
647 | 647 | ||
648 | * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() | 648 | * During system resume it calls pm_runtime_enable() and pm_runtime_put_sync() |
649 | for every device right before and right after executing the subsystem-level | 649 | for every device right after executing the subsystem-level .resume_early() |
650 | .resume() callback for it, respectively. | 650 | callback and right after executing the subsystem-level .resume() callback |
651 | for it, respectively. | ||
651 | 652 | ||
652 | 7. Generic subsystem callbacks | 653 | 7. Generic subsystem callbacks |
653 | 654 | ||
diff --git a/Documentation/powerpc/ptrace.txt b/Documentation/powerpc/ptrace.txt index f4a5499b7bc6..f2a7a3919772 100644 --- a/Documentation/powerpc/ptrace.txt +++ b/Documentation/powerpc/ptrace.txt | |||
@@ -127,6 +127,22 @@ Some examples of using the structure to: | |||
127 | p.addr2 = (uint64_t) end_range; | 127 | p.addr2 = (uint64_t) end_range; |
128 | p.condition_value = 0; | 128 | p.condition_value = 0; |
129 | 129 | ||
130 | - set a watchpoint in server processors (BookS) | ||
131 | |||
132 | p.version = 1; | ||
133 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW; | ||
134 | p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE; | ||
135 | or | ||
136 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
137 | |||
138 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
139 | p.addr = (uint64_t) begin_range; | ||
140 | /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where | ||
141 | * addr2 - addr <= 8 Bytes. | ||
142 | */ | ||
143 | p.addr2 = (uint64_t) end_range; | ||
144 | p.condition_value = 0; | ||
145 | |||
130 | 3. PTRACE_DELHWDEBUG | 146 | 3. PTRACE_DELHWDEBUG |
131 | 147 | ||
132 | Takes an integer which identifies an existing breakpoint or watchpoint | 148 | Takes an integer which identifies an existing breakpoint or watchpoint |
diff --git a/Documentation/prctl/seccomp_filter.txt b/Documentation/prctl/seccomp_filter.txt index 597c3c581375..1e469ef75778 100644 --- a/Documentation/prctl/seccomp_filter.txt +++ b/Documentation/prctl/seccomp_filter.txt | |||
@@ -95,12 +95,15 @@ SECCOMP_RET_KILL: | |||
95 | 95 | ||
96 | SECCOMP_RET_TRAP: | 96 | SECCOMP_RET_TRAP: |
97 | Results in the kernel sending a SIGSYS signal to the triggering | 97 | Results in the kernel sending a SIGSYS signal to the triggering |
98 | task without executing the system call. The kernel will | 98 | task without executing the system call. siginfo->si_call_addr |
99 | rollback the register state to just before the system call | 99 | will show the address of the system call instruction, and |
100 | entry such that a signal handler in the task will be able to | 100 | siginfo->si_syscall and siginfo->si_arch will indicate which |
101 | inspect the ucontext_t->uc_mcontext registers and emulate | 101 | syscall was attempted. The program counter will be as though |
102 | system call success or failure upon return from the signal | 102 | the syscall happened (i.e. it will not point to the syscall |
103 | handler. | 103 | instruction). The return value register will contain an arch- |
104 | dependent value -- if resuming execution, set it to something | ||
105 | sensible. (The architecture dependency is because replacing | ||
106 | it with -ENOSYS could overwrite some useful information.) | ||
104 | 107 | ||
105 | The SECCOMP_RET_DATA portion of the return value will be passed | 108 | The SECCOMP_RET_DATA portion of the return value will be passed |
106 | as si_errno. | 109 | as si_errno. |
@@ -123,6 +126,18 @@ SECCOMP_RET_TRACE: | |||
123 | the BPF program return value will be available to the tracer | 126 | the BPF program return value will be available to the tracer |
124 | via PTRACE_GETEVENTMSG. | 127 | via PTRACE_GETEVENTMSG. |
125 | 128 | ||
129 | The tracer can skip the system call by changing the syscall number | ||
130 | to -1. Alternatively, the tracer can change the system call | ||
131 | requested by changing the system call to a valid syscall number. If | ||
132 | the tracer asks to skip the system call, then the system call will | ||
133 | appear to return the value that the tracer puts in the return value | ||
134 | register. | ||
135 | |||
136 | The seccomp check will not be run again after the tracer is | ||
137 | notified. (This means that seccomp-based sandboxes MUST NOT | ||
138 | allow use of ptrace, even of other sandboxed processes, without | ||
139 | extreme care; ptracers can use this mechanism to escape.) | ||
140 | |||
126 | SECCOMP_RET_ALLOW: | 141 | SECCOMP_RET_ALLOW: |
127 | Results in the system call being executed. | 142 | Results in the system call being executed. |
128 | 143 | ||
@@ -161,3 +176,50 @@ architecture supports both ptrace_event and seccomp, it will be able to | |||
161 | support seccomp filter with minor fixup: SIGSYS support and seccomp return | 176 | support seccomp filter with minor fixup: SIGSYS support and seccomp return |
162 | value checking. Then it must just add CONFIG_HAVE_ARCH_SECCOMP_FILTER | 177 | value checking. Then it must just add CONFIG_HAVE_ARCH_SECCOMP_FILTER |
163 | to its arch-specific Kconfig. | 178 | to its arch-specific Kconfig. |
179 | |||
180 | |||
181 | |||
182 | Caveats | ||
183 | ------- | ||
184 | |||
185 | The vDSO can cause some system calls to run entirely in userspace, | ||
186 | leading to surprises when you run programs on different machines that | ||
187 | fall back to real syscalls. To minimize these surprises on x86, make | ||
188 | sure you test with | ||
189 | /sys/devices/system/clocksource/clocksource0/current_clocksource set to | ||
190 | something like acpi_pm. | ||
191 | |||
192 | On x86-64, vsyscall emulation is enabled by default. (vsyscalls are | ||
193 | legacy variants on vDSO calls.) Currently, emulated vsyscalls will honor seccomp, with a few oddities: | ||
194 | |||
195 | - A return value of SECCOMP_RET_TRAP will set a si_call_addr pointing to | ||
196 | the vsyscall entry for the given call and not the address after the | ||
197 | 'syscall' instruction. Any code which wants to restart the call | ||
198 | should be aware that (a) a ret instruction has been emulated and (b) | ||
199 | trying to resume the syscall will again trigger the standard vsyscall | ||
200 | emulation security checks, making resuming the syscall mostly | ||
201 | pointless. | ||
202 | |||
203 | - A return value of SECCOMP_RET_TRACE will signal the tracer as usual, | ||
204 | but the syscall may not be changed to another system call using the | ||
205 | orig_rax register. It may only be changed to -1 order to skip the | ||
206 | currently emulated call. Any other change MAY terminate the process. | ||
207 | The rip value seen by the tracer will be the syscall entry address; | ||
208 | this is different from normal behavior. The tracer MUST NOT modify | ||
209 | rip or rsp. (Do not rely on other changes terminating the process. | ||
210 | They might work. For example, on some kernels, choosing a syscall | ||
211 | that only exists in future kernels will be correctly emulated (by | ||
212 | returning -ENOSYS). | ||
213 | |||
214 | To detect this quirky behavior, check for addr & ~0x0C00 == | ||
215 | 0xFFFFFFFFFF600000. (For SECCOMP_RET_TRACE, use rip. For | ||
216 | SECCOMP_RET_TRAP, use siginfo->si_call_addr.) Do not check any other | ||
217 | condition: future kernels may improve vsyscall emulation and current | ||
218 | kernels in vsyscall=native mode will behave differently, but the | ||
219 | instructions at 0xF...F600{0,4,8,C}00 will not be system calls in these | ||
220 | cases. | ||
221 | |||
222 | Note that modern systems are unlikely to use vsyscalls at all -- they | ||
223 | are a legacy feature and they are considerably slower than standard | ||
224 | syscalls. New code will use the vDSO, and vDSO-issued system calls | ||
225 | are indistinguishable from normal system calls. | ||
diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt index 409d9f964c5b..f7edc3aa1e92 100644 --- a/Documentation/rpmsg.txt +++ b/Documentation/rpmsg.txt | |||
@@ -236,7 +236,7 @@ static int rpmsg_sample_probe(struct rpmsg_channel *rpdev) | |||
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | static void __devexit rpmsg_sample_remove(struct rpmsg_channel *rpdev) | 239 | static void rpmsg_sample_remove(struct rpmsg_channel *rpdev) |
240 | { | 240 | { |
241 | dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); | 241 | dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); |
242 | } | 242 | } |
@@ -253,7 +253,7 @@ static struct rpmsg_driver rpmsg_sample_client = { | |||
253 | .id_table = rpmsg_driver_sample_id_table, | 253 | .id_table = rpmsg_driver_sample_id_table, |
254 | .probe = rpmsg_sample_probe, | 254 | .probe = rpmsg_sample_probe, |
255 | .callback = rpmsg_sample_cb, | 255 | .callback = rpmsg_sample_cb, |
256 | .remove = __devexit_p(rpmsg_sample_remove), | 256 | .remove = rpmsg_sample_remove, |
257 | }; | 257 | }; |
258 | 258 | ||
259 | static int __init init(void) | 259 | static int __init init(void) |
diff --git a/Documentation/scsi/hptiop.txt b/Documentation/scsi/hptiop.txt index 9605179711f4..4a4f47e759cd 100644 --- a/Documentation/scsi/hptiop.txt +++ b/Documentation/scsi/hptiop.txt | |||
@@ -37,7 +37,7 @@ For Intel IOP based adapters, the controller IOP is accessed via PCI BAR0: | |||
37 | 0x40 Inbound Queue Port | 37 | 0x40 Inbound Queue Port |
38 | 0x44 Outbound Queue Port | 38 | 0x44 Outbound Queue Port |
39 | 39 | ||
40 | For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: | 40 | For Marvell not Frey IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: |
41 | 41 | ||
42 | BAR0 offset Register | 42 | BAR0 offset Register |
43 | 0x20400 Inbound Doorbell Register | 43 | 0x20400 Inbound Doorbell Register |
@@ -55,9 +55,31 @@ For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: | |||
55 | 0x40-0x1040 Inbound Queue | 55 | 0x40-0x1040 Inbound Queue |
56 | 0x1040-0x2040 Outbound Queue | 56 | 0x1040-0x2040 Outbound Queue |
57 | 57 | ||
58 | For Marvell Frey IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1: | ||
58 | 59 | ||
59 | I/O Request Workflow | 60 | BAR0 offset Register |
60 | ---------------------- | 61 | 0x0 IOP configuration information. |
62 | |||
63 | BAR1 offset Register | ||
64 | 0x4000 Inbound List Base Address Low | ||
65 | 0x4004 Inbound List Base Address High | ||
66 | 0x4018 Inbound List Write Pointer | ||
67 | 0x402C Inbound List Configuration and Control | ||
68 | 0x4050 Outbound List Base Address Low | ||
69 | 0x4054 Outbound List Base Address High | ||
70 | 0x4058 Outbound List Copy Pointer Shadow Base Address Low | ||
71 | 0x405C Outbound List Copy Pointer Shadow Base Address High | ||
72 | 0x4088 Outbound List Interrupt Cause | ||
73 | 0x408C Outbound List Interrupt Enable | ||
74 | 0x1020C PCIe Function 0 Interrupt Enable | ||
75 | 0x10400 PCIe Function 0 to CPU Message A | ||
76 | 0x10420 CPU to PCIe Function 0 Message A | ||
77 | 0x10480 CPU to PCIe Function 0 Doorbell | ||
78 | 0x10484 CPU to PCIe Function 0 Doorbell Enable | ||
79 | |||
80 | |||
81 | I/O Request Workflow of Not Marvell Frey | ||
82 | ------------------------------------------ | ||
61 | 83 | ||
62 | All queued requests are handled via inbound/outbound queue port. | 84 | All queued requests are handled via inbound/outbound queue port. |
63 | A request packet can be allocated in either IOP or host memory. | 85 | A request packet can be allocated in either IOP or host memory. |
@@ -101,6 +123,45 @@ register 0. An outbound message with the same value indicates the completion | |||
101 | of an inbound message. | 123 | of an inbound message. |
102 | 124 | ||
103 | 125 | ||
126 | I/O Request Workflow of Marvell Frey | ||
127 | -------------------------------------- | ||
128 | |||
129 | All queued requests are handled via inbound/outbound list. | ||
130 | |||
131 | To send a request to the controller: | ||
132 | |||
133 | - Allocate a free request in host DMA coherent memory. | ||
134 | |||
135 | Requests allocated in host memory must be aligned on 32-bytes boundary. | ||
136 | |||
137 | - Fill the request with index of the request in the flag. | ||
138 | |||
139 | Fill a free inbound list unit with the physical address and the size of | ||
140 | the request. | ||
141 | |||
142 | Set up the inbound list write pointer with the index of previous unit, | ||
143 | round to 0 if the index reaches the supported count of requests. | ||
144 | |||
145 | - Post the inbound list writer pointer to IOP. | ||
146 | |||
147 | - The IOP process the request. When the request is completed, the flag of | ||
148 | the request with or-ed IOPMU_QUEUE_MASK_HOST_BITS will be put into a | ||
149 | free outbound list unit and the index of the outbound list unit will be | ||
150 | put into the copy pointer shadow register. An outbound interrupt will be | ||
151 | generated. | ||
152 | |||
153 | - The host read the outbound list copy pointer shadow register and compare | ||
154 | with previous saved read ponter N. If they are different, the host will | ||
155 | read the (N+1)th outbound list unit. | ||
156 | |||
157 | The host get the index of the request from the (N+1)th outbound list | ||
158 | unit and complete the request. | ||
159 | |||
160 | Non-queued requests (reset communication/reset/flush etc) can be sent via PCIe | ||
161 | Function 0 to CPU Message A register. The CPU to PCIe Function 0 Message register | ||
162 | with the same value indicates the completion of message. | ||
163 | |||
164 | |||
104 | User-level Interface | 165 | User-level Interface |
105 | --------------------- | 166 | --------------------- |
106 | 167 | ||
@@ -112,7 +173,7 @@ The driver exposes following sysfs attributes: | |||
112 | 173 | ||
113 | 174 | ||
114 | ----------------------------------------------------------------------------- | 175 | ----------------------------------------------------------------------------- |
115 | Copyright (C) 2006-2009 HighPoint Technologies, Inc. All Rights Reserved. | 176 | Copyright (C) 2006-2012 HighPoint Technologies, Inc. All Rights Reserved. |
116 | 177 | ||
117 | This file is distributed in the hope that it will be useful, | 178 | This file is distributed in the hope that it will be useful, |
118 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 179 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
diff --git a/Documentation/security/00-INDEX b/Documentation/security/00-INDEX index eeed1de546d4..414235c1fcfc 100644 --- a/Documentation/security/00-INDEX +++ b/Documentation/security/00-INDEX | |||
@@ -12,6 +12,8 @@ apparmor.txt | |||
12 | - documentation on the AppArmor security extension. | 12 | - documentation on the AppArmor security extension. |
13 | credentials.txt | 13 | credentials.txt |
14 | - documentation about credentials in Linux. | 14 | - documentation about credentials in Linux. |
15 | keys-ecryptfs.txt | ||
16 | - description of the encryption keys for the ecryptfs filesystem. | ||
15 | keys-request-key.txt | 17 | keys-request-key.txt |
16 | - description of the kernel key request service. | 18 | - description of the kernel key request service. |
17 | keys-trusted-encrypted.txt | 19 | keys-trusted-encrypted.txt |
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index 7d9ca92022d8..7b4145d00452 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt | |||
@@ -994,6 +994,23 @@ payload contents" for more information. | |||
994 | reference pointer if successful. | 994 | reference pointer if successful. |
995 | 995 | ||
996 | 996 | ||
997 | (*) A keyring can be created by: | ||
998 | |||
999 | struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | ||
1000 | const struct cred *cred, | ||
1001 | key_perm_t perm, | ||
1002 | unsigned long flags, | ||
1003 | struct key *dest); | ||
1004 | |||
1005 | This creates a keyring with the given attributes and returns it. If dest | ||
1006 | is not NULL, the new keyring will be linked into the keyring to which it | ||
1007 | points. No permission checks are made upon the destination keyring. | ||
1008 | |||
1009 | Error EDQUOT can be returned if the keyring would overload the quota (pass | ||
1010 | KEY_ALLOC_NOT_IN_QUOTA in flags if the keyring shouldn't be accounted | ||
1011 | towards the user's quota). Error ENOMEM can also be returned. | ||
1012 | |||
1013 | |||
997 | (*) To check the validity of a key, this function can be called: | 1014 | (*) To check the validity of a key, this function can be called: |
998 | 1015 | ||
999 | int validate_key(struct key *key); | 1016 | int validate_key(struct key *key); |
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 4909d4116356..eceab1308a8c 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt | |||
@@ -49,6 +49,24 @@ be generated without __CHECK_ENDIAN__. | |||
49 | __bitwise - noisy stuff; in particular, __le*/__be* are that. We really | 49 | __bitwise - noisy stuff; in particular, __le*/__be* are that. We really |
50 | don't want to drown in noise unless we'd explicitly asked for it. | 50 | don't want to drown in noise unless we'd explicitly asked for it. |
51 | 51 | ||
52 | Using sparse for lock checking | ||
53 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
54 | |||
55 | The following macros are undefined for gcc and defined during a sparse | ||
56 | run to use the "context" tracking feature of sparse, applied to | ||
57 | locking. These annotations tell sparse when a lock is held, with | ||
58 | regard to the annotated function's entry and exit. | ||
59 | |||
60 | __must_hold - The specified lock is held on function entry and exit. | ||
61 | |||
62 | __acquires - The specified lock is held on function exit, but not entry. | ||
63 | |||
64 | __releases - The specified lock is held on function entry, but not exit. | ||
65 | |||
66 | If the function enters and exits without the lock held, acquiring and | ||
67 | releasing the lock inside the function in a balanced way, no | ||
68 | annotation is needed. The tree annotations above are for cases where | ||
69 | sparse would otherwise report a context imbalance. | ||
52 | 70 | ||
53 | Getting sparse | 71 | Getting sparse |
54 | ~~~~~~~~~~~~~~ | 72 | ~~~~~~~~~~~~~~ |
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary index 7312ec14dd89..2331eb214146 100644 --- a/Documentation/spi/spi-summary +++ b/Documentation/spi/spi-summary | |||
@@ -345,7 +345,7 @@ SPI protocol drivers somewhat resemble platform device drivers: | |||
345 | }, | 345 | }, |
346 | 346 | ||
347 | .probe = CHIP_probe, | 347 | .probe = CHIP_probe, |
348 | .remove = __devexit_p(CHIP_remove), | 348 | .remove = CHIP_remove, |
349 | .suspend = CHIP_suspend, | 349 | .suspend = CHIP_suspend, |
350 | .resume = CHIP_resume, | 350 | .resume = CHIP_resume, |
351 | }; | 351 | }; |
@@ -355,7 +355,7 @@ device whose board_info gave a modalias of "CHIP". Your probe() code | |||
355 | might look like this unless you're creating a device which is managing | 355 | might look like this unless you're creating a device which is managing |
356 | a bus (appearing under /sys/class/spi_master). | 356 | a bus (appearing under /sys/class/spi_master). |
357 | 357 | ||
358 | static int __devinit CHIP_probe(struct spi_device *spi) | 358 | static int CHIP_probe(struct spi_device *spi) |
359 | { | 359 | { |
360 | struct CHIP *chip; | 360 | struct CHIP *chip; |
361 | struct CHIP_platform_data *pdata; | 361 | struct CHIP_platform_data *pdata; |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 2907ba6c3607..ccd42589e124 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -38,6 +38,7 @@ show up in /proc/sys/kernel: | |||
38 | - l2cr [ PPC only ] | 38 | - l2cr [ PPC only ] |
39 | - modprobe ==> Documentation/debugging-modules.txt | 39 | - modprobe ==> Documentation/debugging-modules.txt |
40 | - modules_disabled | 40 | - modules_disabled |
41 | - msg_next_id [ sysv ipc ] | ||
41 | - msgmax | 42 | - msgmax |
42 | - msgmnb | 43 | - msgmnb |
43 | - msgmni | 44 | - msgmni |
@@ -62,7 +63,9 @@ show up in /proc/sys/kernel: | |||
62 | - rtsig-max | 63 | - rtsig-max |
63 | - rtsig-nr | 64 | - rtsig-nr |
64 | - sem | 65 | - sem |
66 | - sem_next_id [ sysv ipc ] | ||
65 | - sg-big-buff [ generic SCSI device (sg) ] | 67 | - sg-big-buff [ generic SCSI device (sg) ] |
68 | - shm_next_id [ sysv ipc ] | ||
66 | - shm_rmid_forced | 69 | - shm_rmid_forced |
67 | - shmall | 70 | - shmall |
68 | - shmmax [ sysv ipc ] | 71 | - shmmax [ sysv ipc ] |
@@ -320,6 +323,22 @@ to false. | |||
320 | 323 | ||
321 | ============================================================== | 324 | ============================================================== |
322 | 325 | ||
326 | msg_next_id, sem_next_id, and shm_next_id: | ||
327 | |||
328 | These three toggles allows to specify desired id for next allocated IPC | ||
329 | object: message, semaphore or shared memory respectively. | ||
330 | |||
331 | By default they are equal to -1, which means generic allocation logic. | ||
332 | Possible values to set are in range {0..INT_MAX}. | ||
333 | |||
334 | Notes: | ||
335 | 1) kernel doesn't guarantee, that new object will have desired id. So, | ||
336 | it's up to userspace, how to handle an object with "wrong" id. | ||
337 | 2) Toggle with non-default value will be set back to -1 by kernel after | ||
338 | successful IPC object allocation. | ||
339 | |||
340 | ============================================================== | ||
341 | |||
323 | nmi_watchdog: | 342 | nmi_watchdog: |
324 | 343 | ||
325 | Enables/Disables the NMI watchdog on x86 systems. When the value is | 344 | Enables/Disables the NMI watchdog on x86 systems. When the value is |
@@ -542,6 +561,19 @@ are doing anyway :) | |||
542 | 561 | ||
543 | ============================================================== | 562 | ============================================================== |
544 | 563 | ||
564 | shmall: | ||
565 | |||
566 | This parameter sets the total amount of shared memory pages that | ||
567 | can be used system wide. Hence, SHMALL should always be at least | ||
568 | ceil(shmmax/PAGE_SIZE). | ||
569 | |||
570 | If you are not sure what the default PAGE_SIZE is on your Linux | ||
571 | system, you can run the following command: | ||
572 | |||
573 | # getconf PAGE_SIZE | ||
574 | |||
575 | ============================================================== | ||
576 | |||
545 | shmmax: | 577 | shmmax: |
546 | 578 | ||
547 | This value can be used to query and set the run time limit | 579 | This value can be used to query and set the run time limit |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 32bfe926e8d7..b89567ad04b7 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -174,8 +174,7 @@ The recommended approach is as follows: | |||
174 | 174 | ||
175 | static atomic_t drv_instance = ATOMIC_INIT(0); | 175 | static atomic_t drv_instance = ATOMIC_INIT(0); |
176 | 176 | ||
177 | static int __devinit drv_probe(struct pci_dev *pdev, | 177 | static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) |
178 | const struct pci_device_id *pci_id) | ||
179 | { | 178 | { |
180 | ... | 179 | ... |
181 | state->instance = atomic_inc_return(&drv_instance) - 1; | 180 | state->instance = atomic_inc_return(&drv_instance) - 1; |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index f6ec3a92e621..a4df5535996b 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -1194,12 +1194,15 @@ struct kvm_ppc_pvinfo { | |||
1194 | This ioctl fetches PV specific information that need to be passed to the guest | 1194 | This ioctl fetches PV specific information that need to be passed to the guest |
1195 | using the device tree or other means from vm context. | 1195 | using the device tree or other means from vm context. |
1196 | 1196 | ||
1197 | For now the only implemented piece of information distributed here is an array | 1197 | The hcall array defines 4 instructions that make up a hypercall. |
1198 | of 4 instructions that make up a hypercall. | ||
1199 | 1198 | ||
1200 | If any additional field gets added to this structure later on, a bit for that | 1199 | If any additional field gets added to this structure later on, a bit for that |
1201 | additional piece of information will be set in the flags bitmap. | 1200 | additional piece of information will be set in the flags bitmap. |
1202 | 1201 | ||
1202 | The flags bitmap is defined as: | ||
1203 | |||
1204 | /* the host supports the ePAPR idle hcall | ||
1205 | #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0) | ||
1203 | 1206 | ||
1204 | 4.48 KVM_ASSIGN_PCI_DEVICE | 1207 | 4.48 KVM_ASSIGN_PCI_DEVICE |
1205 | 1208 | ||
@@ -1731,7 +1734,46 @@ registers, find a list below: | |||
1731 | Arch | Register | Width (bits) | 1734 | Arch | Register | Width (bits) |
1732 | | | | 1735 | | | |
1733 | PPC | KVM_REG_PPC_HIOR | 64 | 1736 | PPC | KVM_REG_PPC_HIOR | 64 |
1734 | 1737 | PPC | KVM_REG_PPC_IAC1 | 64 | |
1738 | PPC | KVM_REG_PPC_IAC2 | 64 | ||
1739 | PPC | KVM_REG_PPC_IAC3 | 64 | ||
1740 | PPC | KVM_REG_PPC_IAC4 | 64 | ||
1741 | PPC | KVM_REG_PPC_DAC1 | 64 | ||
1742 | PPC | KVM_REG_PPC_DAC2 | 64 | ||
1743 | PPC | KVM_REG_PPC_DABR | 64 | ||
1744 | PPC | KVM_REG_PPC_DSCR | 64 | ||
1745 | PPC | KVM_REG_PPC_PURR | 64 | ||
1746 | PPC | KVM_REG_PPC_SPURR | 64 | ||
1747 | PPC | KVM_REG_PPC_DAR | 64 | ||
1748 | PPC | KVM_REG_PPC_DSISR | 32 | ||
1749 | PPC | KVM_REG_PPC_AMR | 64 | ||
1750 | PPC | KVM_REG_PPC_UAMOR | 64 | ||
1751 | PPC | KVM_REG_PPC_MMCR0 | 64 | ||
1752 | PPC | KVM_REG_PPC_MMCR1 | 64 | ||
1753 | PPC | KVM_REG_PPC_MMCRA | 64 | ||
1754 | PPC | KVM_REG_PPC_PMC1 | 32 | ||
1755 | PPC | KVM_REG_PPC_PMC2 | 32 | ||
1756 | PPC | KVM_REG_PPC_PMC3 | 32 | ||
1757 | PPC | KVM_REG_PPC_PMC4 | 32 | ||
1758 | PPC | KVM_REG_PPC_PMC5 | 32 | ||
1759 | PPC | KVM_REG_PPC_PMC6 | 32 | ||
1760 | PPC | KVM_REG_PPC_PMC7 | 32 | ||
1761 | PPC | KVM_REG_PPC_PMC8 | 32 | ||
1762 | PPC | KVM_REG_PPC_FPR0 | 64 | ||
1763 | ... | ||
1764 | PPC | KVM_REG_PPC_FPR31 | 64 | ||
1765 | PPC | KVM_REG_PPC_VR0 | 128 | ||
1766 | ... | ||
1767 | PPC | KVM_REG_PPC_VR31 | 128 | ||
1768 | PPC | KVM_REG_PPC_VSR0 | 128 | ||
1769 | ... | ||
1770 | PPC | KVM_REG_PPC_VSR31 | 128 | ||
1771 | PPC | KVM_REG_PPC_FPSCR | 64 | ||
1772 | PPC | KVM_REG_PPC_VSCR | 32 | ||
1773 | PPC | KVM_REG_PPC_VPA_ADDR | 64 | ||
1774 | PPC | KVM_REG_PPC_VPA_SLB | 128 | ||
1775 | PPC | KVM_REG_PPC_VPA_DTL | 128 | ||
1776 | PPC | KVM_REG_PPC_EPCR | 32 | ||
1735 | 1777 | ||
1736 | 4.69 KVM_GET_ONE_REG | 1778 | 4.69 KVM_GET_ONE_REG |
1737 | 1779 | ||
@@ -1747,7 +1789,7 @@ kvm_one_reg struct passed in. On success, the register value can be found | |||
1747 | at the memory location pointed to by "addr". | 1789 | at the memory location pointed to by "addr". |
1748 | 1790 | ||
1749 | The list of registers accessible using this interface is identical to the | 1791 | The list of registers accessible using this interface is identical to the |
1750 | list in 4.64. | 1792 | list in 4.68. |
1751 | 1793 | ||
1752 | 1794 | ||
1753 | 4.70 KVM_KVMCLOCK_CTRL | 1795 | 4.70 KVM_KVMCLOCK_CTRL |
@@ -1997,6 +2039,93 @@ return the hash table order in the parameter. (If the guest is using | |||
1997 | the virtualized real-mode area (VRMA) facility, the kernel will | 2039 | the virtualized real-mode area (VRMA) facility, the kernel will |
1998 | re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) | 2040 | re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) |
1999 | 2041 | ||
2042 | 4.77 KVM_S390_INTERRUPT | ||
2043 | |||
2044 | Capability: basic | ||
2045 | Architectures: s390 | ||
2046 | Type: vm ioctl, vcpu ioctl | ||
2047 | Parameters: struct kvm_s390_interrupt (in) | ||
2048 | Returns: 0 on success, -1 on error | ||
2049 | |||
2050 | Allows to inject an interrupt to the guest. Interrupts can be floating | ||
2051 | (vm ioctl) or per cpu (vcpu ioctl), depending on the interrupt type. | ||
2052 | |||
2053 | Interrupt parameters are passed via kvm_s390_interrupt: | ||
2054 | |||
2055 | struct kvm_s390_interrupt { | ||
2056 | __u32 type; | ||
2057 | __u32 parm; | ||
2058 | __u64 parm64; | ||
2059 | }; | ||
2060 | |||
2061 | type can be one of the following: | ||
2062 | |||
2063 | KVM_S390_SIGP_STOP (vcpu) - sigp restart | ||
2064 | KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm | ||
2065 | KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm | ||
2066 | KVM_S390_RESTART (vcpu) - restart | ||
2067 | KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt | ||
2068 | parameters in parm and parm64 | ||
2069 | KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm | ||
2070 | KVM_S390_INT_EMERGENCY (vcpu) - sigp emergency; source cpu in parm | ||
2071 | KVM_S390_INT_EXTERNAL_CALL (vcpu) - sigp external call; source cpu in parm | ||
2072 | |||
2073 | Note that the vcpu ioctl is asynchronous to vcpu execution. | ||
2074 | |||
2075 | 4.78 KVM_PPC_GET_HTAB_FD | ||
2076 | |||
2077 | Capability: KVM_CAP_PPC_HTAB_FD | ||
2078 | Architectures: powerpc | ||
2079 | Type: vm ioctl | ||
2080 | Parameters: Pointer to struct kvm_get_htab_fd (in) | ||
2081 | Returns: file descriptor number (>= 0) on success, -1 on error | ||
2082 | |||
2083 | This returns a file descriptor that can be used either to read out the | ||
2084 | entries in the guest's hashed page table (HPT), or to write entries to | ||
2085 | initialize the HPT. The returned fd can only be written to if the | ||
2086 | KVM_GET_HTAB_WRITE bit is set in the flags field of the argument, and | ||
2087 | can only be read if that bit is clear. The argument struct looks like | ||
2088 | this: | ||
2089 | |||
2090 | /* For KVM_PPC_GET_HTAB_FD */ | ||
2091 | struct kvm_get_htab_fd { | ||
2092 | __u64 flags; | ||
2093 | __u64 start_index; | ||
2094 | __u64 reserved[2]; | ||
2095 | }; | ||
2096 | |||
2097 | /* Values for kvm_get_htab_fd.flags */ | ||
2098 | #define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1) | ||
2099 | #define KVM_GET_HTAB_WRITE ((__u64)0x2) | ||
2100 | |||
2101 | The `start_index' field gives the index in the HPT of the entry at | ||
2102 | which to start reading. It is ignored when writing. | ||
2103 | |||
2104 | Reads on the fd will initially supply information about all | ||
2105 | "interesting" HPT entries. Interesting entries are those with the | ||
2106 | bolted bit set, if the KVM_GET_HTAB_BOLTED_ONLY bit is set, otherwise | ||
2107 | all entries. When the end of the HPT is reached, the read() will | ||
2108 | return. If read() is called again on the fd, it will start again from | ||
2109 | the beginning of the HPT, but will only return HPT entries that have | ||
2110 | changed since they were last read. | ||
2111 | |||
2112 | Data read or written is structured as a header (8 bytes) followed by a | ||
2113 | series of valid HPT entries (16 bytes) each. The header indicates how | ||
2114 | many valid HPT entries there are and how many invalid entries follow | ||
2115 | the valid entries. The invalid entries are not represented explicitly | ||
2116 | in the stream. The header format is: | ||
2117 | |||
2118 | struct kvm_get_htab_header { | ||
2119 | __u32 index; | ||
2120 | __u16 n_valid; | ||
2121 | __u16 n_invalid; | ||
2122 | }; | ||
2123 | |||
2124 | Writes to the fd create HPT entries starting at the index given in the | ||
2125 | header; first `n_valid' valid entries with contents from the data | ||
2126 | written, then `n_invalid' invalid entries, invalidating any previously | ||
2127 | valid entries found. | ||
2128 | |||
2000 | 2129 | ||
2001 | 5. The kvm_run structure | 2130 | 5. The kvm_run structure |
2002 | ------------------------ | 2131 | ------------------------ |
@@ -2109,7 +2238,8 @@ executed a memory-mapped I/O instruction which could not be satisfied | |||
2109 | by kvm. The 'data' member contains the written data if 'is_write' is | 2238 | by kvm. The 'data' member contains the written data if 'is_write' is |
2110 | true, and should be filled by application code otherwise. | 2239 | true, and should be filled by application code otherwise. |
2111 | 2240 | ||
2112 | NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO and KVM_EXIT_OSI, the corresponding | 2241 | NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR |
2242 | and KVM_EXIT_PAPR the corresponding | ||
2113 | operations are complete (and guest state is consistent) only after userspace | 2243 | operations are complete (and guest state is consistent) only after userspace |
2114 | has re-entered the kernel with KVM_RUN. The kernel side will first finish | 2244 | has re-entered the kernel with KVM_RUN. The kernel side will first finish |
2115 | incomplete operations and then check for pending signals. Userspace | 2245 | incomplete operations and then check for pending signals. Userspace |
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index f734bb2a78dc..8785fb87d9c7 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
@@ -116,6 +116,13 @@ echo always >/sys/kernel/mm/transparent_hugepage/defrag | |||
116 | echo madvise >/sys/kernel/mm/transparent_hugepage/defrag | 116 | echo madvise >/sys/kernel/mm/transparent_hugepage/defrag |
117 | echo never >/sys/kernel/mm/transparent_hugepage/defrag | 117 | echo never >/sys/kernel/mm/transparent_hugepage/defrag |
118 | 118 | ||
119 | By default kernel tries to use huge zero page on read page fault. | ||
120 | It's possible to disable huge zero page by writing 0 or enable it | ||
121 | back by writing 1: | ||
122 | |||
123 | echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page | ||
124 | echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page | ||
125 | |||
119 | khugepaged will be automatically started when | 126 | khugepaged will be automatically started when |
120 | transparent_hugepage/enabled is set to "always" or "madvise, and it'll | 127 | transparent_hugepage/enabled is set to "always" or "madvise, and it'll |
121 | be automatically shutdown if it's set to "never". | 128 | be automatically shutdown if it's set to "never". |
@@ -197,6 +204,14 @@ thp_split is incremented every time a huge page is split into base | |||
197 | pages. This can happen for a variety of reasons but a common | 204 | pages. This can happen for a variety of reasons but a common |
198 | reason is that a huge page is old and is being reclaimed. | 205 | reason is that a huge page is old and is being reclaimed. |
199 | 206 | ||
207 | thp_zero_page_alloc is incremented every time a huge zero page is | ||
208 | successfully allocated. It includes allocations which where | ||
209 | dropped due race with other allocation. Note, it doesn't count | ||
210 | every map of the huge zero page, only its allocation. | ||
211 | |||
212 | thp_zero_page_alloc_failed is incremented if kernel fails to allocate | ||
213 | huge zero page and falls back to using small pages. | ||
214 | |||
200 | As the system ages, allocating huge pages may be expensive as the | 215 | As the system ages, allocating huge pages may be expensive as the |
201 | system uses memory compaction to copy data around memory to free a | 216 | system uses memory compaction to copy data around memory to free a |
202 | huge page for use. There are some counters in /proc/vmstat to help | 217 | huge page for use. There are some counters in /proc/vmstat to help |
@@ -276,7 +291,7 @@ unaffected. libhugetlbfs will also work fine as usual. | |||
276 | == Graceful fallback == | 291 | == Graceful fallback == |
277 | 292 | ||
278 | Code walking pagetables but unware about huge pmds can simply call | 293 | Code walking pagetables but unware about huge pmds can simply call |
279 | split_huge_page_pmd(mm, pmd) where the pmd is the one returned by | 294 | split_huge_page_pmd(vma, addr, pmd) where the pmd is the one returned by |
280 | pmd_offset. It's trivial to make the code transparent hugepage aware | 295 | pmd_offset. It's trivial to make the code transparent hugepage aware |
281 | by just grepping for "pmd_offset" and adding split_huge_page_pmd where | 296 | by just grepping for "pmd_offset" and adding split_huge_page_pmd where |
282 | missing after pmd_offset returns the pmd. Thanks to the graceful | 297 | missing after pmd_offset returns the pmd. Thanks to the graceful |
@@ -299,7 +314,7 @@ diff --git a/mm/mremap.c b/mm/mremap.c | |||
299 | return NULL; | 314 | return NULL; |
300 | 315 | ||
301 | pmd = pmd_offset(pud, addr); | 316 | pmd = pmd_offset(pud, addr); |
302 | + split_huge_page_pmd(mm, pmd); | 317 | + split_huge_page_pmd(vma, addr, pmd); |
303 | if (pmd_none_or_clear_bad(pmd)) | 318 | if (pmd_none_or_clear_bad(pmd)) |
304 | return NULL; | 319 | return NULL; |
305 | 320 | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index f15cb74c4f78..3edb4c2887a1 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -57,6 +57,10 @@ Protocol 2.10: (Kernel 2.6.31) Added a protocol for relaxed alignment | |||
57 | Protocol 2.11: (Kernel 3.6) Added a field for offset of EFI handover | 57 | Protocol 2.11: (Kernel 3.6) Added a field for offset of EFI handover |
58 | protocol entry point. | 58 | protocol entry point. |
59 | 59 | ||
60 | Protocol 2.12: (Kernel 3.9) Added the xloadflags field and extension fields | ||
61 | to struct boot_params for for loading bzImage and ramdisk | ||
62 | above 4G in 64bit. | ||
63 | |||
60 | **** MEMORY LAYOUT | 64 | **** MEMORY LAYOUT |
61 | 65 | ||
62 | The traditional memory map for the kernel loader, used for Image or | 66 | The traditional memory map for the kernel loader, used for Image or |
@@ -182,7 +186,7 @@ Offset Proto Name Meaning | |||
182 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel | 186 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel |
183 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not | 187 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not |
184 | 0235/1 2.10+ min_alignment Minimum alignment, as a power of two | 188 | 0235/1 2.10+ min_alignment Minimum alignment, as a power of two |
185 | 0236/2 N/A pad3 Unused | 189 | 0236/2 2.12+ xloadflags Boot protocol option flags |
186 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line | 190 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line |
187 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture | 191 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture |
188 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data | 192 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data |
@@ -373,7 +377,7 @@ Protocol: 2.00+ | |||
373 | 1 Loadlin | 377 | 1 Loadlin |
374 | 2 bootsect-loader (0x20, all other values reserved) | 378 | 2 bootsect-loader (0x20, all other values reserved) |
375 | 3 Syslinux | 379 | 3 Syslinux |
376 | 4 Etherboot/gPXE | 380 | 4 Etherboot/gPXE/iPXE |
377 | 5 ELILO | 381 | 5 ELILO |
378 | 7 GRUB | 382 | 7 GRUB |
379 | 8 U-Boot | 383 | 8 U-Boot |
@@ -381,6 +385,7 @@ Protocol: 2.00+ | |||
381 | A Gujin | 385 | A Gujin |
382 | B Qemu | 386 | B Qemu |
383 | C Arcturus Networks uCbootloader | 387 | C Arcturus Networks uCbootloader |
388 | D kexec-tools | ||
384 | E Extended (see ext_loader_type) | 389 | E Extended (see ext_loader_type) |
385 | F Special (0xFF = undefined) | 390 | F Special (0xFF = undefined) |
386 | 10 Reserved | 391 | 10 Reserved |
@@ -581,6 +586,27 @@ Protocol: 2.10+ | |||
581 | misaligned kernel. Therefore, a loader should typically try each | 586 | misaligned kernel. Therefore, a loader should typically try each |
582 | power-of-two alignment from kernel_alignment down to this alignment. | 587 | power-of-two alignment from kernel_alignment down to this alignment. |
583 | 588 | ||
589 | Field name: xloadflags | ||
590 | Type: read | ||
591 | Offset/size: 0x236/2 | ||
592 | Protocol: 2.12+ | ||
593 | |||
594 | This field is a bitmask. | ||
595 | |||
596 | Bit 0 (read): XLF_KERNEL_64 | ||
597 | - If 1, this kernel has the legacy 64-bit entry point at 0x200. | ||
598 | |||
599 | Bit 1 (read): XLF_CAN_BE_LOADED_ABOVE_4G | ||
600 | - If 1, kernel/boot_params/cmdline/ramdisk can be above 4G. | ||
601 | |||
602 | Bit 2 (read): XLF_EFI_HANDOVER_32 | ||
603 | - If 1, the kernel supports the 32-bit EFI handoff entry point | ||
604 | given at handover_offset. | ||
605 | |||
606 | Bit 3 (read): XLF_EFI_HANDOVER_64 | ||
607 | - If 1, the kernel supports the 64-bit EFI handoff entry point | ||
608 | given at handover_offset + 0x200. | ||
609 | |||
584 | Field name: cmdline_size | 610 | Field name: cmdline_size |
585 | Type: read | 611 | Type: read |
586 | Offset/size: 0x238/4 | 612 | Offset/size: 0x238/4 |
diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt index cf5437deda81..199f453cb4de 100644 --- a/Documentation/x86/zero-page.txt +++ b/Documentation/x86/zero-page.txt | |||
@@ -19,6 +19,9 @@ Offset Proto Name Meaning | |||
19 | 090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!! | 19 | 090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!! |
20 | 0A0/010 ALL sys_desc_table System description table (struct sys_desc_table) | 20 | 0A0/010 ALL sys_desc_table System description table (struct sys_desc_table) |
21 | 0B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends | 21 | 0B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends |
22 | 0C0/004 ALL ext_ramdisk_image ramdisk_image high 32bits | ||
23 | 0C4/004 ALL ext_ramdisk_size ramdisk_size high 32bits | ||
24 | 0C8/004 ALL ext_cmd_line_ptr cmd_line_ptr high 32bits | ||
22 | 140/080 ALL edid_info Video mode setup (struct edid_info) | 25 | 140/080 ALL edid_info Video mode setup (struct edid_info) |
23 | 1C0/020 ALL efi_info EFI 32 information (struct efi_info) | 26 | 1C0/020 ALL efi_info EFI 32 information (struct efi_info) |
24 | 1E0/004 ALL alk_mem_k Alternative mem check, in KB | 27 | 1E0/004 ALL alk_mem_k Alternative mem check, in KB |
@@ -27,6 +30,7 @@ Offset Proto Name Meaning | |||
27 | 1E9/001 ALL eddbuf_entries Number of entries in eddbuf (below) | 30 | 1E9/001 ALL eddbuf_entries Number of entries in eddbuf (below) |
28 | 1EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer | 31 | 1EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer |
29 | (below) | 32 | (below) |
33 | 1EF/001 ALL sentinel Used to detect broken bootloaders | ||
30 | 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures | 34 | 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures |
31 | 2D0/A00 ALL e820_map E820 memory map table | 35 | 2D0/A00 ALL e820_map E820 memory map table |
32 | (array of struct e820entry) | 36 | (array of struct e820entry) |
diff --git a/Documentation/xtensa/atomctl.txt b/Documentation/xtensa/atomctl.txt new file mode 100644 index 000000000000..10a8d1ff35ec --- /dev/null +++ b/Documentation/xtensa/atomctl.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | We Have Atomic Operation Control (ATOMCTL) Register. | ||
2 | This register determines the effect of using a S32C1I instruction | ||
3 | with various combinations of: | ||
4 | |||
5 | 1. With and without an Coherent Cache Controller which | ||
6 | can do Atomic Transactions to the memory internally. | ||
7 | |||
8 | 2. With and without An Intelligent Memory Controller which | ||
9 | can do Atomic Transactions itself. | ||
10 | |||
11 | The Core comes up with a default value of for the three types of cache ops: | ||
12 | |||
13 | 0x28: (WB: Internal, WT: Internal, BY:Exception) | ||
14 | |||
15 | On the FPGA Cards we typically simulate an Intelligent Memory controller | ||
16 | which can implement RCW transactions. For FPGA cards with an External | ||
17 | Memory controller we let it to the atomic operations internally while | ||
18 | doing a Cached (WB) transaction and use the Memory RCW for un-cached | ||
19 | operations. | ||
20 | |||
21 | For systems without an coherent cache controller, non-MX, we always | ||
22 | use the memory controllers RCW, thought non-MX controlers likely | ||
23 | support the Internal Operation. | ||
24 | |||
25 | CUSTOMER-WARNING: | ||
26 | Virtually all customers buy their memory controllers from vendors that | ||
27 | don't support atomic RCW memory transactions and will likely want to | ||
28 | configure this register to not use RCW. | ||
29 | |||
30 | Developers might find using RCW in Bypass mode convenient when testing | ||
31 | with the cache being bypassed; for example studying cache alias problems. | ||
32 | |||
33 | See Section 4.3.12.4 of ISA; Bits: | ||
34 | |||
35 | WB WT BY | ||
36 | 5 4 | 3 2 | 1 0 | ||
37 | 2 Bit | ||
38 | Field | ||
39 | Values WB - Write Back WT - Write Thru BY - Bypass | ||
40 | --------- --------------- ----------------- ---------------- | ||
41 | 0 Exception Exception Exception | ||
42 | 1 RCW Transaction RCW Transaction RCW Transaction | ||
43 | 2 Internal Operation Exception Reserved | ||
44 | 3 Reserved Reserved Reserved | ||
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt b/Documentation/zh_CN/video4linux/v4l2-framework.txt index 3e74f13af426..44c1d934c4e3 100644 --- a/Documentation/zh_CN/video4linux/v4l2-framework.txt +++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt | |||
@@ -182,8 +182,7 @@ int iterate(void *p) | |||
182 | 182 | ||
183 | static atomic_t drv_instance = ATOMIC_INIT(0); | 183 | static atomic_t drv_instance = ATOMIC_INIT(0); |
184 | 184 | ||
185 | static int __devinit drv_probe(struct pci_dev *pdev, | 185 | static int drv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) |
186 | const struct pci_device_id *pci_id) | ||
187 | { | 186 | { |
188 | ... | 187 | ... |
189 | state->instance = atomic_inc_return(&drv_instance) - 1; | 188 | state->instance = atomic_inc_return(&drv_instance) - 1; |