diff options
Diffstat (limited to 'Documentation')
352 files changed, 12118 insertions, 3485 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 45b3df936d2f..0c4cc688e89a 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -187,6 +187,8 @@ firmware_class/ | |||
187 | - request_firmware() hotplug interface info. | 187 | - request_firmware() hotplug interface info. |
188 | flexible-arrays.txt | 188 | flexible-arrays.txt |
189 | - how to make use of flexible sized arrays in linux | 189 | - how to make use of flexible sized arrays in linux |
190 | fmc/ | ||
191 | - information about the FMC bus abstraction | ||
190 | frv/ | 192 | frv/ |
191 | - Fujitsu FR-V Linux documentation. | 193 | - Fujitsu FR-V Linux documentation. |
192 | futex-requeue-pi.txt | 194 | futex-requeue-pi.txt |
diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stable/sysfs-module index a0dd21c6db59..6272ae5fb366 100644 --- a/Documentation/ABI/stable/sysfs-module +++ b/Documentation/ABI/stable/sysfs-module | |||
@@ -4,9 +4,13 @@ Description: | |||
4 | 4 | ||
5 | /sys/module/MODULENAME | 5 | /sys/module/MODULENAME |
6 | The name of the module that is in the kernel. This | 6 | The name of the module that is in the kernel. This |
7 | module name will show up either if the module is built | 7 | module name will always show up if the module is loaded as a |
8 | directly into the kernel, or if it is loaded as a | 8 | dynamic module. If it is built directly into the kernel, it |
9 | dynamic module. | 9 | will only show up if it has a version or at least one |
10 | parameter. | ||
11 | |||
12 | Note: The conditions of creation in the built-in case are not | ||
13 | by design and may be removed in the future. | ||
10 | 14 | ||
11 | /sys/module/MODULENAME/parameters | 15 | /sys/module/MODULENAME/parameters |
12 | This directory contains individual files that are each | 16 | This directory contains individual files that are each |
diff --git a/Documentation/ABI/testing/configfs-usb-gadget b/Documentation/ABI/testing/configfs-usb-gadget new file mode 100644 index 000000000000..01e769d6984d --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget | |||
@@ -0,0 +1,81 @@ | |||
1 | What: /config/usb-gadget | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | This group contains sub-groups corresponding to created | ||
6 | USB gadgets. | ||
7 | |||
8 | What: /config/usb-gadget/gadget | ||
9 | Date: Jun 2013 | ||
10 | KenelVersion: 3.11 | ||
11 | Description: | ||
12 | |||
13 | The attributes of a gadget: | ||
14 | |||
15 | UDC - bind a gadget to UDC/unbind a gadget; | ||
16 | write UDC's name found in /sys/class/udc/* | ||
17 | to bind a gadget, empty string "" to unbind. | ||
18 | |||
19 | bDeviceClass - USB device class code | ||
20 | bDeviceSubClass - USB device subclass code | ||
21 | bDeviceProtocol - USB device protocol code | ||
22 | bMaxPacketSize0 - maximum endpoint 0 packet size | ||
23 | bcdDevice - bcd device release number | ||
24 | bcdUSB - bcd USB specification version number | ||
25 | idProduct - product ID | ||
26 | idVendor - vendor ID | ||
27 | |||
28 | What: /config/usb-gadget/gadget/configs | ||
29 | Date: Jun 2013 | ||
30 | KenelVersion: 3.11 | ||
31 | Description: | ||
32 | This group contains a USB gadget's configurations | ||
33 | |||
34 | What: /config/usb-gadget/gadget/configs/config | ||
35 | Date: Jun 2013 | ||
36 | KernelVersion: 3.11 | ||
37 | Description: | ||
38 | The attributes of a configuration: | ||
39 | |||
40 | bmAttributes - configuration characteristics | ||
41 | MaxPower - maximum power consumption from the bus | ||
42 | |||
43 | What: /config/usb-gadget/gadget/configs/config/strings | ||
44 | Date: Jun 2013 | ||
45 | KernelVersion: 3.11 | ||
46 | Description: | ||
47 | This group contains subdirectories for language-specific | ||
48 | strings for this configuration. | ||
49 | |||
50 | What: /config/usb-gadget/gadget/configs/config/strings/language | ||
51 | Date: Jun 2013 | ||
52 | KernelVersion: 3.11 | ||
53 | Description: | ||
54 | The attributes: | ||
55 | |||
56 | configuration - configuration description | ||
57 | |||
58 | |||
59 | What: /config/usb-gadget/gadget/functions | ||
60 | Date: Jun 2013 | ||
61 | KenelVersion: 3.11 | ||
62 | Description: | ||
63 | This group contains functions available to this USB gadget. | ||
64 | |||
65 | What: /config/usb-gadget/gadget/strings | ||
66 | Date: Jun 2013 | ||
67 | KenelVersion: 3.11 | ||
68 | Description: | ||
69 | This group contains subdirectories for language-specific | ||
70 | strings for this gadget. | ||
71 | |||
72 | What: /config/usb-gadget/gadget/strings/language | ||
73 | Date: Jun 2013 | ||
74 | KenelVersion: 3.11 | ||
75 | Description: | ||
76 | The attributes: | ||
77 | |||
78 | serialnumber - gadget's serial number (string) | ||
79 | product - gadget's product description | ||
80 | manufacturer - gadget's manufacturer description | ||
81 | |||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-acm b/Documentation/ABI/testing/configfs-usb-gadget-acm new file mode 100644 index 000000000000..5708a568b5f6 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-acm | |||
@@ -0,0 +1,8 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/acm.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | |||
6 | This item contains just one readonly attribute: port_num. | ||
7 | It contains the port number of the /dev/ttyGS<n> device | ||
8 | associated with acm function's instance "name". | ||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ecm b/Documentation/ABI/testing/configfs-usb-gadget-ecm new file mode 100644 index 000000000000..6b9a582ce0b5 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-ecm | |||
@@ -0,0 +1,16 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/ecm.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | ifname - network device interface name associated with | ||
8 | this function instance | ||
9 | qmult - queue length multiplier for high and | ||
10 | super speed | ||
11 | host_addr - MAC address of host's end of this | ||
12 | Ethernet over USB link | ||
13 | dev_addr - MAC address of device's end of this | ||
14 | Ethernet over USB link | ||
15 | |||
16 | |||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-eem b/Documentation/ABI/testing/configfs-usb-gadget-eem new file mode 100644 index 000000000000..dbddf36b48b3 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-eem | |||
@@ -0,0 +1,14 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/eem.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | ifname - network device interface name associated with | ||
8 | this function instance | ||
9 | qmult - queue length multiplier for high and | ||
10 | super speed | ||
11 | host_addr - MAC address of host's end of this | ||
12 | Ethernet over USB link | ||
13 | dev_addr - MAC address of device's end of this | ||
14 | Ethernet over USB link | ||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ncm b/Documentation/ABI/testing/configfs-usb-gadget-ncm new file mode 100644 index 000000000000..bc309f42357d --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-ncm | |||
@@ -0,0 +1,15 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/ncm.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | ifname - network device interface name associated with | ||
8 | this function instance | ||
9 | qmult - queue length multiplier for high and | ||
10 | super speed | ||
11 | host_addr - MAC address of host's end of this | ||
12 | Ethernet over USB link | ||
13 | dev_addr - MAC address of device's end of this | ||
14 | Ethernet over USB link | ||
15 | |||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-obex b/Documentation/ABI/testing/configfs-usb-gadget-obex new file mode 100644 index 000000000000..aaa5c96fb7c6 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-obex | |||
@@ -0,0 +1,9 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/obex.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | |||
6 | This item contains just one readonly attribute: port_num. | ||
7 | It contains the port number of the /dev/ttyGS<n> device | ||
8 | associated with obex function's instance "name". | ||
9 | |||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-phonet b/Documentation/ABI/testing/configfs-usb-gadget-phonet new file mode 100644 index 000000000000..3e3b742cdfd7 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-phonet | |||
@@ -0,0 +1,8 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/phonet.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | |||
6 | This item contains just one readonly attribute: ifname. | ||
7 | It contains the network interface name assigned during | ||
8 | network device registration. | ||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-rndis b/Documentation/ABI/testing/configfs-usb-gadget-rndis new file mode 100644 index 000000000000..822e6dad8fc0 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-rndis | |||
@@ -0,0 +1,14 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/rndis.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | ifname - network device interface name associated with | ||
8 | this function instance | ||
9 | qmult - queue length multiplier for high and | ||
10 | super speed | ||
11 | host_addr - MAC address of host's end of this | ||
12 | Ethernet over USB link | ||
13 | dev_addr - MAC address of device's end of this | ||
14 | Ethernet over USB link | ||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-serial b/Documentation/ABI/testing/configfs-usb-gadget-serial new file mode 100644 index 000000000000..16f130c1501f --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-serial | |||
@@ -0,0 +1,9 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/gser.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | |||
6 | This item contains just one readonly attribute: port_num. | ||
7 | It contains the port number of the /dev/ttyGS<n> device | ||
8 | associated with gser function's instance "name". | ||
9 | |||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-subset b/Documentation/ABI/testing/configfs-usb-gadget-subset new file mode 100644 index 000000000000..154ae597cd99 --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-subset | |||
@@ -0,0 +1,14 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/geth.name | ||
2 | Date: Jun 2013 | ||
3 | KenelVersion: 3.11 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | ifname - network device interface name associated with | ||
8 | this function instance | ||
9 | qmult - queue length multiplier for high and | ||
10 | super speed | ||
11 | host_addr - MAC address of host's end of this | ||
12 | Ethernet over USB link | ||
13 | dev_addr - MAC address of device's end of this | ||
14 | Ethernet over USB link | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-acpi b/Documentation/ABI/testing/sysfs-bus-acpi new file mode 100644 index 000000000000..7fa9cbc75344 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-acpi | |||
@@ -0,0 +1,58 @@ | |||
1 | What: /sys/bus/acpi/devices/.../path | ||
2 | Date: December 2006 | ||
3 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
4 | Description: | ||
5 | This attribute indicates the full path of ACPI namespace | ||
6 | object associated with the device object. For example, | ||
7 | \_SB_.PCI0. | ||
8 | This file is not present for device objects representing | ||
9 | fixed ACPI hardware features (like power and sleep | ||
10 | buttons). | ||
11 | |||
12 | What: /sys/bus/acpi/devices/.../modalias | ||
13 | Date: July 2007 | ||
14 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
15 | Description: | ||
16 | This attribute indicates the PNP IDs of the device object. | ||
17 | That is acpi:HHHHHHHH:[CCCCCCC:]. Where each HHHHHHHH or | ||
18 | CCCCCCCC contains device object's PNPID (_HID or _CID). | ||
19 | |||
20 | What: /sys/bus/acpi/devices/.../hid | ||
21 | Date: April 2005 | ||
22 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
23 | Description: | ||
24 | This attribute indicates the hardware ID (_HID) of the | ||
25 | device object. For example, PNP0103. | ||
26 | This file is present for device objects having the _HID | ||
27 | control method. | ||
28 | |||
29 | What: /sys/bus/acpi/devices/.../description | ||
30 | Date: October 2012 | ||
31 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
32 | Description: | ||
33 | This attribute contains the output of the device object's | ||
34 | _STR control method, if present. | ||
35 | |||
36 | What: /sys/bus/acpi/devices/.../adr | ||
37 | Date: October 2012 | ||
38 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
39 | Description: | ||
40 | This attribute contains the output of the device object's | ||
41 | _ADR control method, which is present for ACPI device | ||
42 | objects representing devices having standard enumeration | ||
43 | algorithms, such as PCI. | ||
44 | |||
45 | What: /sys/bus/acpi/devices/.../uid | ||
46 | Date: October 2012 | ||
47 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
48 | Description: | ||
49 | This attribute contains the output of the device object's | ||
50 | _UID control method, if present. | ||
51 | |||
52 | What: /sys/bus/acpi/devices/.../eject | ||
53 | Date: December 2006 | ||
54 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | ||
55 | Description: | ||
56 | Writing 1 to this attribute will trigger hot removal of | ||
57 | this device object. This file exists for every device | ||
58 | object that has _EJ0 method. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events index 0adeb524c0d4..8b25ffb42562 100644 --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events | |||
@@ -27,14 +27,36 @@ Description: Generic performance monitoring events | |||
27 | "basename". | 27 | "basename". |
28 | 28 | ||
29 | 29 | ||
30 | What: /sys/devices/cpu/events/PM_LD_MISS_L1 | 30 | What: /sys/devices/cpu/events/PM_1PLUS_PPC_CMPL |
31 | /sys/devices/cpu/events/PM_LD_REF_L1 | ||
32 | /sys/devices/cpu/events/PM_CYC | ||
33 | /sys/devices/cpu/events/PM_BRU_FIN | 31 | /sys/devices/cpu/events/PM_BRU_FIN |
34 | /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC | ||
35 | /sys/devices/cpu/events/PM_BRU_MPRED | 32 | /sys/devices/cpu/events/PM_BRU_MPRED |
36 | /sys/devices/cpu/events/PM_INST_CMPL | ||
37 | /sys/devices/cpu/events/PM_CMPLU_STALL | 33 | /sys/devices/cpu/events/PM_CMPLU_STALL |
34 | /sys/devices/cpu/events/PM_CMPLU_STALL_BRU | ||
35 | /sys/devices/cpu/events/PM_CMPLU_STALL_DCACHE_MISS | ||
36 | /sys/devices/cpu/events/PM_CMPLU_STALL_DFU | ||
37 | /sys/devices/cpu/events/PM_CMPLU_STALL_DIV | ||
38 | /sys/devices/cpu/events/PM_CMPLU_STALL_ERAT_MISS | ||
39 | /sys/devices/cpu/events/PM_CMPLU_STALL_FXU | ||
40 | /sys/devices/cpu/events/PM_CMPLU_STALL_IFU | ||
41 | /sys/devices/cpu/events/PM_CMPLU_STALL_LSU | ||
42 | /sys/devices/cpu/events/PM_CMPLU_STALL_REJECT | ||
43 | /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR | ||
44 | /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR_LONG | ||
45 | /sys/devices/cpu/events/PM_CMPLU_STALL_STORE | ||
46 | /sys/devices/cpu/events/PM_CMPLU_STALL_THRD | ||
47 | /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR | ||
48 | /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR_LONG | ||
49 | /sys/devices/cpu/events/PM_CYC | ||
50 | /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED | ||
51 | /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED_IC_MISS | ||
52 | /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC | ||
53 | /sys/devices/cpu/events/PM_GCT_NOSLOT_IC_MISS | ||
54 | /sys/devices/cpu/events/PM_GRP_CMPL | ||
55 | /sys/devices/cpu/events/PM_INST_CMPL | ||
56 | /sys/devices/cpu/events/PM_LD_MISS_L1 | ||
57 | /sys/devices/cpu/events/PM_LD_REF_L1 | ||
58 | /sys/devices/cpu/events/PM_RUN_CYC | ||
59 | /sys/devices/cpu/events/PM_RUN_INST_CMPL | ||
38 | 60 | ||
39 | Date: 2013/01/08 | 61 | Date: 2013/01/08 |
40 | 62 | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format index 079afc71363d..77f47ff5ee02 100644 --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format | |||
@@ -9,6 +9,12 @@ Description: | |||
9 | we want to export, so that userspace can deal with sane | 9 | we want to export, so that userspace can deal with sane |
10 | name/value pairs. | 10 | name/value pairs. |
11 | 11 | ||
12 | Userspace must be prepared for the possibility that attributes | ||
13 | define overlapping bit ranges. For example: | ||
14 | attr1 = 'config:0-23' | ||
15 | attr2 = 'config:0-7' | ||
16 | attr3 = 'config:12-35' | ||
17 | |||
12 | Example: 'config1:1,6-10,44' | 18 | Example: 'config1:1,6-10,44' |
13 | Defines contents of attribute that occupies bits 1,6-10,44 of | 19 | Defines contents of attribute that occupies bits 1,6-10,44 of |
14 | perf_event_attr::config1. | 20 | perf_event_attr::config1. |
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 2e33dc6b2346..dda81ffae5cf 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -690,45 +690,45 @@ Description: | |||
690 | Actually start the buffer capture up. Will start trigger | 690 | Actually start the buffer capture up. Will start trigger |
691 | if first device and appropriate. | 691 | if first device and appropriate. |
692 | 692 | ||
693 | What: /sys/bus/iio/devices/iio:deviceX/buffer/scan_elements | 693 | What: /sys/bus/iio/devices/iio:deviceX/scan_elements |
694 | KernelVersion: 2.6.37 | 694 | KernelVersion: 2.6.37 |
695 | Contact: linux-iio@vger.kernel.org | 695 | Contact: linux-iio@vger.kernel.org |
696 | Description: | 696 | Description: |
697 | Directory containing interfaces for elements that will be | 697 | Directory containing interfaces for elements that will be |
698 | captured for a single triggered sample set in the buffer. | 698 | captured for a single triggered sample set in the buffer. |
699 | 699 | ||
700 | What: /sys/.../buffer/scan_elements/in_accel_x_en | 700 | What: /sys/.../iio:deviceX/scan_elements/in_accel_x_en |
701 | What: /sys/.../buffer/scan_elements/in_accel_y_en | 701 | What: /sys/.../iio:deviceX/scan_elements/in_accel_y_en |
702 | What: /sys/.../buffer/scan_elements/in_accel_z_en | 702 | What: /sys/.../iio:deviceX/scan_elements/in_accel_z_en |
703 | What: /sys/.../buffer/scan_elements/in_anglvel_x_en | 703 | What: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_en |
704 | What: /sys/.../buffer/scan_elements/in_anglvel_y_en | 704 | What: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_en |
705 | What: /sys/.../buffer/scan_elements/in_anglvel_z_en | 705 | What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_en |
706 | What: /sys/.../buffer/scan_elements/in_magn_x_en | 706 | What: /sys/.../iio:deviceX/scan_elements/in_magn_x_en |
707 | What: /sys/.../buffer/scan_elements/in_magn_y_en | 707 | What: /sys/.../iio:deviceX/scan_elements/in_magn_y_en |
708 | What: /sys/.../buffer/scan_elements/in_magn_z_en | 708 | What: /sys/.../iio:deviceX/scan_elements/in_magn_z_en |
709 | What: /sys/.../buffer/scan_elements/in_timestamp_en | 709 | What: /sys/.../iio:deviceX/scan_elements/in_timestamp_en |
710 | What: /sys/.../buffer/scan_elements/in_voltageY_supply_en | 710 | What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en |
711 | What: /sys/.../buffer/scan_elements/in_voltageY_en | 711 | What: /sys/.../iio:deviceX/scan_elements/in_voltageY_en |
712 | What: /sys/.../buffer/scan_elements/in_voltageY-voltageZ_en | 712 | What: /sys/.../iio:deviceX/scan_elements/in_voltageY-voltageZ_en |
713 | What: /sys/.../buffer/scan_elements/in_incli_x_en | 713 | What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en |
714 | What: /sys/.../buffer/scan_elements/in_incli_y_en | 714 | What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en |
715 | What: /sys/.../buffer/scan_elements/in_pressureY_en | 715 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en |
716 | What: /sys/.../buffer/scan_elements/in_pressure_en | 716 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_en |
717 | KernelVersion: 2.6.37 | 717 | KernelVersion: 2.6.37 |
718 | Contact: linux-iio@vger.kernel.org | 718 | Contact: linux-iio@vger.kernel.org |
719 | Description: | 719 | Description: |
720 | Scan element control for triggered data capture. | 720 | Scan element control for triggered data capture. |
721 | 721 | ||
722 | What: /sys/.../buffer/scan_elements/in_accel_type | 722 | What: /sys/.../iio:deviceX/scan_elements/in_accel_type |
723 | What: /sys/.../buffer/scan_elements/in_anglvel_type | 723 | What: /sys/.../iio:deviceX/scan_elements/in_anglvel_type |
724 | What: /sys/.../buffer/scan_elements/in_magn_type | 724 | What: /sys/.../iio:deviceX/scan_elements/in_magn_type |
725 | What: /sys/.../buffer/scan_elements/in_incli_type | 725 | What: /sys/.../iio:deviceX/scan_elements/in_incli_type |
726 | What: /sys/.../buffer/scan_elements/in_voltageY_type | 726 | What: /sys/.../iio:deviceX/scan_elements/in_voltageY_type |
727 | What: /sys/.../buffer/scan_elements/in_voltage_type | 727 | What: /sys/.../iio:deviceX/scan_elements/in_voltage_type |
728 | What: /sys/.../buffer/scan_elements/in_voltageY_supply_type | 728 | What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type |
729 | What: /sys/.../buffer/scan_elements/in_timestamp_type | 729 | What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type |
730 | What: /sys/.../buffer/scan_elements/in_pressureY_type | 730 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type |
731 | What: /sys/.../buffer/scan_elements/in_pressure_type | 731 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_type |
732 | KernelVersion: 2.6.37 | 732 | KernelVersion: 2.6.37 |
733 | Contact: linux-iio@vger.kernel.org | 733 | Contact: linux-iio@vger.kernel.org |
734 | Description: | 734 | Description: |
@@ -752,29 +752,29 @@ Description: | |||
752 | For other storage combinations this attribute will be extended | 752 | For other storage combinations this attribute will be extended |
753 | appropriately. | 753 | appropriately. |
754 | 754 | ||
755 | What: /sys/.../buffer/scan_elements/in_accel_type_available | 755 | What: /sys/.../iio:deviceX/scan_elements/in_accel_type_available |
756 | KernelVersion: 2.6.37 | 756 | KernelVersion: 2.6.37 |
757 | Contact: linux-iio@vger.kernel.org | 757 | Contact: linux-iio@vger.kernel.org |
758 | Description: | 758 | Description: |
759 | If the type parameter can take one of a small set of values, | 759 | If the type parameter can take one of a small set of values, |
760 | this attribute lists them. | 760 | this attribute lists them. |
761 | 761 | ||
762 | What: /sys/.../buffer/scan_elements/in_voltageY_index | 762 | What: /sys/.../iio:deviceX/scan_elements/in_voltageY_index |
763 | What: /sys/.../buffer/scan_elements/in_voltageY_supply_index | 763 | What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_index |
764 | What: /sys/.../buffer/scan_elements/in_accel_x_index | 764 | What: /sys/.../iio:deviceX/scan_elements/in_accel_x_index |
765 | What: /sys/.../buffer/scan_elements/in_accel_y_index | 765 | What: /sys/.../iio:deviceX/scan_elements/in_accel_y_index |
766 | What: /sys/.../buffer/scan_elements/in_accel_z_index | 766 | What: /sys/.../iio:deviceX/scan_elements/in_accel_z_index |
767 | What: /sys/.../buffer/scan_elements/in_anglvel_x_index | 767 | What: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_index |
768 | What: /sys/.../buffer/scan_elements/in_anglvel_y_index | 768 | What: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_index |
769 | What: /sys/.../buffer/scan_elements/in_anglvel_z_index | 769 | What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_index |
770 | What: /sys/.../buffer/scan_elements/in_magn_x_index | 770 | What: /sys/.../iio:deviceX/scan_elements/in_magn_x_index |
771 | What: /sys/.../buffer/scan_elements/in_magn_y_index | 771 | What: /sys/.../iio:deviceX/scan_elements/in_magn_y_index |
772 | What: /sys/.../buffer/scan_elements/in_magn_z_index | 772 | What: /sys/.../iio:deviceX/scan_elements/in_magn_z_index |
773 | What: /sys/.../buffer/scan_elements/in_incli_x_index | 773 | What: /sys/.../iio:deviceX/scan_elements/in_incli_x_index |
774 | What: /sys/.../buffer/scan_elements/in_incli_y_index | 774 | What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index |
775 | What: /sys/.../buffer/scan_elements/in_timestamp_index | 775 | What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index |
776 | What: /sys/.../buffer/scan_elements/in_pressureY_index | 776 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index |
777 | What: /sys/.../buffer/scan_elements/in_pressure_index | 777 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_index |
778 | KernelVersion: 2.6.37 | 778 | KernelVersion: 2.6.37 |
779 | Contact: linux-iio@vger.kernel.org | 779 | Contact: linux-iio@vger.kernel.org |
780 | Description: | 780 | Description: |
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index 1ce5ae329c04..5210a51c90fd 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -64,7 +64,6 @@ Description: | |||
64 | Writing a non-zero value to this attribute will | 64 | Writing a non-zero value to this attribute will |
65 | force a rescan of all PCI buses in the system, and | 65 | force a rescan of all PCI buses in the system, and |
66 | re-discover previously removed devices. | 66 | re-discover previously removed devices. |
67 | Depends on CONFIG_HOTPLUG. | ||
68 | 67 | ||
69 | What: /sys/bus/pci/devices/.../msi_irqs/ | 68 | What: /sys/bus/pci/devices/.../msi_irqs/ |
70 | Date: September, 2011 | 69 | Date: September, 2011 |
@@ -90,7 +89,6 @@ Contact: Linux PCI developers <linux-pci@vger.kernel.org> | |||
90 | Description: | 89 | Description: |
91 | Writing a non-zero value to this attribute will | 90 | Writing a non-zero value to this attribute will |
92 | hot-remove the PCI device and any of its children. | 91 | hot-remove the PCI device and any of its children. |
93 | Depends on CONFIG_HOTPLUG. | ||
94 | 92 | ||
95 | What: /sys/bus/pci/devices/.../pci_bus/.../rescan | 93 | What: /sys/bus/pci/devices/.../pci_bus/.../rescan |
96 | Date: May 2011 | 94 | Date: May 2011 |
@@ -99,7 +97,7 @@ Description: | |||
99 | Writing a non-zero value to this attribute will | 97 | Writing a non-zero value to this attribute will |
100 | force a rescan of the bus and all child buses, | 98 | force a rescan of the bus and all child buses, |
101 | and re-discover devices removed earlier from this | 99 | and re-discover devices removed earlier from this |
102 | part of the device tree. Depends on CONFIG_HOTPLUG. | 100 | part of the device tree. |
103 | 101 | ||
104 | What: /sys/bus/pci/devices/.../rescan | 102 | What: /sys/bus/pci/devices/.../rescan |
105 | Date: January 2009 | 103 | Date: January 2009 |
@@ -109,7 +107,6 @@ Description: | |||
109 | force a rescan of the device's parent bus and all | 107 | force a rescan of the device's parent bus and all |
110 | child buses, and re-discover devices removed earlier | 108 | child buses, and re-discover devices removed earlier |
111 | from this part of the device tree. | 109 | from this part of the device tree. |
112 | Depends on CONFIG_HOTPLUG. | ||
113 | 110 | ||
114 | What: /sys/bus/pci/devices/.../reset | 111 | What: /sys/bus/pci/devices/.../reset |
115 | Date: July 2009 | 112 | Date: July 2009 |
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index f093e59cbe5f..9759b8c91332 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -236,3 +236,30 @@ Description: | |||
236 | This attribute is to expose these information to user space. | 236 | This attribute is to expose these information to user space. |
237 | The file will read "hotplug", "wired" and "not used" if the | 237 | The file will read "hotplug", "wired" and "not used" if the |
238 | information is available, and "unknown" otherwise. | 238 | information is available, and "unknown" otherwise. |
239 | |||
240 | What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout | ||
241 | Date: May 2013 | ||
242 | Contact: Mathias Nyman <mathias.nyman@linux.intel.com> | ||
243 | Description: | ||
244 | USB 2.0 devices may support hardware link power management (LPM) | ||
245 | L1 sleep state. The usb2_lpm_l1_timeout attribute allows | ||
246 | tuning the timeout for L1 inactivity timer (LPM timer), e.g. | ||
247 | needed inactivity time before host requests the device to go to L1 sleep. | ||
248 | Useful for power management tuning. | ||
249 | Supported values are 0 - 65535 microseconds. | ||
250 | |||
251 | What: /sys/bus/usb/devices/.../power/usb2_lpm_besl | ||
252 | Date: May 2013 | ||
253 | Contact: Mathias Nyman <mathias.nyman@linux.intel.com> | ||
254 | Description: | ||
255 | USB 2.0 devices that support hardware link power management (LPM) | ||
256 | L1 sleep state now use a best effort service latency value (BESL) to | ||
257 | indicate the best effort to resumption of service to the device after the | ||
258 | initiation of the resume event. | ||
259 | If the device does not have a preferred besl value then the host can select | ||
260 | one instead. This usb2_lpm_besl attribute allows to tune the host selected besl | ||
261 | value in order to tune power saving and service latency. | ||
262 | |||
263 | Supported values are 0 - 15. | ||
264 | More information on how besl values map to microseconds can be found in | ||
265 | USB 2.0 ECN Errata for Link Power Management, section 4.10) | ||
diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq index 0ba6ea2f89d9..ee39acacf6f8 100644 --- a/Documentation/ABI/testing/sysfs-class-devfreq +++ b/Documentation/ABI/testing/sysfs-class-devfreq | |||
@@ -78,3 +78,23 @@ Contact: Nishanth Menon <nm@ti.com> | |||
78 | Description: | 78 | Description: |
79 | The /sys/class/devfreq/.../available_governors shows | 79 | The /sys/class/devfreq/.../available_governors shows |
80 | currently available governors in the system. | 80 | currently available governors in the system. |
81 | |||
82 | What: /sys/class/devfreq/.../min_freq | ||
83 | Date: January 2013 | ||
84 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | ||
85 | Description: | ||
86 | The /sys/class/devfreq/.../min_freq shows and stores | ||
87 | the minimum frequency requested by users. It is 0 if | ||
88 | the user does not care. min_freq overrides the | ||
89 | frequency requested by governors. | ||
90 | |||
91 | What: /sys/class/devfreq/.../max_freq | ||
92 | Date: January 2013 | ||
93 | Contact: MyungJoo Ham <myungjoo.ham@samsung.com> | ||
94 | Description: | ||
95 | The /sys/class/devfreq/.../max_freq shows and stores | ||
96 | the maximum frequency requested by users. It is 0 if | ||
97 | the user does not care. max_freq overrides the | ||
98 | frequency requested by governors and min_freq. | ||
99 | The max_freq overrides min_freq because max_freq may be | ||
100 | used to throttle devices to avoid overheating. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-pwm b/Documentation/ABI/testing/sysfs-class-pwm new file mode 100644 index 000000000000..c479d77b67c5 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-pwm | |||
@@ -0,0 +1,79 @@ | |||
1 | What: /sys/class/pwm/ | ||
2 | Date: May 2013 | ||
3 | KernelVersion: 3.11 | ||
4 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
5 | Description: | ||
6 | The pwm/ class sub-directory belongs to the Generic PWM | ||
7 | Framework and provides a sysfs interface for using PWM | ||
8 | channels. | ||
9 | |||
10 | What: /sys/class/pwm/pwmchipN/ | ||
11 | Date: May 2013 | ||
12 | KernelVersion: 3.11 | ||
13 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
14 | Description: | ||
15 | A /sys/class/pwm/pwmchipN directory is created for each | ||
16 | probed PWM controller/chip where N is the base of the | ||
17 | PWM chip. | ||
18 | |||
19 | What: /sys/class/pwm/pwmchipN/npwm | ||
20 | Date: May 2013 | ||
21 | KernelVersion: 3.11 | ||
22 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
23 | Description: | ||
24 | The number of PWM channels supported by the PWM chip. | ||
25 | |||
26 | What: /sys/class/pwm/pwmchipN/export | ||
27 | Date: May 2013 | ||
28 | KernelVersion: 3.11 | ||
29 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
30 | Description: | ||
31 | Exports a PWM channel from the PWM chip for sysfs control. | ||
32 | Value is between 0 and /sys/class/pwm/pwmchipN/npwm - 1. | ||
33 | |||
34 | What: /sys/class/pwm/pwmchipN/unexport | ||
35 | Date: May 2013 | ||
36 | KernelVersion: 3.11 | ||
37 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
38 | Description: | ||
39 | Unexports a PWM channel. | ||
40 | |||
41 | What: /sys/class/pwm/pwmchipN/pwmX | ||
42 | Date: May 2013 | ||
43 | KernelVersion: 3.11 | ||
44 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
45 | Description: | ||
46 | A /sys/class/pwm/pwmchipN/pwmX directory is created for | ||
47 | each exported PWM channel where X is the exported PWM | ||
48 | channel number. | ||
49 | |||
50 | What: /sys/class/pwm/pwmchipN/pwmX/period | ||
51 | Date: May 2013 | ||
52 | KernelVersion: 3.11 | ||
53 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
54 | Description: | ||
55 | Sets the PWM signal period in nanoseconds. | ||
56 | |||
57 | What: /sys/class/pwm/pwmchipN/pwmX/duty_cycle | ||
58 | Date: May 2013 | ||
59 | KernelVersion: 3.11 | ||
60 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
61 | Description: | ||
62 | Sets the PWM signal duty cycle in nanoseconds. | ||
63 | |||
64 | What: /sys/class/pwm/pwmchipN/pwmX/polarity | ||
65 | Date: May 2013 | ||
66 | KernelVersion: 3.11 | ||
67 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
68 | Description: | ||
69 | Sets the output polarity of the PWM signal to "normal" or | ||
70 | "inversed". | ||
71 | |||
72 | What: /sys/class/pwm/pwmchipN/pwmX/enable | ||
73 | Date: May 2013 | ||
74 | KernelVersion: 3.11 | ||
75 | Contact: H Hartley Sweeten <hsweeten@visionengravers.com> | ||
76 | Description: | ||
77 | Enable/disable the PWM signal. | ||
78 | 0 is disabled | ||
79 | 1 is enabled | ||
diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc index 25b1e751b777..5977e2875325 100644 --- a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc +++ b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc | |||
@@ -36,3 +36,22 @@ Description: | |||
36 | 36 | ||
37 | Refer to [ECMA-368] section 10.3.1.1 for the value to | 37 | Refer to [ECMA-368] section 10.3.1.1 for the value to |
38 | use. | 38 | use. |
39 | |||
40 | What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_dnts | ||
41 | Date: June 2013 | ||
42 | KernelVersion: 3.11 | ||
43 | Contact: Thomas Pugliese <thomas.pugliese@gmail.com> | ||
44 | Description: | ||
45 | The device notification time slot (DNTS) count and inverval in | ||
46 | milliseconds that the WUSB host should use. This controls how | ||
47 | often the devices will have the opportunity to send | ||
48 | notifications to the host. | ||
49 | |||
50 | What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_retry_count | ||
51 | Date: June 2013 | ||
52 | KernelVersion: 3.11 | ||
53 | Contact: Thomas Pugliese <thomas.pugliese@gmail.com> | ||
54 | Description: | ||
55 | The number of retries that the WUSB host should attempt | ||
56 | before reporting an error for a bus transaction. The range of | ||
57 | valid values is [0..15], where 0 indicates infinite retries. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-online b/Documentation/ABI/testing/sysfs-devices-online new file mode 100644 index 000000000000..f990026c0740 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-online | |||
@@ -0,0 +1,20 @@ | |||
1 | What: /sys/devices/.../online | ||
2 | Date: April 2013 | ||
3 | Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
4 | Description: | ||
5 | The /sys/devices/.../online attribute is only present for | ||
6 | devices whose bus types provide .online() and .offline() | ||
7 | callbacks. The number read from it (0 or 1) reflects the value | ||
8 | of the device's 'offline' field. If that number is 1 and '0' | ||
9 | (or 'n', or 'N') is written to this file, the device bus type's | ||
10 | .offline() callback is executed for the device and (if | ||
11 | successful) its 'offline' field is updated accordingly. In | ||
12 | turn, if that number is 0 and '1' (or 'y', or 'Y') is written to | ||
13 | this file, the device bus type's .online() callback is executed | ||
14 | for the device and (if successful) its 'offline' field is | ||
15 | updated as appropriate. | ||
16 | |||
17 | After a successful execution of the bus type's .offline() | ||
18 | callback the device cannot be used for any purpose until either | ||
19 | it is removed (i.e. device_del() is called for it), or its bus | ||
20 | type's .online() is exeucted successfully. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-sun b/Documentation/ABI/testing/sysfs-devices-sun index 86be9848a77e..625ce4b63758 100644 --- a/Documentation/ABI/testing/sysfs-devices-sun +++ b/Documentation/ABI/testing/sysfs-devices-sun | |||
@@ -1,4 +1,4 @@ | |||
1 | Whatt: /sys/devices/.../sun | 1 | What: /sys/devices/.../sun |
2 | Date: October 2012 | 2 | Date: October 2012 |
3 | Contact: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> | 3 | Contact: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> |
4 | Description: | 4 | Description: |
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index 2447698aed41..468e4d48f884 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu | |||
@@ -144,6 +144,21 @@ Description: Discover and change clock speed of CPUs | |||
144 | to learn how to control the knobs. | 144 | to learn how to control the knobs. |
145 | 145 | ||
146 | 146 | ||
147 | What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus | ||
148 | Date: June 2013 | ||
149 | Contact: cpufreq@vger.kernel.org | ||
150 | Description: Discover CPUs in the same CPU frequency coordination domain | ||
151 | |||
152 | freqdomain_cpus is the list of CPUs (online+offline) that share | ||
153 | the same clock/freq domain (possibly at the hardware level). | ||
154 | That information may be hidden from the cpufreq core and the | ||
155 | value of related_cpus may be different from freqdomain_cpus. This | ||
156 | attribute is useful for user space DVFS controllers to get better | ||
157 | power/performance results for platforms using acpi-cpufreq. | ||
158 | |||
159 | This file is only present if the acpi-cpufreq driver is in use. | ||
160 | |||
161 | |||
147 | What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1} | 162 | What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1} |
148 | Date: August 2008 | 163 | Date: August 2008 |
149 | KernelVersion: 2.6.27 | 164 | KernelVersion: 2.6.27 |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-wiimote b/Documentation/ABI/testing/sysfs-driver-hid-wiimote index 3d98009f447a..ed5dd567d397 100644 --- a/Documentation/ABI/testing/sysfs-driver-hid-wiimote +++ b/Documentation/ABI/testing/sysfs-driver-hid-wiimote | |||
@@ -12,7 +12,7 @@ Description: Make it possible to set/get current led state. Reading from it | |||
12 | What: /sys/bus/hid/drivers/wiimote/<dev>/extension | 12 | What: /sys/bus/hid/drivers/wiimote/<dev>/extension |
13 | Date: August 2011 | 13 | Date: August 2011 |
14 | KernelVersion: 3.2 | 14 | KernelVersion: 3.2 |
15 | Contact: David Herrmann <dh.herrmann@googlemail.com> | 15 | Contact: David Herrmann <dh.herrmann@gmail.com> |
16 | Description: This file contains the currently connected and initialized | 16 | Description: This file contains the currently connected and initialized |
17 | extensions. It can be one of: none, motionp, nunchuck, classic, | 17 | extensions. It can be one of: none, motionp, nunchuck, classic, |
18 | motionp+nunchuck, motionp+classic | 18 | motionp+nunchuck, motionp+classic |
@@ -20,3 +20,40 @@ Description: This file contains the currently connected and initialized | |||
20 | the official Nintendo Nunchuck extension and classic is the | 20 | the official Nintendo Nunchuck extension and classic is the |
21 | Nintendo Classic Controller extension. The motionp extension can | 21 | Nintendo Classic Controller extension. The motionp extension can |
22 | be combined with the other two. | 22 | be combined with the other two. |
23 | Starting with kernel-version 3.11 Motion Plus hotplugging is | ||
24 | supported and if detected, it's no longer reported as static | ||
25 | extension. You will get uevent notifications for the motion-plus | ||
26 | device then. | ||
27 | |||
28 | What: /sys/bus/hid/drivers/wiimote/<dev>/devtype | ||
29 | Date: May 2013 | ||
30 | KernelVersion: 3.11 | ||
31 | Contact: David Herrmann <dh.herrmann@gmail.com> | ||
32 | Description: While a device is initialized by the wiimote driver, we perform | ||
33 | a device detection and signal a "change" uevent after it is | ||
34 | done. This file shows the detected device type. "pending" means | ||
35 | that the detection is still ongoing, "unknown" means, that the | ||
36 | device couldn't be detected or loaded. "generic" means, that the | ||
37 | device couldn't be detected but supports basic Wii Remote | ||
38 | features and can be used. | ||
39 | Other strings for each device-type are available and may be | ||
40 | added if new device-specific detections are added. | ||
41 | Currently supported are: | ||
42 | gen10: First Wii Remote generation | ||
43 | gen20: Second Wii Remote Plus generation (builtin MP) | ||
44 | balanceboard: Wii Balance Board | ||
45 | |||
46 | What: /sys/bus/hid/drivers/wiimote/<dev>/bboard_calib | ||
47 | Date: May 2013 | ||
48 | KernelVersion: 3.11 | ||
49 | Contact: David Herrmann <dh.herrmann@gmail.com> | ||
50 | Description: This attribute is only provided if the device was detected as a | ||
51 | balance board. It provides a single line with 3 calibration | ||
52 | values for all 4 sensors. The values are separated by colons and | ||
53 | are each 2 bytes long (encoded as 4 digit hexadecimal value). | ||
54 | First, 0kg values for all 4 sensors are written, followed by the | ||
55 | 17kg values for all 4 sensors and last the 34kg values for all 4 | ||
56 | sensors. | ||
57 | Calibration data is already applied by the kernel to all input | ||
58 | values but may be used by user-space to perform other | ||
59 | transformations. | ||
diff --git a/Documentation/ABI/testing/sysfs-firmware-acpi b/Documentation/ABI/testing/sysfs-firmware-acpi index ce9bee98b43b..b4436cca97a8 100644 --- a/Documentation/ABI/testing/sysfs-firmware-acpi +++ b/Documentation/ABI/testing/sysfs-firmware-acpi | |||
@@ -44,6 +44,16 @@ Description: | |||
44 | or 0 (unset). Attempts to write any other values to it will | 44 | or 0 (unset). Attempts to write any other values to it will |
45 | cause -EINVAL to be returned. | 45 | cause -EINVAL to be returned. |
46 | 46 | ||
47 | What: /sys/firmware/acpi/hotplug/force_remove | ||
48 | Date: May 2013 | ||
49 | Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
50 | Description: | ||
51 | The number in this file (0 or 1) determines whether (1) or not | ||
52 | (0) the ACPI subsystem will allow devices to be hot-removed even | ||
53 | if they cannot be put offline gracefully (from the kernel's | ||
54 | viewpoint). That number can be changed by writing a boolean | ||
55 | value to this file. | ||
56 | |||
47 | What: /sys/firmware/acpi/interrupts/ | 57 | What: /sys/firmware/acpi/interrupts/ |
48 | Date: February 2008 | 58 | Date: February 2008 |
49 | Contact: Len Brown <lenb@kernel.org> | 59 | Contact: Len Brown <lenb@kernel.org> |
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index e00b8f0dde52..7fe0546c504a 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -389,7 +389,8 @@ Albeit deprecated by some people, the equivalent of the goto statement is | |||
389 | used frequently by compilers in form of the unconditional jump instruction. | 389 | used frequently by compilers in form of the unconditional jump instruction. |
390 | 390 | ||
391 | The goto statement comes in handy when a function exits from multiple | 391 | The goto statement comes in handy when a function exits from multiple |
392 | locations and some common work such as cleanup has to be done. | 392 | locations and some common work such as cleanup has to be done. If there is no |
393 | cleanup needed then just return directly. | ||
393 | 394 | ||
394 | The rationale is: | 395 | The rationale is: |
395 | 396 | ||
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index 0f6a3edcd44b..49267ea97568 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
@@ -127,14 +127,11 @@ | |||
127 | !Finclude/net/cfg80211.h cfg80211_ibss_params | 127 | !Finclude/net/cfg80211.h cfg80211_ibss_params |
128 | !Finclude/net/cfg80211.h cfg80211_connect_params | 128 | !Finclude/net/cfg80211.h cfg80211_connect_params |
129 | !Finclude/net/cfg80211.h cfg80211_pmksa | 129 | !Finclude/net/cfg80211.h cfg80211_pmksa |
130 | !Finclude/net/cfg80211.h cfg80211_send_rx_auth | 130 | !Finclude/net/cfg80211.h cfg80211_rx_mlme_mgmt |
131 | !Finclude/net/cfg80211.h cfg80211_send_auth_timeout | 131 | !Finclude/net/cfg80211.h cfg80211_auth_timeout |
132 | !Finclude/net/cfg80211.h cfg80211_send_rx_assoc | 132 | !Finclude/net/cfg80211.h cfg80211_rx_assoc_resp |
133 | !Finclude/net/cfg80211.h cfg80211_send_assoc_timeout | 133 | !Finclude/net/cfg80211.h cfg80211_assoc_timeout |
134 | !Finclude/net/cfg80211.h cfg80211_send_deauth | 134 | !Finclude/net/cfg80211.h cfg80211_tx_mlme_mgmt |
135 | !Finclude/net/cfg80211.h __cfg80211_send_deauth | ||
136 | !Finclude/net/cfg80211.h cfg80211_send_disassoc | ||
137 | !Finclude/net/cfg80211.h __cfg80211_send_disassoc | ||
138 | !Finclude/net/cfg80211.h cfg80211_ibss_joined | 135 | !Finclude/net/cfg80211.h cfg80211_ibss_joined |
139 | !Finclude/net/cfg80211.h cfg80211_connect_result | 136 | !Finclude/net/cfg80211.h cfg80211_connect_result |
140 | !Finclude/net/cfg80211.h cfg80211_roamed | 137 | !Finclude/net/cfg80211.h cfg80211_roamed |
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index c36892c072da..cbfdf5486639 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -126,6 +126,8 @@ X!Edrivers/base/interface.c | |||
126 | </sect1> | 126 | </sect1> |
127 | <sect1><title>Device Drivers DMA Management</title> | 127 | <sect1><title>Device Drivers DMA Management</title> |
128 | !Edrivers/base/dma-buf.c | 128 | !Edrivers/base/dma-buf.c |
129 | !Edrivers/base/reservation.c | ||
130 | !Iinclude/linux/reservation.h | ||
129 | !Edrivers/base/dma-coherent.c | 131 | !Edrivers/base/dma-coherent.c |
130 | !Edrivers/base/dma-mapping.c | 132 | !Edrivers/base/dma-mapping.c |
131 | </sect1> | 133 | </sect1> |
@@ -297,10 +299,10 @@ KAO --> | |||
297 | </sect1> | 299 | </sect1> |
298 | <sect1><title>Frame Buffer Fonts</title> | 300 | <sect1><title>Frame Buffer Fonts</title> |
299 | <para> | 301 | <para> |
300 | Refer to the file drivers/video/console/fonts.c for more information. | 302 | Refer to the file lib/fonts/fonts.c for more information. |
301 | </para> | 303 | </para> |
302 | <!-- FIXME: Removed for now since no structured comments in source | 304 | <!-- FIXME: Removed for now since no structured comments in source |
303 | X!Idrivers/video/console/fonts.c | 305 | X!Ilib/fonts/fonts.c |
304 | --> | 306 | --> |
305 | </sect1> | 307 | </sect1> |
306 | </chapter> | 308 | </chapter> |
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index f9df3b872c16..7d1278e7a434 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
@@ -186,11 +186,12 @@ | |||
186 | <varlistentry> | 186 | <varlistentry> |
187 | <term>DRIVER_HAVE_IRQ</term><term>DRIVER_IRQ_SHARED</term> | 187 | <term>DRIVER_HAVE_IRQ</term><term>DRIVER_IRQ_SHARED</term> |
188 | <listitem><para> | 188 | <listitem><para> |
189 | DRIVER_HAVE_IRQ indicates whether the driver has an IRQ handler. The | 189 | DRIVER_HAVE_IRQ indicates whether the driver has an IRQ handler |
190 | DRM core will automatically register an interrupt handler when the | 190 | managed by the DRM Core. The core will support simple IRQ handler |
191 | flag is set. DRIVER_IRQ_SHARED indicates whether the device & | 191 | installation when the flag is set. The installation process is |
192 | handler support shared IRQs (note that this is required of PCI | 192 | described in <xref linkend="drm-irq-registration"/>.</para> |
193 | drivers). | 193 | <para>DRIVER_IRQ_SHARED indicates whether the device & handler |
194 | support shared IRQs (note that this is required of PCI drivers). | ||
194 | </para></listitem> | 195 | </para></listitem> |
195 | </varlistentry> | 196 | </varlistentry> |
196 | <varlistentry> | 197 | <varlistentry> |
@@ -344,50 +345,71 @@ char *date;</synopsis> | |||
344 | The DRM core tries to facilitate IRQ handler registration and | 345 | The DRM core tries to facilitate IRQ handler registration and |
345 | unregistration by providing <function>drm_irq_install</function> and | 346 | unregistration by providing <function>drm_irq_install</function> and |
346 | <function>drm_irq_uninstall</function> functions. Those functions only | 347 | <function>drm_irq_uninstall</function> functions. Those functions only |
347 | support a single interrupt per device. | 348 | support a single interrupt per device, devices that use more than one |
348 | </para> | 349 | IRQs need to be handled manually. |
349 | <!--!Fdrivers/char/drm/drm_irq.c drm_irq_install--> | ||
350 | <para> | ||
351 | Both functions get the device IRQ by calling | ||
352 | <function>drm_dev_to_irq</function>. This inline function will call a | ||
353 | bus-specific operation to retrieve the IRQ number. For platform devices, | ||
354 | <function>platform_get_irq</function>(..., 0) is used to retrieve the | ||
355 | IRQ number. | ||
356 | </para> | ||
357 | <para> | ||
358 | <function>drm_irq_install</function> starts by calling the | ||
359 | <methodname>irq_preinstall</methodname> driver operation. The operation | ||
360 | is optional and must make sure that the interrupt will not get fired by | ||
361 | clearing all pending interrupt flags or disabling the interrupt. | ||
362 | </para> | ||
363 | <para> | ||
364 | The IRQ will then be requested by a call to | ||
365 | <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver | ||
366 | feature flag is set, a shared (IRQF_SHARED) IRQ handler will be | ||
367 | requested. | ||
368 | </para> | ||
369 | <para> | ||
370 | The IRQ handler function must be provided as the mandatory irq_handler | ||
371 | driver operation. It will get passed directly to | ||
372 | <function>request_irq</function> and thus has the same prototype as all | ||
373 | IRQ handlers. It will get called with a pointer to the DRM device as the | ||
374 | second argument. | ||
375 | </para> | ||
376 | <para> | ||
377 | Finally the function calls the optional | ||
378 | <methodname>irq_postinstall</methodname> driver operation. The operation | ||
379 | usually enables interrupts (excluding the vblank interrupt, which is | ||
380 | enabled separately), but drivers may choose to enable/disable interrupts | ||
381 | at a different time. | ||
382 | </para> | ||
383 | <para> | ||
384 | <function>drm_irq_uninstall</function> is similarly used to uninstall an | ||
385 | IRQ handler. It starts by waking up all processes waiting on a vblank | ||
386 | interrupt to make sure they don't hang, and then calls the optional | ||
387 | <methodname>irq_uninstall</methodname> driver operation. The operation | ||
388 | must disable all hardware interrupts. Finally the function frees the IRQ | ||
389 | by calling <function>free_irq</function>. | ||
390 | </para> | 350 | </para> |
351 | <sect4> | ||
352 | <title>Managed IRQ Registration</title> | ||
353 | <para> | ||
354 | Both the <function>drm_irq_install</function> and | ||
355 | <function>drm_irq_uninstall</function> functions get the device IRQ by | ||
356 | calling <function>drm_dev_to_irq</function>. This inline function will | ||
357 | call a bus-specific operation to retrieve the IRQ number. For platform | ||
358 | devices, <function>platform_get_irq</function>(..., 0) is used to | ||
359 | retrieve the IRQ number. | ||
360 | </para> | ||
361 | <para> | ||
362 | <function>drm_irq_install</function> starts by calling the | ||
363 | <methodname>irq_preinstall</methodname> driver operation. The operation | ||
364 | is optional and must make sure that the interrupt will not get fired by | ||
365 | clearing all pending interrupt flags or disabling the interrupt. | ||
366 | </para> | ||
367 | <para> | ||
368 | The IRQ will then be requested by a call to | ||
369 | <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver | ||
370 | feature flag is set, a shared (IRQF_SHARED) IRQ handler will be | ||
371 | requested. | ||
372 | </para> | ||
373 | <para> | ||
374 | The IRQ handler function must be provided as the mandatory irq_handler | ||
375 | driver operation. It will get passed directly to | ||
376 | <function>request_irq</function> and thus has the same prototype as all | ||
377 | IRQ handlers. It will get called with a pointer to the DRM device as the | ||
378 | second argument. | ||
379 | </para> | ||
380 | <para> | ||
381 | Finally the function calls the optional | ||
382 | <methodname>irq_postinstall</methodname> driver operation. The operation | ||
383 | usually enables interrupts (excluding the vblank interrupt, which is | ||
384 | enabled separately), but drivers may choose to enable/disable interrupts | ||
385 | at a different time. | ||
386 | </para> | ||
387 | <para> | ||
388 | <function>drm_irq_uninstall</function> is similarly used to uninstall an | ||
389 | IRQ handler. It starts by waking up all processes waiting on a vblank | ||
390 | interrupt to make sure they don't hang, and then calls the optional | ||
391 | <methodname>irq_uninstall</methodname> driver operation. The operation | ||
392 | must disable all hardware interrupts. Finally the function frees the IRQ | ||
393 | by calling <function>free_irq</function>. | ||
394 | </para> | ||
395 | </sect4> | ||
396 | <sect4> | ||
397 | <title>Manual IRQ Registration</title> | ||
398 | <para> | ||
399 | Drivers that require multiple interrupt handlers can't use the managed | ||
400 | IRQ registration functions. In that case IRQs must be registered and | ||
401 | unregistered manually (usually with the <function>request_irq</function> | ||
402 | and <function>free_irq</function> functions, or their devm_* equivalent). | ||
403 | </para> | ||
404 | <para> | ||
405 | When manually registering IRQs, drivers must not set the DRIVER_HAVE_IRQ | ||
406 | driver feature flag, and must not provide the | ||
407 | <methodname>irq_handler</methodname> driver operation. They must set the | ||
408 | <structname>drm_device</structname> <structfield>irq_enabled</structfield> | ||
409 | field to 1 upon registration of the IRQs, and clear it to 0 after | ||
410 | unregistering the IRQs. | ||
411 | </para> | ||
412 | </sect4> | ||
391 | </sect3> | 413 | </sect3> |
392 | <sect3> | 414 | <sect3> |
393 | <title>Memory Manager Initialization</title> | 415 | <title>Memory Manager Initialization</title> |
@@ -434,7 +456,7 @@ char *date;</synopsis> | |||
434 | The DRM core includes two memory managers, namely Translation Table Maps | 456 | The DRM core includes two memory managers, namely Translation Table Maps |
435 | (TTM) and Graphics Execution Manager (GEM). TTM was the first DRM memory | 457 | (TTM) and Graphics Execution Manager (GEM). TTM was the first DRM memory |
436 | manager to be developed and tried to be a one-size-fits-them all | 458 | manager to be developed and tried to be a one-size-fits-them all |
437 | solution. It provides a single userspace API to accomodate the need of | 459 | solution. It provides a single userspace API to accommodate the need of |
438 | all hardware, supporting both Unified Memory Architecture (UMA) devices | 460 | all hardware, supporting both Unified Memory Architecture (UMA) devices |
439 | and devices with dedicated video RAM (i.e. most discrete video cards). | 461 | and devices with dedicated video RAM (i.e. most discrete video cards). |
440 | This resulted in a large, complex piece of code that turned out to be | 462 | This resulted in a large, complex piece of code that turned out to be |
@@ -701,7 +723,7 @@ char *date;</synopsis> | |||
701 | <para> | 723 | <para> |
702 | Similar to global names, GEM file descriptors are also used to share GEM | 724 | Similar to global names, GEM file descriptors are also used to share GEM |
703 | objects across processes. They offer additional security: as file | 725 | objects across processes. They offer additional security: as file |
704 | descriptors must be explictly sent over UNIX domain sockets to be shared | 726 | descriptors must be explicitly sent over UNIX domain sockets to be shared |
705 | between applications, they can't be guessed like the globally unique GEM | 727 | between applications, they can't be guessed like the globally unique GEM |
706 | names. | 728 | names. |
707 | </para> | 729 | </para> |
@@ -1154,7 +1176,7 @@ int max_width, max_height;</synopsis> | |||
1154 | </para> | 1176 | </para> |
1155 | <para> | 1177 | <para> |
1156 | The <methodname>page_flip</methodname> operation schedules a page flip. | 1178 | The <methodname>page_flip</methodname> operation schedules a page flip. |
1157 | Once any pending rendering targetting the new frame buffer has | 1179 | Once any pending rendering targeting the new frame buffer has |
1158 | completed, the CRTC will be reprogrammed to display that frame buffer | 1180 | completed, the CRTC will be reprogrammed to display that frame buffer |
1159 | after the next vertical refresh. The operation must return immediately | 1181 | after the next vertical refresh. The operation must return immediately |
1160 | without waiting for rendering or page flip to complete and must block | 1182 | without waiting for rendering or page flip to complete and must block |
@@ -1214,6 +1236,15 @@ int max_width, max_height;</synopsis> | |||
1214 | <title>Miscellaneous</title> | 1236 | <title>Miscellaneous</title> |
1215 | <itemizedlist> | 1237 | <itemizedlist> |
1216 | <listitem> | 1238 | <listitem> |
1239 | <synopsis>void (*set_property)(struct drm_crtc *crtc, | ||
1240 | struct drm_property *property, uint64_t value);</synopsis> | ||
1241 | <para> | ||
1242 | Set the value of the given CRTC property to | ||
1243 | <parameter>value</parameter>. See <xref linkend="drm-kms-properties"/> | ||
1244 | for more information about properties. | ||
1245 | </para> | ||
1246 | </listitem> | ||
1247 | <listitem> | ||
1217 | <synopsis>void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, | 1248 | <synopsis>void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, |
1218 | uint32_t start, uint32_t size);</synopsis> | 1249 | uint32_t start, uint32_t size);</synopsis> |
1219 | <para> | 1250 | <para> |
@@ -1363,6 +1394,15 @@ int max_width, max_height;</synopsis> | |||
1363 | <xref linkend="drm-kms-init"/>. | 1394 | <xref linkend="drm-kms-init"/>. |
1364 | </para> | 1395 | </para> |
1365 | </listitem> | 1396 | </listitem> |
1397 | <listitem> | ||
1398 | <synopsis>void (*set_property)(struct drm_plane *plane, | ||
1399 | struct drm_property *property, uint64_t value);</synopsis> | ||
1400 | <para> | ||
1401 | Set the value of the given plane property to | ||
1402 | <parameter>value</parameter>. See <xref linkend="drm-kms-properties"/> | ||
1403 | for more information about properties. | ||
1404 | </para> | ||
1405 | </listitem> | ||
1366 | </itemizedlist> | 1406 | </itemizedlist> |
1367 | </sect3> | 1407 | </sect3> |
1368 | </sect2> | 1408 | </sect2> |
@@ -1572,6 +1612,15 @@ int max_width, max_height;</synopsis> | |||
1572 | <title>Miscellaneous</title> | 1612 | <title>Miscellaneous</title> |
1573 | <itemizedlist> | 1613 | <itemizedlist> |
1574 | <listitem> | 1614 | <listitem> |
1615 | <synopsis>void (*set_property)(struct drm_connector *connector, | ||
1616 | struct drm_property *property, uint64_t value);</synopsis> | ||
1617 | <para> | ||
1618 | Set the value of the given connector property to | ||
1619 | <parameter>value</parameter>. See <xref linkend="drm-kms-properties"/> | ||
1620 | for more information about properties. | ||
1621 | </para> | ||
1622 | </listitem> | ||
1623 | <listitem> | ||
1575 | <synopsis>void (*destroy)(struct drm_connector *connector);</synopsis> | 1624 | <synopsis>void (*destroy)(struct drm_connector *connector);</synopsis> |
1576 | <para> | 1625 | <para> |
1577 | Destroy the connector when not needed anymore. See | 1626 | Destroy the connector when not needed anymore. See |
@@ -1846,10 +1895,6 @@ void intel_crt_init(struct drm_device *dev) | |||
1846 | <synopsis>bool (*mode_fixup)(struct drm_encoder *encoder, | 1895 | <synopsis>bool (*mode_fixup)(struct drm_encoder *encoder, |
1847 | const struct drm_display_mode *mode, | 1896 | const struct drm_display_mode *mode, |
1848 | struct drm_display_mode *adjusted_mode);</synopsis> | 1897 | struct drm_display_mode *adjusted_mode);</synopsis> |
1849 | <note><para> | ||
1850 | FIXME: The mode argument be const, but the i915 driver modifies | ||
1851 | mode->clock in <function>intel_dp_mode_fixup</function>. | ||
1852 | </para></note> | ||
1853 | <para> | 1898 | <para> |
1854 | Let encoders adjust the requested mode or reject it completely. This | 1899 | Let encoders adjust the requested mode or reject it completely. This |
1855 | operation returns true if the mode is accepted (possibly after being | 1900 | operation returns true if the mode is accepted (possibly after being |
@@ -2161,6 +2206,128 @@ void intel_crt_init(struct drm_device *dev) | |||
2161 | <title>EDID Helper Functions Reference</title> | 2206 | <title>EDID Helper Functions Reference</title> |
2162 | !Edrivers/gpu/drm/drm_edid.c | 2207 | !Edrivers/gpu/drm/drm_edid.c |
2163 | </sect2> | 2208 | </sect2> |
2209 | <sect2> | ||
2210 | <title>Rectangle Utilities Reference</title> | ||
2211 | !Pinclude/drm/drm_rect.h rect utils | ||
2212 | !Iinclude/drm/drm_rect.h | ||
2213 | !Edrivers/gpu/drm/drm_rect.c | ||
2214 | </sect2> | ||
2215 | </sect1> | ||
2216 | |||
2217 | <!-- Internals: kms properties --> | ||
2218 | |||
2219 | <sect1 id="drm-kms-properties"> | ||
2220 | <title>KMS Properties</title> | ||
2221 | <para> | ||
2222 | Drivers may need to expose additional parameters to applications than | ||
2223 | those described in the previous sections. KMS supports attaching | ||
2224 | properties to CRTCs, connectors and planes and offers a userspace API to | ||
2225 | list, get and set the property values. | ||
2226 | </para> | ||
2227 | <para> | ||
2228 | Properties are identified by a name that uniquely defines the property | ||
2229 | purpose, and store an associated value. For all property types except blob | ||
2230 | properties the value is a 64-bit unsigned integer. | ||
2231 | </para> | ||
2232 | <para> | ||
2233 | KMS differentiates between properties and property instances. Drivers | ||
2234 | first create properties and then create and associate individual instances | ||
2235 | of those properties to objects. A property can be instantiated multiple | ||
2236 | times and associated with different objects. Values are stored in property | ||
2237 | instances, and all other property information are stored in the propery | ||
2238 | and shared between all instances of the property. | ||
2239 | </para> | ||
2240 | <para> | ||
2241 | Every property is created with a type that influences how the KMS core | ||
2242 | handles the property. Supported property types are | ||
2243 | <variablelist> | ||
2244 | <varlistentry> | ||
2245 | <term>DRM_MODE_PROP_RANGE</term> | ||
2246 | <listitem><para>Range properties report their minimum and maximum | ||
2247 | admissible values. The KMS core verifies that values set by | ||
2248 | application fit in that range.</para></listitem> | ||
2249 | </varlistentry> | ||
2250 | <varlistentry> | ||
2251 | <term>DRM_MODE_PROP_ENUM</term> | ||
2252 | <listitem><para>Enumerated properties take a numerical value that | ||
2253 | ranges from 0 to the number of enumerated values defined by the | ||
2254 | property minus one, and associate a free-formed string name to each | ||
2255 | value. Applications can retrieve the list of defined value-name pairs | ||
2256 | and use the numerical value to get and set property instance values. | ||
2257 | </para></listitem> | ||
2258 | </varlistentry> | ||
2259 | <varlistentry> | ||
2260 | <term>DRM_MODE_PROP_BITMASK</term> | ||
2261 | <listitem><para>Bitmask properties are enumeration properties that | ||
2262 | additionally restrict all enumerated values to the 0..63 range. | ||
2263 | Bitmask property instance values combine one or more of the | ||
2264 | enumerated bits defined by the property.</para></listitem> | ||
2265 | </varlistentry> | ||
2266 | <varlistentry> | ||
2267 | <term>DRM_MODE_PROP_BLOB</term> | ||
2268 | <listitem><para>Blob properties store a binary blob without any format | ||
2269 | restriction. The binary blobs are created as KMS standalone objects, | ||
2270 | and blob property instance values store the ID of their associated | ||
2271 | blob object.</para> | ||
2272 | <para>Blob properties are only used for the connector EDID property | ||
2273 | and cannot be created by drivers.</para></listitem> | ||
2274 | </varlistentry> | ||
2275 | </variablelist> | ||
2276 | </para> | ||
2277 | <para> | ||
2278 | To create a property drivers call one of the following functions depending | ||
2279 | on the property type. All property creation functions take property flags | ||
2280 | and name, as well as type-specific arguments. | ||
2281 | <itemizedlist> | ||
2282 | <listitem> | ||
2283 | <synopsis>struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, | ||
2284 | const char *name, | ||
2285 | uint64_t min, uint64_t max);</synopsis> | ||
2286 | <para>Create a range property with the given minimum and maximum | ||
2287 | values.</para> | ||
2288 | </listitem> | ||
2289 | <listitem> | ||
2290 | <synopsis>struct drm_property *drm_property_create_enum(struct drm_device *dev, int flags, | ||
2291 | const char *name, | ||
2292 | const struct drm_prop_enum_list *props, | ||
2293 | int num_values);</synopsis> | ||
2294 | <para>Create an enumerated property. The <parameter>props</parameter> | ||
2295 | argument points to an array of <parameter>num_values</parameter> | ||
2296 | value-name pairs.</para> | ||
2297 | </listitem> | ||
2298 | <listitem> | ||
2299 | <synopsis>struct drm_property *drm_property_create_bitmask(struct drm_device *dev, | ||
2300 | int flags, const char *name, | ||
2301 | const struct drm_prop_enum_list *props, | ||
2302 | int num_values);</synopsis> | ||
2303 | <para>Create a bitmask property. The <parameter>props</parameter> | ||
2304 | argument points to an array of <parameter>num_values</parameter> | ||
2305 | value-name pairs.</para> | ||
2306 | </listitem> | ||
2307 | </itemizedlist> | ||
2308 | </para> | ||
2309 | <para> | ||
2310 | Properties can additionally be created as immutable, in which case they | ||
2311 | will be read-only for applications but can be modified by the driver. To | ||
2312 | create an immutable property drivers must set the DRM_MODE_PROP_IMMUTABLE | ||
2313 | flag at property creation time. | ||
2314 | </para> | ||
2315 | <para> | ||
2316 | When no array of value-name pairs is readily available at property | ||
2317 | creation time for enumerated or range properties, drivers can create | ||
2318 | the property using the <function>drm_property_create</function> function | ||
2319 | and manually add enumeration value-name pairs by calling the | ||
2320 | <function>drm_property_add_enum</function> function. Care must be taken to | ||
2321 | properly specify the property type through the <parameter>flags</parameter> | ||
2322 | argument. | ||
2323 | </para> | ||
2324 | <para> | ||
2325 | After creating properties drivers can attach property instances to CRTC, | ||
2326 | connector and plane objects by calling the | ||
2327 | <function>drm_object_attach_property</function>. The function takes a | ||
2328 | pointer to the target object, a pointer to the previously created property | ||
2329 | and an initial instance value. | ||
2330 | </para> | ||
2164 | </sect1> | 2331 | </sect1> |
2165 | 2332 | ||
2166 | <!-- Internals: vertical blanking --> | 2333 | <!-- Internals: vertical blanking --> |
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index b3422341d65c..d16d21b7a3b7 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl | |||
@@ -464,6 +464,19 @@ if (desc->irq_data.chip->irq_eoi) | |||
464 | protected via desc->lock, by the generic layer. | 464 | protected via desc->lock, by the generic layer. |
465 | </para> | 465 | </para> |
466 | </chapter> | 466 | </chapter> |
467 | |||
468 | <chapter id="genericchip"> | ||
469 | <title>Generic interrupt chip</title> | ||
470 | <para> | ||
471 | To avoid copies of identical implementations of irq chips the | ||
472 | core provides a configurable generic interrupt chip | ||
473 | implementation. Developers should check carefuly whether the | ||
474 | generic chip fits their needs before implementing the same | ||
475 | functionality slightly different themself. | ||
476 | </para> | ||
477 | !Ekernel/irq/generic-chip.c | ||
478 | </chapter> | ||
479 | |||
467 | <chapter id="structs"> | 480 | <chapter id="structs"> |
468 | <title>Structures</title> | 481 | <title>Structures</title> |
469 | <para> | 482 | <para> |
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 67e7ab41c0a6..09e884e5b9f5 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl | |||
@@ -1955,12 +1955,17 @@ machines due to caching. | |||
1955 | </sect1> | 1955 | </sect1> |
1956 | </chapter> | 1956 | </chapter> |
1957 | 1957 | ||
1958 | <chapter id="apiref"> | 1958 | <chapter id="apiref-mutex"> |
1959 | <title>Mutex API reference</title> | 1959 | <title>Mutex API reference</title> |
1960 | !Iinclude/linux/mutex.h | 1960 | !Iinclude/linux/mutex.h |
1961 | !Ekernel/mutex.c | 1961 | !Ekernel/mutex.c |
1962 | </chapter> | 1962 | </chapter> |
1963 | 1963 | ||
1964 | <chapter id="apiref-futex"> | ||
1965 | <title>Futex API reference</title> | ||
1966 | !Ikernel/futex.c | ||
1967 | </chapter> | ||
1968 | |||
1964 | <chapter id="references"> | 1969 | <chapter id="references"> |
1965 | <title>Further reading</title> | 1970 | <title>Further reading</title> |
1966 | 1971 | ||
diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml index df39ba395df0..0d6e81bd9ed2 100644 --- a/Documentation/DocBook/media/dvb/frontend.xml +++ b/Documentation/DocBook/media/dvb/frontend.xml | |||
@@ -233,7 +233,7 @@ typedef enum fe_status { | |||
233 | <entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry> | 233 | <entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry> |
234 | </row><row> | 234 | </row><row> |
235 | <entry align="char">FE_HAS_SYNC</entry> | 235 | <entry align="char">FE_HAS_SYNC</entry> |
236 | <entry align="char">Syncronization bytes was found</entry> | 236 | <entry align="char">Synchronization bytes was found</entry> |
237 | </row><row> | 237 | </row><row> |
238 | <entry align="char">FE_HAS_LOCK</entry> | 238 | <entry align="char">FE_HAS_LOCK</entry> |
239 | <entry align="char">The DVB were locked and everything is working</entry> | 239 | <entry align="char">The DVB were locked and everything is working</entry> |
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 8d7a77928d49..c2fc9ec1417e 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
@@ -3147,7 +3147,7 @@ giving priority to the center of the metered area.</entry> | |||
3147 | <entry>A multi-zone metering. The light intensity is measured | 3147 | <entry>A multi-zone metering. The light intensity is measured |
3148 | in several points of the frame and the the results are combined. The | 3148 | in several points of the frame and the the results are combined. The |
3149 | algorithm of the zones selection and their significance in calculating the | 3149 | algorithm of the zones selection and their significance in calculating the |
3150 | final value is device dependant.</entry> | 3150 | final value is device dependent.</entry> |
3151 | </row> | 3151 | </row> |
3152 | </tbody> | 3152 | </tbody> |
3153 | </entrytbl> | 3153 | </entrytbl> |
diff --git a/Documentation/DocBook/media/v4l/dev-codec.xml b/Documentation/DocBook/media/v4l/dev-codec.xml index dca0ecd54dc6..ff44c16fc080 100644 --- a/Documentation/DocBook/media/v4l/dev-codec.xml +++ b/Documentation/DocBook/media/v4l/dev-codec.xml | |||
@@ -1,18 +1,27 @@ | |||
1 | <title>Codec Interface</title> | 1 | <title>Codec Interface</title> |
2 | 2 | ||
3 | <note> | 3 | <para>A V4L2 codec can compress, decompress, transform, or otherwise |
4 | <title>Suspended</title> | 4 | convert video data from one format into another format, in memory. Typically |
5 | such devices are memory-to-memory devices (i.e. devices with the | ||
6 | <constant>V4L2_CAP_VIDEO_M2M</constant> or <constant>V4L2_CAP_VIDEO_M2M_MPLANE</constant> | ||
7 | capability set). | ||
8 | </para> | ||
5 | 9 | ||
6 | <para>This interface has been be suspended from the V4L2 API | 10 | <para>A memory-to-memory video node acts just like a normal video node, but it |
7 | implemented in Linux 2.6 until we have more experience with codec | 11 | supports both output (sending frames from memory to the codec hardware) and |
8 | device interfaces.</para> | 12 | capture (receiving the processed frames from the codec hardware into memory) |
9 | </note> | 13 | stream I/O. An application will have to setup the stream |
14 | I/O for both sides and finally call &VIDIOC-STREAMON; for both capture and output | ||
15 | to start the codec.</para> | ||
10 | 16 | ||
11 | <para>A V4L2 codec can compress, decompress, transform, or otherwise | 17 | <para>Video compression codecs use the MPEG controls to setup their codec parameters |
12 | convert video data from one format into another format, in memory. | 18 | (note that the MPEG controls actually support many more codecs than just MPEG). |
13 | Applications send data to be converted to the driver through a | 19 | See <xref linkend="mpeg-controls"></xref>.</para> |
14 | &func-write; call, and receive the converted data through a | ||
15 | &func-read; call. For efficiency a driver may also support streaming | ||
16 | I/O.</para> | ||
17 | 20 | ||
18 | <para>[to do]</para> | 21 | <para>Memory-to-memory devices can often be used as a shared resource: you can |
22 | open the video node multiple times, each application setting up their own codec properties | ||
23 | that are local to the file handle, and each can use it independently from the others. | ||
24 | The driver will arbitrate access to the codec and reprogram it whenever another file | ||
25 | handler gets access. This is different from the usual video node behavior where the video properties | ||
26 | are global to the device (i.e. changing something through one file handle is visible | ||
27 | through another file handle).</para> | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv12mt.xml b/Documentation/DocBook/media/v4l/pixfmt-nv12mt.xml index 2f82b1da8dfe..8a70a1707b7a 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-nv12mt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-nv12mt.xml | |||
@@ -24,7 +24,7 @@ into 64x32 macroblocks. The CbCr plane has the same width, in bytes, as the Y | |||
24 | plane (and the image), but is half as tall in pixels. The chroma plane is also | 24 | plane (and the image), but is half as tall in pixels. The chroma plane is also |
25 | grouped into 64x32 macroblocks.</para> | 25 | grouped into 64x32 macroblocks.</para> |
26 | <para>Width of the buffer has to be aligned to the multiple of 128, and | 26 | <para>Width of the buffer has to be aligned to the multiple of 128, and |
27 | height alignment is 32. Every four adjactent buffers - two horizontally and two | 27 | height alignment is 32. Every four adjacent buffers - two horizontally and two |
28 | vertically are grouped together and are located in memory in Z or flipped Z | 28 | vertically are grouped together and are located in memory in Z or flipped Z |
29 | order. </para> | 29 | order. </para> |
30 | <para>Layout of macroblocks in memory is presented in the following | 30 | <para>Layout of macroblocks in memory is presented in the following |
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index bfc93cdcf696..bfe823dd0f31 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml | |||
@@ -493,7 +493,7 @@ and discussions on the V4L mailing list.</revremark> | |||
493 | </partinfo> | 493 | </partinfo> |
494 | 494 | ||
495 | <title>Video for Linux Two API Specification</title> | 495 | <title>Video for Linux Two API Specification</title> |
496 | <subtitle>Revision 3.9</subtitle> | 496 | <subtitle>Revision 3.10</subtitle> |
497 | 497 | ||
498 | <chapter id="common"> | 498 | <chapter id="common"> |
499 | &sub-common; | 499 | &sub-common; |
diff --git a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl index bd97a13fa5ae..3210dcf741c9 100644 --- a/Documentation/DocBook/writing_usb_driver.tmpl +++ b/Documentation/DocBook/writing_usb_driver.tmpl | |||
@@ -83,7 +83,7 @@ | |||
83 | </para> | 83 | </para> |
84 | <para> | 84 | <para> |
85 | Because each different protocol causes a new driver to be created, I have | 85 | Because each different protocol causes a new driver to be created, I have |
86 | written a generic USB driver skeleton, modeled after the pci-skeleton.c | 86 | written a generic USB driver skeleton, modelled after the pci-skeleton.c |
87 | file in the kernel source tree upon which many PCI network drivers have | 87 | file in the kernel source tree upon which many PCI network drivers have |
88 | been based. This USB skeleton can be found at drivers/usb/usb-skeleton.c | 88 | been based. This USB skeleton can be found at drivers/usb/usb-skeleton.c |
89 | in the kernel source tree. In this article I will walk through the basics | 89 | in the kernel source tree. In this article I will walk through the basics |
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index a9f288ff54f9..27faae3e3846 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -112,7 +112,7 @@ required reading: | |||
112 | 112 | ||
113 | Other excellent descriptions of how to create patches properly are: | 113 | Other excellent descriptions of how to create patches properly are: |
114 | "The Perfect Patch" | 114 | "The Perfect Patch" |
115 | http://userweb.kernel.org/~akpm/stuff/tpp.txt | 115 | http://kerneltrap.org/node/3737 |
116 | "Linux kernel patch submission format" | 116 | "Linux kernel patch submission format" |
117 | http://linux.yyz.us/patch-format.html | 117 | http://linux.yyz.us/patch-format.html |
118 | 118 | ||
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index 79e789b8b8ea..7703ec73a9bb 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
@@ -354,12 +354,6 @@ over a rather long period of time, but improvements are always welcome! | |||
354 | using RCU rather than SRCU, because RCU is almost always faster | 354 | using RCU rather than SRCU, because RCU is almost always faster |
355 | and easier to use than is SRCU. | 355 | and easier to use than is SRCU. |
356 | 356 | ||
357 | If you need to enter your read-side critical section in a | ||
358 | hardirq or exception handler, and then exit that same read-side | ||
359 | critical section in the task that was interrupted, then you need | ||
360 | to srcu_read_lock_raw() and srcu_read_unlock_raw(), which avoid | ||
361 | the lockdep checking that would otherwise this practice illegal. | ||
362 | |||
363 | Also unlike other forms of RCU, explicit initialization | 357 | Also unlike other forms of RCU, explicit initialization |
364 | and cleanup is required via init_srcu_struct() and | 358 | and cleanup is required via init_srcu_struct() and |
365 | cleanup_srcu_struct(). These are passed a "struct srcu_struct" | 359 | cleanup_srcu_struct(). These are passed a "struct srcu_struct" |
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt index 7dce8a17eac2..d8a502387397 100644 --- a/Documentation/RCU/torture.txt +++ b/Documentation/RCU/torture.txt | |||
@@ -182,12 +182,6 @@ torture_type The type of RCU to test, with string values as follows: | |||
182 | "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and | 182 | "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and |
183 | synchronize_srcu_expedited(). | 183 | synchronize_srcu_expedited(). |
184 | 184 | ||
185 | "srcu_raw": srcu_read_lock_raw(), srcu_read_unlock_raw(), | ||
186 | and call_srcu(). | ||
187 | |||
188 | "srcu_raw_sync": srcu_read_lock_raw(), srcu_read_unlock_raw(), | ||
189 | and synchronize_srcu(). | ||
190 | |||
191 | "sched": preempt_disable(), preempt_enable(), and | 185 | "sched": preempt_disable(), preempt_enable(), and |
192 | call_rcu_sched(). | 186 | call_rcu_sched(). |
193 | 187 | ||
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index c776968f4463..f3778f8952da 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -530,113 +530,21 @@ o "nos" counts the number of times we balked for other | |||
530 | reasons, e.g., the grace period ended first. | 530 | reasons, e.g., the grace period ended first. |
531 | 531 | ||
532 | 532 | ||
533 | CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats | 533 | CONFIG_TINY_RCU debugfs Files and Formats |
534 | 534 | ||
535 | These implementations of RCU provides a single debugfs file under the | 535 | These implementations of RCU provides a single debugfs file under the |
536 | top-level directory RCU, namely rcu/rcudata, which displays fields in | 536 | top-level directory RCU, namely rcu/rcudata, which displays fields in |
537 | rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU, | 537 | rcu_bh_ctrlblk and rcu_sched_ctrlblk. |
538 | rcu_preempt_ctrlblk. | ||
539 | 538 | ||
540 | The output of "cat rcu/rcudata" is as follows: | 539 | The output of "cat rcu/rcudata" is as follows: |
541 | 540 | ||
542 | rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=... | ||
543 | ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274 | ||
544 | normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0 | ||
545 | exp balk: bt=0 nos=0 | ||
546 | rcu_sched: qlen: 0 | 541 | rcu_sched: qlen: 0 |
547 | rcu_bh: qlen: 0 | 542 | rcu_bh: qlen: 0 |
548 | 543 | ||
549 | This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the | 544 | This is split into rcu_sched and rcu_bh sections. The field is as |
550 | rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds. | 545 | follows: |
551 | The last three lines of the rcu_preempt section appear only in | ||
552 | CONFIG_RCU_BOOST kernel builds. The fields are as follows: | ||
553 | 546 | ||
554 | o "qlen" is the number of RCU callbacks currently waiting either | 547 | o "qlen" is the number of RCU callbacks currently waiting either |
555 | for an RCU grace period or waiting to be invoked. This is the | 548 | for an RCU grace period or waiting to be invoked. This is the |
556 | only field present for rcu_sched and rcu_bh, due to the | 549 | only field present for rcu_sched and rcu_bh, due to the |
557 | short-circuiting of grace period in those two cases. | 550 | short-circuiting of grace period in those two cases. |
558 | |||
559 | o "gp" is the number of grace periods that have completed. | ||
560 | |||
561 | o "g197/p197/c197" displays the grace-period state, with the | ||
562 | "g" number being the number of grace periods that have started | ||
563 | (mod 256), the "p" number being the number of grace periods | ||
564 | that the CPU has responded to (also mod 256), and the "c" | ||
565 | number being the number of grace periods that have completed | ||
566 | (once again mode 256). | ||
567 | |||
568 | Why have both "gp" and "g"? Because the data flowing into | ||
569 | "gp" is only present in a CONFIG_RCU_TRACE kernel. | ||
570 | |||
571 | o "tasks" is a set of bits. The first bit is "T" if there are | ||
572 | currently tasks that have recently blocked within an RCU | ||
573 | read-side critical section, the second bit is "N" if any of the | ||
574 | aforementioned tasks are blocking the current RCU grace period, | ||
575 | and the third bit is "E" if any of the aforementioned tasks are | ||
576 | blocking the current expedited grace period. Each bit is "." | ||
577 | if the corresponding condition does not hold. | ||
578 | |||
579 | o "ttb" is a single bit. It is "B" if any of the blocked tasks | ||
580 | need to be priority boosted and "." otherwise. | ||
581 | |||
582 | o "btg" indicates whether boosting has been carried out during | ||
583 | the current grace period, with "exp" indicating that boosting | ||
584 | is in progress for an expedited grace period, "no" indicating | ||
585 | that boosting has not yet started for a normal grace period, | ||
586 | "begun" indicating that boosting has bebug for a normal grace | ||
587 | period, and "done" indicating that boosting has completed for | ||
588 | a normal grace period. | ||
589 | |||
590 | o "ntb" is the total number of tasks subjected to RCU priority boosting | ||
591 | periods since boot. | ||
592 | |||
593 | o "neb" is the number of expedited grace periods that have had | ||
594 | to resort to RCU priority boosting since boot. | ||
595 | |||
596 | o "nnb" is the number of normal grace periods that have had | ||
597 | to resort to RCU priority boosting since boot. | ||
598 | |||
599 | o "j" is the low-order 16 bits of the jiffies counter in hexadecimal. | ||
600 | |||
601 | o "bt" is the low-order 16 bits of the value that the jiffies counter | ||
602 | will have at the next time that boosting is scheduled to begin. | ||
603 | |||
604 | o In the line beginning with "normal balk", the fields are as follows: | ||
605 | |||
606 | o "nt" is the number of times that the system balked from | ||
607 | boosting because there were no blocked tasks to boost. | ||
608 | Note that the system will balk from boosting even if the | ||
609 | grace period is overdue when the currently running task | ||
610 | is looping within an RCU read-side critical section. | ||
611 | There is no point in boosting in this case, because | ||
612 | boosting a running task won't make it run any faster. | ||
613 | |||
614 | o "gt" is the number of times that the system balked | ||
615 | from boosting because, although there were blocked tasks, | ||
616 | none of them were preventing the current grace period | ||
617 | from completing. | ||
618 | |||
619 | o "bt" is the number of times that the system balked | ||
620 | from boosting because boosting was already in progress. | ||
621 | |||
622 | o "b" is the number of times that the system balked from | ||
623 | boosting because boosting had already completed for | ||
624 | the grace period in question. | ||
625 | |||
626 | o "ny" is the number of times that the system balked from | ||
627 | boosting because it was not yet time to start boosting | ||
628 | the grace period in question. | ||
629 | |||
630 | o "nos" is the number of times that the system balked from | ||
631 | boosting for inexplicable ("not otherwise specified") | ||
632 | reasons. This can actually happen due to races involving | ||
633 | increments of the jiffies counter. | ||
634 | |||
635 | o In the line beginning with "exp balk", the fields are as follows: | ||
636 | |||
637 | o "bt" is the number of times that the system balked from | ||
638 | boosting because there were no blocked tasks to boost. | ||
639 | |||
640 | o "nos" is the number of times that the system balked from | ||
641 | boosting for inexplicable ("not otherwise specified") | ||
642 | reasons. | ||
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 10df0b82f459..0f0fb7c432c2 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -842,9 +842,7 @@ SRCU: Critical sections Grace period Barrier | |||
842 | 842 | ||
843 | srcu_read_lock synchronize_srcu srcu_barrier | 843 | srcu_read_lock synchronize_srcu srcu_barrier |
844 | srcu_read_unlock call_srcu | 844 | srcu_read_unlock call_srcu |
845 | srcu_read_lock_raw synchronize_srcu_expedited | 845 | srcu_dereference synchronize_srcu_expedited |
846 | srcu_read_unlock_raw | ||
847 | srcu_dereference | ||
848 | 846 | ||
849 | SRCU: Initialization/cleanup | 847 | SRCU: Initialization/cleanup |
850 | init_srcu_struct | 848 | init_srcu_struct |
@@ -865,38 +863,32 @@ list can be helpful: | |||
865 | 863 | ||
866 | a. Will readers need to block? If so, you need SRCU. | 864 | a. Will readers need to block? If so, you need SRCU. |
867 | 865 | ||
868 | b. Is it necessary to start a read-side critical section in a | 866 | b. What about the -rt patchset? If readers would need to block |
869 | hardirq handler or exception handler, and then to complete | ||
870 | this read-side critical section in the task that was | ||
871 | interrupted? If so, you need SRCU's srcu_read_lock_raw() and | ||
872 | srcu_read_unlock_raw() primitives. | ||
873 | |||
874 | c. What about the -rt patchset? If readers would need to block | ||
875 | in an non-rt kernel, you need SRCU. If readers would block | 867 | in an non-rt kernel, you need SRCU. If readers would block |
876 | in a -rt kernel, but not in a non-rt kernel, SRCU is not | 868 | in a -rt kernel, but not in a non-rt kernel, SRCU is not |
877 | necessary. | 869 | necessary. |
878 | 870 | ||
879 | d. Do you need to treat NMI handlers, hardirq handlers, | 871 | c. Do you need to treat NMI handlers, hardirq handlers, |
880 | and code segments with preemption disabled (whether | 872 | and code segments with preemption disabled (whether |
881 | via preempt_disable(), local_irq_save(), local_bh_disable(), | 873 | via preempt_disable(), local_irq_save(), local_bh_disable(), |
882 | or some other mechanism) as if they were explicit RCU readers? | 874 | or some other mechanism) as if they were explicit RCU readers? |
883 | If so, RCU-sched is the only choice that will work for you. | 875 | If so, RCU-sched is the only choice that will work for you. |
884 | 876 | ||
885 | e. Do you need RCU grace periods to complete even in the face | 877 | d. Do you need RCU grace periods to complete even in the face |
886 | of softirq monopolization of one or more of the CPUs? For | 878 | of softirq monopolization of one or more of the CPUs? For |
887 | example, is your code subject to network-based denial-of-service | 879 | example, is your code subject to network-based denial-of-service |
888 | attacks? If so, you need RCU-bh. | 880 | attacks? If so, you need RCU-bh. |
889 | 881 | ||
890 | f. Is your workload too update-intensive for normal use of | 882 | e. Is your workload too update-intensive for normal use of |
891 | RCU, but inappropriate for other synchronization mechanisms? | 883 | RCU, but inappropriate for other synchronization mechanisms? |
892 | If so, consider SLAB_DESTROY_BY_RCU. But please be careful! | 884 | If so, consider SLAB_DESTROY_BY_RCU. But please be careful! |
893 | 885 | ||
894 | g. Do you need read-side critical sections that are respected | 886 | f. Do you need read-side critical sections that are respected |
895 | even though they are in the middle of the idle loop, during | 887 | even though they are in the middle of the idle loop, during |
896 | user-mode execution, or on an offlined CPU? If so, SRCU is the | 888 | user-mode execution, or on an offlined CPU? If so, SRCU is the |
897 | only choice that will work for you. | 889 | only choice that will work for you. |
898 | 890 | ||
899 | h. Otherwise, use RCU. | 891 | g. Otherwise, use RCU. |
900 | 892 | ||
901 | Of course, this all assumes that you have determined that RCU is in fact | 893 | Of course, this all assumes that you have determined that RCU is in fact |
902 | the right tool for your job. | 894 | the right tool for your job. |
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index dc0e33210d7e..2b7e32dfe00d 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -105,5 +105,5 @@ kernel patches. | |||
105 | same time, just various/random combinations of them]: | 105 | same time, just various/random combinations of them]: |
106 | 106 | ||
107 | CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI, | 107 | CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI, |
108 | CONFIG_BLOCK, CONFIG_PM, CONFIG_HOTPLUG, CONFIG_MAGIC_SYSRQ, | 108 | CONFIG_BLOCK, CONFIG_PM, CONFIG_MAGIC_SYSRQ, |
109 | CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y) | 109 | CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y) |
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index f8ebcde43b17..c6a06b71594d 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -272,7 +272,7 @@ int main(int argc, char *argv[]) | |||
272 | char *logfile = NULL; | 272 | char *logfile = NULL; |
273 | int loop = 0; | 273 | int loop = 0; |
274 | int containerset = 0; | 274 | int containerset = 0; |
275 | char containerpath[1024]; | 275 | char *containerpath = NULL; |
276 | int cfd = 0; | 276 | int cfd = 0; |
277 | int forking = 0; | 277 | int forking = 0; |
278 | sigset_t sigset; | 278 | sigset_t sigset; |
@@ -299,7 +299,7 @@ int main(int argc, char *argv[]) | |||
299 | break; | 299 | break; |
300 | case 'C': | 300 | case 'C': |
301 | containerset = 1; | 301 | containerset = 1; |
302 | strncpy(containerpath, optarg, strlen(optarg) + 1); | 302 | containerpath = optarg; |
303 | break; | 303 | break; |
304 | case 'w': | 304 | case 'w': |
305 | logfile = strdup(optarg); | 305 | logfile = strdup(optarg); |
diff --git a/Documentation/acpi/apei/einj.txt b/Documentation/acpi/apei/einj.txt index e20b6daaced4..a58b63da1a36 100644 --- a/Documentation/acpi/apei/einj.txt +++ b/Documentation/acpi/apei/einj.txt | |||
@@ -47,11 +47,16 @@ directory apei/einj. The following files are provided. | |||
47 | 47 | ||
48 | - param1 | 48 | - param1 |
49 | This file is used to set the first error parameter value. Effect of | 49 | This file is used to set the first error parameter value. Effect of |
50 | parameter depends on error_type specified. | 50 | parameter depends on error_type specified. For example, if error |
51 | type is memory related type, the param1 should be a valid physical | ||
52 | memory address. | ||
51 | 53 | ||
52 | - param2 | 54 | - param2 |
53 | This file is used to set the second error parameter value. Effect of | 55 | This file is used to set the second error parameter value. Effect of |
54 | parameter depends on error_type specified. | 56 | parameter depends on error_type specified. For example, if error |
57 | type is memory related type, the param2 should be a physical memory | ||
58 | address mask. Linux requires page or narrower granularity, say, | ||
59 | 0xfffffffffffff000. | ||
55 | 60 | ||
56 | - notrigger | 61 | - notrigger |
57 | The EINJ mechanism is a two step process. First inject the error, then | 62 | The EINJ mechanism is a two step process. First inject the error, then |
diff --git a/Documentation/acpi/namespace.txt b/Documentation/acpi/namespace.txt new file mode 100644 index 000000000000..260f6a3661fa --- /dev/null +++ b/Documentation/acpi/namespace.txt | |||
@@ -0,0 +1,395 @@ | |||
1 | ACPI Device Tree - Representation of ACPI Namespace | ||
2 | |||
3 | Copyright (C) 2013, Intel Corporation | ||
4 | Author: Lv Zheng <lv.zheng@intel.com> | ||
5 | |||
6 | |||
7 | Abstract: | ||
8 | |||
9 | The Linux ACPI subsystem converts ACPI namespace objects into a Linux | ||
10 | device tree under the /sys/devices/LNXSYSTEM:00 and updates it upon | ||
11 | receiving ACPI hotplug notification events. For each device object in this | ||
12 | hierarchy there is a corresponding symbolic link in the | ||
13 | /sys/bus/acpi/devices. | ||
14 | This document illustrates the structure of the ACPI device tree. | ||
15 | |||
16 | |||
17 | Credit: | ||
18 | |||
19 | Thanks for the help from Zhang Rui <rui.zhang@intel.com> and Rafael J. | ||
20 | Wysocki <rafael.j.wysocki@intel.com>. | ||
21 | |||
22 | |||
23 | 1. ACPI Definition Blocks | ||
24 | |||
25 | The ACPI firmware sets up RSDP (Root System Description Pointer) in the | ||
26 | system memory address space pointing to the XSDT (Extended System | ||
27 | Description Table). The XSDT always points to the FADT (Fixed ACPI | ||
28 | Description Table) using its first entry, the data within the FADT | ||
29 | includes various fixed-length entries that describe fixed ACPI features | ||
30 | of the hardware. The FADT contains a pointer to the DSDT | ||
31 | (Differentiated System Descripition Table). The XSDT also contains | ||
32 | entries pointing to possibly multiple SSDTs (Secondary System | ||
33 | Description Table). | ||
34 | |||
35 | The DSDT and SSDT data is organized in data structures called definition | ||
36 | blocks that contain definitions of various objects, including ACPI | ||
37 | control methods, encoded in AML (ACPI Machine Language). The data block | ||
38 | of the DSDT along with the contents of SSDTs represents a hierarchical | ||
39 | data structure called the ACPI namespace whose topology reflects the | ||
40 | structure of the underlying hardware platform. | ||
41 | |||
42 | The relationships between ACPI System Definition Tables described above | ||
43 | are illustrated in the following diagram. | ||
44 | |||
45 | +---------+ +-------+ +--------+ +------------------------+ | ||
46 | | RSDP | +->| XSDT | +->| FADT | | +-------------------+ | | ||
47 | +---------+ | +-------+ | +--------+ +-|->| DSDT | | | ||
48 | | Pointer | | | Entry |-+ | ...... | | | +-------------------+ | | ||
49 | +---------+ | +-------+ | X_DSDT |--+ | | Definition Blocks | | | ||
50 | | Pointer |-+ | ..... | | ...... | | +-------------------+ | | ||
51 | +---------+ +-------+ +--------+ | +-------------------+ | | ||
52 | | Entry |------------------|->| SSDT | | | ||
53 | +- - - -+ | +-------------------| | | ||
54 | | Entry | - - - - - - - -+ | | Definition Blocks | | | ||
55 | +- - - -+ | | +-------------------+ | | ||
56 | | | +- - - - - - - - - -+ | | ||
57 | +-|->| SSDT | | | ||
58 | | +-------------------+ | | ||
59 | | | Definition Blocks | | | ||
60 | | +- - - - - - - - - -+ | | ||
61 | +------------------------+ | ||
62 | | | ||
63 | OSPM Loading | | ||
64 | \|/ | ||
65 | +----------------+ | ||
66 | | ACPI Namespace | | ||
67 | +----------------+ | ||
68 | |||
69 | Figure 1. ACPI Definition Blocks | ||
70 | |||
71 | NOTE: RSDP can also contain a pointer to the RSDT (Root System | ||
72 | Description Table). Platforms provide RSDT to enable | ||
73 | compatibility with ACPI 1.0 operating systems. The OS is expected | ||
74 | to use XSDT, if present. | ||
75 | |||
76 | |||
77 | 2. Example ACPI Namespace | ||
78 | |||
79 | All definition blocks are loaded into a single namespace. The namespace | ||
80 | is a hierarchy of objects identified by names and paths. | ||
81 | The following naming conventions apply to object names in the ACPI | ||
82 | namespace: | ||
83 | 1. All names are 32 bits long. | ||
84 | 2. The first byte of a name must be one of 'A' - 'Z', '_'. | ||
85 | 3. Each of the remaining bytes of a name must be one of 'A' - 'Z', '0' | ||
86 | - '9', '_'. | ||
87 | 4. Names starting with '_' are reserved by the ACPI specification. | ||
88 | 5. The '\' symbol represents the root of the namespace (i.e. names | ||
89 | prepended with '\' are relative to the namespace root). | ||
90 | 6. The '^' symbol represents the parent of the current namespace node | ||
91 | (i.e. names prepended with '^' are relative to the parent of the | ||
92 | current namespace node). | ||
93 | |||
94 | The figure below shows an example ACPI namespace. | ||
95 | |||
96 | +------+ | ||
97 | | \ | Root | ||
98 | +------+ | ||
99 | | | ||
100 | | +------+ | ||
101 | +-| _PR | Scope(_PR): the processor namespace | ||
102 | | +------+ | ||
103 | | | | ||
104 | | | +------+ | ||
105 | | +-| CPU0 | Processor(CPU0): the first processor | ||
106 | | +------+ | ||
107 | | | ||
108 | | +------+ | ||
109 | +-| _SB | Scope(_SB): the system bus namespace | ||
110 | | +------+ | ||
111 | | | | ||
112 | | | +------+ | ||
113 | | +-| LID0 | Device(LID0); the lid device | ||
114 | | | +------+ | ||
115 | | | | | ||
116 | | | | +------+ | ||
117 | | | +-| _HID | Name(_HID, "PNP0C0D"): the hardware ID | ||
118 | | | | +------+ | ||
119 | | | | | ||
120 | | | | +------+ | ||
121 | | | +-| _STA | Method(_STA): the status control method | ||
122 | | | +------+ | ||
123 | | | | ||
124 | | | +------+ | ||
125 | | +-| PCI0 | Device(PCI0); the PCI root bridge | ||
126 | | +------+ | ||
127 | | | | ||
128 | | | +------+ | ||
129 | | +-| _HID | Name(_HID, "PNP0A08"): the hardware ID | ||
130 | | | +------+ | ||
131 | | | | ||
132 | | | +------+ | ||
133 | | +-| _CID | Name(_CID, "PNP0A03"): the compatible ID | ||
134 | | | +------+ | ||
135 | | | | ||
136 | | | +------+ | ||
137 | | +-| RP03 | Scope(RP03): the PCI0 power scope | ||
138 | | | +------+ | ||
139 | | | | | ||
140 | | | | +------+ | ||
141 | | | +-| PXP3 | PowerResource(PXP3): the PCI0 power resource | ||
142 | | | +------+ | ||
143 | | | | ||
144 | | | +------+ | ||
145 | | +-| GFX0 | Device(GFX0): the graphics adapter | ||
146 | | +------+ | ||
147 | | | | ||
148 | | | +------+ | ||
149 | | +-| _ADR | Name(_ADR, 0x00020000): the PCI bus address | ||
150 | | | +------+ | ||
151 | | | | ||
152 | | | +------+ | ||
153 | | +-| DD01 | Device(DD01): the LCD output device | ||
154 | | +------+ | ||
155 | | | | ||
156 | | | +------+ | ||
157 | | +-| _BCL | Method(_BCL): the backlight control method | ||
158 | | +------+ | ||
159 | | | ||
160 | | +------+ | ||
161 | +-| _TZ | Scope(_TZ): the thermal zone namespace | ||
162 | | +------+ | ||
163 | | | | ||
164 | | | +------+ | ||
165 | | +-| FN00 | PowerResource(FN00): the FAN0 power resource | ||
166 | | | +------+ | ||
167 | | | | ||
168 | | | +------+ | ||
169 | | +-| FAN0 | Device(FAN0): the FAN0 cooling device | ||
170 | | | +------+ | ||
171 | | | | | ||
172 | | | | +------+ | ||
173 | | | +-| _HID | Name(_HID, "PNP0A0B"): the hardware ID | ||
174 | | | +------+ | ||
175 | | | | ||
176 | | | +------+ | ||
177 | | +-| TZ00 | ThermalZone(TZ00); the FAN thermal zone | ||
178 | | +------+ | ||
179 | | | ||
180 | | +------+ | ||
181 | +-| _GPE | Scope(_GPE): the GPE namespace | ||
182 | +------+ | ||
183 | |||
184 | Figure 2. Example ACPI Namespace | ||
185 | |||
186 | |||
187 | 3. Linux ACPI Device Objects | ||
188 | |||
189 | The Linux kernel's core ACPI subsystem creates struct acpi_device | ||
190 | objects for ACPI namespace objects representing devices, power resources | ||
191 | processors, thermal zones. Those objects are exported to user space via | ||
192 | sysfs as directories in the subtree under /sys/devices/LNXSYSTM:00. The | ||
193 | format of their names is <bus_id:instance>, where 'bus_id' refers to the | ||
194 | ACPI namespace representation of the given object and 'instance' is used | ||
195 | for distinguishing different object of the same 'bus_id' (it is | ||
196 | two-digit decimal representation of an unsigned integer). | ||
197 | |||
198 | The value of 'bus_id' depends on the type of the object whose name it is | ||
199 | part of as listed in the table below. | ||
200 | |||
201 | +---+-----------------+-------+----------+ | ||
202 | | | Object/Feature | Table | bus_id | | ||
203 | +---+-----------------+-------+----------+ | ||
204 | | N | Root | xSDT | LNXSYSTM | | ||
205 | +---+-----------------+-------+----------+ | ||
206 | | N | Device | xSDT | _HID | | ||
207 | +---+-----------------+-------+----------+ | ||
208 | | N | Processor | xSDT | LNXCPU | | ||
209 | +---+-----------------+-------+----------+ | ||
210 | | N | ThermalZone | xSDT | LNXTHERM | | ||
211 | +---+-----------------+-------+----------+ | ||
212 | | N | PowerResource | xSDT | LNXPOWER | | ||
213 | +---+-----------------+-------+----------+ | ||
214 | | N | Other Devices | xSDT | device | | ||
215 | +---+-----------------+-------+----------+ | ||
216 | | F | PWR_BUTTON | FADT | LNXPWRBN | | ||
217 | +---+-----------------+-------+----------+ | ||
218 | | F | SLP_BUTTON | FADT | LNXSLPBN | | ||
219 | +---+-----------------+-------+----------+ | ||
220 | | M | Video Extension | xSDT | LNXVIDEO | | ||
221 | +---+-----------------+-------+----------+ | ||
222 | | M | ATA Controller | xSDT | LNXIOBAY | | ||
223 | +---+-----------------+-------+----------+ | ||
224 | | M | Docking Station | xSDT | LNXDOCK | | ||
225 | +---+-----------------+-------+----------+ | ||
226 | |||
227 | Table 1. ACPI Namespace Objects Mapping | ||
228 | |||
229 | The following rules apply when creating struct acpi_device objects on | ||
230 | the basis of the contents of ACPI System Description Tables (as | ||
231 | indicated by the letter in the first column and the notation in the | ||
232 | second column of the table above): | ||
233 | N: | ||
234 | The object's source is an ACPI namespace node (as indicated by the | ||
235 | named object's type in the second column). In that case the object's | ||
236 | directory in sysfs will contain the 'path' attribute whose value is | ||
237 | the full path to the node from the namespace root. | ||
238 | struct acpi_device objects are created for the ACPI namespace nodes | ||
239 | whose _STA control methods return PRESENT or FUNCTIONING. The power | ||
240 | resource nodes or nodes without _STA are assumed to be both PRESENT | ||
241 | and FUNCTIONING. | ||
242 | F: | ||
243 | The struct acpi_device object is created for a fixed hardware | ||
244 | feature (as indicated by the fixed feature flag's name in the second | ||
245 | column), so its sysfs directory will not contain the 'path' | ||
246 | attribute. | ||
247 | M: | ||
248 | The struct acpi_device object is created for an ACPI namespace node | ||
249 | with specific control methods (as indicated by the ACPI defined | ||
250 | device's type in the second column). The 'path' attribute containing | ||
251 | its namespace path will be present in its sysfs directory. For | ||
252 | example, if the _BCL method is present for an ACPI namespace node, a | ||
253 | struct acpi_device object with LNXVIDEO 'bus_id' will be created for | ||
254 | it. | ||
255 | |||
256 | The third column of the above table indicates which ACPI System | ||
257 | Description Tables contain information used for the creation of the | ||
258 | struct acpi_device objects represented by the given row (xSDT means DSDT | ||
259 | or SSDT). | ||
260 | |||
261 | The forth column of the above table indicates the 'bus_id' generation | ||
262 | rule of the struct acpi_device object: | ||
263 | _HID: | ||
264 | _HID in the last column of the table means that the object's bus_id | ||
265 | is derived from the _HID/_CID identification objects present under | ||
266 | the corresponding ACPI namespace node. The object's sysfs directory | ||
267 | will then contain the 'hid' and 'modalias' attributes that can be | ||
268 | used to retrieve the _HID and _CIDs of that object. | ||
269 | LNXxxxxx: | ||
270 | The 'modalias' attribute is also present for struct acpi_device | ||
271 | objects having bus_id of the "LNXxxxxx" form (pseudo devices), in | ||
272 | which cases it contains the bus_id string itself. | ||
273 | device: | ||
274 | 'device' in the last column of the table indicates that the object's | ||
275 | bus_id cannot be determined from _HID/_CID of the corresponding | ||
276 | ACPI namespace node, although that object represents a device (for | ||
277 | example, it may be a PCI device with _ADR defined and without _HID | ||
278 | or _CID). In that case the string 'device' will be used as the | ||
279 | object's bus_id. | ||
280 | |||
281 | |||
282 | 4. Linux ACPI Physical Device Glue | ||
283 | |||
284 | ACPI device (i.e. struct acpi_device) objects may be linked to other | ||
285 | objects in the Linux' device hierarchy that represent "physical" devices | ||
286 | (for example, devices on the PCI bus). If that happens, it means that | ||
287 | the ACPI device object is a "companion" of a device otherwise | ||
288 | represented in a different way and is used (1) to provide configuration | ||
289 | information on that device which cannot be obtained by other means and | ||
290 | (2) to do specific things to the device with the help of its ACPI | ||
291 | control methods. One ACPI device object may be linked this way to | ||
292 | multiple "physical" devices. | ||
293 | |||
294 | If an ACPI device object is linked to a "physical" device, its sysfs | ||
295 | directory contains the "physical_node" symbolic link to the sysfs | ||
296 | directory of the target device object. In turn, the target device's | ||
297 | sysfs directory will then contain the "firmware_node" symbolic link to | ||
298 | the sysfs directory of the companion ACPI device object. | ||
299 | The linking mechanism relies on device identification provided by the | ||
300 | ACPI namespace. For example, if there's an ACPI namespace object | ||
301 | representing a PCI device (i.e. a device object under an ACPI namespace | ||
302 | object representing a PCI bridge) whose _ADR returns 0x00020000 and the | ||
303 | bus number of the parent PCI bridge is 0, the sysfs directory | ||
304 | representing the struct acpi_device object created for that ACPI | ||
305 | namespace object will contain the 'physical_node' symbolic link to the | ||
306 | /sys/devices/pci0000:00/0000:00:02:0/ sysfs directory of the | ||
307 | corresponding PCI device. | ||
308 | |||
309 | The linking mechanism is generally bus-specific. The core of its | ||
310 | implementation is located in the drivers/acpi/glue.c file, but there are | ||
311 | complementary parts depending on the bus types in question located | ||
312 | elsewhere. For example, the PCI-specific part of it is located in | ||
313 | drivers/pci/pci-acpi.c. | ||
314 | |||
315 | |||
316 | 5. Example Linux ACPI Device Tree | ||
317 | |||
318 | The sysfs hierarchy of struct acpi_device objects corresponding to the | ||
319 | example ACPI namespace illustrated in Figure 2 with the addition of | ||
320 | fixed PWR_BUTTON/SLP_BUTTON devices is shown below. | ||
321 | |||
322 | +--------------+---+-----------------+ | ||
323 | | LNXSYSTEM:00 | \ | acpi:LNXSYSTEM: | | ||
324 | +--------------+---+-----------------+ | ||
325 | | | ||
326 | | +-------------+-----+----------------+ | ||
327 | +-| LNXPWRBN:00 | N/A | acpi:LNXPWRBN: | | ||
328 | | +-------------+-----+----------------+ | ||
329 | | | ||
330 | | +-------------+-----+----------------+ | ||
331 | +-| LNXSLPBN:00 | N/A | acpi:LNXSLPBN: | | ||
332 | | +-------------+-----+----------------+ | ||
333 | | | ||
334 | | +-----------+------------+--------------+ | ||
335 | +-| LNXCPU:00 | \_PR_.CPU0 | acpi:LNXCPU: | | ||
336 | | +-----------+------------+--------------+ | ||
337 | | | ||
338 | | +-------------+-------+----------------+ | ||
339 | +-| LNXSYBUS:00 | \_SB_ | acpi:LNXSYBUS: | | ||
340 | | +-------------+-------+----------------+ | ||
341 | | | | ||
342 | | | +- - - - - - - +- - - - - - +- - - - - - - -+ | ||
343 | | +-| * PNP0C0D:00 | \_SB_.LID0 | acpi:PNP0C0D: | | ||
344 | | | +- - - - - - - +- - - - - - +- - - - - - - -+ | ||
345 | | | | ||
346 | | | +------------+------------+-----------------------+ | ||
347 | | +-| PNP0A08:00 | \_SB_.PCI0 | acpi:PNP0A08:PNP0A03: | | ||
348 | | +------------+------------+-----------------------+ | ||
349 | | | | ||
350 | | | +-----------+-----------------+-----+ | ||
351 | | +-| device:00 | \_SB_.PCI0.RP03 | N/A | | ||
352 | | | +-----------+-----------------+-----+ | ||
353 | | | | | ||
354 | | | | +-------------+----------------------+----------------+ | ||
355 | | | +-| LNXPOWER:00 | \_SB_.PCI0.RP03.PXP3 | acpi:LNXPOWER: | | ||
356 | | | +-------------+----------------------+----------------+ | ||
357 | | | | ||
358 | | | +-------------+-----------------+----------------+ | ||
359 | | +-| LNXVIDEO:00 | \_SB_.PCI0.GFX0 | acpi:LNXVIDEO: | | ||
360 | | +-------------+-----------------+----------------+ | ||
361 | | | | ||
362 | | | +-----------+-----------------+-----+ | ||
363 | | +-| device:01 | \_SB_.PCI0.DD01 | N/A | | ||
364 | | +-----------+-----------------+-----+ | ||
365 | | | ||
366 | | +-------------+-------+----------------+ | ||
367 | +-| LNXSYBUS:01 | \_TZ_ | acpi:LNXSYBUS: | | ||
368 | +-------------+-------+----------------+ | ||
369 | | | ||
370 | | +-------------+------------+----------------+ | ||
371 | +-| LNXPOWER:0a | \_TZ_.FN00 | acpi:LNXPOWER: | | ||
372 | | +-------------+------------+----------------+ | ||
373 | | | ||
374 | | +------------+------------+---------------+ | ||
375 | +-| PNP0C0B:00 | \_TZ_.FAN0 | acpi:PNP0C0B: | | ||
376 | | +------------+------------+---------------+ | ||
377 | | | ||
378 | | +-------------+------------+----------------+ | ||
379 | +-| LNXTHERM:00 | \_TZ_.TZ00 | acpi:LNXTHERM: | | ||
380 | +-------------+------------+----------------+ | ||
381 | |||
382 | Figure 3. Example Linux ACPI Device Tree | ||
383 | |||
384 | NOTE: Each node is represented as "object/path/modalias", where: | ||
385 | 1. 'object' is the name of the object's directory in sysfs. | ||
386 | 2. 'path' is the ACPI namespace path of the corresponding | ||
387 | ACPI namespace object, as returned by the object's 'path' | ||
388 | sysfs attribute. | ||
389 | 3. 'modalias' is the value of the object's 'modalias' sysfs | ||
390 | attribute (as described earlier in this document). | ||
391 | NOTE: N/A indicates the device object does not have the 'path' or the | ||
392 | 'modalias' attribute. | ||
393 | NOTE: The PNP0C0D device listed above is highlighted (marked by "*") | ||
394 | to indicate it will be created only when its _STA methods return | ||
395 | PRESENT or FUNCTIONING. | ||
diff --git a/Documentation/acpi/video_extension.txt b/Documentation/acpi/video_extension.txt new file mode 100644 index 000000000000..78b32ac02466 --- /dev/null +++ b/Documentation/acpi/video_extension.txt | |||
@@ -0,0 +1,106 @@ | |||
1 | ACPI video extensions | ||
2 | ~~~~~~~~~~~~~~~~~~~~~ | ||
3 | |||
4 | This driver implement the ACPI Extensions For Display Adapters for | ||
5 | integrated graphics devices on motherboard, as specified in ACPI 2.0 | ||
6 | Specification, Appendix B, allowing to perform some basic control like | ||
7 | defining the video POST device, retrieving EDID information or to | ||
8 | setup a video output, etc. Note that this is an ref. implementation | ||
9 | only. It may or may not work for your integrated video device. | ||
10 | |||
11 | The ACPI video driver does 3 things regarding backlight control: | ||
12 | |||
13 | 1 Export a sysfs interface for user space to control backlight level | ||
14 | |||
15 | If the ACPI table has a video device, and acpi_backlight=vendor kernel | ||
16 | command line is not present, the driver will register a backlight device | ||
17 | and set the required backlight operation structure for it for the sysfs | ||
18 | interface control. For every registered class device, there will be a | ||
19 | directory named acpi_videoX under /sys/class/backlight. | ||
20 | |||
21 | The backlight sysfs interface has a standard definition here: | ||
22 | Documentation/ABI/stable/sysfs-class-backlight. | ||
23 | |||
24 | And what ACPI video driver does is: | ||
25 | actual_brightness: on read, control method _BQC will be evaluated to | ||
26 | get the brightness level the firmware thinks it is at; | ||
27 | bl_power: not implemented, will set the current brightness instead; | ||
28 | brightness: on write, control method _BCM will run to set the requested | ||
29 | brightness level; | ||
30 | max_brightness: Derived from the _BCL package(see below); | ||
31 | type: firmware | ||
32 | |||
33 | Note that ACPI video backlight driver will always use index for | ||
34 | brightness, actual_brightness and max_brightness. So if we have | ||
35 | the following _BCL package: | ||
36 | |||
37 | Method (_BCL, 0, NotSerialized) | ||
38 | { | ||
39 | Return (Package (0x0C) | ||
40 | { | ||
41 | 0x64, | ||
42 | 0x32, | ||
43 | 0x0A, | ||
44 | 0x14, | ||
45 | 0x1E, | ||
46 | 0x28, | ||
47 | 0x32, | ||
48 | 0x3C, | ||
49 | 0x46, | ||
50 | 0x50, | ||
51 | 0x5A, | ||
52 | 0x64 | ||
53 | }) | ||
54 | } | ||
55 | |||
56 | The first two levels are for when laptop are on AC or on battery and are | ||
57 | not used by Linux currently. The remaining 10 levels are supported levels | ||
58 | that we can choose from. The applicable index values are from 0 (that | ||
59 | corresponds to the 0x0A brightness value) to 9 (that corresponds to the | ||
60 | 0x64 brightness value) inclusive. Each of those index values is regarded | ||
61 | as a "brightness level" indicator. Thus from the user space perspective | ||
62 | the range of available brightness levels is from 0 to 9 (max_brightness) | ||
63 | inclusive. | ||
64 | |||
65 | 2 Notify user space about hotkey event | ||
66 | |||
67 | There are generally two cases for hotkey event reporting: | ||
68 | i) For some laptops, when user presses the hotkey, a scancode will be | ||
69 | generated and sent to user space through the input device created by | ||
70 | the keyboard driver as a key type input event, with proper remap, the | ||
71 | following key code will appear to user space: | ||
72 | |||
73 | EV_KEY, KEY_BRIGHTNESSUP | ||
74 | EV_KEY, KEY_BRIGHTNESSDOWN | ||
75 | etc. | ||
76 | |||
77 | For this case, ACPI video driver does not need to do anything(actually, | ||
78 | it doesn't even know this happened). | ||
79 | |||
80 | ii) For some laptops, the press of the hotkey will not generate the | ||
81 | scancode, instead, firmware will notify the video device ACPI node | ||
82 | about the event. The event value is defined in the ACPI spec. ACPI | ||
83 | video driver will generate an key type input event according to the | ||
84 | notify value it received and send the event to user space through the | ||
85 | input device it created: | ||
86 | |||
87 | event keycode | ||
88 | 0x86 KEY_BRIGHTNESSUP | ||
89 | 0x87 KEY_BRIGHTNESSDOWN | ||
90 | etc. | ||
91 | |||
92 | so this would lead to the same effect as case i) now. | ||
93 | |||
94 | Once user space tool receives this event, it can modify the backlight | ||
95 | level through the sysfs interface. | ||
96 | |||
97 | 3 Change backlight level in the kernel | ||
98 | |||
99 | This works for machines covered by case ii) in Section 2. Once the driver | ||
100 | received a notification, it will set the backlight level accordingly. This does | ||
101 | not affect the sending of event to user space, they are always sent to user | ||
102 | space regardless of whether or not the video module controls the backlight level | ||
103 | directly. This behaviour can be controlled through the brightness_switch_enabled | ||
104 | module parameter as documented in kernel-parameters.txt. It is recommended to | ||
105 | disable this behaviour once a GUI environment starts up and wants to have full | ||
106 | control of the backlight level. | ||
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx index 7b9351f2f555..e48b74de6ac0 100644 --- a/Documentation/arm/IXP4xx +++ b/Documentation/arm/IXP4xx | |||
@@ -36,7 +36,7 @@ Linux currently supports the following features on the IXP4xx chips: | |||
36 | - Timers (watchdog, OS) | 36 | - Timers (watchdog, OS) |
37 | 37 | ||
38 | The following components of the chips are not supported by Linux and | 38 | The following components of the chips are not supported by Linux and |
39 | require the use of Intel's proprietary CSR softare: | 39 | require the use of Intel's proprietary CSR software: |
40 | 40 | ||
41 | - USB device interface | 41 | - USB device interface |
42 | - Network interfaces (HSS, Utopia, NPEs, etc) | 42 | - Network interfaces (HSS, Utopia, NPEs, etc) |
diff --git a/Documentation/arm/sti/overview.txt b/Documentation/arm/sti/overview.txt new file mode 100644 index 000000000000..1a4e93d6027f --- /dev/null +++ b/Documentation/arm/sti/overview.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | STi ARM Linux Overview | ||
2 | ========================== | ||
3 | |||
4 | Introduction | ||
5 | ------------ | ||
6 | |||
7 | The ST Microelectronics Multimedia and Application Processors range of | ||
8 | CortexA9 System-on-Chip are supported by the 'STi' platform of | ||
9 | ARM Linux. Currently STiH415, STiH416 SOCs are supported with both | ||
10 | B2000 and B2020 Reference boards. | ||
11 | |||
12 | |||
13 | configuration | ||
14 | ------------- | ||
15 | |||
16 | A generic configuration is provided for both STiH415/416, and can be used as the | ||
17 | default by | ||
18 | make stih41x_defconfig | ||
19 | |||
20 | Layout | ||
21 | ------ | ||
22 | All the files for multiple machine families (STiH415, STiH416, and STiG125) | ||
23 | are located in the platform code contained in arch/arm/mach-sti | ||
24 | |||
25 | There is a generic board board-dt.c in the mach folder which support | ||
26 | Flattened Device Tree, which means, It works with any compatible board with | ||
27 | Device Trees. | ||
28 | |||
29 | |||
30 | Document Author | ||
31 | --------------- | ||
32 | |||
33 | Srinivas Kandagatla <srinivas.kandagatla@st.com>, (c) 2013 ST Microelectronics | ||
diff --git a/Documentation/arm/sti/stih415-overview.txt b/Documentation/arm/sti/stih415-overview.txt new file mode 100644 index 000000000000..1383e33f265d --- /dev/null +++ b/Documentation/arm/sti/stih415-overview.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | STiH415 Overview | ||
2 | ================ | ||
3 | |||
4 | Introduction | ||
5 | ------------ | ||
6 | |||
7 | The STiH415 is the next generation of HD, AVC set-top box processors | ||
8 | for satellite, cable, terrestrial and IP-STB markets. | ||
9 | |||
10 | Features | ||
11 | - ARM Cortex-A9 1.0 GHz, dual-core CPU | ||
12 | - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2 | ||
diff --git a/Documentation/arm/sti/stih416-overview.txt b/Documentation/arm/sti/stih416-overview.txt new file mode 100644 index 000000000000..558444c201c6 --- /dev/null +++ b/Documentation/arm/sti/stih416-overview.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | STiH416 Overview | ||
2 | ================ | ||
3 | |||
4 | Introduction | ||
5 | ------------ | ||
6 | |||
7 | The STiH416 is the next generation of HD, AVC set-top box processors | ||
8 | for satellite, cable, terrestrial and IP-STB markets. | ||
9 | |||
10 | Features | ||
11 | - ARM Cortex-A9 1.2 GHz dual core CPU | ||
12 | - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2 | ||
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README index 87a1e8fb6242..e3f93fb9224e 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi/README | |||
@@ -3,17 +3,26 @@ ARM Allwinner SoCs | |||
3 | 3 | ||
4 | This document lists all the ARM Allwinner SoCs that are currently | 4 | This document lists all the ARM Allwinner SoCs that are currently |
5 | supported in mainline by the Linux kernel. This document will also | 5 | supported in mainline by the Linux kernel. This document will also |
6 | provide links to documentation and or datasheet for these SoCs. | 6 | provide links to documentation and/or datasheet for these SoCs. |
7 | 7 | ||
8 | SunXi family | 8 | SunXi family |
9 | ------------ | 9 | ------------ |
10 | Linux kernel mach directory: arch/arm/mach-sunxi | ||
10 | 11 | ||
11 | Flavors: | 12 | Flavors: |
12 | Allwinner A10 (sun4i) | 13 | * ARM Cortex-A8 based SoCs |
13 | Datasheet : http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf | 14 | - Allwinner A10 (sun4i) |
15 | + Datasheet | ||
16 | http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf | ||
17 | + User Manual | ||
18 | http://dl.linux-sunxi.org/A10/A10%20User%20Manual%20-%20v1.20%20%282012-04-09%2c%20DECRYPTED%29.pdf | ||
14 | 19 | ||
15 | Allwinner A13 (sun5i) | 20 | - Allwinner A10s (sun5i) |
16 | Datasheet : http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | 21 | + Datasheet |
22 | http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf | ||
17 | 23 | ||
18 | Core: Cortex A8 | 24 | - Allwinner A13 (sun5i) |
19 | Linux kernel mach directory: arch/arm/mach-sunxi \ No newline at end of file | 25 | + Datasheet |
26 | http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | ||
27 | + User Manual | ||
28 | http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-08-08%29.pdf | ||
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt index 5f583af0a6e1..78a377124ef0 100644 --- a/Documentation/arm64/memory.txt +++ b/Documentation/arm64/memory.txt | |||
@@ -73,3 +73,10 @@ Translation table lookup with 64KB pages: | |||
73 | | | +--------------------------> [41:29] L2 index (only 38:29 used) | 73 | | | +--------------------------> [41:29] L2 index (only 38:29 used) |
74 | | +-------------------------------> [47:42] L1 index (not used) | 74 | | +-------------------------------> [47:42] L1 index (not used) |
75 | +-------------------------------------------------> [63] TTBR0/1 | 75 | +-------------------------------------------------> [63] TTBR0/1 |
76 | |||
77 | When using KVM, the hypervisor maps kernel pages in EL2, at a fixed | ||
78 | offset from the kernel VA (top 24bits of the kernel VA set to zero): | ||
79 | |||
80 | Start End Size Use | ||
81 | ----------------------------------------------------------------------- | ||
82 | 0000004000000000 0000007fffffffff 256GB kernel objects mapped in HYP | ||
diff --git a/Documentation/bcache.txt b/Documentation/bcache.txt index 77db8809bd96..c3365f26b2d9 100644 --- a/Documentation/bcache.txt +++ b/Documentation/bcache.txt | |||
@@ -181,7 +181,7 @@ want for getting the best possible numbers when benchmarking. | |||
181 | 181 | ||
182 | In practice this isn't an issue because as soon as a write comes along it'll | 182 | In practice this isn't an issue because as soon as a write comes along it'll |
183 | cause the btree node to be split, and you need almost no write traffic for | 183 | cause the btree node to be split, and you need almost no write traffic for |
184 | this to not show up enough to be noticable (especially since bcache's btree | 184 | this to not show up enough to be noticeable (especially since bcache's btree |
185 | nodes are huge and index large regions of the device). But when you're | 185 | nodes are huge and index large regions of the device). But when you're |
186 | benchmarking, if you're trying to warm the cache by reading a bunch of data | 186 | benchmarking, if you're trying to warm the cache by reading a bunch of data |
187 | and there's no other traffic - that can be a problem. | 187 | and there's no other traffic - that can be a problem. |
@@ -222,7 +222,7 @@ running | |||
222 | it's in passthrough mode or caching). | 222 | it's in passthrough mode or caching). |
223 | 223 | ||
224 | sequential_cutoff | 224 | sequential_cutoff |
225 | A sequential IO will bypass the cache once it passes this threshhold; the | 225 | A sequential IO will bypass the cache once it passes this threshold; the |
226 | most recent 128 IOs are tracked so sequential IO can be detected even when | 226 | most recent 128 IOs are tracked so sequential IO can be detected even when |
227 | it isn't all done at once. | 227 | it isn't all done at once. |
228 | 228 | ||
@@ -296,7 +296,7 @@ cache_miss_collisions | |||
296 | since the synchronization for cache misses was rewritten) | 296 | since the synchronization for cache misses was rewritten) |
297 | 297 | ||
298 | cache_readaheads | 298 | cache_readaheads |
299 | Count of times readahead occured. | 299 | Count of times readahead occurred. |
300 | 300 | ||
301 | SYSFS - CACHE SET: | 301 | SYSFS - CACHE SET: |
302 | 302 | ||
@@ -319,7 +319,10 @@ cache<0..n> | |||
319 | Symlink to each of the cache devices comprising this cache set. | 319 | Symlink to each of the cache devices comprising this cache set. |
320 | 320 | ||
321 | cache_available_percent | 321 | cache_available_percent |
322 | Percentage of cache device free. | 322 | Percentage of cache device which doesn't contain dirty data, and could |
323 | potentially be used for writeback. This doesn't mean this space isn't used | ||
324 | for clean cached data; the unused statistic (in priority_stats) is typically | ||
325 | much lower. | ||
323 | 326 | ||
324 | clear_stats | 327 | clear_stats |
325 | Clears the statistics associated with this cache | 328 | Clears the statistics associated with this cache |
@@ -359,7 +362,7 @@ unregister | |||
359 | SYSFS - CACHE SET INTERNAL: | 362 | SYSFS - CACHE SET INTERNAL: |
360 | 363 | ||
361 | This directory also exposes timings for a number of internal operations, with | 364 | This directory also exposes timings for a number of internal operations, with |
362 | separate files for average duration, average frequency, last occurence and max | 365 | separate files for average duration, average frequency, last occurrence and max |
363 | duration: garbage collection, btree read, btree node sorts and btree splits. | 366 | duration: garbage collection, btree read, btree node sorts and btree splits. |
364 | 367 | ||
365 | active_journal_entries | 368 | active_journal_entries |
@@ -414,7 +417,7 @@ freelist_percent | |||
414 | space. | 417 | space. |
415 | 418 | ||
416 | io_errors | 419 | io_errors |
417 | Number of errors that have occured, decayed by io_error_halflife. | 420 | Number of errors that have occurred, decayed by io_error_halflife. |
418 | 421 | ||
419 | metadata_written | 422 | metadata_written |
420 | Sum of all non data writes (btree writes and all other metadata). | 423 | Sum of all non data writes (btree writes and all other metadata). |
@@ -423,8 +426,11 @@ nbuckets | |||
423 | Total buckets in this cache | 426 | Total buckets in this cache |
424 | 427 | ||
425 | priority_stats | 428 | priority_stats |
426 | Statistics about how recently data in the cache has been accessed. This can | 429 | Statistics about how recently data in the cache has been accessed. |
427 | reveal your working set size. | 430 | This can reveal your working set size. Unused is the percentage of |
431 | the cache that doesn't contain any data. Metadata is bcache's | ||
432 | metadata overhead. Average is the average priority of cache buckets. | ||
433 | Next is a list of quantiles with the priority threshold of each. | ||
428 | 434 | ||
429 | written | 435 | written |
430 | Sum of all data that has been written to the cache; comparison with | 436 | Sum of all data that has been written to the cache; comparison with |
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt index e54ac1d53403..7d2d046c265f 100644 --- a/Documentation/block/queue-sysfs.txt +++ b/Documentation/block/queue-sysfs.txt | |||
@@ -93,7 +93,7 @@ To avoid priority inversion through request starvation, a request | |||
93 | queue maintains a separate request pool per each cgroup when | 93 | queue maintains a separate request pool per each cgroup when |
94 | CONFIG_BLK_CGROUP is enabled, and this parameter applies to each such | 94 | CONFIG_BLK_CGROUP is enabled, and this parameter applies to each such |
95 | per-block-cgroup request pool. IOW, if there are N block cgroups, | 95 | per-block-cgroup request pool. IOW, if there are N block cgroups, |
96 | each request queue may have upto N request pools, each independently | 96 | each request queue may have up to N request pools, each independently |
97 | regulated by nr_requests. | 97 | regulated by nr_requests. |
98 | 98 | ||
99 | optimal_io_size (RO) | 99 | optimal_io_size (RO) |
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt index da272c8f44e7..cd556b914786 100644 --- a/Documentation/cgroups/blkio-controller.txt +++ b/Documentation/cgroups/blkio-controller.txt | |||
@@ -94,11 +94,13 @@ Throttling/Upper Limit policy | |||
94 | 94 | ||
95 | Hierarchical Cgroups | 95 | Hierarchical Cgroups |
96 | ==================== | 96 | ==================== |
97 | - Currently only CFQ supports hierarchical groups. For throttling, | ||
98 | cgroup interface does allow creation of hierarchical cgroups and | ||
99 | internally it treats them as flat hierarchy. | ||
100 | 97 | ||
101 | If somebody created a hierarchy like as follows. | 98 | Both CFQ and throttling implement hierarchy support; however, |
99 | throttling's hierarchy support is enabled iff "sane_behavior" is | ||
100 | enabled from cgroup side, which currently is a development option and | ||
101 | not publicly available. | ||
102 | |||
103 | If somebody created a hierarchy like as follows. | ||
102 | 104 | ||
103 | root | 105 | root |
104 | / \ | 106 | / \ |
@@ -106,21 +108,20 @@ Hierarchical Cgroups | |||
106 | | | 108 | | |
107 | test3 | 109 | test3 |
108 | 110 | ||
109 | CFQ will handle the hierarchy correctly but and throttling will | 111 | CFQ by default and throttling with "sane_behavior" will handle the |
110 | practically treat all groups at same level. For details on CFQ | 112 | hierarchy correctly. For details on CFQ hierarchy support, refer to |
111 | hierarchy support, refer to Documentation/block/cfq-iosched.txt. | 113 | Documentation/block/cfq-iosched.txt. For throttling, all limits apply |
112 | Throttling will treat the hierarchy as if it looks like the | 114 | to the whole subtree while all statistics are local to the IOs |
113 | following. | 115 | directly generated by tasks in that cgroup. |
116 | |||
117 | Throttling without "sane_behavior" enabled from cgroup side will | ||
118 | practically treat all groups at same level as if it looks like the | ||
119 | following. | ||
114 | 120 | ||
115 | pivot | 121 | pivot |
116 | / / \ \ | 122 | / / \ \ |
117 | root test1 test2 test3 | 123 | root test1 test2 test3 |
118 | 124 | ||
119 | Nesting cgroups, while allowed, isn't officially supported and blkio | ||
120 | genereates warning when cgroups nest. Once throttling implements | ||
121 | hierarchy support, hierarchy will be supported and the warning will | ||
122 | be removed. | ||
123 | |||
124 | Various user visible config options | 125 | Various user visible config options |
125 | =================================== | 126 | =================================== |
126 | CONFIG_BLK_CGROUP | 127 | CONFIG_BLK_CGROUP |
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index 12e01d432bfe..7740038d82bc 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
@@ -373,7 +373,7 @@ can become very uneven. | |||
373 | 1.7 What is sched_load_balance ? | 373 | 1.7 What is sched_load_balance ? |
374 | -------------------------------- | 374 | -------------------------------- |
375 | 375 | ||
376 | The kernel scheduler (kernel/sched.c) automatically load balances | 376 | The kernel scheduler (kernel/sched/core.c) automatically load balances |
377 | tasks. If one CPU is underutilized, kernel code running on that | 377 | tasks. If one CPU is underutilized, kernel code running on that |
378 | CPU will look for tasks on other more overloaded CPUs and move those | 378 | CPU will look for tasks on other more overloaded CPUs and move those |
379 | tasks to itself, within the constraints of such placement mechanisms | 379 | tasks to itself, within the constraints of such placement mechanisms |
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index ddf4f93967a9..2a3330696372 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -304,7 +304,7 @@ kernel memory, we prevent new processes from being created when the kernel | |||
304 | memory usage is too high. | 304 | memory usage is too high. |
305 | 305 | ||
306 | * slab pages: pages allocated by the SLAB or SLUB allocator are tracked. A copy | 306 | * slab pages: pages allocated by the SLAB or SLUB allocator are tracked. A copy |
307 | of each kmem_cache is created everytime the cache is touched by the first time | 307 | of each kmem_cache is created every time the cache is touched by the first time |
308 | from inside the memcg. The creation is done lazily, so some objects can still be | 308 | from inside the memcg. The creation is done lazily, so some objects can still be |
309 | skipped while the cache is being created. All objects in a slab page should | 309 | skipped while the cache is being created. All objects in a slab page should |
310 | belong to the same memcg. This only fails to hold when a task is migrated to a | 310 | belong to the same memcg. This only fails to hold when a task is migrated to a |
@@ -490,10 +490,10 @@ pgpgin - # of charging events to the memory cgroup. The charging | |||
490 | pgpgout - # of uncharging events to the memory cgroup. The uncharging | 490 | pgpgout - # of uncharging events to the memory cgroup. The uncharging |
491 | event happens each time a page is unaccounted from the cgroup. | 491 | event happens each time a page is unaccounted from the cgroup. |
492 | swap - # of bytes of swap usage | 492 | swap - # of bytes of swap usage |
493 | inactive_anon - # of bytes of anonymous memory and swap cache memory on | 493 | inactive_anon - # of bytes of anonymous and swap cache memory on inactive |
494 | LRU list. | 494 | LRU list. |
495 | active_anon - # of bytes of anonymous and swap cache memory on active | 495 | active_anon - # of bytes of anonymous and swap cache memory on active |
496 | inactive LRU list. | 496 | LRU list. |
497 | inactive_file - # of bytes of file-backed memory on inactive LRU list. | 497 | inactive_file - # of bytes of file-backed memory on inactive LRU list. |
498 | active_file - # of bytes of file-backed memory on active LRU list. | 498 | active_file - # of bytes of file-backed memory on active LRU list. |
499 | unevictable - # of bytes of memory that cannot be reclaimed (mlocked etc). | 499 | unevictable - # of bytes of memory that cannot be reclaimed (mlocked etc). |
@@ -834,10 +834,9 @@ Test: | |||
834 | 834 | ||
835 | 12. TODO | 835 | 12. TODO |
836 | 836 | ||
837 | 1. Add support for accounting huge pages (as a separate controller) | 837 | 1. Make per-cgroup scanner reclaim not-shared pages first |
838 | 2. Make per-cgroup scanner reclaim not-shared pages first | 838 | 2. Teach controller to account for shared-pages |
839 | 3. Teach controller to account for shared-pages | 839 | 3. Start reclamation in the background when the limit is |
840 | 4. Start reclamation in the background when the limit is | ||
841 | not yet hit but the usage is getting closer | 840 | not yet hit but the usage is getting closer |
842 | 841 | ||
843 | Summary | 842 | Summary |
diff --git a/Documentation/clk.txt b/Documentation/clk.txt index b9911c27f496..6f68ba0d1e01 100644 --- a/Documentation/clk.txt +++ b/Documentation/clk.txt | |||
@@ -32,7 +32,7 @@ hardware-specific bits for the hypothetical "foo" hardware. | |||
32 | 32 | ||
33 | Tying the two halves of this interface together is struct clk_hw, which | 33 | Tying the two halves of this interface together is struct clk_hw, which |
34 | is defined in struct clk_foo and pointed to within struct clk. This | 34 | is defined in struct clk_foo and pointed to within struct clk. This |
35 | allows easy for navigation between the two discrete halves of the common | 35 | allows for easy navigation between the two discrete halves of the common |
36 | clock interface. | 36 | clock interface. |
37 | 37 | ||
38 | Part 2 - common data structures and api | 38 | Part 2 - common data structures and api |
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt index 18de78599dd4..7f773d51fdd9 100644 --- a/Documentation/coccinelle.txt +++ b/Documentation/coccinelle.txt | |||
@@ -6,15 +6,17 @@ Copyright 2010 Gilles Muller <Gilles.Muller@lip6.fr> | |||
6 | Getting Coccinelle | 6 | Getting Coccinelle |
7 | ~~~~~~~~~~~~~~~~~~~~ | 7 | ~~~~~~~~~~~~~~~~~~~~ |
8 | 8 | ||
9 | The semantic patches included in the kernel use the 'virtual rule' | 9 | The semantic patches included in the kernel use features and options |
10 | feature which was introduced in Coccinelle version 0.1.11. | 10 | which are provided by Coccinelle version 1.0.0-rc11 and above. |
11 | Using earlier versions will fail as the option names used by | ||
12 | the Coccinelle files and coccicheck have been updated. | ||
11 | 13 | ||
12 | Coccinelle (>=0.2.0) is available through the package manager | 14 | Coccinelle is available through the package manager |
13 | of many distributions, e.g. : | 15 | of many distributions, e.g. : |
14 | 16 | ||
15 | - Debian (>=squeeze) | 17 | - Debian |
16 | - Fedora (>=13) | 18 | - Fedora |
17 | - Ubuntu (>=10.04 Lucid Lynx) | 19 | - Ubuntu |
18 | - OpenSUSE | 20 | - OpenSUSE |
19 | - Arch Linux | 21 | - Arch Linux |
20 | - NetBSD | 22 | - NetBSD |
@@ -36,11 +38,6 @@ as a regular user, and install it with | |||
36 | 38 | ||
37 | sudo make install | 39 | sudo make install |
38 | 40 | ||
39 | The semantic patches in the kernel will work best with Coccinelle version | ||
40 | 0.2.4 or later. Using earlier versions may incur some parse errors in the | ||
41 | semantic patch code, but any results that are obtained should still be | ||
42 | correct. | ||
43 | |||
44 | Using Coccinelle on the Linux kernel | 41 | Using Coccinelle on the Linux kernel |
45 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 42 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
46 | 43 | ||
@@ -48,7 +45,7 @@ A Coccinelle-specific target is defined in the top level | |||
48 | Makefile. This target is named 'coccicheck' and calls the 'coccicheck' | 45 | Makefile. This target is named 'coccicheck' and calls the 'coccicheck' |
49 | front-end in the 'scripts' directory. | 46 | front-end in the 'scripts' directory. |
50 | 47 | ||
51 | Four modes are defined: patch, report, context, and org. The mode to | 48 | Four basic modes are defined: patch, report, context, and org. The mode to |
52 | use is specified by setting the MODE variable with 'MODE=<mode>'. | 49 | use is specified by setting the MODE variable with 'MODE=<mode>'. |
53 | 50 | ||
54 | 'patch' proposes a fix, when possible. | 51 | 'patch' proposes a fix, when possible. |
@@ -62,18 +59,24 @@ diff-like style.Lines of interest are indicated with '-'. | |||
62 | 'org' generates a report in the Org mode format of Emacs. | 59 | 'org' generates a report in the Org mode format of Emacs. |
63 | 60 | ||
64 | Note that not all semantic patches implement all modes. For easy use | 61 | Note that not all semantic patches implement all modes. For easy use |
65 | of Coccinelle, the default mode is "chain" which tries the previous | 62 | of Coccinelle, the default mode is "report". |
66 | modes in the order above until one succeeds. | 63 | |
64 | Two other modes provide some common combinations of these modes. | ||
67 | 65 | ||
68 | To make a report for every semantic patch, run the following command: | 66 | 'chain' tries the previous modes in the order above until one succeeds. |
69 | 67 | ||
70 | make coccicheck MODE=report | 68 | 'rep+ctxt' runs successively the report mode and the context mode. |
69 | It should be used with the C option (described later) | ||
70 | which checks the code on a file basis. | ||
71 | 71 | ||
72 | NB: The 'report' mode is the default one. | 72 | Examples: |
73 | To make a report for every semantic patch, run the following command: | ||
73 | 74 | ||
74 | To produce patches, run: | 75 | make coccicheck MODE=report |
75 | 76 | ||
76 | make coccicheck MODE=patch | 77 | To produce patches, run: |
78 | |||
79 | make coccicheck MODE=patch | ||
77 | 80 | ||
78 | 81 | ||
79 | The coccicheck target applies every semantic patch available in the | 82 | The coccicheck target applies every semantic patch available in the |
@@ -91,6 +94,11 @@ To enable verbose messages set the V= variable, for example: | |||
91 | 94 | ||
92 | make coccicheck MODE=report V=1 | 95 | make coccicheck MODE=report V=1 |
93 | 96 | ||
97 | By default, coccicheck tries to run as parallel as possible. To change | ||
98 | the parallelism, set the J= variable. For example, to run across 4 CPUs: | ||
99 | |||
100 | make coccicheck MODE=report J=4 | ||
101 | |||
94 | 102 | ||
95 | Using Coccinelle with a single semantic patch | 103 | Using Coccinelle with a single semantic patch |
96 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 104 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -124,26 +132,33 @@ To check only newly edited code, use the value 2 for the C flag, i.e. | |||
124 | 132 | ||
125 | make C=2 CHECK="scripts/coccicheck" | 133 | make C=2 CHECK="scripts/coccicheck" |
126 | 134 | ||
135 | In these modes, which works on a file basis, there is no information | ||
136 | about semantic patches displayed, and no commit message proposed. | ||
137 | |||
127 | This runs every semantic patch in scripts/coccinelle by default. The | 138 | This runs every semantic patch in scripts/coccinelle by default. The |
128 | COCCI variable may additionally be used to only apply a single | 139 | COCCI variable may additionally be used to only apply a single |
129 | semantic patch as shown in the previous section. | 140 | semantic patch as shown in the previous section. |
130 | 141 | ||
131 | The "chain" mode is the default. You can select another one with the | 142 | The "report" mode is the default. You can select another one with the |
132 | MODE variable explained above. | 143 | MODE variable explained above. |
133 | 144 | ||
134 | In this mode, there is no information about semantic patches | ||
135 | displayed, and no commit message proposed. | ||
136 | |||
137 | Additional flags | 145 | Additional flags |
138 | ~~~~~~~~~~~~~~~~~~ | 146 | ~~~~~~~~~~~~~~~~~~ |
139 | 147 | ||
140 | Additional flags can be passed to spatch through the SPFLAGS | 148 | Additional flags can be passed to spatch through the SPFLAGS |
141 | variable. | 149 | variable. |
142 | 150 | ||
143 | make SPFLAGS=--use_glimpse coccicheck | 151 | make SPFLAGS=--use-glimpse coccicheck |
152 | make SPFLAGS=--use-idutils coccicheck | ||
144 | 153 | ||
145 | See spatch --help to learn more about spatch options. | 154 | See spatch --help to learn more about spatch options. |
146 | 155 | ||
156 | Note that the '--use-glimpse' and '--use-idutils' options | ||
157 | require external tools for indexing the code. None of them is | ||
158 | thus active by default. However, by indexing the code with | ||
159 | one of these tools, and according to the cocci file used, | ||
160 | spatch could proceed the entire code base more quickly. | ||
161 | |||
147 | Proposing new semantic patches | 162 | Proposing new semantic patches |
148 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 163 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
149 | 164 | ||
diff --git a/Documentation/console/console.txt b/Documentation/console/console.txt index 926cf1b5e63e..f93810d599ad 100644 --- a/Documentation/console/console.txt +++ b/Documentation/console/console.txt | |||
@@ -12,20 +12,20 @@ The second type has to be explicitly loaded and unloaded. This will be called | |||
12 | any time with each driver sharing the console with other drivers including | 12 | any time with each driver sharing the console with other drivers including |
13 | the system driver. However, modular drivers cannot take over the console | 13 | the system driver. However, modular drivers cannot take over the console |
14 | that is currently occupied by another modular driver. (Exception: Drivers that | 14 | that is currently occupied by another modular driver. (Exception: Drivers that |
15 | call take_over_console() will succeed in the takeover regardless of the type | 15 | call do_take_over_console() will succeed in the takeover regardless of the type |
16 | of driver occupying the consoles.) They can only take over the console that is | 16 | of driver occupying the consoles.) They can only take over the console that is |
17 | occupied by the system driver. In the same token, if the modular driver is | 17 | occupied by the system driver. In the same token, if the modular driver is |
18 | released by the console, the system driver will take over. | 18 | released by the console, the system driver will take over. |
19 | 19 | ||
20 | Modular drivers, from the programmer's point of view, has to call: | 20 | Modular drivers, from the programmer's point of view, has to call: |
21 | 21 | ||
22 | take_over_console() - load and bind driver to console layer | 22 | do_take_over_console() - load and bind driver to console layer |
23 | give_up_console() - unbind and unload driver | 23 | give_up_console() - unload driver, it will only work if driver is fully unbond |
24 | 24 | ||
25 | In newer kernels, the following are also available: | 25 | In newer kernels, the following are also available: |
26 | 26 | ||
27 | register_con_driver() | 27 | do_register_con_driver() |
28 | unregister_con_driver() | 28 | do_unregister_con_driver() |
29 | 29 | ||
30 | If sysfs is enabled, the contents of /sys/class/vtconsole can be | 30 | If sysfs is enabled, the contents of /sys/class/vtconsole can be |
31 | examined. This shows the console backends currently registered by the | 31 | examined. This shows the console backends currently registered by the |
@@ -94,12 +94,12 @@ for more details). | |||
94 | Notes for developers: | 94 | Notes for developers: |
95 | ===================== | 95 | ===================== |
96 | 96 | ||
97 | take_over_console() is now broken up into: | 97 | do_take_over_console() is now broken up into: |
98 | 98 | ||
99 | register_con_driver() | 99 | do_register_con_driver() |
100 | bind_con_driver() - private function | 100 | do_bind_con_driver() - private function |
101 | 101 | ||
102 | give_up_console() is a wrapper to unregister_con_driver(), and a driver must | 102 | give_up_console() is a wrapper to do_unregister_con_driver(), and a driver must |
103 | be fully unbound for this call to succeed. con_is_bound() will check if the | 103 | be fully unbound for this call to succeed. con_is_bound() will check if the |
104 | driver is bound or not. | 104 | driver is bound or not. |
105 | 105 | ||
@@ -109,10 +109,10 @@ Guidelines for console driver writers: | |||
109 | In order for binding to and unbinding from the console to properly work, | 109 | In order for binding to and unbinding from the console to properly work, |
110 | console drivers must follow these guidelines: | 110 | console drivers must follow these guidelines: |
111 | 111 | ||
112 | 1. All drivers, except system drivers, must call either register_con_driver() | 112 | 1. All drivers, except system drivers, must call either do_register_con_driver() |
113 | or take_over_console(). register_con_driver() will just add the driver to | 113 | or do_take_over_console(). do_register_con_driver() will just add the driver to |
114 | the console's internal list. It won't take over the | 114 | the console's internal list. It won't take over the |
115 | console. take_over_console(), as it name implies, will also take over (or | 115 | console. do_take_over_console(), as it name implies, will also take over (or |
116 | bind to) the console. | 116 | bind to) the console. |
117 | 117 | ||
118 | 2. All resources allocated during con->con_init() must be released in | 118 | 2. All resources allocated during con->con_init() must be released in |
@@ -128,10 +128,10 @@ console drivers must follow these guidelines: | |||
128 | rebind the driver to the console arrives. | 128 | rebind the driver to the console arrives. |
129 | 129 | ||
130 | 4. Upon exit of the driver, ensure that the driver is totally unbound. If the | 130 | 4. Upon exit of the driver, ensure that the driver is totally unbound. If the |
131 | condition is satisfied, then the driver must call unregister_con_driver() | 131 | condition is satisfied, then the driver must call do_unregister_con_driver() |
132 | or give_up_console(). | 132 | or give_up_console(). |
133 | 133 | ||
134 | 5. unregister_con_driver() can also be called on conditions which make it | 134 | 5. do_unregister_con_driver() can also be called on conditions which make it |
135 | impossible for the driver to service console requests. This can happen | 135 | impossible for the driver to service console requests. This can happen |
136 | with the framebuffer console that suddenly lost all of its drivers. | 136 | with the framebuffer console that suddenly lost all of its drivers. |
137 | 137 | ||
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index a3585eac83b6..19fa98e07bf7 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
@@ -186,7 +186,7 @@ As most cpufreq processors only allow for being set to a few specific | |||
186 | frequencies, a "frequency table" with some functions might assist in | 186 | frequencies, a "frequency table" with some functions might assist in |
187 | some work of the processor driver. Such a "frequency table" consists | 187 | some work of the processor driver. Such a "frequency table" consists |
188 | of an array of struct cpufreq_frequency_table entries, with any value in | 188 | of an array of struct cpufreq_frequency_table entries, with any value in |
189 | "index" you want to use, and the corresponding frequency in | 189 | "driver_data" you want to use, and the corresponding frequency in |
190 | "frequency". At the end of the table, you need to add a | 190 | "frequency". At the end of the table, you need to add a |
191 | cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And | 191 | cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And |
192 | if you want to skip one entry in the table, set the frequency to | 192 | if you want to skip one entry in the table, set the frequency to |
@@ -214,10 +214,4 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, | |||
214 | is the corresponding frequency table helper for the ->target | 214 | is the corresponding frequency table helper for the ->target |
215 | stage. Just pass the values to this function, and the unsigned int | 215 | stage. Just pass the values to this function, and the unsigned int |
216 | index returns the number of the frequency table entry which contains | 216 | index returns the number of the frequency table entry which contains |
217 | the frequency the CPU shall be set to. PLEASE NOTE: This is not the | 217 | the frequency the CPU shall be set to. |
218 | "index" which is in this cpufreq_table_entry.index, but instead | ||
219 | cpufreq_table[index]. So, the new frequency is | ||
220 | cpufreq_table[index].frequency, and the value you stored into the | ||
221 | frequency table "index" field is | ||
222 | cpufreq_table[index].index. | ||
223 | |||
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index 9f401350f502..edd4b4df3932 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -128,7 +128,7 @@ A: When doing make defconfig, Enable CPU hotplug support | |||
128 | 128 | ||
129 | "Processor type and Features" -> Support for Hotpluggable CPUs | 129 | "Processor type and Features" -> Support for Hotpluggable CPUs |
130 | 130 | ||
131 | Make sure that you have CONFIG_HOTPLUG, and CONFIG_SMP turned on as well. | 131 | Make sure that you have CONFIG_SMP turned on as well. |
132 | 132 | ||
133 | You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support | 133 | You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support |
134 | as well. | 134 | as well. |
@@ -370,8 +370,10 @@ A: There is no clear spec defined way from ACPI that can give us that | |||
370 | CPUs in MADT as hotpluggable CPUS. In the case there are no disabled CPUS | 370 | CPUs in MADT as hotpluggable CPUS. In the case there are no disabled CPUS |
371 | we assume 1/2 the number of CPUs currently present can be hotplugged. | 371 | we assume 1/2 the number of CPUs currently present can be hotplugged. |
372 | 372 | ||
373 | Caveat: Today's ACPI MADT can only provide 256 entries since the apicid field | 373 | Caveat: ACPI MADT can only provide 256 entries in systems with only ACPI 2.0c |
374 | in MADT is only 8 bits. | 374 | or earlier ACPI version supported, because the apicid field in MADT is only |
375 | 8 bits. From ACPI 3.0, this limitation was removed since the apicid field | ||
376 | was extended to 32 bits with x2APIC introduced. | ||
375 | 377 | ||
376 | User Space Notification | 378 | User Space Notification |
377 | 379 | ||
diff --git a/Documentation/crypto/async-tx-api.txt b/Documentation/crypto/async-tx-api.txt index ba046b8fa92f..7bf1be20d93a 100644 --- a/Documentation/crypto/async-tx-api.txt +++ b/Documentation/crypto/async-tx-api.txt | |||
@@ -222,5 +222,4 @@ drivers/dma/: location for offload engine drivers | |||
222 | include/linux/async_tx.h: core header file for the async_tx api | 222 | include/linux/async_tx.h: core header file for the async_tx api |
223 | crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code | 223 | crypto/async_tx/async_tx.c: async_tx interface to dmaengine and common code |
224 | crypto/async_tx/async_memcpy.c: copy offload | 224 | crypto/async_tx/async_memcpy.c: copy offload |
225 | crypto/async_tx/async_memset.c: memory fill offload | ||
226 | crypto/async_tx/async_xor.c: xor and xor zero sum offload | 225 | crypto/async_tx/async_xor.c: xor and xor zero sum offload |
diff --git a/Documentation/device-mapper/cache.txt b/Documentation/device-mapper/cache.txt index f50470abe241..e8cdf7241b66 100644 --- a/Documentation/device-mapper/cache.txt +++ b/Documentation/device-mapper/cache.txt | |||
@@ -87,7 +87,7 @@ Migration throttling | |||
87 | 87 | ||
88 | Migrating data between the origin and cache device uses bandwidth. | 88 | Migrating data between the origin and cache device uses bandwidth. |
89 | The user can set a throttle to prevent more than a certain amount of | 89 | The user can set a throttle to prevent more than a certain amount of |
90 | migration occuring at any one time. Currently we're not taking any | 90 | migration occurring at any one time. Currently we're not taking any |
91 | account of normal io traffic going to the devices. More work needs | 91 | account of normal io traffic going to the devices. More work needs |
92 | doing here to avoid migrating during those peak io moments. | 92 | doing here to avoid migrating during those peak io moments. |
93 | 93 | ||
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt index e9192283e5a5..ef8ba9fa58c4 100644 --- a/Documentation/device-mapper/dm-raid.txt +++ b/Documentation/device-mapper/dm-raid.txt | |||
@@ -222,3 +222,5 @@ Version History | |||
222 | 1.4.2 Add RAID10 "far" and "offset" algorithm support. | 222 | 1.4.2 Add RAID10 "far" and "offset" algorithm support. |
223 | 1.5.0 Add message interface to allow manipulation of the sync_action. | 223 | 1.5.0 Add message interface to allow manipulation of the sync_action. |
224 | New status (STATUSTYPE_INFO) fields: sync_action and mismatch_cnt. | 224 | New status (STATUSTYPE_INFO) fields: sync_action and mismatch_cnt. |
225 | 1.5.1 Add ability to restore transiently failed devices on resume. | ||
226 | 1.5.2 'mismatch_cnt' is zero unless [last_]sync_action is "check". | ||
diff --git a/Documentation/device-mapper/switch.txt b/Documentation/device-mapper/switch.txt new file mode 100644 index 000000000000..2fa749387be8 --- /dev/null +++ b/Documentation/device-mapper/switch.txt | |||
@@ -0,0 +1,126 @@ | |||
1 | dm-switch | ||
2 | ========= | ||
3 | |||
4 | The device-mapper switch target creates a device that supports an | ||
5 | arbitrary mapping of fixed-size regions of I/O across a fixed set of | ||
6 | paths. The path used for any specific region can be switched | ||
7 | dynamically by sending the target a message. | ||
8 | |||
9 | It maps I/O to underlying block devices efficiently when there is a large | ||
10 | number of fixed-sized address regions but there is no simple pattern | ||
11 | that would allow for a compact representation of the mapping such as | ||
12 | dm-stripe. | ||
13 | |||
14 | Background | ||
15 | ---------- | ||
16 | |||
17 | Dell EqualLogic and some other iSCSI storage arrays use a distributed | ||
18 | frameless architecture. In this architecture, the storage group | ||
19 | consists of a number of distinct storage arrays ("members") each having | ||
20 | independent controllers, disk storage and network adapters. When a LUN | ||
21 | is created it is spread across multiple members. The details of the | ||
22 | spreading are hidden from initiators connected to this storage system. | ||
23 | The storage group exposes a single target discovery portal, no matter | ||
24 | how many members are being used. When iSCSI sessions are created, each | ||
25 | session is connected to an eth port on a single member. Data to a LUN | ||
26 | can be sent on any iSCSI session, and if the blocks being accessed are | ||
27 | stored on another member the I/O will be forwarded as required. This | ||
28 | forwarding is invisible to the initiator. The storage layout is also | ||
29 | dynamic, and the blocks stored on disk may be moved from member to | ||
30 | member as needed to balance the load. | ||
31 | |||
32 | This architecture simplifies the management and configuration of both | ||
33 | the storage group and initiators. In a multipathing configuration, it | ||
34 | is possible to set up multiple iSCSI sessions to use multiple network | ||
35 | interfaces on both the host and target to take advantage of the | ||
36 | increased network bandwidth. An initiator could use a simple round | ||
37 | robin algorithm to send I/O across all paths and let the storage array | ||
38 | members forward it as necessary, but there is a performance advantage to | ||
39 | sending data directly to the correct member. | ||
40 | |||
41 | A device-mapper table already lets you map different regions of a | ||
42 | device onto different targets. However in this architecture the LUN is | ||
43 | spread with an address region size on the order of 10s of MBs, which | ||
44 | means the resulting table could have more than a million entries and | ||
45 | consume far too much memory. | ||
46 | |||
47 | Using this device-mapper switch target we can now build a two-layer | ||
48 | device hierarchy: | ||
49 | |||
50 | Upper Tier – Determine which array member the I/O should be sent to. | ||
51 | Lower Tier – Load balance amongst paths to a particular member. | ||
52 | |||
53 | The lower tier consists of a single dm multipath device for each member. | ||
54 | Each of these multipath devices contains the set of paths directly to | ||
55 | the array member in one priority group, and leverages existing path | ||
56 | selectors to load balance amongst these paths. We also build a | ||
57 | non-preferred priority group containing paths to other array members for | ||
58 | failover reasons. | ||
59 | |||
60 | The upper tier consists of a single dm-switch device. This device uses | ||
61 | a bitmap to look up the location of the I/O and choose the appropriate | ||
62 | lower tier device to route the I/O. By using a bitmap we are able to | ||
63 | use 4 bits for each address range in a 16 member group (which is very | ||
64 | large for us). This is a much denser representation than the dm table | ||
65 | b-tree can achieve. | ||
66 | |||
67 | Construction Parameters | ||
68 | ======================= | ||
69 | |||
70 | <num_paths> <region_size> <num_optional_args> [<optional_args>...] | ||
71 | [<dev_path> <offset>]+ | ||
72 | |||
73 | <num_paths> | ||
74 | The number of paths across which to distribute the I/O. | ||
75 | |||
76 | <region_size> | ||
77 | The number of 512-byte sectors in a region. Each region can be redirected | ||
78 | to any of the available paths. | ||
79 | |||
80 | <num_optional_args> | ||
81 | The number of optional arguments. Currently, no optional arguments | ||
82 | are supported and so this must be zero. | ||
83 | |||
84 | <dev_path> | ||
85 | The block device that represents a specific path to the device. | ||
86 | |||
87 | <offset> | ||
88 | The offset of the start of data on the specific <dev_path> (in units | ||
89 | of 512-byte sectors). This number is added to the sector number when | ||
90 | forwarding the request to the specific path. Typically it is zero. | ||
91 | |||
92 | Messages | ||
93 | ======== | ||
94 | |||
95 | set_region_mappings <index>:<path_nr> [<index>]:<path_nr> [<index>]:<path_nr>... | ||
96 | |||
97 | Modify the region table by specifying which regions are redirected to | ||
98 | which paths. | ||
99 | |||
100 | <index> | ||
101 | The region number (region size was specified in constructor parameters). | ||
102 | If index is omitted, the next region (previous index + 1) is used. | ||
103 | Expressed in hexadecimal (WITHOUT any prefix like 0x). | ||
104 | |||
105 | <path_nr> | ||
106 | The path number in the range 0 ... (<num_paths> - 1). | ||
107 | Expressed in hexadecimal (WITHOUT any prefix like 0x). | ||
108 | |||
109 | Status | ||
110 | ====== | ||
111 | |||
112 | No status line is reported. | ||
113 | |||
114 | Example | ||
115 | ======= | ||
116 | |||
117 | Assume that you have volumes vg1/switch0 vg1/switch1 vg1/switch2 with | ||
118 | the same size. | ||
119 | |||
120 | Create a switch device with 64kB region size: | ||
121 | dmsetup create switch --table "0 `blockdev --getsize /dev/vg1/switch0` | ||
122 | switch 3 128 0 /dev/vg1/switch0 0 /dev/vg1/switch1 0 /dev/vg1/switch2 0" | ||
123 | |||
124 | Set mappings for the first 7 entries to point to devices switch0, switch1, | ||
125 | switch2, switch0, switch1, switch2, switch1: | ||
126 | dmsetup message switch 0 set_region_mappings 0:0 :1 :2 :0 :1 :2 :1 | ||
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 08f01e79c41a..23721d3be3e6 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -100,8 +100,7 @@ Your cooperation is appreciated. | |||
100 | 10 = /dev/aio Asynchronous I/O notification interface | 100 | 10 = /dev/aio Asynchronous I/O notification interface |
101 | 11 = /dev/kmsg Writes to this come out as printk's, reads | 101 | 11 = /dev/kmsg Writes to this come out as printk's, reads |
102 | export the buffered printk records. | 102 | export the buffered printk records. |
103 | 12 = /dev/oldmem Used by crashdump kernels to access | 103 | 12 = /dev/oldmem OBSOLETE - replaced by /proc/vmcore |
104 | the memory of the kernel that crashed. | ||
105 | 104 | ||
106 | 1 block RAM disk | 105 | 1 block RAM disk |
107 | 0 = /dev/ram0 First RAM disk | 106 | 0 = /dev/ram0 First RAM disk |
@@ -498,12 +497,8 @@ Your cooperation is appreciated. | |||
498 | 497 | ||
499 | Each device type has 5 bits (32 minors). | 498 | Each device type has 5 bits (32 minors). |
500 | 499 | ||
501 | 13 block 8-bit MFM/RLL/IDE controller | 500 | 13 block Previously used for the XT disk (/dev/xdN) |
502 | 0 = /dev/xda First XT disk whole disk | 501 | Deleted in kernel v3.9. |
503 | 64 = /dev/xdb Second XT disk whole disk | ||
504 | |||
505 | Partitions are handled in the same way as IDE disks | ||
506 | (see major number 3). | ||
507 | 502 | ||
508 | 14 char Open Sound System (OSS) | 503 | 14 char Open Sound System (OSS) |
509 | 0 = /dev/mixer Mixer control | 504 | 0 = /dev/mixer Mixer control |
diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt new file mode 100644 index 000000000000..92d36e2aa877 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/cci.txt | |||
@@ -0,0 +1,172 @@ | |||
1 | ======================================================= | ||
2 | ARM CCI cache coherent interconnect binding description | ||
3 | ======================================================= | ||
4 | |||
5 | ARM multi-cluster systems maintain intra-cluster coherency through a | ||
6 | cache coherent interconnect (CCI) that is capable of monitoring bus | ||
7 | transactions and manage coherency, TLB invalidations and memory barriers. | ||
8 | |||
9 | It allows snooping and distributed virtual memory message broadcast across | ||
10 | clusters, through memory mapped interface, with a global control register | ||
11 | space and multiple sets of interface control registers, one per slave | ||
12 | interface. | ||
13 | |||
14 | Bindings for the CCI node follow the ePAPR standard, available from: | ||
15 | |||
16 | www.power.org/documentation/epapr-version-1-1/ | ||
17 | |||
18 | with the addition of the bindings described in this document which are | ||
19 | specific to ARM. | ||
20 | |||
21 | * CCI interconnect node | ||
22 | |||
23 | Description: Describes a CCI cache coherent Interconnect component | ||
24 | |||
25 | Node name must be "cci". | ||
26 | Node's parent must be the root node /, and the address space visible | ||
27 | through the CCI interconnect is the same as the one seen from the | ||
28 | root node (ie from CPUs perspective as per DT standard). | ||
29 | Every CCI node has to define the following properties: | ||
30 | |||
31 | - compatible | ||
32 | Usage: required | ||
33 | Value type: <string> | ||
34 | Definition: must be set to | ||
35 | "arm,cci-400" | ||
36 | |||
37 | - reg | ||
38 | Usage: required | ||
39 | Value type: <prop-encoded-array> | ||
40 | Definition: A standard property. Specifies base physical | ||
41 | address of CCI control registers common to all | ||
42 | interfaces. | ||
43 | |||
44 | - ranges: | ||
45 | Usage: required | ||
46 | Value type: <prop-encoded-array> | ||
47 | Definition: A standard property. Follow rules in the ePAPR for | ||
48 | hierarchical bus addressing. CCI interfaces | ||
49 | addresses refer to the parent node addressing | ||
50 | scheme to declare their register bases. | ||
51 | |||
52 | CCI interconnect node can define the following child nodes: | ||
53 | |||
54 | - CCI control interface nodes | ||
55 | |||
56 | Node name must be "slave-if". | ||
57 | Parent node must be CCI interconnect node. | ||
58 | |||
59 | A CCI control interface node must contain the following | ||
60 | properties: | ||
61 | |||
62 | - compatible | ||
63 | Usage: required | ||
64 | Value type: <string> | ||
65 | Definition: must be set to | ||
66 | "arm,cci-400-ctrl-if" | ||
67 | |||
68 | - interface-type: | ||
69 | Usage: required | ||
70 | Value type: <string> | ||
71 | Definition: must be set to one of {"ace", "ace-lite"} | ||
72 | depending on the interface type the node | ||
73 | represents. | ||
74 | |||
75 | - reg: | ||
76 | Usage: required | ||
77 | Value type: <prop-encoded-array> | ||
78 | Definition: the base address and size of the | ||
79 | corresponding interface programming | ||
80 | registers. | ||
81 | |||
82 | * CCI interconnect bus masters | ||
83 | |||
84 | Description: masters in the device tree connected to a CCI port | ||
85 | (inclusive of CPUs and their cpu nodes). | ||
86 | |||
87 | A CCI interconnect bus master node must contain the following | ||
88 | properties: | ||
89 | |||
90 | - cci-control-port: | ||
91 | Usage: required | ||
92 | Value type: <phandle> | ||
93 | Definition: a phandle containing the CCI control interface node | ||
94 | the master is connected to. | ||
95 | |||
96 | Example: | ||
97 | |||
98 | cpus { | ||
99 | #size-cells = <0>; | ||
100 | #address-cells = <1>; | ||
101 | |||
102 | CPU0: cpu@0 { | ||
103 | device_type = "cpu"; | ||
104 | compatible = "arm,cortex-a15"; | ||
105 | cci-control-port = <&cci_control1>; | ||
106 | reg = <0x0>; | ||
107 | }; | ||
108 | |||
109 | CPU1: cpu@1 { | ||
110 | device_type = "cpu"; | ||
111 | compatible = "arm,cortex-a15"; | ||
112 | cci-control-port = <&cci_control1>; | ||
113 | reg = <0x1>; | ||
114 | }; | ||
115 | |||
116 | CPU2: cpu@100 { | ||
117 | device_type = "cpu"; | ||
118 | compatible = "arm,cortex-a7"; | ||
119 | cci-control-port = <&cci_control2>; | ||
120 | reg = <0x100>; | ||
121 | }; | ||
122 | |||
123 | CPU3: cpu@101 { | ||
124 | device_type = "cpu"; | ||
125 | compatible = "arm,cortex-a7"; | ||
126 | cci-control-port = <&cci_control2>; | ||
127 | reg = <0x101>; | ||
128 | }; | ||
129 | |||
130 | }; | ||
131 | |||
132 | dma0: dma@3000000 { | ||
133 | compatible = "arm,pl330", "arm,primecell"; | ||
134 | cci-control-port = <&cci_control0>; | ||
135 | reg = <0x0 0x3000000 0x0 0x1000>; | ||
136 | interrupts = <10>; | ||
137 | #dma-cells = <1>; | ||
138 | #dma-channels = <8>; | ||
139 | #dma-requests = <32>; | ||
140 | }; | ||
141 | |||
142 | cci@2c090000 { | ||
143 | compatible = "arm,cci-400"; | ||
144 | #address-cells = <1>; | ||
145 | #size-cells = <1>; | ||
146 | reg = <0x0 0x2c090000 0 0x1000>; | ||
147 | ranges = <0x0 0x0 0x2c090000 0x6000>; | ||
148 | |||
149 | cci_control0: slave-if@1000 { | ||
150 | compatible = "arm,cci-400-ctrl-if"; | ||
151 | interface-type = "ace-lite"; | ||
152 | reg = <0x1000 0x1000>; | ||
153 | }; | ||
154 | |||
155 | cci_control1: slave-if@4000 { | ||
156 | compatible = "arm,cci-400-ctrl-if"; | ||
157 | interface-type = "ace"; | ||
158 | reg = <0x4000 0x1000>; | ||
159 | }; | ||
160 | |||
161 | cci_control2: slave-if@5000 { | ||
162 | compatible = "arm,cci-400-ctrl-if"; | ||
163 | interface-type = "ace"; | ||
164 | reg = <0x5000 0x1000>; | ||
165 | }; | ||
166 | }; | ||
167 | |||
168 | This CCI node corresponds to a CCI component whose control registers sits | ||
169 | at address 0x000000002c090000. | ||
170 | CCI slave interface @0x000000002c091000 is connected to dma controller dma0. | ||
171 | CCI slave interface @0x000000002c094000 is connected to CPUs {CPU0, CPU1}; | ||
172 | CCI slave interface @0x000000002c095000 is connected to CPUs {CPU2, CPU3}; | ||
diff --git a/Documentation/devicetree/bindings/arm/keystone/keystone.txt b/Documentation/devicetree/bindings/arm/keystone/keystone.txt new file mode 100644 index 000000000000..63c0e6ae5cf7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/keystone/keystone.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | TI Keystone Platforms Device Tree Bindings | ||
2 | ----------------------------------------------- | ||
3 | |||
4 | Boards with Keystone2 based devices (TCI66xxK2H) SOC shall have the | ||
5 | following properties. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: All TI specific devices present in Keystone SOC should be in | ||
9 | the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 | ||
10 | type UART should use the specified compatible for those devices. | ||
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt index cbef09b5c8a7..69ddf9fad2dc 100644 --- a/Documentation/devicetree/bindings/arm/l2cc.txt +++ b/Documentation/devicetree/bindings/arm/l2cc.txt | |||
@@ -16,6 +16,9 @@ Required properties: | |||
16 | performs the same operation). | 16 | performs the same operation). |
17 | "marvell,"aurora-outer-cache: Marvell Controller designed to be | 17 | "marvell,"aurora-outer-cache: Marvell Controller designed to be |
18 | compatible with the ARM one with outer cache mode. | 18 | compatible with the ARM one with outer cache mode. |
19 | "bcm,bcm11351-a2-pl310-cache": For Broadcom bcm11351 chipset where an | ||
20 | offset needs to be added to the address before passing down to the L2 | ||
21 | cache controller | ||
19 | - cache-unified : Specifies the cache is a unified cache. | 22 | - cache-unified : Specifies the cache is a unified cache. |
20 | - cache-level : Should be set to 2 for a level 2 cache. | 23 | - cache-level : Should be set to 2 for a level 2 cache. |
21 | - reg : Physical base address and size of cache controller's memory mapped | 24 | - reg : Physical base address and size of cache controller's memory mapped |
diff --git a/Documentation/devicetree/bindings/arm/nspire.txt b/Documentation/devicetree/bindings/arm/nspire.txt new file mode 100644 index 000000000000..4d08518bd176 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/nspire.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | TI-NSPIRE calculators | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Compatible property value should contain "ti,nspire". | ||
5 | CX models should have "ti,nspire-cx" | ||
6 | Touchpad models should have "ti,nspire-tp" | ||
7 | Clickpad models should have "ti,nspire-clp" | ||
8 | |||
9 | Example: | ||
10 | |||
11 | / { | ||
12 | model = "TI-NSPIRE CX"; | ||
13 | compatible = "ti,nspire-cx"; | ||
14 | ... | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index f8288ea1b530..6d498c758b45 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
@@ -56,3 +56,6 @@ Boards: | |||
56 | 56 | ||
57 | - OMAP5 EVM : Evaluation Module | 57 | - OMAP5 EVM : Evaluation Module |
58 | compatible = "ti,omap5-evm", "ti,omap5" | 58 | compatible = "ti,omap5-evm", "ti,omap5" |
59 | |||
60 | - AM43x EPOS EVM | ||
61 | compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43" | ||
diff --git a/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt b/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt new file mode 100644 index 000000000000..3b8fbf3c00c5 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | ARM Dual Cluster System Configuration Block | ||
2 | ------------------------------------------- | ||
3 | |||
4 | The Dual Cluster System Configuration Block (DCSCB) provides basic | ||
5 | functionality for controlling clocks, resets and configuration pins in | ||
6 | the Dual Cluster System implemented by the Real-Time System Model (RTSM). | ||
7 | |||
8 | Required properties: | ||
9 | |||
10 | - compatible : should be "arm,rtsm,dcscb" | ||
11 | |||
12 | - reg : physical base address and the size of the registers window | ||
13 | |||
14 | Example: | ||
15 | |||
16 | dcscb@60000000 { | ||
17 | compatible = "arm,rtsm,dcscb"; | ||
18 | reg = <0x60000000 0x1000>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt index f2f2171e530e..9e5f73412cd7 100644 --- a/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt +++ b/Documentation/devicetree/bindings/arm/samsung/interrupt-combiner.txt | |||
@@ -5,7 +5,7 @@ can combine interrupt sources as a group and provide a single interrupt request | |||
5 | for the group. The interrupt request from each group are connected to a parent | 5 | for the group. The interrupt request from each group are connected to a parent |
6 | interrupt controller, such as GIC in case of Exynos4210. | 6 | interrupt controller, such as GIC in case of Exynos4210. |
7 | 7 | ||
8 | The interrupt combiner controller consists of multiple combiners. Upto eight | 8 | The interrupt combiner controller consists of multiple combiners. Up to eight |
9 | interrupt sources can be connected to a combiner. The combiner outputs one | 9 | interrupt sources can be connected to a combiner. The combiner outputs one |
10 | combined interrupt for its eight interrupt sources. The combined interrupt | 10 | combined interrupt for its eight interrupt sources. The combined interrupt |
11 | is usually connected to a parent interrupt controller. | 11 | is usually connected to a parent interrupt controller. |
@@ -14,8 +14,8 @@ A single node in the device tree is used to describe the interrupt combiner | |||
14 | controller module (which includes multiple combiners). A combiner in the | 14 | controller module (which includes multiple combiners). A combiner in the |
15 | interrupt controller module shares config/control registers with other | 15 | interrupt controller module shares config/control registers with other |
16 | combiners. For example, a 32-bit interrupt enable/disable config register | 16 | combiners. For example, a 32-bit interrupt enable/disable config register |
17 | can accommodate upto 4 interrupt combiners (with each combiner supporting | 17 | can accommodate up to 4 interrupt combiners (with each combiner supporting |
18 | upto 8 interrupt sources). | 18 | up to 8 interrupt sources). |
19 | 19 | ||
20 | Required properties: | 20 | Required properties: |
21 | - compatible: should be "samsung,exynos4210-combiner". | 21 | - compatible: should be "samsung,exynos4210-combiner". |
diff --git a/Documentation/devicetree/bindings/arm/spear/shirq.txt b/Documentation/devicetree/bindings/arm/spear/shirq.txt index 13fbb8866bd6..715a013ed4bd 100644 --- a/Documentation/devicetree/bindings/arm/spear/shirq.txt +++ b/Documentation/devicetree/bindings/arm/spear/shirq.txt | |||
@@ -14,7 +14,7 @@ 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 | 14 | interrupt multiplexor (one node for all groups). A group in the |
15 | interrupt controller shares config/control registers with other groups. | 15 | interrupt controller shares config/control registers with other groups. |
16 | For example, a 32-bit interrupt enable/disable config register can | 16 | For example, a 32-bit interrupt enable/disable config register can |
17 | accommodate upto 4 interrupt groups. | 17 | accommodate up to 4 interrupt groups. |
18 | 18 | ||
19 | Required properties: | 19 | Required properties: |
20 | - compatible: should be, either of | 20 | - compatible: should be, either of |
diff --git a/Documentation/devicetree/bindings/arm/ste-nomadik.txt b/Documentation/devicetree/bindings/arm/ste-nomadik.txt index 19bca04b81c9..6256ec31666d 100644 --- a/Documentation/devicetree/bindings/arm/ste-nomadik.txt +++ b/Documentation/devicetree/bindings/arm/ste-nomadik.txt | |||
@@ -3,6 +3,11 @@ ST-Ericsson Nomadik Device Tree Bindings | |||
3 | For various board the "board" node may contain specific properties | 3 | For various board the "board" node may contain specific properties |
4 | that pertain to this particular board, such as board-specific GPIOs. | 4 | that pertain to this particular board, such as board-specific GPIOs. |
5 | 5 | ||
6 | Required root node property: src | ||
7 | - Nomadik System and reset controller used for basic chip control, clock | ||
8 | and reset line control. | ||
9 | - compatible: must be "stericsson,nomadik,src" | ||
10 | |||
6 | Boards with the Nomadik SoC include: | 11 | Boards with the Nomadik SoC include: |
7 | 12 | ||
8 | S8815 "MiniKit" manufactured by Calao Systems: | 13 | S8815 "MiniKit" manufactured by Calao Systems: |
diff --git a/Documentation/devicetree/bindings/arm/ste-u300.txt b/Documentation/devicetree/bindings/arm/ste-u300.txt new file mode 100644 index 000000000000..69b5ab0b5f4b --- /dev/null +++ b/Documentation/devicetree/bindings/arm/ste-u300.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | ST-Ericsson U300 Device Tree Bindings | ||
2 | |||
3 | For various board the "board" node may contain specific properties | ||
4 | that pertain to this particular board, such as board-specific GPIOs | ||
5 | or board power regulator supplies. | ||
6 | |||
7 | Required root node property: | ||
8 | |||
9 | compatible="stericsson,u300"; | ||
10 | |||
11 | Required node: syscon | ||
12 | This contains the system controller. | ||
13 | - compatible: must be "stericsson,u300-syscon". | ||
14 | - reg: the base address and size of the system controller. | ||
15 | |||
16 | Boards with the U300 SoC include: | ||
17 | |||
18 | S365 "Small Board U365": | ||
19 | |||
20 | Required node: s365 | ||
21 | This contains the board-specific information. | ||
22 | - compatible: must be "stericsson,s365". | ||
23 | - vana15-supply: the regulator supplying the 1.5V to drive the | ||
24 | board. | ||
25 | - syscon: a pointer to the syscon node so we can acccess the | ||
26 | syscon registers to set the board as self-powered. | ||
27 | |||
28 | Example: | ||
29 | |||
30 | / { | ||
31 | model = "ST-Ericsson U300"; | ||
32 | compatible = "stericsson,u300"; | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <1>; | ||
35 | |||
36 | s365 { | ||
37 | compatible = "stericsson,s365"; | ||
38 | vana15-supply = <&ab3100_ldo_d_reg>; | ||
39 | syscon = <&syscon>; | ||
40 | }; | ||
41 | |||
42 | syscon: syscon@c0011000 { | ||
43 | compatible = "stericsson,u300-syscon"; | ||
44 | reg = <0xc0011000 0x1000>; | ||
45 | }; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index b519f9b699c3..3ec0c5c4f0e9 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt | |||
@@ -12,6 +12,11 @@ Optional properties: | |||
12 | - calxeda,port-phys: phandle-combophy and lane assignment, which maps each | 12 | - calxeda,port-phys: phandle-combophy and lane assignment, which maps each |
13 | SATA port to a combophy and a lane within that | 13 | SATA port to a combophy and a lane within that |
14 | combophy | 14 | combophy |
15 | - calxeda,sgpio-gpio: phandle-gpio bank, bit offset, and default on or off, | ||
16 | which indicates that the driver supports SGPIO | ||
17 | indicator lights using the indicated GPIOs | ||
18 | - calxeda,led-order : a u32 array that map port numbers to offsets within the | ||
19 | SGPIO bitstream. | ||
15 | - dma-coherent : Present if dma operations are coherent | 20 | - dma-coherent : Present if dma operations are coherent |
16 | 21 | ||
17 | Example: | 22 | Example: |
diff --git a/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt b/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt new file mode 100644 index 000000000000..c1d22b3ae134 --- /dev/null +++ b/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | Atmel AT91RM9200 CompactFlash | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "atmel,at91rm9200-cf". | ||
5 | - reg : should specify localbus address and size used. | ||
6 | - gpios : specifies the gpio pins to control the CF device. Detect | ||
7 | and reset gpio's are mandatory while irq and vcc gpio's are | ||
8 | optional and may be set to 0 if not present. | ||
9 | |||
10 | Example: | ||
11 | compact-flash@50000000 { | ||
12 | compatible = "atmel,at91rm9200-cf"; | ||
13 | reg = <0x50000000 0x30000000>; | ||
14 | gpios = <&pioC 13 0 /* irq */ | ||
15 | &pioC 15 0 /* detect */ | ||
16 | 0 /* vcc */ | ||
17 | &pioC 5 0 /* reset */ | ||
18 | >; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt new file mode 100644 index 000000000000..cedc2a9c4785 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/imx-weim.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | Device tree bindings for i.MX Wireless External Interface Module (WEIM) | ||
2 | |||
3 | The term "wireless" does not imply that the WEIM is literally an interface | ||
4 | without wires. It simply means that this module was originally designed for | ||
5 | wireless and mobile applications that use low-power technology. | ||
6 | |||
7 | The actual devices are instantiated from the child nodes of a WEIM node. | ||
8 | |||
9 | Required properties: | ||
10 | |||
11 | - compatible: Should be set to "fsl,imx6q-weim" | ||
12 | - reg: A resource specifier for the register space | ||
13 | (see the example below) | ||
14 | - clocks: the clock, see the example below. | ||
15 | - #address-cells: Must be set to 2 to allow memory address translation | ||
16 | - #size-cells: Must be set to 1 to allow CS address passing | ||
17 | - ranges: Must be set up to reflect the memory layout with four | ||
18 | integer values for each chip-select line in use: | ||
19 | |||
20 | <cs-number> 0 <physical address of mapping> <size> | ||
21 | |||
22 | Timing property for child nodes. It is mandatory, not optional. | ||
23 | |||
24 | - fsl,weim-cs-timing: The timing array, contains 6 timing values for the | ||
25 | child node. We can get the CS index from the child | ||
26 | node's "reg" property. This property contains the values | ||
27 | for the registers EIM_CSnGCR1, EIM_CSnGCR2, EIM_CSnRCR1, | ||
28 | EIM_CSnRCR2, EIM_CSnWCR1, EIM_CSnWCR2 in this order. | ||
29 | |||
30 | Example for an imx6q-sabreauto board, the NOR flash connected to the WEIM: | ||
31 | |||
32 | weim: weim@021b8000 { | ||
33 | compatible = "fsl,imx6q-weim"; | ||
34 | reg = <0x021b8000 0x4000>; | ||
35 | clocks = <&clks 196>; | ||
36 | #address-cells = <2>; | ||
37 | #size-cells = <1>; | ||
38 | ranges = <0 0 0x08000000 0x08000000>; | ||
39 | |||
40 | nor@0,0 { | ||
41 | compatible = "cfi-flash"; | ||
42 | reg = <0 0 0x02000000>; | ||
43 | #address-cells = <1>; | ||
44 | #size-cells = <1>; | ||
45 | bank-width = <2>; | ||
46 | fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000 | ||
47 | 0x0000c000 0x1404a38e 0x00000000>; | ||
48 | }; | ||
49 | }; | ||
diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt index 4b87ea1194e3..704be9306c9f 100644 --- a/Documentation/devicetree/bindings/bus/ti-gpmc.txt +++ b/Documentation/devicetree/bindings/bus/ti-gpmc.txt | |||
@@ -95,7 +95,6 @@ GPMC chip-select settings properties for child nodes. All are optional. | |||
95 | - gpmc,burst-wrap Enables wrap bursting | 95 | - gpmc,burst-wrap Enables wrap bursting |
96 | - gpmc,burst-read Enables read page/burst mode | 96 | - gpmc,burst-read Enables read page/burst mode |
97 | - gpmc,burst-write Enables write page/burst mode | 97 | - gpmc,burst-write Enables write page/burst mode |
98 | - gpmc,device-nand Device is NAND | ||
99 | - gpmc,device-width Total width of device(s) connected to a GPMC | 98 | - gpmc,device-width Total width of device(s) connected to a GPMC |
100 | chip-select in bytes. The GPMC supports 8-bit | 99 | chip-select in bytes. The GPMC supports 8-bit |
101 | and 16-bit devices and so this property must be | 100 | and 16-bit devices and so this property must be |
diff --git a/Documentation/devicetree/bindings/clock/altr_socfpga.txt b/Documentation/devicetree/bindings/clock/altr_socfpga.txt index bd0c8416a5c8..0045433eae1f 100644 --- a/Documentation/devicetree/bindings/clock/altr_socfpga.txt +++ b/Documentation/devicetree/bindings/clock/altr_socfpga.txt | |||
@@ -9,6 +9,9 @@ Required properties: | |||
9 | "altr,socfpga-pll-clock" - for a PLL clock | 9 | "altr,socfpga-pll-clock" - for a PLL clock |
10 | "altr,socfpga-perip-clock" - The peripheral clock divided from the | 10 | "altr,socfpga-perip-clock" - The peripheral clock divided from the |
11 | PLL clock. | 11 | PLL clock. |
12 | "altr,socfpga-gate-clk" - Clocks that directly feed peripherals and | ||
13 | can get gated. | ||
14 | |||
12 | - reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. | 15 | - reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. |
13 | - clocks : shall be the input parent clock phandle for the clock. This is | 16 | - clocks : shall be the input parent clock phandle for the clock. This is |
14 | either an oscillator or a pll output. | 17 | either an oscillator or a pll output. |
@@ -16,3 +19,7 @@ Required properties: | |||
16 | 19 | ||
17 | Optional properties: | 20 | Optional properties: |
18 | - fixed-divider : If clocks have a fixed divider value, use this property. | 21 | - fixed-divider : If clocks have a fixed divider value, use this property. |
22 | - clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register | ||
23 | and the bit index. | ||
24 | - div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift, | ||
25 | and width. | ||
diff --git a/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt new file mode 100644 index 000000000000..a1201802f90d --- /dev/null +++ b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt | |||
@@ -0,0 +1,64 @@ | |||
1 | * Samsung Audio Subsystem Clock Controller | ||
2 | |||
3 | The Samsung Audio Subsystem clock controller generates and supplies clocks | ||
4 | to Audio Subsystem block available in the S5PV210 and Exynos SoCs. The clock | ||
5 | binding described here is applicable to all SoC's in Exynos family. | ||
6 | |||
7 | Required Properties: | ||
8 | |||
9 | - compatible: should be one of the following: | ||
10 | - "samsung,exynos4210-audss-clock" - controller compatible with all Exynos4 SoCs. | ||
11 | - "samsung,exynos5250-audss-clock" - controller compatible with all Exynos5 SoCs. | ||
12 | |||
13 | - reg: physical base address and length of the controller's register set. | ||
14 | |||
15 | - #clock-cells: should be 1. | ||
16 | |||
17 | The following is the list of clocks generated by the controller. Each clock is | ||
18 | assigned an identifier and client nodes use this identifier to specify the | ||
19 | clock which they consume. Some of the clocks are available only on a particular | ||
20 | Exynos4 SoC and this is specified where applicable. | ||
21 | |||
22 | Provided clocks: | ||
23 | |||
24 | Clock ID SoC (if specific) | ||
25 | ----------------------------------------------- | ||
26 | |||
27 | mout_audss 0 | ||
28 | mout_i2s 1 | ||
29 | dout_srp 2 | ||
30 | dout_aud_bus 3 | ||
31 | dout_i2s 4 | ||
32 | srp_clk 5 | ||
33 | i2s_bus 6 | ||
34 | sclk_i2s 7 | ||
35 | pcm_bus 8 | ||
36 | sclk_pcm 9 | ||
37 | |||
38 | Example 1: An example of a clock controller node is listed below. | ||
39 | |||
40 | clock_audss: audss-clock-controller@3810000 { | ||
41 | compatible = "samsung,exynos5250-audss-clock"; | ||
42 | reg = <0x03810000 0x0C>; | ||
43 | #clock-cells = <1>; | ||
44 | }; | ||
45 | |||
46 | Example 2: I2S controller node that consumes the clock generated by the clock | ||
47 | controller. Refer to the standard clock bindings for information | ||
48 | about 'clocks' and 'clock-names' property. | ||
49 | |||
50 | i2s0: i2s@03830000 { | ||
51 | compatible = "samsung,i2s-v5"; | ||
52 | reg = <0x03830000 0x100>; | ||
53 | dmas = <&pdma0 10 | ||
54 | &pdma0 9 | ||
55 | &pdma0 8>; | ||
56 | dma-names = "tx", "rx", "tx-sec"; | ||
57 | clocks = <&clock_audss EXYNOS_I2S_BUS>, | ||
58 | <&clock_audss EXYNOS_I2S_BUS>, | ||
59 | <&clock_audss EXYNOS_SCLK_I2S>, | ||
60 | <&clock_audss EXYNOS_MOUT_AUDSS>, | ||
61 | <&clock_audss EXYNOS_MOUT_I2S>; | ||
62 | clock-names = "iis", "i2s_opclk0", "i2s_opclk1", | ||
63 | "mout_audss", "mout_i2s"; | ||
64 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos4-clock.txt b/Documentation/devicetree/bindings/clock/exynos4-clock.txt index ea5e26f16aec..14d5c2af26f4 100644 --- a/Documentation/devicetree/bindings/clock/exynos4-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos4-clock.txt | |||
@@ -102,6 +102,7 @@ Exynos4 SoC and this is specified where applicable. | |||
102 | sclk_spi0_isp 174 Exynos4x12 | 102 | sclk_spi0_isp 174 Exynos4x12 |
103 | sclk_spi1_isp 175 Exynos4x12 | 103 | sclk_spi1_isp 175 Exynos4x12 |
104 | sclk_uart_isp 176 Exynos4x12 | 104 | sclk_uart_isp 176 Exynos4x12 |
105 | sclk_fimg2d 177 | ||
105 | 106 | ||
106 | [Peripheral Clock Gates] | 107 | [Peripheral Clock Gates] |
107 | 108 | ||
@@ -129,7 +130,7 @@ Exynos4 SoC and this is specified where applicable. | |||
129 | smmu_mfcl 274 | 130 | smmu_mfcl 274 |
130 | smmu_mfcr 275 | 131 | smmu_mfcr 275 |
131 | g3d 276 | 132 | g3d 276 |
132 | g2d 277 Exynos4210 | 133 | g2d 277 |
133 | rotator 278 Exynos4210 | 134 | rotator 278 Exynos4210 |
134 | mdma 279 Exynos4210 | 135 | mdma 279 Exynos4210 |
135 | smmu_g2d 280 Exynos4210 | 136 | smmu_g2d 280 Exynos4210 |
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt new file mode 100644 index 000000000000..9bcc4b1bff51 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt | |||
@@ -0,0 +1,201 @@ | |||
1 | * Samsung Exynos5420 Clock Controller | ||
2 | |||
3 | The Exynos5420 clock controller generates and supplies clock to various | ||
4 | controllers within the Exynos5420 SoC. | ||
5 | |||
6 | Required Properties: | ||
7 | |||
8 | - comptible: should be one of the following. | ||
9 | - "samsung,exynos5420-clock" - controller compatible with Exynos5420 SoC. | ||
10 | |||
11 | - reg: physical base address of the controller and length of memory mapped | ||
12 | region. | ||
13 | |||
14 | - #clock-cells: should be 1. | ||
15 | |||
16 | The following is the list of clocks generated by the controller. Each clock is | ||
17 | assigned an identifier and client nodes use this identifier to specify the | ||
18 | clock which they consume. | ||
19 | |||
20 | |||
21 | [Core Clocks] | ||
22 | |||
23 | Clock ID | ||
24 | ---------------------------- | ||
25 | |||
26 | fin_pll 1 | ||
27 | |||
28 | [Clock Gate for Special Clocks] | ||
29 | |||
30 | Clock ID | ||
31 | ---------------------------- | ||
32 | sclk_uart0 128 | ||
33 | sclk_uart1 129 | ||
34 | sclk_uart2 130 | ||
35 | sclk_uart3 131 | ||
36 | sclk_mmc0 132 | ||
37 | sclk_mmc1 133 | ||
38 | sclk_mmc2 134 | ||
39 | sclk_spi0 135 | ||
40 | sclk_spi1 136 | ||
41 | sclk_spi2 137 | ||
42 | sclk_i2s1 138 | ||
43 | sclk_i2s2 139 | ||
44 | sclk_pcm1 140 | ||
45 | sclk_pcm2 141 | ||
46 | sclk_spdif 142 | ||
47 | sclk_hdmi 143 | ||
48 | sclk_pixel 144 | ||
49 | sclk_dp1 145 | ||
50 | sclk_mipi1 146 | ||
51 | sclk_fimd1 147 | ||
52 | sclk_maudio0 148 | ||
53 | sclk_maupcm0 149 | ||
54 | sclk_usbd300 150 | ||
55 | sclk_usbd301 151 | ||
56 | sclk_usbphy300 152 | ||
57 | sclk_usbphy301 153 | ||
58 | sclk_unipro 154 | ||
59 | sclk_pwm 155 | ||
60 | sclk_gscl_wa 156 | ||
61 | sclk_gscl_wb 157 | ||
62 | |||
63 | [Peripheral Clock Gates] | ||
64 | |||
65 | Clock ID | ||
66 | ---------------------------- | ||
67 | |||
68 | aclk66_peric 256 | ||
69 | uart0 257 | ||
70 | uart1 258 | ||
71 | uart2 259 | ||
72 | uart3 260 | ||
73 | i2c0 261 | ||
74 | i2c1 262 | ||
75 | i2c2 263 | ||
76 | i2c3 264 | ||
77 | i2c4 265 | ||
78 | i2c5 266 | ||
79 | i2c6 267 | ||
80 | i2c7 268 | ||
81 | i2c_hdmi 269 | ||
82 | tsadc 270 | ||
83 | spi0 271 | ||
84 | spi1 272 | ||
85 | spi2 273 | ||
86 | keyif 274 | ||
87 | i2s1 275 | ||
88 | i2s2 276 | ||
89 | pcm1 277 | ||
90 | pcm2 278 | ||
91 | pwm 279 | ||
92 | spdif 280 | ||
93 | i2c8 281 | ||
94 | i2c9 282 | ||
95 | i2c10 283 | ||
96 | aclk66_psgen 300 | ||
97 | chipid 301 | ||
98 | sysreg 302 | ||
99 | tzpc0 303 | ||
100 | tzpc1 304 | ||
101 | tzpc2 305 | ||
102 | tzpc3 306 | ||
103 | tzpc4 307 | ||
104 | tzpc5 308 | ||
105 | tzpc6 309 | ||
106 | tzpc7 310 | ||
107 | tzpc8 311 | ||
108 | tzpc9 312 | ||
109 | hdmi_cec 313 | ||
110 | seckey 314 | ||
111 | mct 315 | ||
112 | wdt 316 | ||
113 | rtc 317 | ||
114 | tmu 318 | ||
115 | tmu_gpu 319 | ||
116 | pclk66_gpio 330 | ||
117 | aclk200_fsys2 350 | ||
118 | mmc0 351 | ||
119 | mmc1 352 | ||
120 | mmc2 353 | ||
121 | sromc 354 | ||
122 | ufs 355 | ||
123 | aclk200_fsys 360 | ||
124 | tsi 361 | ||
125 | pdma0 362 | ||
126 | pdma1 363 | ||
127 | rtic 364 | ||
128 | usbh20 365 | ||
129 | usbd300 366 | ||
130 | usbd301 377 | ||
131 | aclk400_mscl 380 | ||
132 | mscl0 381 | ||
133 | mscl1 382 | ||
134 | mscl2 383 | ||
135 | smmu_mscl0 384 | ||
136 | smmu_mscl1 385 | ||
137 | smmu_mscl2 386 | ||
138 | aclk333 400 | ||
139 | mfc 401 | ||
140 | smmu_mfcl 402 | ||
141 | smmu_mfcr 403 | ||
142 | aclk200_disp1 410 | ||
143 | dsim1 411 | ||
144 | dp1 412 | ||
145 | hdmi 413 | ||
146 | aclk300_disp1 420 | ||
147 | fimd1 421 | ||
148 | smmu_fimd1 422 | ||
149 | aclk166 430 | ||
150 | mixer 431 | ||
151 | aclk266 440 | ||
152 | rotator 441 | ||
153 | mdma1 442 | ||
154 | smmu_rotator 443 | ||
155 | smmu_mdma1 444 | ||
156 | aclk300_jpeg 450 | ||
157 | jpeg 451 | ||
158 | jpeg2 452 | ||
159 | smmu_jpeg 453 | ||
160 | aclk300_gscl 460 | ||
161 | smmu_gscl0 461 | ||
162 | smmu_gscl1 462 | ||
163 | gscl_wa 463 | ||
164 | gscl_wb 464 | ||
165 | gscl0 465 | ||
166 | gscl1 466 | ||
167 | clk_3aa 467 | ||
168 | aclk266_g2d 470 | ||
169 | sss 471 | ||
170 | slim_sss 472 | ||
171 | mdma0 473 | ||
172 | aclk333_g2d 480 | ||
173 | g2d 481 | ||
174 | aclk333_432_gscl 490 | ||
175 | smmu_3aa 491 | ||
176 | smmu_fimcl0 492 | ||
177 | smmu_fimcl1 493 | ||
178 | smmu_fimcl3 494 | ||
179 | fimc_lite3 495 | ||
180 | aclk_g3d 500 | ||
181 | g3d 501 | ||
182 | |||
183 | Example 1: An example of a clock controller node is listed below. | ||
184 | |||
185 | clock: clock-controller@0x10010000 { | ||
186 | compatible = "samsung,exynos5420-clock"; | ||
187 | reg = <0x10010000 0x30000>; | ||
188 | #clock-cells = <1>; | ||
189 | }; | ||
190 | |||
191 | Example 2: UART controller node that consumes the clock generated by the clock | ||
192 | controller. Refer to the standard clock bindings for information | ||
193 | about 'clocks' and 'clock-names' property. | ||
194 | |||
195 | serial@13820000 { | ||
196 | compatible = "samsung,exynos4210-uart"; | ||
197 | reg = <0x13820000 0x100>; | ||
198 | interrupts = <0 54 0>; | ||
199 | clocks = <&clock 259>, <&clock 130>; | ||
200 | clock-names = "uart", "clk_uart_baud0"; | ||
201 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx5-clock.txt b/Documentation/devicetree/bindings/clock/imx5-clock.txt index d71b4b2c077d..f46f5625d8ad 100644 --- a/Documentation/devicetree/bindings/clock/imx5-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx5-clock.txt | |||
@@ -184,6 +184,19 @@ clocks and IDs. | |||
184 | cko2 170 | 184 | cko2 170 |
185 | srtc_gate 171 | 185 | srtc_gate 171 |
186 | pata_gate 172 | 186 | pata_gate 172 |
187 | sata_gate 173 | ||
188 | spdif_xtal_sel 174 | ||
189 | spdif0_sel 175 | ||
190 | spdif1_sel 176 | ||
191 | spdif0_pred 177 | ||
192 | spdif0_podf 178 | ||
193 | spdif1_pred 179 | ||
194 | spdif1_podf 180 | ||
195 | spdif0_com_sel 181 | ||
196 | spdif1_com_sel 182 | ||
197 | spdif0_gate 183 | ||
198 | spdif1_gate 184 | ||
199 | spdif_ipg_gate 185 | ||
187 | 200 | ||
188 | Examples (for mx53): | 201 | Examples (for mx53): |
189 | 202 | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index 6deb6fd1c7cd..a0e104f0527e 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
@@ -208,6 +208,7 @@ clocks and IDs. | |||
208 | pll4_post_div 193 | 208 | pll4_post_div 193 |
209 | pll5_post_div 194 | 209 | pll5_post_div 194 |
210 | pll5_video_div 195 | 210 | pll5_video_div 195 |
211 | eim_slow 196 | ||
211 | 212 | ||
212 | Examples: | 213 | Examples: |
213 | 214 | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6sl-clock.txt b/Documentation/devicetree/bindings/clock/imx6sl-clock.txt new file mode 100644 index 000000000000..15e40bdf147d --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx6sl-clock.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | * Clock bindings for Freescale i.MX6 SoloLite | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,imx6sl-ccm" | ||
5 | - reg: Address and length of the register set | ||
6 | - #clock-cells: Should be <1> | ||
7 | |||
8 | The clock consumer should specify the desired clock by having the clock | ||
9 | ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sl-clock.h | ||
10 | for the full list of i.MX6 SoloLite clock IDs. | ||
diff --git a/Documentation/devicetree/bindings/clock/nspire-clock.txt b/Documentation/devicetree/bindings/clock/nspire-clock.txt new file mode 100644 index 000000000000..7c3bc8bb5b9f --- /dev/null +++ b/Documentation/devicetree/bindings/clock/nspire-clock.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | TI-NSPIRE Clocks | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Valid compatible properties include: | ||
5 | "lsi,nspire-cx-ahb-divider" for the AHB divider in the CX model | ||
6 | "lsi,nspire-classic-ahb-divider" for the AHB divider in the older model | ||
7 | "lsi,nspire-cx-clock" for the base clock in the CX model | ||
8 | "lsi,nspire-classic-clock" for the base clock in the older model | ||
9 | |||
10 | - reg: Physical base address of the controller and length of memory mapped | ||
11 | region. | ||
12 | |||
13 | Optional: | ||
14 | - clocks: For the "nspire-*-ahb-divider" compatible clocks, this is the parent | ||
15 | clock where it divides the rate from. | ||
16 | |||
17 | Example: | ||
18 | |||
19 | ahb_clk { | ||
20 | #clock-cells = <0>; | ||
21 | compatible = "lsi,nspire-cx-clock"; | ||
22 | reg = <0x900B0000 0x4>; | ||
23 | clocks = <&base_clk>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt index d6cb083b90a2..0c80c2677104 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt | |||
@@ -12,253 +12,9 @@ Required properties : | |||
12 | - clocks : Should contain phandle and clock specifiers for two clocks: | 12 | - clocks : Should contain phandle and clock specifiers for two clocks: |
13 | the 32 KHz "32k_in", and the board-specific oscillator "osc". | 13 | the 32 KHz "32k_in", and the board-specific oscillator "osc". |
14 | - #clock-cells : Should be 1. | 14 | - #clock-cells : Should be 1. |
15 | In clock consumers, this cell represents the clock ID exposed by the CAR. | 15 | In clock consumers, this cell represents the clock ID exposed by the |
16 | 16 | CAR. The assignments may be found in header file | |
17 | The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB | 17 | <dt-bindings/clock/tegra114-car.h>. |
18 | registers. These IDs often match those in the CAR's RST_DEVICES registers, | ||
19 | but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In | ||
20 | this case, those clocks are assigned IDs above 160 in order to highlight | ||
21 | this issue. Implementations that interpret these clock IDs as bit values | ||
22 | within the CLK_OUT_ENB or RST_DEVICES registers should be careful to | ||
23 | explicitly handle these special cases. | ||
24 | |||
25 | The balance of the clocks controlled by the CAR are assigned IDs of 160 and | ||
26 | above. | ||
27 | |||
28 | 0 unassigned | ||
29 | 1 unassigned | ||
30 | 2 unassigned | ||
31 | 3 unassigned | ||
32 | 4 rtc | ||
33 | 5 timer | ||
34 | 6 uarta | ||
35 | 7 unassigned (register bit affects uartb and vfir) | ||
36 | 8 unassigned | ||
37 | 9 sdmmc2 | ||
38 | 10 unassigned (register bit affects spdif_in and spdif_out) | ||
39 | 11 i2s1 | ||
40 | 12 i2c1 | ||
41 | 13 ndflash | ||
42 | 14 sdmmc1 | ||
43 | 15 sdmmc4 | ||
44 | 16 unassigned | ||
45 | 17 pwm | ||
46 | 18 i2s2 | ||
47 | 19 epp | ||
48 | 20 unassigned (register bit affects vi and vi_sensor) | ||
49 | 21 2d | ||
50 | 22 usbd | ||
51 | 23 isp | ||
52 | 24 3d | ||
53 | 25 unassigned | ||
54 | 26 disp2 | ||
55 | 27 disp1 | ||
56 | 28 host1x | ||
57 | 29 vcp | ||
58 | 30 i2s0 | ||
59 | 31 unassigned | ||
60 | |||
61 | 32 unassigned | ||
62 | 33 unassigned | ||
63 | 34 apbdma | ||
64 | 35 unassigned | ||
65 | 36 kbc | ||
66 | 37 unassigned | ||
67 | 38 unassigned | ||
68 | 39 unassigned (register bit affects fuse and fuse_burn) | ||
69 | 40 kfuse | ||
70 | 41 sbc1 | ||
71 | 42 nor | ||
72 | 43 unassigned | ||
73 | 44 sbc2 | ||
74 | 45 unassigned | ||
75 | 46 sbc3 | ||
76 | 47 i2c5 | ||
77 | 48 dsia | ||
78 | 49 unassigned | ||
79 | 50 mipi | ||
80 | 51 hdmi | ||
81 | 52 csi | ||
82 | 53 unassigned | ||
83 | 54 i2c2 | ||
84 | 55 uartc | ||
85 | 56 mipi-cal | ||
86 | 57 emc | ||
87 | 58 usb2 | ||
88 | 59 usb3 | ||
89 | 60 msenc | ||
90 | 61 vde | ||
91 | 62 bsea | ||
92 | 63 bsev | ||
93 | |||
94 | 64 unassigned | ||
95 | 65 uartd | ||
96 | 66 unassigned | ||
97 | 67 i2c3 | ||
98 | 68 sbc4 | ||
99 | 69 sdmmc3 | ||
100 | 70 unassigned | ||
101 | 71 owr | ||
102 | 72 afi | ||
103 | 73 csite | ||
104 | 74 unassigned | ||
105 | 75 unassigned | ||
106 | 76 la | ||
107 | 77 trace | ||
108 | 78 soc_therm | ||
109 | 79 dtv | ||
110 | 80 ndspeed | ||
111 | 81 i2cslow | ||
112 | 82 dsib | ||
113 | 83 tsec | ||
114 | 84 unassigned | ||
115 | 85 unassigned | ||
116 | 86 unassigned | ||
117 | 87 unassigned | ||
118 | 88 unassigned | ||
119 | 89 xusb_host | ||
120 | 90 unassigned | ||
121 | 91 msenc | ||
122 | 92 csus | ||
123 | 93 unassigned | ||
124 | 94 unassigned | ||
125 | 95 unassigned (bit affects xusb_dev and xusb_dev_src) | ||
126 | |||
127 | 96 unassigned | ||
128 | 97 unassigned | ||
129 | 98 unassigned | ||
130 | 99 mselect | ||
131 | 100 tsensor | ||
132 | 101 i2s3 | ||
133 | 102 i2s4 | ||
134 | 103 i2c4 | ||
135 | 104 sbc5 | ||
136 | 105 sbc6 | ||
137 | 106 d_audio | ||
138 | 107 apbif | ||
139 | 108 dam0 | ||
140 | 109 dam1 | ||
141 | 110 dam2 | ||
142 | 111 hda2codec_2x | ||
143 | 112 unassigned | ||
144 | 113 audio0_2x | ||
145 | 114 audio1_2x | ||
146 | 115 audio2_2x | ||
147 | 116 audio3_2x | ||
148 | 117 audio4_2x | ||
149 | 118 spdif_2x | ||
150 | 119 actmon | ||
151 | 120 extern1 | ||
152 | 121 extern2 | ||
153 | 122 extern3 | ||
154 | 123 unassigned | ||
155 | 124 unassigned | ||
156 | 125 hda | ||
157 | 126 unassigned | ||
158 | 127 se | ||
159 | |||
160 | 128 hda2hdmi | ||
161 | 129 unassigned | ||
162 | 130 unassigned | ||
163 | 131 unassigned | ||
164 | 132 unassigned | ||
165 | 133 unassigned | ||
166 | 134 unassigned | ||
167 | 135 unassigned | ||
168 | 136 unassigned | ||
169 | 137 unassigned | ||
170 | 138 unassigned | ||
171 | 139 unassigned | ||
172 | 140 unassigned | ||
173 | 141 unassigned | ||
174 | 142 unassigned | ||
175 | 143 unassigned (bit affects xusb_falcon_src, xusb_fs_src, | ||
176 | xusb_host_src and xusb_ss_src) | ||
177 | 144 cilab | ||
178 | 145 cilcd | ||
179 | 146 cile | ||
180 | 147 dsialp | ||
181 | 148 dsiblp | ||
182 | 149 unassigned | ||
183 | 150 dds | ||
184 | 151 unassigned | ||
185 | 152 dp2 | ||
186 | 153 amx | ||
187 | 154 adx | ||
188 | 155 unassigned (bit affects dfll_ref and dfll_soc) | ||
189 | 156 xusb_ss | ||
190 | |||
191 | 192 uartb | ||
192 | 193 vfir | ||
193 | 194 spdif_in | ||
194 | 195 spdif_out | ||
195 | 196 vi | ||
196 | 197 vi_sensor | ||
197 | 198 fuse | ||
198 | 199 fuse_burn | ||
199 | 200 clk_32k | ||
200 | 201 clk_m | ||
201 | 202 clk_m_div2 | ||
202 | 203 clk_m_div4 | ||
203 | 204 pll_ref | ||
204 | 205 pll_c | ||
205 | 206 pll_c_out1 | ||
206 | 207 pll_c2 | ||
207 | 208 pll_c3 | ||
208 | 209 pll_m | ||
209 | 210 pll_m_out1 | ||
210 | 211 pll_p | ||
211 | 212 pll_p_out1 | ||
212 | 213 pll_p_out2 | ||
213 | 214 pll_p_out3 | ||
214 | 215 pll_p_out4 | ||
215 | 216 pll_a | ||
216 | 217 pll_a_out0 | ||
217 | 218 pll_d | ||
218 | 219 pll_d_out0 | ||
219 | 220 pll_d2 | ||
220 | 221 pll_d2_out0 | ||
221 | 222 pll_u | ||
222 | 223 pll_u_480M | ||
223 | 224 pll_u_60M | ||
224 | 225 pll_u_48M | ||
225 | 226 pll_u_12M | ||
226 | 227 pll_x | ||
227 | 228 pll_x_out0 | ||
228 | 229 pll_re_vco | ||
229 | 230 pll_re_out | ||
230 | 231 pll_e_out0 | ||
231 | 232 spdif_in_sync | ||
232 | 233 i2s0_sync | ||
233 | 234 i2s1_sync | ||
234 | 235 i2s2_sync | ||
235 | 236 i2s3_sync | ||
236 | 237 i2s4_sync | ||
237 | 238 vimclk_sync | ||
238 | 239 audio0 | ||
239 | 240 audio1 | ||
240 | 241 audio2 | ||
241 | 242 audio3 | ||
242 | 243 audio4 | ||
243 | 244 spdif | ||
244 | 245 clk_out_1 | ||
245 | 246 clk_out_2 | ||
246 | 247 clk_out_3 | ||
247 | 248 blink | ||
248 | 252 xusb_host_src | ||
249 | 253 xusb_falcon_src | ||
250 | 254 xusb_fs_src | ||
251 | 255 xusb_ss_src | ||
252 | 256 xusb_dev_src | ||
253 | 257 xusb_dev | ||
254 | 258 xusb_hs_src | ||
255 | 259 sclk | ||
256 | 260 hclk | ||
257 | 261 pclk | ||
258 | 262 cclk_g | ||
259 | 263 cclk_lp | ||
260 | 264 dfll_ref | ||
261 | 265 dfll_soc | ||
262 | 18 | ||
263 | Example SoC include file: | 19 | Example SoC include file: |
264 | 20 | ||
@@ -270,7 +26,7 @@ Example SoC include file: | |||
270 | }; | 26 | }; |
271 | 27 | ||
272 | usb@c5004000 { | 28 | usb@c5004000 { |
273 | clocks = <&tegra_car 58>; /* usb2 */ | 29 | clocks = <&tegra_car TEGRA114_CLK_USB2>; |
274 | }; | 30 | }; |
275 | }; | 31 | }; |
276 | 32 | ||
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt index e885680f6b45..fcfed5bf73fb 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt | |||
@@ -12,155 +12,9 @@ Required properties : | |||
12 | - clocks : Should contain phandle and clock specifiers for two clocks: | 12 | - clocks : Should contain phandle and clock specifiers for two clocks: |
13 | the 32 KHz "32k_in", and the board-specific oscillator "osc". | 13 | the 32 KHz "32k_in", and the board-specific oscillator "osc". |
14 | - #clock-cells : Should be 1. | 14 | - #clock-cells : Should be 1. |
15 | In clock consumers, this cell represents the clock ID exposed by the CAR. | 15 | In clock consumers, this cell represents the clock ID exposed by the |
16 | 16 | CAR. The assignments may be found in header file | |
17 | The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB | 17 | <dt-bindings/clock/tegra20-car.h>. |
18 | registers. These IDs often match those in the CAR's RST_DEVICES registers, | ||
19 | but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In | ||
20 | this case, those clocks are assigned IDs above 95 in order to highlight | ||
21 | this issue. Implementations that interpret these clock IDs as bit values | ||
22 | within the CLK_OUT_ENB or RST_DEVICES registers should be careful to | ||
23 | explicitly handle these special cases. | ||
24 | |||
25 | The balance of the clocks controlled by the CAR are assigned IDs of 96 and | ||
26 | above. | ||
27 | |||
28 | 0 cpu | ||
29 | 1 unassigned | ||
30 | 2 unassigned | ||
31 | 3 ac97 | ||
32 | 4 rtc | ||
33 | 5 tmr | ||
34 | 6 uart1 | ||
35 | 7 unassigned (register bit affects uart2 and vfir) | ||
36 | 8 gpio | ||
37 | 9 sdmmc2 | ||
38 | 10 unassigned (register bit affects spdif_in and spdif_out) | ||
39 | 11 i2s1 | ||
40 | 12 i2c1 | ||
41 | 13 ndflash | ||
42 | 14 sdmmc1 | ||
43 | 15 sdmmc4 | ||
44 | 16 twc | ||
45 | 17 pwm | ||
46 | 18 i2s2 | ||
47 | 19 epp | ||
48 | 20 unassigned (register bit affects vi and vi_sensor) | ||
49 | 21 2d | ||
50 | 22 usbd | ||
51 | 23 isp | ||
52 | 24 3d | ||
53 | 25 ide | ||
54 | 26 disp2 | ||
55 | 27 disp1 | ||
56 | 28 host1x | ||
57 | 29 vcp | ||
58 | 30 unassigned | ||
59 | 31 cache2 | ||
60 | |||
61 | 32 mem | ||
62 | 33 ahbdma | ||
63 | 34 apbdma | ||
64 | 35 unassigned | ||
65 | 36 kbc | ||
66 | 37 stat_mon | ||
67 | 38 pmc | ||
68 | 39 fuse | ||
69 | 40 kfuse | ||
70 | 41 sbc1 | ||
71 | 42 snor | ||
72 | 43 spi1 | ||
73 | 44 sbc2 | ||
74 | 45 xio | ||
75 | 46 sbc3 | ||
76 | 47 dvc | ||
77 | 48 dsi | ||
78 | 49 unassigned (register bit affects tvo and cve) | ||
79 | 50 mipi | ||
80 | 51 hdmi | ||
81 | 52 csi | ||
82 | 53 tvdac | ||
83 | 54 i2c2 | ||
84 | 55 uart3 | ||
85 | 56 unassigned | ||
86 | 57 emc | ||
87 | 58 usb2 | ||
88 | 59 usb3 | ||
89 | 60 mpe | ||
90 | 61 vde | ||
91 | 62 bsea | ||
92 | 63 bsev | ||
93 | |||
94 | 64 speedo | ||
95 | 65 uart4 | ||
96 | 66 uart5 | ||
97 | 67 i2c3 | ||
98 | 68 sbc4 | ||
99 | 69 sdmmc3 | ||
100 | 70 pcie | ||
101 | 71 owr | ||
102 | 72 afi | ||
103 | 73 csite | ||
104 | 74 unassigned | ||
105 | 75 avpucq | ||
106 | 76 la | ||
107 | 77 unassigned | ||
108 | 78 unassigned | ||
109 | 79 unassigned | ||
110 | 80 unassigned | ||
111 | 81 unassigned | ||
112 | 82 unassigned | ||
113 | 83 unassigned | ||
114 | 84 irama | ||
115 | 85 iramb | ||
116 | 86 iramc | ||
117 | 87 iramd | ||
118 | 88 cram2 | ||
119 | 89 audio_2x a/k/a audio_2x_sync_clk | ||
120 | 90 clk_d | ||
121 | 91 unassigned | ||
122 | 92 sus | ||
123 | 93 cdev2 | ||
124 | 94 cdev1 | ||
125 | 95 unassigned | ||
126 | |||
127 | 96 uart2 | ||
128 | 97 vfir | ||
129 | 98 spdif_in | ||
130 | 99 spdif_out | ||
131 | 100 vi | ||
132 | 101 vi_sensor | ||
133 | 102 tvo | ||
134 | 103 cve | ||
135 | 104 osc | ||
136 | 105 clk_32k a/k/a clk_s | ||
137 | 106 clk_m | ||
138 | 107 sclk | ||
139 | 108 cclk | ||
140 | 109 hclk | ||
141 | 110 pclk | ||
142 | 111 blink | ||
143 | 112 pll_a | ||
144 | 113 pll_a_out0 | ||
145 | 114 pll_c | ||
146 | 115 pll_c_out1 | ||
147 | 116 pll_d | ||
148 | 117 pll_d_out0 | ||
149 | 118 pll_e | ||
150 | 119 pll_m | ||
151 | 120 pll_m_out1 | ||
152 | 121 pll_p | ||
153 | 122 pll_p_out1 | ||
154 | 123 pll_p_out2 | ||
155 | 124 pll_p_out3 | ||
156 | 125 pll_p_out4 | ||
157 | 126 pll_s | ||
158 | 127 pll_u | ||
159 | 128 pll_x | ||
160 | 129 cop a/k/a avp | ||
161 | 130 audio a/k/a audio_sync_clk | ||
162 | 131 pll_ref | ||
163 | 132 twd | ||
164 | 18 | ||
165 | Example SoC include file: | 19 | Example SoC include file: |
166 | 20 | ||
@@ -172,7 +26,7 @@ Example SoC include file: | |||
172 | }; | 26 | }; |
173 | 27 | ||
174 | usb@c5004000 { | 28 | usb@c5004000 { |
175 | clocks = <&tegra_car 58>; /* usb2 */ | 29 | clocks = <&tegra_car TEGRA20_CLK_USB2>; |
176 | }; | 30 | }; |
177 | }; | 31 | }; |
178 | 32 | ||
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt index f3da3be5fcad..0f714081e986 100644 --- a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt | |||
@@ -12,212 +12,9 @@ Required properties : | |||
12 | - clocks : Should contain phandle and clock specifiers for two clocks: | 12 | - clocks : Should contain phandle and clock specifiers for two clocks: |
13 | the 32 KHz "32k_in", and the board-specific oscillator "osc". | 13 | the 32 KHz "32k_in", and the board-specific oscillator "osc". |
14 | - #clock-cells : Should be 1. | 14 | - #clock-cells : Should be 1. |
15 | In clock consumers, this cell represents the clock ID exposed by the CAR. | 15 | In clock consumers, this cell represents the clock ID exposed by the |
16 | 16 | CAR. The assignments may be found in header file | |
17 | The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB | 17 | <dt-bindings/clock/tegra30-car.h>. |
18 | registers. These IDs often match those in the CAR's RST_DEVICES registers, | ||
19 | but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In | ||
20 | this case, those clocks are assigned IDs above 160 in order to highlight | ||
21 | this issue. Implementations that interpret these clock IDs as bit values | ||
22 | within the CLK_OUT_ENB or RST_DEVICES registers should be careful to | ||
23 | explicitly handle these special cases. | ||
24 | |||
25 | The balance of the clocks controlled by the CAR are assigned IDs of 160 and | ||
26 | above. | ||
27 | |||
28 | 0 cpu | ||
29 | 1 unassigned | ||
30 | 2 unassigned | ||
31 | 3 unassigned | ||
32 | 4 rtc | ||
33 | 5 timer | ||
34 | 6 uarta | ||
35 | 7 unassigned (register bit affects uartb and vfir) | ||
36 | 8 gpio | ||
37 | 9 sdmmc2 | ||
38 | 10 unassigned (register bit affects spdif_in and spdif_out) | ||
39 | 11 i2s1 | ||
40 | 12 i2c1 | ||
41 | 13 ndflash | ||
42 | 14 sdmmc1 | ||
43 | 15 sdmmc4 | ||
44 | 16 unassigned | ||
45 | 17 pwm | ||
46 | 18 i2s2 | ||
47 | 19 epp | ||
48 | 20 unassigned (register bit affects vi and vi_sensor) | ||
49 | 21 2d | ||
50 | 22 usbd | ||
51 | 23 isp | ||
52 | 24 3d | ||
53 | 25 unassigned | ||
54 | 26 disp2 | ||
55 | 27 disp1 | ||
56 | 28 host1x | ||
57 | 29 vcp | ||
58 | 30 i2s0 | ||
59 | 31 cop_cache | ||
60 | |||
61 | 32 mc | ||
62 | 33 ahbdma | ||
63 | 34 apbdma | ||
64 | 35 unassigned | ||
65 | 36 kbc | ||
66 | 37 statmon | ||
67 | 38 pmc | ||
68 | 39 unassigned (register bit affects fuse and fuse_burn) | ||
69 | 40 kfuse | ||
70 | 41 sbc1 | ||
71 | 42 nor | ||
72 | 43 unassigned | ||
73 | 44 sbc2 | ||
74 | 45 unassigned | ||
75 | 46 sbc3 | ||
76 | 47 i2c5 | ||
77 | 48 dsia | ||
78 | 49 unassigned (register bit affects cve and tvo) | ||
79 | 50 mipi | ||
80 | 51 hdmi | ||
81 | 52 csi | ||
82 | 53 tvdac | ||
83 | 54 i2c2 | ||
84 | 55 uartc | ||
85 | 56 unassigned | ||
86 | 57 emc | ||
87 | 58 usb2 | ||
88 | 59 usb3 | ||
89 | 60 mpe | ||
90 | 61 vde | ||
91 | 62 bsea | ||
92 | 63 bsev | ||
93 | |||
94 | 64 speedo | ||
95 | 65 uartd | ||
96 | 66 uarte | ||
97 | 67 i2c3 | ||
98 | 68 sbc4 | ||
99 | 69 sdmmc3 | ||
100 | 70 pcie | ||
101 | 71 owr | ||
102 | 72 afi | ||
103 | 73 csite | ||
104 | 74 pciex | ||
105 | 75 avpucq | ||
106 | 76 la | ||
107 | 77 unassigned | ||
108 | 78 unassigned | ||
109 | 79 dtv | ||
110 | 80 ndspeed | ||
111 | 81 i2cslow | ||
112 | 82 dsib | ||
113 | 83 unassigned | ||
114 | 84 irama | ||
115 | 85 iramb | ||
116 | 86 iramc | ||
117 | 87 iramd | ||
118 | 88 cram2 | ||
119 | 89 unassigned | ||
120 | 90 audio_2x a/k/a audio_2x_sync_clk | ||
121 | 91 unassigned | ||
122 | 92 csus | ||
123 | 93 cdev2 | ||
124 | 94 cdev1 | ||
125 | 95 unassigned | ||
126 | |||
127 | 96 cpu_g | ||
128 | 97 cpu_lp | ||
129 | 98 3d2 | ||
130 | 99 mselect | ||
131 | 100 tsensor | ||
132 | 101 i2s3 | ||
133 | 102 i2s4 | ||
134 | 103 i2c4 | ||
135 | 104 sbc5 | ||
136 | 105 sbc6 | ||
137 | 106 d_audio | ||
138 | 107 apbif | ||
139 | 108 dam0 | ||
140 | 109 dam1 | ||
141 | 110 dam2 | ||
142 | 111 hda2codec_2x | ||
143 | 112 atomics | ||
144 | 113 audio0_2x | ||
145 | 114 audio1_2x | ||
146 | 115 audio2_2x | ||
147 | 116 audio3_2x | ||
148 | 117 audio4_2x | ||
149 | 118 audio5_2x | ||
150 | 119 actmon | ||
151 | 120 extern1 | ||
152 | 121 extern2 | ||
153 | 122 extern3 | ||
154 | 123 sata_oob | ||
155 | 124 sata | ||
156 | 125 hda | ||
157 | 127 se | ||
158 | 128 hda2hdmi | ||
159 | 129 sata_cold | ||
160 | |||
161 | 160 uartb | ||
162 | 161 vfir | ||
163 | 162 spdif_in | ||
164 | 163 spdif_out | ||
165 | 164 vi | ||
166 | 165 vi_sensor | ||
167 | 166 fuse | ||
168 | 167 fuse_burn | ||
169 | 168 cve | ||
170 | 169 tvo | ||
171 | |||
172 | 170 clk_32k | ||
173 | 171 clk_m | ||
174 | 172 clk_m_div2 | ||
175 | 173 clk_m_div4 | ||
176 | 174 pll_ref | ||
177 | 175 pll_c | ||
178 | 176 pll_c_out1 | ||
179 | 177 pll_m | ||
180 | 178 pll_m_out1 | ||
181 | 179 pll_p | ||
182 | 180 pll_p_out1 | ||
183 | 181 pll_p_out2 | ||
184 | 182 pll_p_out3 | ||
185 | 183 pll_p_out4 | ||
186 | 184 pll_a | ||
187 | 185 pll_a_out0 | ||
188 | 186 pll_d | ||
189 | 187 pll_d_out0 | ||
190 | 188 pll_d2 | ||
191 | 189 pll_d2_out0 | ||
192 | 190 pll_u | ||
193 | 191 pll_x | ||
194 | 192 pll_x_out0 | ||
195 | 193 pll_e | ||
196 | 194 spdif_in_sync | ||
197 | 195 i2s0_sync | ||
198 | 196 i2s1_sync | ||
199 | 197 i2s2_sync | ||
200 | 198 i2s3_sync | ||
201 | 199 i2s4_sync | ||
202 | 200 vimclk | ||
203 | 201 audio0 | ||
204 | 202 audio1 | ||
205 | 203 audio2 | ||
206 | 204 audio3 | ||
207 | 205 audio4 | ||
208 | 206 audio5 | ||
209 | 207 clk_out_1 (extern1) | ||
210 | 208 clk_out_2 (extern2) | ||
211 | 209 clk_out_3 (extern3) | ||
212 | 210 sclk | ||
213 | 211 blink | ||
214 | 212 cclk_g | ||
215 | 213 cclk_lp | ||
216 | 214 twd | ||
217 | 215 cml0 | ||
218 | 216 cml1 | ||
219 | 217 hclk | ||
220 | 218 pclk | ||
221 | 18 | ||
222 | Example SoC include file: | 19 | Example SoC include file: |
223 | 20 | ||
@@ -229,7 +26,7 @@ Example SoC include file: | |||
229 | }; | 26 | }; |
230 | 27 | ||
231 | usb@c5004000 { | 28 | usb@c5004000 { |
232 | clocks = <&tegra_car 58>; /* usb2 */ | 29 | clocks = <&tegra_car TEGRA30_CLK_USB2>; |
233 | }; | 30 | }; |
234 | }; | 31 | }; |
235 | 32 | ||
diff --git a/Documentation/devicetree/bindings/clock/rockchip.txt b/Documentation/devicetree/bindings/clock/rockchip.txt new file mode 100644 index 000000000000..a891c823ed44 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/rockchip.txt | |||
@@ -0,0 +1,74 @@ | |||
1 | Device Tree Clock bindings for arch-rockchip | ||
2 | |||
3 | This binding uses the common clock binding[1]. | ||
4 | |||
5 | [1] Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
6 | |||
7 | == Gate clocks == | ||
8 | |||
9 | The gate registers form a continuos block which makes the dt node | ||
10 | structure a matter of taste, as either all gates can be put into | ||
11 | one gate clock spanning all registers or they can be divided into | ||
12 | the 10 individual gates containing 16 clocks each. | ||
13 | The code supports both approaches. | ||
14 | |||
15 | Required properties: | ||
16 | - compatible : "rockchip,rk2928-gate-clk" | ||
17 | - reg : shall be the control register address(es) for the clock. | ||
18 | - #clock-cells : from common clock binding; shall be set to 1 | ||
19 | - clock-output-names : the corresponding gate names that the clock controls | ||
20 | - clocks : should contain the parent clock for each individual gate, | ||
21 | therefore the number of clocks elements should match the number of | ||
22 | clock-output-names | ||
23 | |||
24 | Example using multiple gate clocks: | ||
25 | |||
26 | clk_gates0: gate-clk@200000d0 { | ||
27 | compatible = "rockchip,rk2928-gate-clk"; | ||
28 | reg = <0x200000d0 0x4>; | ||
29 | clocks = <&dummy>, <&dummy>, | ||
30 | <&dummy>, <&dummy>, | ||
31 | <&dummy>, <&dummy>, | ||
32 | <&dummy>, <&dummy>, | ||
33 | <&dummy>, <&dummy>, | ||
34 | <&dummy>, <&dummy>, | ||
35 | <&dummy>, <&dummy>, | ||
36 | <&dummy>, <&dummy>; | ||
37 | |||
38 | clock-output-names = | ||
39 | "gate_core_periph", "gate_cpu_gpll", | ||
40 | "gate_ddrphy", "gate_aclk_cpu", | ||
41 | "gate_hclk_cpu", "gate_pclk_cpu", | ||
42 | "gate_atclk_cpu", "gate_i2s0", | ||
43 | "gate_i2s0_frac", "gate_i2s1", | ||
44 | "gate_i2s1_frac", "gate_i2s2", | ||
45 | "gate_i2s2_frac", "gate_spdif", | ||
46 | "gate_spdif_frac", "gate_testclk"; | ||
47 | |||
48 | #clock-cells = <1>; | ||
49 | }; | ||
50 | |||
51 | clk_gates1: gate-clk@200000d4 { | ||
52 | compatible = "rockchip,rk2928-gate-clk"; | ||
53 | reg = <0x200000d4 0x4>; | ||
54 | clocks = <&xin24m>, <&xin24m>, | ||
55 | <&xin24m>, <&dummy>, | ||
56 | <&dummy>, <&xin24m>, | ||
57 | <&xin24m>, <&dummy>, | ||
58 | <&xin24m>, <&dummy>, | ||
59 | <&xin24m>, <&dummy>, | ||
60 | <&xin24m>, <&dummy>, | ||
61 | <&xin24m>, <&dummy>; | ||
62 | |||
63 | clock-output-names = | ||
64 | "gate_timer0", "gate_timer1", | ||
65 | "gate_timer2", "gate_jtag", | ||
66 | "gate_aclk_lcdc1_src", "gate_otgphy0", | ||
67 | "gate_otgphy1", "gate_ddr_gpll", | ||
68 | "gate_uart0", "gate_frac_uart0", | ||
69 | "gate_uart1", "gate_frac_uart1", | ||
70 | "gate_uart2", "gate_frac_uart2", | ||
71 | "gate_uart3", "gate_frac_uart3"; | ||
72 | |||
73 | #clock-cells = <1>; | ||
74 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/silabs,si5351.txt b/Documentation/devicetree/bindings/clock/silabs,si5351.txt index cc374651662c..c40711e8e8f7 100644 --- a/Documentation/devicetree/bindings/clock/silabs,si5351.txt +++ b/Documentation/devicetree/bindings/clock/silabs,si5351.txt | |||
@@ -4,7 +4,7 @@ Reference | |||
4 | [1] Si5351A/B/C Data Sheet | 4 | [1] Si5351A/B/C Data Sheet |
5 | http://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf | 5 | http://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf |
6 | 6 | ||
7 | The Si5351a/b/c are programmable i2c clock generators with upto 8 output | 7 | The Si5351a/b/c are programmable i2c clock generators with up to 8 output |
8 | clocks. Si5351a also has a reduced pin-count package (MSOP10) where only | 8 | clocks. Si5351a also has a reduced pin-count package (MSOP10) where only |
9 | 3 output clocks are accessible. The internal structure of the clock | 9 | 3 output clocks are accessible. The internal structure of the clock |
10 | generators can be found in [1]. | 10 | generators can be found in [1]. |
@@ -44,6 +44,11 @@ Optional child node properties: | |||
44 | - silabs,multisynth-source: source pll A(0) or B(1) of corresponding multisynth | 44 | - silabs,multisynth-source: source pll A(0) or B(1) of corresponding multisynth |
45 | divider. | 45 | divider. |
46 | - silabs,pll-master: boolean, multisynth can change pll frequency. | 46 | - silabs,pll-master: boolean, multisynth can change pll frequency. |
47 | - silabs,disable-state : clock output disable state, shall be | ||
48 | 0 = clock output is driven LOW when disabled | ||
49 | 1 = clock output is driven HIGH when disabled | ||
50 | 2 = clock output is FLOATING (HIGH-Z) when disabled | ||
51 | 3 = clock output is NEVER disabled | ||
47 | 52 | ||
48 | ==Example== | 53 | ==Example== |
49 | 54 | ||
diff --git a/Documentation/devicetree/bindings/clock/st,nomadik.txt b/Documentation/devicetree/bindings/clock/st,nomadik.txt new file mode 100644 index 000000000000..7fc09773de46 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st,nomadik.txt | |||
@@ -0,0 +1,104 @@ | |||
1 | ST Microelectronics Nomadik SRC System Reset and Control | ||
2 | |||
3 | This binding uses the common clock binding: | ||
4 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
5 | |||
6 | The Nomadik SRC controller is responsible of controlling chrystals, | ||
7 | PLLs and clock gates. | ||
8 | |||
9 | Required properties for the SRC node: | ||
10 | - compatible: must be "stericsson,nomadik-src" | ||
11 | - reg: must contain the SRC register base and size | ||
12 | |||
13 | Optional properties for the SRC node: | ||
14 | - disable-sxtalo: if present this will disable the SXTALO | ||
15 | i.e. the driver output for the slow 32kHz chrystal, if the | ||
16 | board has its own circuitry for providing this oscillator | ||
17 | - disable-mxtal: if present this will disable the MXTALO, | ||
18 | i.e. the driver output for the main (~19.2 MHz) chrystal, | ||
19 | if the board has its own circuitry for providing this | ||
20 | osciallator | ||
21 | |||
22 | |||
23 | PLL nodes: these nodes represent the two PLLs on the system, | ||
24 | which should both have the main chrystal, represented as a | ||
25 | fixed frequency clock, as parent. | ||
26 | |||
27 | Required properties for the two PLL nodes: | ||
28 | - compatible: must be "st,nomadik-pll-clock" | ||
29 | - clock-cells: must be 0 | ||
30 | - clock-id: must be 1 or 2 for PLL1 and PLL2 respectively | ||
31 | - clocks: this clock will have main chrystal as parent | ||
32 | |||
33 | |||
34 | HCLK nodes: these represent the clock gates on individual | ||
35 | lines from the HCLK clock tree and the gate for individual | ||
36 | lines from the PCLK clock tree. | ||
37 | |||
38 | Requires properties for the HCLK nodes: | ||
39 | - compatible: must be "st,nomadik-hclk-clock" | ||
40 | - clock-cells: must be 0 | ||
41 | - clock-id: must be the clock ID from 0 to 63 according to | ||
42 | this table: | ||
43 | |||
44 | 0: HCLKDMA0 | ||
45 | 1: HCLKSMC | ||
46 | 2: HCLKSDRAM | ||
47 | 3: HCLKDMA1 | ||
48 | 4: HCLKCLCD | ||
49 | 5: PCLKIRDA | ||
50 | 6: PCLKSSP | ||
51 | 7: PCLKUART0 | ||
52 | 8: PCLKSDI | ||
53 | 9: PCLKI2C0 | ||
54 | 10: PCLKI2C1 | ||
55 | 11: PCLKUART1 | ||
56 | 12: PCLMSP0 | ||
57 | 13: HCLKUSB | ||
58 | 14: HCLKDIF | ||
59 | 15: HCLKSAA | ||
60 | 16: HCLKSVA | ||
61 | 17: PCLKHSI | ||
62 | 18: PCLKXTI | ||
63 | 19: PCLKUART2 | ||
64 | 20: PCLKMSP1 | ||
65 | 21: PCLKMSP2 | ||
66 | 22: PCLKOWM | ||
67 | 23: HCLKHPI | ||
68 | 24: PCLKSKE | ||
69 | 25: PCLKHSEM | ||
70 | 26: HCLK3D | ||
71 | 27: HCLKHASH | ||
72 | 28: HCLKCRYP | ||
73 | 29: PCLKMSHC | ||
74 | 30: HCLKUSBM | ||
75 | 31: HCLKRNG | ||
76 | (32, 33, 34, 35 RESERVED) | ||
77 | 36: CLDCLK | ||
78 | 37: IRDACLK | ||
79 | 38: SSPICLK | ||
80 | 39: UART0CLK | ||
81 | 40: SDICLK | ||
82 | 41: I2C0CLK | ||
83 | 42: I2C1CLK | ||
84 | 43: UART1CLK | ||
85 | 44: MSPCLK0 | ||
86 | 45: USBCLK | ||
87 | 46: DIFCLK | ||
88 | 47: IPI2CCLK | ||
89 | 48: IPBMCCLK | ||
90 | 49: HSICLKRX | ||
91 | 50: HSICLKTX | ||
92 | 51: UART2CLK | ||
93 | 52: MSPCLK1 | ||
94 | 53: MSPCLK2 | ||
95 | 54: OWMCLK | ||
96 | (55 RESERVED) | ||
97 | 56: SKECLK | ||
98 | (57 RESERVED) | ||
99 | 58: 3DCLK | ||
100 | 59: PCLKMSP3 | ||
101 | 60: MSPCLK3 | ||
102 | 61: MSHCCLK | ||
103 | 62: USBMCLK | ||
104 | 63: RNGCCLK | ||
diff --git a/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt b/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt new file mode 100644 index 000000000000..7cafcb98ead7 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt | |||
@@ -0,0 +1,80 @@ | |||
1 | Clock bindings for ST-Ericsson U300 System Controller Clocks | ||
2 | |||
3 | Bindings for the gated system controller clocks: | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: must be "stericsson,u300-syscon-clk" | ||
7 | - #clock-cells: must be <0> | ||
8 | - clock-type: specifies the type of clock: | ||
9 | 0 = slow clock | ||
10 | 1 = fast clock | ||
11 | 2 = rest/remaining clock | ||
12 | - clock-id: specifies the clock in the type range | ||
13 | |||
14 | Optional properties: | ||
15 | - clocks: parent clock(s) | ||
16 | |||
17 | The available clocks per type are as follows: | ||
18 | |||
19 | Type: ID: Clock: | ||
20 | ------------------- | ||
21 | 0 0 Slow peripheral bridge clock | ||
22 | 0 1 UART0 clock | ||
23 | 0 4 GPIO clock | ||
24 | 0 6 RTC clock | ||
25 | 0 7 Application timer clock | ||
26 | 0 8 Access timer clock | ||
27 | |||
28 | 1 0 Fast peripheral bridge clock | ||
29 | 1 1 I2C bus 0 clock | ||
30 | 1 2 I2C bus 1 clock | ||
31 | 1 5 MMC interface peripheral (silicon) clock | ||
32 | 1 6 SPI clock | ||
33 | |||
34 | 2 3 CPU clock | ||
35 | 2 4 DMA controller clock | ||
36 | 2 5 External Memory Interface (EMIF) clock | ||
37 | 2 6 NAND flask interface clock | ||
38 | 2 8 XGAM graphics engine clock | ||
39 | 2 9 Shared External Memory Interface (SEMI) clock | ||
40 | 2 10 AHB Subsystem Bridge clock | ||
41 | 2 12 Interrupt controller clock | ||
42 | |||
43 | Example: | ||
44 | |||
45 | gpio_clk: gpio_clk@13M { | ||
46 | #clock-cells = <0>; | ||
47 | compatible = "stericsson,u300-syscon-clk"; | ||
48 | clock-type = <0>; /* Slow */ | ||
49 | clock-id = <4>; | ||
50 | clocks = <&slow_clk>; | ||
51 | }; | ||
52 | |||
53 | gpio: gpio@c0016000 { | ||
54 | compatible = "stericsson,gpio-coh901"; | ||
55 | (...) | ||
56 | clocks = <&gpio_clk>; | ||
57 | }; | ||
58 | |||
59 | |||
60 | Bindings for the MMC/SD card clock: | ||
61 | |||
62 | Required properties: | ||
63 | - compatible: must be "stericsson,u300-syscon-mclk" | ||
64 | - #clock-cells: must be <0> | ||
65 | |||
66 | Optional properties: | ||
67 | - clocks: parent clock(s) | ||
68 | |||
69 | mmc_mclk: mmc_mclk { | ||
70 | #clock-cells = <0>; | ||
71 | compatible = "stericsson,u300-syscon-mclk"; | ||
72 | clocks = <&mmc_pclk>; | ||
73 | }; | ||
74 | |||
75 | mmcsd: mmcsd@c0001000 { | ||
76 | compatible = "arm,pl18x", "arm,primecell"; | ||
77 | clocks = <&mmc_pclk>, <&mmc_mclk>; | ||
78 | clock-names = "apb_pclk", "mclk"; | ||
79 | (...) | ||
80 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index 729f52426fe1..d495521a79d2 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt | |||
@@ -12,22 +12,30 @@ Required properties: | |||
12 | "allwinner,sun4i-axi-clk" - for the AXI clock | 12 | "allwinner,sun4i-axi-clk" - for the AXI clock |
13 | "allwinner,sun4i-axi-gates-clk" - for the AXI gates | 13 | "allwinner,sun4i-axi-gates-clk" - for the AXI gates |
14 | "allwinner,sun4i-ahb-clk" - for the AHB clock | 14 | "allwinner,sun4i-ahb-clk" - for the AHB clock |
15 | "allwinner,sun4i-ahb-gates-clk" - for the AHB gates | 15 | "allwinner,sun4i-ahb-gates-clk" - for the AHB gates on A10 |
16 | "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13 | ||
16 | "allwinner,sun4i-apb0-clk" - for the APB0 clock | 17 | "allwinner,sun4i-apb0-clk" - for the APB0 clock |
17 | "allwinner,sun4i-apb0-gates-clk" - for the APB0 gates | 18 | "allwinner,sun4i-apb0-gates-clk" - for the APB0 gates on A10 |
19 | "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 | ||
18 | "allwinner,sun4i-apb1-clk" - for the APB1 clock | 20 | "allwinner,sun4i-apb1-clk" - for the APB1 clock |
19 | "allwinner,sun4i-apb1-mux-clk" - for the APB1 clock muxing | 21 | "allwinner,sun4i-apb1-mux-clk" - for the APB1 clock muxing |
20 | "allwinner,sun4i-apb1-gates-clk" - for the APB1 gates | 22 | "allwinner,sun4i-apb1-gates-clk" - for the APB1 gates on A10 |
23 | "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13 | ||
21 | 24 | ||
22 | Required properties for all clocks: | 25 | Required properties for all clocks: |
23 | - reg : shall be the control register address for the clock. | 26 | - reg : shall be the control register address for the clock. |
24 | - clocks : shall be the input parent clock(s) phandle for the clock | 27 | - clocks : shall be the input parent clock(s) phandle for the clock |
25 | - #clock-cells : from common clock binding; shall be set to 0 except for | 28 | - #clock-cells : from common clock binding; shall be set to 0 except for |
26 | "allwinner,sun4i-*-gates-clk" where it shall be set to 1 | 29 | "allwinner,*-gates-clk" where it shall be set to 1 |
27 | 30 | ||
28 | Additionally, "allwinner,sun4i-*-gates-clk" clocks require: | 31 | Additionally, "allwinner,*-gates-clk" clocks require: |
29 | - clock-output-names : the corresponding gate names that the clock controls | 32 | - clock-output-names : the corresponding gate names that the clock controls |
30 | 33 | ||
34 | Clock consumers should specify the desired clocks they use with a | ||
35 | "clocks" phandle cell. Consumers that are using a gated clock should | ||
36 | provide an additional ID in their clock property. The values of this | ||
37 | ID are documented in sunxi/<soc>-gates.txt. | ||
38 | |||
31 | For example: | 39 | For example: |
32 | 40 | ||
33 | osc24M: osc24M@01c20050 { | 41 | osc24M: osc24M@01c20050 { |
@@ -50,102 +58,3 @@ cpu: cpu@01c20054 { | |||
50 | reg = <0x01c20054 0x4>; | 58 | reg = <0x01c20054 0x4>; |
51 | clocks = <&osc32k>, <&osc24M>, <&pll1>; | 59 | clocks = <&osc32k>, <&osc24M>, <&pll1>; |
52 | }; | 60 | }; |
53 | |||
54 | |||
55 | |||
56 | Gate clock outputs | ||
57 | |||
58 | The "allwinner,sun4i-*-gates-clk" clocks provide several gatable outputs; | ||
59 | their corresponding offsets as present on sun4i are listed below. Note that | ||
60 | some of these gates are not present on sun5i. | ||
61 | |||
62 | * AXI gates ("allwinner,sun4i-axi-gates-clk") | ||
63 | |||
64 | DRAM 0 | ||
65 | |||
66 | * AHB gates ("allwinner,sun4i-ahb-gates-clk") | ||
67 | |||
68 | USB0 0 | ||
69 | EHCI0 1 | ||
70 | OHCI0 2* | ||
71 | EHCI1 3 | ||
72 | OHCI1 4* | ||
73 | SS 5 | ||
74 | DMA 6 | ||
75 | BIST 7 | ||
76 | MMC0 8 | ||
77 | MMC1 9 | ||
78 | MMC2 10 | ||
79 | MMC3 11 | ||
80 | MS 12** | ||
81 | NAND 13 | ||
82 | SDRAM 14 | ||
83 | |||
84 | ACE 16 | ||
85 | EMAC 17 | ||
86 | TS 18 | ||
87 | |||
88 | SPI0 20 | ||
89 | SPI1 21 | ||
90 | SPI2 22 | ||
91 | SPI3 23 | ||
92 | PATA 24 | ||
93 | SATA 25** | ||
94 | GPS 26* | ||
95 | |||
96 | VE 32 | ||
97 | TVD 33 | ||
98 | TVE0 34 | ||
99 | TVE1 35 | ||
100 | LCD0 36 | ||
101 | LCD1 37 | ||
102 | |||
103 | CSI0 40 | ||
104 | CSI1 41 | ||
105 | |||
106 | HDMI 43 | ||
107 | DE_BE0 44 | ||
108 | DE_BE1 45 | ||
109 | DE_FE0 46 | ||
110 | DE_FE1 47 | ||
111 | |||
112 | MP 50 | ||
113 | |||
114 | MALI400 52 | ||
115 | |||
116 | * APB0 gates ("allwinner,sun4i-apb0-gates-clk") | ||
117 | |||
118 | CODEC 0 | ||
119 | SPDIF 1* | ||
120 | AC97 2 | ||
121 | IIS 3 | ||
122 | |||
123 | PIO 5 | ||
124 | IR0 6 | ||
125 | IR1 7 | ||
126 | |||
127 | KEYPAD 10 | ||
128 | |||
129 | * APB1 gates ("allwinner,sun4i-apb1-gates-clk") | ||
130 | |||
131 | I2C0 0 | ||
132 | I2C1 1 | ||
133 | I2C2 2 | ||
134 | |||
135 | CAN 4 | ||
136 | SCR 5 | ||
137 | PS20 6 | ||
138 | PS21 7 | ||
139 | |||
140 | UART0 16 | ||
141 | UART1 17 | ||
142 | UART2 18 | ||
143 | UART3 19 | ||
144 | UART4 20 | ||
145 | UART5 21 | ||
146 | UART6 22 | ||
147 | UART7 23 | ||
148 | |||
149 | Notation: | ||
150 | [*]: The datasheet didn't mention these, but they are present on AW code | ||
151 | [**]: The datasheet had this marked as "NC" but they are used on AW code | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt new file mode 100644 index 000000000000..6a03475bbfe2 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | Gate clock outputs | ||
2 | ------------------ | ||
3 | |||
4 | * AXI gates ("allwinner,sun4i-axi-gates-clk") | ||
5 | |||
6 | DRAM 0 | ||
7 | |||
8 | * AHB gates ("allwinner,sun4i-ahb-gates-clk") | ||
9 | |||
10 | USB0 0 | ||
11 | EHCI0 1 | ||
12 | OHCI0 2* | ||
13 | EHCI1 3 | ||
14 | OHCI1 4* | ||
15 | SS 5 | ||
16 | DMA 6 | ||
17 | BIST 7 | ||
18 | MMC0 8 | ||
19 | MMC1 9 | ||
20 | MMC2 10 | ||
21 | MMC3 11 | ||
22 | MS 12** | ||
23 | NAND 13 | ||
24 | SDRAM 14 | ||
25 | |||
26 | ACE 16 | ||
27 | EMAC 17 | ||
28 | TS 18 | ||
29 | |||
30 | SPI0 20 | ||
31 | SPI1 21 | ||
32 | SPI2 22 | ||
33 | SPI3 23 | ||
34 | PATA 24 | ||
35 | SATA 25** | ||
36 | GPS 26* | ||
37 | |||
38 | VE 32 | ||
39 | TVD 33 | ||
40 | TVE0 34 | ||
41 | TVE1 35 | ||
42 | LCD0 36 | ||
43 | LCD1 37 | ||
44 | |||
45 | CSI0 40 | ||
46 | CSI1 41 | ||
47 | |||
48 | HDMI 43 | ||
49 | DE_BE0 44 | ||
50 | DE_BE1 45 | ||
51 | DE_FE1 46 | ||
52 | DE_FE1 47 | ||
53 | |||
54 | MP 50 | ||
55 | |||
56 | MALI400 52 | ||
57 | |||
58 | * APB0 gates ("allwinner,sun4i-apb0-gates-clk") | ||
59 | |||
60 | CODEC 0 | ||
61 | SPDIF 1* | ||
62 | AC97 2 | ||
63 | IIS 3 | ||
64 | |||
65 | PIO 5 | ||
66 | IR0 6 | ||
67 | IR1 7 | ||
68 | |||
69 | KEYPAD 10 | ||
70 | |||
71 | * APB1 gates ("allwinner,sun4i-apb1-gates-clk") | ||
72 | |||
73 | I2C0 0 | ||
74 | I2C1 1 | ||
75 | I2C2 2 | ||
76 | |||
77 | CAN 4 | ||
78 | SCR 5 | ||
79 | PS20 6 | ||
80 | PS21 7 | ||
81 | |||
82 | UART0 16 | ||
83 | UART1 17 | ||
84 | UART2 18 | ||
85 | UART3 19 | ||
86 | UART4 20 | ||
87 | UART5 21 | ||
88 | UART6 22 | ||
89 | UART7 23 | ||
90 | |||
91 | Notation: | ||
92 | [*]: The datasheet didn't mention these, but they are present on AW code | ||
93 | [**]: The datasheet had this marked as "NC" but they are used on AW code | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt new file mode 100644 index 000000000000..006b6dfc4703 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | Gate clock outputs | ||
2 | ------------------ | ||
3 | |||
4 | * AXI gates ("allwinner,sun4i-axi-gates-clk") | ||
5 | |||
6 | DRAM 0 | ||
7 | |||
8 | * AHB gates ("allwinner,sun5i-a13-ahb-gates-clk") | ||
9 | |||
10 | USBOTG 0 | ||
11 | EHCI 1 | ||
12 | OHCI 2 | ||
13 | |||
14 | SS 5 | ||
15 | DMA 6 | ||
16 | BIST 7 | ||
17 | MMC0 8 | ||
18 | MMC1 9 | ||
19 | MMC2 10 | ||
20 | |||
21 | NAND 13 | ||
22 | SDRAM 14 | ||
23 | |||
24 | SPI0 20 | ||
25 | SPI1 21 | ||
26 | SPI2 22 | ||
27 | |||
28 | STIMER 28 | ||
29 | |||
30 | VE 32 | ||
31 | |||
32 | LCD 36 | ||
33 | |||
34 | CSI 40 | ||
35 | |||
36 | DE_BE 44 | ||
37 | |||
38 | DE_FE 46 | ||
39 | |||
40 | IEP 51 | ||
41 | MALI400 52 | ||
42 | |||
43 | * APB0 gates ("allwinner,sun5i-a13-apb0-gates-clk") | ||
44 | |||
45 | CODEC 0 | ||
46 | |||
47 | PIO 5 | ||
48 | IR 6 | ||
49 | |||
50 | * APB1 gates ("allwinner,sun5i-a13-apb1-gates-clk") | ||
51 | |||
52 | I2C0 0 | ||
53 | I2C1 1 | ||
54 | I2C2 2 | ||
55 | |||
56 | UART1 17 | ||
57 | |||
58 | UART3 19 | ||
diff --git a/Documentation/devicetree/bindings/clock/vf610-clock.txt b/Documentation/devicetree/bindings/clock/vf610-clock.txt new file mode 100644 index 000000000000..c80863d344ac --- /dev/null +++ b/Documentation/devicetree/bindings/clock/vf610-clock.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | * Clock bindings for Freescale Vybrid VF610 SOC | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "fsl,vf610-ccm" | ||
5 | - reg: Address and length of the register set | ||
6 | - #clock-cells: Should be <1> | ||
7 | |||
8 | The clock consumer should specify the desired clock by having the clock | ||
9 | ID in its "clocks" phandle cell. See include/dt-bindings/clock/vf610-clock.h | ||
10 | for the full list of VF610 clock IDs. | ||
11 | |||
12 | Examples: | ||
13 | |||
14 | clks: ccm@4006b000 { | ||
15 | compatible = "fsl,vf610-ccm"; | ||
16 | reg = <0x4006b000 0x1000>; | ||
17 | #clock-cells = <1>; | ||
18 | }; | ||
19 | |||
20 | uart1: serial@40028000 { | ||
21 | compatible = "fsl,vf610-uart"; | ||
22 | reg = <0x40028000 0x1000>; | ||
23 | interrupts = <0 62 0x04>; | ||
24 | clocks = <&clks VF610_CLK_UART1>; | ||
25 | clock-names = "ipg"; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/vt8500.txt b/Documentation/devicetree/bindings/clock/vt8500.txt index a880c70d0047..91d71cc0314a 100644 --- a/Documentation/devicetree/bindings/clock/vt8500.txt +++ b/Documentation/devicetree/bindings/clock/vt8500.txt | |||
@@ -8,6 +8,8 @@ Required properties: | |||
8 | - compatible : shall be one of the following: | 8 | - compatible : shall be one of the following: |
9 | "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock | 9 | "via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock |
10 | "wm,wm8650-pll-clock" - for a WM8650 PLL clock | 10 | "wm,wm8650-pll-clock" - for a WM8650 PLL clock |
11 | "wm,wm8750-pll-clock" - for a WM8750 PLL clock | ||
12 | "wm,wm8850-pll-clock" - for a WM8850 PLL clock | ||
11 | "via,vt8500-device-clock" - for a VT/WM device clock | 13 | "via,vt8500-device-clock" - for a VT/WM device clock |
12 | 14 | ||
13 | Required properties for PLL clocks: | 15 | Required properties for PLL clocks: |
diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt index 23ae1db1bc13..d99af878f5d7 100644 --- a/Documentation/devicetree/bindings/clock/zynq-7000.txt +++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt | |||
@@ -6,50 +6,99 @@ The purpose of this document is to document their usage. | |||
6 | See clock_bindings.txt for more information on the generic clock bindings. | 6 | See clock_bindings.txt for more information on the generic clock bindings. |
7 | See Chapter 25 of Zynq TRM for more information about Zynq clocks. | 7 | See Chapter 25 of Zynq TRM for more information about Zynq clocks. |
8 | 8 | ||
9 | == PLLs == | 9 | == Clock Controller == |
10 | 10 | The clock controller is a logical abstraction of Zynq's clock tree. It reads | |
11 | Used to describe the ARM_PLL, DDR_PLL, and IO_PLL. | 11 | required input clock frequencies from the devicetree and acts as clock provider |
12 | for all clock consumers of PS clocks. | ||
12 | 13 | ||
13 | Required properties: | 14 | Required properties: |
14 | - #clock-cells : shall be 0 (only one clock is output from this node) | 15 | - #clock-cells : Must be 1 |
15 | - compatible : "xlnx,zynq-pll" | 16 | - compatible : "xlnx,ps7-clkc" |
16 | - reg : pair of u32 values, which are the address offsets within the SLCR | 17 | - ps-clk-frequency : Frequency of the oscillator providing ps_clk in HZ |
17 | of the relevant PLL_CTRL register and PLL_CFG register respectively | 18 | (usually 33 MHz oscillators are used for Zynq platforms) |
18 | - clocks : phandle for parent clock. should be the phandle for ps_clk | 19 | - clock-output-names : List of strings used to name the clock outputs. Shall be |
20 | a list of the outputs given below. | ||
19 | 21 | ||
20 | Optional properties: | 22 | Optional properties: |
21 | - clock-output-names : name of the output clock | 23 | - clocks : as described in the clock bindings |
22 | 24 | - clock-names : as described in the clock bindings | |
23 | Example: | ||
24 | armpll: armpll { | ||
25 | #clock-cells = <0>; | ||
26 | compatible = "xlnx,zynq-pll"; | ||
27 | clocks = <&ps_clk>; | ||
28 | reg = <0x100 0x110>; | ||
29 | clock-output-names = "armpll"; | ||
30 | }; | ||
31 | |||
32 | == Peripheral clocks == | ||
33 | 25 | ||
34 | Describes clock node for the SDIO, SMC, SPI, QSPI, and UART clocks. | 26 | Clock inputs: |
27 | The following strings are optional parameters to the 'clock-names' property in | ||
28 | order to provide an optional (E)MIO clock source. | ||
29 | - swdt_ext_clk | ||
30 | - gem0_emio_clk | ||
31 | - gem1_emio_clk | ||
32 | - mio_clk_XX # with XX = 00..53 | ||
33 | ... | ||
35 | 34 | ||
36 | Required properties: | 35 | Clock outputs: |
37 | - #clock-cells : shall be 1 | 36 | 0: armpll |
38 | - compatible : "xlnx,zynq-periph-clock" | 37 | 1: ddrpll |
39 | - reg : a single u32 value, describing the offset within the SLCR where | 38 | 2: iopll |
40 | the CLK_CTRL register is found for this peripheral | 39 | 3: cpu_6or4x |
41 | - clocks : phandle for parent clocks. should hold phandles for | 40 | 4: cpu_3or2x |
42 | the IO_PLL, ARM_PLL, and DDR_PLL in order | 41 | 5: cpu_2x |
43 | - clock-output-names : names of the output clock(s). For peripherals that have | 42 | 6: cpu_1x |
44 | two output clocks (for example, the UART), two clocks | 43 | 7: ddr2x |
45 | should be listed. | 44 | 8: ddr3x |
45 | 9: dci | ||
46 | 10: lqspi | ||
47 | 11: smc | ||
48 | 12: pcap | ||
49 | 13: gem0 | ||
50 | 14: gem1 | ||
51 | 15: fclk0 | ||
52 | 16: fclk1 | ||
53 | 17: fclk2 | ||
54 | 18: fclk3 | ||
55 | 19: can0 | ||
56 | 20: can1 | ||
57 | 21: sdio0 | ||
58 | 22: sdio1 | ||
59 | 23: uart0 | ||
60 | 24: uart1 | ||
61 | 25: spi0 | ||
62 | 26: spi1 | ||
63 | 27: dma | ||
64 | 28: usb0_aper | ||
65 | 29: usb1_aper | ||
66 | 30: gem0_aper | ||
67 | 31: gem1_aper | ||
68 | 32: sdio0_aper | ||
69 | 33: sdio1_aper | ||
70 | 34: spi0_aper | ||
71 | 35: spi1_aper | ||
72 | 36: can0_aper | ||
73 | 37: can1_aper | ||
74 | 38: i2c0_aper | ||
75 | 39: i2c1_aper | ||
76 | 40: uart0_aper | ||
77 | 41: uart1_aper | ||
78 | 42: gpio_aper | ||
79 | 43: lqspi_aper | ||
80 | 44: smc_aper | ||
81 | 45: swdt | ||
82 | 46: dbg_trc | ||
83 | 47: dbg_apb | ||
46 | 84 | ||
47 | Example: | 85 | Example: |
48 | uart_clk: uart_clk { | 86 | clkc: clkc { |
49 | #clock-cells = <1>; | 87 | #clock-cells = <1>; |
50 | compatible = "xlnx,zynq-periph-clock"; | 88 | compatible = "xlnx,ps7-clkc"; |
51 | clocks = <&iopll &armpll &ddrpll>; | 89 | ps-clk-frequency = <33333333>; |
52 | reg = <0x154>; | 90 | clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", |
53 | clock-output-names = "uart0_ref_clk", | 91 | "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", |
54 | "uart1_ref_clk"; | 92 | "dci", "lqspi", "smc", "pcap", "gem0", "gem1", |
93 | "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1", | ||
94 | "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1", | ||
95 | "dma", "usb0_aper", "usb1_aper", "gem0_aper", | ||
96 | "gem1_aper", "sdio0_aper", "sdio1_aper", | ||
97 | "spi0_aper", "spi1_aper", "can0_aper", "can1_aper", | ||
98 | "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper", | ||
99 | "gpio_aper", "lqspi_aper", "smc_aper", "swdt", | ||
100 | "dbg_trc", "dbg_apb"; | ||
101 | # optional props | ||
102 | clocks = <&clkc 16>, <&clk_foo>; | ||
103 | clock-names = "gem1_emio_clk", "can_mio_clk_23"; | ||
55 | }; | 104 | }; |
diff --git a/Documentation/devicetree/bindings/dma/atmel-dma.txt b/Documentation/devicetree/bindings/dma/atmel-dma.txt index c80e8a3402f0..c280a0e6f42d 100644 --- a/Documentation/devicetree/bindings/dma/atmel-dma.txt +++ b/Documentation/devicetree/bindings/dma/atmel-dma.txt | |||
@@ -24,8 +24,11 @@ The three cells in order are: | |||
24 | 1. A phandle pointing to the DMA controller. | 24 | 1. A phandle pointing to the DMA controller. |
25 | 2. The memory interface (16 most significant bits), the peripheral interface | 25 | 2. The memory interface (16 most significant bits), the peripheral interface |
26 | (16 less significant bits). | 26 | (16 less significant bits). |
27 | 3. The peripheral identifier for the hardware handshaking interface. The | 27 | 3. Parameters for the at91 DMA configuration register which are device |
28 | identifier can be different for tx and rx. | 28 | dependant: |
29 | - bit 7-0: peripheral identifier for the hardware handshaking interface. The | ||
30 | identifier can be different for tx and rx. | ||
31 | - bit 11-8: FIFO configuration. 0 for half FIFO, 1 for ALAP, 1 for ASAP. | ||
29 | 32 | ||
30 | Example: | 33 | Example: |
31 | 34 | ||
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt new file mode 100644 index 000000000000..2717ecb47db9 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | * Freescale Direct Memory Access (DMA) Controller for i.MX | ||
2 | |||
3 | This document will only describe differences to the generic DMA Controller and | ||
4 | DMA request bindings as described in dma/dma.txt . | ||
5 | |||
6 | * DMA controller | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Should be "fsl,<chip>-dma". chip can be imx1, imx21 or imx27 | ||
10 | - reg : Should contain DMA registers location and length | ||
11 | - interrupts : First item should be DMA interrupt, second one is optional and | ||
12 | should contain DMA Error interrupt | ||
13 | - #dma-cells : Has to be 1. imx-dma does not support anything else. | ||
14 | |||
15 | Optional properties: | ||
16 | - #dma-channels : Number of DMA channels supported. Should be 16. | ||
17 | - #dma-requests : Number of DMA requests supported. | ||
18 | |||
19 | Example: | ||
20 | |||
21 | dma: dma@10001000 { | ||
22 | compatible = "fsl,imx27-dma"; | ||
23 | reg = <0x10001000 0x1000>; | ||
24 | interrupts = <32 33>; | ||
25 | #dma-cells = <1>; | ||
26 | #dma-channels = <16>; | ||
27 | }; | ||
28 | |||
29 | |||
30 | * DMA client | ||
31 | |||
32 | Clients have to specify the DMA requests with phandles in a list. | ||
33 | |||
34 | Required properties: | ||
35 | - dmas: List of one or more DMA request specifiers. One DMA request specifier | ||
36 | consists of a phandle to the DMA controller followed by the integer | ||
37 | specifiying the request line. | ||
38 | - dma-names: List of string identifiers for the DMA requests. For the correct | ||
39 | names, have a look at the specific client driver. | ||
40 | |||
41 | Example: | ||
42 | |||
43 | sdhci1: sdhci@10013000 { | ||
44 | ... | ||
45 | dmas = <&dma 7>; | ||
46 | dma-names = "rx-tx"; | ||
47 | ... | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt index d1e3f443e205..68cee4f5539f 100644 --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | |||
@@ -4,14 +4,70 @@ Required properties: | |||
4 | - compatible : Should be "fsl,<chip>-sdma" | 4 | - compatible : Should be "fsl,<chip>-sdma" |
5 | - reg : Should contain SDMA registers location and length | 5 | - reg : Should contain SDMA registers location and length |
6 | - interrupts : Should contain SDMA interrupt | 6 | - interrupts : Should contain SDMA interrupt |
7 | - #dma-cells : Must be <3>. | ||
8 | The first cell specifies the DMA request/event ID. See details below | ||
9 | about the second and third cell. | ||
7 | - fsl,sdma-ram-script-name : Should contain the full path of SDMA RAM | 10 | - fsl,sdma-ram-script-name : Should contain the full path of SDMA RAM |
8 | scripts firmware | 11 | scripts firmware |
9 | 12 | ||
13 | The second cell of dma phandle specifies the peripheral type of DMA transfer. | ||
14 | The full ID of peripheral types can be found below. | ||
15 | |||
16 | ID transfer type | ||
17 | --------------------- | ||
18 | 0 MCU domain SSI | ||
19 | 1 Shared SSI | ||
20 | 2 MMC | ||
21 | 3 SDHC | ||
22 | 4 MCU domain UART | ||
23 | 5 Shared UART | ||
24 | 6 FIRI | ||
25 | 7 MCU domain CSPI | ||
26 | 8 Shared CSPI | ||
27 | 9 SIM | ||
28 | 10 ATA | ||
29 | 11 CCM | ||
30 | 12 External peripheral | ||
31 | 13 Memory Stick Host Controller | ||
32 | 14 Shared Memory Stick Host Controller | ||
33 | 15 DSP | ||
34 | 16 Memory | ||
35 | 17 FIFO type Memory | ||
36 | 18 SPDIF | ||
37 | 19 IPU Memory | ||
38 | 20 ASRC | ||
39 | 21 ESAI | ||
40 | |||
41 | The third cell specifies the transfer priority as below. | ||
42 | |||
43 | ID transfer priority | ||
44 | ------------------------- | ||
45 | 0 High | ||
46 | 1 Medium | ||
47 | 2 Low | ||
48 | |||
10 | Examples: | 49 | Examples: |
11 | 50 | ||
12 | sdma@83fb0000 { | 51 | sdma@83fb0000 { |
13 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; | 52 | compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; |
14 | reg = <0x83fb0000 0x4000>; | 53 | reg = <0x83fb0000 0x4000>; |
15 | interrupts = <6>; | 54 | interrupts = <6>; |
55 | #dma-cells = <3>; | ||
16 | fsl,sdma-ram-script-name = "sdma-imx51.bin"; | 56 | fsl,sdma-ram-script-name = "sdma-imx51.bin"; |
17 | }; | 57 | }; |
58 | |||
59 | DMA clients connected to the i.MX SDMA controller must use the format | ||
60 | described in the dma.txt file. | ||
61 | |||
62 | Examples: | ||
63 | |||
64 | ssi2: ssi@70014000 { | ||
65 | compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; | ||
66 | reg = <0x70014000 0x4000>; | ||
67 | interrupts = <30>; | ||
68 | clocks = <&clks 49>; | ||
69 | dmas = <&sdma 24 1 0>, | ||
70 | <&sdma 25 1 0>; | ||
71 | dma-names = "rx", "tx"; | ||
72 | fsl,fifo-depth = <15>; | ||
73 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/shdma.txt b/Documentation/devicetree/bindings/dma/shdma.txt new file mode 100644 index 000000000000..c15994aa1939 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/shdma.txt | |||
@@ -0,0 +1,75 @@ | |||
1 | * SHDMA Device Tree bindings | ||
2 | |||
3 | Sh-/r-mobile and r-car systems often have multiple identical DMA controller | ||
4 | instances, capable of serving any of a common set of DMA slave devices, using | ||
5 | the same configuration. To describe this topology we require all compatible | ||
6 | SHDMA DT nodes to be placed under a DMA multiplexer node. All such compatible | ||
7 | DMAC instances have the same number of channels and use the same DMA | ||
8 | descriptors. Therefore respective DMA DT bindings can also all be placed in the | ||
9 | multiplexer node. Even if there is only one such DMAC instance on a system, it | ||
10 | still has to be placed under such a multiplexer node. | ||
11 | |||
12 | * DMA multiplexer | ||
13 | |||
14 | Required properties: | ||
15 | - compatible: should be "renesas,shdma-mux" | ||
16 | - #dma-cells: should be <1>, see "dmas" property below | ||
17 | |||
18 | Optional properties (currently unused): | ||
19 | - dma-channels: number of DMA channels | ||
20 | - dma-requests: number of DMA request signals | ||
21 | |||
22 | * DMA controller | ||
23 | |||
24 | Required properties: | ||
25 | - compatible: should be "renesas,shdma" | ||
26 | |||
27 | Example: | ||
28 | dmac: dma-mux0 { | ||
29 | compatible = "renesas,shdma-mux"; | ||
30 | #dma-cells = <1>; | ||
31 | dma-channels = <6>; | ||
32 | dma-requests = <256>; | ||
33 | reg = <0 0>; /* Needed for AUXDATA */ | ||
34 | #address-cells = <1>; | ||
35 | #size-cells = <1>; | ||
36 | ranges; | ||
37 | |||
38 | dma0: shdma@fe008020 { | ||
39 | compatible = "renesas,shdma"; | ||
40 | reg = <0xfe008020 0x270>, | ||
41 | <0xfe009000 0xc>; | ||
42 | interrupt-parent = <&gic>; | ||
43 | interrupts = <0 34 4 | ||
44 | 0 28 4 | ||
45 | 0 29 4 | ||
46 | 0 30 4 | ||
47 | 0 31 4 | ||
48 | 0 32 4 | ||
49 | 0 33 4>; | ||
50 | interrupt-names = "error", | ||
51 | "ch0", "ch1", "ch2", "ch3", | ||
52 | "ch4", "ch5"; | ||
53 | }; | ||
54 | |||
55 | dma1: shdma@fe018020 { | ||
56 | ... | ||
57 | }; | ||
58 | |||
59 | dma2: shdma@fe028020 { | ||
60 | ... | ||
61 | }; | ||
62 | }; | ||
63 | |||
64 | * DMA client | ||
65 | |||
66 | Required properties: | ||
67 | - dmas: a list of <[DMA multiplexer phandle] [MID/RID value]> pairs, | ||
68 | where MID/RID values are fixed handles, specified in the SoC | ||
69 | manual | ||
70 | - dma-names: a list of DMA channel names, one per "dmas" entry | ||
71 | |||
72 | Example: | ||
73 | dmas = <&dmac 0xd1 | ||
74 | &dmac 0xd2>; | ||
75 | dma-names = "tx", "rx"; | ||
diff --git a/Documentation/devicetree/bindings/dma/ste-coh901318.txt b/Documentation/devicetree/bindings/dma/ste-coh901318.txt new file mode 100644 index 000000000000..091ad057e9cf --- /dev/null +++ b/Documentation/devicetree/bindings/dma/ste-coh901318.txt | |||
@@ -0,0 +1,32 @@ | |||
1 | ST-Ericsson COH 901 318 DMA Controller | ||
2 | |||
3 | This is a DMA controller which has begun as a fork of the | ||
4 | ARM PL08x PrimeCell VHDL code. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should be "stericsson,coh901318" | ||
8 | - reg: register locations and length | ||
9 | - interrupts: the single DMA IRQ | ||
10 | - #dma-cells: must be set to <1>, as the channels on the | ||
11 | COH 901 318 are simple and identified by a single number | ||
12 | - dma-channels: the number of DMA channels handled | ||
13 | |||
14 | Example: | ||
15 | |||
16 | dmac: dma-controller@c00020000 { | ||
17 | compatible = "stericsson,coh901318"; | ||
18 | reg = <0xc0020000 0x1000>; | ||
19 | interrupt-parent = <&vica>; | ||
20 | interrupts = <2>; | ||
21 | #dma-cells = <1>; | ||
22 | dma-channels = <40>; | ||
23 | }; | ||
24 | |||
25 | Consumers example: | ||
26 | |||
27 | uart0: serial@c0013000 { | ||
28 | compatible = "..."; | ||
29 | (...) | ||
30 | dmas = <&dmac 17 &dmac 18>; | ||
31 | dma-names = "tx", "rx"; | ||
32 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/ste-dma40.txt b/Documentation/devicetree/bindings/dma/ste-dma40.txt new file mode 100644 index 000000000000..bea5b73a7390 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/ste-dma40.txt | |||
@@ -0,0 +1,66 @@ | |||
1 | * DMA40 DMA Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "stericsson,dma40" | ||
5 | - reg: Address range of the DMAC registers | ||
6 | - reg-names: Names of the above areas to use during resource look-up | ||
7 | - interrupt: Should contain the DMAC interrupt number | ||
8 | - #dma-cells: must be <3> | ||
9 | - memcpy-channels: Channels to be used for memcpy | ||
10 | |||
11 | Optional properties: | ||
12 | - dma-channels: Number of channels supported by hardware - if not present | ||
13 | the driver will attempt to obtain the information from H/W | ||
14 | - disabled-channels: Channels which can not be used | ||
15 | |||
16 | Example: | ||
17 | |||
18 | dma: dma-controller@801C0000 { | ||
19 | compatible = "stericsson,db8500-dma40", "stericsson,dma40"; | ||
20 | reg = <0x801C0000 0x1000 0x40010000 0x800>; | ||
21 | reg-names = "base", "lcpa"; | ||
22 | interrupt-parent = <&intc>; | ||
23 | interrupts = <0 25 0x4>; | ||
24 | |||
25 | #dma-cells = <2>; | ||
26 | memcpy-channels = <56 57 58 59 60>; | ||
27 | disabled-channels = <12>; | ||
28 | dma-channels = <8>; | ||
29 | }; | ||
30 | |||
31 | Clients | ||
32 | Required properties: | ||
33 | - dmas: Comma separated list of dma channel requests | ||
34 | - dma-names: Names of the aforementioned requested channels | ||
35 | |||
36 | Each dmas request consists of 4 cells: | ||
37 | 1. A phandle pointing to the DMA controller | ||
38 | 2. Device Type | ||
39 | 3. The DMA request line number (only when 'use fixed channel' is set) | ||
40 | 4. A 32bit mask specifying; mode, direction and endianess [NB: This list will grow] | ||
41 | 0x00000001: Mode: | ||
42 | Logical channel when unset | ||
43 | Physical channel when set | ||
44 | 0x00000002: Direction: | ||
45 | Memory to Device when unset | ||
46 | Device to Memory when set | ||
47 | 0x00000004: Endianess: | ||
48 | Little endian when unset | ||
49 | Big endian when set | ||
50 | 0x00000008: Use fixed channel: | ||
51 | Use automatic channel selection when unset | ||
52 | Use DMA request line number when set | ||
53 | |||
54 | Example: | ||
55 | |||
56 | uart@80120000 { | ||
57 | compatible = "arm,pl011", "arm,primecell"; | ||
58 | reg = <0x80120000 0x1000>; | ||
59 | interrupts = <0 11 0x4>; | ||
60 | |||
61 | dmas = <&dma 13 0 0x2>, /* Logical - DevToMem */ | ||
62 | <&dma 13 0 0x0>; /* Logical - MemToDev */ | ||
63 | dma-names = "rx", "rx"; | ||
64 | |||
65 | status = "disabled"; | ||
66 | }; | ||
diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt new file mode 100644 index 000000000000..9fbbdb783a72 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/ti-edma.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | TI EDMA | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "ti,edma3" | ||
5 | - ti,edma-regions: Number of regions | ||
6 | - ti,edma-slots: Number of slots | ||
7 | - #dma-cells: Should be set to <1> | ||
8 | Clients should use a single channel number per DMA request. | ||
9 | - dma-channels: Specify total DMA channels per CC | ||
10 | - reg: Memory map for accessing module | ||
11 | - interrupt-parent: Interrupt controller the interrupt is routed through | ||
12 | - interrupts: Exactly 3 interrupts need to be specified in the order: | ||
13 | 1. Transfer completion interrupt. | ||
14 | 2. Memory protection interrupt. | ||
15 | 3. Error interrupt. | ||
16 | Optional properties: | ||
17 | - ti,hwmods: Name of the hwmods associated to the EDMA | ||
18 | - ti,edma-xbar-event-map: Crossbar event to channel map | ||
19 | |||
20 | Example: | ||
21 | |||
22 | edma: edma@49000000 { | ||
23 | reg = <0x49000000 0x10000>; | ||
24 | interrupt-parent = <&intc>; | ||
25 | interrupts = <12 13 14>; | ||
26 | compatible = "ti,edma3"; | ||
27 | ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; | ||
28 | #dma-cells = <1>; | ||
29 | dma-channels = <64>; | ||
30 | ti,edma-regions = <4>; | ||
31 | ti,edma-slots = <256>; | ||
32 | ti,edma-xbar-event-map = <1 12 | ||
33 | 2 13>; | ||
34 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt deleted file mode 100644 index fa166d945809..000000000000 --- a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | Device-Tree bindings for hdmiddc driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be "samsung,exynos5-hdmiddc". | ||
5 | - reg: I2C address of the hdmiddc device. | ||
6 | |||
7 | Example: | ||
8 | |||
9 | hdmiddc { | ||
10 | compatible = "samsung,exynos5-hdmiddc"; | ||
11 | reg = <0x50>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt deleted file mode 100644 index 858f4f9b902f..000000000000 --- a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | Device-Tree bindings for hdmiphy driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be "samsung,exynos5-hdmiphy". | ||
5 | - reg: I2C address of the hdmiphy device. | ||
6 | |||
7 | Example: | ||
8 | |||
9 | hdmiphy { | ||
10 | compatible = "samsung,exynos5-hdmiphy"; | ||
11 | reg = <0x38>; | ||
12 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt b/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt index e5f130159ae1..fff10da5e927 100644 --- a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt +++ b/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt | |||
@@ -10,6 +10,14 @@ Recommended properties: | |||
10 | services interrupts for this device. | 10 | services interrupts for this device. |
11 | - ti,hwmods: Name of the hwmod associated to the LCDC | 11 | - ti,hwmods: Name of the hwmod associated to the LCDC |
12 | 12 | ||
13 | Optional properties: | ||
14 | - max-bandwidth: The maximum pixels per second that the memory | ||
15 | interface / lcd controller combination can sustain | ||
16 | - max-width: The maximum horizontal pixel width supported by | ||
17 | the lcd controller. | ||
18 | - max-pixelclock: The maximum pixel clock that can be supported | ||
19 | by the lcd controller in KHz. | ||
20 | |||
13 | Example: | 21 | Example: |
14 | 22 | ||
15 | fb: fb@4830e000 { | 23 | fb: fb@4830e000 { |
diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt new file mode 100644 index 000000000000..58f531ab4df3 --- /dev/null +++ b/Documentation/devicetree/bindings/extcon/extcon-twl.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | EXTCON FOR TWL CHIPS | ||
2 | |||
3 | PALMAS USB COMPARATOR | ||
4 | Required Properties: | ||
5 | - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" | ||
6 | - vbus-supply : phandle to the regulator device tree node. | ||
7 | |||
8 | Optional Properties: | ||
9 | - ti,wakeup : To enable the wakeup comparator in probe | ||
10 | |||
11 | palmas-usb { | ||
12 | compatible = "ti,twl6035-usb", "ti,palmas-usb"; | ||
13 | vbus-supply = <&smps10_reg>; | ||
14 | ti,wakeup; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt b/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt new file mode 100644 index 000000000000..e0d0446a6b78 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | Cirrus Logic CLPS711X GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "cirrus,clps711x-gpio" | ||
5 | - reg: Physical base GPIO controller registers location and length. | ||
6 | There should be two registers, first is DATA register, the second | ||
7 | is DIRECTION. | ||
8 | - gpio-controller: Marks the device node as a gpio controller. | ||
9 | - #gpio-cells: Should be two. The first cell is the pin number and | ||
10 | the second cell is used to specify the gpio polarity: | ||
11 | 0 = active high | ||
12 | 1 = active low | ||
13 | |||
14 | Note: Each GPIO port should have an alias correctly numbered in "aliases" | ||
15 | node. | ||
16 | |||
17 | Example: | ||
18 | |||
19 | aliases { | ||
20 | gpio0 = &porta; | ||
21 | }; | ||
22 | |||
23 | porta: gpio@80000000 { | ||
24 | compatible = "cirrus,clps711x-gpio"; | ||
25 | reg = <0x80000000 0x1>, <0x80000040 0x1>; | ||
26 | gpio-controller; | ||
27 | #gpio-cells = <2>; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-msm.txt b/Documentation/devicetree/bindings/gpio/gpio-msm.txt new file mode 100644 index 000000000000..ac20e68a004e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-msm.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | MSM GPIO controller bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: | ||
5 | - "qcom,msm-gpio" for MSM controllers | ||
6 | - #gpio-cells : Should be two. | ||
7 | - first cell is the pin number | ||
8 | - second cell is used to specify optional parameters (unused) | ||
9 | - gpio-controller : Marks the device node as a GPIO controller. | ||
10 | - #interrupt-cells : Should be 2. | ||
11 | - interrupt-controller: Mark the device node as an interrupt controller | ||
12 | - interrupts : Specify the TLMM summary interrupt number | ||
13 | - ngpio : Specify the number of MSM GPIOs | ||
14 | |||
15 | Example: | ||
16 | |||
17 | msmgpio: gpio@fd510000 { | ||
18 | compatible = "qcom,msm-gpio"; | ||
19 | gpio-controller; | ||
20 | #gpio-cells = <2>; | ||
21 | interrupt-controller; | ||
22 | #interrupt-cells = <2>; | ||
23 | reg = <0xfd510000 0x4000>; | ||
24 | interrupts = <0 208 0>; | ||
25 | ngpio = <150>; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt index f1e5dfecf55d..5375625e8cd2 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt | |||
@@ -39,46 +39,3 @@ Example: | |||
39 | #gpio-cells = <4>; | 39 | #gpio-cells = <4>; |
40 | gpio-controller; | 40 | gpio-controller; |
41 | }; | 41 | }; |
42 | |||
43 | |||
44 | Samsung S3C24XX GPIO Controller | ||
45 | |||
46 | Required properties: | ||
47 | - compatible: Compatible property value should be "samsung,s3c24xx-gpio". | ||
48 | |||
49 | - reg: Physical base address of the controller and length of memory mapped | ||
50 | region. | ||
51 | |||
52 | - #gpio-cells: Should be 3. The syntax of the gpio specifier used by client nodes | ||
53 | should be the following with values derived from the SoC user manual. | ||
54 | <[phandle of the gpio controller node] | ||
55 | [pin number within the gpio controller] | ||
56 | [mux function] | ||
57 | [flags and pull up/down] | ||
58 | |||
59 | Values for gpio specifier: | ||
60 | - Pin number: depending on the controller a number from 0 up to 15. | ||
61 | - Mux function: Depending on the SoC and the gpio bank the gpio can be set | ||
62 | as input, output or a special function | ||
63 | - Flags and Pull Up/Down: the values to use differ for the individual SoCs | ||
64 | example S3C2416/S3C2450: | ||
65 | 0 - Pull Up/Down Disabled. | ||
66 | 1 - Pull Down Enabled. | ||
67 | 2 - Pull Up Enabled. | ||
68 | Bit 16 (0x00010000) - Input is active low. | ||
69 | Consult the user manual for the correct values of Mux and Pull Up/Down. | ||
70 | |||
71 | - gpio-controller: Specifies that the node is a gpio controller. | ||
72 | - #address-cells: should be 1. | ||
73 | - #size-cells: should be 1. | ||
74 | |||
75 | Example: | ||
76 | |||
77 | gpa: gpio-controller@56000000 { | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <1>; | ||
80 | compatible = "samsung,s3c24xx-gpio"; | ||
81 | reg = <0x56000000 0x10>; | ||
82 | #gpio-cells = <3>; | ||
83 | gpio-controller; | ||
84 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt b/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt new file mode 100644 index 000000000000..fd665b44d767 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt | |||
@@ -0,0 +1,7 @@ | |||
1 | ST-Ericsson COH 901 571/3 GPIO controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Compatible property value should be "stericsson,gpio-coh901" | ||
5 | - reg: Physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: the 0...n interrupts assigned to the different GPIO ports/banks. | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-xilinx.txt b/Documentation/devicetree/bindings/gpio/gpio-xilinx.txt new file mode 100644 index 000000000000..63bf4becd5f0 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-xilinx.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | Xilinx plb/axi GPIO controller | ||
2 | |||
3 | Dual channel GPIO controller with configurable number of pins | ||
4 | (from 1 to 32 per channel). Every pin can be configured as | ||
5 | input/output/tristate. Both channels share the same global IRQ but | ||
6 | local interrupts can be enabled on channel basis. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Should be "xlnx,xps-gpio-1.00.a" | ||
10 | - reg : Address and length of the register set for the device | ||
11 | - #gpio-cells : Should be two. The first cell is the pin number and the | ||
12 | second cell is used to specify optional parameters (currently unused). | ||
13 | - gpio-controller : Marks the device node as a GPIO controller. | ||
14 | |||
15 | Optional properties: | ||
16 | - interrupts : Interrupt mapping for GPIO IRQ. | ||
17 | - interrupt-parent : Phandle for the interrupt controller that | ||
18 | services interrupts for this device. | ||
19 | - xlnx,all-inputs : if n-th bit is setup, GPIO-n is input | ||
20 | - xlnx,dout-default : if n-th bit is 1, GPIO-n default value is 1 | ||
21 | - xlnx,gpio-width : gpio width | ||
22 | - xlnx,tri-default : if n-th bit is 1, GPIO-n is in tristate mode | ||
23 | - xlnx,is-dual : if 1, controller also uses the second channel | ||
24 | - xlnx,all-inputs-2 : as above but for the second channel | ||
25 | - xlnx,dout-default-2 : as above but the second channel | ||
26 | - xlnx,gpio2-width : as above but for the second channel | ||
27 | - xlnx,tri-default-2 : as above but for the second channel | ||
28 | |||
29 | |||
30 | Example: | ||
31 | gpio: gpio@40000000 { | ||
32 | #gpio-cells = <2>; | ||
33 | compatible = "xlnx,xps-gpio-1.00.a"; | ||
34 | gpio-controller ; | ||
35 | interrupt-parent = <µblaze_0_intc>; | ||
36 | interrupts = < 6 2 >; | ||
37 | reg = < 0x40000000 0x10000 >; | ||
38 | xlnx,all-inputs = <0x0>; | ||
39 | xlnx,all-inputs-2 = <0x0>; | ||
40 | xlnx,dout-default = <0x0>; | ||
41 | xlnx,dout-default-2 = <0x0>; | ||
42 | xlnx,gpio-width = <0x2>; | ||
43 | xlnx,gpio2-width = <0x2>; | ||
44 | xlnx,interrupt-present = <0x1>; | ||
45 | xlnx,is-dual = <0x1>; | ||
46 | xlnx,tri-default = <0xffffffff>; | ||
47 | xlnx,tri-default-2 = <0xffffffff>; | ||
48 | } ; | ||
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt new file mode 100644 index 000000000000..cb3dc7bcd8e6 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | * Renesas R-Car GPIO Controller | ||
2 | |||
3 | Required Properties: | ||
4 | |||
5 | - compatible: should be one of the following. | ||
6 | - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller. | ||
7 | - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. | ||
8 | - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. | ||
9 | - "renesas,gpio-rcar": for generic R-Car GPIO controller. | ||
10 | |||
11 | - reg: Base address and length of each memory resource used by the GPIO | ||
12 | controller hardware module. | ||
13 | |||
14 | - interrupt-parent: phandle of the parent interrupt controller. | ||
15 | - interrupts: Interrupt specifier for the controllers interrupt. | ||
16 | |||
17 | - gpio-controller: Marks the device node as a gpio controller. | ||
18 | - #gpio-cells: Should be 2. The first cell is the GPIO number and the second | ||
19 | cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the | ||
20 | GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. | ||
21 | - gpio-ranges: Range of pins managed by the GPIO controller. | ||
22 | |||
23 | Please refer to gpio.txt in this directory for details of gpio-ranges property | ||
24 | and the common GPIO bindings used by client devices. | ||
25 | |||
26 | Example: R8A7779 (R-Car H1) GPIO controller nodes | ||
27 | |||
28 | gpio0: gpio@ffc40000 { | ||
29 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
30 | reg = <0xffc40000 0x2c>; | ||
31 | interrupt-parent = <&gic>; | ||
32 | interrupts = <0 141 0x4>; | ||
33 | #gpio-cells = <2>; | ||
34 | gpio-controller; | ||
35 | gpio-ranges = <&pfc 0 0 32>; | ||
36 | }; | ||
37 | ... | ||
38 | gpio6: gpio@ffc46000 { | ||
39 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
40 | reg = <0xffc46000 0x2c>; | ||
41 | interrupt-parent = <&gic>; | ||
42 | interrupts = <0 147 0x4>; | ||
43 | #gpio-cells = <2>; | ||
44 | gpio-controller; | ||
45 | gpio-ranges = <&pfc 0 192 9>; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpu/samsung-g2d.txt b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt index 2b14a940eb75..3f454ffc654a 100644 --- a/Documentation/devicetree/bindings/gpu/samsung-g2d.txt +++ b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt | |||
@@ -10,11 +10,16 @@ Required properties: | |||
10 | mapped region. | 10 | mapped region. |
11 | 11 | ||
12 | - interrupts : G2D interrupt number to the CPU. | 12 | - interrupts : G2D interrupt number to the CPU. |
13 | - clocks : from common clock binding: handle to G2D clocks. | ||
14 | - clock-names : from common clock binding: must contain "sclk_fimg2d" and | ||
15 | "fimg2d", corresponding to entries in the clocks property. | ||
13 | 16 | ||
14 | Example: | 17 | Example: |
15 | g2d@12800000 { | 18 | g2d@12800000 { |
16 | compatible = "samsung,s5pv210-g2d"; | 19 | compatible = "samsung,s5pv210-g2d"; |
17 | reg = <0x12800000 0x1000>; | 20 | reg = <0x12800000 0x1000>; |
18 | interrupts = <0 89 0>; | 21 | interrupts = <0 89 0>; |
22 | clocks = <&clock 177>, <&clock 277>; | ||
23 | clock-names = "sclk_fimg2d", "fimg2d"; | ||
19 | status = "disabled"; | 24 | status = "disabled"; |
20 | }; | 25 | }; |
diff --git a/Documentation/devicetree/bindings/hwmon/g762.txt b/Documentation/devicetree/bindings/hwmon/g762.txt new file mode 100644 index 000000000000..25cc6d8ee575 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/g762.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | GMT G762/G763 PWM Fan controller | ||
2 | |||
3 | Required node properties: | ||
4 | |||
5 | - "compatible": must be either "gmt,g762" or "gmt,g763" | ||
6 | - "reg": I2C bus address of the device | ||
7 | - "clocks": a fixed clock providing input clock frequency | ||
8 | on CLK pin of the chip. | ||
9 | |||
10 | Optional properties: | ||
11 | |||
12 | - "fan_startv": fan startup voltage. Accepted values are 0, 1, 2 and 3. | ||
13 | The higher the more. | ||
14 | |||
15 | - "pwm_polarity": pwm polarity. Accepted values are 0 (positive duty) | ||
16 | and 1 (negative duty). | ||
17 | |||
18 | - "fan_gear_mode": fan gear mode. Supported values are 0, 1 and 2. | ||
19 | |||
20 | If an optional property is not set in .dts file, then current value is kept | ||
21 | unmodified (e.g. u-boot installed value). | ||
22 | |||
23 | Additional information on operational parameters for the device is available | ||
24 | in Documentation/hwmon/g762. A detailed datasheet for the device is available | ||
25 | at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf. | ||
26 | |||
27 | Example g762 node: | ||
28 | |||
29 | clocks { | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <0>; | ||
32 | |||
33 | g762_clk: fixedclk { | ||
34 | compatible = "fixed-clock"; | ||
35 | #clock-cells = <0>; | ||
36 | clock-frequency = <8192>; | ||
37 | } | ||
38 | } | ||
39 | |||
40 | g762: g762@3e { | ||
41 | compatible = "gmt,g762"; | ||
42 | reg = <0x3e>; | ||
43 | clocks = <&g762_clk> | ||
44 | fan_gear_mode = <0>; /* chip default */ | ||
45 | fan_startv = <1>; /* chip default */ | ||
46 | pwm_polarity = <0>; /* chip default */ | ||
47 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt index e42a2ee233e6..7fd7fa25e9b0 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt | |||
@@ -10,6 +10,10 @@ Recommended properties : | |||
10 | 10 | ||
11 | - clock-frequency : desired I2C bus clock frequency in Hz. | 11 | - clock-frequency : desired I2C bus clock frequency in Hz. |
12 | 12 | ||
13 | Optional properties : | ||
14 | - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds. | ||
15 | This option is only supported in hardware blocks version 1.11a or newer. | ||
16 | |||
13 | Example : | 17 | Example : |
14 | 18 | ||
15 | i2c@f0000 { | 19 | i2c@f0000 { |
@@ -20,3 +24,14 @@ Example : | |||
20 | interrupts = <11>; | 24 | interrupts = <11>; |
21 | clock-frequency = <400000>; | 25 | clock-frequency = <400000>; |
22 | }; | 26 | }; |
27 | |||
28 | i2c@1120000 { | ||
29 | #address-cells = <1>; | ||
30 | #size-cells = <0>; | ||
31 | compatible = "snps,designware-i2c"; | ||
32 | reg = <0x1120000 0x1000>; | ||
33 | interrupt-parent = <&ictl>; | ||
34 | interrupts = <12 1>; | ||
35 | clock-frequency = <400000>; | ||
36 | i2c-sda-hold-time-ns = <300>; | ||
37 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt index f46d928aa73d..a1ee681942cc 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | |||
@@ -6,7 +6,11 @@ Required properties : | |||
6 | - reg : Offset and length of the register set for the device | 6 | - reg : Offset and length of the register set for the device |
7 | - compatible : Should be "marvell,mv64xxx-i2c" | 7 | - compatible : Should be "marvell,mv64xxx-i2c" |
8 | - interrupts : The interrupt number | 8 | - interrupts : The interrupt number |
9 | - clock-frequency : Desired I2C bus clock frequency in Hz. | 9 | |
10 | Optional properties : | ||
11 | |||
12 | - clock-frequency : Desired I2C bus clock frequency in Hz. If not set the | ||
13 | default frequency is 100kHz | ||
10 | 14 | ||
11 | Examples: | 15 | Examples: |
12 | 16 | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt b/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt new file mode 100644 index 000000000000..bd81a482634f --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | ST Microelectronics DDC I2C | ||
2 | |||
3 | Required properties : | ||
4 | - compatible : Must be "st,ddci2c" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: interrupt number to the cpu. | ||
8 | - #address-cells = <1>; | ||
9 | - #size-cells = <0>; | ||
10 | |||
11 | Optional properties: | ||
12 | - Child nodes conforming to i2c bus binding | ||
13 | |||
14 | Examples : | ||
15 | |||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-vt8500.txt b/Documentation/devicetree/bindings/i2c/i2c-vt8500.txt new file mode 100644 index 000000000000..94a425eaa6c7 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-vt8500.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * Wondermedia I2C Controller | ||
2 | |||
3 | Required properties : | ||
4 | |||
5 | - compatible : should be "wm,wm8505-i2c" | ||
6 | - reg : Offset and length of the register set for the device | ||
7 | - interrupts : <IRQ> where IRQ is the interrupt number | ||
8 | - clocks : phandle to the I2C clock source | ||
9 | |||
10 | Optional properties : | ||
11 | |||
12 | - clock-frequency : desired I2C bus clock frequency in Hz. | ||
13 | Valid values are 100000 and 400000. | ||
14 | Default to 100000 if not specified, or invalid value. | ||
15 | |||
16 | Example : | ||
17 | |||
18 | i2c_0: i2c@d8280000 { | ||
19 | compatible = "wm,wm8505-i2c"; | ||
20 | reg = <0xd8280000 0x1000>; | ||
21 | interrupts = <19>; | ||
22 | clocks = <&clki2c0>; | ||
23 | clock-frequency = <400000>; | ||
24 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/ina2xx.txt b/Documentation/devicetree/bindings/i2c/ina2xx.txt new file mode 100644 index 000000000000..a2ad85d7e747 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/ina2xx.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | ina2xx properties | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be one of the following: | ||
5 | - "ti,ina219" for ina219 | ||
6 | - "ti,ina220" for ina220 | ||
7 | - "ti,ina226" for ina226 | ||
8 | - "ti,ina230" for ina230 | ||
9 | - reg: I2C address | ||
10 | |||
11 | Optional properties: | ||
12 | |||
13 | - shunt-resistor | ||
14 | Shunt resistor value in micro-Ohm | ||
15 | |||
16 | Example: | ||
17 | |||
18 | ina220@44 { | ||
19 | compatible = "ti,ina220"; | ||
20 | reg = <0x44>; | ||
21 | shunt-resistor = <1000>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/dac/ad7303.txt b/Documentation/devicetree/bindings/iio/dac/ad7303.txt new file mode 100644 index 000000000000..914610f0556e --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/ad7303.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | Analog Devices AD7303 DAC device driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Must be "adi,ad7303" | ||
5 | - reg: SPI chip select number for the device | ||
6 | - spi-max-frequency: Max SPI frequency to use (< 30000000) | ||
7 | - Vdd-supply: Phandle to the Vdd power supply | ||
8 | |||
9 | Optional properties: | ||
10 | - REF-supply: Phandle to the external reference voltage supply. This should | ||
11 | only be set if there is an external reference voltage connected to the REF | ||
12 | pin. If the property is not set Vdd/2 is used as the reference voltage. | ||
13 | |||
14 | Example: | ||
15 | |||
16 | ad7303@4 { | ||
17 | compatible = "adi,ad7303"; | ||
18 | reg = <4>; | ||
19 | spi-max-frequency = <10000000>; | ||
20 | Vdd-supply = <&vdd_supply>; | ||
21 | adi,use-external-reference; | ||
22 | REF-supply = <&vref_supply>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/frequency/adf4350.txt b/Documentation/devicetree/bindings/iio/frequency/adf4350.txt new file mode 100644 index 000000000000..f8c181d81d2d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/frequency/adf4350.txt | |||
@@ -0,0 +1,86 @@ | |||
1 | Analog Devices ADF4350/ADF4351 device driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be one of | ||
5 | * "adi,adf4350": When using the ADF4350 device | ||
6 | * "adi,adf4351": When using the ADF4351 device | ||
7 | - reg: SPI chip select numbert for the device | ||
8 | - spi-max-frequency: Max SPI frequency to use (< 20000000) | ||
9 | - clocks: From common clock binding. Clock is phandle to clock for | ||
10 | ADF435x Reference Clock (CLKIN). | ||
11 | |||
12 | Optional properties: | ||
13 | - gpios: GPIO Lock detect - If set with a valid phandle and GPIO number, | ||
14 | pll lock state is tested upon read. | ||
15 | - adi,channel-spacing: Channel spacing in Hz (influences MODULUS). | ||
16 | - adi,power-up-frequency: If set in Hz the PLL tunes to | ||
17 | the desired frequency on probe. | ||
18 | - adi,reference-div-factor: If set the driver skips dynamic calculation | ||
19 | and uses this default value instead. | ||
20 | - adi,reference-doubler-enable: Enables reference doubler. | ||
21 | - adi,reference-div2-enable: Enables reference divider. | ||
22 | - adi,phase-detector-polarity-positive-enable: Enables positive phase | ||
23 | detector polarity. Default = negative. | ||
24 | - adi,lock-detect-precision-6ns-enable: Enables 6ns lock detect precision. | ||
25 | Default = 10ns. | ||
26 | - adi,lock-detect-function-integer-n-enable: Enables lock detect | ||
27 | for integer-N mode. Default = factional-N mode. | ||
28 | - adi,charge-pump-current: Charge pump current in mA. | ||
29 | Default = 2500mA. | ||
30 | - adi,muxout-select: On chip multiplexer output selection. | ||
31 | Valid values for the multiplexer output are: | ||
32 | 0: Three-State Output (default) | ||
33 | 1: DVDD | ||
34 | 2: DGND | ||
35 | 3: R-Counter output | ||
36 | 4: N-Divider output | ||
37 | 5: Analog lock detect | ||
38 | 6: Digital lock detect | ||
39 | - adi,low-spur-mode-enable: Enables low spur mode. | ||
40 | Default = Low noise mode. | ||
41 | - adi,cycle-slip-reduction-enable: Enables cycle slip reduction. | ||
42 | - adi,charge-cancellation-enable: Enabled charge pump | ||
43 | charge cancellation for integer-N modes. | ||
44 | - adi,anti-backlash-3ns-enable: Enables 3ns antibacklash pulse width | ||
45 | for integer-N modes. | ||
46 | - adi,band-select-clock-mode-high-enable: Enables faster band | ||
47 | selection logic. | ||
48 | - adi,12bit-clk-divider: Clock divider value used when | ||
49 | adi,12bit-clkdiv-mode != 0 | ||
50 | - adi,clk-divider-mode: | ||
51 | Valid values for the clkdiv mode are: | ||
52 | 0: Clock divider off (default) | ||
53 | 1: Fast lock enable | ||
54 | 2: Phase resync enable | ||
55 | - adi,aux-output-enable: Enables auxiliary RF output. | ||
56 | - adi,aux-output-fundamental-enable: Selects fundamental VCO output on | ||
57 | the auxiliary RF output. Default = Output of RF dividers. | ||
58 | - adi,mute-till-lock-enable: Enables Mute-Till-Lock-Detect function. | ||
59 | - adi,output-power: Output power selection. | ||
60 | Valid values for the power mode are: | ||
61 | 0: -4dBm (default) | ||
62 | 1: -1dBm | ||
63 | 2: +2dBm | ||
64 | 3: +5dBm | ||
65 | - adi,aux-output-power: Auxiliary output power selection. | ||
66 | Valid values for the power mode are: | ||
67 | 0: -4dBm (default) | ||
68 | 1: -1dBm | ||
69 | 2: +2dBm | ||
70 | 3: +5dBm | ||
71 | |||
72 | |||
73 | Example: | ||
74 | lo_pll0_rx_adf4351: adf4351-rx-lpc@4 { | ||
75 | compatible = "adi,adf4351"; | ||
76 | reg = <4>; | ||
77 | spi-max-frequency = <10000000>; | ||
78 | clocks = <&clk0_ad9523 9>; | ||
79 | clock-names = "clkin"; | ||
80 | adi,channel-spacing = <10000>; | ||
81 | adi,power-up-frequency = <2400000000>; | ||
82 | adi,phase-detector-polarity-positive-enable; | ||
83 | adi,charge-pump-current = <2500>; | ||
84 | adi,output-power = <3>; | ||
85 | adi,mute-till-lock-enable; | ||
86 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt new file mode 100644 index 000000000000..011679f1a425 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * AsahiKASEI AK8975 magnetometer sensor | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "asahi-kasei,ak8975" | ||
6 | - reg : the I2C address of the magnetometer | ||
7 | |||
8 | Optional properties: | ||
9 | |||
10 | - gpios : should be device tree identifier of the magnetometer DRDY pin | ||
11 | |||
12 | Example: | ||
13 | |||
14 | ak8975@0c { | ||
15 | compatible = "asahi-kasei,ak8975"; | ||
16 | reg = <0x0c>; | ||
17 | gpios = <&gpj0 7 0>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/pxa27x-keypad.txt b/Documentation/devicetree/bindings/input/pxa27x-keypad.txt new file mode 100644 index 000000000000..f8674f7e5ea5 --- /dev/null +++ b/Documentation/devicetree/bindings/input/pxa27x-keypad.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | * Marvell PXA Keypad controller | ||
2 | |||
3 | Required Properties | ||
4 | - compatible : should be "marvell,pxa27x-keypad" | ||
5 | - reg : Address and length of the register set for the device | ||
6 | - interrupts : The interrupt for the keypad controller | ||
7 | - marvell,debounce-interval : How long time the key will be | ||
8 | recognized when it is pressed. It is a u32 value, and bit[31:16] | ||
9 | is debounce interval for direct key and bit[15:0] is debounce | ||
10 | interval for matrix key. The value is in binary number of 2ms | ||
11 | |||
12 | Optional Properties For Matrix Keyes | ||
13 | Please refer to matrix-keymap.txt | ||
14 | |||
15 | Optional Properties for Direct Keyes | ||
16 | - marvell,direct-key-count : How many direct keyes are used. | ||
17 | - marvell,direct-key-mask : The mask indicates which keyes | ||
18 | are used. If bit[X] of the mask is set, the direct key X | ||
19 | is used. | ||
20 | - marvell,direct-key-low-active : Direct key status register | ||
21 | tells the level of pins that connects to the direct keyes. | ||
22 | When this property is set, it means that when the pin level | ||
23 | is low, the key is pressed(active). | ||
24 | - marvell,direct-key-map : It is a u16 array. Each item indicates | ||
25 | the linux key-code for the direct key. | ||
26 | |||
27 | Optional Properties For Rotary | ||
28 | - marvell,rotary0 : It is a u32 value. Bit[31:16] is the | ||
29 | linux key-code for rotary up. Bit[15:0] is the linux key-code | ||
30 | for rotary down. It is for rotary 0. | ||
31 | - marvell,rotary1 : Same as marvell,rotary0. It is for rotary 1. | ||
32 | - marvell,rotary-rel-key : When rotary is used for relative axes | ||
33 | in the device, the value indicates the key-code for relative | ||
34 | axes measurement in the device. It is a u32 value. Bit[31:16] | ||
35 | is for rotary 1, and Bit[15:0] is for rotary 0. | ||
36 | |||
37 | Examples: | ||
38 | keypad: keypad@d4012000 { | ||
39 | keypad,num-rows = <3>; | ||
40 | keypad,num-columns = <5>; | ||
41 | linux,keymap = <0x0000000e /* KEY_BACKSPACE */ | ||
42 | 0x0001006b /* KEY_END */ | ||
43 | 0x00020061 /* KEY_RIGHTCTRL */ | ||
44 | 0x0003000b /* KEY_0 */ | ||
45 | 0x00040002 /* KEY_1 */ | ||
46 | 0x0100008b /* KEY_MENU */ | ||
47 | 0x01010066 /* KEY_HOME */ | ||
48 | 0x010200e7 /* KEY_SEND */ | ||
49 | 0x01030009 /* KEY_8 */ | ||
50 | 0x0104000a /* KEY_9 */ | ||
51 | 0x02000160 /* KEY_OK */ | ||
52 | 0x02010003 /* KEY_2 */ | ||
53 | 0x02020004 /* KEY_3 */ | ||
54 | 0x02030005 /* KEY_4 */ | ||
55 | 0x02040006>; /* KEY_5 */ | ||
56 | marvell,rotary0 = <0x006c0067>; /* KEY_UP & KEY_DOWN */ | ||
57 | marvell,direct-key-count = <1>; | ||
58 | marvell,direct-key-map = <0x001c>; | ||
59 | marvell,debounce-interval = <0x001e001e>; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/samsung-keypad.txt b/Documentation/devicetree/bindings/input/samsung-keypad.txt index ce3e394c0e64..942d071baaa5 100644 --- a/Documentation/devicetree/bindings/input/samsung-keypad.txt +++ b/Documentation/devicetree/bindings/input/samsung-keypad.txt | |||
@@ -25,14 +25,6 @@ Required Board Specific Properties: | |||
25 | - samsung,keypad-num-columns: Number of column lines connected to the | 25 | - samsung,keypad-num-columns: Number of column lines connected to the |
26 | keypad controller. | 26 | keypad controller. |
27 | 27 | ||
28 | - row-gpios: List of gpios used as row lines. The gpio specifier for | ||
29 | this property depends on the gpio controller to which these row lines | ||
30 | are connected. | ||
31 | |||
32 | - col-gpios: List of gpios used as column lines. The gpio specifier for | ||
33 | this property depends on the gpio controller to which these column | ||
34 | lines are connected. | ||
35 | |||
36 | - Keys represented as child nodes: Each key connected to the keypad | 28 | - Keys represented as child nodes: Each key connected to the keypad |
37 | controller is represented as a child node to the keypad controller | 29 | controller is represented as a child node to the keypad controller |
38 | device node and should include the following properties. | 30 | device node and should include the following properties. |
@@ -41,6 +33,9 @@ Required Board Specific Properties: | |||
41 | - linux,code: the key-code to be reported when the key is pressed | 33 | - linux,code: the key-code to be reported when the key is pressed |
42 | and released. | 34 | and released. |
43 | 35 | ||
36 | - pinctrl-0: Should specify pin control groups used for this controller. | ||
37 | - pinctrl-names: Should contain only one value - "default". | ||
38 | |||
44 | Optional Properties specific to linux: | 39 | Optional Properties specific to linux: |
45 | - linux,keypad-no-autorepeat: do no enable autorepeat feature. | 40 | - linux,keypad-no-autorepeat: do no enable autorepeat feature. |
46 | - linux,keypad-wakeup: use any event on keypad as wakeup event. | 41 | - linux,keypad-wakeup: use any event on keypad as wakeup event. |
@@ -56,17 +51,8 @@ Example: | |||
56 | linux,input-no-autorepeat; | 51 | linux,input-no-autorepeat; |
57 | linux,input-wakeup; | 52 | linux,input-wakeup; |
58 | 53 | ||
59 | row-gpios = <&gpx2 0 3 3 0 | 54 | pinctrl-names = "default"; |
60 | &gpx2 1 3 3 0>; | 55 | pinctrl-0 = <&keypad_rows &keypad_columns>; |
61 | |||
62 | col-gpios = <&gpx1 0 3 0 0 | ||
63 | &gpx1 1 3 0 0 | ||
64 | &gpx1 2 3 0 0 | ||
65 | &gpx1 3 3 0 0 | ||
66 | &gpx1 4 3 0 0 | ||
67 | &gpx1 5 3 0 0 | ||
68 | &gpx1 6 3 0 0 | ||
69 | &gpx1 7 3 0 0>; | ||
70 | 56 | ||
71 | key_1 { | 57 | key_1 { |
72 | keypad,row = <0>; | 58 | keypad,row = <0>; |
diff --git a/Documentation/devicetree/bindings/input/ti,nspire-keypad.txt b/Documentation/devicetree/bindings/input/ti,nspire-keypad.txt new file mode 100644 index 000000000000..513d94d6e899 --- /dev/null +++ b/Documentation/devicetree/bindings/input/ti,nspire-keypad.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | TI-NSPIRE Keypad | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Compatible property value should be "ti,nspire-keypad". | ||
5 | |||
6 | - reg: Physical base address of the peripheral and length of memory mapped | ||
7 | region. | ||
8 | |||
9 | - interrupts: The interrupt number for the peripheral. | ||
10 | |||
11 | - scan-interval: How often to scan in us. Based on a APB speed of 33MHz, the | ||
12 | maximum and minimum delay time is ~2000us and ~500us respectively | ||
13 | |||
14 | - row-delay: How long to wait before scanning each row. | ||
15 | |||
16 | - clocks: The clock this peripheral is attached to. | ||
17 | |||
18 | - linux,keymap: The keymap to use | ||
19 | (see Documentation/devicetree/bindings/input/matrix-keymap.txt) | ||
20 | |||
21 | Optional properties: | ||
22 | - active-low: Specify that the keypad is active low (i.e. logical low signifies | ||
23 | a key press). | ||
24 | |||
25 | Example: | ||
26 | |||
27 | input { | ||
28 | compatible = "ti,nspire-keypad"; | ||
29 | reg = <0x900E0000 0x1000>; | ||
30 | interrupts = <16>; | ||
31 | |||
32 | scan-interval = <1000>; | ||
33 | row-delay = <200>; | ||
34 | |||
35 | clocks = <&apb_pclk>; | ||
36 | |||
37 | linux,keymap = < | ||
38 | 0x0000001c 0x0001001c 0x00040039 | ||
39 | 0x0005002c 0x00060015 0x0007000b | ||
40 | 0x0008000f 0x0100002d 0x01010011 | ||
41 | 0x0102002f 0x01030004 0x01040016 | ||
42 | 0x01050014 0x0106001f 0x01070002 | ||
43 | 0x010a006a 0x02000013 0x02010010 | ||
44 | 0x02020019 0x02030007 0x02040018 | ||
45 | 0x02050031 0x02060032 0x02070005 | ||
46 | 0x02080028 0x0209006c 0x03000026 | ||
47 | 0x03010025 0x03020024 0x0303000a | ||
48 | 0x03040017 0x03050023 0x03060022 | ||
49 | 0x03070008 0x03080035 0x03090069 | ||
50 | 0x04000021 0x04010012 0x04020020 | ||
51 | 0x0404002e 0x04050030 0x0406001e | ||
52 | 0x0407000d 0x04080037 0x04090067 | ||
53 | 0x05010038 0x0502000c 0x0503001b | ||
54 | 0x05040034 0x0505001a 0x05060006 | ||
55 | 0x05080027 0x0509000e 0x050a006f | ||
56 | 0x0600002b 0x0602004e 0x06030068 | ||
57 | 0x06040003 0x0605006d 0x06060009 | ||
58 | 0x06070001 0x0609000f 0x0708002a | ||
59 | 0x0709001d 0x070a0033 >; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt new file mode 100644 index 000000000000..491c97b78384 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | * TI - TSC ADC (Touschscreen and analog digital converter) | ||
2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3 | |||
4 | Required properties: | ||
5 | - child "tsc" | ||
6 | ti,wires: Wires refer to application modes i.e. 4/5/8 wire touchscreen | ||
7 | support on the platform. | ||
8 | ti,x-plate-resistance: X plate resistance | ||
9 | ti,coordiante-readouts: The sequencer supports a total of 16 | ||
10 | programmable steps each step is used to | ||
11 | read a single coordinate. A single | ||
12 | readout is enough but multiple reads can | ||
13 | increase the quality. | ||
14 | A value of 5 means, 5 reads for X, 5 for | ||
15 | Y and 2 for Z (always). This utilises 12 | ||
16 | of the 16 software steps available. The | ||
17 | remaining 4 can be used by the ADC. | ||
18 | ti,wire-config: Different boards could have a different order for | ||
19 | connecting wires on touchscreen. We need to provide an | ||
20 | 8 bit number where in the 1st four bits represent the | ||
21 | analog lines and the next 4 bits represent positive/ | ||
22 | negative terminal on that input line. Notations to | ||
23 | represent the input lines and terminals resoectively | ||
24 | is as follows: | ||
25 | AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7. | ||
26 | XP = 0, XN = 1, YP = 2, YN = 3. | ||
27 | - child "adc" | ||
28 | ti,adc-channels: List of analog inputs available for ADC. | ||
29 | AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7. | ||
30 | |||
31 | Example: | ||
32 | tscadc: tscadc@44e0d000 { | ||
33 | compatible = "ti,am3359-tscadc"; | ||
34 | tsc { | ||
35 | ti,wires = <4>; | ||
36 | ti,x-plate-resistance = <200>; | ||
37 | ti,coordiante-readouts = <5>; | ||
38 | ti,wire-config = <0x00 0x11 0x22 0x33>; | ||
39 | }; | ||
40 | |||
41 | adc { | ||
42 | ti,adc-channels = <4 5 6 7>; | ||
43 | }; | ||
44 | } | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt b/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt new file mode 100644 index 000000000000..9d52d5afe3e9 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | TB10x Top Level Interrupt Controller | ||
2 | ==================================== | ||
3 | |||
4 | The Abilis TB10x SOC contains a custom interrupt controller. It performs | ||
5 | one-to-one mapping of external interrupt sources to CPU interrupts and | ||
6 | provides support for reconfigurable trigger modes. | ||
7 | |||
8 | Required properties | ||
9 | ------------------- | ||
10 | |||
11 | - compatible: Should be "abilis,tb10x-ictl" | ||
12 | - reg: specifies physical base address and size of register range. | ||
13 | - interrupt-congroller: Identifies the node as an interrupt controller. | ||
14 | - #interrupt cells: Specifies the number of cells used to encode an interrupt | ||
15 | source connected to this controller. The value shall be 2. | ||
16 | - interrupt-parent: Specifies the parent interrupt controller. | ||
17 | - interrupts: Specifies the list of interrupt lines which are handled by | ||
18 | the interrupt controller in the parent controller's notation. Interrupts | ||
19 | are mapped one-to-one to parent interrupts. | ||
20 | |||
21 | Example | ||
22 | ------- | ||
23 | |||
24 | intc: interrupt-controller { /* Parent interrupt controller */ | ||
25 | interrupt-controller; | ||
26 | #interrupt-cells = <1>; /* For example below */ | ||
27 | /* ... */ | ||
28 | }; | ||
29 | |||
30 | tb10x_ictl: pic@2000 { /* TB10x interrupt controller */ | ||
31 | compatible = "abilis,tb10x-ictl"; | ||
32 | reg = <0x2000 0x20>; | ||
33 | interrupt-controller; | ||
34 | #interrupt-cells = <2>; | ||
35 | interrupt-parent = <&intc>; | ||
36 | interrupts = <5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ||
37 | 20 21 22 23 24 25 26 27 28 29 30 31>; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt index e7f4dc14eff2..57edb30dbbca 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt | |||
@@ -8,91 +8,8 @@ Required properties: | |||
8 | - #interrupt-cells : Specifies the number of cells needed to encode an | 8 | - #interrupt-cells : Specifies the number of cells needed to encode an |
9 | interrupt source. The value shall be 1. | 9 | interrupt source. The value shall be 1. |
10 | 10 | ||
11 | The interrupt sources are as follows: | 11 | For the valid interrupt sources for your SoC, see the documentation in |
12 | 12 | sunxi/<soc>.txt | |
13 | 0: ENMI | ||
14 | 1: UART0 | ||
15 | 2: UART1 | ||
16 | 3: UART2 | ||
17 | 4: UART3 | ||
18 | 5: IR0 | ||
19 | 6: IR1 | ||
20 | 7: I2C0 | ||
21 | 8: I2C1 | ||
22 | 9: I2C2 | ||
23 | 10: SPI0 | ||
24 | 11: SPI1 | ||
25 | 12: SPI2 | ||
26 | 13: SPDIF | ||
27 | 14: AC97 | ||
28 | 15: TS | ||
29 | 16: I2S | ||
30 | 17: UART4 | ||
31 | 18: UART5 | ||
32 | 19: UART6 | ||
33 | 20: UART7 | ||
34 | 21: KEYPAD | ||
35 | 22: TIMER0 | ||
36 | 23: TIMER1 | ||
37 | 24: TIMER2 | ||
38 | 25: TIMER3 | ||
39 | 26: CAN | ||
40 | 27: DMA | ||
41 | 28: PIO | ||
42 | 29: TOUCH_PANEL | ||
43 | 30: AUDIO_CODEC | ||
44 | 31: LRADC | ||
45 | 32: SDMC0 | ||
46 | 33: SDMC1 | ||
47 | 34: SDMC2 | ||
48 | 35: SDMC3 | ||
49 | 36: MEMSTICK | ||
50 | 37: NAND | ||
51 | 38: USB0 | ||
52 | 39: USB1 | ||
53 | 40: USB2 | ||
54 | 41: SCR | ||
55 | 42: CSI0 | ||
56 | 43: CSI1 | ||
57 | 44: LCDCTRL0 | ||
58 | 45: LCDCTRL1 | ||
59 | 46: MP | ||
60 | 47: DEFEBE0 | ||
61 | 48: DEFEBE1 | ||
62 | 49: PMU | ||
63 | 50: SPI3 | ||
64 | 51: TZASC | ||
65 | 52: PATA | ||
66 | 53: VE | ||
67 | 54: SS | ||
68 | 55: EMAC | ||
69 | 56: SATA | ||
70 | 57: GPS | ||
71 | 58: HDMI | ||
72 | 59: TVE | ||
73 | 60: ACE | ||
74 | 61: TVD | ||
75 | 62: PS2_0 | ||
76 | 63: PS2_1 | ||
77 | 64: USB3 | ||
78 | 65: USB4 | ||
79 | 66: PLE_PFM | ||
80 | 67: TIMER4 | ||
81 | 68: TIMER5 | ||
82 | 69: GPU_GP | ||
83 | 70: GPU_GPMMU | ||
84 | 71: GPU_PP0 | ||
85 | 72: GPU_PPMMU0 | ||
86 | 73: GPU_PMU | ||
87 | 74: GPU_RSV0 | ||
88 | 75: GPU_RSV1 | ||
89 | 76: GPU_RSV2 | ||
90 | 77: GPU_RSV3 | ||
91 | 78: GPU_RSV4 | ||
92 | 79: GPU_RSV5 | ||
93 | 80: GPU_RSV6 | ||
94 | 82: SYNC_TIMER0 | ||
95 | 83: SYNC_TIMER1 | ||
96 | 13 | ||
97 | Example: | 14 | Example: |
98 | 15 | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt new file mode 100644 index 000000000000..2c11ac76fac9 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | Marvell Orion SoC interrupt controllers | ||
2 | |||
3 | * Main interrupt controller | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: shall be "marvell,orion-intc" | ||
7 | - reg: base address(es) of interrupt registers starting with CAUSE register | ||
8 | - interrupt-controller: identifies the node as an interrupt controller | ||
9 | - #interrupt-cells: number of cells to encode an interrupt source, shall be 1 | ||
10 | |||
11 | The interrupt sources map to the corresponding bits in the interrupt | ||
12 | registers, i.e. | ||
13 | - 0 maps to bit 0 of first base address, | ||
14 | - 1 maps to bit 1 of first base address, | ||
15 | - 32 maps to bit 0 of second base address, and so on. | ||
16 | |||
17 | Example: | ||
18 | intc: interrupt-controller { | ||
19 | compatible = "marvell,orion-intc"; | ||
20 | interrupt-controller; | ||
21 | #interrupt-cells = <1>; | ||
22 | /* Dove has 64 first level interrupts */ | ||
23 | reg = <0x20200 0x10>, <0x20210 0x10>; | ||
24 | }; | ||
25 | |||
26 | * Bridge interrupt controller | ||
27 | |||
28 | Required properties: | ||
29 | - compatible: shall be "marvell,orion-bridge-intc" | ||
30 | - reg: base address of bridge interrupt registers starting with CAUSE register | ||
31 | - interrupts: bridge interrupt of the main interrupt controller | ||
32 | - interrupt-controller: identifies the node as an interrupt controller | ||
33 | - #interrupt-cells: number of cells to encode an interrupt source, shall be 1 | ||
34 | |||
35 | Optional properties: | ||
36 | - marvell,#interrupts: number of interrupts provided by bridge interrupt | ||
37 | controller, defaults to 32 if not set | ||
38 | |||
39 | Example: | ||
40 | bridge_intc: interrupt-controller { | ||
41 | compatible = "marvell,orion-bridge-intc"; | ||
42 | interrupt-controller; | ||
43 | #interrupt-cells = <1>; | ||
44 | reg = <0x20110 0x8>; | ||
45 | interrupts = <0>; | ||
46 | /* Dove bridge provides 5 interrupts */ | ||
47 | marvell,#interrupts = <5>; | ||
48 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt new file mode 100644 index 000000000000..1f8b0c507c26 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | DT bindings for the R-/SH-Mobile irqpin controller | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: has to be "renesas,intc-irqpin" | ||
6 | - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in | ||
7 | interrupts.txt in this directory | ||
8 | |||
9 | Optional properties: | ||
10 | |||
11 | - any properties, listed in interrupts.txt, and any standard resource allocation | ||
12 | properties | ||
13 | - sense-bitfield-width: width of a single sense bitfield in the SENSE register, | ||
14 | if different from the default 4 bits | ||
15 | - control-parent: disable and enable interrupts on the parent interrupt | ||
16 | controller, needed for some broken implementations | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt new file mode 100644 index 000000000000..76b98c834499 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt | |||
@@ -0,0 +1,89 @@ | |||
1 | Allwinner A10 (sun4i) interrupt sources | ||
2 | --------------------------------------- | ||
3 | |||
4 | The interrupt sources available for the Allwinner A10 SoC are the | ||
5 | following one: | ||
6 | |||
7 | 0: ENMI | ||
8 | 1: UART0 | ||
9 | 2: UART1 | ||
10 | 3: UART2 | ||
11 | 4: UART3 | ||
12 | 5: IR0 | ||
13 | 6: IR1 | ||
14 | 7: I2C0 | ||
15 | 8: I2C1 | ||
16 | 9: I2C2 | ||
17 | 10: SPI0 | ||
18 | 11: SPI1 | ||
19 | 12: SPI2 | ||
20 | 13: SPDIF | ||
21 | 14: AC97 | ||
22 | 15: TS | ||
23 | 16: I2S | ||
24 | 17: UART4 | ||
25 | 18: UART5 | ||
26 | 19: UART6 | ||
27 | 20: UART7 | ||
28 | 21: KEYPAD | ||
29 | 22: TIMER0 | ||
30 | 23: TIMER1 | ||
31 | 24: TIMER2 | ||
32 | 25: TIMER3 | ||
33 | 26: CAN | ||
34 | 27: DMA | ||
35 | 28: PIO | ||
36 | 29: TOUCH_PANEL | ||
37 | 30: AUDIO_CODEC | ||
38 | 31: LRADC | ||
39 | 32: MMC0 | ||
40 | 33: MMC1 | ||
41 | 34: MMC2 | ||
42 | 35: MMC3 | ||
43 | 36: MEMSTICK | ||
44 | 37: NAND | ||
45 | 38: USB0 | ||
46 | 39: USB1 | ||
47 | 40: USB2 | ||
48 | 41: SCR | ||
49 | 42: CSI0 | ||
50 | 43: CSI1 | ||
51 | 44: LCDCTRL0 | ||
52 | 45: LCDCTRL1 | ||
53 | 46: MP | ||
54 | 47: DEFEBE0 | ||
55 | 48: DEFEBE1 | ||
56 | 49: PMU | ||
57 | 50: SPI3 | ||
58 | 51: TZASC | ||
59 | 52: PATA | ||
60 | 53: VE | ||
61 | 54: SS | ||
62 | 55: EMAC | ||
63 | 56: SATA | ||
64 | 57: GPS | ||
65 | 58: HDMI | ||
66 | 59: TVE | ||
67 | 60: ACE | ||
68 | 61: TVD | ||
69 | 62: PS2_0 | ||
70 | 63: PS2_1 | ||
71 | 64: USB3 | ||
72 | 65: USB4 | ||
73 | 66: PLE_PFM | ||
74 | 67: TIMER4 | ||
75 | 68: TIMER5 | ||
76 | 69: GPU_GP | ||
77 | 70: GPU_GPMMU | ||
78 | 71: GPU_PP0 | ||
79 | 72: GPU_PPMMU0 | ||
80 | 73: GPU_PMU | ||
81 | 74: GPU_RSV0 | ||
82 | 75: GPU_RSV1 | ||
83 | 76: GPU_RSV2 | ||
84 | 77: GPU_RSV3 | ||
85 | 78: GPU_RSV4 | ||
86 | 79: GPU_RSV5 | ||
87 | 80: GPU_RSV6 | ||
88 | 82: SYNC_TIMER0 | ||
89 | 83: SYNC_TIMER1 | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt new file mode 100644 index 000000000000..2ec3b5ce1a0b --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | Allwinner A13 (sun5i) interrupt sources | ||
2 | --------------------------------------- | ||
3 | |||
4 | The interrupt sources available for the Allwinner A13 SoC are the | ||
5 | following one: | ||
6 | |||
7 | 0: ENMI | ||
8 | 2: UART1 | ||
9 | 4: UART3 | ||
10 | 5: IR | ||
11 | 7: I2C0 | ||
12 | 8: I2C1 | ||
13 | 9: I2C2 | ||
14 | 10: SPI0 | ||
15 | 11: SPI1 | ||
16 | 12: SPI2 | ||
17 | 22: TIMER0 | ||
18 | 23: TIMER1 | ||
19 | 24: TIMER2 | ||
20 | 25: TIMER3 | ||
21 | 27: DMA | ||
22 | 28: PIO | ||
23 | 29: TOUCH_PANEL | ||
24 | 30: AUDIO_CODEC | ||
25 | 31: LRADC | ||
26 | 32: MMC0 | ||
27 | 33: MMC1 | ||
28 | 34: MMC2 | ||
29 | 37: NAND | ||
30 | 38: USB OTG | ||
31 | 39: USB EHCI | ||
32 | 40: USB OHCI | ||
33 | 42: CSI | ||
34 | 44: LCDCTRL | ||
35 | 47: DEFEBE | ||
36 | 49: PMU | ||
37 | 53: VE | ||
38 | 54: SS | ||
39 | 66: PLE_PFM | ||
40 | 67: TIMER4 | ||
41 | 68: TIMER5 | ||
42 | 69: GPU_GP | ||
43 | 70: GPU_GPMMU | ||
44 | 71: GPU_PP0 | ||
45 | 72: GPU_PPMMU0 | ||
46 | 73: GPU_PMU | ||
47 | 74: GPU_RSV0 | ||
48 | 75: GPU_RSV1 | ||
49 | 76: GPU_RSV2 | ||
50 | 77: GPU_RSV3 | ||
51 | 78: GPU_RSV4 | ||
52 | 79: GPU_RSV5 | ||
53 | 80: GPU_RSV6 | ||
54 | 82: SYNC_TIMER0 | ||
55 | 83: SYNC_TIMER1 | ||
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.txt b/Documentation/devicetree/bindings/iommu/arm,smmu.txt new file mode 100644 index 000000000000..e34c6cdd8ba8 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | * ARM System MMU Architecture Implementation | ||
2 | |||
3 | ARM SoCs may contain an implementation of the ARM System Memory | ||
4 | Management Unit Architecture, which can be used to provide 1 or 2 stages | ||
5 | of address translation to bus masters external to the CPU. | ||
6 | |||
7 | The SMMU may also raise interrupts in response to various fault | ||
8 | conditions. | ||
9 | |||
10 | ** System MMU required properties: | ||
11 | |||
12 | - compatible : Should be one of: | ||
13 | |||
14 | "arm,smmu-v1" | ||
15 | "arm,smmu-v2" | ||
16 | "arm,mmu-400" | ||
17 | "arm,mmu-500" | ||
18 | |||
19 | depending on the particular implementation and/or the | ||
20 | version of the architecture implemented. | ||
21 | |||
22 | - reg : Base address and size of the SMMU. | ||
23 | |||
24 | - #global-interrupts : The number of global interrupts exposed by the | ||
25 | device. | ||
26 | |||
27 | - interrupts : Interrupt list, with the first #global-irqs entries | ||
28 | corresponding to the global interrupts and any | ||
29 | following entries corresponding to context interrupts, | ||
30 | specified in order of their indexing by the SMMU. | ||
31 | |||
32 | For SMMUv2 implementations, there must be exactly one | ||
33 | interrupt per context bank. In the case of a single, | ||
34 | combined interrupt, it must be listed multiple times. | ||
35 | |||
36 | - mmu-masters : A list of phandles to device nodes representing bus | ||
37 | masters for which the SMMU can provide a translation | ||
38 | and their corresponding StreamIDs (see example below). | ||
39 | Each device node linked from this list must have a | ||
40 | "#stream-id-cells" property, indicating the number of | ||
41 | StreamIDs associated with it. | ||
42 | |||
43 | ** System MMU optional properties: | ||
44 | |||
45 | - smmu-parent : When multiple SMMUs are chained together, this | ||
46 | property can be used to provide a phandle to the | ||
47 | parent SMMU (that is the next SMMU on the path going | ||
48 | from the mmu-masters towards memory) node for this | ||
49 | SMMU. | ||
50 | |||
51 | Example: | ||
52 | |||
53 | smmu { | ||
54 | compatible = "arm,smmu-v1"; | ||
55 | reg = <0xba5e0000 0x10000>; | ||
56 | #global-interrupts = <2>; | ||
57 | interrupts = <0 32 4>, | ||
58 | <0 33 4>, | ||
59 | <0 34 4>, /* This is the first context interrupt */ | ||
60 | <0 35 4>, | ||
61 | <0 36 4>, | ||
62 | <0 37 4>; | ||
63 | |||
64 | /* | ||
65 | * Two DMA controllers, the first with two StreamIDs (0xd01d | ||
66 | * and 0xd01e) and the second with only one (0xd11c). | ||
67 | */ | ||
68 | mmu-masters = <&dma0 0xd01d 0xd01e>, | ||
69 | <&dma1 0xd11c>; | ||
70 | }; | ||
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt new file mode 100644 index 000000000000..d5176882d8b9 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt | |||
@@ -0,0 +1,147 @@ | |||
1 | Binding for TI/National Semiconductor LP55xx Led Drivers | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" | ||
5 | - reg: I2C slave address | ||
6 | - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) | ||
7 | |||
8 | Each child has own specific current settings | ||
9 | - led-cur: Current setting at each led channel (mA x10, 0 if led is not connected) | ||
10 | - max-cur: Maximun current at each led channel. | ||
11 | |||
12 | Optional properties: | ||
13 | - label: Used for naming LEDs | ||
14 | |||
15 | Alternatively, each child can have specific channel name | ||
16 | - chan-name: Name of each channel name | ||
17 | |||
18 | example 1) LP5521 | ||
19 | 3 LED channels, external clock used. Channel names are 'lp5521_pri:channel0', | ||
20 | 'lp5521_pri:channel1' and 'lp5521_pri:channel2' | ||
21 | |||
22 | lp5521@32 { | ||
23 | compatible = "national,lp5521"; | ||
24 | reg = <0x32>; | ||
25 | label = "lp5521_pri"; | ||
26 | clock-mode = /bits/ 8 <2>; | ||
27 | |||
28 | chan0 { | ||
29 | led-cur = /bits/ 8 <0x2f>; | ||
30 | max-cur = /bits/ 8 <0x5f>; | ||
31 | }; | ||
32 | |||
33 | chan1 { | ||
34 | led-cur = /bits/ 8 <0x2f>; | ||
35 | max-cur = /bits/ 8 <0x5f>; | ||
36 | }; | ||
37 | |||
38 | chan2 { | ||
39 | led-cur = /bits/ 8 <0x2f>; | ||
40 | max-cur = /bits/ 8 <0x5f>; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | example 2) LP5523 | ||
45 | 9 LED channels with specific name. Internal clock used. | ||
46 | The I2C slave address is configurable with ASEL1 and ASEL0 pins. | ||
47 | Available addresses are 32/33/34/35h. | ||
48 | |||
49 | ASEL1 ASEL0 Address | ||
50 | ------------------------- | ||
51 | GND GND 32h | ||
52 | GND VEN 33h | ||
53 | VEN GND 34h | ||
54 | VEN VEN 35h | ||
55 | |||
56 | lp5523@32 { | ||
57 | compatible = "national,lp5523"; | ||
58 | reg = <0x32>; | ||
59 | clock-mode = /bits/ 8 <1>; | ||
60 | |||
61 | chan0 { | ||
62 | chan-name = "d1"; | ||
63 | led-cur = /bits/ 8 <0x14>; | ||
64 | max-cur = /bits/ 8 <0x20>; | ||
65 | }; | ||
66 | |||
67 | chan1 { | ||
68 | chan-name = "d2"; | ||
69 | led-cur = /bits/ 8 <0x14>; | ||
70 | max-cur = /bits/ 8 <0x20>; | ||
71 | }; | ||
72 | |||
73 | chan2 { | ||
74 | chan-name = "d3"; | ||
75 | led-cur = /bits/ 8 <0x14>; | ||
76 | max-cur = /bits/ 8 <0x20>; | ||
77 | }; | ||
78 | |||
79 | chan3 { | ||
80 | chan-name = "d4"; | ||
81 | led-cur = /bits/ 8 <0x14>; | ||
82 | max-cur = /bits/ 8 <0x20>; | ||
83 | }; | ||
84 | |||
85 | chan4 { | ||
86 | chan-name = "d5"; | ||
87 | led-cur = /bits/ 8 <0x14>; | ||
88 | max-cur = /bits/ 8 <0x20>; | ||
89 | }; | ||
90 | |||
91 | chan5 { | ||
92 | chan-name = "d6"; | ||
93 | led-cur = /bits/ 8 <0x14>; | ||
94 | max-cur = /bits/ 8 <0x20>; | ||
95 | }; | ||
96 | |||
97 | chan6 { | ||
98 | chan-name = "d7"; | ||
99 | led-cur = /bits/ 8 <0x14>; | ||
100 | max-cur = /bits/ 8 <0x20>; | ||
101 | }; | ||
102 | |||
103 | chan7 { | ||
104 | chan-name = "d8"; | ||
105 | led-cur = /bits/ 8 <0x14>; | ||
106 | max-cur = /bits/ 8 <0x20>; | ||
107 | }; | ||
108 | |||
109 | chan8 { | ||
110 | chan-name = "d9"; | ||
111 | led-cur = /bits/ 8 <0x14>; | ||
112 | max-cur = /bits/ 8 <0x20>; | ||
113 | }; | ||
114 | }; | ||
115 | |||
116 | example 3) LP5562 | ||
117 | 4 channels are defined. | ||
118 | |||
119 | lp5562@30 { | ||
120 | compatible = "ti,lp5562"; | ||
121 | reg = <0x30>; | ||
122 | clock-mode = /bits/8 <2>; | ||
123 | |||
124 | chan0 { | ||
125 | chan-name = "R"; | ||
126 | led-cur = /bits/ 8 <0x20>; | ||
127 | max-cur = /bits/ 8 <0x60>; | ||
128 | }; | ||
129 | |||
130 | chan1 { | ||
131 | chan-name = "G"; | ||
132 | led-cur = /bits/ 8 <0x20>; | ||
133 | max-cur = /bits/ 8 <0x60>; | ||
134 | }; | ||
135 | |||
136 | chan2 { | ||
137 | chan-name = "B"; | ||
138 | led-cur = /bits/ 8 <0x20>; | ||
139 | max-cur = /bits/ 8 <0x60>; | ||
140 | }; | ||
141 | |||
142 | chan3 { | ||
143 | chan-name = "W"; | ||
144 | led-cur = /bits/ 8 <0x20>; | ||
145 | max-cur = /bits/ 8 <0x60>; | ||
146 | }; | ||
147 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt index 3f62adfb3e0b..de9f6b78ee51 100644 --- a/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt +++ b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt | |||
@@ -2,7 +2,7 @@ Exynos4x12/Exynos5 SoC series camera host interface (FIMC-LITE) | |||
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | 4 | ||
5 | - compatible : should be "samsung,exynos4212-fimc" for Exynos4212 and | 5 | - compatible : should be "samsung,exynos4212-fimc-lite" for Exynos4212 and |
6 | Exynos4412 SoCs; | 6 | Exynos4412 SoCs; |
7 | - reg : physical base address and size of the device memory mapped | 7 | - reg : physical base address and size of the device memory mapped |
8 | registers; | 8 | registers; |
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt index bf0182d8da25..df37b0230c75 100644 --- a/Documentation/devicetree/bindings/media/s5p-mfc.txt +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt | |||
@@ -15,6 +15,9 @@ Required properties: | |||
15 | mapped region. | 15 | mapped region. |
16 | 16 | ||
17 | - interrupts : MFC interrupt number to the CPU. | 17 | - interrupts : MFC interrupt number to the CPU. |
18 | - clocks : from common clock binding: handle to mfc clocks. | ||
19 | - clock-names : from common clock binding: must contain "sclk_mfc" and "mfc", | ||
20 | corresponding to entries in the clocks property. | ||
18 | 21 | ||
19 | - samsung,mfc-r : Base address of the first memory bank used by MFC | 22 | - samsung,mfc-r : Base address of the first memory bank used by MFC |
20 | for DMA contiguous memory allocation and its size. | 23 | for DMA contiguous memory allocation and its size. |
@@ -34,6 +37,8 @@ mfc: codec@13400000 { | |||
34 | reg = <0x13400000 0x10000>; | 37 | reg = <0x13400000 0x10000>; |
35 | interrupts = <0 94 0>; | 38 | interrupts = <0 94 0>; |
36 | samsung,power-domain = <&pd_mfc>; | 39 | samsung,power-domain = <&pd_mfc>; |
40 | clocks = <&clock 170>, <&clock 273>; | ||
41 | clock-names = "sclk_mfc", "mfc"; | ||
37 | }; | 42 | }; |
38 | 43 | ||
39 | Board specific DT entry: | 44 | Board specific DT entry: |
diff --git a/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt new file mode 100644 index 000000000000..653c90c34a71 --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt | |||
@@ -0,0 +1,156 @@ | |||
1 | Device tree bindings for MVEBU Device Bus controllers | ||
2 | |||
3 | The Device Bus controller available in some Marvell's SoC allows to control | ||
4 | different types of standard memory and I/O devices such as NOR, NAND, and FPGA. | ||
5 | The actual devices are instantiated from the child nodes of a Device Bus node. | ||
6 | |||
7 | Required properties: | ||
8 | |||
9 | - compatible: Currently only Armada 370/XP SoC are supported, | ||
10 | with this compatible string: | ||
11 | |||
12 | marvell,mvebu-devbus | ||
13 | |||
14 | - reg: A resource specifier for the register space. | ||
15 | This is the base address of a chip select within | ||
16 | the controller's register space. | ||
17 | (see the example below) | ||
18 | |||
19 | - #address-cells: Must be set to 1 | ||
20 | - #size-cells: Must be set to 1 | ||
21 | - ranges: Must be set up to reflect the memory layout with four | ||
22 | integer values for each chip-select line in use: | ||
23 | 0 <physical address of mapping> <size> | ||
24 | |||
25 | Mandatory timing properties for child nodes: | ||
26 | |||
27 | Read parameters: | ||
28 | |||
29 | - devbus,turn-off-ps: Defines the time during which the controller does not | ||
30 | drive the AD bus after the completion of a device read. | ||
31 | This prevents contentions on the Device Bus after a read | ||
32 | cycle from a slow device. | ||
33 | |||
34 | - devbus,bus-width: Defines the bus width (e.g. <16>) | ||
35 | |||
36 | - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle, | ||
37 | to read data sample. This parameter is useful for | ||
38 | synchronous pipelined devices, where the address | ||
39 | precedes the read data by one or two cycles. | ||
40 | |||
41 | - devbus,acc-first-ps: Defines the time delay from the negation of | ||
42 | ALE[0] to the cycle that the first read data is sampled | ||
43 | by the controller. | ||
44 | |||
45 | - devbus,acc-next-ps: Defines the time delay between the cycle that | ||
46 | samples data N and the cycle that samples data N+1 | ||
47 | (in burst accesses). | ||
48 | |||
49 | - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to | ||
50 | DEV_OEn assertion. If set to 0 (default), | ||
51 | DEV_OEn and DEV_CSn are asserted at the same cycle. | ||
52 | This parameter has no affect on <acc-first-ps> parameter | ||
53 | (no affect on first data sample). Set <rd-setup-ps> | ||
54 | to a value smaller than <acc-first-ps>. | ||
55 | |||
56 | - devbus,rd-hold-ps: Defines the time between the last data sample to the | ||
57 | de-assertion of DEV_CSn. If set to 0 (default), | ||
58 | DEV_OEn and DEV_CSn are de-asserted at the same cycle | ||
59 | (the cycle of the last data sample). | ||
60 | This parameter has no affect on DEV_OEn de-assertion. | ||
61 | DEV_OEn is always de-asserted the next cycle after | ||
62 | last data sampled. Also this parameter has no | ||
63 | affect on <turn-off-ps> parameter. | ||
64 | Set <rd-hold-ps> to a value smaller than <turn-off-ps>. | ||
65 | |||
66 | Write parameters: | ||
67 | |||
68 | - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle | ||
69 | to the DEV_WEn assertion. | ||
70 | |||
71 | - devbus,wr-low-ps: Defines the time during which DEV_WEn is active. | ||
72 | A[2:0] and Data are kept valid as long as DEV_WEn | ||
73 | is active. This parameter defines the setup time of | ||
74 | address and data to DEV_WEn rise. | ||
75 | |||
76 | - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept | ||
77 | inactive (high) between data beats of a burst write. | ||
78 | DEV_A[2:0] and Data are kept valid (do not toggle) for | ||
79 | <wr-high-ps> - <tick> ps. | ||
80 | This parameter defines the hold time of address and | ||
81 | data after DEV_WEn rise. | ||
82 | |||
83 | - devbus,sync-enable: Synchronous device enable. | ||
84 | 1: True | ||
85 | 0: False | ||
86 | |||
87 | An example for an Armada XP GP board, with a 16 MiB NOR device as child | ||
88 | is showed below. Note that the Device Bus driver is in charge of allocating | ||
89 | the mbus address decoding window for each of its child devices. | ||
90 | The window is created using the chip select specified in the child | ||
91 | device node together with the base address and size specified in the ranges | ||
92 | property. For instance, in the example below the allocated decoding window | ||
93 | will start at base address 0xf0000000, with a size 0x1000000 (16 MiB) | ||
94 | for chip select 0 (a.k.a DEV_BOOTCS). | ||
95 | |||
96 | This address window handling is done in this mvebu-devbus only as a temporary | ||
97 | solution. It will be removed when the support for mbus device tree binding is | ||
98 | added. | ||
99 | |||
100 | The reg property implicitly specifies the chip select as this: | ||
101 | |||
102 | 0x10400: DEV_BOOTCS | ||
103 | 0x10408: DEV_CS0 | ||
104 | 0x10410: DEV_CS1 | ||
105 | 0x10418: DEV_CS2 | ||
106 | 0x10420: DEV_CS3 | ||
107 | |||
108 | Example: | ||
109 | |||
110 | devbus-bootcs@d0010400 { | ||
111 | status = "okay"; | ||
112 | ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf0000000, size 0x1000000 */ | ||
113 | #address-cells = <1>; | ||
114 | #size-cells = <1>; | ||
115 | |||
116 | /* Device Bus parameters are required */ | ||
117 | |||
118 | /* Read parameters */ | ||
119 | devbus,bus-width = <8>; | ||
120 | devbus,turn-off-ps = <60000>; | ||
121 | devbus,badr-skew-ps = <0>; | ||
122 | devbus,acc-first-ps = <124000>; | ||
123 | devbus,acc-next-ps = <248000>; | ||
124 | devbus,rd-setup-ps = <0>; | ||
125 | devbus,rd-hold-ps = <0>; | ||
126 | |||
127 | /* Write parameters */ | ||
128 | devbus,sync-enable = <0>; | ||
129 | devbus,wr-high-ps = <60000>; | ||
130 | devbus,wr-low-ps = <60000>; | ||
131 | devbus,ale-wr-ps = <60000>; | ||
132 | |||
133 | flash@0 { | ||
134 | compatible = "cfi-flash"; | ||
135 | |||
136 | /* 16 MiB */ | ||
137 | reg = <0 0x1000000>; | ||
138 | bank-width = <2>; | ||
139 | #address-cells = <1>; | ||
140 | #size-cells = <1>; | ||
141 | |||
142 | /* | ||
143 | * We split the 16 MiB in two partitions, | ||
144 | * just as an example. | ||
145 | */ | ||
146 | partition@0 { | ||
147 | label = "First"; | ||
148 | reg = <0 0x800000>; | ||
149 | }; | ||
150 | |||
151 | partition@800000 { | ||
152 | label = "Second"; | ||
153 | reg = <0x800000 0x800000>; | ||
154 | }; | ||
155 | }; | ||
156 | }; | ||
diff --git a/Documentation/devicetree/bindings/metag/meta.txt b/Documentation/devicetree/bindings/metag/meta.txt new file mode 100644 index 000000000000..f4457f57ab08 --- /dev/null +++ b/Documentation/devicetree/bindings/metag/meta.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | * Meta Processor Binding | ||
2 | |||
3 | This binding specifies what properties must be available in the device tree | ||
4 | representation of a Meta Processor Core, which is the root node in the tree. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible: Specifies the compatibility list for the Meta processor. | ||
9 | The type shall be <string> and the value shall include "img,meta". | ||
10 | |||
11 | Optional properties: | ||
12 | |||
13 | - clocks: Clock consumer specifiers as described in | ||
14 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
15 | |||
16 | - clock-names: Clock consumer names as described in | ||
17 | Documentation/devicetree/bindings/clock/clock-bindings.txt. | ||
18 | |||
19 | Clocks are identified by name. Valid clocks are: | ||
20 | |||
21 | - "core": The Meta core clock from which the Meta timers are derived. | ||
22 | |||
23 | * Examples | ||
24 | |||
25 | / { | ||
26 | compatible = "toumaz,tz1090", "img,meta"; | ||
27 | |||
28 | clocks = <&meta_core_clk>; | ||
29 | clock-names = "core"; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt index c3a14e0ad0ad..cd9e90c5d171 100644 --- a/Documentation/devicetree/bindings/mfd/ab8500.txt +++ b/Documentation/devicetree/bindings/mfd/ab8500.txt | |||
@@ -120,7 +120,7 @@ ab8500 { | |||
120 | "USB_LINK_STATUS", | 120 | "USB_LINK_STATUS", |
121 | "USB_ADP_PROBE_PLUG", | 121 | "USB_ADP_PROBE_PLUG", |
122 | "USB_ADP_PROBE_UNPLUG"; | 122 | "USB_ADP_PROBE_UNPLUG"; |
123 | vddulpivio18-supply = <&ab8500_ldo_initcore_reg>; | 123 | vddulpivio18-supply = <&ab8500_ldo_intcore_reg>; |
124 | v-ape-supply = <&db8500_vape_reg>; | 124 | v-ape-supply = <&db8500_vape_reg>; |
125 | musb_1v8-supply = <&db8500_vsmps2_reg>; | 125 | musb_1v8-supply = <&db8500_vsmps2_reg>; |
126 | }; | 126 | }; |
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt new file mode 100644 index 000000000000..0e295c9d8937 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/arizona.txt | |||
@@ -0,0 +1,62 @@ | |||
1 | Wolfson Arizona class audio SoCs | ||
2 | |||
3 | These devices are audio SoCs with extensive digital capabilites and a range | ||
4 | of analogue I/O. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible : one of the following chip-specific strings: | ||
9 | "wlf,wm5102" | ||
10 | "wlf,wm5110" | ||
11 | - reg : I2C slave address when connected using I2C, chip select number when | ||
12 | using SPI. | ||
13 | |||
14 | - interrupts : The interrupt line the /IRQ signal for the device is | ||
15 | connected to. | ||
16 | - interrupt-controller : Arizona class devices contain interrupt controllers | ||
17 | and may provide interrupt services to other devices. | ||
18 | - interrupt-parent : The parent interrupt controller. | ||
19 | - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. | ||
20 | The first cell is the IRQ number. | ||
21 | The second cell is the flags, encoded as the trigger masks from | ||
22 | Documentation/devicetree/bindings/interrupts.txt | ||
23 | |||
24 | - gpio-controller : Indicates this device is a GPIO controller. | ||
25 | - #gpio-cells : Must be 2. The first cell is the pin number and the | ||
26 | second cell is used to specify optional parameters (currently unused). | ||
27 | |||
28 | - AVDD1-supply, DBVDD1-supply, DBVDD2-supply, DBVDD3-supply, CPVDD-supply, | ||
29 | SPKVDDL-supply, SPKVDDR-supply : power supplies for the device, as covered | ||
30 | in Documentation/devicetree/bindings/regulator/regulator.txt | ||
31 | |||
32 | Optional properties: | ||
33 | |||
34 | - wlf,reset : GPIO specifier for the GPIO controlling /RESET | ||
35 | - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA | ||
36 | |||
37 | - wlf,gpio-defaults : A list of GPIO configuration register values. If | ||
38 | absent, no configuration of these registers is performed. If any | ||
39 | entry has a value that is out of range for a 16 bit register then | ||
40 | the chip default will be used. If present exactly five values must | ||
41 | be specified. | ||
42 | |||
43 | Example: | ||
44 | |||
45 | codec: wm5102@1a { | ||
46 | compatible = "wlf,wm5102"; | ||
47 | reg = <0x1a>; | ||
48 | interrupts = <347>; | ||
49 | #interrupt-cells = <2>; | ||
50 | interrupt-parent = <&gic>; | ||
51 | |||
52 | gpio-controller; | ||
53 | #gpio-cells = <2>; | ||
54 | |||
55 | wlf,gpio-defaults = < | ||
56 | 0x00000000, /* AIF1TXLRCLK */ | ||
57 | 0xffffffff, | ||
58 | 0xffffffff, | ||
59 | 0xffffffff, | ||
60 | 0xffffffff, | ||
61 | >; | ||
62 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/max77693.txt b/Documentation/devicetree/bindings/mfd/max77693.txt new file mode 100644 index 000000000000..11921cc417bf --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/max77693.txt | |||
@@ -0,0 +1,55 @@ | |||
1 | Maxim MAX77693 multi-function device | ||
2 | |||
3 | MAX77693 is a Multifunction device with the following submodules: | ||
4 | - PMIC, | ||
5 | - CHARGER, | ||
6 | - LED, | ||
7 | - MUIC, | ||
8 | - HAPTIC | ||
9 | |||
10 | It is interfaced to host controller using i2c. | ||
11 | This document describes the bindings for the mfd device. | ||
12 | |||
13 | Required properties: | ||
14 | - compatible : Must be "maxim,max77693". | ||
15 | - reg : Specifies the i2c slave address of PMIC block. | ||
16 | - interrupts : This i2c device has an IRQ line connected to the main SoC. | ||
17 | - interrupt-parent : The parent interrupt controller. | ||
18 | |||
19 | Optional properties: | ||
20 | - regulators : The regulators of max77693 have to be instantiated under subnod | ||
21 | named "regulators" using the following format. | ||
22 | |||
23 | regulators { | ||
24 | regualtor-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER | ||
25 | standard regulator constratints[*]. | ||
26 | }; | ||
27 | |||
28 | [*] refer Documentation/devicetree/bindings/regulator/regulator.txt | ||
29 | |||
30 | Example: | ||
31 | max77693@66 { | ||
32 | compatible = "maxim,max77693"; | ||
33 | reg = <0x66>; | ||
34 | interrupt-parent = <&gpx1>; | ||
35 | interrupts = <5 2>; | ||
36 | |||
37 | regulators { | ||
38 | esafeout@1 { | ||
39 | regulator-compatible = "ESAFEOUT1"; | ||
40 | regulator-name = "ESAFEOUT1"; | ||
41 | regulator-boot-on; | ||
42 | }; | ||
43 | esafeout@2 { | ||
44 | regulator-compatible = "ESAFEOUT2"; | ||
45 | regulator-name = "ESAFEOUT2"; | ||
46 | }; | ||
47 | charger@0 { | ||
48 | regulator-compatible = "CHARGER"; | ||
49 | regulator-name = "CHARGER"; | ||
50 | regulator-min-microamp = <60000>; | ||
51 | regulator-max-microamp = <2580000>; | ||
52 | regulator-boot-on; | ||
53 | }; | ||
54 | }; | ||
55 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/max8998.txt b/Documentation/devicetree/bindings/mfd/max8998.txt new file mode 100644 index 000000000000..23a3650ff2a2 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/max8998.txt | |||
@@ -0,0 +1,119 @@ | |||
1 | * Maxim MAX8998, National/TI LP3974 multi-function device | ||
2 | |||
3 | The Maxim MAX8998 is a multi-function device which includes voltage/current | ||
4 | regulators, real time clock, battery charging controller and several | ||
5 | other sub-blocks. It is interfaced using an I2C interface. Each sub-block | ||
6 | is addressed by the host system using different i2c slave address. | ||
7 | |||
8 | PMIC sub-block | ||
9 | -------------- | ||
10 | |||
11 | The PMIC sub-block contains a number of voltage and current regulators, | ||
12 | with controllable parameters and dynamic voltage scaling capability. | ||
13 | In addition, it includes a real time clock and battery charging controller | ||
14 | as well. It is accessible at I2C address 0x66. | ||
15 | |||
16 | Required properties: | ||
17 | - compatible: Should be one of the following: | ||
18 | - "maxim,max8998" for Maxim MAX8998 | ||
19 | - "national,lp3974" or "ti,lp3974" for National/TI LP3974. | ||
20 | - reg: Specifies the i2c slave address of the pmic block. It should be 0x66. | ||
21 | |||
22 | Optional properties: | ||
23 | - interrupt-parent: Specifies the phandle of the interrupt controller to which | ||
24 | the interrupts from MAX8998 are routed to. | ||
25 | - interrupts: Interrupt specifiers for two interrupt sources. | ||
26 | - First interrupt specifier is for main interrupt. | ||
27 | - Second interrupt specifier is for power-on/-off interrupt. | ||
28 | - max8998,pmic-buck1-dvs-gpios: GPIO specifiers for two host gpios used | ||
29 | for buck 1 dvs. The format of the gpio specifier depends on the gpio | ||
30 | controller. | ||
31 | - max8998,pmic-buck2-dvs-gpio: GPIO specifier for host gpio used | ||
32 | for buck 2 dvs. The format of the gpio specifier depends on the gpio | ||
33 | controller. | ||
34 | - max8998,pmic-buck1-default-dvs-idx: Default voltage setting selected from | ||
35 | the possible 4 options selectable by the dvs gpios. The value of this | ||
36 | property should be 0, 1, 2 or 3. If not specified or out of range, | ||
37 | a default value of 0 is taken. | ||
38 | - max8998,pmic-buck2-default-dvs-idx: Default voltage setting selected from | ||
39 | the possible 2 options selectable by the dvs gpios. The value of this | ||
40 | property should be 0 or 1. If not specified or out of range, a default | ||
41 | value of 0 is taken. | ||
42 | - max8998,pmic-buck-voltage-lock: If present, disallows changing of | ||
43 | preprogrammed buck dvfs voltages. | ||
44 | |||
45 | Additional properties required if max8998,pmic-buck1-dvs-gpios is defined: | ||
46 | - max8998,pmic-buck1-dvs-voltage: An array of 4 voltage values in microvolts | ||
47 | for buck1 regulator that can be selected using dvs gpio. | ||
48 | |||
49 | Additional properties required if max8998,pmic-buck2-dvs-gpio is defined: | ||
50 | - max8998,pmic-buck2-dvs-voltage: An array of 2 voltage values in microvolts | ||
51 | for buck2 regulator that can be selected using dvs gpio. | ||
52 | |||
53 | Regulators: All the regulators of MAX8998 to be instantiated shall be | ||
54 | listed in a child node named 'regulators'. Each regulator is represented | ||
55 | by a child node of the 'regulators' node. | ||
56 | |||
57 | regulator-name { | ||
58 | /* standard regulator bindings here */ | ||
59 | }; | ||
60 | |||
61 | Following regulators of the MAX8998 PMIC block are supported. Note that | ||
62 | the 'n' in regulator name, as in LDOn or BUCKn, represents the LDO or BUCK | ||
63 | number as described in MAX8998 datasheet. | ||
64 | |||
65 | - LDOn | ||
66 | - valid values for n are 2 to 17 | ||
67 | - Example: LDO2, LDO10, LDO17 | ||
68 | - BUCKn | ||
69 | - valid values for n are 1 to 4. | ||
70 | - Example: BUCK1, BUCK2, BUCK3, BUCK4 | ||
71 | |||
72 | - ENVICHG: Battery Charging Current Monitor Output. This is a fixed | ||
73 | voltage type regulator | ||
74 | |||
75 | - ESAFEOUT1: (ldo19) | ||
76 | - ESAFEOUT2: (ld020) | ||
77 | |||
78 | Standard regulator bindings are used inside regulator subnodes. Check | ||
79 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
80 | for more details. | ||
81 | |||
82 | Example: | ||
83 | |||
84 | pmic@66 { | ||
85 | compatible = "maxim,max8998-pmic"; | ||
86 | reg = <0x66>; | ||
87 | interrupt-parent = <&wakeup_eint>; | ||
88 | interrupts = <4 0>, <3 0>; | ||
89 | |||
90 | /* Buck 1 DVS settings */ | ||
91 | max8998,pmic-buck1-default-dvs-idx = <0>; | ||
92 | max8998,pmic-buck1-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */ | ||
93 | <&gpx0 1 1 0 0>; /* SET2 */ | ||
94 | max8998,pmic-buck1-dvs-voltage = <1350000>, <1300000>, | ||
95 | <1000000>, <950000>; | ||
96 | |||
97 | /* Buck 2 DVS settings */ | ||
98 | max8998,pmic-buck2-default-dvs-idx = <0>; | ||
99 | max8998,pmic-buck2-dvs-gpio = <&gpx0 0 3 0 0>; /* SET3 */ | ||
100 | max8998,pmic-buck2-dvs-voltage = <1350000>, <1300000>; | ||
101 | |||
102 | /* Regulators to instantiate */ | ||
103 | regulators { | ||
104 | ldo2_reg: LDO2 { | ||
105 | regulator-name = "VDD_ALIVE_1.1V"; | ||
106 | regulator-min-microvolt = <1100000>; | ||
107 | regulator-max-microvolt = <1100000>; | ||
108 | regulator-always-on; | ||
109 | }; | ||
110 | |||
111 | buck1_reg: BUCK1 { | ||
112 | regulator-name = "VDD_ARM_1.2V"; | ||
113 | regulator-min-microvolt = <950000>; | ||
114 | regulator-max-microvolt = <1350000>; | ||
115 | regulator-always-on; | ||
116 | regulator-boot-on; | ||
117 | }; | ||
118 | }; | ||
119 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/palmas.txt b/Documentation/devicetree/bindings/mfd/palmas.txt new file mode 100644 index 000000000000..892537d1a48f --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/palmas.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | * palmas device tree bindings | ||
2 | |||
3 | The TI palmas family current members :- | ||
4 | twl6035 (palmas) | ||
5 | twl6037 (palmas) | ||
6 | tps65913 (palmas) | ||
7 | tps65914 (palmas) | ||
8 | |||
9 | Required properties: | ||
10 | - compatible : Should be from the list | ||
11 | ti,twl6035 | ||
12 | ti,twl6036 | ||
13 | ti,twl6037 | ||
14 | ti,tps65913 | ||
15 | ti,tps65914 | ||
16 | ti,tps80036 | ||
17 | and also the generic series names | ||
18 | ti,palmas | ||
19 | - interrupt-controller : palmas has its own internal IRQs | ||
20 | - #interrupt-cells : should be set to 2 for IRQ number and flags | ||
21 | The first cell is the IRQ number. | ||
22 | The second cell is the flags, encoded as the trigger masks from | ||
23 | Documentation/devicetree/bindings/interrupts.txt | ||
24 | - interrupt-parent : The parent interrupt controller. | ||
25 | |||
26 | Optional properties: | ||
27 | ti,mux-padX : set the pad register X (1-2) to the correct muxing for the | ||
28 | hardware, if not set will use muxing in OTP. | ||
29 | |||
30 | Example: | ||
31 | |||
32 | palmas { | ||
33 | compatible = "ti,twl6035", "ti,palmas"; | ||
34 | reg = <0x48> | ||
35 | interrupt-parent = <&intc>; | ||
36 | interrupt-controller; | ||
37 | #interrupt-cells = <2>; | ||
38 | |||
39 | ti,mux-pad1 = <0>; | ||
40 | ti,mux-pad2 = <0>; | ||
41 | |||
42 | #address-cells = <1>; | ||
43 | #size-cells = <0>; | ||
44 | |||
45 | pmic { | ||
46 | compatible = "ti,twl6035-pmic", "ti,palmas-pmic"; | ||
47 | .... | ||
48 | }; | ||
49 | } | ||
diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt new file mode 100644 index 000000000000..8e15ec35ac99 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | Texas Instruments TWL family (twl4030) reset and power management module | ||
2 | |||
3 | The power management module inside the TWL family provides several facilities | ||
4 | to control the power resources, including power scripts. For now, the | ||
5 | binding only supports the complete shutdown of the system after poweroff. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible : must be "ti,twl4030-power" | ||
9 | |||
10 | Optional properties: | ||
11 | - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or | ||
12 | SLEEP-to-OFF transition when the system poweroffs. | ||
13 | |||
14 | Example: | ||
15 | &i2c1 { | ||
16 | clock-frequency = <2600000>; | ||
17 | |||
18 | twl: twl@48 { | ||
19 | reg = <0x48>; | ||
20 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | ||
21 | interrupt-parent = <&intc>; | ||
22 | |||
23 | twl_power: power { | ||
24 | compatible = "ti,twl4030-power"; | ||
25 | ti,use_poweroff; | ||
26 | }; | ||
27 | }; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt new file mode 100644 index 000000000000..094ae010f2fb --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | Broadcom BCM281xx SDHCI | ||
2 | |||
3 | This file documents differences between the core properties in mmc.txt | ||
4 | and the properties present in the bcm281xx SDHCI | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : Should be "bcm,kona-sdhci" | ||
8 | |||
9 | Example: | ||
10 | |||
11 | sdio2: sdio@0x3f1a0000 { | ||
12 | compatible = "bcm,kona-sdhci"; | ||
13 | reg = <0x3f1a0000 0x10000>; | ||
14 | interrupts = <0x0 74 0x4>; | ||
15 | }; | ||
16 | |||
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 85aada2263d5..458b57f199af 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt | |||
@@ -28,6 +28,7 @@ Optional properties: | |||
28 | - cap-mmc-highspeed: MMC high-speed timing is supported | 28 | - cap-mmc-highspeed: MMC high-speed timing is supported |
29 | - cap-power-off-card: powering off the card is safe | 29 | - cap-power-off-card: powering off the card is safe |
30 | - cap-sdio-irq: enable SDIO IRQ signalling on this interface | 30 | - cap-sdio-irq: enable SDIO IRQ signalling on this interface |
31 | - full-pwr-cycle: full power cycle of the card is supported | ||
31 | 32 | ||
32 | *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line | 33 | *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line |
33 | polarity properties, we have to fix the meaning of the "normal" and "inverted" | 34 | polarity properties, we have to fix the meaning of the "normal" and "inverted" |
diff --git a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt new file mode 100644 index 000000000000..8a3d91d47b6a --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | * Rockchip specific extensions to the Synopsis Designware Mobile | ||
2 | Storage Host Controller | ||
3 | |||
4 | The Synopsis designware mobile storage host controller is used to interface | ||
5 | a SoC with storage medium such as eMMC or SD/MMC cards. This file documents | ||
6 | differences between the core Synopsis dw mshc controller properties described | ||
7 | by synopsis-dw-mshc.txt and the properties used by the Rockchip specific | ||
8 | extensions to the Synopsis Designware Mobile Storage Host Controller. | ||
9 | |||
10 | Required Properties: | ||
11 | |||
12 | * compatible: should be | ||
13 | - "rockchip,rk2928-dw-mshc": for Rockchip RK2928 and following | ||
14 | |||
15 | Example: | ||
16 | |||
17 | rkdwmmc0@12200000 { | ||
18 | compatible = "rockchip,rk2928-dw-mshc"; | ||
19 | reg = <0x12200000 0x1000>; | ||
20 | interrupts = <0 75 0>; | ||
21 | #address-cells = <1>; | ||
22 | #size-cells = <0>; | ||
23 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt index 726fd2122a13..cdcebea9c6f5 100644 --- a/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsis-dw-mshc.txt | |||
@@ -39,6 +39,19 @@ Required Properties: | |||
39 | 39 | ||
40 | Optional properties: | 40 | Optional properties: |
41 | 41 | ||
42 | * clocks: from common clock binding: handle to biu and ciu clocks for the | ||
43 | bus interface unit clock and the card interface unit clock. | ||
44 | |||
45 | * clock-names: from common clock binding: Shall be "biu" and "ciu". | ||
46 | If the biu clock is missing we'll simply skip enabling it. If the | ||
47 | ciu clock is missing we'll just assume that the clock is running at | ||
48 | clock-frequency. It is an error to omit both the ciu clock and the | ||
49 | clock-frequency. | ||
50 | |||
51 | * clock-frequency: should be the frequency (in Hz) of the ciu clock. If this | ||
52 | is specified and the ciu clock is specified then we'll try to set the ciu | ||
53 | clock to this at probe time. | ||
54 | |||
42 | * num-slots: specifies the number of slots supported by the controller. | 55 | * num-slots: specifies the number of slots supported by the controller. |
43 | The number of physical slots actually used could be equal or less than the | 56 | The number of physical slots actually used could be equal or less than the |
44 | value specified by num-slots. If this property is not specified, the value | 57 | value specified by num-slots. If this property is not specified, the value |
@@ -51,10 +64,13 @@ Optional properties: | |||
51 | * card-detect-delay: Delay in milli-seconds before detecting card after card | 64 | * card-detect-delay: Delay in milli-seconds before detecting card after card |
52 | insert event. The default value is 0. | 65 | insert event. The default value is 0. |
53 | 66 | ||
54 | * supports-highspeed: Enables support for high speed cards (upto 50MHz) | 67 | * supports-highspeed: Enables support for high speed cards (up to 50MHz) |
55 | 68 | ||
56 | * broken-cd: as documented in mmc core bindings. | 69 | * broken-cd: as documented in mmc core bindings. |
57 | 70 | ||
71 | * vmmc-supply: The phandle to the regulator to use for vmmc. If this is | ||
72 | specified we'll defer probe until we can find this regulator. | ||
73 | |||
58 | Aliases: | 74 | Aliases: |
59 | 75 | ||
60 | - All the MSHC controller nodes should be represented in the aliases node using | 76 | - All the MSHC controller nodes should be represented in the aliases node using |
@@ -67,6 +83,8 @@ board specific portions as listed below. | |||
67 | 83 | ||
68 | dwmmc0@12200000 { | 84 | dwmmc0@12200000 { |
69 | compatible = "snps,dw-mshc"; | 85 | compatible = "snps,dw-mshc"; |
86 | clocks = <&clock 351>, <&clock 132>; | ||
87 | clock-names = "biu", "ciu"; | ||
70 | reg = <0x12200000 0x1000>; | 88 | reg = <0x12200000 0x1000>; |
71 | interrupts = <0 75 0>; | 89 | interrupts = <0 75 0>; |
72 | #address-cells = <1>; | 90 | #address-cells = <1>; |
@@ -74,11 +92,13 @@ board specific portions as listed below. | |||
74 | }; | 92 | }; |
75 | 93 | ||
76 | dwmmc0@12200000 { | 94 | dwmmc0@12200000 { |
95 | clock-frequency = <400000000>; | ||
77 | num-slots = <1>; | 96 | num-slots = <1>; |
78 | supports-highspeed; | 97 | supports-highspeed; |
79 | broken-cd; | 98 | broken-cd; |
80 | fifo-depth = <0x80>; | 99 | fifo-depth = <0x80>; |
81 | card-detect-delay = <200>; | 100 | card-detect-delay = <200>; |
101 | vmmc-supply = <&buck8>; | ||
82 | 102 | ||
83 | slot@0 { | 103 | slot@0 { |
84 | reg = <0>; | 104 | reg = <0>; |
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt index 6a983c1d87cd..df338cb5059c 100644 --- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt +++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt | |||
@@ -29,6 +29,13 @@ Optional properties: | |||
29 | "bch4" 4-bit BCH ecc code | 29 | "bch4" 4-bit BCH ecc code |
30 | "bch8" 8-bit BCH ecc code | 30 | "bch8" 8-bit BCH ecc code |
31 | 31 | ||
32 | - ti,nand-xfer-type: A string setting the data transfer type. One of: | ||
33 | |||
34 | "prefetch-polled" Prefetch polled mode (default) | ||
35 | "polled" Polled mode, without prefetch | ||
36 | "prefetch-dma" Prefetch enabled sDMA mode | ||
37 | "prefetch-irq" Prefetch enabled irq mode | ||
38 | |||
32 | - elm_id: Specifies elm device node. This is required to support BCH | 39 | - elm_id: Specifies elm device node. This is required to support BCH |
33 | error correction using ELM module. | 40 | error correction using ELM module. |
34 | 41 | ||
@@ -55,6 +62,7 @@ Example for an AM33xx board: | |||
55 | reg = <0 0 0>; /* CS0, offset 0 */ | 62 | reg = <0 0 0>; /* CS0, offset 0 */ |
56 | nand-bus-width = <16>; | 63 | nand-bus-width = <16>; |
57 | ti,nand-ecc-opt = "bch8"; | 64 | ti,nand-ecc-opt = "bch8"; |
65 | ti,nand-xfer-type = "polled"; | ||
58 | 66 | ||
59 | gpmc,sync-clk-ps = <0>; | 67 | gpmc,sync-clk-ps = <0>; |
60 | gpmc,cs-on-ns = <0>; | 68 | gpmc,cs-on-ns = <0>; |
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt new file mode 100644 index 000000000000..b90bfcd138ff --- /dev/null +++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | * Allwinner EMAC ethernet controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "allwinner,sun4i-emac". | ||
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 | - clocks: A phandle to the reference clock for this device | ||
10 | |||
11 | Optional properties: | ||
12 | - (local-)mac-address: mac address to be used by this driver | ||
13 | |||
14 | Example: | ||
15 | |||
16 | emac: ethernet@01c0b000 { | ||
17 | compatible = "allwinner,sun4i-emac"; | ||
18 | reg = <0x01c0b000 0x1000>; | ||
19 | interrupts = <55>; | ||
20 | clocks = <&ahb_gates 17>; | ||
21 | phy = <&phy0>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt b/Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt new file mode 100644 index 000000000000..00b9f9a3ec1d --- /dev/null +++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-mdio.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | * Allwinner A10 MDIO Ethernet Controller interface | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "allwinner,sun4i-mdio". | ||
5 | - reg: address and length of the register set for the device. | ||
6 | |||
7 | Optional properties: | ||
8 | - phy-supply: phandle to a regulator if the PHY needs one | ||
9 | |||
10 | Example at the SoC level: | ||
11 | mdio@01c0b080 { | ||
12 | compatible = "allwinner,sun4i-mdio"; | ||
13 | reg = <0x01c0b080 0x14>; | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <0>; | ||
16 | }; | ||
17 | |||
18 | And at the board level: | ||
19 | |||
20 | mdio@01c0b080 { | ||
21 | phy-supply = <®_emac_3v3>; | ||
22 | |||
23 | phy0: ethernet-phy@0 { | ||
24 | reg = <0>; | ||
25 | }; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/arc_emac.txt b/Documentation/devicetree/bindings/net/arc_emac.txt new file mode 100644 index 000000000000..bcbc3f009158 --- /dev/null +++ b/Documentation/devicetree/bindings/net/arc_emac.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | * Synopsys ARC EMAC 10/100 Ethernet driver (EMAC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: Should be "snps,arc-emac" | ||
5 | - reg: Address and length of the register set for the device | ||
6 | - interrupts: Should contain the EMAC interrupts | ||
7 | - clock-frequency: CPU frequency. It is needed to calculate and set polling | ||
8 | period of EMAC. | ||
9 | - max-speed: Maximum supported data-rate in Mbit/s. In some HW configurations | ||
10 | bandwidth of external memory controller might be a limiting factor. That's why | ||
11 | it's required to specify which data-rate is supported on current SoC or FPGA. | ||
12 | For example if only 10 Mbit/s is supported (10BASE-T) set "10". If 100 Mbit/s is | ||
13 | supported (100BASE-TX) set "100". | ||
14 | - phy: PHY device attached to the EMAC via MDIO bus | ||
15 | |||
16 | Child nodes of the driver are the individual PHY devices connected to the | ||
17 | MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. | ||
18 | |||
19 | Optional properties: | ||
20 | - mac-address: 6 bytes, mac address | ||
21 | |||
22 | Examples: | ||
23 | |||
24 | ethernet@c0fc2000 { | ||
25 | compatible = "snps,arc-emac"; | ||
26 | reg = <0xc0fc2000 0x3c>; | ||
27 | interrupts = <6>; | ||
28 | mac-address = [ 00 11 22 33 44 55 ]; | ||
29 | clock-frequency = <80000000>; | ||
30 | max-speed = <100>; | ||
31 | phy = <&phy0>; | ||
32 | |||
33 | #address-cells = <1>; | ||
34 | #size-cells = <0>; | ||
35 | phy0: ethernet-phy@0 { | ||
36 | reg = <1>; | ||
37 | }; | ||
38 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt index 8ff324eaa889..56d6cc336e1c 100644 --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt +++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | |||
@@ -16,6 +16,8 @@ Optional properties: | |||
16 | 16 | ||
17 | - clock-frequency : The oscillator frequency driving the flexcan device | 17 | - clock-frequency : The oscillator frequency driving the flexcan device |
18 | 18 | ||
19 | - xceiver-supply: Regulator that powers the CAN transceiver | ||
20 | |||
19 | Example: | 21 | Example: |
20 | 22 | ||
21 | can@1c000 { | 23 | can@1c000 { |
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt index 4f2ca6b4a182..05d660e4ac64 100644 --- a/Documentation/devicetree/bindings/net/cpsw.txt +++ b/Documentation/devicetree/bindings/net/cpsw.txt | |||
@@ -28,6 +28,8 @@ Optional properties: | |||
28 | Slave Properties: | 28 | Slave Properties: |
29 | Required properties: | 29 | Required properties: |
30 | - phy_id : Specifies slave phy id | 30 | - phy_id : Specifies slave phy id |
31 | - phy-mode : The interface between the SoC and the PHY (a string | ||
32 | that of_get_phy_mode() can understand) | ||
31 | - mac-address : Specifies slave MAC address | 33 | - mac-address : Specifies slave MAC address |
32 | 34 | ||
33 | Optional properties: | 35 | Optional properties: |
@@ -58,11 +60,13 @@ Examples: | |||
58 | cpts_clock_shift = <29>; | 60 | cpts_clock_shift = <29>; |
59 | cpsw_emac0: slave@0 { | 61 | cpsw_emac0: slave@0 { |
60 | phy_id = <&davinci_mdio>, <0>; | 62 | phy_id = <&davinci_mdio>, <0>; |
63 | phy-mode = "rgmii-txid"; | ||
61 | /* Filled in by U-Boot */ | 64 | /* Filled in by U-Boot */ |
62 | mac-address = [ 00 00 00 00 00 00 ]; | 65 | mac-address = [ 00 00 00 00 00 00 ]; |
63 | }; | 66 | }; |
64 | cpsw_emac1: slave@1 { | 67 | cpsw_emac1: slave@1 { |
65 | phy_id = <&davinci_mdio>, <1>; | 68 | phy_id = <&davinci_mdio>, <1>; |
69 | phy-mode = "rgmii-txid"; | ||
66 | /* Filled in by U-Boot */ | 70 | /* Filled in by U-Boot */ |
67 | mac-address = [ 00 00 00 00 00 00 ]; | 71 | mac-address = [ 00 00 00 00 00 00 ]; |
68 | }; | 72 | }; |
@@ -84,11 +88,13 @@ Examples: | |||
84 | cpts_clock_shift = <29>; | 88 | cpts_clock_shift = <29>; |
85 | cpsw_emac0: slave@0 { | 89 | cpsw_emac0: slave@0 { |
86 | phy_id = <&davinci_mdio>, <0>; | 90 | phy_id = <&davinci_mdio>, <0>; |
91 | phy-mode = "rgmii-txid"; | ||
87 | /* Filled in by U-Boot */ | 92 | /* Filled in by U-Boot */ |
88 | mac-address = [ 00 00 00 00 00 00 ]; | 93 | mac-address = [ 00 00 00 00 00 00 ]; |
89 | }; | 94 | }; |
90 | cpsw_emac1: slave@1 { | 95 | cpsw_emac1: slave@1 { |
91 | phy_id = <&davinci_mdio>, <1>; | 96 | phy_id = <&davinci_mdio>, <1>; |
97 | phy-mode = "rgmii-txid"; | ||
92 | /* Filled in by U-Boot */ | 98 | /* Filled in by U-Boot */ |
93 | mac-address = [ 00 00 00 00 00 00 ]; | 99 | mac-address = [ 00 00 00 00 00 00 ]; |
94 | }; | 100 | }; |
diff --git a/Documentation/devicetree/bindings/net/davicom-dm9000.txt b/Documentation/devicetree/bindings/net/davicom-dm9000.txt new file mode 100644 index 000000000000..2d39c990e641 --- /dev/null +++ b/Documentation/devicetree/bindings/net/davicom-dm9000.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | Davicom DM9000 Fast Ethernet controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible = "davicom,dm9000"; | ||
5 | - reg : physical addresses and sizes of registers, must contain 2 entries: | ||
6 | first entry : address register, | ||
7 | second entry : data register. | ||
8 | - interrupt-parent : interrupt controller to which the device is connected | ||
9 | - interrupts : interrupt specifier specific to interrupt controller | ||
10 | |||
11 | Optional properties: | ||
12 | - local-mac-address : A bytestring of 6 bytes specifying Ethernet MAC address | ||
13 | to use (from firmware or bootloader) | ||
14 | - davicom,no-eeprom : Configuration EEPROM is not available | ||
15 | - davicom,ext-phy : Use external PHY | ||
16 | |||
17 | Example: | ||
18 | |||
19 | ethernet@18000000 { | ||
20 | compatible = "davicom,dm9000"; | ||
21 | reg = <0x18000000 0x2 0x18000004 0x2>; | ||
22 | interrupt-parent = <&gpn>; | ||
23 | interrupts = <7 4>; | ||
24 | local-mac-address = [00 00 de ad be ef]; | ||
25 | davicom,no-eeprom; | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt index 44afa0e5057d..4ff65047bb9a 100644 --- a/Documentation/devicetree/bindings/net/macb.txt +++ b/Documentation/devicetree/bindings/net/macb.txt | |||
@@ -4,7 +4,7 @@ Required properties: | |||
4 | - compatible: Should be "cdns,[<chip>-]{macb|gem}" | 4 | - compatible: Should be "cdns,[<chip>-]{macb|gem}" |
5 | Use "cdns,at91sam9260-macb" Atmel at91sam9260 and at91sam9263 SoCs. | 5 | Use "cdns,at91sam9260-macb" Atmel at91sam9260 and at91sam9263 SoCs. |
6 | Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb". | 6 | Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb". |
7 | Use "cnds,pc302-gem" for Picochip picoXcell pc302 and later devices based on | 7 | Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on |
8 | the Cadence GEM, or the generic form: "cdns,gem". | 8 | the Cadence GEM, or the generic form: "cdns,gem". |
9 | - reg: Address and length of the register set for the device | 9 | - reg: Address and length of the register set for the device |
10 | - interrupts: Should contain macb interrupt | 10 | - interrupts: Should contain macb interrupt |
diff --git a/Documentation/devicetree/bindings/net/marvell-orion-net.txt b/Documentation/devicetree/bindings/net/marvell-orion-net.txt new file mode 100644 index 000000000000..a73b79f227e1 --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell-orion-net.txt | |||
@@ -0,0 +1,85 @@ | |||
1 | Marvell Orion/Discovery ethernet controller | ||
2 | ============================================= | ||
3 | |||
4 | The Marvell Discovery ethernet controller can be found on Marvell Orion SoCs | ||
5 | (Kirkwood, Dove, Orion5x, and Discovery Innovation) and as part of Marvell | ||
6 | Discovery system controller chips (mv64[345]60). | ||
7 | |||
8 | The Discovery ethernet controller is described with two levels of nodes. The | ||
9 | first level describes the ethernet controller itself and the second level | ||
10 | describes up to 3 ethernet port nodes within that controller. The reason for | ||
11 | the multiple levels is that the port registers are interleaved within a single | ||
12 | set of controller registers. Each port node describes port-specific properties. | ||
13 | |||
14 | Note: The above separation is only true for Discovery system controllers. | ||
15 | For Orion SoCs we stick to the separation, although there each controller has | ||
16 | only one port associated. Multiple ports are implemented as multiple single-port | ||
17 | controllers. As Kirkwood has some issues with proper initialization after reset, | ||
18 | an extra compatible string is added for it. | ||
19 | |||
20 | * Ethernet controller node | ||
21 | |||
22 | Required controller properties: | ||
23 | - #address-cells: shall be 1. | ||
24 | - #size-cells: shall be 0. | ||
25 | - compatible: shall be one of "marvell,orion-eth", "marvell,kirkwood-eth". | ||
26 | - reg: address and length of the controller registers. | ||
27 | |||
28 | Optional controller properties: | ||
29 | - clocks: phandle reference to the controller clock. | ||
30 | - marvell,tx-checksum-limit: max tx packet size for hardware checksum. | ||
31 | |||
32 | * Ethernet port node | ||
33 | |||
34 | Required port properties: | ||
35 | - device_type: shall be "network". | ||
36 | - compatible: shall be one of "marvell,orion-eth-port", | ||
37 | "marvell,kirkwood-eth-port". | ||
38 | - reg: port number relative to ethernet controller, shall be 0, 1, or 2. | ||
39 | - interrupts: port interrupt. | ||
40 | - local-mac-address: 6 bytes MAC address. | ||
41 | |||
42 | Optional port properties: | ||
43 | - marvell,tx-queue-size: size of the transmit ring buffer. | ||
44 | - marvell,tx-sram-addr: address of transmit descriptor buffer located in SRAM. | ||
45 | - marvell,tx-sram-size: size of transmit descriptor buffer located in SRAM. | ||
46 | - marvell,rx-queue-size: size of the receive ring buffer. | ||
47 | - marvell,rx-sram-addr: address of receive descriptor buffer located in SRAM. | ||
48 | - marvell,rx-sram-size: size of receive descriptor buffer located in SRAM. | ||
49 | |||
50 | and | ||
51 | |||
52 | - phy-handle: phandle reference to ethernet PHY. | ||
53 | |||
54 | or | ||
55 | |||
56 | - speed: port speed if no PHY connected. | ||
57 | - duplex: port mode if no PHY connected. | ||
58 | |||
59 | * Node example: | ||
60 | |||
61 | mdio-bus { | ||
62 | ... | ||
63 | ethphy: ethernet-phy@8 { | ||
64 | device_type = "ethernet-phy"; | ||
65 | ... | ||
66 | }; | ||
67 | }; | ||
68 | |||
69 | eth: ethernet-controller@72000 { | ||
70 | compatible = "marvell,orion-eth"; | ||
71 | #address-cells = <1>; | ||
72 | #size-cells = <0>; | ||
73 | reg = <0x72000 0x2000>; | ||
74 | clocks = <&gate_clk 2>; | ||
75 | marvell,tx-checksum-limit = <1600>; | ||
76 | |||
77 | ethernet@0 { | ||
78 | device_type = "network"; | ||
79 | compatible = "marvell,orion-eth-port"; | ||
80 | reg = <0>; | ||
81 | interrupts = <29>; | ||
82 | phy-handle = <ðphy>; | ||
83 | local-mac-address = [00 00 00 00 00 00]; | ||
84 | }; | ||
85 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/micrel-ks8851.txt b/Documentation/devicetree/bindings/net/micrel-ks8851.txt new file mode 100644 index 000000000000..11ace3c3d805 --- /dev/null +++ b/Documentation/devicetree/bindings/net/micrel-ks8851.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | Micrel KS8851 Ethernet mac | ||
2 | |||
3 | Required properties: | ||
4 | - compatible = "micrel,ks8851-ml" of parallel interface | ||
5 | - reg : 2 physical address and size of registers for data and command | ||
6 | - interrupts : interrupt connection | ||
7 | |||
8 | Optional properties: | ||
9 | - local-mac-address : Ethernet mac address to use | ||
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index 060bbf098ef3..261c563b5f06 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt | |||
@@ -12,6 +12,16 @@ Required properties: | |||
12 | property | 12 | property |
13 | - phy-mode: String, operation mode of the PHY interface. | 13 | - phy-mode: String, operation mode of the PHY interface. |
14 | Supported values are: "mii", "rmii", "gmii", "rgmii". | 14 | Supported values are: "mii", "rmii", "gmii", "rgmii". |
15 | - snps,phy-addr phy address to connect to. | ||
16 | - snps,reset-gpio gpio number for phy reset. | ||
17 | - snps,reset-active-low boolean flag to indicate if phy reset is active low. | ||
18 | - snps,reset-delays-us is triplet of delays | ||
19 | The 1st cell is reset pre-delay in micro seconds. | ||
20 | The 2nd cell is reset pulse in micro seconds. | ||
21 | The 3rd cell is reset post-delay in micro seconds. | ||
22 | - snps,pbl Programmable Burst Length | ||
23 | - snps,fixed-burst Program the DMA to use the fixed burst mode | ||
24 | - snps,mixed-burst Program the DMA to use the mixed burst mode | ||
15 | 25 | ||
16 | Optional properties: | 26 | Optional properties: |
17 | - mac-address: 6 bytes, mac address | 27 | - mac-address: 6 bytes, mac address |
diff --git a/Documentation/devicetree/bindings/net/via-velocity.txt b/Documentation/devicetree/bindings/net/via-velocity.txt new file mode 100644 index 000000000000..b3db469b1ad7 --- /dev/null +++ b/Documentation/devicetree/bindings/net/via-velocity.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | * VIA Velocity 10/100/1000 Network Controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "via,velocity-vt6110" | ||
5 | - reg : Address and length of the io space | ||
6 | - interrupts : Should contain the controller interrupt line | ||
7 | |||
8 | Optional properties: | ||
9 | - no-eeprom : PCI network cards use an external EEPROM to store data. Embedded | ||
10 | devices quite often set this data in uboot and do not provide an eeprom. | ||
11 | Specify this option if you have no external eeprom. | ||
12 | |||
13 | Examples: | ||
14 | |||
15 | eth0@d8004000 { | ||
16 | compatible = "via,velocity-vt6110"; | ||
17 | reg = <0xd8004000 0x400>; | ||
18 | interrupts = <10>; | ||
19 | no-eeprom; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt new file mode 100644 index 000000000000..e2371f5cdebe --- /dev/null +++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt | |||
@@ -0,0 +1,73 @@ | |||
1 | * Synopsis Designware PCIe interface | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should contain "snps,dw-pcie" to identify the | ||
5 | core, plus an identifier for the specific instance, such | ||
6 | as "samsung,exynos5440-pcie". | ||
7 | - reg: base addresses and lengths of the pcie controller, | ||
8 | the phy controller, additional register for the phy controller. | ||
9 | - interrupts: interrupt values for level interrupt, | ||
10 | pulse interrupt, special interrupt. | ||
11 | - clocks: from common clock binding: handle to pci clock. | ||
12 | - clock-names: from common clock binding: should be "pcie" and "pcie_bus". | ||
13 | - #address-cells: set to <3> | ||
14 | - #size-cells: set to <2> | ||
15 | - device_type: set to "pci" | ||
16 | - ranges: ranges for the PCI memory and I/O regions | ||
17 | - #interrupt-cells: set to <1> | ||
18 | - interrupt-map-mask and interrupt-map: standard PCI properties | ||
19 | to define the mapping of the PCIe interface to interrupt | ||
20 | numbers. | ||
21 | - reset-gpio: gpio pin number of power good signal | ||
22 | |||
23 | Example: | ||
24 | |||
25 | SoC specific DT Entry: | ||
26 | |||
27 | pcie@290000 { | ||
28 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
29 | reg = <0x290000 0x1000 | ||
30 | 0x270000 0x1000 | ||
31 | 0x271000 0x40>; | ||
32 | interrupts = <0 20 0>, <0 21 0>, <0 22 0>; | ||
33 | clocks = <&clock 28>, <&clock 27>; | ||
34 | clock-names = "pcie", "pcie_bus"; | ||
35 | #address-cells = <3>; | ||
36 | #size-cells = <2>; | ||
37 | device_type = "pci"; | ||
38 | ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */ | ||
39 | 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */ | ||
40 | 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
41 | #interrupt-cells = <1>; | ||
42 | interrupt-map-mask = <0 0 0 0>; | ||
43 | interrupt-map = <0x0 0 &gic 53>; | ||
44 | }; | ||
45 | |||
46 | pcie@2a0000 { | ||
47 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
48 | reg = <0x2a0000 0x1000 | ||
49 | 0x272000 0x1000 | ||
50 | 0x271040 0x40>; | ||
51 | interrupts = <0 23 0>, <0 24 0>, <0 25 0>; | ||
52 | clocks = <&clock 29>, <&clock 27>; | ||
53 | clock-names = "pcie", "pcie_bus"; | ||
54 | #address-cells = <3>; | ||
55 | #size-cells = <2>; | ||
56 | device_type = "pci"; | ||
57 | ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */ | ||
58 | 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */ | ||
59 | 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
60 | #interrupt-cells = <1>; | ||
61 | interrupt-map-mask = <0 0 0 0>; | ||
62 | interrupt-map = <0x0 0 &gic 56>; | ||
63 | }; | ||
64 | |||
65 | Board specific DT Entry: | ||
66 | |||
67 | pcie@290000 { | ||
68 | reset-gpio = <&pin_ctrl 5 0>; | ||
69 | }; | ||
70 | |||
71 | pcie@2a0000 { | ||
72 | reset-gpio = <&pin_ctrl 22 0>; | ||
73 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Documentation/devicetree/bindings/pci/mvebu-pci.txt new file mode 100644 index 000000000000..f8d405897a94 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt | |||
@@ -0,0 +1,221 @@ | |||
1 | * Marvell EBU PCIe interfaces | ||
2 | |||
3 | Mandatory properties: | ||
4 | - compatible: one of the following values: | ||
5 | marvell,armada-370-pcie | ||
6 | marvell,armada-xp-pcie | ||
7 | marvell,kirkwood-pcie | ||
8 | - #address-cells, set to <3> | ||
9 | - #size-cells, set to <2> | ||
10 | - #interrupt-cells, set to <1> | ||
11 | - bus-range: PCI bus numbers covered | ||
12 | - device_type, set to "pci" | ||
13 | - ranges: ranges for the PCI memory and I/O regions, as well as the | ||
14 | MMIO registers to control the PCIe interfaces. | ||
15 | |||
16 | In addition, the Device Tree node must have sub-nodes describing each | ||
17 | PCIe interface, having the following mandatory properties: | ||
18 | - reg: used only for interrupt mapping, so only the first four bytes | ||
19 | are used to refer to the correct bus number and device number. | ||
20 | - assigned-addresses: reference to the MMIO registers used to control | ||
21 | this PCIe interface. | ||
22 | - clocks: the clock associated to this PCIe interface | ||
23 | - marvell,pcie-port: the physical PCIe port number | ||
24 | - status: either "disabled" or "okay" | ||
25 | - device_type, set to "pci" | ||
26 | - #address-cells, set to <3> | ||
27 | - #size-cells, set to <2> | ||
28 | - #interrupt-cells, set to <1> | ||
29 | - ranges, empty property. | ||
30 | - interrupt-map-mask and interrupt-map, standard PCI properties to | ||
31 | define the mapping of the PCIe interface to interrupt numbers. | ||
32 | |||
33 | and the following optional properties: | ||
34 | - marvell,pcie-lane: the physical PCIe lane number, for ports having | ||
35 | multiple lanes. If this property is not found, we assume that the | ||
36 | value is 0. | ||
37 | |||
38 | Example: | ||
39 | |||
40 | pcie-controller { | ||
41 | compatible = "marvell,armada-xp-pcie"; | ||
42 | status = "disabled"; | ||
43 | device_type = "pci"; | ||
44 | |||
45 | #address-cells = <3>; | ||
46 | #size-cells = <2>; | ||
47 | |||
48 | bus-range = <0x00 0xff>; | ||
49 | |||
50 | ranges = <0x82000000 0 0xd0040000 0xd0040000 0 0x00002000 /* Port 0.0 registers */ | ||
51 | 0x82000000 0 0xd0042000 0xd0042000 0 0x00002000 /* Port 2.0 registers */ | ||
52 | 0x82000000 0 0xd0044000 0xd0044000 0 0x00002000 /* Port 0.1 registers */ | ||
53 | 0x82000000 0 0xd0048000 0xd0048000 0 0x00002000 /* Port 0.2 registers */ | ||
54 | 0x82000000 0 0xd004c000 0xd004c000 0 0x00002000 /* Port 0.3 registers */ | ||
55 | 0x82000000 0 0xd0080000 0xd0080000 0 0x00002000 /* Port 1.0 registers */ | ||
56 | 0x82000000 0 0xd0082000 0xd0082000 0 0x00002000 /* Port 3.0 registers */ | ||
57 | 0x82000000 0 0xd0084000 0xd0084000 0 0x00002000 /* Port 1.1 registers */ | ||
58 | 0x82000000 0 0xd0088000 0xd0088000 0 0x00002000 /* Port 1.2 registers */ | ||
59 | 0x82000000 0 0xd008c000 0xd008c000 0 0x00002000 /* Port 1.3 registers */ | ||
60 | 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */ | ||
61 | 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */ | ||
62 | |||
63 | pcie@1,0 { | ||
64 | device_type = "pci"; | ||
65 | assigned-addresses = <0x82000800 0 0xd0040000 0 0x2000>; | ||
66 | reg = <0x0800 0 0 0 0>; | ||
67 | #address-cells = <3>; | ||
68 | #size-cells = <2>; | ||
69 | #interrupt-cells = <1>; | ||
70 | ranges; | ||
71 | interrupt-map-mask = <0 0 0 0>; | ||
72 | interrupt-map = <0 0 0 0 &mpic 58>; | ||
73 | marvell,pcie-port = <0>; | ||
74 | marvell,pcie-lane = <0>; | ||
75 | clocks = <&gateclk 5>; | ||
76 | status = "disabled"; | ||
77 | }; | ||
78 | |||
79 | pcie@2,0 { | ||
80 | device_type = "pci"; | ||
81 | assigned-addresses = <0x82001000 0 0xd0044000 0 0x2000>; | ||
82 | reg = <0x1000 0 0 0 0>; | ||
83 | #address-cells = <3>; | ||
84 | #size-cells = <2>; | ||
85 | #interrupt-cells = <1>; | ||
86 | ranges; | ||
87 | interrupt-map-mask = <0 0 0 0>; | ||
88 | interrupt-map = <0 0 0 0 &mpic 59>; | ||
89 | marvell,pcie-port = <0>; | ||
90 | marvell,pcie-lane = <1>; | ||
91 | clocks = <&gateclk 6>; | ||
92 | status = "disabled"; | ||
93 | }; | ||
94 | |||
95 | pcie@3,0 { | ||
96 | device_type = "pci"; | ||
97 | assigned-addresses = <0x82001800 0 0xd0048000 0 0x2000>; | ||
98 | reg = <0x1800 0 0 0 0>; | ||
99 | #address-cells = <3>; | ||
100 | #size-cells = <2>; | ||
101 | #interrupt-cells = <1>; | ||
102 | ranges; | ||
103 | interrupt-map-mask = <0 0 0 0>; | ||
104 | interrupt-map = <0 0 0 0 &mpic 60>; | ||
105 | marvell,pcie-port = <0>; | ||
106 | marvell,pcie-lane = <2>; | ||
107 | clocks = <&gateclk 7>; | ||
108 | status = "disabled"; | ||
109 | }; | ||
110 | |||
111 | pcie@4,0 { | ||
112 | device_type = "pci"; | ||
113 | assigned-addresses = <0x82002000 0 0xd004c000 0 0x2000>; | ||
114 | reg = <0x2000 0 0 0 0>; | ||
115 | #address-cells = <3>; | ||
116 | #size-cells = <2>; | ||
117 | #interrupt-cells = <1>; | ||
118 | ranges; | ||
119 | interrupt-map-mask = <0 0 0 0>; | ||
120 | interrupt-map = <0 0 0 0 &mpic 61>; | ||
121 | marvell,pcie-port = <0>; | ||
122 | marvell,pcie-lane = <3>; | ||
123 | clocks = <&gateclk 8>; | ||
124 | status = "disabled"; | ||
125 | }; | ||
126 | |||
127 | pcie@5,0 { | ||
128 | device_type = "pci"; | ||
129 | assigned-addresses = <0x82002800 0 0xd0080000 0 0x2000>; | ||
130 | reg = <0x2800 0 0 0 0>; | ||
131 | #address-cells = <3>; | ||
132 | #size-cells = <2>; | ||
133 | #interrupt-cells = <1>; | ||
134 | ranges; | ||
135 | interrupt-map-mask = <0 0 0 0>; | ||
136 | interrupt-map = <0 0 0 0 &mpic 62>; | ||
137 | marvell,pcie-port = <1>; | ||
138 | marvell,pcie-lane = <0>; | ||
139 | clocks = <&gateclk 9>; | ||
140 | status = "disabled"; | ||
141 | }; | ||
142 | |||
143 | pcie@6,0 { | ||
144 | device_type = "pci"; | ||
145 | assigned-addresses = <0x82003000 0 0xd0084000 0 0x2000>; | ||
146 | reg = <0x3000 0 0 0 0>; | ||
147 | #address-cells = <3>; | ||
148 | #size-cells = <2>; | ||
149 | #interrupt-cells = <1>; | ||
150 | ranges; | ||
151 | interrupt-map-mask = <0 0 0 0>; | ||
152 | interrupt-map = <0 0 0 0 &mpic 63>; | ||
153 | marvell,pcie-port = <1>; | ||
154 | marvell,pcie-lane = <1>; | ||
155 | clocks = <&gateclk 10>; | ||
156 | status = "disabled"; | ||
157 | }; | ||
158 | |||
159 | pcie@7,0 { | ||
160 | device_type = "pci"; | ||
161 | assigned-addresses = <0x82003800 0 0xd0088000 0 0x2000>; | ||
162 | reg = <0x3800 0 0 0 0>; | ||
163 | #address-cells = <3>; | ||
164 | #size-cells = <2>; | ||
165 | #interrupt-cells = <1>; | ||
166 | ranges; | ||
167 | interrupt-map-mask = <0 0 0 0>; | ||
168 | interrupt-map = <0 0 0 0 &mpic 64>; | ||
169 | marvell,pcie-port = <1>; | ||
170 | marvell,pcie-lane = <2>; | ||
171 | clocks = <&gateclk 11>; | ||
172 | status = "disabled"; | ||
173 | }; | ||
174 | |||
175 | pcie@8,0 { | ||
176 | device_type = "pci"; | ||
177 | assigned-addresses = <0x82004000 0 0xd008c000 0 0x2000>; | ||
178 | reg = <0x4000 0 0 0 0>; | ||
179 | #address-cells = <3>; | ||
180 | #size-cells = <2>; | ||
181 | #interrupt-cells = <1>; | ||
182 | ranges; | ||
183 | interrupt-map-mask = <0 0 0 0>; | ||
184 | interrupt-map = <0 0 0 0 &mpic 65>; | ||
185 | marvell,pcie-port = <1>; | ||
186 | marvell,pcie-lane = <3>; | ||
187 | clocks = <&gateclk 12>; | ||
188 | status = "disabled"; | ||
189 | }; | ||
190 | pcie@9,0 { | ||
191 | device_type = "pci"; | ||
192 | assigned-addresses = <0x82004800 0 0xd0042000 0 0x2000>; | ||
193 | reg = <0x4800 0 0 0 0>; | ||
194 | #address-cells = <3>; | ||
195 | #size-cells = <2>; | ||
196 | #interrupt-cells = <1>; | ||
197 | ranges; | ||
198 | interrupt-map-mask = <0 0 0 0>; | ||
199 | interrupt-map = <0 0 0 0 &mpic 99>; | ||
200 | marvell,pcie-port = <2>; | ||
201 | marvell,pcie-lane = <0>; | ||
202 | clocks = <&gateclk 26>; | ||
203 | status = "disabled"; | ||
204 | }; | ||
205 | |||
206 | pcie@10,0 { | ||
207 | device_type = "pci"; | ||
208 | assigned-addresses = <0x82005000 0 0xd0082000 0 0x2000>; | ||
209 | reg = <0x5000 0 0 0 0>; | ||
210 | #address-cells = <3>; | ||
211 | #size-cells = <2>; | ||
212 | #interrupt-cells = <1>; | ||
213 | ranges; | ||
214 | interrupt-map-mask = <0 0 0 0>; | ||
215 | interrupt-map = <0 0 0 0 &mpic 103>; | ||
216 | marvell,pcie-port = <3>; | ||
217 | marvell,pcie-lane = <0>; | ||
218 | clocks = <&gateclk 27>; | ||
219 | status = "disabled"; | ||
220 | }; | ||
221 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt new file mode 100644 index 000000000000..41aeed38926d --- /dev/null +++ b/Documentation/devicetree/bindings/pci/pci.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | PCI bus bridges have standardized Device Tree bindings: | ||
2 | |||
3 | PCI Bus Binding to: IEEE Std 1275-1994 | ||
4 | http://www.openfirmware.org/ofwg/bindings/pci/pci2_1.pdf | ||
5 | |||
6 | And for the interrupt mapping part: | ||
7 | |||
8 | Open Firmware Recommended Practice: Interrupt Mapping | ||
9 | http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf | ||
diff --git a/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt new file mode 100644 index 000000000000..30b364e504ba --- /dev/null +++ b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | V3 Semiconductor V360 EPC PCI bridge | ||
2 | |||
3 | This bridge is found in the ARM Integrator/AP (Application Platform) | ||
4 | |||
5 | Integrator-specific notes: | ||
6 | |||
7 | - syscon: should contain a link to the syscon device node (since | ||
8 | on the Integrator, some registers in the syscon are required to | ||
9 | operate the V3). | ||
10 | |||
11 | V360 EPC specific notes: | ||
12 | |||
13 | - reg: should contain the base address of the V3 adapter. | ||
14 | - interrupts: should contain a reference to the V3 error interrupt | ||
15 | as routed on the system. | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt index bcfdab5d442e..3a7caf7a744a 100644 --- a/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt | |||
@@ -58,7 +58,7 @@ Some requirements for using fsl,imx-pinctrl binding: | |||
58 | 58 | ||
59 | Examples: | 59 | Examples: |
60 | usdhc@0219c000 { /* uSDHC4 */ | 60 | usdhc@0219c000 { /* uSDHC4 */ |
61 | fsl,card-wired; | 61 | non-removable; |
62 | vmmc-supply = <®_3p3v>; | 62 | vmmc-supply = <®_3p3v>; |
63 | status = "okay"; | 63 | status = "okay"; |
64 | pinctrl-names = "default"; | 64 | pinctrl-names = "default"; |
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,vf610-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,vf610-pinctrl.txt new file mode 100644 index 000000000000..ddcdeb697c29 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/fsl,vf610-pinctrl.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Freescale Vybrid VF610 IOMUX Controller | ||
2 | |||
3 | Please refer to fsl,imx-pinctrl.txt in this directory for common binding part | ||
4 | and usage. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: "fsl,vf610-iomuxc" | ||
8 | - fsl,pins: two integers array, represents a group of pins mux and config | ||
9 | setting. The format is fsl,pins = <PIN_FUNC_ID CONFIG>, PIN_FUNC_ID is | ||
10 | a pin working on a specific function, CONFIG is the pad setting value | ||
11 | such as pull-up, speed, ode for this pin. Please refer to Vybrid VF610 | ||
12 | datasheet for the valid pad config settings. | ||
13 | |||
14 | CONFIG bits definition: | ||
15 | PAD_CTL_SPEED_LOW (1 << 12) | ||
16 | PAD_CTL_SPEED_MED (2 << 12) | ||
17 | PAD_CTL_SPEED_HIGH (3 << 12) | ||
18 | PAD_CTL_SRE_FAST (1 << 11) | ||
19 | PAD_CTL_SRE_SLOW (0 << 11) | ||
20 | PAD_CTL_ODE (1 << 10) | ||
21 | PAD_CTL_HYS (1 << 9) | ||
22 | PAD_CTL_DSE_DISABLE (0 << 6) | ||
23 | PAD_CTL_DSE_150ohm (1 << 6) | ||
24 | PAD_CTL_DSE_75ohm (2 << 6) | ||
25 | PAD_CTL_DSE_50ohm (3 << 6) | ||
26 | PAD_CTL_DSE_37ohm (4 << 6) | ||
27 | PAD_CTL_DSE_30ohm (5 << 6) | ||
28 | PAD_CTL_DSE_25ohm (6 << 6) | ||
29 | PAD_CTL_DSE_20ohm (7 << 6) | ||
30 | PAD_CTL_PUS_100K_DOWN (0 << 4) | ||
31 | PAD_CTL_PUS_47K_UP (1 << 4) | ||
32 | PAD_CTL_PUS_100K_UP (2 << 4) | ||
33 | PAD_CTL_PUS_22K_UP (3 << 4) | ||
34 | PAD_CTL_PKE (1 << 3) | ||
35 | PAD_CTL_PUE (1 << 2) | ||
36 | PAD_CTL_OBE_ENABLE (1 << 1) | ||
37 | PAD_CTL_IBE_ENABLE (1 << 0) | ||
38 | PAD_CTL_OBE_IBE_ENABLE (3 << 0) | ||
39 | |||
40 | Please refer to vf610-pinfunc.h in device tree source folder | ||
41 | for all available PIN_FUNC_ID for Vybrid VF610. | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt new file mode 100644 index 000000000000..a186181c402b --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pdc-pinctrl.txt | |||
@@ -0,0 +1,127 @@ | |||
1 | ImgTec TZ1090 PDC pin controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "img,tz1090-pdc-pinctrl" | ||
5 | - reg: Should contain the register physical address and length of the | ||
6 | SOC_GPIO_CONTROL registers in the PDC register region. | ||
7 | |||
8 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
9 | common pinctrl bindings used by client devices, including the meaning of the | ||
10 | phrase "pin configuration node". | ||
11 | |||
12 | TZ1090-PDC's pin configuration nodes act as a container for an abitrary number | ||
13 | of subnodes. Each of these subnodes represents some desired configuration for a | ||
14 | pin, a group, or a list of pins or groups. This configuration can include the | ||
15 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
16 | parameters, such as pull-up, drive strength, etc. | ||
17 | |||
18 | The name of each subnode is not important; all subnodes should be enumerated | ||
19 | and processed purely based on their content. | ||
20 | |||
21 | Each subnode only affects those parameters that are explicitly listed. In | ||
22 | other words, a subnode that lists a mux function but no pin configuration | ||
23 | parameters implies no information about any pin configuration parameters. | ||
24 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
25 | information about e.g. the mux function. For this reason, even seemingly boolean | ||
26 | values are actually tristates in this binding: unspecified, off, or on. | ||
27 | Unspecified is represented as an absent property, and off/on are represented as | ||
28 | integer values 0 and 1. | ||
29 | |||
30 | Required subnode-properties: | ||
31 | - tz1090,pins : An array of strings. Each string contains the name of a pin or | ||
32 | group. Valid values for these names are listed below. | ||
33 | |||
34 | Optional subnode-properties: | ||
35 | - tz1090,function: A string containing the name of the function to mux to the | ||
36 | pin or group. Valid values for function names are listed below, including | ||
37 | which pingroups can be muxed to them. | ||
38 | - supported generic pinconfig properties (for further details see | ||
39 | Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt): | ||
40 | - bias-disable | ||
41 | - bias-high-impedance | ||
42 | - bias-bus-hold | ||
43 | - bias-pull-up | ||
44 | - bias-pull-down | ||
45 | - input-schmitt-enable | ||
46 | - input-schmitt-disable | ||
47 | - drive-strength: Integer, control drive strength of pins in mA. | ||
48 | 2: 2mA | ||
49 | 4: 4mA | ||
50 | 8: 8mA | ||
51 | 12: 12mA | ||
52 | - low-power-enable: Flag, power-on-start weak pull-down for invalid power. | ||
53 | - low-power-disable: Flag, power-on-start weak pull-down disabled. | ||
54 | |||
55 | Note that many of these properties are only valid for certain specific pins | ||
56 | or groups. See the TZ1090 TRM for complete details regarding which groups | ||
57 | support which functionality. The Linux pinctrl driver may also be a useful | ||
58 | reference. | ||
59 | |||
60 | Valid values for pin and group names are: | ||
61 | |||
62 | pins: | ||
63 | |||
64 | These all support bias-high-impediance, bias-pull-up, bias-pull-down, and | ||
65 | bias-bus-hold (which can also be provided to any of the groups below to set | ||
66 | it for all gpio pins in that group). | ||
67 | |||
68 | gpio0, gpio1, sys_wake0, sys_wake1, sys_wake2, ir_data, ext_power. | ||
69 | |||
70 | mux groups: | ||
71 | |||
72 | These all support function. | ||
73 | |||
74 | gpio0 | ||
75 | pins: gpio0. | ||
76 | function: ir_mod_stable_out. | ||
77 | gpio1 | ||
78 | pins: gpio1. | ||
79 | function: ir_mod_power_out. | ||
80 | |||
81 | drive groups: | ||
82 | |||
83 | These support input-schmitt-enable, input-schmitt-disable, | ||
84 | drive-strength, low-power-enable, and low-power-disable. | ||
85 | |||
86 | pdc | ||
87 | pins: gpio0, gpio1, sys_wake0, sys_wake1, sys_wake2, ir_data, | ||
88 | ext_power. | ||
89 | |||
90 | Example: | ||
91 | |||
92 | pinctrl_pdc: pinctrl@02006500 { | ||
93 | #gpio-range-cells = <3>; | ||
94 | compatible = "img,tz1090-pdc-pinctrl"; | ||
95 | reg = <0x02006500 0x100>; | ||
96 | }; | ||
97 | |||
98 | Example board file extracts: | ||
99 | |||
100 | &pinctrl_pdc { | ||
101 | pinctrl-names = "default"; | ||
102 | pinctrl-0 = <&syswake_default>; | ||
103 | |||
104 | syswake_default: syswakes { | ||
105 | syswake_cfg { | ||
106 | tz1090,pins = "sys_wake0", | ||
107 | "sys_wake1", | ||
108 | "sys_wake2"; | ||
109 | pull-up; | ||
110 | }; | ||
111 | }; | ||
112 | irmod_default: irmod { | ||
113 | gpio0_cfg { | ||
114 | tz1090,pins = "gpio0"; | ||
115 | tz1090,function = "ir_mod_stable_out"; | ||
116 | }; | ||
117 | gpio1_cfg { | ||
118 | tz1090,pins = "gpio1"; | ||
119 | tz1090,function = "ir_mod_power_out"; | ||
120 | }; | ||
121 | }; | ||
122 | }; | ||
123 | |||
124 | ir: ir@02006200 { | ||
125 | pinctrl-names = "default"; | ||
126 | pinctrl-0 = <&irmod_default>; | ||
127 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt new file mode 100644 index 000000000000..4b27c99f7f9d --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt | |||
@@ -0,0 +1,227 @@ | |||
1 | ImgTec TZ1090 pin controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "img,tz1090-pinctrl" | ||
5 | - reg: Should contain the register physical address and length of the pad | ||
6 | configuration registers (CR_PADS_* and CR_IF_CTL0). | ||
7 | |||
8 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
9 | common pinctrl bindings used by client devices, including the meaning of the | ||
10 | phrase "pin configuration node". | ||
11 | |||
12 | TZ1090's pin configuration nodes act as a container for an abitrary number of | ||
13 | subnodes. Each of these subnodes represents some desired configuration for a | ||
14 | pin, a group, or a list of pins or groups. This configuration can include the | ||
15 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
16 | parameters, such as pull-up, drive strength, etc. | ||
17 | |||
18 | The name of each subnode is not important; all subnodes should be enumerated | ||
19 | and processed purely based on their content. | ||
20 | |||
21 | Each subnode only affects those parameters that are explicitly listed. In | ||
22 | other words, a subnode that lists a mux function but no pin configuration | ||
23 | parameters implies no information about any pin configuration parameters. | ||
24 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
25 | information about e.g. the mux function. For this reason, even seemingly boolean | ||
26 | values are actually tristates in this binding: unspecified, off, or on. | ||
27 | Unspecified is represented as an absent property, and off/on are represented as | ||
28 | integer values 0 and 1. | ||
29 | |||
30 | Required subnode-properties: | ||
31 | - tz1090,pins : An array of strings. Each string contains the name of a pin or | ||
32 | group. Valid values for these names are listed below. | ||
33 | |||
34 | Optional subnode-properties: | ||
35 | - tz1090,function: A string containing the name of the function to mux to the | ||
36 | pin or group. Valid values for function names are listed below, including | ||
37 | which pingroups can be muxed to them. | ||
38 | - supported generic pinconfig properties (for further details see | ||
39 | Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt): | ||
40 | - bias-disable | ||
41 | - bias-high-impedance | ||
42 | - bias-bus-hold | ||
43 | - bias-pull-up | ||
44 | - bias-pull-down | ||
45 | - input-schmitt-enable | ||
46 | - input-schmitt-disable | ||
47 | - drive-strength: Integer, control drive strength of pins in mA. | ||
48 | 2: 2mA | ||
49 | 4: 4mA | ||
50 | 8: 8mA | ||
51 | 12: 12mA | ||
52 | |||
53 | |||
54 | Note that many of these properties are only valid for certain specific pins | ||
55 | or groups. See the TZ1090 TRM for complete details regarding which groups | ||
56 | support which functionality. The Linux pinctrl driver may also be a useful | ||
57 | reference. | ||
58 | |||
59 | Valid values for pin and group names are: | ||
60 | |||
61 | gpio pins: | ||
62 | |||
63 | These all support bias-high-impediance, bias-pull-up, bias-pull-down, and | ||
64 | bias-bus-hold (which can also be provided to any of the groups below to set | ||
65 | it for all pins in that group). | ||
66 | |||
67 | They also all support the some form of muxing. Any pins which are contained | ||
68 | in one of the mux groups (see below) can be muxed only to the functions | ||
69 | supported by the mux group. All other pins can be muxed to the "perip" | ||
70 | function which which enables them with their intended peripheral. | ||
71 | |||
72 | Different pins in the same mux group cannot be muxed to different functions, | ||
73 | however it is possible to mux only a subset of the pins in a mux group to a | ||
74 | particular function and leave the remaining pins unmuxed. This is useful if | ||
75 | the board connects certain pins in a group to other devices to be controlled | ||
76 | by GPIO, and you don't want the usual peripheral to have any control of the | ||
77 | pin. | ||
78 | |||
79 | ant_sel0, ant_sel1, gain0, gain1, gain2, gain3, gain4, gain5, gain6, gain7, | ||
80 | i2s_bclk_out, i2s_din, i2s_dout0, i2s_dout1, i2s_dout2, i2s_lrclk_out, | ||
81 | i2s_mclk, pa_on, pdm_a, pdm_b, pdm_c, pdm_d, pll_on, rx_hp, rx_on, | ||
82 | scb0_sclk, scb0_sdat, scb1_sclk, scb1_sdat, scb2_sclk, scb2_sdat, sdh_cd, | ||
83 | sdh_clk_in, sdh_wp, sdio_clk, sdio_cmd, sdio_d0, sdio_d1, sdio_d2, sdio_d3, | ||
84 | spi0_cs0, spi0_cs1, spi0_cs2, spi0_din, spi0_dout, spi0_mclk, spi1_cs0, | ||
85 | spi1_cs1, spi1_cs2, spi1_din, spi1_dout, spi1_mclk, tft_blank_ls, tft_blue0, | ||
86 | tft_blue1, tft_blue2, tft_blue3, tft_blue4, tft_blue5, tft_blue6, tft_blue7, | ||
87 | tft_green0, tft_green1, tft_green2, tft_green3, tft_green4, tft_green5, | ||
88 | tft_green6, tft_green7, tft_hsync_nr, tft_panelclk, tft_pwrsave, tft_red0, | ||
89 | tft_red1, tft_red2, tft_red3, tft_red4, tft_red5, tft_red6, tft_red7, | ||
90 | tft_vd12acb, tft_vdden_gd, tft_vsync_ns, tx_on, uart0_cts, uart0_rts, | ||
91 | uart0_rxd, uart0_txd, uart1_rxd, uart1_txd. | ||
92 | |||
93 | bias-high-impediance: supported. | ||
94 | bias-pull-up: supported. | ||
95 | bias-pull-down: supported. | ||
96 | bias-bus-hold: supported. | ||
97 | function: perip or those supported by pin's mux group. | ||
98 | |||
99 | other pins: | ||
100 | |||
101 | These other pins are part of various pin groups below, but can't be | ||
102 | controlled as GPIOs. They do however support bias-high-impediance, | ||
103 | bias-pull-up, bias-pull-down, and bias-bus-hold (which can also be provided | ||
104 | to any of the groups below to set it for all pins in that group). | ||
105 | |||
106 | clk_out0, clk_out1, tck, tdi, tdo, tms, trst. | ||
107 | |||
108 | bias-high-impediance: supported. | ||
109 | bias-pull-up: supported. | ||
110 | bias-pull-down: supported. | ||
111 | bias-bus-hold: supported. | ||
112 | |||
113 | mux groups: | ||
114 | |||
115 | These all support function, and some support drive configs. | ||
116 | |||
117 | afe | ||
118 | pins: tx_on, rx_on, pll_on, pa_on, rx_hp, ant_sel0, | ||
119 | ant_sel1, gain0, gain1, gain2, gain3, gain4, | ||
120 | gain5, gain6, gain7. | ||
121 | function: afe, ts_out_0. | ||
122 | input-schmitt-enable: supported. | ||
123 | input-schmitt-disable: supported. | ||
124 | drive-strength: supported. | ||
125 | pdm_d | ||
126 | pins: pdm_d. | ||
127 | function: pdm_dac, usb_vbus. | ||
128 | sdh | ||
129 | pins: sdh_cd, sdh_wp, sdh_clk_in. | ||
130 | function: sdh, sdio. | ||
131 | sdio | ||
132 | pins: sdio_clk, sdio_cmd, sdio_d0, sdio_d1, sdio_d2, | ||
133 | sdio_d3. | ||
134 | function: sdio, sdh. | ||
135 | spi1_cs2 | ||
136 | pins: spi1_cs2. | ||
137 | function: spi1_cs2, usb_vbus. | ||
138 | tft | ||
139 | pins: tft_red0, tft_red1, tft_red2, tft_red3, | ||
140 | tft_red4, tft_red5, tft_red6, tft_red7, | ||
141 | tft_green0, tft_green1, tft_green2, tft_green3, | ||
142 | tft_green4, tft_green5, tft_green6, tft_green7, | ||
143 | tft_blue0, tft_blue1, tft_blue2, tft_blue3, | ||
144 | tft_blue4, tft_blue5, tft_blue6, tft_blue7, | ||
145 | tft_vdden_gd, tft_panelclk, tft_blank_ls, | ||
146 | tft_vsync_ns, tft_hsync_nr, tft_vd12acb, | ||
147 | tft_pwrsave. | ||
148 | function: tft, ext_dac, not_iqadc_stb, iqdac_stb, ts_out_1, | ||
149 | lcd_trace, phy_ringosc. | ||
150 | input-schmitt-enable: supported. | ||
151 | input-schmitt-disable: supported. | ||
152 | drive-strength: supported. | ||
153 | |||
154 | drive groups: | ||
155 | |||
156 | These all support input-schmitt-enable, input-schmitt-disable, | ||
157 | and drive-strength. | ||
158 | |||
159 | jtag | ||
160 | pins: tck, trst, tdi, tdo, tms. | ||
161 | scb1 | ||
162 | pins: scb1_sdat, scb1_sclk. | ||
163 | scb2 | ||
164 | pins: scb2_sdat, scb2_sclk. | ||
165 | spi0 | ||
166 | pins: spi0_mclk, spi0_cs0, spi0_cs1, spi0_cs2, spi0_dout, spi0_din. | ||
167 | spi1 | ||
168 | pins: spi1_mclk, spi1_cs0, spi1_cs1, spi1_cs2, spi1_dout, spi1_din. | ||
169 | uart | ||
170 | pins: uart0_txd, uart0_rxd, uart0_rts, uart0_cts, | ||
171 | uart1_txd, uart1_rxd. | ||
172 | drive_i2s | ||
173 | pins: clk_out1, i2s_din, i2s_dout0, i2s_dout1, i2s_dout2, | ||
174 | i2s_lrclk_out, i2s_bclk_out, i2s_mclk. | ||
175 | drive_pdm | ||
176 | pins: clk_out0, pdm_b, pdm_a. | ||
177 | drive_scb0 | ||
178 | pins: scb0_sclk, scb0_sdat, pdm_d, pdm_c. | ||
179 | drive_sdio | ||
180 | pins: sdio_clk, sdio_cmd, sdio_d0, sdio_d1, sdio_d2, sdio_d3, | ||
181 | sdh_wp, sdh_cd, sdh_clk_in. | ||
182 | |||
183 | convenience groups: | ||
184 | |||
185 | These are just convenient groupings of pins and don't support any drive | ||
186 | configs. | ||
187 | |||
188 | uart0 | ||
189 | pins: uart0_cts, uart0_rts, uart0_rxd, uart0_txd. | ||
190 | uart1 | ||
191 | pins: uart1_rxd, uart1_txd. | ||
192 | scb0 | ||
193 | pins: scb0_sclk, scb0_sdat. | ||
194 | i2s | ||
195 | pins: i2s_bclk_out, i2s_din, i2s_dout0, i2s_dout1, i2s_dout2, | ||
196 | i2s_lrclk_out, i2s_mclk. | ||
197 | |||
198 | Example: | ||
199 | |||
200 | pinctrl: pinctrl@02005800 { | ||
201 | #gpio-range-cells = <3>; | ||
202 | compatible = "img,tz1090-pinctrl"; | ||
203 | reg = <0x02005800 0xe4>; | ||
204 | }; | ||
205 | |||
206 | Example board file extract: | ||
207 | |||
208 | &pinctrl { | ||
209 | uart0_default: uart0 { | ||
210 | uart0_cfg { | ||
211 | tz1090,pins = "uart0_rxd", | ||
212 | "uart0_txd"; | ||
213 | tz1090,function = "perip"; | ||
214 | }; | ||
215 | }; | ||
216 | tft_default: tft { | ||
217 | tft_cfg { | ||
218 | tz1090,pins = "tft"; | ||
219 | tz1090,function = "tft"; | ||
220 | }; | ||
221 | }; | ||
222 | }; | ||
223 | |||
224 | uart@02004b00 { | ||
225 | pinctrl-names = "default"; | ||
226 | pinctrl-0 = <&uart0_default>; | ||
227 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt index a648aaad6110..50ec3512a292 100644 --- a/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/marvell,dove-pinctrl.txt | |||
@@ -10,29 +10,31 @@ Required properties: | |||
10 | Available mpp pins/groups and functions: | 10 | Available mpp pins/groups and functions: |
11 | Note: brackets (x) are not part of the mpp name for marvell,function and given | 11 | Note: brackets (x) are not part of the mpp name for marvell,function and given |
12 | only for more detailed description in this document. | 12 | only for more detailed description in this document. |
13 | Note: pmu* also allows for Power Management functions listed below | ||
13 | 14 | ||
14 | name pins functions | 15 | name pins functions |
15 | ================================================================================ | 16 | ================================================================================ |
16 | mpp0 0 gpio, pmu, uart2(rts), sdio0(cd), lcd0(pwm) | 17 | mpp0 0 gpio, pmu, uart2(rts), sdio0(cd), lcd0(pwm), pmu* |
17 | mpp1 1 gpio, pmu, uart2(cts), sdio0(wp), lcd1(pwm) | 18 | mpp1 1 gpio, pmu, uart2(cts), sdio0(wp), lcd1(pwm), pmu* |
18 | mpp2 2 gpio, pmu, uart2(txd), sdio0(buspwr), sata(prsnt), | 19 | mpp2 2 gpio, pmu, uart2(txd), sdio0(buspwr), sata(prsnt), |
19 | uart1(rts) | 20 | uart1(rts), pmu* |
20 | mpp3 3 gpio, pmu, uart2(rxd), sdio0(ledctrl), sata(act), | 21 | mpp3 3 gpio, pmu, uart2(rxd), sdio0(ledctrl), sata(act), |
21 | uart1(cts), lcd-spi(cs1) | 22 | uart1(cts), lcd-spi(cs1), pmu* |
22 | mpp4 4 gpio, pmu, uart3(rts), sdio1(cd), spi1(miso) | 23 | mpp4 4 gpio, pmu, uart3(rts), sdio1(cd), spi1(miso), pmu* |
23 | mpp5 5 gpio, pmu, uart3(cts), sdio1(wp), spi1(cs) | 24 | mpp5 5 gpio, pmu, uart3(cts), sdio1(wp), spi1(cs), pmu* |
24 | mpp6 6 gpio, pmu, uart3(txd), sdio1(buspwr), spi1(mosi) | 25 | mpp6 6 gpio, pmu, uart3(txd), sdio1(buspwr), spi1(mosi), pmu* |
25 | mpp7 7 gpio, pmu, uart3(rxd), sdio1(ledctrl), spi1(sck) | 26 | mpp7 7 gpio, pmu, uart3(rxd), sdio1(ledctrl), spi1(sck), pmu* |
26 | mpp8 8 gpio, pmu, watchdog(rstout) | 27 | mpp8 8 gpio, pmu, watchdog(rstout), pmu* |
27 | mpp9 9 gpio, pmu, pex1(clkreq) | 28 | mpp9 9 gpio, pmu, pex1(clkreq), pmu* |
28 | mpp10 10 gpio, pmu, ssp(sclk) | 29 | mpp10 10 gpio, pmu, ssp(sclk), pmu* |
29 | mpp11 11 gpio, pmu, sata(prsnt), sata-1(act), sdio0(ledctrl), | 30 | mpp11 11 gpio, pmu, sata(prsnt), sata-1(act), sdio0(ledctrl), |
30 | sdio1(ledctrl), pex0(clkreq) | 31 | sdio1(ledctrl), pex0(clkreq), pmu* |
31 | mpp12 12 gpio, pmu, uart2(rts), audio0(extclk), sdio1(cd), sata(act) | 32 | mpp12 12 gpio, pmu, uart2(rts), audio0(extclk), sdio1(cd), |
33 | sata(act), pmu* | ||
32 | mpp13 13 gpio, pmu, uart2(cts), audio1(extclk), sdio1(wp), | 34 | mpp13 13 gpio, pmu, uart2(cts), audio1(extclk), sdio1(wp), |
33 | ssp(extclk) | 35 | ssp(extclk), pmu* |
34 | mpp14 14 gpio, pmu, uart2(txd), sdio1(buspwr), ssp(rxd) | 36 | mpp14 14 gpio, pmu, uart2(txd), sdio1(buspwr), ssp(rxd), pmu* |
35 | mpp15 15 gpio, pmu, uart2(rxd), sdio1(ledctrl), ssp(sfrm) | 37 | mpp15 15 gpio, pmu, uart2(rxd), sdio1(ledctrl), ssp(sfrm), pmu* |
36 | mpp16 16 gpio, uart3(rts), sdio0(cd), ac97(sdi1), lcd-spi(cs1) | 38 | mpp16 16 gpio, uart3(rts), sdio0(cd), ac97(sdi1), lcd-spi(cs1) |
37 | mpp17 17 gpio, uart3(cts), sdio0(wp), ac97(sdi2), twsi(sda), | 39 | mpp17 17 gpio, uart3(cts), sdio0(wp), ac97(sdi2), twsi(sda), |
38 | ac97-1(sysclko) | 40 | ac97-1(sysclko) |
@@ -57,6 +59,21 @@ mpp_nand 64-71 gpo, nand | |||
57 | audio0 - i2s, ac97 | 59 | audio0 - i2s, ac97 |
58 | twsi - none, opt1, opt2, opt3 | 60 | twsi - none, opt1, opt2, opt3 |
59 | 61 | ||
62 | Power Management functions (pmu*): | ||
63 | pmu-nc Pin not driven by any PM function | ||
64 | pmu-low Pin driven low (0) | ||
65 | pmu-high Pin driven high (1) | ||
66 | pmic(sdi) Pin is used for PMIC SDI | ||
67 | cpu-pwr-down Pin is used for CPU_PWRDWN | ||
68 | standby-pwr-down Pin is used for STBY_PWRDWN | ||
69 | core-pwr-good Pin is used for CORE_PWR_GOOD (Pins 0-7 only) | ||
70 | cpu-pwr-good Pin is used for CPU_PWR_GOOD (Pins 8-15 only) | ||
71 | bat-fault Pin is used for BATTERY_FAULT | ||
72 | ext0-wakeup Pin is used for EXT0_WU | ||
73 | ext1-wakeup Pin is used for EXT0_WU | ||
74 | ext2-wakeup Pin is used for EXT0_WU | ||
75 | pmu-blink Pin is used for blink function | ||
76 | |||
60 | Notes: | 77 | Notes: |
61 | * group "mpp_audio1" allows the following functions and gpio pins: | 78 | * group "mpp_audio1" allows the following functions and gpio pins: |
62 | - gpio : gpio on pins 52-57 | 79 | - gpio : gpio on pins 52-57 |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt index c95ea8278f87..aeb3c995cc04 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | |||
@@ -126,3 +126,51 @@ device; they may be grandchildren, for example. Whether this is legal, and | |||
126 | whether there is any interaction between the child and intermediate parent | 126 | whether there is any interaction between the child and intermediate parent |
127 | nodes, is again defined entirely by the binding for the individual pin | 127 | nodes, is again defined entirely by the binding for the individual pin |
128 | controller device. | 128 | controller device. |
129 | |||
130 | == Using generic pinconfig options == | ||
131 | |||
132 | Generic pinconfig parameters can be used by defining a separate node containing | ||
133 | the applicable parameters (and optional values), like: | ||
134 | |||
135 | pcfg_pull_up: pcfg_pull_up { | ||
136 | bias-pull-up; | ||
137 | drive-strength = <20>; | ||
138 | }; | ||
139 | |||
140 | This node should then be referenced in the appropriate pinctrl node as a phandle | ||
141 | and parsed in the driver using the pinconf_generic_parse_dt_config function. | ||
142 | |||
143 | Supported configuration parameters are: | ||
144 | |||
145 | bias-disable - disable any pin bias | ||
146 | bias-high-impedance - high impedance mode ("third-state", "floating") | ||
147 | bias-bus-hold - latch weakly | ||
148 | bias-pull-up - pull up the pin | ||
149 | bias-pull-down - pull down the pin | ||
150 | bias-pull-pin-default - use pin-default pull state | ||
151 | drive-push-pull - drive actively high and low | ||
152 | drive-open-drain - drive with open drain | ||
153 | drive-open-source - drive with open source | ||
154 | drive-strength - sink or source at most X mA | ||
155 | input-schmitt-enable - enable schmitt-trigger mode | ||
156 | input-schmitt-disable - disable schmitt-trigger mode | ||
157 | input-debounce - debounce mode with debound time X | ||
158 | low-power-enable - enable low power mode | ||
159 | low-power-disable - disable low power mode | ||
160 | output-low - set the pin to output mode with low level | ||
161 | output-high - set the pin to output mode with high level | ||
162 | |||
163 | Arguments for parameters: | ||
164 | |||
165 | - bias-pull-up, -down and -pin-default take as optional argument on hardware | ||
166 | supporting it the pull strength in Ohm. bias-disable will disable the pull. | ||
167 | |||
168 | - drive-strength takes as argument the target strength in mA. | ||
169 | |||
170 | - input-debounce takes the debounce time in usec as argument | ||
171 | or 0 to disable debouncing | ||
172 | |||
173 | All parameters not listed here, do not take an argument. | ||
174 | |||
175 | More in-depth documentation on these parameters can be found in | ||
176 | <include/linux/pinctrl/pinconfig-generic.h> | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt index 08f0c3d01575..5a02e30dd262 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | |||
@@ -18,7 +18,8 @@ Optional properties: | |||
18 | pin functions is ignored | 18 | pin functions is ignored |
19 | 19 | ||
20 | - pinctrl-single,bit-per-mux : boolean to indicate that one register controls | 20 | - pinctrl-single,bit-per-mux : boolean to indicate that one register controls |
21 | more than one pin | 21 | more than one pin, for which "pinctrl-single,function-mask" property specifies |
22 | position mask of pin. | ||
22 | 23 | ||
23 | - pinctrl-single,drive-strength : array of value that are used to configure | 24 | - pinctrl-single,drive-strength : array of value that are used to configure |
24 | drive strength in the pinmux register. They're value of drive strength | 25 | drive strength in the pinmux register. They're value of drive strength |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt new file mode 100644 index 000000000000..05bf82a07dfd --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt | |||
@@ -0,0 +1,110 @@ | |||
1 | *ST pin controller. | ||
2 | |||
3 | Each multi-function pin is controlled, driven and routed through the | ||
4 | PIO multiplexing block. Each pin supports GPIO functionality (ALT0) | ||
5 | and multiple alternate functions(ALT1 - ALTx) that directly connect | ||
6 | the pin to different hardware blocks. | ||
7 | |||
8 | When a pin is in GPIO mode, Output Enable (OE), Open Drain(OD), and | ||
9 | Pull Up (PU) are driven by the related PIO block. | ||
10 | |||
11 | ST pinctrl driver controls PIO multiplexing block and also interacts with | ||
12 | gpio driver to configure a pin. | ||
13 | |||
14 | Required properties: (PIO multiplexing block) | ||
15 | - compatible : should be "st,<SOC>-<pio-block>-pinctrl" | ||
16 | like st,stih415-sbc-pinctrl, st,stih415-front-pinctrl and so on. | ||
17 | - gpio-controller : Indicates this device is a GPIO controller | ||
18 | - #gpio-cells : Should be one. The first cell is the pin number. | ||
19 | - st,retime-pin-mask : Should be mask to specify which pins can be retimed. | ||
20 | If the property is not present, it is assumed that all the pins in the | ||
21 | bank are capable of retiming. Retiming is mainly used to improve the | ||
22 | IO timing margins of external synchronous interfaces. | ||
23 | - st,bank-name : Should be a name string for this bank as | ||
24 | specified in datasheet. | ||
25 | - st,syscfg : Should be a phandle of the syscfg node. | ||
26 | |||
27 | Example: | ||
28 | pin-controller-sbc { | ||
29 | #address-cells = <1>; | ||
30 | #size-cells = <1>; | ||
31 | compatible = "st,stih415-sbc-pinctrl"; | ||
32 | st,syscfg = <&syscfg_sbc>; | ||
33 | ranges = <0 0xfe610000 0x5000>; | ||
34 | PIO0: gpio@fe610000 { | ||
35 | gpio-controller; | ||
36 | #gpio-cells = <1>; | ||
37 | reg = <0 0x100>; | ||
38 | st,bank-name = "PIO0"; | ||
39 | }; | ||
40 | ... | ||
41 | pin-functions nodes follow... | ||
42 | }; | ||
43 | |||
44 | |||
45 | Contents of function subnode node: | ||
46 | ---------------------- | ||
47 | Required properties for pin configuration node: | ||
48 | - st,pins : Child node with list of pins with configuration. | ||
49 | |||
50 | Below is the format of how each pin conf should look like. | ||
51 | |||
52 | <bank offset mux mode rt_type rt_delay rt_clk> | ||
53 | |||
54 | Every PIO is represented with 4-7 parameters depending on retime configuration. | ||
55 | Each parameter is explained as below. | ||
56 | |||
57 | -bank : Should be bank phandle to which this PIO belongs. | ||
58 | -offset : Offset in the PIO bank. | ||
59 | -mux : Should be alternate function number associated this pin. | ||
60 | Use same numbers from datasheet. | ||
61 | -mode :pin configuration is selected from one of the below values. | ||
62 | IN | ||
63 | IN_PU | ||
64 | OUT | ||
65 | BIDIR | ||
66 | BIDIR_PU | ||
67 | |||
68 | -rt_type Retiming Configuration for the pin. | ||
69 | Possible retime configuration are: | ||
70 | |||
71 | ------- ------------- | ||
72 | value args | ||
73 | ------- ------------- | ||
74 | NICLK <delay> <clk> | ||
75 | ICLK_IO <delay> <clk> | ||
76 | BYPASS <delay> | ||
77 | DE_IO <delay> <clk> | ||
78 | SE_ICLK_IO <delay> <clk> | ||
79 | SE_NICLK_IO <delay> <clk> | ||
80 | |||
81 | - delay is retime delay in pico seconds as mentioned in data sheet. | ||
82 | |||
83 | - rt_clk :clk to be use for retime. | ||
84 | Possible values are: | ||
85 | CLK_A | ||
86 | CLK_B | ||
87 | CLK_C | ||
88 | CLK_D | ||
89 | |||
90 | Example of mmcclk pin which is a bi-direction pull pu with retime config | ||
91 | as non inverted clock retimed with CLK_B and delay of 0 pico seconds: | ||
92 | |||
93 | pin-controller { | ||
94 | ... | ||
95 | mmc0 { | ||
96 | pinctrl_mmc: mmc { | ||
97 | st,pins { | ||
98 | mmcclk = <&PIO13 4 ALT4 BIDIR_PU NICLK 0 CLK_B>; | ||
99 | ... | ||
100 | }; | ||
101 | }; | ||
102 | ... | ||
103 | }; | ||
104 | }; | ||
105 | |||
106 | sdhci0:sdhci@fe810000{ | ||
107 | ... | ||
108 | pinctrl-names = "default"; | ||
109 | pinctrl-0 = <&pinctrl_mmc>; | ||
110 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt new file mode 100644 index 000000000000..d5dac7b843a9 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | |||
@@ -0,0 +1,153 @@ | |||
1 | * Renesas Pin Function Controller (GPIO and Pin Mux/Config) | ||
2 | |||
3 | The Pin Function Controller (PFC) is a Pin Mux/Config controller. On SH7372, | ||
4 | SH73A0, R8A73A4 and R8A7740 it also acts as a GPIO controller. | ||
5 | |||
6 | |||
7 | Pin Control | ||
8 | ----------- | ||
9 | |||
10 | Required Properties: | ||
11 | |||
12 | - compatible: should be one of the following. | ||
13 | - "renesas,pfc-r8a73a4": for R8A73A4 (R-Mobile APE6) compatible pin-controller. | ||
14 | - "renesas,pfc-r8a7740": for R8A7740 (R-Mobile A1) compatible pin-controller. | ||
15 | - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller. | ||
16 | - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. | ||
17 | - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller. | ||
18 | - "renesas,pfc-sh7372": for SH7372 (SH-Mobile AP4) compatible pin-controller. | ||
19 | - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. | ||
20 | |||
21 | - reg: Base address and length of each memory resource used by the pin | ||
22 | controller hardware module. | ||
23 | |||
24 | Optional properties: | ||
25 | |||
26 | - #gpio-range-cells: Mandatory when the PFC doesn't handle GPIO, forbidden | ||
27 | otherwise. Should be 3. | ||
28 | |||
29 | The PFC node also acts as a container for pin configuration nodes. Please refer | ||
30 | to pinctrl-bindings.txt in this directory for the definition of the term "pin | ||
31 | configuration node" and for the common pinctrl bindings used by client devices. | ||
32 | |||
33 | Each pin configuration node represents a desired configuration for a pin, a | ||
34 | pin group, or a list of pins or pin groups. The configuration can include the | ||
35 | function to select on those pin(s) and pin configuration parameters (such as | ||
36 | pull-up and pull-down). | ||
37 | |||
38 | Pin configuration nodes contain pin configuration properties, either directly | ||
39 | or grouped in child subnodes. Both pin muxing and configuration parameters can | ||
40 | be grouped in that way and referenced as a single pin configuration node by | ||
41 | client devices. | ||
42 | |||
43 | A configuration node or subnode must reference at least one pin (through the | ||
44 | pins or pin groups properties) and contain at least a function or one | ||
45 | configuration parameter. When the function is present only pin groups can be | ||
46 | used to reference pins. | ||
47 | |||
48 | All pin configuration nodes and subnodes names are ignored. All of those nodes | ||
49 | are parsed through phandles and processed purely based on their content. | ||
50 | |||
51 | Pin Configuration Node Properties: | ||
52 | |||
53 | - renesas,pins : An array of strings, each string containing the name of a pin. | ||
54 | - renesas,groups : An array of strings, each string containing the name of a pin | ||
55 | group. | ||
56 | |||
57 | - renesas,function: A string containing the name of the function to mux to the | ||
58 | pin group(s) specified by the renesas,groups property | ||
59 | |||
60 | Valid values for pin, group and function names can be found in the group and | ||
61 | function arrays of the PFC data file corresponding to the SoC | ||
62 | (drivers/pinctrl/sh-pfc/pfc-*.c) | ||
63 | |||
64 | The pin configuration parameters use the generic pinconf bindings defined in | ||
65 | pinctrl-bindings.txt in this directory. The supported parameters are | ||
66 | bias-disable, bias-pull-up and bias-pull-down. | ||
67 | |||
68 | |||
69 | GPIO | ||
70 | ---- | ||
71 | |||
72 | On SH7372, SH73A0, R8A73A4 and R8A7740 the PFC node is also a GPIO controller | ||
73 | node. | ||
74 | |||
75 | Required Properties: | ||
76 | |||
77 | - gpio-controller: Marks the device node as a gpio controller. | ||
78 | |||
79 | - #gpio-cells: Should be 2. The first cell is the GPIO number and the second | ||
80 | cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the | ||
81 | GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. | ||
82 | |||
83 | The syntax of the gpio specifier used by client nodes should be the following | ||
84 | with values derived from the SoC user manual. | ||
85 | |||
86 | <[phandle of the gpio controller node] | ||
87 | [pin number within the gpio controller] | ||
88 | [flags]> | ||
89 | |||
90 | On other mach-shmobile platforms GPIO is handled by the gpio-rcar driver. | ||
91 | Please refer to Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | ||
92 | for documentation of the GPIO device tree bindings on those platforms. | ||
93 | |||
94 | |||
95 | Examples | ||
96 | -------- | ||
97 | |||
98 | Example 1: SH73A0 (SH-Mobile AG5) pin controller node | ||
99 | |||
100 | pfc: pfc@e6050000 { | ||
101 | compatible = "renesas,pfc-sh73a0"; | ||
102 | reg = <0xe6050000 0x8000>, | ||
103 | <0xe605801c 0x1c>; | ||
104 | gpio-controller; | ||
105 | #gpio-cells = <2>; | ||
106 | }; | ||
107 | |||
108 | Example 2: A GPIO LED node that references a GPIO | ||
109 | |||
110 | #include <dt-bindings/gpio/gpio.h> | ||
111 | |||
112 | leds { | ||
113 | compatible = "gpio-leds"; | ||
114 | led1 { | ||
115 | gpios = <&pfc 20 GPIO_ACTIVE_LOW>; | ||
116 | }; | ||
117 | }; | ||
118 | |||
119 | Example 3: KZM-A9-GT (SH-Mobile AG5) default pin state hog and pin control maps | ||
120 | for the MMCIF and SCIFA4 devices | ||
121 | |||
122 | &pfc { | ||
123 | pinctrl-0 = <&scifa4_pins>; | ||
124 | pinctrl-names = "default"; | ||
125 | |||
126 | mmcif_pins: mmcif { | ||
127 | mux { | ||
128 | renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0"; | ||
129 | renesas,function = "mmc0"; | ||
130 | }; | ||
131 | cfg { | ||
132 | renesas,groups = "mmc0_data8_0"; | ||
133 | renesas,pins = "PORT279"; | ||
134 | bias-pull-up; | ||
135 | }; | ||
136 | }; | ||
137 | |||
138 | scifa4_pins: scifa4 { | ||
139 | renesas,groups = "scifa4_data", "scifa4_ctrl"; | ||
140 | renesas,function = "scifa4"; | ||
141 | }; | ||
142 | }; | ||
143 | |||
144 | Example 4: KZM-A9-GT (SH-Mobile AG5) default pin state for the MMCIF device | ||
145 | |||
146 | &mmcif { | ||
147 | pinctrl-0 = <&mmcif_pins>; | ||
148 | pinctrl-names = "default"; | ||
149 | |||
150 | bus-width = <8>; | ||
151 | vmmc-supply = <®_1p8v>; | ||
152 | status = "okay"; | ||
153 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt new file mode 100644 index 000000000000..b0fb1018d7ad --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt | |||
@@ -0,0 +1,97 @@ | |||
1 | * Rockchip Pinmux Controller | ||
2 | |||
3 | The Rockchip Pinmux Controller, enables the IC | ||
4 | to share one PAD to several functional blocks. The sharing is done by | ||
5 | multiplexing the PAD input/output signals. For each PAD there are up to | ||
6 | 4 muxing options with option 0 being the use as a GPIO. | ||
7 | |||
8 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
9 | common pinctrl bindings used by client devices, including the meaning of the | ||
10 | phrase "pin configuration node". | ||
11 | |||
12 | The Rockchip pin configuration node is a node of a group of pins which can be | ||
13 | used for a specific device or function. This node represents both mux and | ||
14 | config of the pins in that group. The 'pins' selects the function mode(also | ||
15 | named pin mode) this pin can work on and the 'config' configures various pad | ||
16 | settings such as pull-up, etc. | ||
17 | |||
18 | The pins are grouped into up to 5 individual pin banks which need to be | ||
19 | defined as gpio sub-nodes of the pinmux controller. | ||
20 | |||
21 | Required properties for iomux controller: | ||
22 | - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl" | ||
23 | "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl" | ||
24 | |||
25 | Required properties for gpio sub nodes: | ||
26 | - compatible: "rockchip,gpio-bank" | ||
27 | - reg: register of the gpio bank (different than the iomux registerset) | ||
28 | - interrupts: base interrupt of the gpio bank in the interrupt controller | ||
29 | - clocks: clock that drives this bank | ||
30 | - gpio-controller: identifies the node as a gpio controller and pin bank. | ||
31 | - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO | ||
32 | binding is used, the amount of cells must be specified as 2. See generic | ||
33 | GPIO binding documentation for description of particular cells. | ||
34 | - interrupt-controller: identifies the controller node as interrupt-parent. | ||
35 | - #interrupt-cells: the value of this property should be 2 and the interrupt | ||
36 | cells should use the standard two-cell scheme described in | ||
37 | bindings/interrupt-controller/interrupts.txt | ||
38 | |||
39 | Required properties for pin configuration node: | ||
40 | - rockchip,pins: 3 integers array, represents a group of pins mux and config | ||
41 | setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>. | ||
42 | The MUX 0 means gpio and MUX 1 to 3 mean the specific device function. | ||
43 | The phandle of a node containing the generic pinconfig options | ||
44 | to use, as described in pinctrl-bindings.txt in this directory. | ||
45 | |||
46 | Examples: | ||
47 | |||
48 | #include <dt-bindings/pinctrl/rockchip.h> | ||
49 | |||
50 | ... | ||
51 | |||
52 | pinctrl@20008000 { | ||
53 | compatible = "rockchip,rk3066a-pinctrl"; | ||
54 | reg = <0x20008000 0x150>; | ||
55 | #address-cells = <1>; | ||
56 | #size-cells = <1>; | ||
57 | ranges; | ||
58 | |||
59 | gpio0: gpio0@20034000 { | ||
60 | compatible = "rockchip,gpio-bank"; | ||
61 | reg = <0x20034000 0x100>; | ||
62 | interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; | ||
63 | clocks = <&clk_gates8 9>; | ||
64 | |||
65 | gpio-controller; | ||
66 | #gpio-cells = <2>; | ||
67 | |||
68 | interrupt-controller; | ||
69 | #interrupt-cells = <2>; | ||
70 | }; | ||
71 | |||
72 | ... | ||
73 | |||
74 | pcfg_pull_default: pcfg_pull_default { | ||
75 | bias-pull-pin-default | ||
76 | }; | ||
77 | |||
78 | uart2 { | ||
79 | uart2_xfer: uart2-xfer { | ||
80 | rockchip,pins = <RK_GPIO1 8 1 &pcfg_pull_default>, | ||
81 | <RK_GPIO1 9 1 &pcfg_pull_default>; | ||
82 | }; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | uart2: serial@20064000 { | ||
87 | compatible = "snps,dw-apb-uart"; | ||
88 | reg = <0x20064000 0x400>; | ||
89 | interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; | ||
90 | reg-shift = <2>; | ||
91 | reg-io-width = <1>; | ||
92 | clocks = <&mux_uart2>; | ||
93 | status = "okay"; | ||
94 | |||
95 | pinctrl-names = "default"; | ||
96 | pinctrl-0 = <&uart2_xfer>; | ||
97 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index c70fca146e91..36281e7a2a46 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | |||
@@ -7,10 +7,15 @@ on-chip controllers onto these pads. | |||
7 | 7 | ||
8 | Required Properties: | 8 | Required Properties: |
9 | - compatible: should be one of the following. | 9 | - compatible: should be one of the following. |
10 | - "samsung,s3c2412-pinctrl": for S3C2412-compatible pin-controller, | ||
11 | - "samsung,s3c2416-pinctrl": for S3C2416-compatible pin-controller, | ||
12 | - "samsung,s3c2440-pinctrl": for S3C2440-compatible pin-controller, | ||
13 | - "samsung,s3c2450-pinctrl": for S3C2450-compatible pin-controller, | ||
10 | - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller, | 14 | - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller, |
11 | - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. | 15 | - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. |
12 | - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller. | 16 | - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller. |
13 | - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. | 17 | - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. |
18 | - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller. | ||
14 | 19 | ||
15 | - reg: Base address of the pin controller hardware module and length of | 20 | - reg: Base address of the pin controller hardware module and length of |
16 | the address space it occupies. | 21 | the address space it occupies. |
@@ -21,8 +26,18 @@ Required Properties: | |||
21 | 26 | ||
22 | - gpio-controller: identifies the node as a gpio controller and pin bank. | 27 | - gpio-controller: identifies the node as a gpio controller and pin bank. |
23 | - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO | 28 | - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO |
24 | binding is used, the amount of cells must be specified as 2. See generic | 29 | binding is used, the amount of cells must be specified as 2. See the below |
25 | GPIO binding documentation for description of particular cells. | 30 | mentioned gpio binding representation for description of particular cells. |
31 | |||
32 | Eg: <&gpx2 6 0> | ||
33 | <[phandle of the gpio controller node] | ||
34 | [pin number within the gpio controller] | ||
35 | [flags]> | ||
36 | |||
37 | Values for gpio specifier: | ||
38 | - Pin number: is a value between 0 to 7. | ||
39 | - Flags: 0 - Active High | ||
40 | 1 - Active Low | ||
26 | 41 | ||
27 | - Pin mux/config groups as child nodes: The pin mux (selecting pin function | 42 | - Pin mux/config groups as child nodes: The pin mux (selecting pin function |
28 | mode) and pin config (pull up/down, driver strength) settings are represented | 43 | mode) and pin config (pull up/down, driver strength) settings are represented |
@@ -106,6 +121,10 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a | |||
106 | 121 | ||
107 | - compatible: identifies the type of the external wakeup interrupt controller | 122 | - compatible: identifies the type of the external wakeup interrupt controller |
108 | The possible values are: | 123 | The possible values are: |
124 | - samsung,s3c2410-wakeup-eint: represents wakeup interrupt controller | ||
125 | found on Samsung S3C24xx SoCs except S3C2412 and S3C2413, | ||
126 | - samsung,s3c2412-wakeup-eint: represents wakeup interrupt controller | ||
127 | found on Samsung S3C2412 and S3C2413 SoCs, | ||
109 | - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller | 128 | - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller |
110 | found on Samsung S3C64xx SoCs, | 129 | found on Samsung S3C64xx SoCs, |
111 | - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller | 130 | - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller |
@@ -266,3 +285,33 @@ Example 4: Set up the default pin state for uart controller. | |||
266 | 285 | ||
267 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | 286 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); |
268 | } | 287 | } |
288 | |||
289 | Example 5: A display port client node that supports 'default' pinctrl state | ||
290 | and gpio binding. | ||
291 | |||
292 | display-port-controller { | ||
293 | /* ... */ | ||
294 | |||
295 | samsung,hpd-gpio = <&gpx2 6 0>; | ||
296 | pinctrl-names = "default"; | ||
297 | pinctrl-0 = <&dp_hpd>; | ||
298 | }; | ||
299 | |||
300 | Example 6: Request the gpio for display port controller | ||
301 | |||
302 | static int exynos_dp_probe(struct platform_device *pdev) | ||
303 | { | ||
304 | int hpd_gpio, ret; | ||
305 | struct device *dev = &pdev->dev; | ||
306 | struct device_node *dp_node = dev->of_node; | ||
307 | |||
308 | /* ... */ | ||
309 | |||
310 | hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio", 0); | ||
311 | |||
312 | /* ... */ | ||
313 | |||
314 | ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN, | ||
315 | "hpd_gpio"); | ||
316 | /* ... */ | ||
317 | } | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt new file mode 100644 index 000000000000..e3865e136067 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/ste,abx500.txt | |||
@@ -0,0 +1,352 @@ | |||
1 | ST Ericsson abx500 pinmux controller | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "stericsson,ab8500-gpio", "stericsson,ab8540-gpio", | ||
5 | "stericsson,ab8505-gpio", "stericsson,ab9540-gpio", | ||
6 | |||
7 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
8 | common pinctrl bindings used by client devices, including the meaning of the | ||
9 | phrase "pin configuration node". | ||
10 | |||
11 | ST Ericsson's pin configuration nodes act as a container for an arbitrary number of | ||
12 | subnodes. Each of these subnodes represents some desired configuration for a | ||
13 | pin, a group, or a list of pins or groups. This configuration can include the | ||
14 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
15 | parameters, such as input, output, pull up, pull down... | ||
16 | |||
17 | The name of each subnode is not important; all subnodes should be enumerated | ||
18 | and processed purely based on their content. | ||
19 | |||
20 | Required subnode-properties: | ||
21 | - ste,pins : An array of strings. Each string contains the name of a pin or | ||
22 | group. | ||
23 | |||
24 | Optional subnode-properties: | ||
25 | - ste,function: A string containing the name of the function to mux to the | ||
26 | pin or group. | ||
27 | |||
28 | - generic pin configuration option to use. Example : | ||
29 | |||
30 | default_cfg { | ||
31 | ste,pins = "GPIO1"; | ||
32 | bias-disable; | ||
33 | }; | ||
34 | |||
35 | - ste,config: Handle of pin configuration node containing the generic | ||
36 | pinconfig options to use, as described in pinctrl-bindings.txt in | ||
37 | this directory. Example : | ||
38 | |||
39 | pcfg_bias_disable: pcfg_bias_disable { | ||
40 | bias-disable; | ||
41 | }; | ||
42 | |||
43 | default_cfg { | ||
44 | ste,pins = "GPIO1"; | ||
45 | ste.config = <&pcfg_bias_disable>; | ||
46 | }; | ||
47 | |||
48 | Example board file extract: | ||
49 | |||
50 | &pinctrl_abx500 { | ||
51 | pinctrl-names = "default"; | ||
52 | pinctrl-0 = <&sysclkreq2_default_mode>, <&sysclkreq3_default_mode>, <&gpio3_default_mode>, <&sysclkreq6_default_mode>, <&pwmout1_default_mode>, <&pwmout2_default_mode>, <&pwmout3_default_mode>, <&adi1_default_mode>, <&dmic12_default_mode>, <&dmic34_default_mode>, <&dmic56_default_mode>, <&sysclkreq5_default_mode>, <&batremn_default_mode>, <&service_default_mode>, <&pwrctrl0_default_mode>, <&pwrctrl1_default_mode>, <&pwmextvibra1_default_mode>, <&pwmextvibra2_default_mode>, <&gpio51_default_mode>, <&gpio52_default_mode>, <&gpio53_default_mode>, <&gpio54_default_mode>, <&pdmclkdat_default_mode>; | ||
53 | |||
54 | sysclkreq2 { | ||
55 | sysclkreq2_default_mode: sysclkreq2_default { | ||
56 | default_mux { | ||
57 | ste,function = "sysclkreq"; | ||
58 | ste,pins = "sysclkreq2_d_1"; | ||
59 | }; | ||
60 | default_cfg { | ||
61 | ste,pins = "GPIO1"; | ||
62 | bias-disable; | ||
63 | }; | ||
64 | }; | ||
65 | }; | ||
66 | sysclkreq3 { | ||
67 | sysclkreq3_default_mode: sysclkreq3_default { | ||
68 | default_mux { | ||
69 | ste,function = "sysclkreq"; | ||
70 | ste,pins = "sysclkreq3_d_1"; | ||
71 | }; | ||
72 | default_cfg { | ||
73 | ste,pins = "GPIO2"; | ||
74 | output-low; | ||
75 | }; | ||
76 | }; | ||
77 | }; | ||
78 | gpio3 { | ||
79 | gpio3_default_mode: gpio3_default { | ||
80 | default_mux { | ||
81 | ste,function = "gpio"; | ||
82 | ste,pins = "gpio3_a_1"; | ||
83 | }; | ||
84 | default_cfg { | ||
85 | ste,pins = "GPIO3"; | ||
86 | output-low; | ||
87 | }; | ||
88 | }; | ||
89 | }; | ||
90 | sysclkreq6 { | ||
91 | sysclkreq6_default_mode: sysclkreq6_default { | ||
92 | default_mux { | ||
93 | ste,function = "sysclkreq"; | ||
94 | ste,pins = "sysclkreq6_d_1"; | ||
95 | }; | ||
96 | default_cfg { | ||
97 | ste,pins = "GPIO4"; | ||
98 | bias-disable; | ||
99 | }; | ||
100 | }; | ||
101 | }; | ||
102 | pwmout1 { | ||
103 | pwmout1_default_mode: pwmout1_default { | ||
104 | default_mux { | ||
105 | ste,function = "pwmout"; | ||
106 | ste,pins = "pwmout1_d_1"; | ||
107 | }; | ||
108 | default_cfg { | ||
109 | ste,pins = "GPIO14"; | ||
110 | output-low; | ||
111 | }; | ||
112 | }; | ||
113 | }; | ||
114 | pwmout2 { | ||
115 | pwmout2_default_mode: pwmout2_default { | ||
116 | pwmout2_default_mux { | ||
117 | ste,function = "pwmout"; | ||
118 | ste,pins = "pwmout2_d_1"; | ||
119 | }; | ||
120 | pwmout2_default_cfg { | ||
121 | ste,pins = "GPIO15"; | ||
122 | output-low; | ||
123 | }; | ||
124 | }; | ||
125 | }; | ||
126 | pwmout3 { | ||
127 | pwmout3_default_mode: pwmout3_default { | ||
128 | pwmout3_default_mux { | ||
129 | ste,function = "pwmout"; | ||
130 | ste,pins = "pwmout3_d_1"; | ||
131 | }; | ||
132 | pwmout3_default_cfg { | ||
133 | ste,pins = "GPIO16"; | ||
134 | output-low; | ||
135 | }; | ||
136 | }; | ||
137 | }; | ||
138 | adi1 { | ||
139 | |||
140 | adi1_default_mode: adi1_default { | ||
141 | adi1_default_mux { | ||
142 | ste,function = "adi1"; | ||
143 | ste,pins = "adi1_d_1"; | ||
144 | }; | ||
145 | adi1_default_cfg1 { | ||
146 | ste,pins = "GPIO17","GPIO19","GPIO20"; | ||
147 | bias-disable; | ||
148 | }; | ||
149 | adi1_default_cfg2 { | ||
150 | ste,pins = "GPIO18"; | ||
151 | output-low; | ||
152 | }; | ||
153 | }; | ||
154 | }; | ||
155 | dmic12 { | ||
156 | dmic12_default_mode: dmic12_default { | ||
157 | dmic12_default_mux { | ||
158 | ste,function = "dmic"; | ||
159 | ste,pins = "dmic12_d_1"; | ||
160 | }; | ||
161 | dmic12_default_cfg1 { | ||
162 | ste,pins = "GPIO27"; | ||
163 | output-low; | ||
164 | }; | ||
165 | dmic12_default_cfg2 { | ||
166 | ste,pins = "GPIO28"; | ||
167 | bias-disable; | ||
168 | }; | ||
169 | }; | ||
170 | }; | ||
171 | dmic34 { | ||
172 | dmic34_default_mode: dmic34_default { | ||
173 | dmic34_default_mux { | ||
174 | ste,function = "dmic"; | ||
175 | ste,pins = "dmic34_d_1"; | ||
176 | }; | ||
177 | dmic34_default_cfg1 { | ||
178 | ste,pins = "GPIO29"; | ||
179 | output-low; | ||
180 | }; | ||
181 | dmic34_default_cfg2 { | ||
182 | ste,pins = "GPIO30"; | ||
183 | bias-disable;{ | ||
184 | |||
185 | }; | ||
186 | }; | ||
187 | }; | ||
188 | dmic56 { | ||
189 | dmic56_default_mode: dmic56_default { | ||
190 | dmic56_default_mux { | ||
191 | ste,function = "dmic"; | ||
192 | ste,pins = "dmic56_d_1"; | ||
193 | }; | ||
194 | dmic56_default_cfg1 { | ||
195 | ste,pins = "GPIO31"; | ||
196 | output-low; | ||
197 | }; | ||
198 | dmic56_default_cfg2 { | ||
199 | ste,pins = "GPIO32"; | ||
200 | bias-disable; | ||
201 | }; | ||
202 | }; | ||
203 | }; | ||
204 | sysclkreq5 { | ||
205 | sysclkreq5_default_mode: sysclkreq5_default { | ||
206 | sysclkreq5_default_mux { | ||
207 | ste,function = "sysclkreq"; | ||
208 | ste,pins = "sysclkreq5_d_1"; | ||
209 | }; | ||
210 | sysclkreq5_default_cfg { | ||
211 | ste,pins = "GPIO42"; | ||
212 | output-low; | ||
213 | }; | ||
214 | }; | ||
215 | }; | ||
216 | batremn { | ||
217 | batremn_default_mode: batremn_default { | ||
218 | batremn_default_mux { | ||
219 | ste,function = "batremn"; | ||
220 | ste,pins = "batremn_d_1"; | ||
221 | }; | ||
222 | batremn_default_cfg { | ||
223 | ste,pins = "GPIO43"; | ||
224 | bias-disable; | ||
225 | }; | ||
226 | }; | ||
227 | }; | ||
228 | service { | ||
229 | service_default_mode: service_default { | ||
230 | service_default_mux { | ||
231 | ste,function = "service"; | ||
232 | ste,pins = "service_d_1"; | ||
233 | }; | ||
234 | service_default_cfg { | ||
235 | ste,pins = "GPIO44"; | ||
236 | bias-disable; | ||
237 | }; | ||
238 | }; | ||
239 | }; | ||
240 | pwrctrl0 { | ||
241 | pwrctrl0_default_mux: pwrctrl0_mux { | ||
242 | pwrctrl0_default_mux { | ||
243 | ste,function = "pwrctrl"; | ||
244 | ste,pins = "pwrctrl0_d_1"; | ||
245 | }; | ||
246 | }; | ||
247 | pwrctrl0_default_mode: pwrctrl0_default { | ||
248 | pwrctrl0_default_cfg { | ||
249 | ste,pins = "GPIO45"; | ||
250 | bias-disable; | ||
251 | }; | ||
252 | }; | ||
253 | }; | ||
254 | pwrctrl1 { | ||
255 | pwrctrl1_default_mux: pwrctrl1_mux { | ||
256 | pwrctrl1_default_mux { | ||
257 | ste,function = "pwrctrl"; | ||
258 | ste,pins = "pwrctrl1_d_1"; | ||
259 | }; | ||
260 | }; | ||
261 | pwrctrl1_default_mode: pwrctrl1_default { | ||
262 | pwrctrl1_default_cfg { | ||
263 | ste,pins = "GPIO46"; | ||
264 | bias-disable; | ||
265 | }; | ||
266 | }; | ||
267 | }; | ||
268 | pwmextvibra1 { | ||
269 | pwmextvibra1_default_mode: pwmextvibra1_default { | ||
270 | pwmextvibra1_default_mux { | ||
271 | ste,function = "pwmextvibra"; | ||
272 | ste,pins = "pwmextvibra1_d_1"; | ||
273 | }; | ||
274 | pwmextvibra1_default_cfg { | ||
275 | ste,pins = "GPIO47"; | ||
276 | bias-disable; | ||
277 | }; | ||
278 | }; | ||
279 | }; | ||
280 | pwmextvibra2 { | ||
281 | pwmextvibra2_default_mode: pwmextvibra2_default { | ||
282 | pwmextvibra2_default_mux { | ||
283 | ste,function = "pwmextvibra"; | ||
284 | ste,pins = "pwmextvibra2_d_1"; | ||
285 | }; | ||
286 | pwmextvibra1_default_cfg { | ||
287 | ste,pins = "GPIO48"; | ||
288 | bias-disable; | ||
289 | }; | ||
290 | }; | ||
291 | }; | ||
292 | gpio51 { | ||
293 | gpio51_default_mode: gpio51_default { | ||
294 | gpio51_default_mux { | ||
295 | ste,function = "gpio"; | ||
296 | ste,pins = "gpio51_a_1"; | ||
297 | }; | ||
298 | gpio51_default_cfg { | ||
299 | ste,pins = "GPIO51"; | ||
300 | output-low; | ||
301 | }; | ||
302 | }; | ||
303 | }; | ||
304 | gpio52 { | ||
305 | gpio52_default_mode: gpio52_default { | ||
306 | gpio52_default_mux { | ||
307 | ste,function = "gpio"; | ||
308 | ste,pins = "gpio52_a_1"; | ||
309 | }; | ||
310 | gpio52_default_cfg { | ||
311 | ste,pins = "GPIO52"; | ||
312 | bias-pull-down; | ||
313 | }; | ||
314 | }; | ||
315 | }; | ||
316 | gpio53 { | ||
317 | gpio53_default_mode: gpio53_default { | ||
318 | gpio53_default_mux { | ||
319 | ste,function = "gpio"; | ||
320 | ste,pins = "gpio53_a_1"; | ||
321 | }; | ||
322 | gpio53_default_cfg { | ||
323 | ste,pins = "GPIO53"; | ||
324 | bias-pull-down; | ||
325 | }; | ||
326 | }; | ||
327 | }; | ||
328 | gpio54 { | ||
329 | gpio54_default_mode: gpio54_default { | ||
330 | gpio54_default_mux { | ||
331 | ste,function = "gpio"; | ||
332 | ste,pins = "gpio54_a_1"; | ||
333 | }; | ||
334 | gpio54_default_cfg { | ||
335 | ste,pins = "GPIO54"; | ||
336 | output-low; | ||
337 | }; | ||
338 | }; | ||
339 | }; | ||
340 | pdmclkdat { | ||
341 | pdmclkdat_default_mode: pdmclkdat_default { | ||
342 | pdmclkdat_default_mux { | ||
343 | ste,function = "pdm"; | ||
344 | ste,pins = "pdmclkdat_d_1"; | ||
345 | }; | ||
346 | pdmclkdat_default_cfg { | ||
347 | ste,pins = "GPIO55", "GPIO56"; | ||
348 | bias-disable; | ||
349 | }; | ||
350 | }; | ||
351 | }; | ||
352 | }; | ||
diff --git a/Documentation/devicetree/bindings/power_supply/lp8727_charger.txt b/Documentation/devicetree/bindings/power_supply/lp8727_charger.txt new file mode 100644 index 000000000000..2246bc5c874b --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/lp8727_charger.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | Binding for TI/National Semiconductor LP8727 Charger | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,lp8727" | ||
5 | - reg: I2C slave address 27h | ||
6 | |||
7 | Optional properties: | ||
8 | - interrupt-parent: interrupt controller node (see interrupt binding[0]) | ||
9 | - interrupts: interrupt specifier (see interrupt binding[0]) | ||
10 | - debounce-ms: interrupt debounce time. (u32) | ||
11 | |||
12 | AC and USB charging parameters | ||
13 | - charger-type: "ac" or "usb" (string) | ||
14 | - eoc-level: value of 'enum lp8727_eoc_level' (u8) | ||
15 | - charging-current: value of 'enum lp8727_ichg' (u8) | ||
16 | |||
17 | [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
18 | |||
19 | Example) | ||
20 | |||
21 | lp8727@27 { | ||
22 | compatible = "ti,lp8727"; | ||
23 | reg = <0x27>; | ||
24 | |||
25 | /* GPIO 134 is used for LP8728 interrupt pin */ | ||
26 | interrupt-parent = <&gpio5>; /* base = 128 */ | ||
27 | interrupts = <6 0x2>; /* offset = 6, falling edge type */ | ||
28 | |||
29 | debounce-ms = <300>; | ||
30 | |||
31 | /* AC charger: 5% EOC and 500mA charging current */ | ||
32 | ac { | ||
33 | charger-type = "ac"; | ||
34 | eoc-level = /bits/ 8 <0>; | ||
35 | charging-current = /bits/ 8 <4>; | ||
36 | }; | ||
37 | |||
38 | /* USB charger: 10% EOC and 400mA charging current */ | ||
39 | usb { | ||
40 | charger-type = "usb"; | ||
41 | eoc-level = /bits/ 8 <1>; | ||
42 | charging-current = /bits/ 8 <2>; | ||
43 | }; | ||
44 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/emac.txt b/Documentation/devicetree/bindings/powerpc/4xx/emac.txt index 2161334a7ca5..712baf6c3e24 100644 --- a/Documentation/devicetree/bindings/powerpc/4xx/emac.txt +++ b/Documentation/devicetree/bindings/powerpc/4xx/emac.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | 4xx/Axon EMAC ethernet nodes | 1 | 4xx/Axon EMAC ethernet nodes |
2 | 2 | ||
3 | The EMAC ethernet controller in IBM and AMCC 4xx chips, and also | 3 | The EMAC ethernet controller in IBM and AMCC 4xx chips, and also |
4 | the Axon bridge. To operate this needs to interact with a ths | 4 | the Axon bridge. To operate this needs to interact with a this |
5 | special McMAL DMA controller, and sometimes an RGMII or ZMII | 5 | special McMAL DMA controller, and sometimes an RGMII or ZMII |
6 | interface. In addition to the nodes and properties described | 6 | interface. In addition to the nodes and properties described |
7 | below, the node for the OPB bus on which the EMAC sits must have a | 7 | below, the node for the OPB bus on which the EMAC sits must have a |
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/interlaken-lac.txt b/Documentation/devicetree/bindings/powerpc/fsl/interlaken-lac.txt new file mode 100644 index 000000000000..641bc13983e1 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/interlaken-lac.txt | |||
@@ -0,0 +1,309 @@ | |||
1 | =============================================================================== | ||
2 | Freescale Interlaken Look-Aside Controller Device Bindings | ||
3 | Copyright 2012 Freescale Semiconductor Inc. | ||
4 | |||
5 | CONTENTS | ||
6 | - Interlaken Look-Aside Controller (LAC) Node | ||
7 | - Example LAC Node | ||
8 | - Interlaken Look-Aside Controller (LAC) Software Portal Node | ||
9 | - Interlaken Look-Aside Controller (LAC) Software Portal Child Nodes | ||
10 | - Example LAC SWP Node with Child Nodes | ||
11 | |||
12 | ============================================================================== | ||
13 | Interlaken Look-Aside Controller (LAC) Node | ||
14 | |||
15 | DESCRIPTION | ||
16 | |||
17 | The Interlaken is a narrow, high speed channelized chip-to-chip interface. To | ||
18 | facilitate interoperability between a data path device and a look-aside | ||
19 | co-processor, the Interlaken Look-Aside protocol is defined for short | ||
20 | transaction-related transfers. Although based on the Interlaken protocol, | ||
21 | Interlaken Look-Aside is not directly compatible with Interlaken and can be | ||
22 | considered a different operation mode. | ||
23 | |||
24 | The Interlaken LA controller connects internal platform to Interlaken serial | ||
25 | interface. It accepts LA command through software portals, which are system | ||
26 | memory mapped 4KB spaces. The LA commands are then translated into the | ||
27 | Interlaken control words and data words, which are sent on TX side to TCAM | ||
28 | through SerDes lanes. | ||
29 | |||
30 | There are two 4KiB spaces defined within the LAC global register memory map. | ||
31 | There is a full register set at 0x0000-0x0FFF (also known as the "hypervisor" | ||
32 | version), and a subset at 0x1000-0x1FFF. The former is a superset of the | ||
33 | latter, and includes certain registers that should not be accessible to | ||
34 | partitioned software. Separate nodes are used for each region, with a phandle | ||
35 | linking the hypervisor node to the normal operating node. | ||
36 | |||
37 | PROPERTIES | ||
38 | |||
39 | - compatible | ||
40 | Usage: required | ||
41 | Value type: <string> | ||
42 | Definition: Must include "fsl,interlaken-lac". This represents only | ||
43 | those LAC CCSR registers not protected in partitioned | ||
44 | software. The version of the device is determined by the LAC | ||
45 | IP Block Revision Register (IPBRR0) at offset 0x0BF8. | ||
46 | |||
47 | Table of correspondences between IPBRR0 values and example | ||
48 | chips: | ||
49 | Value Device | ||
50 | ----------- ------- | ||
51 | 0x02000100 T4240 | ||
52 | |||
53 | The Hypervisor node has a different compatible. It must include | ||
54 | "fsl,interlaken-lac-hv". This node represents the protected | ||
55 | LAC register space and is required except inside a partition | ||
56 | where access to the hypervisor node is to be denied. | ||
57 | |||
58 | - fsl,non-hv-node | ||
59 | Usage: required in "fsl,interlaken-lac-hv" | ||
60 | Value type: <phandle> | ||
61 | Definition: Points to the non-protected LAC CCSR mapped register space | ||
62 | node. | ||
63 | |||
64 | - reg | ||
65 | Usage: required | ||
66 | Value type: <prop-encoded-array> | ||
67 | Definition: A standard property. The first resource represents the | ||
68 | Interlaken LAC configuration registers. | ||
69 | |||
70 | - interrupts: | ||
71 | Usage: required in non-hv node only | ||
72 | Value type: <prop-encoded-array> | ||
73 | Definition: Interrupt mapping for Interlaken LAC error IRQ. | ||
74 | |||
75 | EXAMPLE | ||
76 | lac: lac@229000 { | ||
77 | compatible = "fsl,interlaken-lac" | ||
78 | reg = <0x229000 0x1000>; | ||
79 | interrupts = <16 2 1 18>; | ||
80 | }; | ||
81 | |||
82 | lac-hv@228000 { | ||
83 | compatible = "fsl,interlaken-lac-hv" | ||
84 | reg = <0x228000 0x1000>; | ||
85 | fsl,non-hv-node = <&lac>; | ||
86 | }; | ||
87 | |||
88 | =============================================================================== | ||
89 | Interlaken Look-Aside Controller (LAC) Software Portal Container Node | ||
90 | |||
91 | DESCRIPTION | ||
92 | The Interlaken Look-Aside Controller (LAC) utilizes Software Portals to accept | ||
93 | Interlaken Look-Aside (ILA) commands. The Interlaken LAC software portal | ||
94 | memory map occupies 128KB of memory space. The software portal memory space is | ||
95 | intended to be cache-enabled. WIMG for each software space is required to be | ||
96 | 0010 if stashing is enabled; otherwise, WIMG can be 0000 or 0010. | ||
97 | |||
98 | PROPERTIES | ||
99 | |||
100 | - #address-cells | ||
101 | Usage: required | ||
102 | Value type: <u32> | ||
103 | Definition: A standard property. Must have a value of 1. | ||
104 | |||
105 | - #size-cells | ||
106 | Usage: required | ||
107 | Value type: <u32> | ||
108 | Definition: A standard property. Must have a value of 1. | ||
109 | |||
110 | - compatible | ||
111 | Usage: required | ||
112 | Value type: <string> | ||
113 | Definition: Must include "fsl,interlaken-lac-portals" | ||
114 | |||
115 | - ranges | ||
116 | Usage: required | ||
117 | Value type: <prop-encoded-array> | ||
118 | Definition: A standard property. Specifies the address and length | ||
119 | of the LAC portal memory space. | ||
120 | |||
121 | =============================================================================== | ||
122 | Interlaken Look-Aside Controller (LAC) Software Portals Child Nodes | ||
123 | |||
124 | DESCRIPTION | ||
125 | There are up to 24 available software portals with each software portal | ||
126 | requiring 4KB of consecutive memory within the software portal memory mapped | ||
127 | space. | ||
128 | |||
129 | PROPERTIES | ||
130 | |||
131 | - compatible | ||
132 | Usage: required | ||
133 | Value type: <string> | ||
134 | Definition: Must include "fsl,interlaken-lac-portal-vX.Y" where X is | ||
135 | the Major version (IP_MJ) found in the LAC IP Block Revision | ||
136 | Register (IPBRR0), at offset 0x0BF8, and Y is the Minor version | ||
137 | (IP_MN). | ||
138 | |||
139 | Table of correspondences between version values and example chips: | ||
140 | Value Device | ||
141 | ------ ------- | ||
142 | 1.0 T4240 | ||
143 | |||
144 | - reg | ||
145 | Usage: required | ||
146 | Value type: <prop-encoded-array> | ||
147 | Definition: A standard property. The first resource represents the | ||
148 | Interlaken LAC software portal registers. | ||
149 | |||
150 | - fsl,liodn | ||
151 | Value type: <u32> | ||
152 | Definition: The logical I/O device number (LIODN) for this device. The | ||
153 | LIODN is a number expressed by this device and used to perform | ||
154 | look-ups in the IOMMU (PAMU) address table when performing | ||
155 | DMAs. This property is automatically added by u-boot. | ||
156 | |||
157 | =============================================================================== | ||
158 | EXAMPLE | ||
159 | |||
160 | lac-portals { | ||
161 | #address-cells = <0x1>; | ||
162 | #size-cells = <0x1>; | ||
163 | compatible = "fsl,interlaken-lac-portals"; | ||
164 | ranges = <0x0 0xf 0xf4400000 0x20000>; | ||
165 | |||
166 | lportal0: lac-portal@0 { | ||
167 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
168 | fsl,liodn = <0x204>; | ||
169 | reg = <0x0 0x1000>; | ||
170 | }; | ||
171 | |||
172 | lportal1: lac-portal@1000 { | ||
173 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
174 | fsl,liodn = <0x205>; | ||
175 | reg = <0x1000 0x1000>; | ||
176 | }; | ||
177 | |||
178 | lportal2: lac-portal@2000 { | ||
179 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
180 | fsl,liodn = <0x206>; | ||
181 | reg = <0x2000 0x1000>; | ||
182 | }; | ||
183 | |||
184 | lportal3: lac-portal@3000 { | ||
185 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
186 | fsl,liodn = <0x207>; | ||
187 | reg = <0x3000 0x1000>; | ||
188 | }; | ||
189 | |||
190 | lportal4: lac-portal@4000 { | ||
191 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
192 | fsl,liodn = <0x208>; | ||
193 | reg = <0x4000 0x1000>; | ||
194 | }; | ||
195 | |||
196 | lportal5: lac-portal@5000 { | ||
197 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
198 | fsl,liodn = <0x209>; | ||
199 | reg = <0x5000 0x1000>; | ||
200 | }; | ||
201 | |||
202 | lportal6: lac-portal@6000 { | ||
203 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
204 | fsl,liodn = <0x20A>; | ||
205 | reg = <0x6000 0x1000>; | ||
206 | }; | ||
207 | |||
208 | lportal7: lac-portal@7000 { | ||
209 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
210 | fsl,liodn = <0x20B>; | ||
211 | reg = <0x7000 0x1000>; | ||
212 | }; | ||
213 | |||
214 | lportal8: lac-portal@8000 { | ||
215 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
216 | fsl,liodn = <0x20C>; | ||
217 | reg = <0x8000 0x1000>; | ||
218 | }; | ||
219 | |||
220 | lportal9: lac-portal@9000 { | ||
221 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
222 | fsl,liodn = <0x20D>; | ||
223 | reg = <0x9000 0x1000>; | ||
224 | }; | ||
225 | |||
226 | lportal10: lac-portal@A000 { | ||
227 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
228 | fsl,liodn = <0x20E>; | ||
229 | reg = <0xA000 0x1000>; | ||
230 | }; | ||
231 | |||
232 | lportal11: lac-portal@B000 { | ||
233 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
234 | fsl,liodn = <0x20F>; | ||
235 | reg = <0xB000 0x1000>; | ||
236 | }; | ||
237 | |||
238 | lportal12: lac-portal@C000 { | ||
239 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
240 | fsl,liodn = <0x210>; | ||
241 | reg = <0xC000 0x1000>; | ||
242 | }; | ||
243 | |||
244 | lportal13: lac-portal@D000 { | ||
245 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
246 | fsl,liodn = <0x211>; | ||
247 | reg = <0xD000 0x1000>; | ||
248 | }; | ||
249 | |||
250 | lportal14: lac-portal@E000 { | ||
251 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
252 | fsl,liodn = <0x212>; | ||
253 | reg = <0xE000 0x1000>; | ||
254 | }; | ||
255 | |||
256 | lportal15: lac-portal@F000 { | ||
257 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
258 | fsl,liodn = <0x213>; | ||
259 | reg = <0xF000 0x1000>; | ||
260 | }; | ||
261 | |||
262 | lportal16: lac-portal@10000 { | ||
263 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
264 | fsl,liodn = <0x214>; | ||
265 | reg = <0x10000 0x1000>; | ||
266 | }; | ||
267 | |||
268 | lportal17: lac-portal@11000 { | ||
269 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
270 | fsl,liodn = <0x215>; | ||
271 | reg = <0x11000 0x1000>; | ||
272 | }; | ||
273 | |||
274 | lportal8: lac-portal@1200 { | ||
275 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
276 | fsl,liodn = <0x216>; | ||
277 | reg = <0x12000 0x1000>; | ||
278 | }; | ||
279 | |||
280 | lportal19: lac-portal@13000 { | ||
281 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
282 | fsl,liodn = <0x217>; | ||
283 | reg = <0x13000 0x1000>; | ||
284 | }; | ||
285 | |||
286 | lportal20: lac-portal@14000 { | ||
287 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
288 | fsl,liodn = <0x218>; | ||
289 | reg = <0x14000 0x1000>; | ||
290 | }; | ||
291 | |||
292 | lportal21: lac-portal@15000 { | ||
293 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
294 | fsl,liodn = <0x219>; | ||
295 | reg = <0x15000 0x1000>; | ||
296 | }; | ||
297 | |||
298 | lportal22: lac-portal@16000 { | ||
299 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
300 | fsl,liodn = <0x21A>; | ||
301 | reg = <0x16000 0x1000>; | ||
302 | }; | ||
303 | |||
304 | lportal23: lac-portal@17000 { | ||
305 | compatible = "fsl,interlaken-lac-portal-v1.0"; | ||
306 | fsl,liodn = <0x21B>; | ||
307 | reg = <0x17000 0x1000>; | ||
308 | }; | ||
309 | }; | ||
diff --git a/Documentation/devicetree/bindings/pps/pps-gpio.txt b/Documentation/devicetree/bindings/pps/pps-gpio.txt new file mode 100644 index 000000000000..40bf9c3564a5 --- /dev/null +++ b/Documentation/devicetree/bindings/pps/pps-gpio.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Device-Tree Bindings for a PPS Signal on GPIO | ||
2 | |||
3 | These properties describe a PPS (pulse-per-second) signal connected to | ||
4 | a GPIO pin. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible: should be "pps-gpio" | ||
8 | - gpios: one PPS GPIO in the format described by ../gpio/gpio.txt | ||
9 | |||
10 | Optional properties: | ||
11 | - assert-falling-edge: when present, assert is indicated by a falling edge | ||
12 | (instead of by a rising edge) | ||
13 | |||
14 | Example: | ||
15 | pps { | ||
16 | compatible = "pps-gpio"; | ||
17 | gpios = <&gpio2 6 0>; | ||
18 | |||
19 | assert-falling-edge; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt b/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt new file mode 100644 index 000000000000..1e3dfe7a4894 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt | |||
@@ -0,0 +1,27 @@ | |||
1 | NXP PCA9685 16-channel 12-bit PWM LED controller | ||
2 | ================================================ | ||
3 | |||
4 | Required properties: | ||
5 | - compatible: "nxp,pca9685-pwm" | ||
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 | The index 16 is the ALLCALL channel, that sets all PWM channels at the same | ||
9 | time. | ||
10 | |||
11 | Optional properties: | ||
12 | - invert (bool): boolean to enable inverted logic | ||
13 | - open-drain (bool): boolean to configure outputs with open-drain structure; | ||
14 | if omitted use totem-pole structure | ||
15 | |||
16 | Example: | ||
17 | |||
18 | For LEDs that are directly connected to the PCA, the following setting is | ||
19 | applicable: | ||
20 | |||
21 | pca: pca@41 { | ||
22 | compatible = "nxp,pca9685-pwm"; | ||
23 | #pwm-cells = <2>; | ||
24 | reg = <0x41>; | ||
25 | invert; | ||
26 | open-drain; | ||
27 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/lp872x.txt b/Documentation/devicetree/bindings/regulator/lp872x.txt new file mode 100644 index 000000000000..78183182dad9 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/lp872x.txt | |||
@@ -0,0 +1,160 @@ | |||
1 | Binding for TI/National Semiconductor LP872x Driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,lp8720" or "ti,lp8725" | ||
5 | - reg: I2C slave address. 0x7d = LP8720, 0x7a = LP8725 | ||
6 | |||
7 | Optional properties: | ||
8 | - ti,general-config: the value of LP872X_GENERAL_CFG register (u8) | ||
9 | (LP8720) | ||
10 | bit[2]: BUCK output voltage control by external DVS pin or register | ||
11 | 1 = external pin, 0 = bit7 of register 08h | ||
12 | bit[1]: sleep control by external DVS pin or register | ||
13 | 1 = external pin, 0 = bit6 of register 08h | ||
14 | bit[0]: time step unit(usec). 1 = 25, 0 = 50 | ||
15 | |||
16 | (LP8725) | ||
17 | bit[7:6]: time step unit(usec). 00 = 32, 01 = 64, 10 = 128, 11 = 256 | ||
18 | bit[4]: BUCK2 enable control. 1 = enable, 0 = disable | ||
19 | bit[3]: BUCK2 output voltage register address. 1 = 0Ah, 0 = 0Bh | ||
20 | bit[2]: BUCK1 output voltage control by external DVS pin or register | ||
21 | 1 = register 08h, 0 = DVS | ||
22 | bit[1]: LDO sleep control. 1 = sleep mode, 0 = normal | ||
23 | bit[0]: BUCK1 enable control, 1 = enable, 0 = disable | ||
24 | |||
25 | For more details, please see the datasheet. | ||
26 | |||
27 | - ti,update-config: define it when LP872X_GENERAL_CFG register should be set | ||
28 | - ti,dvs-gpio: GPIO specifier for external DVS pin control of LP872x devices. | ||
29 | - ti,dvs-vsel: DVS selector. 0 = SEL_V1, 1 = SEL_V2. | ||
30 | - ti,dvs-state: initial DVS pin state. 0 = DVS_LOW, 1 = DVS_HIGH. | ||
31 | |||
32 | Sub nodes for regulator_init_data | ||
33 | LP8720 has maximum 6 nodes. (child name: ldo1 ~ 5 and buck) | ||
34 | LP8725 has maximum 9 nodes. (child name: ldo1 ~ 5, lilo1,2 and buck1,2) | ||
35 | For more details, please see the following binding document. | ||
36 | (Documentation/devicetree/bindings/regulator/regulator.txt) | ||
37 | |||
38 | Datasheet | ||
39 | - LP8720: http://www.ti.com/lit/ds/symlink/lp8720.pdf | ||
40 | - LP8725: http://www.ti.com/lit/ds/symlink/lp8725.pdf | ||
41 | |||
42 | Example 1) LP8720 | ||
43 | |||
44 | lp8720@7d { | ||
45 | compatible = "ti,lp8720"; | ||
46 | reg = <0x7d>; | ||
47 | |||
48 | /* external DVS pin used, timestep is 25usec */ | ||
49 | ti,general-config = /bits/ 8 <0x03>; | ||
50 | ti,update-config; | ||
51 | |||
52 | /* | ||
53 | * The dvs-gpio depends on the processor environment. | ||
54 | * For example, following GPIO specifier means GPIO134 in OMAP4. | ||
55 | */ | ||
56 | ti,dvs-gpio = <&gpio5 6 0>; | ||
57 | ti,dvs-vsel = /bits/ 8 <1>; /* SEL_V2 */ | ||
58 | ti,dvs-state = /bits/ 8 <1>; /* DVS_HIGH */ | ||
59 | |||
60 | vaf: ldo1 { | ||
61 | regulator-min-microvolt = <1200000>; | ||
62 | regulator-max-microvolt = <3300000>; | ||
63 | }; | ||
64 | |||
65 | vmmc: ldo2 { | ||
66 | regulator-min-microvolt = <1200000>; | ||
67 | regulator-max-microvolt = <3300000>; | ||
68 | }; | ||
69 | |||
70 | vcam_io: ldo3 { | ||
71 | regulator-min-microvolt = <1200000>; | ||
72 | regulator-max-microvolt = <3300000>; | ||
73 | regulator-boot-on; | ||
74 | }; | ||
75 | |||
76 | vcam_core: ldo4 { | ||
77 | regulator-min-microvolt = <800000>; | ||
78 | regulator-max-microvolt = <2850000>; | ||
79 | regulator-boot-on; | ||
80 | }; | ||
81 | |||
82 | vcam: ldo5 { | ||
83 | regulator-min-microvolt = <1200000>; | ||
84 | regulator-max-microvolt = <3300000>; | ||
85 | }; | ||
86 | |||
87 | vcc: buck { | ||
88 | regulator-name = "VBUCK"; | ||
89 | regulator-min-microvolt = <800000>; | ||
90 | regulator-max-microvolt = <2300000>; | ||
91 | }; | ||
92 | }; | ||
93 | |||
94 | Example 2) LP8725 | ||
95 | |||
96 | lp8725@7a { | ||
97 | compatible = "ti,lp8725"; | ||
98 | reg = <0x7a>; | ||
99 | |||
100 | /* Enable BUCK1,2, no DVS, normal LDO mode, timestep is 256usec */ | ||
101 | ti,general-config = /bits/ 8 <0xdd>; | ||
102 | ti,update-config; | ||
103 | |||
104 | vcam_io: ldo1 { | ||
105 | regulator-min-microvolt = <1200000>; | ||
106 | regulator-max-microvolt = <3300000>; | ||
107 | }; | ||
108 | |||
109 | vcam_core: ldo2 { | ||
110 | regulator-min-microvolt = <1200000>; | ||
111 | regulator-max-microvolt = <3300000>; | ||
112 | }; | ||
113 | |||
114 | vcam: ldo3 { | ||
115 | regulator-min-microvolt = <1200000>; | ||
116 | regulator-max-microvolt = <3300000>; | ||
117 | }; | ||
118 | |||
119 | vcmmb_io: ldo4 { | ||
120 | regulator-min-microvolt = <1200000>; | ||
121 | regulator-max-microvolt = <3300000>; | ||
122 | regulator-boot-on; | ||
123 | }; | ||
124 | |||
125 | vcmmb_core: ldo5 { | ||
126 | regulator-min-microvolt = <1200000>; | ||
127 | regulator-max-microvolt = <3300000>; | ||
128 | regulator-boot-on; | ||
129 | }; | ||
130 | |||
131 | vaux1: lilo1 { | ||
132 | regulator-name = "VAUX1"; | ||
133 | regulator-min-microvolt = <800000>; | ||
134 | regulator-max-microvolt = <3300000>; | ||
135 | }; | ||
136 | |||
137 | vaux2: lilo2 { | ||
138 | regulator-name = "VAUX2"; | ||
139 | regulator-min-microvolt = <800000>; | ||
140 | regulator-max-microvolt = <3300000>; | ||
141 | }; | ||
142 | |||
143 | vcc1: buck1 { | ||
144 | regulator-name = "VBUCK1"; | ||
145 | regulator-min-microvolt = <800000>; | ||
146 | regulator-max-microvolt = <3000000>; | ||
147 | regulator-min-microamp = <460000>; | ||
148 | regulator-max-microamp = <1370000>; | ||
149 | regulator-boot-on; | ||
150 | }; | ||
151 | |||
152 | vcc2: buck2 { | ||
153 | regulator-name = "VBUCK2"; | ||
154 | regulator-min-microvolt = <800000>; | ||
155 | regulator-max-microvolt = <3000000>; | ||
156 | regulator-min-microamp = <460000>; | ||
157 | regulator-max-microamp = <1370000>; | ||
158 | regulator-boot-on; | ||
159 | }; | ||
160 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/max8973-regulator.txt b/Documentation/devicetree/bindings/regulator/max8973-regulator.txt new file mode 100644 index 000000000000..4f15d8a1bfd0 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/max8973-regulator.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Maxim MAX8973 Voltage Regulator | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: must be "maxim,max8973" | ||
6 | - reg: the i2c slave address of the regulator. It should be 0x1b. | ||
7 | |||
8 | Any standard regulator properties can be used to configure the single max8973 | ||
9 | DCDC. | ||
10 | |||
11 | Example: | ||
12 | |||
13 | max8973@1b { | ||
14 | compatible = "maxim,max8973"; | ||
15 | reg = <0x1b>; | ||
16 | |||
17 | regulator-min-microvolt = <935000>; | ||
18 | regulator-max-microvolt = <1200000>; | ||
19 | regulator-boot-on; | ||
20 | regulator-always-on; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt index 9e5e51d78868..5c186a7a77ba 100644 --- a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | * Maxim MAX8997 Voltage and Current Regulator | 1 | * Maxim MAX8997 Voltage and Current Regulator |
2 | 2 | ||
3 | The Maxim MAX8997 is a multi-function device which includes volatage and | 3 | The Maxim MAX8997 is a multi-function device which includes voltage and |
4 | current regulators, rtc, charger controller and other sub-blocks. It is | 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 | 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 | 6 | addressed by the host system using different i2c slave address. This document |
diff --git a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt new file mode 100644 index 000000000000..d5a308629c57 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt | |||
@@ -0,0 +1,72 @@ | |||
1 | * palmas regulator IP block devicetree bindings | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be from the list | ||
5 | ti,twl6035-pmic | ||
6 | ti,twl6036-pmic | ||
7 | ti,twl6037-pmic | ||
8 | ti,tps65913-pmic | ||
9 | ti,tps65914-pmic | ||
10 | and also the generic series names | ||
11 | ti,palmas-pmic | ||
12 | - interrupt-parent : The parent interrupt controller which is palmas. | ||
13 | - interrupts : The interrupt number and the type which can be looked up here: | ||
14 | arch/arm/boot/dts/include/dt-bindings/interrupt-controller/irq.h | ||
15 | - interrupts-name: The names of the individual interrupts. | ||
16 | |||
17 | Optional properties: | ||
18 | - ti,ldo6-vibrator : ldo6 is in vibrator mode | ||
19 | |||
20 | Optional nodes: | ||
21 | - regulators : Must contain a sub-node per regulator from the list below. | ||
22 | Each sub-node should contain the constraints and initialization | ||
23 | information for that regulator. See regulator.txt for a | ||
24 | description of standard properties for these sub-nodes. | ||
25 | Additional custom properties are listed below. | ||
26 | |||
27 | For ti,palmas-pmic - smps12, smps123, smps3 depending on OTP, | ||
28 | smps45, smps457, smps7 depending on variant, smps6, smps[8-10], | ||
29 | ldo[1-9], ldoln, ldousb. | ||
30 | |||
31 | Optional sub-node properties: | ||
32 | ti,warm-reset - maintain voltage during warm reset(boolean) | ||
33 | ti,roof-floor - control voltage selection by pin(boolean) | ||
34 | ti,sleep-mode - mode to adopt in pmic sleep 0 - off, 1 - auto, | ||
35 | 2 - eco, 3 - forced pwm | ||
36 | ti,tstep - slope control 0 - Jump, 1 10mV/us, 2 5mV/us, 3 2.5mV/us | ||
37 | ti,smps-range - OTP has the wrong range set for the hardware so override | ||
38 | 0 - low range, 1 - high range. | ||
39 | |||
40 | Example: | ||
41 | |||
42 | #include <dt-bindings/interrupt-controller/irq.h> | ||
43 | |||
44 | pmic { | ||
45 | compatible = "ti,twl6035-pmic", "ti,palmas-pmic"; | ||
46 | interrupt-parent = <&palmas>; | ||
47 | interrupts = <14 IRQ_TYPE_NONE>; | ||
48 | interrupts-name = "short-irq"; | ||
49 | |||
50 | ti,ldo6-vibrator; | ||
51 | |||
52 | regulators { | ||
53 | smps12_reg : smps12 { | ||
54 | regulator-name = "smps12"; | ||
55 | regulator-min-microvolt = < 600000>; | ||
56 | regulator-max-microvolt = <1500000>; | ||
57 | regulator-always-on; | ||
58 | regulator-boot-on; | ||
59 | ti,warm-reset; | ||
60 | ti,roof-floor; | ||
61 | ti,mode-sleep = <0>; | ||
62 | ti,tstep = <0>; | ||
63 | ti,smps-range = <1>; | ||
64 | }; | ||
65 | |||
66 | ldo1_reg: ldo1 { | ||
67 | regulator-name = "ldo1"; | ||
68 | regulator-min-microvolt = <2800000>; | ||
69 | regulator-max-microvolt = <2800000>; | ||
70 | }; | ||
71 | }; | ||
72 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index ecfc6ccd67ef..48a3b8e5d6bd 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt | |||
@@ -9,6 +9,7 @@ Optional properties: | |||
9 | - regulator-max-microamp: largest current consumers may set | 9 | - regulator-max-microamp: largest current consumers may set |
10 | - regulator-always-on: boolean, regulator should never be disabled | 10 | - regulator-always-on: boolean, regulator should never be disabled |
11 | - regulator-boot-on: bootloader/firmware enabled regulator | 11 | - regulator-boot-on: bootloader/firmware enabled regulator |
12 | - regulator-allow-bypass: allow the regulator to go into bypass mode | ||
12 | - <name>-supply: phandle to the parent supply/regulator node | 13 | - <name>-supply: phandle to the parent supply/regulator node |
13 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) | 14 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) |
14 | 15 | ||
diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt index a35ff99003a5..d1660a90fc06 100644 --- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | * Samsung S5M8767 Voltage and Current Regulator | 1 | * Samsung S5M8767 Voltage and Current Regulator |
2 | 2 | ||
3 | The Samsung S5M8767 is a multi-function device which includes volatage and | 3 | The Samsung S5M8767 is a multi-function device which includes voltage and |
4 | current regulators, rtc, charger controller and other sub-blocks. It is | 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 | 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 | 6 | addressed by the host system using different i2c slave address. This document |
@@ -103,13 +103,13 @@ Example: | |||
103 | 103 | ||
104 | s5m8767,pmic-buck-default-dvs-idx = <0>; | 104 | s5m8767,pmic-buck-default-dvs-idx = <0>; |
105 | 105 | ||
106 | s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 1 0 0>, /* DVS1 */ | 106 | s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */ |
107 | <&gpx0 1 1 0 0>, /* DVS2 */ | 107 | <&gpx0 1 0>, /* DVS2 */ |
108 | <&gpx0 2 1 0 0>; /* DVS3 */ | 108 | <&gpx0 2 0>; /* DVS3 */ |
109 | 109 | ||
110 | s5m8767,pmic-buck-ds-gpios = <&gpx2 3 1 0 0>, /* SET1 */ | 110 | s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */ |
111 | <&gpx2 4 1 0 0>, /* SET2 */ | 111 | <&gpx2 4 0>, /* SET2 */ |
112 | <&gpx2 5 1 0 0>; /* SET3 */ | 112 | <&gpx2 5 0>; /* SET3 */ |
113 | 113 | ||
114 | s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>, | 114 | s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>, |
115 | <1250000>, <1200000>, | 115 | <1250000>, <1200000>, |
diff --git a/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt new file mode 100644 index 000000000000..2e57a33e9029 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/ti-abb-regulator.txt | |||
@@ -0,0 +1,128 @@ | |||
1 | Adaptive Body Bias(ABB) SoC internal LDO regulator for Texas Instruments SoCs | ||
2 | |||
3 | Required Properties: | ||
4 | - compatible: Should be one of: | ||
5 | - "ti,abb-v1" for older SoCs like OMAP3 | ||
6 | - "ti,abb-v2" for newer SoCs like OMAP4, OMAP5 | ||
7 | - reg: Address and length of the register set for the device. It contains | ||
8 | the information of registers in the same order as described by reg-names | ||
9 | - reg-names: Should contain the reg names | ||
10 | - "base-address" - contains base address of ABB module | ||
11 | - "int-address" - contains address of interrupt register for ABB module | ||
12 | (also see Optional properties) | ||
13 | - #address-cell: should be 0 | ||
14 | - #size-cell: should be 0 | ||
15 | - clocks: should point to the clock node used by ABB module | ||
16 | - ti,settling-time: Settling time in uSecs from SoC documentation for ABB module | ||
17 | to settle down(target time for SR2_WTCNT_VALUE). | ||
18 | - ti,clock-cycles: SoC specific data about count of system ti,clock-cycles used for | ||
19 | computing settling time from SoC Documentation for ABB module(clock | ||
20 | cycles for SR2_WTCNT_VALUE). | ||
21 | - ti,tranxdone-status-mask: Mask to the int-register to write-to-clear mask | ||
22 | indicating LDO tranxdone (operation complete). | ||
23 | - ti,abb_info: An array of 6-tuples u32 items providing information about ABB | ||
24 | configuration needed per operational voltage of the device. | ||
25 | Each item consists of the following in the same order: | ||
26 | volt: voltage in uV - Only used to index ABB information. | ||
27 | ABB mode: one of the following: | ||
28 | 0-bypass | ||
29 | 1-Forward Body Bias(FBB) | ||
30 | 3-Reverse Body Bias(RBB) | ||
31 | efuse: (see Optional properties) | ||
32 | RBB enable efuse Mask: (See Optional properties) | ||
33 | FBB enable efuse Mask: (See Optional properties) | ||
34 | Vset value efuse Mask: (See Optional properties) | ||
35 | |||
36 | NOTE: If more than 1 entry is present, then regulator is setup to change | ||
37 | voltage, allowing for various modes to be selected indexed off | ||
38 | the regulator. Further, ABB LDOs are considered always-on by | ||
39 | default. | ||
40 | |||
41 | Optional Properties: | ||
42 | - reg-names: In addition to the required properties, the following are optional | ||
43 | - "efuse-address" - Contains efuse base address used to pick up ABB info. | ||
44 | - "ldo-address" - Contains address of ABB LDO overide register address. | ||
45 | "efuse-address" is required for this. | ||
46 | - ti,ldovbb-vset-mask - Required if ldo-address is set, mask for LDO override | ||
47 | register to provide override vset value. | ||
48 | - ti,ldovbb-override-mask - Required if ldo-address is set, mask for LDO | ||
49 | override register to enable override vset value. | ||
50 | - ti,abb_opp_sel: Addendum to the description in required properties | ||
51 | efuse: Mandatory if 'efuse-address' register is defined. Provides offset | ||
52 | from efuse-address to pick up ABB characteristics. Set to 0 if | ||
53 | 'efuse-address' is not defined. | ||
54 | RBB enable efuse Mask: Optional if 'efuse-address' register is defined. | ||
55 | 'ABB mode' is force set to RBB mode if value at "efuse-address" | ||
56 | + efuse maps to RBB mask. Set to 0 to ignore this. | ||
57 | FBB enable efuse Mask: Optional if 'efuse-address' register is defined. | ||
58 | 'ABB mode' is force set to FBB mode if value at "efuse-address" | ||
59 | + efuse maps to FBB mask (valid only if RBB mask does not match) | ||
60 | Set to 0 to ignore this. | ||
61 | Vset value efuse Mask: Mandatory if ldo-address is set. Picks up from | ||
62 | efuse the value to set in 'ti,ldovbb-vset-mask' at ldo-address. | ||
63 | |||
64 | Example #1: Simplest configuration (no efuse data, hard coded ABB table): | ||
65 | abb_x: regulator-abb-x { | ||
66 | compatible = "ti,abb-v1"; | ||
67 | regulator-name = "abb_x"; | ||
68 | #address-cell = <0>; | ||
69 | #size-cells = <0>; | ||
70 | reg = <0x483072f0 0x8>, <0x48306818 0x4>; | ||
71 | reg-names = "base-address", "int-address"; | ||
72 | ti,tranxdone-status-mask = <0x4000000>; | ||
73 | clocks = <&sysclk>; | ||
74 | ti,settling-time = <30>; | ||
75 | ti,clock-cycles = <8>; | ||
76 | ti,abb_info = < | ||
77 | /* uV ABB efuse rbb_m fbb_m vset_m */ | ||
78 | 1012500 0 0 0 0 0 /* Bypass */ | ||
79 | 1200000 3 0 0 0 0 /* RBB mandatory */ | ||
80 | 1320000 1 0 0 0 0 /* FBB mandatory */ | ||
81 | >; | ||
82 | }; | ||
83 | |||
84 | Example #2: Efuse bits contain ABB mode setting (no LDO override capability) | ||
85 | abb_y: regulator-abb-y { | ||
86 | compatible = "ti,abb-v2"; | ||
87 | regulator-name = "abb_y"; | ||
88 | #address-cell = <0>; | ||
89 | #size-cells = <0>; | ||
90 | reg = <0x4a307bd0 0x8>, <0x4a306014 0x4>, <0x4A002268 0x8>; | ||
91 | reg-names = "base-address", "int-address", "efuse-address"; | ||
92 | ti,tranxdone-status-mask = <0x4000000>; | ||
93 | clocks = <&sysclk>; | ||
94 | ti,settling-time = <50>; | ||
95 | ti,clock-cycles = <16>; | ||
96 | ti,abb_info = < | ||
97 | /* uV ABB efuse rbb_m fbb_m vset_m */ | ||
98 | 975000 0 0 0 0 0 /* Bypass */ | ||
99 | 1012500 0 0 0x40000 0 0 /* RBB optional */ | ||
100 | 1200000 0 0x4 0 0x40000 0 /* FBB optional */ | ||
101 | 1320000 1 0 0 0 0 /* FBB mandatory */ | ||
102 | >; | ||
103 | }; | ||
104 | |||
105 | Example #3: Efuse bits contain ABB mode setting and LDO override capability | ||
106 | abb_z: regulator-abb-z { | ||
107 | compatible = "ti,abb-v2"; | ||
108 | regulator-name = "abb_z"; | ||
109 | #address-cell = <0>; | ||
110 | #size-cells = <0>; | ||
111 | reg = <0x4ae07ce4 0x8>, <0x4ae06010 0x4>, | ||
112 | <0x4a002194 0x8>, <0x4ae0C314 0x4>; | ||
113 | reg-names = "base-address", "int-address", | ||
114 | "efuse-address", "ldo-address"; | ||
115 | ti,tranxdone-status-mask = <0x8000000>; | ||
116 | /* LDOVBBMM_MUX_CTRL */ | ||
117 | ti,ldovbb-override-mask = <0x400>; | ||
118 | /* LDOVBBMM_VSET_OUT */ | ||
119 | ti,ldovbb-vset-mask = <0x1F>; | ||
120 | clocks = <&sysclk>; | ||
121 | ti,settling-time = <50>; | ||
122 | ti,clock-cycles = <16>; | ||
123 | ti,abb_info = < | ||
124 | /* uV ABB efuse rbb_m fbb_m vset_m */ | ||
125 | 975000 0 0 0 0 0 /* Bypass */ | ||
126 | 1200000 0 0x4 0 0x40000 0x1f00 /* FBB optional, vset */ | ||
127 | >; | ||
128 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/twl-regulator.txt b/Documentation/devicetree/bindings/regulator/twl-regulator.txt index 658749b90b97..75b0c1669504 100644 --- a/Documentation/devicetree/bindings/regulator/twl-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/twl-regulator.txt | |||
@@ -18,20 +18,20 @@ For twl6030 regulators/LDOs | |||
18 | - "ti,twl6030-vdd1" for VDD1 SMPS | 18 | - "ti,twl6030-vdd1" for VDD1 SMPS |
19 | - "ti,twl6030-vdd2" for VDD2 SMPS | 19 | - "ti,twl6030-vdd2" for VDD2 SMPS |
20 | - "ti,twl6030-vdd3" for VDD3 SMPS | 20 | - "ti,twl6030-vdd3" for VDD3 SMPS |
21 | For twl6025 regulators/LDOs | 21 | For twl6032 regulators/LDOs |
22 | - compatible: | 22 | - compatible: |
23 | - "ti,twl6025-ldo1" for LDO1 LDO | 23 | - "ti,twl6032-ldo1" for LDO1 LDO |
24 | - "ti,twl6025-ldo2" for LDO2 LDO | 24 | - "ti,twl6032-ldo2" for LDO2 LDO |
25 | - "ti,twl6025-ldo3" for LDO3 LDO | 25 | - "ti,twl6032-ldo3" for LDO3 LDO |
26 | - "ti,twl6025-ldo4" for LDO4 LDO | 26 | - "ti,twl6032-ldo4" for LDO4 LDO |
27 | - "ti,twl6025-ldo5" for LDO5 LDO | 27 | - "ti,twl6032-ldo5" for LDO5 LDO |
28 | - "ti,twl6025-ldo6" for LDO6 LDO | 28 | - "ti,twl6032-ldo6" for LDO6 LDO |
29 | - "ti,twl6025-ldo7" for LDO7 LDO | 29 | - "ti,twl6032-ldo7" for LDO7 LDO |
30 | - "ti,twl6025-ldoln" for LDOLN LDO | 30 | - "ti,twl6032-ldoln" for LDOLN LDO |
31 | - "ti,twl6025-ldousb" for LDOUSB LDO | 31 | - "ti,twl6032-ldousb" for LDOUSB LDO |
32 | - "ti,twl6025-smps3" for SMPS3 SMPS | 32 | - "ti,twl6032-smps3" for SMPS3 SMPS |
33 | - "ti,twl6025-smps4" for SMPS4 SMPS | 33 | - "ti,twl6032-smps4" for SMPS4 SMPS |
34 | - "ti,twl6025-vio" for VIO SMPS | 34 | - "ti,twl6032-vio" for VIO SMPS |
35 | For twl4030 regulators/LDOs | 35 | For twl4030 regulators/LDOs |
36 | - compatible: | 36 | - compatible: |
37 | - "ti,twl4030-vaux1" for VAUX1 LDO | 37 | - "ti,twl4030-vaux1" for VAUX1 LDO |
diff --git a/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt b/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt index 2a3feabd3b22..34c1505774bf 100644 --- a/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt +++ b/Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Atmel AT91RM9200 Real Time Clock | 1 | Atmel AT91RM9200 Real Time Clock |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: should be: "atmel,at91rm9200-rtc" | 4 | - compatible: should be: "atmel,at91rm9200-rtc" or "atmel,at91sam9x5-rtc" |
5 | - reg: physical base address of the controller and length of memory mapped | 5 | - reg: physical base address of the controller and length of memory mapped |
6 | region. | 6 | region. |
7 | - interrupts: rtc alarm/event interrupt | 7 | - interrupts: rtc alarm/event interrupt |
diff --git a/Documentation/devicetree/bindings/rtc/dw-apb.txt b/Documentation/devicetree/bindings/rtc/dw-apb.txt index 93e2b0f048e6..eb2327b2bdb3 100644 --- a/Documentation/devicetree/bindings/rtc/dw-apb.txt +++ b/Documentation/devicetree/bindings/rtc/dw-apb.txt | |||
@@ -5,9 +5,20 @@ Required properties: | |||
5 | - reg: physical base address of the controller and length of memory mapped | 5 | - reg: physical base address of the controller and length of memory mapped |
6 | region. | 6 | region. |
7 | - interrupts: IRQ line for the timer. | 7 | - interrupts: IRQ line for the timer. |
8 | - either clocks+clock-names or clock-frequency properties | ||
9 | |||
10 | Optional properties: | ||
11 | - clocks : list of clock specifiers, corresponding to entries in | ||
12 | the clock-names property; | ||
13 | - clock-names : should contain "timer" and "pclk" entries, matching entries | ||
14 | in the clocks property. | ||
8 | - clock-frequency: The frequency in HZ of the timer. | 15 | - clock-frequency: The frequency in HZ of the timer. |
9 | - clock-freq: For backwards compatibility with picoxcell | 16 | - clock-freq: For backwards compatibility with picoxcell |
10 | 17 | ||
18 | If using the clock specifiers, the pclk clock is optional, as not all | ||
19 | systems may use one. | ||
20 | |||
21 | |||
11 | Example: | 22 | Example: |
12 | 23 | ||
13 | timer1: timer@ffc09000 { | 24 | timer1: timer@ffc09000 { |
@@ -23,3 +34,11 @@ Example: | |||
23 | clock-frequency = <200000000>; | 34 | clock-frequency = <200000000>; |
24 | reg = <0xffd00000 0x1000>; | 35 | reg = <0xffd00000 0x1000>; |
25 | }; | 36 | }; |
37 | |||
38 | timer3: timer@ffe00000 { | ||
39 | compatible = "snps,dw-apb-timer-osc"; | ||
40 | interrupts = <0 170 4>; | ||
41 | reg = <0xffe00000 0x1000>; | ||
42 | clocks = <&timer_clk>, <&timer_pclk>; | ||
43 | clock-names = "timer", "pclk"; | ||
44 | }; | ||
diff --git a/Documentation/devicetree/bindings/serio/olpc,ap-sp.txt b/Documentation/devicetree/bindings/serio/olpc,ap-sp.txt new file mode 100644 index 000000000000..0e72183f52bc --- /dev/null +++ b/Documentation/devicetree/bindings/serio/olpc,ap-sp.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | OLPC AP-SP serio interface | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "olpc,ap-sp" | ||
5 | - reg : base address and length of SoC's WTM registers | ||
6 | - interrupts : SP-AP interrupt | ||
7 | |||
8 | Example: | ||
9 | ap-sp@d4290000 { | ||
10 | compatible = "olpc,ap-sp"; | ||
11 | reg = <0xd4290000 0x1000>; | ||
12 | interrupts = <40>; | ||
13 | } | ||
diff --git a/Documentation/devicetree/bindings/sound/adi,adau1701.txt b/Documentation/devicetree/bindings/sound/adi,adau1701.txt new file mode 100644 index 000000000000..547a49b56a62 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/adi,adau1701.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | Analog Devices ADAU1701 | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible: Should contain "adi,adau1701" | ||
6 | - reg: The i2c address. Value depends on the state of ADDR0 | ||
7 | and ADDR1, as wired in hardware. | ||
8 | |||
9 | Optional properties: | ||
10 | |||
11 | - reset-gpio: A GPIO spec to define which pin is connected to the | ||
12 | chip's !RESET pin. If specified, the driver will | ||
13 | assert a hardware reset at probe time. | ||
14 | - adi,pll-mode-gpios: An array of two GPIO specs to describe the GPIOs | ||
15 | the ADAU's PLL config pins are connected to. | ||
16 | The state of the pins are set according to the | ||
17 | configured clock divider on ASoC side before the | ||
18 | firmware is loaded. | ||
19 | - adi,pin-config: An array of 12 numerical values selecting one of the | ||
20 | pin configurations as described in the datasheet, | ||
21 | table 53. Note that the value of this property has | ||
22 | to be prefixed with '/bits/ 8'. | ||
23 | |||
24 | Examples: | ||
25 | |||
26 | i2c_bus { | ||
27 | adau1701@34 { | ||
28 | compatible = "adi,adau1701"; | ||
29 | reg = <0x34>; | ||
30 | reset-gpio = <&gpio 23 0>; | ||
31 | adi,pll-mode-gpios = <&gpio 24 0 &gpio 25 0>; | ||
32 | adi,pin-config = /bits/ 8 <0x4 0x7 0x5 0x5 0x4 0x4 | ||
33 | 0x4 0x4 0x4 0x4 0x4 0x4>; | ||
34 | }; | ||
35 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt new file mode 100644 index 000000000000..f49450a87890 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/imx-audio-wm8962.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | Freescale i.MX audio complex with WM8962 codec | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "fsl,imx-audio-wm8962" | ||
5 | - model : The user-visible name of this sound complex | ||
6 | - ssi-controller : The phandle of the i.MX SSI controller | ||
7 | - audio-codec : The phandle of the WM8962 audio codec | ||
8 | - audio-routing : A list of the connections between audio components. | ||
9 | Each entry is a pair of strings, the first being the connection's sink, | ||
10 | the second being the connection's source. Valid names could be power | ||
11 | supplies, WM8962 pins, and the jacks on the board: | ||
12 | |||
13 | Power supplies: | ||
14 | * Mic Bias | ||
15 | |||
16 | Board connectors: | ||
17 | * Mic Jack | ||
18 | * Headphone Jack | ||
19 | * Ext Spk | ||
20 | |||
21 | - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX) | ||
22 | - mux-ext-port : The external port of the i.MX audio muxer | ||
23 | |||
24 | Note: The AUDMUX port numbering should start at 1, which is consistent with | ||
25 | hardware manual. | ||
26 | |||
27 | Example: | ||
28 | |||
29 | sound { | ||
30 | compatible = "fsl,imx6q-sabresd-wm8962", | ||
31 | "fsl,imx-audio-wm8962"; | ||
32 | model = "wm8962-audio"; | ||
33 | ssi-controller = <&ssi2>; | ||
34 | audio-codec = <&codec>; | ||
35 | audio-routing = | ||
36 | "Headphone Jack", "HPOUTL", | ||
37 | "Headphone Jack", "HPOUTR", | ||
38 | "Ext Spk", "SPKOUTL", | ||
39 | "Ext Spk", "SPKOUTR", | ||
40 | "MICBIAS", "AMIC", | ||
41 | "IN3R", "MICBIAS", | ||
42 | "DMIC", "MICBIAS", | ||
43 | "DMICDAT", "DMIC"; | ||
44 | mux-int-port = <2>; | ||
45 | mux-ext-port = <3>; | ||
46 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/mxs-saif.txt b/Documentation/devicetree/bindings/sound/mxs-saif.txt index c37ba6143d9b..7ba07a118e37 100644 --- a/Documentation/devicetree/bindings/sound/mxs-saif.txt +++ b/Documentation/devicetree/bindings/sound/mxs-saif.txt | |||
@@ -3,8 +3,11 @@ | |||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "fsl,<chip>-saif" | 4 | - compatible: Should be "fsl,<chip>-saif" |
5 | - reg: Should contain registers location and length | 5 | - reg: Should contain registers location and length |
6 | - interrupts: Should contain ERROR and DMA interrupts | 6 | - interrupts: Should contain ERROR interrupt number |
7 | - fsl,saif-dma-channel: APBX DMA channel for the SAIF | 7 | - dmas: DMA specifier, consisting of a phandle to DMA controller node |
8 | and SAIF DMA channel ID. | ||
9 | Refer to dma.txt and fsl-mxs-dma.txt for details. | ||
10 | - dma-names: Must be "rx-tx". | ||
8 | 11 | ||
9 | Optional properties: | 12 | Optional properties: |
10 | - fsl,saif-master: phandle to the master SAIF. It's only required for | 13 | - fsl,saif-master: phandle to the master SAIF. It's only required for |
@@ -23,14 +26,16 @@ aliases { | |||
23 | saif0: saif@80042000 { | 26 | saif0: saif@80042000 { |
24 | compatible = "fsl,imx28-saif"; | 27 | compatible = "fsl,imx28-saif"; |
25 | reg = <0x80042000 2000>; | 28 | reg = <0x80042000 2000>; |
26 | interrupts = <59 80>; | 29 | interrupts = <59>; |
27 | fsl,saif-dma-channel = <4>; | 30 | dmas = <&dma_apbx 4>; |
31 | dma-names = "rx-tx"; | ||
28 | }; | 32 | }; |
29 | 33 | ||
30 | saif1: saif@80046000 { | 34 | saif1: saif@80046000 { |
31 | compatible = "fsl,imx28-saif"; | 35 | compatible = "fsl,imx28-saif"; |
32 | reg = <0x80046000 2000>; | 36 | reg = <0x80046000 2000>; |
33 | interrupts = <58 81>; | 37 | interrupts = <58>; |
34 | fsl,saif-dma-channel = <5>; | 38 | dmas = <&dma_apbx 5>; |
39 | dma-names = "rx-tx"; | ||
35 | fsl,saif-master = <&saif0>; | 40 | fsl,saif-master = <&saif0>; |
36 | }; | 41 | }; |
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt new file mode 100644 index 000000000000..d130818700b2 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt | |||
@@ -0,0 +1,71 @@ | |||
1 | NVIDIA Tegra audio complex, with RT5640 CODEC | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : "nvidia,tegra-audio-rt5640" | ||
5 | - clocks : Must contain an entry for each entry in clock-names. | ||
6 | - clock-names : Must include the following entries: | ||
7 | "pll_a" (The Tegra clock of that name), | ||
8 | "pll_a_out0" (The Tegra clock of that name), | ||
9 | "mclk" (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) | ||
10 | - nvidia,model : The user-visible name of this sound complex. | ||
11 | - nvidia,audio-routing : A list of the connections between audio components. | ||
12 | Each entry is a pair of strings, the first being the connection's sink, | ||
13 | the second being the connection's source. Valid names for sources and | ||
14 | sinks are the RT5640's pins, and the jacks on the board: | ||
15 | |||
16 | RT5640 pins: | ||
17 | |||
18 | * DMIC1 | ||
19 | * DMIC2 | ||
20 | * MICBIAS1 | ||
21 | * IN1P | ||
22 | * IN1R | ||
23 | * IN2P | ||
24 | * IN2R | ||
25 | * HPOL | ||
26 | * HPOR | ||
27 | * LOUTL | ||
28 | * LOUTR | ||
29 | * MONOP | ||
30 | * MONON | ||
31 | * SPOLP | ||
32 | * SPOLN | ||
33 | * SPORP | ||
34 | * SPORN | ||
35 | |||
36 | Board connectors: | ||
37 | |||
38 | * Headphones | ||
39 | * Speakers | ||
40 | |||
41 | - nvidia,i2s-controller : The phandle of the Tegra I2S controller that's | ||
42 | connected to the CODEC. | ||
43 | - nvidia,audio-codec : The phandle of the RT5640 audio codec. This binding | ||
44 | assumes that AIF1 on the CODEC is connected to Tegra. | ||
45 | |||
46 | Optional properties: | ||
47 | - nvidia,hp-det-gpios : The GPIO that detects headphones are plugged in | ||
48 | |||
49 | Example: | ||
50 | |||
51 | sound { | ||
52 | compatible = "nvidia,tegra-audio-rt5640-dalmore", | ||
53 | "nvidia,tegra-audio-rt5640"; | ||
54 | nvidia,model = "NVIDIA Tegra Dalmore"; | ||
55 | |||
56 | nvidia,audio-routing = | ||
57 | "Headphones", "HPOR", | ||
58 | "Headphones", "HPOL", | ||
59 | "Speakers", "SPORP", | ||
60 | "Speakers", "SPORN", | ||
61 | "Speakers", "SPOLP", | ||
62 | "Speakers", "SPOLN"; | ||
63 | |||
64 | nvidia,i2s-controller = <&tegra_i2s1>; | ||
65 | nvidia,audio-codec = <&rt5640>; | ||
66 | |||
67 | nvidia,hp-det-gpios = <&gpio 143 0>; /* GPIO PR7 */ | ||
68 | |||
69 | clocks = <&tegra_car 216>, <&tegra_car 217>, <&tegra_car 120>; | ||
70 | clock-names = "pll_a", "pll_a_out0", "mclk"; | ||
71 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/rt5640.txt b/Documentation/devicetree/bindings/sound/rt5640.txt new file mode 100644 index 000000000000..005bcb24d72d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rt5640.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | RT5640 audio CODEC | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : "realtek,rt5640". | ||
8 | |||
9 | - reg : The I2C address of the device. | ||
10 | |||
11 | - interrupts : The CODEC's interrupt output. | ||
12 | |||
13 | Optional properties: | ||
14 | |||
15 | - realtek,in1-differential | ||
16 | - realtek,in2-differential | ||
17 | Boolean. Indicate MIC1/2 input are differential, rather than single-ended. | ||
18 | |||
19 | - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | rt5640 { | ||
24 | compatible = "realtek,rt5640"; | ||
25 | reg = <0x1c>; | ||
26 | interrupt-parent = <&gpio>; | ||
27 | interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_HIGH>; | ||
28 | realtek,ldo1-en-gpios = | ||
29 | <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; | ||
30 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt b/Documentation/devicetree/bindings/sound/samsung-i2s.txt index 3070046da2e5..025e66b85a43 100644 --- a/Documentation/devicetree/bindings/sound/samsung-i2s.txt +++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt | |||
@@ -8,6 +8,16 @@ Required SoC Specific Properties: | |||
8 | - dmas: list of DMA controller phandle and DMA request line ordered pairs. | 8 | - dmas: list of DMA controller phandle and DMA request line ordered pairs. |
9 | - dma-names: identifier string for each DMA request line in the dmas property. | 9 | - dma-names: identifier string for each DMA request line in the dmas property. |
10 | These strings correspond 1:1 with the ordered pairs in dmas. | 10 | These strings correspond 1:1 with the ordered pairs in dmas. |
11 | - clocks: Handle to iis clock and RCLK source clk. | ||
12 | - clock-names: | ||
13 | i2s0 uses some base clks from CMU and some are from audio subsystem internal | ||
14 | clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and | ||
15 | "i2s_opclk1" as shown in the example below. | ||
16 | i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should | ||
17 | be "iis" and "i2s_opclk0". | ||
18 | "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root | ||
19 | clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2 | ||
20 | doesn't have any such mux. | ||
11 | 21 | ||
12 | Optional SoC Specific Properties: | 22 | Optional SoC Specific Properties: |
13 | 23 | ||
@@ -20,44 +30,26 @@ Optional SoC Specific Properties: | |||
20 | then this flag is enabled. | 30 | then this flag is enabled. |
21 | - samsung,idma-addr: Internal DMA register base address of the audio | 31 | - samsung,idma-addr: Internal DMA register base address of the audio |
22 | sub system(used in secondary sound source). | 32 | sub system(used in secondary sound source). |
23 | 33 | - pinctrl-0: Should specify pin control groups used for this controller. | |
24 | Required Board Specific Properties: | 34 | - pinctrl-names: Should contain only one value - "default". |
25 | |||
26 | - gpios: The gpio specifier for data out,data in, LRCLK, CDCLK and SCLK | ||
27 | interface lines. The format of the gpio specifier depends on the gpio | ||
28 | controller. | ||
29 | The syntax of samsung gpio specifier is | ||
30 | <[phandle of the gpio controller node] | ||
31 | [pin number within the gpio controller] | ||
32 | [mux function] | ||
33 | [flags and pull up/down] | ||
34 | [drive strength]> | ||
35 | 35 | ||
36 | Example: | 36 | Example: |
37 | 37 | ||
38 | - SoC Specific Portion: | 38 | i2s0: i2s@03830000 { |
39 | |||
40 | i2s@03830000 { | ||
41 | compatible = "samsung,i2s-v5"; | 39 | compatible = "samsung,i2s-v5"; |
42 | reg = <0x03830000 0x100>; | 40 | reg = <0x03830000 0x100>; |
43 | dmas = <&pdma0 10 | 41 | dmas = <&pdma0 10 |
44 | &pdma0 9 | 42 | &pdma0 9 |
45 | &pdma0 8>; | 43 | &pdma0 8>; |
46 | dma-names = "tx", "rx", "tx-sec"; | 44 | dma-names = "tx", "rx", "tx-sec"; |
45 | clocks = <&clock_audss EXYNOS_I2S_BUS>, | ||
46 | <&clock_audss EXYNOS_I2S_BUS>, | ||
47 | <&clock_audss EXYNOS_SCLK_I2S>; | ||
48 | clock-names = "iis", "i2s_opclk0", "i2s_opclk1"; | ||
47 | samsung,supports-6ch; | 49 | samsung,supports-6ch; |
48 | samsung,supports-rstclr; | 50 | samsung,supports-rstclr; |
49 | samsung,supports-secdai; | 51 | samsung,supports-secdai; |
50 | samsung,idma-addr = <0x03000000>; | 52 | samsung,idma-addr = <0x03000000>; |
51 | }; | 53 | pinctrl-names = "default"; |
52 | 54 | pinctrl-0 = <&i2s0_bus>; | |
53 | - Board Specific Portion: | ||
54 | |||
55 | i2s@03830000 { | ||
56 | gpios = <&gpz 0 2 0 0>, /* I2S_0_SCLK */ | ||
57 | <&gpz 1 2 0 0>, /* I2S_0_CDCLK */ | ||
58 | <&gpz 2 2 0 0>, /* I2S_0_LRCK */ | ||
59 | <&gpz 3 2 0 0>, /* I2S_0_SDI */ | ||
60 | <&gpz 4 2 0 0>, /* I2S_0_SDO[1] */ | ||
61 | <&gpz 5 2 0 0>, /* I2S_0_SDO[2] */ | ||
62 | <&gpz 6 2 0 0>; /* I2S_0_SDO[3] */ | ||
63 | }; | 55 | }; |
diff --git a/Documentation/devicetree/bindings/sound/sgtl5000.txt b/Documentation/devicetree/bindings/sound/sgtl5000.txt index 9cc44449508d..955df60a118c 100644 --- a/Documentation/devicetree/bindings/sound/sgtl5000.txt +++ b/Documentation/devicetree/bindings/sound/sgtl5000.txt | |||
@@ -5,9 +5,12 @@ Required properties: | |||
5 | 5 | ||
6 | - reg : the I2C address of the device | 6 | - reg : the I2C address of the device |
7 | 7 | ||
8 | - clocks : the clock provider of SYS_MCLK | ||
9 | |||
8 | Example: | 10 | Example: |
9 | 11 | ||
10 | codec: sgtl5000@0a { | 12 | codec: sgtl5000@0a { |
11 | compatible = "fsl,sgtl5000"; | 13 | compatible = "fsl,sgtl5000"; |
12 | reg = <0x0a>; | 14 | reg = <0x0a>; |
15 | clocks = <&clks 150>; | ||
13 | }; | 16 | }; |
diff --git a/Documentation/devicetree/bindings/sound/spdif-receiver.txt b/Documentation/devicetree/bindings/sound/spdif-receiver.txt new file mode 100644 index 000000000000..80f807bf8a1d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/spdif-receiver.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | Device-Tree bindings for dummy spdif receiver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "linux,spdif-dir". | ||
5 | |||
6 | Example node: | ||
7 | |||
8 | codec: spdif-receiver { | ||
9 | compatible = "linux,spdif-dir"; | ||
10 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/spdif-transmitter.txt b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt new file mode 100644 index 000000000000..55a85841dd85 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | Device-Tree bindings for dummy spdif transmitter | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: should be "linux,spdif-dit". | ||
5 | |||
6 | Example node: | ||
7 | |||
8 | codec: spdif-transmitter { | ||
9 | compatible = "linux,spdif-dit"; | ||
10 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ssm2518.txt b/Documentation/devicetree/bindings/sound/ssm2518.txt new file mode 100644 index 000000000000..59381a778c79 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ssm2518.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | SSM2518 audio amplifier | ||
2 | |||
3 | This device supports I2C only. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : Must be "adi,ssm2518" | ||
7 | - reg : the I2C address of the device. This will either be 0x34 (ADDR pin low) | ||
8 | or 0x35 (ADDR pin high) | ||
9 | |||
10 | Optional properties: | ||
11 | - gpios : GPIO connected to the nSD pin. If the property is not present it is | ||
12 | assumed that the nSD pin is hardwired to always on. | ||
13 | |||
14 | Example: | ||
15 | |||
16 | ssm2518: ssm2518@34 { | ||
17 | compatible = "adi,ssm2518"; | ||
18 | reg = <0x34>; | ||
19 | gpios = <&gpio 5 0>; | ||
20 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/ti,tas5086.txt b/Documentation/devicetree/bindings/sound/ti,tas5086.txt index 8ea4f5b4818d..d2866a0d6a26 100644 --- a/Documentation/devicetree/bindings/sound/ti,tas5086.txt +++ b/Documentation/devicetree/bindings/sound/ti,tas5086.txt | |||
@@ -20,6 +20,17 @@ Optional properties: | |||
20 | When not specified, the hardware default of 1300ms | 20 | When not specified, the hardware default of 1300ms |
21 | is retained. | 21 | is retained. |
22 | 22 | ||
23 | - ti,mid-z-channel-X: Boolean properties, X being a number from 1 to 6. | ||
24 | If given, channel X will start with the Mid-Z start | ||
25 | sequence, otherwise the default Low-Z scheme is used. | ||
26 | |||
27 | The correct configuration depends on how the power | ||
28 | stages connected to the PWM output pins work. Not all | ||
29 | power stages are compatible to Mid-Z - please refer | ||
30 | to the datasheets for more details. | ||
31 | |||
32 | Most systems should not set any of these properties. | ||
33 | |||
23 | Examples: | 34 | Examples: |
24 | 35 | ||
25 | i2c_bus { | 36 | i2c_bus { |
diff --git a/Documentation/devicetree/bindings/sound/wm8962.txt b/Documentation/devicetree/bindings/sound/wm8962.txt index dceb3b1c2bb7..7f82b59ec8f9 100644 --- a/Documentation/devicetree/bindings/sound/wm8962.txt +++ b/Documentation/devicetree/bindings/sound/wm8962.txt | |||
@@ -8,9 +8,32 @@ Required properties: | |||
8 | 8 | ||
9 | - reg : the I2C address of the device. | 9 | - reg : the I2C address of the device. |
10 | 10 | ||
11 | Optional properties: | ||
12 | - spk-mono: This is a boolean property. If present, the SPK_MONO bit | ||
13 | of R51 (Class D Control 2) gets set, indicating that the speaker is | ||
14 | in mono mode. | ||
15 | |||
16 | - mic-cfg : Default register value for R48 (Additional Control 4). | ||
17 | If absent, the default should be the register default. | ||
18 | |||
19 | - gpio-cfg : A list of GPIO configuration register values. The list must | ||
20 | be 6 entries long. If absent, no configuration of these registers is | ||
21 | performed. And note that only the value within [0x0, 0xffff] is valid. | ||
22 | Any other value is regarded as setting the GPIO register by its reset | ||
23 | value 0x0. | ||
24 | |||
11 | Example: | 25 | Example: |
12 | 26 | ||
13 | codec: wm8962@1a { | 27 | codec: wm8962@1a { |
14 | compatible = "wlf,wm8962"; | 28 | compatible = "wlf,wm8962"; |
15 | reg = <0x1a>; | 29 | reg = <0x1a>; |
30 | |||
31 | gpio-cfg = < | ||
32 | 0x0000 /* 0:Default */ | ||
33 | 0x0000 /* 1:Default */ | ||
34 | 0x0013 /* 2:FN_DMICCLK */ | ||
35 | 0x0000 /* 3:Default */ | ||
36 | 0x8014 /* 4:FN_DMICCDAT */ | ||
37 | 0x0000 /* 5:Default */ | ||
38 | >; | ||
16 | }; | 39 | }; |
diff --git a/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt b/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt index 8bf89c643640..f11f295c8450 100644 --- a/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt +++ b/Documentation/devicetree/bindings/spi/brcm,bcm2835-spi.txt | |||
@@ -2,7 +2,7 @@ Broadcom BCM2835 SPI0 controller | |||
2 | 2 | ||
3 | The BCM2835 contains two forms of SPI master controller, one known simply as | 3 | The BCM2835 contains two forms of SPI master controller, one known simply as |
4 | SPI0, and the other known as the "Universal SPI Master"; part of the | 4 | SPI0, and the other known as the "Universal SPI Master"; part of the |
5 | auxilliary block. This binding applies to the SPI0 controller. | 5 | auxiliary block. This binding applies to the SPI0 controller. |
6 | 6 | ||
7 | Required properties: | 7 | Required properties: |
8 | - compatible: Should be "brcm,bcm2835-spi". | 8 | - compatible: Should be "brcm,bcm2835-spi". |
diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt index 938809c6829b..4c85c4c69584 100644 --- a/Documentation/devicetree/bindings/spi/omap-spi.txt +++ b/Documentation/devicetree/bindings/spi/omap-spi.txt | |||
@@ -10,7 +10,18 @@ Required properties: | |||
10 | input. The default is D0 as input and | 10 | input. The default is D0 as input and |
11 | D1 as output. | 11 | D1 as output. |
12 | 12 | ||
13 | Example: | 13 | Optional properties: |
14 | - dmas: List of DMA specifiers with the controller specific format | ||
15 | as described in the generic DMA client binding. A tx and rx | ||
16 | specifier is required for each chip select. | ||
17 | - dma-names: List of DMA request names. These strings correspond | ||
18 | 1:1 with the DMA specifiers listed in dmas. The string naming | ||
19 | is to be "rxN" and "txN" for RX and TX requests, | ||
20 | respectively, where N equals the chip select number. | ||
21 | |||
22 | Examples: | ||
23 | |||
24 | [hwmod populated DMA resources] | ||
14 | 25 | ||
15 | mcspi1: mcspi@1 { | 26 | mcspi1: mcspi@1 { |
16 | #address-cells = <1>; | 27 | #address-cells = <1>; |
@@ -20,3 +31,17 @@ mcspi1: mcspi@1 { | |||
20 | ti,spi-num-cs = <4>; | 31 | ti,spi-num-cs = <4>; |
21 | }; | 32 | }; |
22 | 33 | ||
34 | [generic DMA request binding] | ||
35 | |||
36 | mcspi1: mcspi@1 { | ||
37 | #address-cells = <1>; | ||
38 | #size-cells = <0>; | ||
39 | compatible = "ti,omap4-mcspi"; | ||
40 | ti,hwmods = "mcspi1"; | ||
41 | ti,spi-num-cs = <2>; | ||
42 | dmas = <&edma 42 | ||
43 | &edma 43 | ||
44 | &edma 44 | ||
45 | &edma 45>; | ||
46 | dma-names = "tx0", "rx0", "tx1", "rx1"; | ||
47 | }; | ||
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt new file mode 100644 index 000000000000..ed9377811ee2 --- /dev/null +++ b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt | |||
@@ -0,0 +1,99 @@ | |||
1 | Device-Tree bindings for LVDS Display Bridge (ldb) | ||
2 | |||
3 | LVDS Display Bridge | ||
4 | =================== | ||
5 | |||
6 | The LVDS Display Bridge device tree node contains up to two lvds-channel | ||
7 | nodes describing each of the two LVDS encoder channels of the bridge. | ||
8 | |||
9 | Required properties: | ||
10 | - #address-cells : should be <1> | ||
11 | - #size-cells : should be <0> | ||
12 | - compatible : should be "fsl,imx53-ldb" or "fsl,imx6q-ldb". | ||
13 | Both LDB versions are similar, but i.MX6 has an additional | ||
14 | multiplexer in the front to select any of the four IPU display | ||
15 | interfaces as input for each LVDS channel. | ||
16 | - gpr : should be <&gpr> on i.MX53 and i.MX6q. | ||
17 | The phandle points to the iomuxc-gpr region containing the LVDS | ||
18 | control register. | ||
19 | - clocks, clock-names : phandles to the LDB divider and selector clocks and to | ||
20 | the display interface selector clocks, as described in | ||
21 | Documentation/devicetree/bindings/clock/clock-bindings.txt | ||
22 | The following clocks are expected on i.MX53: | ||
23 | "di0_pll" - LDB LVDS channel 0 mux | ||
24 | "di1_pll" - LDB LVDS channel 1 mux | ||
25 | "di0" - LDB LVDS channel 0 gate | ||
26 | "di1" - LDB LVDS channel 1 gate | ||
27 | "di0_sel" - IPU1 DI0 mux | ||
28 | "di1_sel" - IPU1 DI1 mux | ||
29 | On i.MX6q the following additional clocks are needed: | ||
30 | "di2_sel" - IPU2 DI0 mux | ||
31 | "di3_sel" - IPU2 DI1 mux | ||
32 | The needed clock numbers for each are documented in | ||
33 | Documentation/devicetree/bindings/clock/imx5-clock.txt, and in | ||
34 | Documentation/devicetree/bindings/clock/imx6q-clock.txt. | ||
35 | |||
36 | Optional properties: | ||
37 | - pinctrl-names : should be "default" on i.MX53, not used on i.MX6q | ||
38 | - pinctrl-0 : a phandle pointing to LVDS pin settings on i.MX53, | ||
39 | not used on i.MX6q | ||
40 | - fsl,dual-channel : boolean. if it exists, only LVDS channel 0 should | ||
41 | be configured - one input will be distributed on both outputs in dual | ||
42 | channel mode | ||
43 | |||
44 | LVDS Channel | ||
45 | ============ | ||
46 | |||
47 | Each LVDS Channel has to contain a display-timings node that describes the | ||
48 | video timings for the connected LVDS display. For detailed information, also | ||
49 | have a look at Documentation/devicetree/bindings/video/display-timing.txt. | ||
50 | |||
51 | Required properties: | ||
52 | - reg : should be <0> or <1> | ||
53 | - crtcs : a list of phandles with index pointing to the IPU display interfaces | ||
54 | that can be used as video source for this channel. | ||
55 | - fsl,data-mapping : should be "spwg" or "jeida" | ||
56 | This describes how the color bits are laid out in the | ||
57 | serialized LVDS signal. | ||
58 | - fsl,data-width : should be <18> or <24> | ||
59 | |||
60 | example: | ||
61 | |||
62 | gpr: iomuxc-gpr@53fa8000 { | ||
63 | /* ... */ | ||
64 | }; | ||
65 | |||
66 | ldb: ldb@53fa8008 { | ||
67 | #address-cells = <1>; | ||
68 | #size-cells = <0>; | ||
69 | compatible = "fsl,imx53-ldb"; | ||
70 | gpr = <&gpr>; | ||
71 | clocks = <&clks 122>, <&clks 120>, | ||
72 | <&clks 115>, <&clks 116>, | ||
73 | <&clks 123>, <&clks 85>; | ||
74 | clock-names = "di0_pll", "di1_pll", | ||
75 | "di0_sel", "di1_sel", | ||
76 | "di0", "di1"; | ||
77 | |||
78 | lvds-channel@0 { | ||
79 | reg = <0>; | ||
80 | crtcs = <&ipu 0>; | ||
81 | fsl,data-mapping = "spwg"; | ||
82 | fsl,data-width = <24>; | ||
83 | |||
84 | display-timings { | ||
85 | /* ... */ | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | lvds-channel@1 { | ||
90 | reg = <1>; | ||
91 | crtcs = <&ipu 1>; | ||
92 | fsl,data-mapping = "spwg"; | ||
93 | fsl,data-width = <24>; | ||
94 | |||
95 | display-timings { | ||
96 | /* ... */ | ||
97 | }; | ||
98 | }; | ||
99 | }; | ||
diff --git a/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt new file mode 100644 index 000000000000..0c9222d27fae --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt | |||
@@ -0,0 +1,74 @@ | |||
1 | * Texas Instrument OMAP SCM bandgap bindings | ||
2 | |||
3 | In the System Control Module, OMAP supplies a voltage reference | ||
4 | and a temperature sensor feature that are gathered in the band | ||
5 | gap voltage and temperature sensor (VBGAPTS) module. The band | ||
6 | gap provides current and voltage reference for its internal | ||
7 | circuits and other analog IP blocks. The analog-to-digital | ||
8 | converter (ADC) produces an output value that is proportional | ||
9 | to the silicon temperature. | ||
10 | |||
11 | Required properties: | ||
12 | - compatible : Should be: | ||
13 | - "ti,omap4430-bandgap" : for OMAP4430 bandgap | ||
14 | - "ti,omap4460-bandgap" : for OMAP4460 bandgap | ||
15 | - "ti,omap4470-bandgap" : for OMAP4470 bandgap | ||
16 | - "ti,omap5430-bandgap" : for OMAP5430 bandgap | ||
17 | - interrupts : this entry should indicate which interrupt line | ||
18 | the talert signal is routed to; | ||
19 | Specific: | ||
20 | - gpios : this entry should be used to inform which GPIO | ||
21 | line the tshut signal is routed to. The informed GPIO will | ||
22 | be treated as an IRQ; | ||
23 | - regs : this entry must also be specified and it is specific | ||
24 | to each bandgap version, because the mapping may change from | ||
25 | soc to soc, apart of depending on available features. | ||
26 | |||
27 | Example: | ||
28 | OMAP4430: | ||
29 | bandgap { | ||
30 | reg = <0x4a002260 0x4 0x4a00232C 0x4>; | ||
31 | compatible = "ti,omap4430-bandgap"; | ||
32 | }; | ||
33 | |||
34 | OMAP4460: | ||
35 | bandgap { | ||
36 | reg = <0x4a002260 0x4 | ||
37 | 0x4a00232C 0x4 | ||
38 | 0x4a002378 0x18>; | ||
39 | compatible = "ti,omap4460-bandgap"; | ||
40 | interrupts = <0 126 4>; /* talert */ | ||
41 | gpios = <&gpio3 22 0>; /* tshut */ | ||
42 | }; | ||
43 | |||
44 | OMAP4470: | ||
45 | bandgap { | ||
46 | reg = <0x4a002260 0x4 | ||
47 | 0x4a00232C 0x4 | ||
48 | 0x4a002378 0x18>; | ||
49 | compatible = "ti,omap4470-bandgap"; | ||
50 | interrupts = <0 126 4>; /* talert */ | ||
51 | gpios = <&gpio3 22 0>; /* tshut */ | ||
52 | }; | ||
53 | |||
54 | OMAP5430: | ||
55 | bandgap { | ||
56 | reg = <0x4a0021e0 0xc | ||
57 | 0x4a00232c 0xc | ||
58 | 0x4a002380 0x2c | ||
59 | 0x4a0023C0 0x3c>; | ||
60 | compatible = "ti,omap5430-bandgap"; | ||
61 | interrupts = <0 126 4>; /* talert */ | ||
62 | }; | ||
63 | |||
64 | DRA752: | ||
65 | bandgap { | ||
66 | reg = <0x4a0021e0 0xc | ||
67 | 0x4a00232c 0xc | ||
68 | 0x4a002380 0x2c | ||
69 | 0x4a0023C0 0x3c | ||
70 | 0x4a002564 0x8 | ||
71 | 0x4a002574 0x50>; | ||
72 | compatible = "ti,dra752-bandgap"; | ||
73 | interrupts = <0 126 4>; /* talert */ | ||
74 | }; | ||
diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt index cb47bfbcaeea..b5a86d20ee36 100644 --- a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt +++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt | |||
@@ -44,7 +44,7 @@ Example 1: In this example, the system uses only the first global timer | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | Example 2: In this example, the MCT global and local timer interrupts are | 46 | Example 2: In this example, the MCT global and local timer interrupts are |
47 | connected to two seperate interrupt controllers. Hence, an | 47 | connected to two separate interrupt controllers. Hence, an |
48 | interrupt-map is created to map the interrupts to the respective | 48 | interrupt-map is created to map the interrupts to the respective |
49 | interrupt controllers. | 49 | interrupt controllers. |
50 | 50 | ||
diff --git a/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt b/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt new file mode 100644 index 000000000000..9499bc8ee9e3 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | ST-Ericsson U300 apptimer | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "stericsson,u300-apptimer" | ||
6 | - reg : Specifies base physical address and size of the registers. | ||
7 | - interrupts : A list of 4 interrupts; one for each subtimer. These | ||
8 | are, in order: OS (operating system), DD (device driver) both | ||
9 | adopted for EPOC/Symbian with two specific IRQs for these tasks, | ||
10 | then GP1 and GP2, which are general-purpose timers. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | timer { | ||
15 | compatible = "stericsson,u300-apptimer"; | ||
16 | reg = <0xc0014000 0x1000>; | ||
17 | interrupts = <24 25 26 27>; | ||
18 | }; | ||
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt index b462d0c54823..c662eb36be29 100644 --- a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt +++ b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt | |||
@@ -8,6 +8,8 @@ Required properties: | |||
8 | Optional properties: | 8 | Optional properties: |
9 | - fsl,uart-has-rtscts : Indicate the uart has rts and cts | 9 | - fsl,uart-has-rtscts : Indicate the uart has rts and cts |
10 | - fsl,irda-mode : Indicate the uart supports irda mode | 10 | - fsl,irda-mode : Indicate the uart supports irda mode |
11 | - fsl,dte-mode : Indicate the uart works in DTE mode. The uart works | ||
12 | is DCE mode by default. | ||
11 | 13 | ||
12 | Example: | 14 | Example: |
13 | 15 | ||
@@ -16,4 +18,5 @@ serial@73fbc000 { | |||
16 | reg = <0x73fbc000 0x4000>; | 18 | reg = <0x73fbc000 0x4000>; |
17 | interrupts = <31>; | 19 | interrupts = <31>; |
18 | fsl,uart-has-rtscts; | 20 | fsl,uart-has-rtscts; |
21 | fsl,dte-mode; | ||
19 | }; | 22 | }; |
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt new file mode 100644 index 000000000000..6fd1dd1638dd --- /dev/null +++ b/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * Freescale low power universal asynchronous receiver/transmitter (lpuart) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "fsl,<soc>-lpuart" | ||
5 | - reg : Address and length of the register set for the device | ||
6 | - interrupts : Should contain uart interrupt | ||
7 | |||
8 | Example: | ||
9 | |||
10 | uart0: serial@40027000 { | ||
11 | compatible = "fsl,vf610-lpuart"; | ||
12 | reg = <0x40027000 0x1000>; | ||
13 | interrupts = <0 61 0x00>; | ||
14 | }; | ||
diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt new file mode 100644 index 000000000000..20468b2a7516 --- /dev/null +++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * Universal Flash Storage (UFS) Host Controller | ||
2 | |||
3 | UFSHC nodes are defined to describe on-chip UFS host controllers. | ||
4 | Each UFS controller instance should have its own node. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : compatible list, contains "jedec,ufs-1.1" | ||
8 | - interrupts : <interrupt mapping for UFS host controller IRQ> | ||
9 | - reg : <registers mapping> | ||
10 | |||
11 | Example: | ||
12 | ufshc@0xfc598000 { | ||
13 | compatible = "jedec,ufs-1.1"; | ||
14 | reg = <0xfc598000 0x800>; | ||
15 | interrupts = <0 28 0>; | ||
16 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt index ea840f7f9258..dc9dc8c87f15 100644 --- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt | |||
@@ -12,7 +12,7 @@ AM33XX MUSB GLUE | |||
12 | represents PERIPHERAL. | 12 | represents PERIPHERAL. |
13 | - port1-mode : Should be "1" to represent HOST. "3" signifies OTG and "2" | 13 | - port1-mode : Should be "1" to represent HOST. "3" signifies OTG and "2" |
14 | represents PERIPHERAL. | 14 | represents PERIPHERAL. |
15 | - power : Should be "250". This signifies the controller can supply upto | 15 | - power : Should be "250". This signifies the controller can supply up to |
16 | 500mA when operating in host mode. | 16 | 500mA when operating in host mode. |
17 | 17 | ||
18 | Example: | 18 | Example: |
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt index 60bd2150a3e6..55f51af08bc7 100644 --- a/Documentation/devicetree/bindings/usb/atmel-usb.txt +++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt | |||
@@ -47,3 +47,85 @@ usb1: gadget@fffa4000 { | |||
47 | interrupts = <10 4>; | 47 | interrupts = <10 4>; |
48 | atmel,vbus-gpio = <&pioC 5 0>; | 48 | atmel,vbus-gpio = <&pioC 5 0>; |
49 | }; | 49 | }; |
50 | |||
51 | Atmel High-Speed USB device controller | ||
52 | |||
53 | Required properties: | ||
54 | - compatible: Should be "atmel,at91sam9rl-udc" | ||
55 | - reg: Address and length of the register set for the device | ||
56 | - interrupts: Should contain usba interrupt | ||
57 | - ep childnode: To specify the number of endpoints and their properties. | ||
58 | |||
59 | Optional properties: | ||
60 | - atmel,vbus-gpio: If present, specifies a gpio that needs to be | ||
61 | activated for the bus to be powered. | ||
62 | |||
63 | Required child node properties: | ||
64 | - name: Name of the endpoint. | ||
65 | - reg: Num of the endpoint. | ||
66 | - atmel,fifo-size: Size of the fifo. | ||
67 | - atmel,nb-banks: Number of banks. | ||
68 | - atmel,can-dma: Boolean to specify if the endpoint support DMA. | ||
69 | - atmel,can-isoc: Boolean to specify if the endpoint support ISOC. | ||
70 | |||
71 | usb2: gadget@fff78000 { | ||
72 | #address-cells = <1>; | ||
73 | #size-cells = <0>; | ||
74 | compatible = "atmel,at91sam9rl-udc"; | ||
75 | reg = <0x00600000 0x80000 | ||
76 | 0xfff78000 0x400>; | ||
77 | interrupts = <27 4 0>; | ||
78 | atmel,vbus-gpio = <&pioB 19 0>; | ||
79 | |||
80 | ep0 { | ||
81 | reg = <0>; | ||
82 | atmel,fifo-size = <64>; | ||
83 | atmel,nb-banks = <1>; | ||
84 | }; | ||
85 | |||
86 | ep1 { | ||
87 | reg = <1>; | ||
88 | atmel,fifo-size = <1024>; | ||
89 | atmel,nb-banks = <2>; | ||
90 | atmel,can-dma; | ||
91 | atmel,can-isoc; | ||
92 | }; | ||
93 | |||
94 | ep2 { | ||
95 | reg = <2>; | ||
96 | atmel,fifo-size = <1024>; | ||
97 | atmel,nb-banks = <2>; | ||
98 | atmel,can-dma; | ||
99 | atmel,can-isoc; | ||
100 | }; | ||
101 | |||
102 | ep3 { | ||
103 | reg = <3>; | ||
104 | atmel,fifo-size = <1024>; | ||
105 | atmel,nb-banks = <3>; | ||
106 | atmel,can-dma; | ||
107 | }; | ||
108 | |||
109 | ep4 { | ||
110 | reg = <4>; | ||
111 | atmel,fifo-size = <1024>; | ||
112 | atmel,nb-banks = <3>; | ||
113 | atmel,can-dma; | ||
114 | }; | ||
115 | |||
116 | ep5 { | ||
117 | reg = <5>; | ||
118 | atmel,fifo-size = <1024>; | ||
119 | atmel,nb-banks = <3>; | ||
120 | atmel,can-dma; | ||
121 | atmel,can-isoc; | ||
122 | }; | ||
123 | |||
124 | ep6 { | ||
125 | reg = <6>; | ||
126 | atmel,fifo-size = <1024>; | ||
127 | atmel,nb-banks = <3>; | ||
128 | atmel,can-dma; | ||
129 | atmel,can-isoc; | ||
130 | }; | ||
131 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt index 1c04a4c9515f..b4b5b7906c88 100644 --- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt +++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt | |||
@@ -5,6 +5,12 @@ Required properties: | |||
5 | - reg: Should contain registers location and length | 5 | - reg: Should contain registers location and length |
6 | - interrupts: Should contain controller interrupt | 6 | - interrupts: Should contain controller interrupt |
7 | 7 | ||
8 | Recommended properies: | ||
9 | - phy_type: the type of the phy connected to the core. Should be one | ||
10 | of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this | ||
11 | property the PORTSC register won't be touched | ||
12 | - dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg" | ||
13 | |||
8 | Optional properties: | 14 | Optional properties: |
9 | - fsl,usbphy: phandler of usb phy that connects to the only one port | 15 | - fsl,usbphy: phandler of usb phy that connects to the only one port |
10 | - fsl,usbmisc: phandler of non-core register device, with one argument | 16 | - fsl,usbmisc: phandler of non-core register device, with one argument |
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt index b3abde736017..d967ba16de60 100644 --- a/Documentation/devicetree/bindings/usb/exynos-usb.txt +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt | |||
@@ -48,3 +48,37 @@ Example: | |||
48 | clocks = <&clock 285>; | 48 | clocks = <&clock 285>; |
49 | clock-names = "usbhost"; | 49 | clock-names = "usbhost"; |
50 | }; | 50 | }; |
51 | |||
52 | DWC3 | ||
53 | Required properties: | ||
54 | - compatible: should be "samsung,exynos5250-dwusb3" for USB 3.0 DWC3 | ||
55 | controller. | ||
56 | - #address-cells, #size-cells : should be '1' if the device has sub-nodes | ||
57 | with 'reg' property. | ||
58 | - ranges: allows valid 1:1 translation between child's address space and | ||
59 | parent's address space | ||
60 | - clocks: Clock IDs array as required by the controller. | ||
61 | - clock-names: names of clocks correseponding to IDs in the clock property | ||
62 | |||
63 | Sub-nodes: | ||
64 | The dwc3 core should be added as subnode to Exynos dwc3 glue. | ||
65 | - dwc3 : | ||
66 | The binding details of dwc3 can be found in: | ||
67 | Documentation/devicetree/bindings/usb/dwc3.txt | ||
68 | |||
69 | Example: | ||
70 | usb@12000000 { | ||
71 | compatible = "samsung,exynos5250-dwusb3"; | ||
72 | clocks = <&clock 286>; | ||
73 | clock-names = "usbdrd30"; | ||
74 | #address-cells = <1>; | ||
75 | #size-cells = <1>; | ||
76 | ranges; | ||
77 | |||
78 | dwc3 { | ||
79 | compatible = "synopsys,dwc3"; | ||
80 | reg = <0x12000000 0x10000>; | ||
81 | interrupts = <0 72 0>; | ||
82 | usb-phy = <&usb2_phy &usb3_phy>; | ||
83 | }; | ||
84 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt index 34c952883276..df0933043a5b 100644 --- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt | |||
@@ -6,27 +6,10 @@ Practice : Universal Serial Bus" with the following modifications | |||
6 | and additions : | 6 | and additions : |
7 | 7 | ||
8 | Required properties : | 8 | Required properties : |
9 | - compatible : Should be "nvidia,tegra20-ehci" for USB controllers | 9 | - compatible : Should be "nvidia,tegra20-ehci". |
10 | used in host mode. | 10 | - nvidia,phy : phandle of the PHY that the controller is connected to. |
11 | - phy_type : Should be one of "ulpi" or "utmi". | 11 | - clocks : Contains a single entry which defines the USB controller's clock. |
12 | - nvidia,vbus-gpio : If present, specifies a gpio that needs to be | ||
13 | activated for the bus to be powered. | ||
14 | - nvidia,phy : phandle of the PHY instance, the controller is connected to. | ||
15 | |||
16 | Required properties for phy_type == ulpi: | ||
17 | - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. | ||
18 | 12 | ||
19 | Optional properties: | 13 | Optional properties: |
20 | - dr_mode : dual role mode. Indicates the working mode for | 14 | - nvidia,needs-double-reset : boolean is to be set for some of the Tegra20 |
21 | nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", | 15 | USB ports, which need reset twice due to hardware issues. |
22 | or "otg". Default to "host" if not defined for backward compatibility. | ||
23 | host means this is a host controller | ||
24 | peripheral means it is device controller | ||
25 | otg means it can operate as either ("on the go") | ||
26 | - nvidia,has-legacy-mode : boolean indicates whether this controller can | ||
27 | operate in legacy mode (as APX 2500 / 2600). In legacy mode some | ||
28 | registers are accessed through the APB_MISC base address instead of | ||
29 | the USB controller. Since this is a legacy issue it probably does not | ||
30 | warrant a compatible string of its own. | ||
31 | - nvidia,needs-double-reset : boolean is to be set for some of the Tegra2 | ||
32 | USB ports, which need reset twice due to hardware issues. | ||
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt index 6bdaba2f0aa1..c4c9e9e664aa 100644 --- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt +++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt | |||
@@ -4,14 +4,49 @@ The device node for Tegra SOC USB PHY: | |||
4 | 4 | ||
5 | Required properties : | 5 | Required properties : |
6 | - compatible : Should be "nvidia,tegra20-usb-phy". | 6 | - compatible : Should be "nvidia,tegra20-usb-phy". |
7 | - reg : Address and length of the register set for the USB PHY interface. | 7 | - reg : Defines the following set of registers, in the order listed: |
8 | - phy_type : Should be one of "ulpi" or "utmi". | 8 | - The PHY's own register set. |
9 | Always present. | ||
10 | - The register set of the PHY containing the UTMI pad control registers. | ||
11 | Present if-and-only-if phy_type == utmi. | ||
12 | - phy_type : Should be one of "utmi", "ulpi" or "hsic". | ||
13 | - clocks : Defines the clocks listed in the clock-names property. | ||
14 | - clock-names : The following clock names must be present: | ||
15 | - reg: The clock needed to access the PHY's own registers. This is the | ||
16 | associated EHCI controller's clock. Always present. | ||
17 | - pll_u: PLL_U. Always present. | ||
18 | - timer: The timeout clock (clk_m). Present if phy_type == utmi. | ||
19 | - utmi-pads: The clock needed to access the UTMI pad control registers. | ||
20 | Present if phy_type == utmi. | ||
21 | - ulpi-link: The clock Tegra provides to the ULPI PHY (cdev2). | ||
22 | Present if phy_type == ulpi, and ULPI link mode is in use. | ||
9 | 23 | ||
10 | Required properties for phy_type == ulpi: | 24 | Required properties for phy_type == ulpi: |
11 | - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. | 25 | - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. |
12 | 26 | ||
27 | Required PHY timing params for utmi phy: | ||
28 | - nvidia,hssync-start-delay : Number of 480 Mhz clock cycles to wait before | ||
29 | start of sync launches RxActive | ||
30 | - nvidia,elastic-limit : Variable FIFO Depth of elastic input store | ||
31 | - nvidia,idle-wait-delay : Number of 480 Mhz clock cycles of idle to wait | ||
32 | before declare IDLE. | ||
33 | - nvidia,term-range-adj : Range adjusment on terminations | ||
34 | - nvidia,xcvr-setup : HS driver output control | ||
35 | - nvidia,xcvr-lsfslew : LS falling slew rate control. | ||
36 | - nvidia,xcvr-lsrslew : LS rising slew rate control. | ||
37 | |||
13 | Optional properties: | 38 | Optional properties: |
14 | - nvidia,has-legacy-mode : boolean indicates whether this controller can | 39 | - nvidia,has-legacy-mode : boolean indicates whether this controller can |
15 | operate in legacy mode (as APX 2500 / 2600). In legacy mode some | 40 | operate in legacy mode (as APX 2500 / 2600). In legacy mode some |
16 | registers are accessed through the APB_MISC base address instead of | 41 | registers are accessed through the APB_MISC base address instead of |
17 | the USB controller. \ No newline at end of file | 42 | the USB controller. |
43 | - nvidia,is-wired : boolean. Indicates whether we can do certain kind of power | ||
44 | optimizations for the devices that are always connected. e.g. modem. | ||
45 | - dr_mode : dual role mode. Indicates the working mode for the PHY. Can be | ||
46 | "host", "peripheral", or "otg". Defaults to "host" if not defined. | ||
47 | host means this is a host controller | ||
48 | peripheral means it is device controller | ||
49 | otg means it can operate as either ("on the go") | ||
50 | |||
51 | Required properties for dr_mode == otg: | ||
52 | - vbus-supply: regulator for VBUS | ||
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt index d4769f343d6c..57e71f6817d0 100644 --- a/Documentation/devicetree/bindings/usb/omap-usb.txt +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt | |||
@@ -16,7 +16,7 @@ OMAP MUSB GLUE | |||
16 | specifying ULPI and UTMI respectively. | 16 | specifying ULPI and UTMI respectively. |
17 | - mode : Should be "3" to represent OTG. "1" signifies HOST and "2" | 17 | - mode : Should be "3" to represent OTG. "1" signifies HOST and "2" |
18 | represents PERIPHERAL. | 18 | represents PERIPHERAL. |
19 | - power : Should be "50". This signifies the controller can supply upto | 19 | - power : Should be "50". This signifies the controller can supply up to |
20 | 100mA when operating in host mode. | 20 | 100mA when operating in host mode. |
21 | - usb-phy : the phandle for the PHY device | 21 | - usb-phy : the phandle for the PHY device |
22 | 22 | ||
diff --git a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt index 36b9aede3f40..0aee0ad3f035 100644 --- a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt +++ b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt | |||
@@ -8,7 +8,7 @@ TWL6030 USB COMPARATOR | |||
8 | usb interrupt number that raises VBUS interrupts when the controller has to | 8 | usb interrupt number that raises VBUS interrupts when the controller has to |
9 | act as device | 9 | act as device |
10 | - usb-supply : phandle to the regulator device tree node. It should be vusb | 10 | - usb-supply : phandle to the regulator device tree node. It should be vusb |
11 | if it is twl6030 or ldousb if it is twl6025 subclass. | 11 | if it is twl6030 or ldousb if it is twl6032 subclass. |
12 | 12 | ||
13 | twl6030-usb { | 13 | twl6030-usb { |
14 | compatible = "ti,twl6030-usb"; | 14 | compatible = "ti,twl6030-usb"; |
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt index 6813a715fc7d..8c5be48b43c8 100644 --- a/Documentation/devicetree/bindings/usb/usb3503.txt +++ b/Documentation/devicetree/bindings/usb/usb3503.txt | |||
@@ -4,6 +4,10 @@ Required properties: | |||
4 | - compatible: Should be "smsc,usb3503". | 4 | - compatible: Should be "smsc,usb3503". |
5 | - reg: Specifies the i2c slave address, it should be 0x08. | 5 | - reg: Specifies the i2c slave address, it should be 0x08. |
6 | - connect-gpios: Should specify GPIO for connect. | 6 | - connect-gpios: Should specify GPIO for connect. |
7 | - disabled-ports: Should specify the ports unused. | ||
8 | '1' or '2' or '3' are availe for this property to describe the port | ||
9 | number. 1~3 property values are possible to be desribed. | ||
10 | Do not describe this property if all ports have to be enabled. | ||
7 | - intn-gpios: Should specify GPIO for interrupt. | 11 | - intn-gpios: Should specify GPIO for interrupt. |
8 | - reset-gpios: Should specify GPIO for reset. | 12 | - reset-gpios: Should specify GPIO for reset. |
9 | - initial-mode: Should specify initial mode. | 13 | - initial-mode: Should specify initial mode. |
@@ -14,6 +18,7 @@ Examples: | |||
14 | compatible = "smsc,usb3503"; | 18 | compatible = "smsc,usb3503"; |
15 | reg = <0x08>; | 19 | reg = <0x08>; |
16 | connect-gpios = <&gpx3 0 1>; | 20 | connect-gpios = <&gpx3 0 1>; |
21 | disabled-ports = <2 3>; | ||
17 | intn-gpios = <&gpx3 4 1>; | 22 | intn-gpios = <&gpx3 4 1>; |
18 | reset-gpios = <&gpx3 5 1>; | 23 | reset-gpios = <&gpx3 5 1>; |
19 | initial-mode = <1>; | 24 | initial-mode = <1>; |
diff --git a/Documentation/devicetree/bindings/usb/ux500-usb.txt b/Documentation/devicetree/bindings/usb/ux500-usb.txt new file mode 100644 index 000000000000..330d6ec15401 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ux500-usb.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | Ux500 MUSB | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "stericsson,db8500-musb" | ||
5 | - reg : Offset and length of registers | ||
6 | - interrupts : Interrupt; mode, number and trigger | ||
7 | - dr_mode : Dual-role; either host mode "host", peripheral mode "peripheral" | ||
8 | or both "otg" | ||
9 | |||
10 | Optional properties: | ||
11 | - dmas : A list of dma channels; | ||
12 | dma-controller, event-line, fixed-channel, flags | ||
13 | - dma-names : An ordered list of channel names affiliated to the above | ||
14 | |||
15 | Example: | ||
16 | |||
17 | usb_per5@a03e0000 { | ||
18 | compatible = "stericsson,db8500-musb", "mentor,musb"; | ||
19 | reg = <0xa03e0000 0x10000>; | ||
20 | interrupts = <0 23 0x4>; | ||
21 | interrupt-names = "mc"; | ||
22 | |||
23 | dr_mode = "otg"; | ||
24 | |||
25 | dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */ | ||
26 | <&dma 38 0 0x0>, /* Logical - MemToDev */ | ||
27 | <&dma 37 0 0x2>, /* Logical - DevToMem */ | ||
28 | <&dma 37 0 0x0>, /* Logical - MemToDev */ | ||
29 | <&dma 36 0 0x2>, /* Logical - DevToMem */ | ||
30 | <&dma 36 0 0x0>, /* Logical - MemToDev */ | ||
31 | <&dma 19 0 0x2>, /* Logical - DevToMem */ | ||
32 | <&dma 19 0 0x0>, /* Logical - MemToDev */ | ||
33 | <&dma 18 0 0x2>, /* Logical - DevToMem */ | ||
34 | <&dma 18 0 0x0>, /* Logical - MemToDev */ | ||
35 | <&dma 17 0 0x2>, /* Logical - DevToMem */ | ||
36 | <&dma 17 0 0x0>, /* Logical - MemToDev */ | ||
37 | <&dma 16 0 0x2>, /* Logical - DevToMem */ | ||
38 | <&dma 16 0 0x0>, /* Logical - MemToDev */ | ||
39 | <&dma 39 0 0x2>, /* Logical - DevToMem */ | ||
40 | <&dma 39 0 0x0>; /* Logical - MemToDev */ | ||
41 | |||
42 | dma-names = "iep_1_9", "oep_1_9", | ||
43 | "iep_2_10", "oep_2_10", | ||
44 | "iep_3_11", "oep_3_11", | ||
45 | "iep_4_12", "oep_4_12", | ||
46 | "iep_5_13", "oep_5_13", | ||
47 | "iep_6_14", "oep_6_14", | ||
48 | "iep_7_15", "oep_7_15", | ||
49 | "iep_8", "oep_8"; | ||
50 | }; | ||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 6931c4348d24..d5a79caec147 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -18,6 +18,7 @@ chrp Common Hardware Reference Platform | |||
18 | cirrus Cirrus Logic, Inc. | 18 | cirrus Cirrus Logic, Inc. |
19 | cortina Cortina Systems, Inc. | 19 | cortina Cortina Systems, Inc. |
20 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) | 20 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) |
21 | davicom DAVICOM Semiconductor, Inc. | ||
21 | denx Denx Software Engineering | 22 | denx Denx Software Engineering |
22 | emmicro EM Microelectronic | 23 | emmicro EM Microelectronic |
23 | epson Seiko Epson Corp. | 24 | epson Seiko Epson Corp. |
@@ -31,6 +32,7 @@ idt Integrated Device Technologies, Inc. | |||
31 | img Imagination Technologies Ltd. | 32 | img Imagination Technologies Ltd. |
32 | intercontrol Inter Control Group | 33 | intercontrol Inter Control Group |
33 | linux Linux-specific binding | 34 | linux Linux-specific binding |
35 | lsi LSI Corp. (LSI Logic) | ||
34 | marvell Marvell Technology Group Ltd. | 36 | marvell Marvell Technology Group Ltd. |
35 | maxim Maxim Integrated Products | 37 | maxim Maxim Integrated Products |
36 | mosaixtech Mosaix Technologies, Inc. | 38 | mosaixtech Mosaix Technologies, Inc. |
@@ -57,8 +59,10 @@ snps Synopsys, Inc. | |||
57 | st STMicroelectronics | 59 | st STMicroelectronics |
58 | ste ST-Ericsson | 60 | ste ST-Ericsson |
59 | stericsson ST-Ericsson | 61 | stericsson ST-Ericsson |
62 | toumaz Toumaz | ||
60 | ti Texas Instruments | 63 | ti Texas Instruments |
61 | toshiba Toshiba Corporation | 64 | toshiba Toshiba Corporation |
65 | v3 V3 Semiconductor | ||
62 | via VIA Technologies, Inc. | 66 | via VIA Technologies, Inc. |
63 | wlf Wolfson Microelectronics | 67 | wlf Wolfson Microelectronics |
64 | wm Wondermedia Technologies, Inc. | 68 | wm Wondermedia Technologies, Inc. |
diff --git a/Documentation/devicetree/bindings/video/display-timing.txt b/Documentation/devicetree/bindings/video/display-timing.txt index 150038552bc3..e1d4a0b59612 100644 --- a/Documentation/devicetree/bindings/video/display-timing.txt +++ b/Documentation/devicetree/bindings/video/display-timing.txt | |||
@@ -34,6 +34,7 @@ optional properties: | |||
34 | - ignored = ignored | 34 | - ignored = ignored |
35 | - interlaced (bool): boolean to enable interlaced mode | 35 | - interlaced (bool): boolean to enable interlaced mode |
36 | - doublescan (bool): boolean to enable doublescan mode | 36 | - doublescan (bool): boolean to enable doublescan mode |
37 | - doubleclk (bool): boolean to enable doubleclock mode | ||
37 | 38 | ||
38 | All the optional properties that are not bool follow the following logic: | 39 | All the optional properties that are not bool follow the following logic: |
39 | <1>: high active | 40 | <1>: high active |
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt index c60da67a5d76..84f10c16cb38 100644 --- a/Documentation/devicetree/bindings/video/exynos_dp.txt +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt | |||
@@ -21,6 +21,10 @@ Required properties for dp-controller: | |||
21 | of memory mapped region. | 21 | of memory mapped region. |
22 | -interrupts: | 22 | -interrupts: |
23 | interrupt combiner values. | 23 | interrupt combiner values. |
24 | -clocks: | ||
25 | from common clock binding: handle to dp clock. | ||
26 | -clock-names: | ||
27 | from common clock binding: Shall be "dp". | ||
24 | -interrupt-parent: | 28 | -interrupt-parent: |
25 | phandle to Interrupt combiner node. | 29 | phandle to Interrupt combiner node. |
26 | -samsung,color-space: | 30 | -samsung,color-space: |
@@ -61,6 +65,8 @@ SOC specific portion: | |||
61 | reg = <0x145b0000 0x10000>; | 65 | reg = <0x145b0000 0x10000>; |
62 | interrupts = <10 3>; | 66 | interrupts = <10 3>; |
63 | interrupt-parent = <&combiner>; | 67 | interrupt-parent = <&combiner>; |
68 | clocks = <&clock 342>; | ||
69 | clock-names = "dp"; | ||
64 | 70 | ||
65 | dptx-phy { | 71 | dptx-phy { |
66 | reg = <0x10040720>; | 72 | reg = <0x10040720>; |
diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 589edee37394..323983be3c30 100644 --- a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt | |||
@@ -1,22 +1,23 @@ | |||
1 | Device-Tree bindings for drm hdmi driver | 1 | Device-Tree bindings for drm hdmi driver |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: value should be "samsung,exynos5-hdmi". | 4 | - compatible: value should be one among the following: |
5 | 1) "samsung,exynos5-hdmi" <DEPRECATED> | ||
6 | 2) "samsung,exynos4210-hdmi" | ||
7 | 3) "samsung,exynos4212-hdmi" | ||
5 | - reg: physical base address of the hdmi and length of memory mapped | 8 | - reg: physical base address of the hdmi and length of memory mapped |
6 | region. | 9 | region. |
7 | - interrupts: interrupt number to the cpu. | 10 | - interrupts: interrupt number to the cpu. |
8 | - hpd-gpio: following information about the hotplug gpio pin. | 11 | - hpd-gpio: following information about the hotplug gpio pin. |
9 | a) phandle of the gpio controller node. | 12 | a) phandle of the gpio controller node. |
10 | b) pin number within the gpio controller. | 13 | b) pin number within the gpio controller. |
11 | c) pin function mode. | 14 | c) optional flags and pull up/down. |
12 | d) optional flags and pull up/down. | ||
13 | e) drive strength. | ||
14 | 15 | ||
15 | Example: | 16 | Example: |
16 | 17 | ||
17 | hdmi { | 18 | hdmi { |
18 | compatible = "samsung,exynos5-hdmi"; | 19 | compatible = "samsung,exynos4212-hdmi"; |
19 | reg = <0x14530000 0x100000>; | 20 | reg = <0x14530000 0x100000>; |
20 | interrupts = <0 95 0>; | 21 | interrupts = <0 95 0>; |
21 | hpd-gpio = <&gpx3 7 0xf 1 3>; | 22 | hpd-gpio = <&gpx3 7 1>; |
22 | }; | 23 | }; |
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt new file mode 100644 index 000000000000..41eee971562b --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | Device-Tree bindings for hdmiddc driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be one of the following | ||
5 | 1) "samsung,exynos5-hdmiddc" <DEPRECATED> | ||
6 | 2) "samsung,exynos4210-hdmiddc" | ||
7 | |||
8 | - reg: I2C address of the hdmiddc device. | ||
9 | |||
10 | Example: | ||
11 | |||
12 | hdmiddc { | ||
13 | compatible = "samsung,exynos4210-hdmiddc"; | ||
14 | reg = <0x50>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt new file mode 100644 index 000000000000..162f641f7639 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | Device-Tree bindings for hdmiphy driver | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: value should be one of the following: | ||
5 | 1) "samsung,exynos5-hdmiphy" <DEPRECATED> | ||
6 | 2) "samsung,exynos4210-hdmiphy". | ||
7 | 3) "samsung,exynos4212-hdmiphy". | ||
8 | - reg: I2C address of the hdmiphy device. | ||
9 | |||
10 | Example: | ||
11 | |||
12 | hdmiphy { | ||
13 | compatible = "samsung,exynos4210-hdmiphy"; | ||
14 | reg = <0x38>; | ||
15 | }; | ||
diff --git a/Documentation/devicetree/bindings/drm/exynos/mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 9b2ea0343566..3334b0a8e343 100644 --- a/Documentation/devicetree/bindings/drm/exynos/mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt | |||
@@ -1,7 +1,12 @@ | |||
1 | Device-Tree bindings for mixer driver | 1 | Device-Tree bindings for mixer driver |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: value should be "samsung,exynos5-mixer". | 4 | - compatible: value should be one of the following: |
5 | 1) "samsung,exynos5-mixer" <DEPRECATED> | ||
6 | 2) "samsung,exynos4210-mixer" | ||
7 | 3) "samsung,exynos5250-mixer" | ||
8 | 4) "samsung,exynos5420-mixer" | ||
9 | |||
5 | - reg: physical base address of the mixer and length of memory mapped | 10 | - reg: physical base address of the mixer and length of memory mapped |
6 | region. | 11 | region. |
7 | - interrupts: interrupt number to the cpu. | 12 | - interrupts: interrupt number to the cpu. |
@@ -9,7 +14,7 @@ Required properties: | |||
9 | Example: | 14 | Example: |
10 | 15 | ||
11 | mixer { | 16 | mixer { |
12 | compatible = "samsung,exynos5-mixer"; | 17 | compatible = "samsung,exynos5250-mixer"; |
13 | reg = <0x14450000 0x10000>; | 18 | reg = <0x14450000 0x10000>; |
14 | interrupts = <0 94 0>; | 19 | interrupts = <0 94 0>; |
15 | }; | 20 | }; |
diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt new file mode 100644 index 000000000000..46da08db186a --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt | |||
@@ -0,0 +1,51 @@ | |||
1 | Freescale imx21 Framebuffer | ||
2 | |||
3 | This framebuffer driver supports devices imx1, imx21, imx25, and imx27. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : "fsl,<chip>-fb", chip should be imx1 or imx21 | ||
7 | - reg : Should contain 1 register ranges(address and length) | ||
8 | - interrupts : One interrupt of the fb dev | ||
9 | |||
10 | Required nodes: | ||
11 | - display: Phandle to a display node as described in | ||
12 | Documentation/devicetree/bindings/video/display-timing.txt | ||
13 | Additional, the display node has to define properties: | ||
14 | - bits-per-pixel: Bits per pixel | ||
15 | - fsl,pcr: LCDC PCR value | ||
16 | |||
17 | Optional properties: | ||
18 | - fsl,dmacr: DMA Control Register value. This is optional. By default, the | ||
19 | register is not modified as recommended by the datasheet. | ||
20 | - fsl,lscr1: LCDC Sharp Configuration Register value. | ||
21 | |||
22 | Example: | ||
23 | |||
24 | imxfb: fb@10021000 { | ||
25 | compatible = "fsl,imx21-fb"; | ||
26 | interrupts = <61>; | ||
27 | reg = <0x10021000 0x1000>; | ||
28 | display = <&display0>; | ||
29 | }; | ||
30 | |||
31 | ... | ||
32 | |||
33 | display0: display0 { | ||
34 | model = "Primeview-PD050VL1"; | ||
35 | native-mode = <&timing_disp0>; | ||
36 | bits-per-pixel = <16>; | ||
37 | fsl,pcr = <0xf0c88080>; /* non-standard but required */ | ||
38 | display-timings { | ||
39 | timing_disp0: 640x480 { | ||
40 | hactive = <640>; | ||
41 | vactive = <480>; | ||
42 | hback-porch = <112>; | ||
43 | hfront-porch = <36>; | ||
44 | hsync-len = <32>; | ||
45 | vback-porch = <33>; | ||
46 | vfront-porch = <33>; | ||
47 | vsync-len = <2>; | ||
48 | clock-frequency = <25000000>; | ||
49 | }; | ||
50 | }; | ||
51 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt new file mode 100644 index 000000000000..3ea460583111 --- /dev/null +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | Simple Framebuffer | ||
2 | |||
3 | A simple frame-buffer describes a raw memory region that may be rendered to, | ||
4 | with the assumption that the display hardware has already been set up to scan | ||
5 | out from that buffer. | ||
6 | |||
7 | Required properties: | ||
8 | - compatible: "simple-framebuffer" | ||
9 | - reg: Should contain the location and size of the framebuffer memory. | ||
10 | - width: The width of the framebuffer in pixels. | ||
11 | - height: The height of the framebuffer in pixels. | ||
12 | - stride: The number of bytes in each line of the framebuffer. | ||
13 | - format: The format of the framebuffer surface. Valid values are: | ||
14 | - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b). | ||
15 | |||
16 | Example: | ||
17 | |||
18 | framebuffer { | ||
19 | compatible = "simple-framebuffer"; | ||
20 | reg = <0x1d385000 (1600 * 1200 * 2)>; | ||
21 | width = <1600>; | ||
22 | height = <1200>; | ||
23 | stride = <(1600 * 2)>; | ||
24 | format = "r5g6b5"; | ||
25 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/video/ssd1307fb.txt index 3d0060cff062..7a125427ff4b 100644 --- a/Documentation/devicetree/bindings/video/ssd1307fb.txt +++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt | |||
@@ -1,13 +1,17 @@ | |||
1 | * Solomon SSD1307 Framebuffer Driver | 1 | * Solomon SSD1307 Framebuffer Driver |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for | 4 | - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for |
5 | now is i2c. | 5 | now is i2c, and the supported chips are ssd1306 and ssd1307. |
6 | - reg: Should contain address of the controller on the I2C bus. Most likely | 6 | - reg: Should contain address of the controller on the I2C bus. Most likely |
7 | 0x3c or 0x3d | 7 | 0x3c or 0x3d |
8 | - pwm: Should contain the pwm to use according to the OF device tree PWM | 8 | - pwm: Should contain the pwm to use according to the OF device tree PWM |
9 | specification [0] | 9 | specification [0]. Only required for the ssd1307. |
10 | - reset-gpios: Should contain the GPIO used to reset the OLED display | 10 | - reset-gpios: Should contain the GPIO used to reset the OLED display |
11 | - solomon,height: Height in pixel of the screen driven by the controller | ||
12 | - solomon,width: Width in pixel of the screen driven by the controller | ||
13 | - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is | ||
14 | mapped to. | ||
11 | 15 | ||
12 | Optional properties: | 16 | Optional properties: |
13 | - reset-active-low: Is the reset gpio is active on physical low? | 17 | - reset-active-low: Is the reset gpio is active on physical low? |
diff --git a/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt b/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt new file mode 100644 index 000000000000..8ffb88e39e76 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | ST-Ericsson COH 901 327 Watchdog timer | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "stericsson,coh901327". | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: the interrupt used for the watchdog timeout warning. | ||
8 | |||
9 | Optional properties: | ||
10 | - timeout-sec: contains the watchdog timeout in seconds. | ||
11 | |||
12 | Example: | ||
13 | |||
14 | watchdog: watchdog@c0012000 { | ||
15 | compatible = "stericsson,coh901327"; | ||
16 | reg = <0xc0012000 0x1000>; | ||
17 | interrupts = <3>; | ||
18 | timeout-sec = <60>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt index ef9d06c9f8fd..2b6b3d3f0388 100644 --- a/Documentation/devicetree/usage-model.txt +++ b/Documentation/devicetree/usage-model.txt | |||
@@ -106,17 +106,18 @@ In the majority of cases, the machine identity is irrelevant, and the | |||
106 | kernel will instead select setup code based on the machine's core | 106 | kernel will instead select setup code based on the machine's core |
107 | CPU or SoC. On ARM for example, setup_arch() in | 107 | CPU or SoC. On ARM for example, setup_arch() in |
108 | arch/arm/kernel/setup.c will call setup_machine_fdt() in | 108 | arch/arm/kernel/setup.c will call setup_machine_fdt() in |
109 | arch/arm/kernel/devicetree.c which searches through the machine_desc | 109 | arch/arm/kernel/devtree.c which searches through the machine_desc |
110 | table and selects the machine_desc which best matches the device tree | 110 | table and selects the machine_desc which best matches the device tree |
111 | data. It determines the best match by looking at the 'compatible' | 111 | data. It determines the best match by looking at the 'compatible' |
112 | property in the root device tree node, and comparing it with the | 112 | property in the root device tree node, and comparing it with the |
113 | dt_compat list in struct machine_desc. | 113 | dt_compat list in struct machine_desc (which is defined in |
114 | arch/arm/include/asm/mach/arch.h if you're curious). | ||
114 | 115 | ||
115 | The 'compatible' property contains a sorted list of strings starting | 116 | The 'compatible' property contains a sorted list of strings starting |
116 | with the exact name of the machine, followed by an optional list of | 117 | with the exact name of the machine, followed by an optional list of |
117 | boards it is compatible with sorted from most compatible to least. For | 118 | boards it is compatible with sorted from most compatible to least. For |
118 | example, the root compatible properties for the TI BeagleBoard and its | 119 | example, the root compatible properties for the TI BeagleBoard and its |
119 | successor, the BeagleBoard xM board might look like: | 120 | successor, the BeagleBoard xM board might look like, respectively: |
120 | 121 | ||
121 | compatible = "ti,omap3-beagleboard", "ti,omap3450", "ti,omap3"; | 122 | compatible = "ti,omap3-beagleboard", "ti,omap3450", "ti,omap3"; |
122 | compatible = "ti,omap3-beagleboard-xm", "ti,omap3450", "ti,omap3"; | 123 | compatible = "ti,omap3-beagleboard-xm", "ti,omap3450", "ti,omap3"; |
@@ -161,7 +162,7 @@ cases. | |||
161 | 162 | ||
162 | Instead, the compatible list allows a generic machine_desc to provide | 163 | Instead, the compatible list allows a generic machine_desc to provide |
163 | support for a wide common set of boards by specifying "less | 164 | support for a wide common set of boards by specifying "less |
164 | compatible" value in the dt_compat list. In the example above, | 165 | compatible" values in the dt_compat list. In the example above, |
165 | generic board support can claim compatibility with "ti,omap3" or | 166 | generic board support can claim compatibility with "ti,omap3" or |
166 | "ti,omap3450". If a bug was discovered on the original beagleboard | 167 | "ti,omap3450". If a bug was discovered on the original beagleboard |
167 | that required special workaround code during early boot, then a new | 168 | that required special workaround code during early boot, then a new |
@@ -191,9 +192,11 @@ Linux it will look something like this: | |||
191 | }; | 192 | }; |
192 | 193 | ||
193 | The bootargs property contains the kernel arguments, and the initrd-* | 194 | The bootargs property contains the kernel arguments, and the initrd-* |
194 | properties define the address and size of an initrd blob. The | 195 | properties define the address and size of an initrd blob. Note that |
195 | chosen node may also optionally contain an arbitrary number of | 196 | initrd-end is the first address after the initrd image, so this doesn't |
196 | additional properties for platform-specific configuration data. | 197 | match the usual semantic of struct resource. The chosen node may also |
198 | optionally contain an arbitrary number of additional properties for | ||
199 | platform-specific configuration data. | ||
197 | 200 | ||
198 | During early boot, the architecture setup code calls of_scan_flat_dt() | 201 | During early boot, the architecture setup code calls of_scan_flat_dt() |
199 | several times with different helper callbacks to parse device tree | 202 | several times with different helper callbacks to parse device tree |
@@ -375,7 +378,7 @@ platform_devices as more platform_devices is a common pattern, and the | |||
375 | device tree support code reflects that and makes the above example | 378 | device tree support code reflects that and makes the above example |
376 | simpler. The second argument to of_platform_populate() is an | 379 | simpler. The second argument to of_platform_populate() is an |
377 | of_device_id table, and any node that matches an entry in that table | 380 | of_device_id table, and any node that matches an entry in that table |
378 | will also get its child nodes registered. In the tegra case, the code | 381 | will also get its child nodes registered. In the Tegra case, the code |
379 | can look something like this: | 382 | can look something like this: |
380 | 383 | ||
381 | static void __init harmony_init_machine(void) | 384 | static void __init harmony_init_machine(void) |
diff --git a/Documentation/dmatest.txt b/Documentation/dmatest.txt index 279ac0a8c5b1..132a094c7bc3 100644 --- a/Documentation/dmatest.txt +++ b/Documentation/dmatest.txt | |||
@@ -34,7 +34,7 @@ command: | |||
34 | After a while you will start to get messages about current status or error like | 34 | After a while you will start to get messages about current status or error like |
35 | in the original code. | 35 | in the original code. |
36 | 36 | ||
37 | Note that running a new test will stop any in progress test. | 37 | Note that running a new test will not stop any in progress test. |
38 | 38 | ||
39 | The following command should return actual state of the test. | 39 | The following command should return actual state of the test. |
40 | % cat /sys/kernel/debug/dmatest/run | 40 | % cat /sys/kernel/debug/dmatest/run |
@@ -52,8 +52,8 @@ To wait for test done the user may perform a busy loop that checks the state. | |||
52 | 52 | ||
53 | The module parameters that is supplied to the kernel command line will be used | 53 | The module parameters that is supplied to the kernel command line will be used |
54 | for the first performed test. After user gets a control, the test could be | 54 | for the first performed test. After user gets a control, the test could be |
55 | interrupted or re-run with same or different parameters. For the details see | 55 | re-run with the same or different parameters. For the details see the above |
56 | the above section "Part 2 - When dmatest is built as a module..." | 56 | section "Part 2 - When dmatest is built as a module..." |
57 | 57 | ||
58 | In both cases the module parameters are used as initial values for the test case. | 58 | In both cases the module parameters are used as initial values for the test case. |
59 | You always could check them at run-time by running | 59 | You always could check them at run-time by running |
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index 72322c6d7352..1bbdcfcf1f13 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt | |||
@@ -279,7 +279,7 @@ The dyndbg option is a "fake" module parameter, which means: | |||
279 | 279 | ||
280 | - modules do not need to define it explicitly | 280 | - modules do not need to define it explicitly |
281 | - every module gets it tacitly, whether they use pr_debug or not | 281 | - every module gets it tacitly, whether they use pr_debug or not |
282 | - it doesnt appear in /sys/module/$module/parameters/ | 282 | - it doesn't appear in /sys/module/$module/parameters/ |
283 | To see it, grep the control file, or inspect /proc/cmdline. | 283 | To see it, grep the control file, or inspect /proc/cmdline. |
284 | 284 | ||
285 | For CONFIG_DYNAMIC_DEBUG kernels, any settings given at boot-time (or | 285 | For CONFIG_DYNAMIC_DEBUG kernels, any settings given at boot-time (or |
diff --git a/Documentation/early-userspace/README b/Documentation/early-userspace/README index e35d83052192..661a73fad399 100644 --- a/Documentation/early-userspace/README +++ b/Documentation/early-userspace/README | |||
@@ -71,7 +71,7 @@ can really be interpreted as any legal argument to | |||
71 | gen_initramfs_list.sh. If a directory is specified as an argument then | 71 | gen_initramfs_list.sh. If a directory is specified as an argument then |
72 | the contents are scanned, uid/gid translation is performed, and | 72 | the contents are scanned, uid/gid translation is performed, and |
73 | usr/gen_init_cpio file directives are output. If a directory is | 73 | usr/gen_init_cpio file directives are output. If a directory is |
74 | specified as an arugemnt to scripts/gen_initramfs_list.sh then the | 74 | specified as an argument to scripts/gen_initramfs_list.sh then the |
75 | contents of the file are simply copied to the output. All of the output | 75 | contents of the file are simply copied to the output. All of the output |
76 | directives from directory scanning and file contents copying are | 76 | directives from directory scanning and file contents copying are |
77 | processed by usr/gen_init_cpio. | 77 | processed by usr/gen_init_cpio. |
diff --git a/Documentation/fb/cirrusfb.txt b/Documentation/fb/cirrusfb.txt index f9436843e998..f75950d330a4 100644 --- a/Documentation/fb/cirrusfb.txt +++ b/Documentation/fb/cirrusfb.txt | |||
@@ -55,7 +55,7 @@ Version 1.9.4.4 | |||
55 | * Overhaul color register routines. | 55 | * Overhaul color register routines. |
56 | * Associated with the above, console colors are now obtained from a LUT | 56 | * Associated with the above, console colors are now obtained from a LUT |
57 | called 'palette' instead of from the VGA registers. This code was | 57 | called 'palette' instead of from the VGA registers. This code was |
58 | modeled after that in atyfb and matroxfb. | 58 | modelled after that in atyfb and matroxfb. |
59 | * Code cleanup, add comments. | 59 | * Code cleanup, add comments. |
60 | * Overhaul SR07 handling. | 60 | * Overhaul SR07 handling. |
61 | * Bug fixes. | 61 | * Bug fixes. |
diff --git a/Documentation/fb/uvesafb.txt b/Documentation/fb/uvesafb.txt index eefdd91d298a..f6362d88763b 100644 --- a/Documentation/fb/uvesafb.txt +++ b/Documentation/fb/uvesafb.txt | |||
@@ -81,17 +81,11 @@ pmipal Use the protected mode interface for palette changes. | |||
81 | 81 | ||
82 | mtrr:n Setup memory type range registers for the framebuffer | 82 | mtrr:n Setup memory type range registers for the framebuffer |
83 | where n: | 83 | where n: |
84 | 0 - disabled (equivalent to nomtrr) (default) | 84 | 0 - disabled (equivalent to nomtrr) |
85 | 1 - uncachable | 85 | 3 - write-combining (default) |
86 | 2 - write-back | 86 | |
87 | 3 - write-combining | 87 | Values other than 0 and 3 will result in a warning and will be |
88 | 4 - write-through | 88 | treated just like 3. |
89 | |||
90 | If you see the following in dmesg, choose the type that matches | ||
91 | the old one. In this example, use "mtrr:2". | ||
92 | ... | ||
93 | mtrr: type mismatch for e0000000,8000000 old: write-back new: write-combining | ||
94 | ... | ||
95 | 89 | ||
96 | nomtrr Do not use memory type range registers. | 90 | nomtrr Do not use memory type range registers. |
97 | 91 | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 0706d32a61e6..fe7afe225381 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -11,10 +11,8 @@ be able to use diff(1). | |||
11 | prototypes: | 11 | prototypes: |
12 | int (*d_revalidate)(struct dentry *, unsigned int); | 12 | int (*d_revalidate)(struct dentry *, unsigned int); |
13 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | 13 | int (*d_weak_revalidate)(struct dentry *, unsigned int); |
14 | int (*d_hash)(const struct dentry *, const struct inode *, | 14 | int (*d_hash)(const struct dentry *, struct qstr *); |
15 | struct qstr *); | 15 | int (*d_compare)(const struct dentry *, const struct dentry *, |
16 | int (*d_compare)(const struct dentry *, const struct inode *, | ||
17 | const struct dentry *, const struct inode *, | ||
18 | unsigned int, const char *, const struct qstr *); | 16 | unsigned int, const char *, const struct qstr *); |
19 | int (*d_delete)(struct dentry *); | 17 | int (*d_delete)(struct dentry *); |
20 | void (*d_release)(struct dentry *); | 18 | void (*d_release)(struct dentry *); |
@@ -66,6 +64,7 @@ prototypes: | |||
66 | int (*atomic_open)(struct inode *, struct dentry *, | 64 | int (*atomic_open)(struct inode *, struct dentry *, |
67 | struct file *, unsigned open_flag, | 65 | struct file *, unsigned open_flag, |
68 | umode_t create_mode, int *opened); | 66 | umode_t create_mode, int *opened); |
67 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); | ||
69 | 68 | ||
70 | locking rules: | 69 | locking rules: |
71 | all may block | 70 | all may block |
@@ -93,6 +92,7 @@ removexattr: yes | |||
93 | fiemap: no | 92 | fiemap: no |
94 | update_time: no | 93 | update_time: no |
95 | atomic_open: yes | 94 | atomic_open: yes |
95 | tmpfile: no | ||
96 | 96 | ||
97 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 97 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
98 | victim. | 98 | victim. |
@@ -189,7 +189,7 @@ prototypes: | |||
189 | loff_t pos, unsigned len, unsigned copied, | 189 | loff_t pos, unsigned len, unsigned copied, |
190 | struct page *page, void *fsdata); | 190 | struct page *page, void *fsdata); |
191 | sector_t (*bmap)(struct address_space *, sector_t); | 191 | sector_t (*bmap)(struct address_space *, sector_t); |
192 | int (*invalidatepage) (struct page *, unsigned long); | 192 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
193 | int (*releasepage) (struct page *, int); | 193 | int (*releasepage) (struct page *, int); |
194 | void (*freepage)(struct page *); | 194 | void (*freepage)(struct page *); |
195 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 195 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
@@ -310,8 +310,8 @@ filesystems and by the swapper. The latter will eventually go away. Please, | |||
310 | keep it that way and don't breed new callers. | 310 | keep it that way and don't breed new callers. |
311 | 311 | ||
312 | ->invalidatepage() is called when the filesystem must attempt to drop | 312 | ->invalidatepage() is called when the filesystem must attempt to drop |
313 | some or all of the buffers from the page when it is being truncated. It | 313 | some or all of the buffers from the page when it is being truncated. It |
314 | returns zero on success. If ->invalidatepage is zero, the kernel uses | 314 | returns zero on success. If ->invalidatepage is zero, the kernel uses |
315 | block_invalidatepage() instead. | 315 | block_invalidatepage() instead. |
316 | 316 | ||
317 | ->releasepage() is called when the kernel is about to try to drop the | 317 | ->releasepage() is called when the kernel is about to try to drop the |
@@ -344,25 +344,38 @@ prototypes: | |||
344 | 344 | ||
345 | 345 | ||
346 | locking rules: | 346 | locking rules: |
347 | file_lock_lock may block | 347 | inode->i_lock may block |
348 | fl_copy_lock: yes no | 348 | fl_copy_lock: yes no |
349 | fl_release_private: maybe no | 349 | fl_release_private: maybe no |
350 | 350 | ||
351 | ----------------------- lock_manager_operations --------------------------- | 351 | ----------------------- lock_manager_operations --------------------------- |
352 | prototypes: | 352 | prototypes: |
353 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); | 353 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); |
354 | unsigned long (*lm_owner_key)(struct file_lock *); | ||
354 | void (*lm_notify)(struct file_lock *); /* unblock callback */ | 355 | void (*lm_notify)(struct file_lock *); /* unblock callback */ |
355 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); | 356 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); |
356 | void (*lm_break)(struct file_lock *); /* break_lease callback */ | 357 | void (*lm_break)(struct file_lock *); /* break_lease callback */ |
357 | int (*lm_change)(struct file_lock **, int); | 358 | int (*lm_change)(struct file_lock **, int); |
358 | 359 | ||
359 | locking rules: | 360 | locking rules: |
360 | file_lock_lock may block | 361 | |
361 | lm_compare_owner: yes no | 362 | inode->i_lock blocked_lock_lock may block |
362 | lm_notify: yes no | 363 | lm_compare_owner: yes[1] maybe no |
363 | lm_grant: no no | 364 | lm_owner_key yes[1] yes no |
364 | lm_break: yes no | 365 | lm_notify: yes yes no |
365 | lm_change yes no | 366 | lm_grant: no no no |
367 | lm_break: yes no no | ||
368 | lm_change yes no no | ||
369 | |||
370 | [1]: ->lm_compare_owner and ->lm_owner_key are generally called with | ||
371 | *an* inode->i_lock held. It may not be the i_lock of the inode | ||
372 | associated with either file_lock argument! This is the case with deadlock | ||
373 | detection, since the code has to chase down the owners of locks that may | ||
374 | be entirely unrelated to the one on which the lock is being acquired. | ||
375 | For deadlock detection however, the blocked_lock_lock is also held. The | ||
376 | fact that these locks are held ensures that the file_locks do not | ||
377 | disappear out from under you while doing the comparison or generating an | ||
378 | owner key. | ||
366 | 379 | ||
367 | --------------------------- buffer_head ----------------------------------- | 380 | --------------------------- buffer_head ----------------------------------- |
368 | prototypes: | 381 | prototypes: |
@@ -414,7 +427,7 @@ prototypes: | |||
414 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 427 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
415 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 428 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
416 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 429 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
417 | int (*readdir) (struct file *, void *, filldir_t); | 430 | int (*iterate) (struct file *, struct dir_context *); |
418 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 431 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
419 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 432 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
420 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); | 433 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index bd3c56c67380..b91e2f26b672 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
@@ -98,8 +98,13 @@ Cleaning Overhead | |||
98 | MOUNT OPTIONS | 98 | MOUNT OPTIONS |
99 | ================================================================================ | 99 | ================================================================================ |
100 | 100 | ||
101 | background_gc_off Turn off cleaning operations, namely garbage collection, | 101 | background_gc=%s Turn on/off cleaning operations, namely garbage |
102 | triggered in background when I/O subsystem is idle. | 102 | collection, triggered in background when I/O subsystem is |
103 | idle. If background_gc=on, it will turn on the garbage | ||
104 | collection and if background_gc=off, garbage collection | ||
105 | will be truned off. | ||
106 | Default value for this option is on. So garbage | ||
107 | collection is on by default. | ||
103 | disable_roll_forward Disable the roll-forward recovery routine | 108 | disable_roll_forward Disable the roll-forward recovery routine |
104 | discard Issue discard/TRIM commands when a segment is cleaned. | 109 | discard Issue discard/TRIM commands when a segment is cleaned. |
105 | no_heap Disable heap-style segment allocation which finds free | 110 | no_heap Disable heap-style segment allocation which finds free |
diff --git a/Documentation/filesystems/jfs.txt b/Documentation/filesystems/jfs.txt index f7433355394a..41fd757997b3 100644 --- a/Documentation/filesystems/jfs.txt +++ b/Documentation/filesystems/jfs.txt | |||
@@ -42,7 +42,7 @@ nodiscard(*) block device when blocks are freed. This is useful for SSD | |||
42 | devices and sparse/thinly-provisioned LUNs. The FITRIM ioctl | 42 | devices and sparse/thinly-provisioned LUNs. The FITRIM ioctl |
43 | command is also available together with the nodiscard option. | 43 | command is also available together with the nodiscard option. |
44 | The value of minlen specifies the minimum blockcount, when | 44 | The value of minlen specifies the minimum blockcount, when |
45 | a TRIM command to the block device is considered usefull. | 45 | a TRIM command to the block device is considered useful. |
46 | When no value is given to the discard option, it defaults to | 46 | When no value is given to the discard option, it defaults to |
47 | 64 blocks, which means 256KiB in JFS. | 47 | 64 blocks, which means 256KiB in JFS. |
48 | The minlen value of discard overrides the minlen value given | 48 | The minlen value of discard overrides the minlen value given |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 4db22f6491e0..206a1bdc7321 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -445,3 +445,9 @@ object doesn't exist. It's remote/distributed ones that might care... | |||
445 | [mandatory] | 445 | [mandatory] |
446 | FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate() | 446 | FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate() |
447 | in your dentry operations instead. | 447 | in your dentry operations instead. |
448 | -- | ||
449 | [mandatory] | ||
450 | vfs_readdir() is gone; switch to iterate_dir() instead | ||
451 | -- | ||
452 | [mandatory] | ||
453 | ->readdir() is gone now; switch to ->iterate() | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index fd8d0d594fc7..fcc22c982a25 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -473,7 +473,8 @@ This file is only present if the CONFIG_MMU kernel configuration option is | |||
473 | enabled. | 473 | enabled. |
474 | 474 | ||
475 | The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG | 475 | The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG |
476 | bits on both physical and virtual pages associated with a process. | 476 | bits on both physical and virtual pages associated with a process, and the |
477 | soft-dirty bit on pte (see Documentation/vm/soft-dirty.txt for details). | ||
477 | To clear the bits for all the pages associated with the process | 478 | To clear the bits for all the pages associated with the process |
478 | > echo 1 > /proc/PID/clear_refs | 479 | > echo 1 > /proc/PID/clear_refs |
479 | 480 | ||
@@ -482,6 +483,10 @@ To clear the bits for the anonymous pages associated with the process | |||
482 | 483 | ||
483 | To clear the bits for the file mapped pages associated with the process | 484 | To clear the bits for the file mapped pages associated with the process |
484 | > echo 3 > /proc/PID/clear_refs | 485 | > echo 3 > /proc/PID/clear_refs |
486 | |||
487 | To clear the soft-dirty bit | ||
488 | > echo 4 > /proc/PID/clear_refs | ||
489 | |||
485 | Any other value written to /proc/PID/clear_refs will have no effect. | 490 | Any other value written to /proc/PID/clear_refs will have no effect. |
486 | 491 | ||
487 | The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags | 492 | The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags |
diff --git a/Documentation/filesystems/qnx6.txt b/Documentation/filesystems/qnx6.txt index e59f2f09f56e..99e90184a72f 100644 --- a/Documentation/filesystems/qnx6.txt +++ b/Documentation/filesystems/qnx6.txt | |||
@@ -148,7 +148,7 @@ smaller than addressing space in the bitmap. | |||
148 | Bitmap system area | 148 | Bitmap system area |
149 | ------------------ | 149 | ------------------ |
150 | 150 | ||
151 | The bitmap itself is devided into three parts. | 151 | The bitmap itself is divided into three parts. |
152 | First the system area, that is split into two halfs. | 152 | First the system area, that is split into two halfs. |
153 | Then userspace. | 153 | Then userspace. |
154 | 154 | ||
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt index 4a93e98b290a..aa1f459fa6cf 100644 --- a/Documentation/filesystems/vfat.txt +++ b/Documentation/filesystems/vfat.txt | |||
@@ -307,7 +307,7 @@ the following: | |||
307 | 307 | ||
308 | <proceeding files...> | 308 | <proceeding files...> |
309 | <slot #3, id = 0x43, characters = "h is long"> | 309 | <slot #3, id = 0x43, characters = "h is long"> |
310 | <slot #2, id = 0x02, characters = "xtension whic"> | 310 | <slot #2, id = 0x02, characters = "xtension which"> |
311 | <slot #1, id = 0x01, characters = "My Big File.E"> | 311 | <slot #1, id = 0x01, characters = "My Big File.E"> |
312 | <directory entry, name = "MYBIGFIL.EXT"> | 312 | <directory entry, name = "MYBIGFIL.EXT"> |
313 | 313 | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index bc4b06b3160a..f93a88250a44 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -360,6 +360,8 @@ struct inode_operations { | |||
360 | int (*removexattr) (struct dentry *, const char *); | 360 | int (*removexattr) (struct dentry *, const char *); |
361 | void (*update_time)(struct inode *, struct timespec *, int); | 361 | void (*update_time)(struct inode *, struct timespec *, int); |
362 | int (*atomic_open)(struct inode *, struct dentry *, | 362 | int (*atomic_open)(struct inode *, struct dentry *, |
363 | int (*tmpfile) (struct inode *, struct dentry *, umode_t); | ||
364 | } ____cacheline_aligned; | ||
363 | struct file *, unsigned open_flag, | 365 | struct file *, unsigned open_flag, |
364 | umode_t create_mode, int *opened); | 366 | umode_t create_mode, int *opened); |
365 | }; | 367 | }; |
@@ -472,6 +474,9 @@ otherwise noted. | |||
472 | component is negative or needs lookup. Cached positive dentries are | 474 | component is negative or needs lookup. Cached positive dentries are |
473 | still handled by f_op->open(). | 475 | still handled by f_op->open(). |
474 | 476 | ||
477 | tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to | ||
478 | atomically creating, opening and unlinking a file in given directory. | ||
479 | |||
475 | The Address Space Object | 480 | The Address Space Object |
476 | ======================== | 481 | ======================== |
477 | 482 | ||
@@ -549,12 +554,11 @@ struct address_space_operations | |||
549 | ------------------------------- | 554 | ------------------------------- |
550 | 555 | ||
551 | This describes how the VFS can manipulate mapping of a file to page cache in | 556 | This describes how the VFS can manipulate mapping of a file to page cache in |
552 | your filesystem. As of kernel 2.6.22, the following members are defined: | 557 | your filesystem. The following members are defined: |
553 | 558 | ||
554 | struct address_space_operations { | 559 | struct address_space_operations { |
555 | int (*writepage)(struct page *page, struct writeback_control *wbc); | 560 | int (*writepage)(struct page *page, struct writeback_control *wbc); |
556 | int (*readpage)(struct file *, struct page *); | 561 | int (*readpage)(struct file *, struct page *); |
557 | int (*sync_page)(struct page *); | ||
558 | int (*writepages)(struct address_space *, struct writeback_control *); | 562 | int (*writepages)(struct address_space *, struct writeback_control *); |
559 | int (*set_page_dirty)(struct page *page); | 563 | int (*set_page_dirty)(struct page *page); |
560 | int (*readpages)(struct file *filp, struct address_space *mapping, | 564 | int (*readpages)(struct file *filp, struct address_space *mapping, |
@@ -566,7 +570,7 @@ struct address_space_operations { | |||
566 | loff_t pos, unsigned len, unsigned copied, | 570 | loff_t pos, unsigned len, unsigned copied, |
567 | struct page *page, void *fsdata); | 571 | struct page *page, void *fsdata); |
568 | sector_t (*bmap)(struct address_space *, sector_t); | 572 | sector_t (*bmap)(struct address_space *, sector_t); |
569 | int (*invalidatepage) (struct page *, unsigned long); | 573 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
570 | int (*releasepage) (struct page *, int); | 574 | int (*releasepage) (struct page *, int); |
571 | void (*freepage)(struct page *); | 575 | void (*freepage)(struct page *); |
572 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 576 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
@@ -576,6 +580,9 @@ struct address_space_operations { | |||
576 | /* migrate the contents of a page to the specified target */ | 580 | /* migrate the contents of a page to the specified target */ |
577 | int (*migratepage) (struct page *, struct page *); | 581 | int (*migratepage) (struct page *, struct page *); |
578 | int (*launder_page) (struct page *); | 582 | int (*launder_page) (struct page *); |
583 | int (*is_partially_uptodate) (struct page *, read_descriptor_t *, | ||
584 | unsigned long); | ||
585 | void (*is_dirty_writeback) (struct page *, bool *, bool *); | ||
579 | int (*error_remove_page) (struct mapping *mapping, struct page *page); | 586 | int (*error_remove_page) (struct mapping *mapping, struct page *page); |
580 | int (*swap_activate)(struct file *); | 587 | int (*swap_activate)(struct file *); |
581 | int (*swap_deactivate)(struct file *); | 588 | int (*swap_deactivate)(struct file *); |
@@ -607,13 +614,6 @@ struct address_space_operations { | |||
607 | In this case, the page will be relocated, relocked and if | 614 | In this case, the page will be relocated, relocked and if |
608 | that all succeeds, ->readpage will be called again. | 615 | that all succeeds, ->readpage will be called again. |
609 | 616 | ||
610 | sync_page: called by the VM to notify the backing store to perform all | ||
611 | queued I/O operations for a page. I/O operations for other pages | ||
612 | associated with this address_space object may also be performed. | ||
613 | |||
614 | This function is optional and is called only for pages with | ||
615 | PG_Writeback set while waiting for the writeback to complete. | ||
616 | |||
617 | writepages: called by the VM to write out pages associated with the | 617 | writepages: called by the VM to write out pages associated with the |
618 | address_space object. If wbc->sync_mode is WBC_SYNC_ALL, then | 618 | address_space object. If wbc->sync_mode is WBC_SYNC_ALL, then |
619 | the writeback_control will specify a range of pages that must be | 619 | the writeback_control will specify a range of pages that must be |
@@ -685,14 +685,14 @@ struct address_space_operations { | |||
685 | invalidatepage: If a page has PagePrivate set, then invalidatepage | 685 | invalidatepage: If a page has PagePrivate set, then invalidatepage |
686 | will be called when part or all of the page is to be removed | 686 | will be called when part or all of the page is to be removed |
687 | from the address space. This generally corresponds to either a | 687 | from the address space. This generally corresponds to either a |
688 | truncation or a complete invalidation of the address space | 688 | truncation, punch hole or a complete invalidation of the address |
689 | (in the latter case 'offset' will always be 0). | 689 | space (in the latter case 'offset' will always be 0 and 'length' |
690 | Any private data associated with the page should be updated | 690 | will be PAGE_CACHE_SIZE). Any private data associated with the page |
691 | to reflect this truncation. If offset is 0, then | 691 | should be updated to reflect this truncation. If offset is 0 and |
692 | the private data should be released, because the page | 692 | length is PAGE_CACHE_SIZE, then the private data should be released, |
693 | must be able to be completely discarded. This may be done by | 693 | because the page must be able to be completely discarded. This may |
694 | calling the ->releasepage function, but in this case the | 694 | be done by calling the ->releasepage function, but in this case the |
695 | release MUST succeed. | 695 | release MUST succeed. |
696 | 696 | ||
697 | releasepage: releasepage is called on PagePrivate pages to indicate | 697 | releasepage: releasepage is called on PagePrivate pages to indicate |
698 | that the page should be freed if possible. ->releasepage | 698 | that the page should be freed if possible. ->releasepage |
@@ -742,6 +742,20 @@ struct address_space_operations { | |||
742 | prevent redirtying the page, it is kept locked during the whole | 742 | prevent redirtying the page, it is kept locked during the whole |
743 | operation. | 743 | operation. |
744 | 744 | ||
745 | is_partially_uptodate: Called by the VM when reading a file through the | ||
746 | pagecache when the underlying blocksize != pagesize. If the required | ||
747 | block is up to date then the read can complete without needing the IO | ||
748 | to bring the whole page up to date. | ||
749 | |||
750 | is_dirty_writeback: Called by the VM when attempting to reclaim a page. | ||
751 | The VM uses dirty and writeback information to determine if it needs | ||
752 | to stall to allow flushers a chance to complete some IO. Ordinarily | ||
753 | it can use PageDirty and PageWriteback but some filesystems have | ||
754 | more complex state (unstable pages in NFS prevent reclaim) or | ||
755 | do not set those flags due to locking problems (jbd). This callback | ||
756 | allows a filesystem to indicate to the VM if a page should be | ||
757 | treated as dirty or writeback for the purposes of stalling. | ||
758 | |||
745 | error_remove_page: normally set to generic_error_remove_page if truncation | 759 | error_remove_page: normally set to generic_error_remove_page if truncation |
746 | is ok for this address space. Used for memory failure handling. | 760 | is ok for this address space. Used for memory failure handling. |
747 | Setting this implies you deal with pages going away under you, | 761 | Setting this implies you deal with pages going away under you, |
@@ -777,7 +791,7 @@ struct file_operations { | |||
777 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 791 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
778 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 792 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
779 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 793 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
780 | int (*readdir) (struct file *, void *, filldir_t); | 794 | int (*iterate) (struct file *, struct dir_context *); |
781 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 795 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
782 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 796 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
783 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); | 797 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); |
@@ -815,7 +829,7 @@ otherwise noted. | |||
815 | 829 | ||
816 | aio_write: called by io_submit(2) and other asynchronous I/O operations | 830 | aio_write: called by io_submit(2) and other asynchronous I/O operations |
817 | 831 | ||
818 | readdir: called when the VFS needs to read the directory contents | 832 | iterate: called when the VFS needs to read the directory contents |
819 | 833 | ||
820 | poll: called by the VFS when a process wants to check if there is | 834 | poll: called by the VFS when a process wants to check if there is |
821 | activity on this file and (optionally) go to sleep until there | 835 | activity on this file and (optionally) go to sleep until there |
@@ -901,10 +915,8 @@ defined: | |||
901 | struct dentry_operations { | 915 | struct dentry_operations { |
902 | int (*d_revalidate)(struct dentry *, unsigned int); | 916 | int (*d_revalidate)(struct dentry *, unsigned int); |
903 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | 917 | int (*d_weak_revalidate)(struct dentry *, unsigned int); |
904 | int (*d_hash)(const struct dentry *, const struct inode *, | 918 | int (*d_hash)(const struct dentry *, struct qstr *); |
905 | struct qstr *); | 919 | int (*d_compare)(const struct dentry *, const struct dentry *, |
906 | int (*d_compare)(const struct dentry *, const struct inode *, | ||
907 | const struct dentry *, const struct inode *, | ||
908 | unsigned int, const char *, const struct qstr *); | 920 | unsigned int, const char *, const struct qstr *); |
909 | int (*d_delete)(const struct dentry *); | 921 | int (*d_delete)(const struct dentry *); |
910 | void (*d_release)(struct dentry *); | 922 | void (*d_release)(struct dentry *); |
@@ -949,25 +961,24 @@ struct dentry_operations { | |||
949 | 961 | ||
950 | d_hash: called when the VFS adds a dentry to the hash table. The first | 962 | d_hash: called when the VFS adds a dentry to the hash table. The first |
951 | dentry passed to d_hash is the parent directory that the name is | 963 | dentry passed to d_hash is the parent directory that the name is |
952 | to be hashed into. The inode is the dentry's inode. | 964 | to be hashed into. |
953 | 965 | ||
954 | Same locking and synchronisation rules as d_compare regarding | 966 | Same locking and synchronisation rules as d_compare regarding |
955 | what is safe to dereference etc. | 967 | what is safe to dereference etc. |
956 | 968 | ||
957 | d_compare: called to compare a dentry name with a given name. The first | 969 | d_compare: called to compare a dentry name with a given name. The first |
958 | dentry is the parent of the dentry to be compared, the second is | 970 | dentry is the parent of the dentry to be compared, the second is |
959 | the parent's inode, then the dentry and inode (may be NULL) of the | 971 | the child dentry. len and name string are properties of the dentry |
960 | child dentry. len and name string are properties of the dentry to be | 972 | to be compared. qstr is the name to compare it with. |
961 | compared. qstr is the name to compare it with. | ||
962 | 973 | ||
963 | Must be constant and idempotent, and should not take locks if | 974 | Must be constant and idempotent, and should not take locks if |
964 | possible, and should not or store into the dentry or inodes. | 975 | possible, and should not or store into the dentry. |
965 | Should not dereference pointers outside the dentry or inodes without | 976 | Should not dereference pointers outside the dentry without |
966 | lots of care (eg. d_parent, d_inode, d_name should not be used). | 977 | lots of care (eg. d_parent, d_inode, d_name should not be used). |
967 | 978 | ||
968 | However, our vfsmount is pinned, and RCU held, so the dentries and | 979 | However, our vfsmount is pinned, and RCU held, so the dentries and |
969 | inodes won't disappear, neither will our sb or filesystem module. | 980 | inodes won't disappear, neither will our sb or filesystem module. |
970 | ->i_sb and ->d_sb may be used. | 981 | ->d_sb may be used. |
971 | 982 | ||
972 | It is a tricky calling convention because it needs to be called under | 983 | It is a tricky calling convention because it needs to be called under |
973 | "rcu-walk", ie. without any locks or references on things. | 984 | "rcu-walk", ie. without any locks or references on things. |
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index 3e4b3dd1e046..83577f0232a0 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt | |||
@@ -33,6 +33,9 @@ When mounting an XFS filesystem, the following options are accepted. | |||
33 | removing extended attributes) the on-disk superblock feature | 33 | removing extended attributes) the on-disk superblock feature |
34 | bit field will be updated to reflect this format being in use. | 34 | bit field will be updated to reflect this format being in use. |
35 | 35 | ||
36 | CRC enabled filesystems always use the attr2 format, and so | ||
37 | will reject the noattr2 mount option if it is set. | ||
38 | |||
36 | barrier | 39 | barrier |
37 | Enables the use of block layer write barriers for writes into | 40 | Enables the use of block layer write barriers for writes into |
38 | the journal and unwritten extent conversion. This allows for | 41 | the journal and unwritten extent conversion. This allows for |
diff --git a/Documentation/fmc/00-INDEX b/Documentation/fmc/00-INDEX new file mode 100644 index 000000000000..431c69570f43 --- /dev/null +++ b/Documentation/fmc/00-INDEX | |||
@@ -0,0 +1,38 @@ | |||
1 | |||
2 | Documentation in this directory comes from sections of the manual we | ||
3 | wrote for the externally-developed fmc-bus package. The complete | ||
4 | manual as of today (2013-02) is available in PDF format at | ||
5 | http://www.ohwr.org/projects/fmc-bus/files | ||
6 | |||
7 | 00-INDEX | ||
8 | - this file. | ||
9 | |||
10 | FMC-and-SDB.txt | ||
11 | - What are FMC and SDB, basic concepts for this framework | ||
12 | |||
13 | API.txt | ||
14 | - The functions that are exported by the bus driver | ||
15 | |||
16 | parameters.txt | ||
17 | - The module parameters | ||
18 | |||
19 | carrier.txt | ||
20 | - writing a carrier (a device) | ||
21 | |||
22 | mezzanine.txt | ||
23 | - writing code for your mezzanine (a driver) | ||
24 | |||
25 | identifiers.txt | ||
26 | - how identification and matching works | ||
27 | |||
28 | fmc-fakedev.txt | ||
29 | - about drivers/fmc/fmc-fakedev.ko | ||
30 | |||
31 | fmc-trivial.txt | ||
32 | - about drivers/fmc/fmc-trivial.ko | ||
33 | |||
34 | fmc-write-eeprom.txt | ||
35 | - about drivers/fmc/fmc-write-eeprom.ko | ||
36 | |||
37 | fmc-chardev.txt | ||
38 | - about drivers/fmc/fmc-chardev.ko | ||
diff --git a/Documentation/fmc/API.txt b/Documentation/fmc/API.txt new file mode 100644 index 000000000000..06b06b92c794 --- /dev/null +++ b/Documentation/fmc/API.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | Functions Exported by fmc.ko | ||
2 | **************************** | ||
3 | |||
4 | The FMC core exports the usual 4 functions that are needed for a bus to | ||
5 | work, and a few more: | ||
6 | |||
7 | int fmc_driver_register(struct fmc_driver *drv); | ||
8 | void fmc_driver_unregister(struct fmc_driver *drv); | ||
9 | int fmc_device_register(struct fmc_device *fmc); | ||
10 | void fmc_device_unregister(struct fmc_device *fmc); | ||
11 | |||
12 | int fmc_device_register_n(struct fmc_device **fmc, int n); | ||
13 | void fmc_device_unregister_n(struct fmc_device **fmc, int n); | ||
14 | |||
15 | uint32_t fmc_readl(struct fmc_device *fmc, int offset); | ||
16 | void fmc_writel(struct fmc_device *fmc, uint32_t val, int off); | ||
17 | void *fmc_get_drvdata(struct fmc_device *fmc); | ||
18 | void fmc_set_drvdata(struct fmc_device *fmc, void *data); | ||
19 | |||
20 | int fmc_reprogram(struct fmc_device *f, struct fmc_driver *d, char *gw, | ||
21 | int sdb_entry); | ||
22 | |||
23 | The data structure that describe a device is detailed in *note FMC | ||
24 | Device::, the one that describes a driver is detailed in *note FMC | ||
25 | Driver::. Please note that structures of type fmc_device must be | ||
26 | allocated by the caller, but must not be released after unregistering. | ||
27 | The fmc-bus itself takes care of releasing the structure when their use | ||
28 | count reaches zero - actually, the device model does that in lieu of us. | ||
29 | |||
30 | The functions to register and unregister n devices are meant to be used | ||
31 | by carriers that host more than one mezzanine. The devices must all be | ||
32 | registered at the same time because if the FPGA is reprogrammed, all | ||
33 | devices in the array are affected. Usually, the driver matching the | ||
34 | first device will reprogram the FPGA, so other devices must know they | ||
35 | are already driven by a reprogrammed FPGA. | ||
36 | |||
37 | If a carrier hosts slots that are driven by different FPGA devices, it | ||
38 | should register as a group only mezzanines that are driven by the same | ||
39 | FPGA, for the reason outlined above. | ||
40 | |||
41 | Finally, the fmc_reprogram function calls the reprogram method (see | ||
42 | *note The API Offered by Carriers:: and also scans the memory area for | ||
43 | an SDB tree. You can pass -1 as sdb_entry to disable such scan. | ||
44 | Otherwise, the function fails if no tree is found at the specified | ||
45 | entry point. The function is meant to factorize common code, and by | ||
46 | the time you read this it is already used by the spec-sw and fine-delay | ||
47 | modules. | ||
diff --git a/Documentation/fmc/FMC-and-SDB.txt b/Documentation/fmc/FMC-and-SDB.txt new file mode 100644 index 000000000000..fa14e0b24521 --- /dev/null +++ b/Documentation/fmc/FMC-and-SDB.txt | |||
@@ -0,0 +1,88 @@ | |||
1 | |||
2 | FMC (FPGA Mezzanine Card) is the standard we use for our I/O devices, | ||
3 | in the context of White Rabbit and related hardware. | ||
4 | |||
5 | In our I/O environments we need to write drivers for each mezzanine | ||
6 | card, and such drivers must work regardless of the carrier being used. | ||
7 | To achieve this, we abstract the FMC interface. | ||
8 | |||
9 | We have a carrier for PCI-E called SPEC and one for VME called SVEC, | ||
10 | but more are planned. Also, we support stand-alone devices (usually | ||
11 | plugged on a SPEC card), controlled through Etherbone, developed by GSI. | ||
12 | |||
13 | Code and documentation for the FMC bus was born as part of the spec-sw | ||
14 | project, but now it lives in its own project. Other projects, i.e. | ||
15 | software support for the various carriers, should include this as a | ||
16 | submodule. | ||
17 | |||
18 | The most up to date version of code and documentation is always | ||
19 | available from the repository you can clone from: | ||
20 | |||
21 | git://ohwr.org/fmc-projects/fmc-bus.git (read-only) | ||
22 | git@ohwr.org:fmc-projects/fmc-bus.git (read-write for developers) | ||
23 | |||
24 | Selected versions of the documentation, as well as complete tar | ||
25 | archives for selected revisions are placed to the Files section of the | ||
26 | project: `http://www.ohwr.org/projects/fmc-bus/files' | ||
27 | |||
28 | |||
29 | What is FMC | ||
30 | *********** | ||
31 | |||
32 | FMC, as said, stands for "FPGA Mezzanine Card". It is a standard | ||
33 | developed by the VME consortium called VITA (VMEbus International Trade | ||
34 | Association and ratified by ANSI, the American National Standard | ||
35 | Institute. The official documentation is called "ANSI-VITA 57.1". | ||
36 | |||
37 | The FMC card is an almost square PCB, around 70x75 millimeters, that is | ||
38 | called mezzanine in this document. It usually lives plugged into | ||
39 | another PCB for power supply and control; such bigger circuit board is | ||
40 | called carrier from now on, and a single carrier may host more than one | ||
41 | mezzanine. | ||
42 | |||
43 | In the typical application the mezzanine is mostly analog while the | ||
44 | carrier is mostly digital, and hosts an FPGA that must be configured to | ||
45 | match the specific mezzanine and the desired application. Thus, you may | ||
46 | need to load different FPGA images to drive different instances of the | ||
47 | same mezzanine. | ||
48 | |||
49 | FMC, as such, is not a bus in the usual meaning of the term, because | ||
50 | most carriers have only one connector, and carriers with several | ||
51 | connectors have completely separate electrical connections to them. | ||
52 | This package, however, implements a bus as a software abstraction. | ||
53 | |||
54 | |||
55 | What is SDB | ||
56 | *********** | ||
57 | |||
58 | SDB (Self Describing Bus) is a set of data structures that we use for | ||
59 | enumerating the internal structure of an FPGA image. We also use it as | ||
60 | a filesystem inside the FMC EEPROM. | ||
61 | |||
62 | SDB is not mandatory for use of this FMC kernel bus, but if you have SDB | ||
63 | this package can make good use of it. SDB itself is developed in the | ||
64 | fpga-config-space OHWR project. The link to the repository is | ||
65 | `git://ohwr.org/hdl-core-lib/fpga-config-space.git' and what is used in | ||
66 | this project lives in the sdbfs subdirectory in there. | ||
67 | |||
68 | SDB support for FMC is described in *note FMC Identification:: and | ||
69 | *note SDB Support:: | ||
70 | |||
71 | |||
72 | SDB Support | ||
73 | *********** | ||
74 | |||
75 | The fmc.ko bus driver exports a few functions to help drivers taking | ||
76 | advantage of the SDB information that may be present in your own FPGA | ||
77 | memory image. | ||
78 | |||
79 | The module exports the following functions, in the special header | ||
80 | <linux/fmc-sdb.h>. The linux/ prefix in the name is there because we | ||
81 | plan to submit it upstream in the future, and don't want to force | ||
82 | changes on our drivers if that happens. | ||
83 | |||
84 | int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address); | ||
85 | void fmc_show_sdb_tree(struct fmc_device *fmc); | ||
86 | signed long fmc_find_sdb_device(struct sdb_array *tree, uint64_t vendor, | ||
87 | uint32_t device, unsigned long *sz); | ||
88 | int fmc_free_sdb_tree(struct fmc_device *fmc); | ||
diff --git a/Documentation/fmc/carrier.txt b/Documentation/fmc/carrier.txt new file mode 100644 index 000000000000..173f6d65c88d --- /dev/null +++ b/Documentation/fmc/carrier.txt | |||
@@ -0,0 +1,311 @@ | |||
1 | FMC Device | ||
2 | ********** | ||
3 | |||
4 | Within the Linux bus framework, the FMC device is created and | ||
5 | registered by the carrier driver. For example, the PCI driver for the | ||
6 | SPEC card fills a data structure for each SPEC that it drives, and | ||
7 | registers an associated FMC device for each card. The SVEC driver can | ||
8 | do exactly the same for the VME carrier (actually, it should do it | ||
9 | twice, because the SVEC carries two FMC mezzanines). Similarly, an | ||
10 | Etherbone driver will be able to register its own FMC devices, offering | ||
11 | communication primitives through frame exchange. | ||
12 | |||
13 | The contents of the EEPROM within the FMC are used for identification | ||
14 | purposes, i.e. for matching the device with its own driver. For this | ||
15 | reason the device structure includes a complete copy of the EEPROM | ||
16 | (actually, the carrier driver may choose whether or not to return it - | ||
17 | for example we most likely won't have the whole EEPROM available for | ||
18 | Etherbone devices. | ||
19 | |||
20 | The following listing shows the current structure defining a device. | ||
21 | Please note that all the machinery is in place but some details may | ||
22 | still change in the future. For this reason, there is a version field | ||
23 | at the beginning of the structure. As usual, the minor number will | ||
24 | change for compatible changes (like a new flag) and the major number | ||
25 | will increase when an incompatible change happens (for example, a | ||
26 | change in layout of some fmc data structures). Device writers should | ||
27 | just set it to the value FMC_VERSION, and be ready to get back -EINVAL | ||
28 | at registration time. | ||
29 | |||
30 | struct fmc_device { | ||
31 | unsigned long version; | ||
32 | unsigned long flags; | ||
33 | struct module *owner; /* char device must pin it */ | ||
34 | struct fmc_fru_id id; /* for EEPROM-based match */ | ||
35 | struct fmc_operations *op; /* carrier-provided */ | ||
36 | int irq; /* according to host bus. 0 == none */ | ||
37 | int eeprom_len; /* Usually 8kB, may be less */ | ||
38 | int eeprom_addr; /* 0x50, 0x52 etc */ | ||
39 | uint8_t *eeprom; /* Full contents or leading part */ | ||
40 | char *carrier_name; /* "SPEC" or similar, for special use */ | ||
41 | void *carrier_data; /* "struct spec *" or equivalent */ | ||
42 | __iomem void *fpga_base; /* May be NULL (Etherbone) */ | ||
43 | __iomem void *slot_base; /* Set by the driver */ | ||
44 | struct fmc_device **devarray; /* Allocated by the bus */ | ||
45 | int slot_id; /* Index in the slot array */ | ||
46 | int nr_slots; /* Number of slots in this carrier */ | ||
47 | unsigned long memlen; /* Used for the char device */ | ||
48 | struct device dev; /* For Linux use */ | ||
49 | struct device *hwdev; /* The underlying hardware device */ | ||
50 | unsigned long sdbfs_entry; | ||
51 | struct sdb_array *sdb; | ||
52 | uint32_t device_id; /* Filled by the device */ | ||
53 | char *mezzanine_name; /* Defaults to ``fmc'' */ | ||
54 | void *mezzanine_data; | ||
55 | }; | ||
56 | |||
57 | The meaning of most fields is summarized in the code comment above. | ||
58 | |||
59 | The following fields must be filled by the carrier driver before | ||
60 | registration: | ||
61 | |||
62 | * version: must be set to FMC_VERSION. | ||
63 | |||
64 | * owner: set to MODULE_OWNER. | ||
65 | |||
66 | * op: the operations to act on the device. | ||
67 | |||
68 | * irq: number for the mezzanine; may be zero. | ||
69 | |||
70 | * eeprom_len: length of the following array. | ||
71 | |||
72 | * eeprom_addr: 0x50 for first mezzanine and so on. | ||
73 | |||
74 | * eeprom: the full content of the I2C EEPROM. | ||
75 | |||
76 | * carrier_name. | ||
77 | |||
78 | * carrier_data: a unique pointer for the carrier. | ||
79 | |||
80 | * fpga_base: the I/O memory address (may be NULL). | ||
81 | |||
82 | * slot_id: the index of this slot (starting from zero). | ||
83 | |||
84 | * memlen: if fpga_base is valid, the length of I/O memory. | ||
85 | |||
86 | * hwdev: to be used in some dev_err() calls. | ||
87 | |||
88 | * device_id: a slot-specific unique integer number. | ||
89 | |||
90 | |||
91 | Please note that the carrier should read its own EEPROM memory before | ||
92 | registering the device, as well as fill all other fields listed above. | ||
93 | |||
94 | The following fields should not be assigned, because they are filled | ||
95 | later by either the bus or the device driver: | ||
96 | |||
97 | * flags. | ||
98 | |||
99 | * fru_id: filled by the bus, parsing the eeprom. | ||
100 | |||
101 | * slot_base: filled and used by the driver, if useful to it. | ||
102 | |||
103 | * devarray: an array og all mezzanines driven by a singe FPGA. | ||
104 | |||
105 | * nr_slots: set by the core at registration time. | ||
106 | |||
107 | * dev: used by Linux. | ||
108 | |||
109 | * sdb: FPGA contents, scanned according to driver's directions. | ||
110 | |||
111 | * sdbfs_entry: SDB entry point in EEPROM: autodetected. | ||
112 | |||
113 | * mezzanine_data: available for the driver. | ||
114 | |||
115 | * mezzanine_name: filled by fmc-bus during identification. | ||
116 | |||
117 | |||
118 | Note: mezzanine_data may be redundant, because Linux offers the drvdata | ||
119 | approach, so the field may be removed in later versions of this bus | ||
120 | implementation. | ||
121 | |||
122 | As I write this, she SPEC carrier is already completely functional in | ||
123 | the fmc-bus environment, and is a good reference to look at. | ||
124 | |||
125 | |||
126 | The API Offered by Carriers | ||
127 | =========================== | ||
128 | |||
129 | The carrier provides a number of methods by means of the | ||
130 | `fmc_operations' structure, which currently is defined like this | ||
131 | (again, it is a moving target, please refer to the header rather than | ||
132 | this document): | ||
133 | |||
134 | struct fmc_operations { | ||
135 | uint32_t (*readl)(struct fmc_device *fmc, int offset); | ||
136 | void (*writel)(struct fmc_device *fmc, uint32_t value, int offset); | ||
137 | int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw); | ||
138 | int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv); | ||
139 | int (*irq_request)(struct fmc_device *fmc, irq_handler_t h, | ||
140 | char *name, int flags); | ||
141 | void (*irq_ack)(struct fmc_device *fmc); | ||
142 | int (*irq_free)(struct fmc_device *fmc); | ||
143 | int (*gpio_config)(struct fmc_device *fmc, struct fmc_gpio *gpio, | ||
144 | int ngpio); | ||
145 | int (*read_ee)(struct fmc_device *fmc, int pos, void *d, int l); | ||
146 | int (*write_ee)(struct fmc_device *fmc, int pos, const void *d, int l); | ||
147 | }; | ||
148 | |||
149 | The individual methods perform the following tasks: | ||
150 | |||
151 | `readl' | ||
152 | `writel' | ||
153 | These functions access FPGA registers by whatever means the | ||
154 | carrier offers. They are not expected to fail, and most of the time | ||
155 | they will just make a memory access to the host bus. If the | ||
156 | carrier provides a fpga_base pointer, the driver may use direct | ||
157 | access through that pointer. For this reason the header offers the | ||
158 | inline functions fmc_readl and fmc_writel that access fpga_base if | ||
159 | the respective method is NULL. A driver that wants to be portable | ||
160 | and efficient should use fmc_readl and fmc_writel. For Etherbone, | ||
161 | or other non-local carriers, error-management is still to be | ||
162 | defined. | ||
163 | |||
164 | `validate' | ||
165 | Module parameters are used to manage different applications for | ||
166 | two or more boards of the same kind. Validation is based on the | ||
167 | busid module parameter, if provided, and returns the matching | ||
168 | index in the associated array. See *note Module Parameters:: in in | ||
169 | doubt. If no match is found, `-ENOENT' is returned; if the user | ||
170 | didn't pass `busid=', all devices will pass validation. The value | ||
171 | returned by the validate method can be used as index into other | ||
172 | parameters (for example, some drivers use the `lm32=' parameter in | ||
173 | this way). Such "generic parameters" are documented in *note | ||
174 | Module Parameters::, below. The validate method is used by | ||
175 | `fmc-trivial.ko', described in *note fmc-trivial::. | ||
176 | |||
177 | `reprogram' | ||
178 | The carrier enumerates FMC devices by loading a standard (or | ||
179 | golden) FPGA binary that allows EEPROM access. Each driver, then, | ||
180 | will need to reprogram the FPGA by calling this function. If the | ||
181 | name argument is NULL, the carrier should reprogram the golden | ||
182 | binary. If the gateware name has been overridden through module | ||
183 | parameters (in a carrier-specific way) the file loaded will match | ||
184 | the parameters. Per-device gateware names can be specified using | ||
185 | the `gateware=' parameter, see *note Module Parameters::. Note: | ||
186 | Clients should call rhe new helper, fmc_reprogram, which both | ||
187 | calls this method and parse the SDB tree of the FPGA. | ||
188 | |||
189 | `irq_request' | ||
190 | `irq_ack' | ||
191 | `irq_free' | ||
192 | Interrupt management is carrier-specific, so it is abstracted as | ||
193 | operations. The interrupt number is listed in the device | ||
194 | structure, and for the mezzanine driver the number is only | ||
195 | informative. The handler will receive the fmc pointer as dev_id; | ||
196 | the flags argument is passed to the Linux request_irq function, | ||
197 | but fmc-specific flags may be added in the future. You'll most | ||
198 | likely want to pass the `IRQF_SHARED' flag. | ||
199 | |||
200 | `gpio_config' | ||
201 | The method allows to configure a GPIO pin in the carrier, and read | ||
202 | its current value if it is configured as input. See *note The GPIO | ||
203 | Abstraction:: for details. | ||
204 | |||
205 | `read_ee' | ||
206 | `write_ee' | ||
207 | Read or write the EEPROM. The functions are expected to be only | ||
208 | called before reprogramming and the carrier should refuse them | ||
209 | with `ENODEV' after reprogramming. The offset is expected to be | ||
210 | within 8kB (the current size), but addresses up to 1MB are | ||
211 | reserved to fit bigger I2C devices in the future. Carriers may | ||
212 | offer access to other internal flash memories using these same | ||
213 | methods: for example the SPEC driver may define that its carrier | ||
214 | I2C memory is seen at offset 1M and the internal SPI flash is seen | ||
215 | at offset 16M. This multiplexing of several flash memories in the | ||
216 | same address space is is carrier-specific and should only be used | ||
217 | by a driver that has verified the `carrier_name' field. | ||
218 | |||
219 | |||
220 | |||
221 | The GPIO Abstraction | ||
222 | ==================== | ||
223 | |||
224 | Support for GPIO pins in the fmc-bus environment is not very | ||
225 | straightforward and deserves special discussion. | ||
226 | |||
227 | While the general idea of a carrier-independent driver seems to fly, | ||
228 | configuration of specific signals within the carrier needs at least | ||
229 | some knowledge of the carrier itself. For this reason, the specific | ||
230 | driver can request to configure carrier-specific GPIO pins, numbered | ||
231 | from 0 to at most 4095. Configuration is performed by passing a | ||
232 | pointer to an array of struct fmc_gpio items, as well as the length of | ||
233 | the array. This is the data structure: | ||
234 | |||
235 | struct fmc_gpio { | ||
236 | char *carrier_name; | ||
237 | int gpio; | ||
238 | int _gpio; /* internal use by the carrier */ | ||
239 | int mode; /* GPIOF_DIR_OUT etc, from <linux/gpio.h> */ | ||
240 | int irqmode; /* IRQF_TRIGGER_LOW and so on */ | ||
241 | }; | ||
242 | |||
243 | By specifying a carrier_name for each pin, the driver may access | ||
244 | different pins in different carriers. The gpio_config method is | ||
245 | expected to return the number of pins successfully configured, ignoring | ||
246 | requests for other carriers. However, if no pin is configured (because | ||
247 | no structure at all refers to the current carrier_name), the operation | ||
248 | returns an error so the caller will know that it is running under a | ||
249 | yet-unsupported carrier. | ||
250 | |||
251 | So, for example, a driver that has been developed and tested on both | ||
252 | the SPEC and the SVEC may request configuration of two different GPIO | ||
253 | pins, and expect one such configuration to succeed - if none succeeds | ||
254 | it most likely means that the current carrier is a still-unknown one. | ||
255 | |||
256 | If, however, your GPIO pin has a specific known role, you can pass a | ||
257 | special number in the gpio field, using one of the following macros: | ||
258 | |||
259 | #define FMC_GPIO_RAW(x) (x) /* 4096 of them */ | ||
260 | #define FMC_GPIO_IRQ(x) ((x) + 0x1000) /* 256 of them */ | ||
261 | #define FMC_GPIO_LED(x) ((x) + 0x1100) /* 256 of them */ | ||
262 | #define FMC_GPIO_KEY(x) ((x) + 0x1200) /* 256 of them */ | ||
263 | #define FMC_GPIO_TP(x) ((x) + 0x1300) /* 256 of them */ | ||
264 | #define FMC_GPIO_USER(x) ((x) + 0x1400) /* 256 of them */ | ||
265 | |||
266 | Use of virtual GPIO numbers (anything but FMC_GPIO_RAW) is allowed | ||
267 | provided the carrier_name field in the data structure is left | ||
268 | unspecified (NULL). Each carrier is responsible for providing a mapping | ||
269 | between virtual and physical GPIO numbers. The carrier may then use the | ||
270 | _gpio field to cache the result of this mapping. | ||
271 | |||
272 | All carriers must map their I/O lines to the sets above starting from | ||
273 | zero. The SPEC, for example, maps interrupt pins 0 and 1, and test | ||
274 | points 0 through 3 (even if the test points on the PCB are called | ||
275 | 5,6,7,8). | ||
276 | |||
277 | If, for example, a driver requires a free LED and a test point (for a | ||
278 | scope probe to be plugged at some point during development) it may ask | ||
279 | for FMC_GPIO_LED(0) and FMC_GPIO_TP(0). Each carrier will provide | ||
280 | suitable GPIO pins. Clearly, the person running the drivers will know | ||
281 | the order used by the specific carrier driver in assigning leds and | ||
282 | testpoints, so to make a carrier-dependent use of the diagnostic tools. | ||
283 | |||
284 | In theory, some form of autodetection should be possible: a driver like | ||
285 | the wr-nic (which uses IRQ(1) on the SPEC card) should configure | ||
286 | IRQ(0), make a test with software-generated interrupts and configure | ||
287 | IRQ(1) if the test fails. This probing step should be used because even | ||
288 | if the wr-nic gateware is known to use IRQ1 on the SPEC, the driver | ||
289 | should be carrier-independent and thus use IRQ(0) as a first bet - | ||
290 | actually, the knowledge that IRQ0 may fail is carrier-dependent | ||
291 | information, but using it doesn't make the driver unsuitable for other | ||
292 | carriers. | ||
293 | |||
294 | The return value of gpio_config is defined as follows: | ||
295 | |||
296 | * If no pin in the array can be used by the carrier, `-ENODEV'. | ||
297 | |||
298 | * If at least one virtual GPIO number cannot be mapped, `-ENOENT'. | ||
299 | |||
300 | * On success, 0 or positive. The value returned is the number of | ||
301 | high input bits (if no input is configured, the value for success | ||
302 | is 0). | ||
303 | |||
304 | While I admit the procedure is not completely straightforward, it | ||
305 | allows configuration, input and output with a single carrier operation. | ||
306 | Given the typical use case of FMC devices, GPIO operations are not | ||
307 | expected to ever by in hot paths, and GPIO access so fare has only been | ||
308 | used to configure the interrupt pin, mode and polarity. Especially | ||
309 | reading inputs is not expected to be common. If your device has GPIO | ||
310 | capabilities in the hot path, you should consider using the kernel's | ||
311 | GPIO mechanisms. | ||
diff --git a/Documentation/fmc/fmc-chardev.txt b/Documentation/fmc/fmc-chardev.txt new file mode 100644 index 000000000000..d9ccb278e597 --- /dev/null +++ b/Documentation/fmc/fmc-chardev.txt | |||
@@ -0,0 +1,64 @@ | |||
1 | fmc-chardev | ||
2 | =========== | ||
3 | |||
4 | This is a simple generic driver, that allows user access by means of a | ||
5 | character device (actually, one for each mezzanine it takes hold of). | ||
6 | |||
7 | The char device is created as a misc device. Its name in /dev (as | ||
8 | created by udev) is the same name as the underlying FMC device. Thus, | ||
9 | the name can be a silly fmc-0000 look-alike if the device has no | ||
10 | identifiers nor bus_id, a more specific fmc-0400 if the device has a | ||
11 | bus-specific address but no associated name, or something like | ||
12 | fdelay-0400 if the FMC core can rely on both a mezzanine name and a bus | ||
13 | address. | ||
14 | |||
15 | Currently the driver only supports read and write: you can lseek to the | ||
16 | desired address and read or write a register. | ||
17 | |||
18 | The driver assumes all registers are 32-bit in size, and only accepts a | ||
19 | single read or write per system call. However, as a result of Unix read | ||
20 | and write semantics, users can simply fread or fwrite bigger areas in | ||
21 | order to dump or store bigger memory areas. | ||
22 | |||
23 | There is currently no support for mmap, user-space interrupt management | ||
24 | and DMA buffers. They may be added in later versions, if the need | ||
25 | arises. | ||
26 | |||
27 | The example below shows raw access to a SPEC card programmed with its | ||
28 | golden FPGA file, that features an SDB structure at offset 256 - i.e. | ||
29 | 64 words. The mezzanine's EEPROM in this case is not programmed, so the | ||
30 | default name is fmc-<bus><devfn>, and there are two cards in the system: | ||
31 | |||
32 | spusa.root# insmod fmc-chardev.ko | ||
33 | [ 1073.339332] spec 0000:02:00.0: Driver has no ID: matches all | ||
34 | [ 1073.345051] spec 0000:02:00.0: Created misc device "fmc-0200" | ||
35 | [ 1073.350821] spec 0000:04:00.0: Driver has no ID: matches all | ||
36 | [ 1073.356525] spec 0000:04:00.0: Created misc device "fmc-0400" | ||
37 | spusa.root# ls -l /dev/fmc* | ||
38 | crw------- 1 root root 10, 58 Nov 20 19:23 /dev/fmc-0200 | ||
39 | crw------- 1 root root 10, 57 Nov 20 19:23 /dev/fmc-0400 | ||
40 | spusa.root# dd bs=4 skip=64 count=1 if=/dev/fmc-0200 2> /dev/null | od -t x1z | ||
41 | 0000000 2d 42 44 53 >-BDS< | ||
42 | 0000004 | ||
43 | |||
44 | The simple program tools/fmc-mem in this package can access an FMC char | ||
45 | device and read or write a word or a whole area. Actually, the program | ||
46 | is not specific to FMC at all, it just uses lseek, read and write. | ||
47 | |||
48 | Its first argument is the device name, the second the offset, the third | ||
49 | (if any) the value to write and the optional last argument that must | ||
50 | begin with "+" is the number of bytes to read or write. In case of | ||
51 | repeated reading data is written to stdout; repeated writes read from | ||
52 | stdin and the value argument is ignored. | ||
53 | |||
54 | The following examples show reading the SDB magic number and the first | ||
55 | SDB record from a SPEC device programmed with its golden image: | ||
56 | |||
57 | spusa.root# ./fmc-mem /dev/fmc-0200 100 | ||
58 | 5344422d | ||
59 | spusa.root# ./fmc-mem /dev/fmc-0200 100 +40 | od -Ax -t x1z | ||
60 | 000000 2d 42 44 53 00 01 02 00 00 00 00 00 00 00 00 00 >-BDS............< | ||
61 | 000010 00 00 00 00 ff 01 00 00 00 00 00 00 51 06 00 00 >............Q...< | ||
62 | 000020 c9 42 a5 e6 02 00 00 00 11 05 12 20 2d 34 42 57 >.B......... -4BW< | ||
63 | 000030 73 6f 72 43 72 61 62 73 49 53 47 2d 00 20 20 20 >sorCrabsISG-. < | ||
64 | 000040 | ||
diff --git a/Documentation/fmc/fmc-fakedev.txt b/Documentation/fmc/fmc-fakedev.txt new file mode 100644 index 000000000000..e85b74a4ae30 --- /dev/null +++ b/Documentation/fmc/fmc-fakedev.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | fmc-fakedev | ||
2 | =========== | ||
3 | |||
4 | This package includes a software-only device, called fmc-fakedev, which | ||
5 | is able to register up to 4 mezzanines (by default it registers one). | ||
6 | Unlike the SPEC driver, which creates an FMC device for each PCI cards | ||
7 | it manages, this module creates a single instance of its set of | ||
8 | mezzanines. | ||
9 | |||
10 | It is meant as the simplest possible example of how a driver should be | ||
11 | written, and it includes a fake EEPROM image (built using the tools | ||
12 | described in *note FMC Identification::),, which by default is | ||
13 | replicated for each fake mezzanine. | ||
14 | |||
15 | You can also use this device to verify the match algorithms, by asking | ||
16 | it to test your own EEPROM image. You can provide the image by means of | ||
17 | the eeprom= module parameter: the new EEPROM image is loaded, as usual, | ||
18 | by means of the firmware loader. This example shows the defaults and a | ||
19 | custom EEPROM image: | ||
20 | |||
21 | spusa.root# insmod fmc-fakedev.ko | ||
22 | [ 99.971247] fake-fmc-carrier: mezzanine 0 | ||
23 | [ 99.975393] Manufacturer: fake-vendor | ||
24 | [ 99.979624] Product name: fake-design-for-testing | ||
25 | spusa.root# rmmod fmc-fakedev | ||
26 | spusa.root# insmod fmc-fakedev.ko eeprom=fdelay-eeprom.bin | ||
27 | [ 121.447464] fake-fmc-carrier: Mezzanine 0: eeprom "fdelay-eeprom.bin" | ||
28 | [ 121.462725] fake-fmc-carrier: mezzanine 0 | ||
29 | [ 121.466858] Manufacturer: CERN | ||
30 | [ 121.470477] Product name: FmcDelay1ns4cha | ||
31 | spusa.root# rmmod fmc-fakedev | ||
32 | |||
33 | After loading the device, you can use the write_ee method do modify its | ||
34 | own internal fake EEPROM: whenever the image is overwritten starting at | ||
35 | offset 0, the module will unregister and register again the FMC device. | ||
36 | This is shown in fmc-write-eeprom.txt | ||
diff --git a/Documentation/fmc/fmc-trivial.txt b/Documentation/fmc/fmc-trivial.txt new file mode 100644 index 000000000000..d1910bc67159 --- /dev/null +++ b/Documentation/fmc/fmc-trivial.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | fmc-trivial | ||
2 | =========== | ||
3 | |||
4 | The simple module fmc-trivial is just a simple client that registers an | ||
5 | interrupt handler. I used it to verify the basic mechanism of the FMC | ||
6 | bus and how interrupts worked. | ||
7 | |||
8 | The module implements the generic FMC parameters, so it can program a | ||
9 | different gateware file in each card. The whole list of parameters it | ||
10 | accepts are: | ||
11 | |||
12 | `busid=' | ||
13 | `gateware=' | ||
14 | Generic parameters. See mezzanine.txt | ||
15 | |||
16 | |||
17 | This driver is worth reading, in my opinion. | ||
diff --git a/Documentation/fmc/fmc-write-eeprom.txt b/Documentation/fmc/fmc-write-eeprom.txt new file mode 100644 index 000000000000..44a3bc678bf0 --- /dev/null +++ b/Documentation/fmc/fmc-write-eeprom.txt | |||
@@ -0,0 +1,125 @@ | |||
1 | fmc-write-eeprom | ||
2 | ================ | ||
3 | |||
4 | This module is designed to load a binary file from /lib/firmware and to | ||
5 | write it to the internal EEPROM of the mezzanine card. This driver uses | ||
6 | the `busid' generic parameter. | ||
7 | |||
8 | Overwriting the EEPROM is not something you should do daily, and it is | ||
9 | expected to only happen during manufacturing. For this reason, the | ||
10 | module makes it unlikely for the random user to change a working EEPROM. | ||
11 | |||
12 | The module takes the following measures: | ||
13 | |||
14 | * It accepts a `file=' argument (within /lib/firmware) and if no | ||
15 | such argument is received, it doesn't write anything to EEPROM | ||
16 | (i.e. there is no default file name). | ||
17 | |||
18 | * If the file name ends with `.bin' it is written verbatim starting | ||
19 | at offset 0. | ||
20 | |||
21 | * If the file name ends with `.tlv' it is interpreted as | ||
22 | type-length-value (i.e., it allows writev(2)-like operation). | ||
23 | |||
24 | * If the file name doesn't match any of the patterns above, it is | ||
25 | ignored and no write is performed. | ||
26 | |||
27 | * Only cards listed with `busid=' are written to. If no busid is | ||
28 | specified, no programming is done (and the probe function of the | ||
29 | driver will fail). | ||
30 | |||
31 | |||
32 | Each TLV tuple is formatted in this way: the header is 5 bytes, | ||
33 | followed by data. The first byte is `w' for write, the next two bytes | ||
34 | represent the address, in little-endian byte order, and the next two | ||
35 | represent the data length, in little-endian order. The length does not | ||
36 | include the header (it is the actual number of bytes to be written). | ||
37 | |||
38 | This is a real example: that writes 5 bytes at position 0x110: | ||
39 | |||
40 | spusa.root# od -t x1 -Ax /lib/firmware/try.tlv | ||
41 | 000000 77 10 01 05 00 30 31 32 33 34 | ||
42 | 00000a | ||
43 | spusa.root# insmod /tmp/fmc-write-eeprom.ko busid=0x0200 file=try.tlv | ||
44 | [19983.391498] spec 0000:03:00.0: write 5 bytes at 0x0110 | ||
45 | [19983.414615] spec 0000:03:00.0: write_eeprom: success | ||
46 | |||
47 | Please note that you'll most likely want to use SDBFS to build your | ||
48 | EEPROM image, at least if your mezzanines are being used in the White | ||
49 | Rabbit environment. For this reason the TLV format is not expected to | ||
50 | be used much and is not expected to be developed further. | ||
51 | |||
52 | If you want to try reflashing fake EEPROM devices, you can use the | ||
53 | fmc-fakedev.ko module (see *note fmc-fakedev::). Whenever you change | ||
54 | the image starting at offset 0, it will deregister and register again | ||
55 | after two seconds. Please note, however, that if fmc-write-eeprom is | ||
56 | still loaded, the system will associate it to the new device, which | ||
57 | will be reprogrammed and thus will be unloaded after two seconds. The | ||
58 | following example removes the module after it reflashed fakedev the | ||
59 | first time. | ||
60 | |||
61 | spusa.root# insmod fmc-fakedev.ko | ||
62 | [ 72.984733] fake-fmc: Manufacturer: fake-vendor | ||
63 | [ 72.989434] fake-fmc: Product name: fake-design-for-testing | ||
64 | spusa.root# insmod fmc-write-eeprom.ko busid=0 file=fdelay-eeprom.bin; \ | ||
65 | rmmod fmc-write-eeprom | ||
66 | [ 130.874098] fake-fmc: Matching a generic driver (no ID) | ||
67 | [ 130.887845] fake-fmc: programming 6155 bytes | ||
68 | [ 130.894567] fake-fmc: write_eeprom: success | ||
69 | [ 132.895794] fake-fmc: Manufacturer: CERN | ||
70 | [ 132.899872] fake-fmc: Product name: FmcDelay1ns4cha | ||
71 | |||
72 | |||
73 | Writing to the EEPROM | ||
74 | ===================== | ||
75 | |||
76 | Once you have created a binary file for your EEPROM, you can write it | ||
77 | to the storage medium using the fmc-write-eeprom (See *note | ||
78 | fmc-write-eeprom::, while relying on a carrier driver. The procedure | ||
79 | here shown here uses the SPEC driver | ||
80 | (`http://www.ohwr.org/projects/spec-sw'). | ||
81 | |||
82 | The example assumes no driver is already loaded (actually, I unloaded | ||
83 | them by hand as everything loads automatically at boot time after you | ||
84 | installed the modules), and shows kernel messages together with | ||
85 | commands. Here the prompt is spusa.root# and two SPEC cards are plugged | ||
86 | in the system. | ||
87 | |||
88 | spusa.root# insmod fmc.ko | ||
89 | spusa.root# insmod spec.ko | ||
90 | [13972.382818] spec 0000:02:00.0: probe for device 0002:0000 | ||
91 | [13972.392773] spec 0000:02:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes | ||
92 | [13972.591388] spec 0000:02:00.0: FPGA programming successful | ||
93 | [13972.883011] spec 0000:02:00.0: EEPROM has no FRU information | ||
94 | [13972.888719] spec 0000:02:00.0: No device_id filled, using index | ||
95 | [13972.894676] spec 0000:02:00.0: No mezzanine_name found | ||
96 | [13972.899863] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init | ||
97 | [13972.906578] spec 0000:04:00.0: probe for device 0004:0000 | ||
98 | [13972.916509] spec 0000:04:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes | ||
99 | [13973.115096] spec 0000:04:00.0: FPGA programming successful | ||
100 | [13973.401798] spec 0000:04:00.0: EEPROM has no FRU information | ||
101 | [13973.407474] spec 0000:04:00.0: No device_id filled, using index | ||
102 | [13973.413417] spec 0000:04:00.0: No mezzanine_name found | ||
103 | [13973.418600] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init | ||
104 | spusa.root# ls /sys/bus/fmc/devices | ||
105 | fmc-0000 fmc-0001 | ||
106 | spusa.root# insmod fmc-write-eeprom.ko busid=0x0200 file=fdelay-eeprom.bin | ||
107 | [14103.966259] spec 0000:02:00.0: Matching an generic driver (no ID) | ||
108 | [14103.975519] spec 0000:02:00.0: programming 6155 bytes | ||
109 | [14126.373762] spec 0000:02:00.0: write_eeprom: success | ||
110 | [14126.378770] spec 0000:04:00.0: Matching an generic driver (no ID) | ||
111 | [14126.384903] spec 0000:04:00.0: fmc_write_eeprom: no filename given: not programming | ||
112 | [14126.392600] fmc_write_eeprom: probe of fmc-0001 failed with error -2 | ||
113 | |||
114 | Reading back the EEPROM | ||
115 | ======================= | ||
116 | |||
117 | In order to read back the binary content of the EEPROM of your | ||
118 | mezzanine device, the bus creates a read-only sysfs file called eeprom | ||
119 | for each mezzanine it knows about: | ||
120 | |||
121 | spusa.root# cd /sys/bus/fmc/devices; ls -l */eeprom | ||
122 | -r--r--r-- 1 root root 8192 Apr 9 16:53 FmcDelay1ns4cha-f001/eeprom | ||
123 | -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f002/eeprom | ||
124 | -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f003/eeprom | ||
125 | -r--r--r-- 1 root root 8192 Apr 9 17:19 fmc-f004/eeprom | ||
diff --git a/Documentation/fmc/identifiers.txt b/Documentation/fmc/identifiers.txt new file mode 100644 index 000000000000..3bb577ff0d52 --- /dev/null +++ b/Documentation/fmc/identifiers.txt | |||
@@ -0,0 +1,168 @@ | |||
1 | FMC Identification | ||
2 | ****************** | ||
3 | |||
4 | The FMC standard requires every compliant mezzanine to carry | ||
5 | identification information in an I2C EEPROM. The information must be | ||
6 | laid out according to the "IPMI Platform Management FRU Information", | ||
7 | where IPMI is a lie I'd better not expand, and FRU means "Field | ||
8 | Replaceable Unit". | ||
9 | |||
10 | The FRU information is an intricate unreadable binary blob that must | ||
11 | live at offset 0 of the EEPROM, and typically extends for a few hundred | ||
12 | bytes. The standard allows the application to use all the remaining | ||
13 | storage area of the EEPROM as it wants. | ||
14 | |||
15 | This chapter explains how to create your own EEPROM image and how to | ||
16 | write it in your mezzanine, as well as how devices and drivers are | ||
17 | paired at run time. EEPROM programming uses tools that are part of this | ||
18 | package and SDB (part of the fpga-config-space package). | ||
19 | |||
20 | The first sections are only interesting for manufacturers who need to | ||
21 | write the EEPROM. If you are just a software developer writing an FMC | ||
22 | device or driver, you may jump straight to *note SDB Support::. | ||
23 | |||
24 | |||
25 | Building the FRU Structure | ||
26 | ========================== | ||
27 | |||
28 | If you want to know the internals of the FRU structure and despair, you | ||
29 | can retrieve the document from | ||
30 | `http://download.intel.com/design/servers/ipmi/FRU1011.pdf' . The | ||
31 | standard is awful and difficult without reason, so we only support the | ||
32 | minimum mandatory subset - we create a simple structure and parse it | ||
33 | back at run time, but we are not able to either generate or parse more | ||
34 | arcane features like non-english languages and 6-bit text. If you need | ||
35 | more items of the FRU standard for your boards, please submit patches. | ||
36 | |||
37 | This package includes the Python script that Matthieu Cattin wrote to | ||
38 | generate the FRU binary blob, based on an helper libipmi by Manohar | ||
39 | Vanga and Matthieu himself. I changed the test script to receive | ||
40 | parameters from the command line or from the environment (the command | ||
41 | line takes precedence) | ||
42 | |||
43 | To make a long story short, in order to build a standard-compliant | ||
44 | binary file to be burned in your EEPROM, you need the following items: | ||
45 | |||
46 | Environment Opt Official Name Default | ||
47 | --------------------------------------------------------------------- | ||
48 | FRU_VENDOR -v "Board Manufacturer" fmc-example | ||
49 | FRU_NAME -n "Board Product Name" mezzanine | ||
50 | FRU_SERIAL -s `Board Serial Number" 0001 | ||
51 | FRU_PART -p "Board Part Number" sample-part | ||
52 | FRU_OUTPUT -o not applicable /dev/stdout | ||
53 | |||
54 | The "Official Name" above is what you find in the FRU official | ||
55 | documentation, chapter 11, page 7 ("Board Info Area Format"). The | ||
56 | output option is used to save the generated binary to a specific file | ||
57 | name instead of stdout. | ||
58 | |||
59 | You can pass the items to the FRU generator either in the environment | ||
60 | or on the command line. This package has currently no support for | ||
61 | specifying power consumption or such stuff, but I plan to add it as | ||
62 | soon as I find some time for that. | ||
63 | |||
64 | FIXME: consumption etc for FRU are here or in PTS? | ||
65 | |||
66 | The following example creates a binary image for a specific board: | ||
67 | |||
68 | ./tools/fru-generator -v CERN -n FmcAdc100m14b4cha \ | ||
69 | -s HCCFFIA___-CR000003 -p EDA-02063-V5-0 > eeprom.bin | ||
70 | |||
71 | The following example shows a script that builds several binary EEPROM | ||
72 | images for a series of boards, changing the serial number for each of | ||
73 | them. The script uses a mix of environment variables and command line | ||
74 | options, and uses the same string patterns shown above. | ||
75 | |||
76 | #!/bin/sh | ||
77 | |||
78 | export FRU_VENDOR="CERN" | ||
79 | export FRU_NAME="FmcAdc100m14b4cha" | ||
80 | export FRU_PART="EDA-02063-V5-0" | ||
81 | |||
82 | serial="HCCFFIA___-CR" | ||
83 | |||
84 | for number in $(seq 1 50); do | ||
85 | # build number-string "ns" | ||
86 | ns="$(printf %06d $number)" | ||
87 | ./fru-generator -s "${serial}${ns}" > eeprom-${ns}.bin | ||
88 | done | ||
89 | |||
90 | |||
91 | Using SDB-FS in the EEPROM | ||
92 | ========================== | ||
93 | |||
94 | If you want to use SDB as a filesystem in the EEPROM device within the | ||
95 | mezzanine, you should create one such filesystem using gensdbfs, from | ||
96 | the fpga-config-space package on OHWR. | ||
97 | |||
98 | By using an SBD filesystem you can cluster several files in a single | ||
99 | EEPROM, so both the host system and a soft-core running in the FPGA (if | ||
100 | any) can access extra production-time information. | ||
101 | |||
102 | We chose to use SDB as a storage filesystem because the format is very | ||
103 | simple, and both the host system and the soft-core will likely already | ||
104 | include support code for such format. The SDB library offered by the | ||
105 | fpga-config-space is less than 1kB under LM32, so it proves quite up to | ||
106 | the task. | ||
107 | |||
108 | The SDB entry point (which acts as a directory listing) cannot live at | ||
109 | offset zero in the flash device, because the FRU information must live | ||
110 | there. To avoid wasting precious storage space while still allowing | ||
111 | for more-than-minimal FRU structures, the fmc.ko will look for the SDB | ||
112 | record at address 256, 512 and 1024. | ||
113 | |||
114 | In order to generate the complete EEPROM image you'll need a | ||
115 | configuration file for gensdbfs: you tell the program where to place | ||
116 | the sdb entry point, and you must force the FRU data file to be placed | ||
117 | at the beginning of the storage device. If needed, you can also place | ||
118 | other files at a special offset (we sometimes do it for backward | ||
119 | compatibility with drivers we wrote before implementing SDB for flash | ||
120 | memory). | ||
121 | |||
122 | The directory tools/sdbfs of this package includes a well-commented | ||
123 | example that you may want to use as a starting point (the comments are | ||
124 | in the file called -SDB-CONFIG-). Reading documentation for gensdbfs | ||
125 | is a suggested first step anyways. | ||
126 | |||
127 | This package (generic FMC bus support) only accesses two files in the | ||
128 | EEPROM: the FRU information, at offset zero, with a suggested filename | ||
129 | of IPMI-FRU and the short name for the mezzanine, in a file called | ||
130 | name. The IPMI-FRU name is not mandatory, but a strongly suggested | ||
131 | choice; the name filename is mandatory, because this is the preferred | ||
132 | short name used by the FMC core. For example, a name of "fdelay" may | ||
133 | supplement a Product Name like "FmcDelay1ns4cha" - exactly as | ||
134 | demonstrated in `tools/sdbfs'. | ||
135 | |||
136 | Note: SDB access to flash memory is not yet supported, so the short | ||
137 | name currently in use is just the "Product Name" FRU string. | ||
138 | |||
139 | The example in tools/sdbfs includes an extra file, that is needed by | ||
140 | the fine-delay driver, and must live at a known address of 0x1800. By | ||
141 | running gensdbfs on that directory you can output your binary EEPROM | ||
142 | image (here below spusa$ is the shell prompt): | ||
143 | |||
144 | spusa$ ../fru-generator -v CERN -n FmcDelay1ns4cha -s proto-0 \ | ||
145 | -p EDA-02267-V3 > IPMI-FRU | ||
146 | spusa$ ls -l | ||
147 | total 16 | ||
148 | -rw-rw-r-- 1 rubini staff 975 Nov 19 18:08 --SDB-CONFIG-- | ||
149 | -rw-rw-r-- 1 rubini staff 216 Nov 19 18:13 IPMI-FRU | ||
150 | -rw-rw-r-- 1 rubini staff 11 Nov 19 18:04 fd-calib | ||
151 | -rw-rw-r-- 1 rubini staff 7 Nov 19 18:04 name | ||
152 | spusa$ sudo gensdbfs . /lib/firmware/fdelay-eeprom.bin | ||
153 | spusa$ sdb-read -l -e 0x100 /lib/firmware/fdelay-eeprom.bin | ||
154 | /home/rubini/wip/sdbfs/userspace/sdb-read: listing format is to be defined | ||
155 | 46696c6544617461:2e202020 00000100-000018ff . | ||
156 | 46696c6544617461:6e616d65 00000200-00000206 name | ||
157 | 46696c6544617461:66642d63 00001800-000018ff fd-calib | ||
158 | 46696c6544617461:49504d49 00000000-000000d7 IPMI-FRU | ||
159 | spusa$ ../fru-dump /lib/firmware/fdelay-eeprom.bin | ||
160 | /lib/firmware/fdelay-eeprom.bin: manufacturer: CERN | ||
161 | /lib/firmware/fdelay-eeprom.bin: product-name: FmcDelay1ns4cha | ||
162 | /lib/firmware/fdelay-eeprom.bin: serial-number: proto-0 | ||
163 | /lib/firmware/fdelay-eeprom.bin: part-number: EDA-02267-V3 | ||
164 | |||
165 | As expected, the output file is both a proper sdbfs object and an IPMI | ||
166 | FRU information blob. The fd-calib file lives at offset 0x1800 and is | ||
167 | over-allocated to 256 bytes, according to the configuration file for | ||
168 | gensdbfs. | ||
diff --git a/Documentation/fmc/mezzanine.txt b/Documentation/fmc/mezzanine.txt new file mode 100644 index 000000000000..87910dbfc91e --- /dev/null +++ b/Documentation/fmc/mezzanine.txt | |||
@@ -0,0 +1,123 @@ | |||
1 | FMC Driver | ||
2 | ********** | ||
3 | |||
4 | An FMC driver is concerned with the specific mezzanine and associated | ||
5 | gateware. As such, it is expected to be independent of the carrier | ||
6 | being used: it will perform I/O accesses only by means of | ||
7 | carrier-provided functions. | ||
8 | |||
9 | The matching between device and driver is based on the content of the | ||
10 | EEPROM (as mandated by the FMC standard) or by the actual cores | ||
11 | configured in the FPGA; the latter technique is used when the FPGA is | ||
12 | already programmed when the device is registered to the bus core. | ||
13 | |||
14 | In some special cases it is possible for a driver to directly access | ||
15 | FPGA registers, by means of the `fpga_base' field of the device | ||
16 | structure. This may be needed for high-bandwidth peripherals like fast | ||
17 | ADC cards. If the device module registered a remote device (for example | ||
18 | by means of Etherbone), the `fpga_base' pointer will be NULL. | ||
19 | Therefore, drivers must be ready to deal with NULL base pointers, and | ||
20 | fail gracefully. Most driver, however, are not expected to access the | ||
21 | pointer directly but run fmc_readl and fmc_writel instead, which will | ||
22 | work in any case. | ||
23 | |||
24 | In even more special cases, the driver may access carrier-specific | ||
25 | functionality: the `carrier_name' string allows the driver to check | ||
26 | which is the current carrier and make use of the `carrier_data' | ||
27 | pointer. We chose to use carrier names rather than numeric identifiers | ||
28 | for greater flexibility, but also to avoid a central registry within | ||
29 | the `fmc.h' file - we hope other users will exploit our framework with | ||
30 | their own carriers. An example use of carrier names is in GPIO setup | ||
31 | (see *note The GPIO Abstraction::), although the name match is not | ||
32 | expected to be performed by the driver. If you depend on specific | ||
33 | carriers, please check the carrier name and fail gracefully if your | ||
34 | driver finds it is running in a yet-unknown-to-it environment. | ||
35 | |||
36 | |||
37 | ID Table | ||
38 | ======== | ||
39 | |||
40 | Like most other Linux drivers, and FMC driver must list all the devices | ||
41 | which it is able to drive. This is usually done by means of a device | ||
42 | table, but in FMC we can match hardware based either on the contents of | ||
43 | their EEPROM or on the actual FPGA cores that can be enumerated. | ||
44 | Therefore, we have two tables of identifiers. | ||
45 | |||
46 | Matching of FRU information depends on two names, the manufacturer (or | ||
47 | vendor) and the device (see *note FMC Identification::); for | ||
48 | flexibility during production (i.e. before writing to the EEPROM) the | ||
49 | bus supports a catch-all driver that specifies NULL strings. For this | ||
50 | reason, the table is specified as pointer-and-length, not a a | ||
51 | null-terminated array - the entry with NULL names can be a valid entry. | ||
52 | |||
53 | Matching on FPGA cores depends on two numeric fields: the 64-bit vendor | ||
54 | number and the 32-bit device number. Support for matching based on | ||
55 | class is not yet implemented. Each device is expected to be uniquely | ||
56 | identified by an array of cores (it matches if all of the cores are | ||
57 | instantiated), and for consistency the list is passed as | ||
58 | pointer-and-length. Several similar devices can be driven by the same | ||
59 | driver, and thus the driver specifies and array of such arrays. | ||
60 | |||
61 | The complete set of involved data structures is thus the following: | ||
62 | |||
63 | struct fmc_fru_id { char *manufacturer; char *product_name; }; | ||
64 | struct fmc_sdb_one_id { uint64_t vendor; uint32_t device; }; | ||
65 | struct fmc_sdb_id { struct fmc_sdb_one_id *cores; int cores_nr; }; | ||
66 | |||
67 | struct fmc_device_id { | ||
68 | struct fmc_fru_id *fru_id; int fru_id_nr; | ||
69 | struct fmc_sdb_id *sdb_id; int sdb_id_nr; | ||
70 | }; | ||
71 | |||
72 | A better reference, with full explanation, is the <linux/fmc.h> header. | ||
73 | |||
74 | |||
75 | Module Parameters | ||
76 | ================= | ||
77 | |||
78 | Most of the FMC drivers need the same set of kernel parameters. This | ||
79 | package includes support to implement common parameters by means of | ||
80 | fields in the `fmc_driver' structure and simple macro definitions. | ||
81 | |||
82 | The parameters are carrier-specific, in that they rely on the busid | ||
83 | concept, that varies among carriers. For the SPEC, the identifier is a | ||
84 | PCI bus and devfn number, 16 bits wide in total; drivers for other | ||
85 | carriers will most likely offer something similar but not identical, | ||
86 | and some code duplication is unavoidable. | ||
87 | |||
88 | This is the list of parameters that are common to several modules to | ||
89 | see how they are actually used, please look at spec-trivial.c. | ||
90 | |||
91 | `busid=' | ||
92 | This is an array of integers, listing carrier-specific | ||
93 | identification numbers. For PIC, for example, `0x0400' represents | ||
94 | bus 4, slot 0. If any such ID is specified, the driver will only | ||
95 | accept to drive cards that appear in the list (even if the FMC ID | ||
96 | matches). This is accomplished by the validate carrier method. | ||
97 | |||
98 | `gateware=' | ||
99 | The argument is an array of strings. If no busid= is specified, | ||
100 | the first string of gateware= is used for all cards; otherwise the | ||
101 | identifiers and gateware names are paired one by one, in the order | ||
102 | specified. | ||
103 | |||
104 | `show_sdb=' | ||
105 | For modules supporting it, this parameter asks to show the SDB | ||
106 | internal structure by means of kernel messages. It is disabled by | ||
107 | default because those lines tend to hide more important messages, | ||
108 | if you look at the system console while loading the drivers. | ||
109 | Note: the parameter is being obsoleted, because fmc.ko itself now | ||
110 | supports dump_sdb= that applies to every client driver. | ||
111 | |||
112 | |||
113 | For example, if you are using the trivial driver to load two different | ||
114 | gateware files to two different cards, you can use the following | ||
115 | parameters to load different binaries to the cards, after looking up | ||
116 | the PCI identifiers. This has been tested with a SPEC carrier. | ||
117 | |||
118 | insmod fmc-trivial.ko \ | ||
119 | busid=0x0200,0x0400 \ | ||
120 | gateware=fmc/fine-delay.bin,fmc/simple-dio.bin | ||
121 | |||
122 | Please note that not all sub-modules support all of those parameters. | ||
123 | You can use modinfo to check what is supported by each module. | ||
diff --git a/Documentation/fmc/parameters.txt b/Documentation/fmc/parameters.txt new file mode 100644 index 000000000000..59edf088e3a4 --- /dev/null +++ b/Documentation/fmc/parameters.txt | |||
@@ -0,0 +1,56 @@ | |||
1 | Module Parameters in fmc.ko | ||
2 | *************************** | ||
3 | |||
4 | The core driver receives two module parameters, meant to help debugging | ||
5 | client modules. Both parameters can be modified by writing to | ||
6 | /sys/module/fmc/parameters/, because they are used when client drivers | ||
7 | are devices are registered, not when fmc.ko is loaded. | ||
8 | |||
9 | `dump_eeprom=' | ||
10 | If not zero, the parameter asks the bus controller to dump the | ||
11 | EEPROM of any device that is registered, using printk. | ||
12 | |||
13 | `dump_sdb=' | ||
14 | If not zero, the parameter prints the SDB tree of every FPGA it is | ||
15 | loaded by fmc_reprogram(). If greater than one, it asks to dump | ||
16 | the binary content of SDB records. This currently only dumps the | ||
17 | top-level SDB array, though. | ||
18 | |||
19 | |||
20 | EEPROM dumping avoids repeating lines, since most of the contents is | ||
21 | usually empty and all bits are one or zero. This is an example of the | ||
22 | output: | ||
23 | |||
24 | [ 6625.850480] spec 0000:02:00.0: FPGA programming successful | ||
25 | [ 6626.139949] spec 0000:02:00.0: Manufacturer: CERN | ||
26 | [ 6626.144666] spec 0000:02:00.0: Product name: FmcDelay1ns4cha | ||
27 | [ 6626.150370] FMC: mezzanine 0: 0000:02:00.0 on SPEC | ||
28 | [ 6626.155179] FMC: dumping eeprom 0x2000 (8192) bytes | ||
29 | [ 6626.160087] 0000: 01 00 00 01 00 0b 00 f3 01 0a 00 a5 85 87 c4 43 | ||
30 | [ 6626.167069] 0010: 45 52 4e cf 46 6d 63 44 65 6c 61 79 31 6e 73 34 | ||
31 | [ 6626.174019] 0020: 63 68 61 c7 70 72 6f 74 6f 2d 30 cc 45 44 41 2d | ||
32 | [ 6626.180975] 0030: 30 32 32 36 37 2d 56 33 da 32 30 31 32 2d 31 31 | ||
33 | [...] | ||
34 | [ 6626.371366] 0200: 66 64 65 6c 61 79 0a 00 00 00 00 00 00 00 00 00 | ||
35 | [ 6626.378359] 0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ||
36 | [ 6626.385361] [...] | ||
37 | [ 6626.387308] 1800: 70 6c 61 63 65 68 6f 6c 64 65 72 ff ff ff ff ff | ||
38 | [ 6626.394259] 1810: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff | ||
39 | [ 6626.401250] [...] | ||
40 | |||
41 | The dump of SDB looks like the following; the example shows the simple | ||
42 | golden gateware for the SPEC card, removing the leading timestamps to | ||
43 | fit the page: | ||
44 | |||
45 | spec 0000:02:00.0: SDB: 00000651:e6a542c9 WB4-Crossbar-GSI | ||
46 | spec 0000:02:00.0: SDB: 0000ce42:ff07fc47 WR-Periph-Syscon (00000000-000000ff) | ||
47 | FMC: mezzanine 0: 0000:02:00.0 on SPEC | ||
48 | FMC: poor dump of sdb first level: | ||
49 | 0000: 53 44 42 2d 00 02 01 00 00 00 00 00 00 00 00 00 | ||
50 | 0010: 00 00 00 00 00 00 01 ff 00 00 00 00 00 00 06 51 | ||
51 | 0020: e6 a5 42 c9 00 00 00 02 20 12 05 11 57 42 34 2d | ||
52 | 0030: 43 72 6f 73 73 62 61 72 2d 47 53 49 20 20 20 00 | ||
53 | 0040: 00 00 01 01 00 00 00 07 00 00 00 00 00 00 00 00 | ||
54 | 0050: 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 ce 42 | ||
55 | 0060: ff 07 fc 47 00 00 00 01 20 12 03 05 57 52 2d 50 | ||
56 | 0070: 65 72 69 70 68 2d 53 79 73 63 6f 6e 20 20 20 01 | ||
diff --git a/Documentation/hwmon/ds1621 b/Documentation/hwmon/ds1621 index 5e97f333c4df..896cdc972ca8 100644 --- a/Documentation/hwmon/ds1621 +++ b/Documentation/hwmon/ds1621 | |||
@@ -2,16 +2,30 @@ Kernel driver ds1621 | |||
2 | ==================== | 2 | ==================== |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Dallas Semiconductor DS1621 | 5 | * Dallas Semiconductor / Maxim Integrated DS1621 |
6 | Prefix: 'ds1621' | 6 | Prefix: 'ds1621' |
7 | Addresses scanned: I2C 0x48 - 0x4f | 7 | Addresses scanned: none |
8 | Datasheet: Publicly available at the Dallas Semiconductor website | 8 | Datasheet: Publicly available from www.maximintegrated.com |
9 | http://www.dalsemi.com/ | 9 | |
10 | * Dallas Semiconductor DS1625 | 10 | * Dallas Semiconductor DS1625 |
11 | Prefix: 'ds1621' | 11 | Prefix: 'ds1625' |
12 | Addresses scanned: I2C 0x48 - 0x4f | 12 | Addresses scanned: none |
13 | Datasheet: Publicly available at the Dallas Semiconductor website | 13 | Datasheet: Publicly available from www.datasheetarchive.com |
14 | http://www.dalsemi.com/ | 14 | |
15 | * Maxim Integrated DS1631 | ||
16 | Prefix: 'ds1631' | ||
17 | Addresses scanned: none | ||
18 | Datasheet: Publicly available from www.maximintegrated.com | ||
19 | |||
20 | * Maxim Integrated DS1721 | ||
21 | Prefix: 'ds1721' | ||
22 | Addresses scanned: none | ||
23 | Datasheet: Publicly available from www.maximintegrated.com | ||
24 | |||
25 | * Maxim Integrated DS1731 | ||
26 | Prefix: 'ds1731' | ||
27 | Addresses scanned: none | ||
28 | Datasheet: Publicly available from www.maximintegrated.com | ||
15 | 29 | ||
16 | Authors: | 30 | Authors: |
17 | Christian W. Zuckschwerdt <zany@triq.net> | 31 | Christian W. Zuckschwerdt <zany@triq.net> |
@@ -59,5 +73,115 @@ any of the limits have ever been met or exceeded since last power-up or | |||
59 | reset. Be aware: When testing, it showed that the status of Tout can change | 73 | reset. Be aware: When testing, it showed that the status of Tout can change |
60 | with neither of the alarms set. | 74 | with neither of the alarms set. |
61 | 75 | ||
62 | Temperature conversion of the DS1621 takes up to 1000ms; internal access to | 76 | Since there is no version or vendor identification register, there is |
63 | non-volatile registers may last for 10ms or below. | 77 | no unique identification for these devices. Therefore, explicit device |
78 | instantiation is required for correct device identification and functionality | ||
79 | (one device per address in this address range: 0x48..0x4f). | ||
80 | |||
81 | The DS1625 is pin compatible and functionally equivalent with the DS1621, | ||
82 | but the DS1621 is meant to replace it. The DS1631, DS1721, and DS1731 are | ||
83 | also pin compatible with the DS1621 and provide multi-resolution support. | ||
84 | |||
85 | Additionally, the DS1721 data sheet says the temperature flags (THF and TLF) | ||
86 | are used internally, however, these flags do get set and cleared as the actual | ||
87 | temperature crosses the min or max settings (which by default are set to 75 | ||
88 | and 80 degrees respectively). | ||
89 | |||
90 | Temperature Conversion: | ||
91 | ----------------------- | ||
92 | DS1621 - 750ms (older devices may take up to 1000ms) | ||
93 | DS1625 - 500ms | ||
94 | DS1631 - 93ms..750ms for 9..12 bits resolution, respectively. | ||
95 | DS1721 - 93ms..750ms for 9..12 bits resolution, respectively. | ||
96 | DS1731 - 93ms..750ms for 9..12 bits resolution, respectively. | ||
97 | |||
98 | Note: | ||
99 | On the DS1621, internal access to non-volatile registers may last for 10ms | ||
100 | or less (unverified on the other devices). | ||
101 | |||
102 | Temperature Accuracy: | ||
103 | --------------------- | ||
104 | DS1621: +/- 0.5 degree Celsius (from 0 to +70 degrees) | ||
105 | DS1625: +/- 0.5 degree Celsius (from 0 to +70 degrees) | ||
106 | DS1631: +/- 0.5 degree Celsius (from 0 to +70 degrees) | ||
107 | DS1721: +/- 1.0 degree Celsius (from -10 to +85 degrees) | ||
108 | DS1731: +/- 1.0 degree Celsius (from -10 to +85 degrees) | ||
109 | |||
110 | Note: | ||
111 | Please refer to the device datasheets for accuracy at other temperatures. | ||
112 | |||
113 | Temperature Resolution: | ||
114 | ----------------------- | ||
115 | As mentioned above, the DS1631, DS1721, and DS1731 provide multi-resolution | ||
116 | support, which is achieved via the R0 and R1 config register bits, where: | ||
117 | |||
118 | R0..R1 | ||
119 | ------ | ||
120 | 0 0 => 9 bits, 0.5 degrees Celcius | ||
121 | 1 0 => 10 bits, 0.25 degrees Celcius | ||
122 | 0 1 => 11 bits, 0.125 degrees Celcius | ||
123 | 1 1 => 12 bits, 0.0625 degrees Celcius | ||
124 | |||
125 | Note: | ||
126 | At initial device power-on, the default resolution is set to 12-bits. | ||
127 | |||
128 | The resolution mode for the DS1631, DS1721, or DS1731 can be changed from | ||
129 | userspace, via the device 'update_interval' sysfs attribute. This attribute | ||
130 | will normalize the range of input values to the device maximum resolution | ||
131 | values defined in the datasheet as follows: | ||
132 | |||
133 | Resolution Conversion Time Input Range | ||
134 | (C/LSB) (msec) (msec) | ||
135 | ------------------------------------------------ | ||
136 | 0.5 93.75 0....94 | ||
137 | 0.25 187.5 95...187 | ||
138 | 0.125 375 188..375 | ||
139 | 0.0625 750 376..infinity | ||
140 | ------------------------------------------------ | ||
141 | |||
142 | The following examples show how the 'update_interval' attribute can be | ||
143 | used to change the conversion time: | ||
144 | |||
145 | $ cat update_interval | ||
146 | 750 | ||
147 | $ cat temp1_input | ||
148 | 22062 | ||
149 | $ | ||
150 | $ echo 300 > update_interval | ||
151 | $ cat update_interval | ||
152 | 375 | ||
153 | $ cat temp1_input | ||
154 | 22125 | ||
155 | $ | ||
156 | $ echo 150 > update_interval | ||
157 | $ cat update_interval | ||
158 | 188 | ||
159 | $ cat temp1_input | ||
160 | 22250 | ||
161 | $ | ||
162 | $ echo 1 > update_interval | ||
163 | $ cat update_interval | ||
164 | 94 | ||
165 | $ cat temp1_input | ||
166 | 22000 | ||
167 | $ | ||
168 | $ echo 1000 > update_interval | ||
169 | $ cat update_interval | ||
170 | 750 | ||
171 | $ cat temp1_input | ||
172 | 22062 | ||
173 | $ | ||
174 | |||
175 | As shown, the ds1621 driver automatically adjusts the 'update_interval' | ||
176 | user input, via a step function. Reading back the 'update_interval' value | ||
177 | after a write operation provides the conversion time used by the device. | ||
178 | |||
179 | Mathematically, the resolution can be derived from the conversion time | ||
180 | via the following function: | ||
181 | |||
182 | g(x) = 0.5 * [minimum_conversion_time/x] | ||
183 | |||
184 | where: | ||
185 | -> 'x' = the output from 'update_interval' | ||
186 | -> 'g(x)' = the resolution in degrees C per LSB. | ||
187 | -> 93.75ms = minimum conversion time | ||
diff --git a/Documentation/hwmon/g762 b/Documentation/hwmon/g762 new file mode 100644 index 000000000000..923db9c5b5bc --- /dev/null +++ b/Documentation/hwmon/g762 | |||
@@ -0,0 +1,65 @@ | |||
1 | Kernel driver g762 | ||
2 | ================== | ||
3 | |||
4 | The GMT G762 Fan Speed PWM Controller is connected directly to a fan | ||
5 | and performs closed-loop or open-loop control of the fan speed. Two | ||
6 | modes - PWM or DC - are supported by the device. | ||
7 | |||
8 | For additional information, a detailed datasheet is available at | ||
9 | http://natisbad.org/NAS/ref/GMT_EDS-762_763-080710-0.2.pdf. sysfs | ||
10 | bindings are described in Documentation/hwmon/sysfs-interface. | ||
11 | |||
12 | The following entries are available to the user in a subdirectory of | ||
13 | /sys/bus/i2c/drivers/g762/ to control the operation of the device. | ||
14 | This can be done manually using the following entries but is usually | ||
15 | done via a userland daemon like fancontrol. | ||
16 | |||
17 | Note that those entries do not provide ways to setup the specific | ||
18 | hardware characteristics of the system (reference clock, pulses per | ||
19 | fan revolution, ...); Those can be modified via devicetree bindings | ||
20 | documented in Documentation/devicetree/bindings/hwmon/g762.txt or | ||
21 | using a specific platform_data structure in board initialization | ||
22 | file (see include/linux/platform_data/g762.h). | ||
23 | |||
24 | fan1_target: set desired fan speed. This only makes sense in closed-loop | ||
25 | fan speed control (i.e. when pwm1_enable is set to 2). | ||
26 | |||
27 | fan1_input: provide current fan rotation value in RPM as reported by | ||
28 | the fan to the device. | ||
29 | |||
30 | fan1_div: fan clock divisor. Supported value are 1, 2, 4 and 8. | ||
31 | |||
32 | fan1_pulses: number of pulses per fan revolution. Supported values | ||
33 | are 2 and 4. | ||
34 | |||
35 | fan1_fault: reports fan failure, i.e. no transition on fan gear pin for | ||
36 | about 0.7s (if the fan is not voluntarily set off). | ||
37 | |||
38 | fan1_alarm: in closed-loop control mode, if fan RPM value is 25% out | ||
39 | of the programmed value for over 6 seconds 'fan1_alarm' is | ||
40 | set to 1. | ||
41 | |||
42 | pwm1_enable: set current fan speed control mode i.e. 1 for manual fan | ||
43 | speed control (open-loop) via pwm1 described below, 2 for | ||
44 | automatic fan speed control (closed-loop) via fan1_target | ||
45 | above. | ||
46 | |||
47 | pwm1_mode: set or get fan driving mode: 1 for PWM mode, 0 for DC mode. | ||
48 | |||
49 | pwm1: get or set PWM fan control value in open-loop mode. This is an | ||
50 | integer value between 0 and 255. 0 stops the fan, 255 makes | ||
51 | it run at full speed. | ||
52 | |||
53 | Both in PWM mode ('pwm1_mode' set to 1) and DC mode ('pwm1_mode' set to 0), | ||
54 | when current fan speed control mode is open-loop ('pwm1_enable' set to 1), | ||
55 | the fan speed is programmed by setting a value between 0 and 255 via 'pwm1' | ||
56 | entry (0 stops the fan, 255 makes it run at full speed). In closed-loop mode | ||
57 | ('pwm1_enable' set to 2), the expected rotation speed in RPM can be passed to | ||
58 | the chip via 'fan1_target'. In closed-loop mode, the target speed is compared | ||
59 | with current speed (available via 'fan1_input') by the device and a feedback | ||
60 | is performed to match that target value. The fan speed value is computed | ||
61 | based on the parameters associated with the physical characteristics of the | ||
62 | system: a reference clock source frequency, a number of pulses per fan | ||
63 | revolution, etc. | ||
64 | |||
65 | Note that the driver will update its values at most once per second. | ||
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx index 03444f9d833f..4223c2d3b508 100644 --- a/Documentation/hwmon/ina2xx +++ b/Documentation/hwmon/ina2xx | |||
@@ -44,4 +44,6 @@ The INA226 monitors both a shunt voltage drop and bus supply voltage. | |||
44 | The INA230 is a high or low side current shunt and power monitor with an I2C | 44 | The INA230 is a high or low side current shunt and power monitor with an I2C |
45 | interface. The INA230 monitors both a shunt voltage drop and bus supply voltage. | 45 | interface. The INA230 monitors both a shunt voltage drop and bus supply voltage. |
46 | 46 | ||
47 | The shunt value in micro-ohms can be set via platform data. | 47 | The shunt value in micro-ohms can be set via platform data or device tree. |
48 | Please refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings | ||
49 | if the device tree is used. | ||
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches index 843751c41fea..46286460462b 100644 --- a/Documentation/hwmon/submitting-patches +++ b/Documentation/hwmon/submitting-patches | |||
@@ -27,8 +27,7 @@ increase the chances of your change being accepted. | |||
27 | explicitly below the patch header. | 27 | explicitly below the patch header. |
28 | 28 | ||
29 | * If your patch (or the driver) is affected by configuration options such as | 29 | * If your patch (or the driver) is affected by configuration options such as |
30 | CONFIG_SMP or CONFIG_HOTPLUG, make sure it compiles for all configuration | 30 | CONFIG_SMP, make sure it compiles for all configuration variants. |
31 | variants. | ||
32 | 31 | ||
33 | 32 | ||
34 | 2. Adding functionality to existing drivers | 33 | 2. Adding functionality to existing drivers |
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index d55b8ab2d10f..d29dea0f3232 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -24,6 +24,7 @@ Supported adapters: | |||
24 | * Intel Lynx Point-LP (PCH) | 24 | * Intel Lynx Point-LP (PCH) |
25 | * Intel Avoton (SOC) | 25 | * Intel Avoton (SOC) |
26 | * Intel Wellsburg (PCH) | 26 | * Intel Wellsburg (PCH) |
27 | * Intel Coleto Creek (PCH) | ||
27 | Datasheets: Publicly available at the Intel website | 28 | Datasheets: Publicly available at the Intel website |
28 | 29 | ||
29 | On Intel Patsburg and later chipsets, both the normal host SMBus controller | 30 | On Intel Patsburg and later chipsets, both the normal host SMBus controller |
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4 index 1e6634f54c50..a370b2047cf3 100644 --- a/Documentation/i2c/busses/i2c-piix4 +++ b/Documentation/i2c/busses/i2c-piix4 | |||
@@ -13,7 +13,7 @@ Supported adapters: | |||
13 | * AMD SP5100 (SB700 derivative found on some server mainboards) | 13 | * AMD SP5100 (SB700 derivative found on some server mainboards) |
14 | Datasheet: Publicly available at the AMD website | 14 | Datasheet: Publicly available at the AMD website |
15 | http://support.amd.com/us/Embedded_TechDocs/44413.pdf | 15 | http://support.amd.com/us/Embedded_TechDocs/44413.pdf |
16 | * AMD Hudson-2 | 16 | * AMD Hudson-2, CZ |
17 | Datasheet: Not publicly available | 17 | Datasheet: Not publicly available |
18 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge | 18 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge |
19 | Datasheet: Publicly available at the SMSC website http://www.smsc.com | 19 | Datasheet: Publicly available at the SMSC website http://www.smsc.com |
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index 2c179613f81b..de139b18184a 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -80,6 +80,8 @@ Userspace can detect that a driver can report more total contacts than slots | |||
80 | by noting that the largest supported BTN_TOOL_*TAP event is larger than the | 80 | by noting that the largest supported BTN_TOOL_*TAP event is larger than the |
81 | total number of type B slots reported in the absinfo for the ABS_MT_SLOT axis. | 81 | total number of type B slots reported in the absinfo for the ABS_MT_SLOT axis. |
82 | 82 | ||
83 | The minimum value of the ABS_MT_SLOT axis must be 0. | ||
84 | |||
83 | Protocol Example A | 85 | Protocol Example A |
84 | ------------------ | 86 | ------------------ |
85 | 87 | ||
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 237acab169dd..2a5f0e14efa3 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -72,6 +72,7 @@ Code Seq#(hex) Include File Comments | |||
72 | 0x06 all linux/lp.h | 72 | 0x06 all linux/lp.h |
73 | 0x09 all linux/raid/md_u.h | 73 | 0x09 all linux/raid/md_u.h |
74 | 0x10 00-0F drivers/char/s390/vmcp.h | 74 | 0x10 00-0F drivers/char/s390/vmcp.h |
75 | 0x10 10-1F arch/s390/include/uapi/sclp_ctl.h | ||
75 | 0x12 all linux/fs.h | 76 | 0x12 all linux/fs.h |
76 | linux/blkpg.h | 77 | linux/blkpg.h |
77 | 0x1b all InfiniBand Subsystem <http://infiniband.sourceforge.net/> | 78 | 0x1b all InfiniBand Subsystem <http://infiniband.sourceforge.net/> |
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index 3f429ed8b3b8..e349f293cc98 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt | |||
@@ -165,7 +165,7 @@ Searching in menuconfig: | |||
165 | Example: | 165 | Example: |
166 | /hotplug | 166 | /hotplug |
167 | This lists all config symbols that contain "hotplug", | 167 | This lists all config symbols that contain "hotplug", |
168 | e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG. | 168 | e.g., HOTPLUG_CPU, MEMORY_HOTPLUG. |
169 | 169 | ||
170 | For search help, enter / followed TAB-TAB-TAB (to highlight | 170 | For search help, enter / followed TAB-TAB-TAB (to highlight |
171 | <Help>) and Enter. This will tell you that you can also use | 171 | <Help>) and Enter. This will tell you that you can also use |
@@ -174,6 +174,19 @@ Searching in menuconfig: | |||
174 | 174 | ||
175 | /^hotplug | 175 | /^hotplug |
176 | 176 | ||
177 | When searching, symbols are sorted thus: | ||
178 | - exact match first: an exact match is when the search matches | ||
179 | the complete symbol name; | ||
180 | - alphabetical order: when two symbols do not match exactly, | ||
181 | they are sorted in alphabetical order (in the user's current | ||
182 | locale). | ||
183 | For example: ^ATH.K matches: | ||
184 | ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG | ||
185 | [...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...] | ||
186 | of which only ATH5K and ATH9K match exactly and so are sorted | ||
187 | first (and in alphabetical order), then come all other symbols, | ||
188 | sorted in alphabetical order. | ||
189 | |||
177 | ______________________________________________________________________ | 190 | ______________________________________________________________________ |
178 | User interface options for 'menuconfig' | 191 | User interface options for 'menuconfig' |
179 | 192 | ||
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt index 9c7fd988e299..88d5a863712a 100644 --- a/Documentation/kdump/kdump.txt +++ b/Documentation/kdump/kdump.txt | |||
@@ -47,19 +47,12 @@ parameter. Optionally the size of the ELF header can also be passed | |||
47 | when using the elfcorehdr=[size[KMG]@]offset[KMG] syntax. | 47 | when using the elfcorehdr=[size[KMG]@]offset[KMG] syntax. |
48 | 48 | ||
49 | 49 | ||
50 | With the dump-capture kernel, you can access the memory image, or "old | 50 | With the dump-capture kernel, you can access the memory image through |
51 | memory," in two ways: | 51 | /proc/vmcore. This exports the dump as an ELF-format file that you can |
52 | 52 | write out using file copy commands such as cp or scp. Further, you can | |
53 | - Through a /dev/oldmem device interface. A capture utility can read the | 53 | use analysis tools such as the GNU Debugger (GDB) and the Crash tool to |
54 | device file and write out the memory in raw format. This is a raw dump | 54 | debug the dump file. This method ensures that the dump pages are correctly |
55 | of memory. Analysis and capture tools must be intelligent enough to | 55 | ordered. |
56 | determine where to look for the right information. | ||
57 | |||
58 | - Through /proc/vmcore. This exports the dump as an ELF-format file that | ||
59 | you can write out using file copy commands such as cp or scp. Further, | ||
60 | you can use analysis tools such as the GNU Debugger (GDB) and the Crash | ||
61 | tool to debug the dump file. This method ensures that the dump pages are | ||
62 | correctly ordered. | ||
63 | 56 | ||
64 | 57 | ||
65 | Setup and Installation | 58 | Setup and Installation |
@@ -423,18 +416,6 @@ the following command: | |||
423 | 416 | ||
424 | cp /proc/vmcore <dump-file> | 417 | cp /proc/vmcore <dump-file> |
425 | 418 | ||
426 | You can also access dumped memory as a /dev/oldmem device for a linear | ||
427 | and raw view. To create the device, use the following command: | ||
428 | |||
429 | mknod /dev/oldmem c 1 12 | ||
430 | |||
431 | Use the dd command with suitable options for count, bs, and skip to | ||
432 | access specific portions of the dump. | ||
433 | |||
434 | To see the entire memory, use the following command: | ||
435 | |||
436 | dd if=/dev/oldmem of=oldmem.001 | ||
437 | |||
438 | 419 | ||
439 | Analysis | 420 | Analysis |
440 | ======== | 421 | ======== |
@@ -461,14 +442,6 @@ format. Crash is available on Dave Anderson's site at the following URL: | |||
461 | http://people.redhat.com/~anderson/ | 442 | http://people.redhat.com/~anderson/ |
462 | 443 | ||
463 | 444 | ||
464 | To Do | ||
465 | ===== | ||
466 | |||
467 | 1) Provide relocatable kernels for all architectures to help in maintaining | ||
468 | multiple kernels for crash_dump, and the same kernel as the system kernel | ||
469 | can be used to capture the dump. | ||
470 | |||
471 | |||
472 | Contact | 445 | Contact |
473 | ======= | 446 | ======= |
474 | 447 | ||
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt index 99b57abddf8a..acbc1a3d0d91 100644 --- a/Documentation/kernel-doc-nano-HOWTO.txt +++ b/Documentation/kernel-doc-nano-HOWTO.txt | |||
@@ -142,9 +142,10 @@ are: | |||
142 | 142 | ||
143 | - Makefile | 143 | - Makefile |
144 | 144 | ||
145 | The targets 'sgmldocs', 'psdocs', 'pdfdocs', and 'htmldocs' are used | 145 | The targets 'xmldocs', 'psdocs', 'pdfdocs', and 'htmldocs' are used |
146 | to build DocBook files, PostScript files, PDF files, and html files | 146 | to build XML DocBook files, PostScript files, PDF files, and html files |
147 | in Documentation/DocBook. | 147 | in Documentation/DocBook. The older target 'sgmldocs' is equivalent |
148 | to 'xmldocs'. | ||
148 | 149 | ||
149 | - Documentation/DocBook/Makefile | 150 | - Documentation/DocBook/Makefile |
150 | 151 | ||
@@ -158,8 +159,8 @@ If you just want to read the ready-made books on the various | |||
158 | subsystems (see Documentation/DocBook/*.tmpl), just type 'make | 159 | subsystems (see Documentation/DocBook/*.tmpl), just type 'make |
159 | psdocs', or 'make pdfdocs', or 'make htmldocs', depending on your | 160 | psdocs', or 'make pdfdocs', or 'make htmldocs', depending on your |
160 | preference. If you would rather read a different format, you can type | 161 | preference. If you would rather read a different format, you can type |
161 | 'make sgmldocs' and then use DocBook tools to convert | 162 | 'make xmldocs' and then use DocBook tools to convert |
162 | Documentation/DocBook/*.sgml to a format of your choice (for example, | 163 | Documentation/DocBook/*.xml to a format of your choice (for example, |
163 | 'db2html ...' if 'make htmldocs' was not defined). | 164 | 'db2html ...' if 'make htmldocs' was not defined). |
164 | 165 | ||
165 | If you want to see man pages instead, you can do this: | 166 | If you want to see man pages instead, you can do this: |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index c3bfacb92910..15356aca938c 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1129,11 +1129,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1129 | The builtin appraise policy appraises all files | 1129 | The builtin appraise policy appraises all files |
1130 | owned by uid=0. | 1130 | owned by uid=0. |
1131 | 1131 | ||
1132 | ima_audit= [IMA] | ||
1133 | Format: { "0" | "1" } | ||
1134 | 0 -- integrity auditing messages. (Default) | ||
1135 | 1 -- enable informational integrity auditing messages. | ||
1136 | |||
1137 | ima_hash= [IMA] | 1132 | ima_hash= [IMA] |
1138 | Format: { "sha1" | "md5" } | 1133 | Format: { "sha1" | "md5" } |
1139 | default: "sha1" | 1134 | default: "sha1" |
@@ -1158,6 +1153,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1158 | inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver | 1153 | inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver |
1159 | Format: <irq> | 1154 | Format: <irq> |
1160 | 1155 | ||
1156 | int_pln_enable [x86] Enable power limit notification interrupt | ||
1157 | |||
1158 | integrity_audit=[IMA] | ||
1159 | Format: { "0" | "1" } | ||
1160 | 0 -- basic integrity auditing messages. (Default) | ||
1161 | 1 -- additional integrity auditing messages. | ||
1162 | |||
1161 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option | 1163 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option |
1162 | on | 1164 | on |
1163 | Enable intel iommu driver. | 1165 | Enable intel iommu driver. |
@@ -1456,6 +1458,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
1456 | 1458 | ||
1457 | * dump_id: dump IDENTIFY data. | 1459 | * dump_id: dump IDENTIFY data. |
1458 | 1460 | ||
1461 | * atapi_dmadir: Enable ATAPI DMADIR bridge support | ||
1462 | |||
1459 | If there are multiple matching configurations changing | 1463 | If there are multiple matching configurations changing |
1460 | the same attribute, the last one is used. | 1464 | the same attribute, the last one is used. |
1461 | 1465 | ||
@@ -2677,9 +2681,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2677 | Run specified binary instead of /init from the ramdisk, | 2681 | Run specified binary instead of /init from the ramdisk, |
2678 | used for early userspace startup. See initrd. | 2682 | used for early userspace startup. See initrd. |
2679 | 2683 | ||
2680 | reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode | 2684 | reboot= [KNL] |
2681 | Format: <reboot_mode>[,<reboot_mode2>[,...]] | 2685 | Format (x86 or x86_64): |
2682 | See arch/*/kernel/reboot.c or arch/*/kernel/process.c | 2686 | [w[arm] | c[old] | h[ard] | s[oft] | g[pio]] \ |
2687 | [[,]s[mp]#### \ | ||
2688 | [[,]b[ios] | a[cpi] | k[bd] | t[riple] | e[fi] | p[ci]] \ | ||
2689 | [[,]f[orce] | ||
2690 | Where reboot_mode is one of warm (soft) or cold (hard) or gpio, | ||
2691 | reboot_type is one of bios, acpi, kbd, triple, efi, or pci, | ||
2692 | reboot_force is either force or not specified, | ||
2693 | reboot_cpu is s[mp]#### with #### being the processor | ||
2694 | to be used for rebooting. | ||
2683 | 2695 | ||
2684 | relax_domain_level= | 2696 | relax_domain_level= |
2685 | [KNL, SMP] Set scheduler's default relax_domain_level. | 2697 | [KNL, SMP] Set scheduler's default relax_domain_level. |
@@ -3005,6 +3017,27 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3005 | Force threading of all interrupt handlers except those | 3017 | Force threading of all interrupt handlers except those |
3006 | marked explicitly IRQF_NO_THREAD. | 3018 | marked explicitly IRQF_NO_THREAD. |
3007 | 3019 | ||
3020 | tmem [KNL,XEN] | ||
3021 | Enable the Transcendent memory driver if built-in. | ||
3022 | |||
3023 | tmem.cleancache=0|1 [KNL, XEN] | ||
3024 | Default is on (1). Disable the usage of the cleancache | ||
3025 | API to send anonymous pages to the hypervisor. | ||
3026 | |||
3027 | tmem.frontswap=0|1 [KNL, XEN] | ||
3028 | Default is on (1). Disable the usage of the frontswap | ||
3029 | API to send swap pages to the hypervisor. If disabled | ||
3030 | the selfballooning and selfshrinking are force disabled. | ||
3031 | |||
3032 | tmem.selfballooning=0|1 [KNL, XEN] | ||
3033 | Default is on (1). Disable the driving of swap pages | ||
3034 | to the hypervisor. | ||
3035 | |||
3036 | tmem.selfshrinking=0|1 [KNL, XEN] | ||
3037 | Default is on (1). Partial swapoff that immediately | ||
3038 | transfers pages from Xen hypervisor back to the | ||
3039 | kernel based on different criteria. | ||
3040 | |||
3008 | topology= [S390] | 3041 | topology= [S390] |
3009 | Format: {off | on} | 3042 | Format: {off | on} |
3010 | Specify if the kernel should make use of the cpu | 3043 | Specify if the kernel should make use of the cpu |
@@ -3048,6 +3081,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3048 | See also Documentation/trace/ftrace.txt "trace options" | 3081 | See also Documentation/trace/ftrace.txt "trace options" |
3049 | section. | 3082 | section. |
3050 | 3083 | ||
3084 | traceoff_on_warning | ||
3085 | [FTRACE] enable this option to disable tracing when a | ||
3086 | warning is hit. This turns off "tracing_on". Tracing can | ||
3087 | be enabled again by echoing '1' into the "tracing_on" | ||
3088 | file located in /sys/kernel/debug/tracing/ | ||
3089 | |||
3090 | This option is useful, as it disables the trace before | ||
3091 | the WARNING dump is called, which prevents the trace to | ||
3092 | be filled with content caused by the warning output. | ||
3093 | |||
3094 | This option can also be set at run time via the sysctl | ||
3095 | option: kernel/traceoff_on_warning | ||
3096 | |||
3051 | transparent_hugepage= | 3097 | transparent_hugepage= |
3052 | [KNL] | 3098 | [KNL] |
3053 | Format: [always|madvise|never] | 3099 | Format: [always|madvise|never] |
@@ -3208,6 +3254,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3208 | video= [FB] Frame buffer configuration | 3254 | video= [FB] Frame buffer configuration |
3209 | See Documentation/fb/modedb.txt. | 3255 | See Documentation/fb/modedb.txt. |
3210 | 3256 | ||
3257 | video.brightness_switch_enabled= [0,1] | ||
3258 | If set to 1, on receiving an ACPI notify event | ||
3259 | generated by hotkey, video driver will adjust brightness | ||
3260 | level and then send out the event to user space through | ||
3261 | the allocated input device; If set to 0, video driver | ||
3262 | will only send out the event without touching backlight | ||
3263 | brightness level. | ||
3264 | default: 1 | ||
3265 | |||
3211 | virtio_mmio.device= | 3266 | virtio_mmio.device= |
3212 | [VMMIO] Memory mapped virtio (platform) device. | 3267 | [VMMIO] Memory mapped virtio (platform) device. |
3213 | 3268 | ||
@@ -3320,6 +3375,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3320 | that this also can be controlled per-workqueue for | 3375 | that this also can be controlled per-workqueue for |
3321 | workqueues visible under /sys/bus/workqueue/. | 3376 | workqueues visible under /sys/bus/workqueue/. |
3322 | 3377 | ||
3378 | workqueue.power_efficient | ||
3379 | Per-cpu workqueues are generally preferred because | ||
3380 | they show better performance thanks to cache | ||
3381 | locality; unfortunately, per-cpu workqueues tend to | ||
3382 | be more power hungry than unbound workqueues. | ||
3383 | |||
3384 | Enabling this makes the per-cpu workqueues which | ||
3385 | were observed to contribute significantly to power | ||
3386 | consumption unbound, leading to measurably lower | ||
3387 | power usage at the cost of small performance | ||
3388 | overhead. | ||
3389 | |||
3390 | The default value of this parameter is determined by | ||
3391 | the config option CONFIG_WQ_POWER_EFFICIENT_DEFAULT. | ||
3392 | |||
3323 | x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of | 3393 | x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of |
3324 | default x2apic cluster mode on platforms | 3394 | default x2apic cluster mode on platforms |
3325 | supporting x2apic. | 3395 | supporting x2apic. |
@@ -3330,9 +3400,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3330 | plus one apbt timer for broadcast timer. | 3400 | plus one apbt timer for broadcast timer. |
3331 | x86_mrst_timer=apbt_only | lapic_and_apbt | 3401 | x86_mrst_timer=apbt_only | lapic_and_apbt |
3332 | 3402 | ||
3333 | xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks. | ||
3334 | xd_geo= See header of drivers/block/xd.c. | ||
3335 | |||
3336 | xen_emul_unplug= [HW,X86,XEN] | 3403 | xen_emul_unplug= [HW,X86,XEN] |
3337 | Unplug Xen emulated devices | 3404 | Unplug Xen emulated devices |
3338 | Format: [unplug0,][unplug1] | 3405 | Format: [unplug0,][unplug1] |
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt index cbf7ae412da4..32351bfabf20 100644 --- a/Documentation/kernel-per-CPU-kthreads.txt +++ b/Documentation/kernel-per-CPU-kthreads.txt | |||
@@ -157,6 +157,53 @@ RCU_SOFTIRQ: Do at least one of the following: | |||
157 | calls and by forcing both kernel threads and interrupts | 157 | calls and by forcing both kernel threads and interrupts |
158 | to execute elsewhere. | 158 | to execute elsewhere. |
159 | 159 | ||
160 | Name: kworker/%u:%d%s (cpu, id, priority) | ||
161 | Purpose: Execute workqueue requests | ||
162 | To reduce its OS jitter, do any of the following: | ||
163 | 1. Run your workload at a real-time priority, which will allow | ||
164 | preempting the kworker daemons. | ||
165 | 2. Do any of the following needed to avoid jitter that your | ||
166 | application cannot tolerate: | ||
167 | a. Build your kernel with CONFIG_SLUB=y rather than | ||
168 | CONFIG_SLAB=y, thus avoiding the slab allocator's periodic | ||
169 | use of each CPU's workqueues to run its cache_reap() | ||
170 | function. | ||
171 | b. Avoid using oprofile, thus avoiding OS jitter from | ||
172 | wq_sync_buffer(). | ||
173 | c. Limit your CPU frequency so that a CPU-frequency | ||
174 | governor is not required, possibly enlisting the aid of | ||
175 | special heatsinks or other cooling technologies. If done | ||
176 | correctly, and if you CPU architecture permits, you should | ||
177 | be able to build your kernel with CONFIG_CPU_FREQ=n to | ||
178 | avoid the CPU-frequency governor periodically running | ||
179 | on each CPU, including cs_dbs_timer() and od_dbs_timer(). | ||
180 | WARNING: Please check your CPU specifications to | ||
181 | make sure that this is safe on your particular system. | ||
182 | d. It is not possible to entirely get rid of OS jitter | ||
183 | from vmstat_update() on CONFIG_SMP=y systems, but you | ||
184 | can decrease its frequency by writing a large value to | ||
185 | /proc/sys/vm/stat_interval. The default value is HZ, | ||
186 | for an interval of one second. Of course, larger values | ||
187 | will make your virtual-memory statistics update more | ||
188 | slowly. Of course, you can also run your workload at | ||
189 | a real-time priority, thus preempting vmstat_update(). | ||
190 | e. If running on high-end powerpc servers, build with | ||
191 | CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS | ||
192 | daemon from running on each CPU every second or so. | ||
193 | (This will require editing Kconfig files and will defeat | ||
194 | this platform's RAS functionality.) This avoids jitter | ||
195 | due to the rtas_event_scan() function. | ||
196 | WARNING: Please check your CPU specifications to | ||
197 | make sure that this is safe on your particular system. | ||
198 | f. If running on Cell Processor, build your kernel with | ||
199 | CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from | ||
200 | spu_gov_work(). | ||
201 | WARNING: Please check your CPU specifications to | ||
202 | make sure that this is safe on your particular system. | ||
203 | g. If running on PowerMAC, build your kernel with | ||
204 | CONFIG_PMAC_RACKMETER=n to disable the CPU-meter, | ||
205 | avoiding OS jitter from rackmeter_do_timer(). | ||
206 | |||
160 | Name: rcuc/%u | 207 | Name: rcuc/%u |
161 | Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels. | 208 | Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels. |
162 | To reduce its OS jitter, do at least one of the following: | 209 | To reduce its OS jitter, do at least one of the following: |
@@ -185,7 +232,7 @@ Purpose: Offload RCU callbacks from the corresponding CPU. | |||
185 | To reduce its OS jitter, do at least one of the following: | 232 | To reduce its OS jitter, do at least one of the following: |
186 | 1. Use affinity, cgroups, or other mechanism to force these kthreads | 233 | 1. Use affinity, cgroups, or other mechanism to force these kthreads |
187 | to execute on some other CPU. | 234 | to execute on some other CPU. |
188 | 2. Build with CONFIG_RCU_NOCB_CPUS=n, which will prevent these | 235 | 2. Build with CONFIG_RCU_NOCB_CPU=n, which will prevent these |
189 | kthreads from being created in the first place. However, please | 236 | kthreads from being created in the first place. However, please |
190 | note that this will not eliminate OS jitter, but will instead | 237 | note that this will not eliminate OS jitter, but will instead |
191 | shift it to RCU_SOFTIRQ. | 238 | shift it to RCU_SOFTIRQ. |
diff --git a/Documentation/laptops/dslm.c b/Documentation/laptops/dslm.c index 72ff290c5fc6..d5dd2d4b04d8 100644 --- a/Documentation/laptops/dslm.c +++ b/Documentation/laptops/dslm.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * dslm.c | 2 | * dslm.c |
3 | * Simple Disk Sleep Monitor | 3 | * Simple Disk Sleep Monitor |
4 | * by Bartek Kania | 4 | * by Bartek Kania |
5 | * Licenced under the GPL | 5 | * Licensed under the GPL |
6 | */ | 6 | */ |
7 | #include <unistd.h> | 7 | #include <unistd.h> |
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
diff --git a/Documentation/m68k/kernel-options.txt b/Documentation/m68k/kernel-options.txt index 97d45f276fe6..eaf32a1fd0b1 100644 --- a/Documentation/m68k/kernel-options.txt +++ b/Documentation/m68k/kernel-options.txt | |||
@@ -80,8 +80,6 @@ Valid names are: | |||
80 | /dev/sdd: -> 0x0830 (forth SCSI disk) | 80 | /dev/sdd: -> 0x0830 (forth SCSI disk) |
81 | /dev/sde: -> 0x0840 (fifth SCSI disk) | 81 | /dev/sde: -> 0x0840 (fifth SCSI disk) |
82 | /dev/fd : -> 0x0200 (floppy disk) | 82 | /dev/fd : -> 0x0200 (floppy disk) |
83 | /dev/xda: -> 0x0c00 (first XT disk, unused in Linux/m68k) | ||
84 | /dev/xdb: -> 0x0c40 (second XT disk, unused in Linux/m68k) | ||
85 | 83 | ||
86 | The name must be followed by a decimal number, that stands for the | 84 | The name must be followed by a decimal number, that stands for the |
87 | partition number. Internally, the value of the number is just | 85 | partition number. Internally, the value of the number is just |
diff --git a/Documentation/md.txt b/Documentation/md.txt index e0ddd327632d..fbb2fcbf16b6 100644 --- a/Documentation/md.txt +++ b/Documentation/md.txt | |||
@@ -566,13 +566,6 @@ also have | |||
566 | when it reaches the current sync_max (below) and possibly at | 566 | when it reaches the current sync_max (below) and possibly at |
567 | other times. | 567 | other times. |
568 | 568 | ||
569 | sync_max | ||
570 | This is a number of sectors at which point a resync/recovery | ||
571 | process will pause. When a resync is active, the value can | ||
572 | only ever be increased, never decreased. The value of 'max' | ||
573 | effectively disables the limit. | ||
574 | |||
575 | |||
576 | sync_speed | 569 | sync_speed |
577 | This shows the current actual speed, in K/sec, of the current | 570 | This shows the current actual speed, in K/sec, of the current |
578 | sync_action. It is averaged over the last 30 seconds. | 571 | sync_action. It is averaged over the last 30 seconds. |
@@ -593,6 +586,12 @@ also have | |||
593 | that number to reach sync_max. Then you can either increase | 586 | that number to reach sync_max. Then you can either increase |
594 | "sync_max", or can write 'idle' to "sync_action". | 587 | "sync_max", or can write 'idle' to "sync_action". |
595 | 588 | ||
589 | The value of 'max' for "sync_max" effectively disables the limit. | ||
590 | When a resync is active, the value can only ever be increased, | ||
591 | never decreased. | ||
592 | The value of '0' is the minimum for "sync_min". | ||
593 | |||
594 | |||
596 | 595 | ||
597 | Each active md device may also have attributes specific to the | 596 | Each active md device may also have attributes specific to the |
598 | personality module that manages it. | 597 | personality module that manages it. |
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt index 77bd0a42f19d..eeced24e56af 100644 --- a/Documentation/media-framework.txt +++ b/Documentation/media-framework.txt | |||
@@ -18,7 +18,7 @@ Abstract media device model | |||
18 | 18 | ||
19 | Discovering a device internal topology, and configuring it at runtime, is one | 19 | Discovering a device internal topology, and configuring it at runtime, is one |
20 | of the goals of the media framework. To achieve this, hardware devices are | 20 | of the goals of the media framework. To achieve this, hardware devices are |
21 | modeled as an oriented graph of building blocks called entities connected | 21 | modelled as an oriented graph of building blocks called entities connected |
22 | through pads. | 22 | through pads. |
23 | 23 | ||
24 | An entity is a basic media hardware building block. It can correspond to | 24 | An entity is a basic media hardware building block. It can correspond to |
diff --git a/Documentation/metag/kernel-ABI.txt b/Documentation/metag/kernel-ABI.txt index 7b8dee83b9c1..628216603198 100644 --- a/Documentation/metag/kernel-ABI.txt +++ b/Documentation/metag/kernel-ABI.txt | |||
@@ -189,7 +189,7 @@ call: | |||
189 | 189 | ||
190 | 64-bit arguments are placed in matching pairs of registers (i.e. the same | 190 | 64-bit arguments are placed in matching pairs of registers (i.e. the same |
191 | register number in both D0 and D1 units), with the least significant half in D0 | 191 | register number in both D0 and D1 units), with the least significant half in D0 |
192 | and the most significant half in D1, leaving a gap where necessary. Futher | 192 | and the most significant half in D1, leaving a gap where necessary. Further |
193 | arguments are stored on the stack in reverse order (earlier arguments at higher | 193 | arguments are stored on the stack in reverse order (earlier arguments at higher |
194 | addresses): | 194 | addresses): |
195 | 195 | ||
diff --git a/Documentation/misc-devices/mei/mei.txt b/Documentation/misc-devices/mei/mei.txt index 6ec702950719..15bba1aeba9a 100644 --- a/Documentation/misc-devices/mei/mei.txt +++ b/Documentation/misc-devices/mei/mei.txt | |||
@@ -120,7 +120,7 @@ The Intel MEI Driver supports the following IOCTL command: | |||
120 | Notes: | 120 | Notes: |
121 | max_msg_length (MTU) in client properties describes the maximum | 121 | max_msg_length (MTU) in client properties describes the maximum |
122 | data that can be sent or received. (e.g. if MTU=2K, can send | 122 | data that can be sent or received. (e.g. if MTU=2K, can send |
123 | requests up to bytes 2k and received responses upto 2k bytes). | 123 | requests up to bytes 2k and received responses up to 2k bytes). |
124 | 124 | ||
125 | Intel ME Applications: | 125 | Intel ME Applications: |
126 | ============== | 126 | ============== |
diff --git a/Documentation/networking/.gitignore b/Documentation/networking/.gitignore index 286a5680f490..e69de29bb2d1 100644 --- a/Documentation/networking/.gitignore +++ b/Documentation/networking/.gitignore | |||
@@ -1 +0,0 @@ | |||
1 | ifenslave | ||
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX index 258d9b92c36f..32dfbd924121 100644 --- a/Documentation/networking/00-INDEX +++ b/Documentation/networking/00-INDEX | |||
@@ -88,8 +88,6 @@ gianfar.txt | |||
88 | - Gianfar Ethernet Driver. | 88 | - Gianfar Ethernet Driver. |
89 | ieee802154.txt | 89 | ieee802154.txt |
90 | - Linux IEEE 802.15.4 implementation, API and drivers | 90 | - Linux IEEE 802.15.4 implementation, API and drivers |
91 | ifenslave.c | ||
92 | - Configure network interfaces for parallel routing (bonding). | ||
93 | igb.txt | 91 | igb.txt |
94 | - README for the Intel Gigabit Ethernet Driver (igb). | 92 | - README for the Intel Gigabit Ethernet Driver (igb). |
95 | igbvf.txt | 93 | igbvf.txt |
diff --git a/Documentation/networking/Makefile b/Documentation/networking/Makefile index 24c308dd3fd1..0aa1ac98fc2b 100644 --- a/Documentation/networking/Makefile +++ b/Documentation/networking/Makefile | |||
@@ -1,11 +1,6 @@ | |||
1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. | 1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. |
2 | obj- := dummy.o | 2 | obj- := dummy.o |
3 | 3 | ||
4 | # List of programs to build | ||
5 | hostprogs-y := ifenslave | ||
6 | |||
7 | HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include | ||
8 | |||
9 | # Tell kbuild to always build the programs | 4 | # Tell kbuild to always build the programs |
10 | always := $(hostprogs-y) | 5 | always := $(hostprogs-y) |
11 | 6 | ||
diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt index 9ff579502151..aff97f47c05c 100644 --- a/Documentation/networking/arcnet.txt +++ b/Documentation/networking/arcnet.txt | |||
@@ -70,9 +70,10 @@ list, mail to linux-arcnet@tichy.ch.uj.edu.pl. | |||
70 | There are archives of the mailing list at: | 70 | There are archives of the mailing list at: |
71 | http://epistolary.org/mailman/listinfo.cgi/arcnet | 71 | http://epistolary.org/mailman/listinfo.cgi/arcnet |
72 | 72 | ||
73 | The people on linux-net@vger.kernel.org have also been known to be very | 73 | The people on linux-net@vger.kernel.org (now defunct, replaced by |
74 | helpful, especially when we're talking about ALPHA Linux kernels that may or | 74 | netdev@vger.kernel.org) have also been known to be very helpful, especially |
75 | may not work right in the first place. | 75 | when we're talking about ALPHA Linux kernels that may or may not work right |
76 | in the first place. | ||
76 | 77 | ||
77 | 78 | ||
78 | Other Drivers and Info | 79 | Other Drivers and Info |
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 10a015c384b8..87bbcfee2e06 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -104,8 +104,7 @@ Table of Contents | |||
104 | ============================== | 104 | ============================== |
105 | 105 | ||
106 | Most popular distro kernels ship with the bonding driver | 106 | Most popular distro kernels ship with the bonding driver |
107 | already available as a module and the ifenslave user level control | 107 | already available as a module. If your distro does not, or you |
108 | program installed and ready for use. If your distro does not, or you | ||
109 | have need to compile bonding from source (e.g., configuring and | 108 | have need to compile bonding from source (e.g., configuring and |
110 | installing a mainline kernel from kernel.org), you'll need to perform | 109 | installing a mainline kernel from kernel.org), you'll need to perform |
111 | the following steps: | 110 | the following steps: |
@@ -124,46 +123,13 @@ device support" section. It is recommended that you configure the | |||
124 | driver as module since it is currently the only way to pass parameters | 123 | driver as module since it is currently the only way to pass parameters |
125 | to the driver or configure more than one bonding device. | 124 | to the driver or configure more than one bonding device. |
126 | 125 | ||
127 | Build and install the new kernel and modules, then continue | 126 | Build and install the new kernel and modules. |
128 | below to install ifenslave. | ||
129 | 127 | ||
130 | 1.2 Install ifenslave Control Utility | 128 | 1.2 Bonding Control Utility |
131 | ------------------------------------- | 129 | ------------------------------------- |
132 | 130 | ||
133 | The ifenslave user level control program is included in the | 131 | It is recommended to configure bonding via iproute2 (netlink) |
134 | kernel source tree, in the file Documentation/networking/ifenslave.c. | 132 | or sysfs, the old ifenslave control utility is obsolete. |
135 | It is generally recommended that you use the ifenslave that | ||
136 | corresponds to the kernel that you are using (either from the same | ||
137 | source tree or supplied with the distro), however, ifenslave | ||
138 | executables from older kernels should function (but features newer | ||
139 | than the ifenslave release are not supported). Running an ifenslave | ||
140 | that is newer than the kernel is not supported, and may or may not | ||
141 | work. | ||
142 | |||
143 | To install ifenslave, do the following: | ||
144 | |||
145 | # gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave | ||
146 | # cp ifenslave /sbin/ifenslave | ||
147 | |||
148 | If your kernel source is not in "/usr/src/linux," then replace | ||
149 | "/usr/src/linux/include" in the above with the location of your kernel | ||
150 | source include directory. | ||
151 | |||
152 | You may wish to back up any existing /sbin/ifenslave, or, for | ||
153 | testing or informal use, tag the ifenslave to the kernel version | ||
154 | (e.g., name the ifenslave executable /sbin/ifenslave-2.6.10). | ||
155 | |||
156 | IMPORTANT NOTE: | ||
157 | |||
158 | If you omit the "-I" or specify an incorrect directory, you | ||
159 | may end up with an ifenslave that is incompatible with the kernel | ||
160 | you're trying to build it for. Some distros (e.g., Red Hat from 7.1 | ||
161 | onwards) do not have /usr/include/linux symbolically linked to the | ||
162 | default kernel source include directory. | ||
163 | |||
164 | SECOND IMPORTANT NOTE: | ||
165 | If you plan to configure bonding using sysfs or using the | ||
166 | /etc/network/interfaces file, you do not need to use ifenslave. | ||
167 | 133 | ||
168 | 2. Bonding Driver Options | 134 | 2. Bonding Driver Options |
169 | ========================= | 135 | ========================= |
@@ -337,6 +303,12 @@ arp_validate | |||
337 | such a situation, validation of backup slaves must be | 303 | such a situation, validation of backup slaves must be |
338 | disabled. | 304 | disabled. |
339 | 305 | ||
306 | The validation of ARP requests on backup slaves is mainly | ||
307 | helping bonding to decide which slaves are more likely to | ||
308 | work in case of the active slave failure, it doesn't really | ||
309 | guarantee that the backup slave will work if it's selected | ||
310 | as the next active slave. | ||
311 | |||
340 | This option is useful in network configurations in which | 312 | This option is useful in network configurations in which |
341 | multiple bonding hosts are concurrently issuing ARPs to one or | 313 | multiple bonding hosts are concurrently issuing ARPs to one or |
342 | more targets beyond a common switch. Should the link between | 314 | more targets beyond a common switch. Should the link between |
@@ -349,6 +321,25 @@ arp_validate | |||
349 | 321 | ||
350 | This option was added in bonding version 3.1.0. | 322 | This option was added in bonding version 3.1.0. |
351 | 323 | ||
324 | arp_all_targets | ||
325 | |||
326 | Specifies the quantity of arp_ip_targets that must be reachable | ||
327 | in order for the ARP monitor to consider a slave as being up. | ||
328 | This option affects only active-backup mode for slaves with | ||
329 | arp_validation enabled. | ||
330 | |||
331 | Possible values are: | ||
332 | |||
333 | any or 0 | ||
334 | |||
335 | consider the slave up only when any of the arp_ip_targets | ||
336 | is reachable | ||
337 | |||
338 | all or 1 | ||
339 | |||
340 | consider the slave up only when all of the arp_ip_targets | ||
341 | are reachable | ||
342 | |||
352 | downdelay | 343 | downdelay |
353 | 344 | ||
354 | Specifies the time, in milliseconds, to wait before disabling | 345 | Specifies the time, in milliseconds, to wait before disabling |
@@ -851,7 +842,7 @@ resend_igmp | |||
851 | ============================== | 842 | ============================== |
852 | 843 | ||
853 | You can configure bonding using either your distro's network | 844 | You can configure bonding using either your distro's network |
854 | initialization scripts, or manually using either ifenslave or the | 845 | initialization scripts, or manually using either iproute2 or the |
855 | sysfs interface. Distros generally use one of three packages for the | 846 | sysfs interface. Distros generally use one of three packages for the |
856 | network initialization scripts: initscripts, sysconfig or interfaces. | 847 | network initialization scripts: initscripts, sysconfig or interfaces. |
857 | Recent versions of these packages have support for bonding, while older | 848 | Recent versions of these packages have support for bonding, while older |
@@ -1160,7 +1151,7 @@ not support this method for specifying multiple bonding interfaces; for | |||
1160 | those instances, see the "Configuring Multiple Bonds Manually" section, | 1151 | those instances, see the "Configuring Multiple Bonds Manually" section, |
1161 | below. | 1152 | below. |
1162 | 1153 | ||
1163 | 3.3 Configuring Bonding Manually with Ifenslave | 1154 | 3.3 Configuring Bonding Manually with iproute2 |
1164 | ----------------------------------------------- | 1155 | ----------------------------------------------- |
1165 | 1156 | ||
1166 | This section applies to distros whose network initialization | 1157 | This section applies to distros whose network initialization |
@@ -1171,7 +1162,7 @@ version 8. | |||
1171 | The general method for these systems is to place the bonding | 1162 | The general method for these systems is to place the bonding |
1172 | module parameters into a config file in /etc/modprobe.d/ (as | 1163 | module parameters into a config file in /etc/modprobe.d/ (as |
1173 | appropriate for the installed distro), then add modprobe and/or | 1164 | appropriate for the installed distro), then add modprobe and/or |
1174 | ifenslave commands to the system's global init script. The name of | 1165 | `ip link` commands to the system's global init script. The name of |
1175 | the global init script differs; for sysconfig, it is | 1166 | the global init script differs; for sysconfig, it is |
1176 | /etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local. | 1167 | /etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local. |
1177 | 1168 | ||
@@ -1183,8 +1174,8 @@ reboots, edit the appropriate file (/etc/init.d/boot.local or | |||
1183 | modprobe bonding mode=balance-alb miimon=100 | 1174 | modprobe bonding mode=balance-alb miimon=100 |
1184 | modprobe e100 | 1175 | modprobe e100 |
1185 | ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up | 1176 | ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up |
1186 | ifenslave bond0 eth0 | 1177 | ip link set eth0 master bond0 |
1187 | ifenslave bond0 eth1 | 1178 | ip link set eth1 master bond0 |
1188 | 1179 | ||
1189 | Replace the example bonding module parameters and bond0 | 1180 | Replace the example bonding module parameters and bond0 |
1190 | network configuration (IP address, netmask, etc) with the appropriate | 1181 | network configuration (IP address, netmask, etc) with the appropriate |
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt index 67a9cb259d40..09eb57329f11 100644 --- a/Documentation/networking/ieee802154.txt +++ b/Documentation/networking/ieee802154.txt | |||
@@ -5,7 +5,7 @@ | |||
5 | Introduction | 5 | Introduction |
6 | ============ | 6 | ============ |
7 | The IEEE 802.15.4 working group focuses on standartization of bottom | 7 | The IEEE 802.15.4 working group focuses on standartization of bottom |
8 | two layers: Medium Accsess Control (MAC) and Physical (PHY). And there | 8 | two layers: Medium Access Control (MAC) and Physical (PHY). And there |
9 | are mainly two options available for upper layers: | 9 | are mainly two options available for upper layers: |
10 | - ZigBee - proprietary protocol from ZigBee Alliance | 10 | - ZigBee - proprietary protocol from ZigBee Alliance |
11 | - 6LowPAN - IPv6 networking over low rate personal area networks | 11 | - 6LowPAN - IPv6 networking over low rate personal area networks |
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c deleted file mode 100644 index ac5debb2f16c..000000000000 --- a/Documentation/networking/ifenslave.c +++ /dev/null | |||
@@ -1,1105 +0,0 @@ | |||
1 | /* Mode: C; | ||
2 | * ifenslave.c: Configure network interfaces for parallel routing. | ||
3 | * | ||
4 | * This program controls the Linux implementation of running multiple | ||
5 | * network interfaces in parallel. | ||
6 | * | ||
7 | * Author: Donald Becker <becker@cesdis.gsfc.nasa.gov> | ||
8 | * Copyright 1994-1996 Donald Becker | ||
9 | * | ||
10 | * This program is free software; you can redistribute it | ||
11 | * and/or modify it under the terms of the GNU General Public | ||
12 | * License as published by the Free Software Foundation. | ||
13 | * | ||
14 | * The author may be reached as becker@CESDIS.gsfc.nasa.gov, or C/O | ||
15 | * Center of Excellence in Space Data and Information Sciences | ||
16 | * Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771 | ||
17 | * | ||
18 | * Changes : | ||
19 | * - 2000/10/02 Willy Tarreau <willy at meta-x.org> : | ||
20 | * - few fixes. Master's MAC address is now correctly taken from | ||
21 | * the first device when not previously set ; | ||
22 | * - detach support : call BOND_RELEASE to detach an enslaved interface. | ||
23 | * - give a mini-howto from command-line help : # ifenslave -h | ||
24 | * | ||
25 | * - 2001/02/16 Chad N. Tindel <ctindel at ieee dot org> : | ||
26 | * - Master is now brought down before setting the MAC address. In | ||
27 | * the 2.4 kernel you can't change the MAC address while the device is | ||
28 | * up because you get EBUSY. | ||
29 | * | ||
30 | * - 2001/09/13 Takao Indoh <indou dot takao at jp dot fujitsu dot com> | ||
31 | * - Added the ability to change the active interface on a mode 1 bond | ||
32 | * at runtime. | ||
33 | * | ||
34 | * - 2001/10/23 Chad N. Tindel <ctindel at ieee dot org> : | ||
35 | * - No longer set the MAC address of the master. The bond device will | ||
36 | * take care of this itself | ||
37 | * - Try the SIOC*** versions of the bonding ioctls before using the | ||
38 | * old versions | ||
39 | * - 2002/02/18 Erik Habbinga <erik_habbinga @ hp dot com> : | ||
40 | * - ifr2.ifr_flags was not initialized in the hwaddr_notset case, | ||
41 | * SIOCGIFFLAGS now called before hwaddr_notset test | ||
42 | * | ||
43 | * - 2002/10/31 Tony Cureington <tony.cureington * hp_com> : | ||
44 | * - If the master does not have a hardware address when the first slave | ||
45 | * is enslaved, the master is assigned the hardware address of that | ||
46 | * slave - there is a comment in bonding.c stating "ifenslave takes | ||
47 | * care of this now." This corrects the problem of slaves having | ||
48 | * different hardware addresses in active-backup mode when | ||
49 | * multiple interfaces are specified on a single ifenslave command | ||
50 | * (ifenslave bond0 eth0 eth1). | ||
51 | * | ||
52 | * - 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and | ||
53 | * Shmulik Hen <shmulik.hen at intel dot com> | ||
54 | * - Moved setting the slave's mac address and openning it, from | ||
55 | * the application to the driver. This enables support of modes | ||
56 | * that need to use the unique mac address of each slave. | ||
57 | * The driver also takes care of closing the slave and restoring its | ||
58 | * original mac address upon release. | ||
59 | * In addition, block possibility of enslaving before the master is up. | ||
60 | * This prevents putting the system in an undefined state. | ||
61 | * | ||
62 | * - 2003/05/01 - Amir Noam <amir.noam at intel dot com> | ||
63 | * - Added ABI version control to restore compatibility between | ||
64 | * new/old ifenslave and new/old bonding. | ||
65 | * - Prevent adding an adapter that is already a slave. | ||
66 | * Fixes the problem of stalling the transmission and leaving | ||
67 | * the slave in a down state. | ||
68 | * | ||
69 | * - 2003/05/01 - Shmulik Hen <shmulik.hen at intel dot com> | ||
70 | * - Prevent enslaving if the bond device is down. | ||
71 | * Fixes the problem of leaving the system in unstable state and | ||
72 | * halting when trying to remove the module. | ||
73 | * - Close socket on all abnormal exists. | ||
74 | * - Add versioning scheme that follows that of the bonding driver. | ||
75 | * current version is 1.0.0 as a base line. | ||
76 | * | ||
77 | * - 2003/05/22 - Jay Vosburgh <fubar at us dot ibm dot com> | ||
78 | * - ifenslave -c was broken; it's now fixed | ||
79 | * - Fixed problem with routes vanishing from master during enslave | ||
80 | * processing. | ||
81 | * | ||
82 | * - 2003/05/27 - Amir Noam <amir.noam at intel dot com> | ||
83 | * - Fix backward compatibility issues: | ||
84 | * For drivers not using ABI versions, slave was set down while | ||
85 | * it should be left up before enslaving. | ||
86 | * Also, master was not set down and the default set_mac_address() | ||
87 | * would fail and generate an error message in the system log. | ||
88 | * - For opt_c: slave should not be set to the master's setting | ||
89 | * while it is running. It was already set during enslave. To | ||
90 | * simplify things, it is now handled separately. | ||
91 | * | ||
92 | * - 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com> | ||
93 | * - Code cleanup and style changes | ||
94 | * set version to 1.1.0 | ||
95 | */ | ||
96 | |||
97 | #define APP_VERSION "1.1.0" | ||
98 | #define APP_RELDATE "December 1, 2003" | ||
99 | #define APP_NAME "ifenslave" | ||
100 | |||
101 | static char *version = | ||
102 | APP_NAME ".c:v" APP_VERSION " (" APP_RELDATE ")\n" | ||
103 | "o Donald Becker (becker@cesdis.gsfc.nasa.gov).\n" | ||
104 | "o Detach support added on 2000/10/02 by Willy Tarreau (willy at meta-x.org).\n" | ||
105 | "o 2.4 kernel support added on 2001/02/16 by Chad N. Tindel\n" | ||
106 | " (ctindel at ieee dot org).\n"; | ||
107 | |||
108 | static const char *usage_msg = | ||
109 | "Usage: ifenslave [-f] <master-if> <slave-if> [<slave-if>...]\n" | ||
110 | " ifenslave -d <master-if> <slave-if> [<slave-if>...]\n" | ||
111 | " ifenslave -c <master-if> <slave-if>\n" | ||
112 | " ifenslave --help\n"; | ||
113 | |||
114 | static const char *help_msg = | ||
115 | "\n" | ||
116 | " To create a bond device, simply follow these three steps :\n" | ||
117 | " - ensure that the required drivers are properly loaded :\n" | ||
118 | " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" | ||
119 | " - assign an IP address to the bond device :\n" | ||
120 | " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" | ||
121 | " - attach all the interfaces you need to the bond device :\n" | ||
122 | " # ifenslave [{-f|--force}] bond0 eth0 [eth1 [eth2]...]\n" | ||
123 | " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" | ||
124 | " interfaces attached AFTER this assignment will get the same MAC addr.\n" | ||
125 | " (except for ALB/TLB modes)\n" | ||
126 | "\n" | ||
127 | " To set the bond device down and automatically release all the slaves :\n" | ||
128 | " # ifconfig bond0 down\n" | ||
129 | "\n" | ||
130 | " To detach a dead interface without setting the bond device down :\n" | ||
131 | " # ifenslave {-d|--detach} bond0 eth0 [eth1 [eth2]...]\n" | ||
132 | "\n" | ||
133 | " To change active slave :\n" | ||
134 | " # ifenslave {-c|--change-active} bond0 eth0\n" | ||
135 | "\n" | ||
136 | " To show master interface info\n" | ||
137 | " # ifenslave bond0\n" | ||
138 | "\n" | ||
139 | " To show all interfaces info\n" | ||
140 | " # ifenslave {-a|--all-interfaces}\n" | ||
141 | "\n" | ||
142 | " To be more verbose\n" | ||
143 | " # ifenslave {-v|--verbose} ...\n" | ||
144 | "\n" | ||
145 | " # ifenslave {-u|--usage} Show usage\n" | ||
146 | " # ifenslave {-V|--version} Show version\n" | ||
147 | " # ifenslave {-h|--help} This message\n" | ||
148 | "\n"; | ||
149 | |||
150 | #include <unistd.h> | ||
151 | #include <stdlib.h> | ||
152 | #include <stdio.h> | ||
153 | #include <ctype.h> | ||
154 | #include <string.h> | ||
155 | #include <errno.h> | ||
156 | #include <fcntl.h> | ||
157 | #include <getopt.h> | ||
158 | #include <sys/types.h> | ||
159 | #include <sys/socket.h> | ||
160 | #include <sys/ioctl.h> | ||
161 | #include <linux/if.h> | ||
162 | #include <net/if_arp.h> | ||
163 | #include <linux/if_ether.h> | ||
164 | #include <linux/if_bonding.h> | ||
165 | #include <linux/sockios.h> | ||
166 | |||
167 | typedef unsigned long long u64; /* hack, so we may include kernel's ethtool.h */ | ||
168 | typedef __uint32_t u32; /* ditto */ | ||
169 | typedef __uint16_t u16; /* ditto */ | ||
170 | typedef __uint8_t u8; /* ditto */ | ||
171 | #include <linux/ethtool.h> | ||
172 | |||
173 | struct option longopts[] = { | ||
174 | /* { name has_arg *flag val } */ | ||
175 | {"all-interfaces", 0, 0, 'a'}, /* Show all interfaces. */ | ||
176 | {"change-active", 0, 0, 'c'}, /* Change the active slave. */ | ||
177 | {"detach", 0, 0, 'd'}, /* Detach a slave interface. */ | ||
178 | {"force", 0, 0, 'f'}, /* Force the operation. */ | ||
179 | {"help", 0, 0, 'h'}, /* Give help */ | ||
180 | {"usage", 0, 0, 'u'}, /* Give usage */ | ||
181 | {"verbose", 0, 0, 'v'}, /* Report each action taken. */ | ||
182 | {"version", 0, 0, 'V'}, /* Emit version information. */ | ||
183 | { 0, 0, 0, 0} | ||
184 | }; | ||
185 | |||
186 | /* Command-line flags. */ | ||
187 | unsigned int | ||
188 | opt_a = 0, /* Show-all-interfaces flag. */ | ||
189 | opt_c = 0, /* Change-active-slave flag. */ | ||
190 | opt_d = 0, /* Detach a slave interface. */ | ||
191 | opt_f = 0, /* Force the operation. */ | ||
192 | opt_h = 0, /* Help */ | ||
193 | opt_u = 0, /* Usage */ | ||
194 | opt_v = 0, /* Verbose flag. */ | ||
195 | opt_V = 0; /* Version */ | ||
196 | |||
197 | int skfd = -1; /* AF_INET socket for ioctl() calls.*/ | ||
198 | int abi_ver = 0; /* userland - kernel ABI version */ | ||
199 | int hwaddr_set = 0; /* Master's hwaddr is set */ | ||
200 | int saved_errno; | ||
201 | |||
202 | struct ifreq master_mtu, master_flags, master_hwaddr; | ||
203 | struct ifreq slave_mtu, slave_flags, slave_hwaddr; | ||
204 | |||
205 | struct dev_ifr { | ||
206 | struct ifreq *req_ifr; | ||
207 | char *req_name; | ||
208 | int req_type; | ||
209 | }; | ||
210 | |||
211 | struct dev_ifr master_ifra[] = { | ||
212 | {&master_mtu, "SIOCGIFMTU", SIOCGIFMTU}, | ||
213 | {&master_flags, "SIOCGIFFLAGS", SIOCGIFFLAGS}, | ||
214 | {&master_hwaddr, "SIOCGIFHWADDR", SIOCGIFHWADDR}, | ||
215 | {NULL, "", 0} | ||
216 | }; | ||
217 | |||
218 | struct dev_ifr slave_ifra[] = { | ||
219 | {&slave_mtu, "SIOCGIFMTU", SIOCGIFMTU}, | ||
220 | {&slave_flags, "SIOCGIFFLAGS", SIOCGIFFLAGS}, | ||
221 | {&slave_hwaddr, "SIOCGIFHWADDR", SIOCGIFHWADDR}, | ||
222 | {NULL, "", 0} | ||
223 | }; | ||
224 | |||
225 | static void if_print(char *ifname); | ||
226 | static int get_drv_info(char *master_ifname); | ||
227 | static int get_if_settings(char *ifname, struct dev_ifr ifra[]); | ||
228 | static int get_slave_flags(char *slave_ifname); | ||
229 | static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr); | ||
230 | static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr); | ||
231 | static int set_slave_mtu(char *slave_ifname, int mtu); | ||
232 | static int set_if_flags(char *ifname, short flags); | ||
233 | static int set_if_up(char *ifname, short flags); | ||
234 | static int set_if_down(char *ifname, short flags); | ||
235 | static int clear_if_addr(char *ifname); | ||
236 | static int set_if_addr(char *master_ifname, char *slave_ifname); | ||
237 | static int change_active(char *master_ifname, char *slave_ifname); | ||
238 | static int enslave(char *master_ifname, char *slave_ifname); | ||
239 | static int release(char *master_ifname, char *slave_ifname); | ||
240 | #define v_print(fmt, args...) \ | ||
241 | if (opt_v) \ | ||
242 | fprintf(stderr, fmt, ## args ) | ||
243 | |||
244 | int main(int argc, char *argv[]) | ||
245 | { | ||
246 | char **spp, *master_ifname, *slave_ifname; | ||
247 | int c, i, rv; | ||
248 | int res = 0; | ||
249 | int exclusive = 0; | ||
250 | |||
251 | while ((c = getopt_long(argc, argv, "acdfhuvV", longopts, 0)) != EOF) { | ||
252 | switch (c) { | ||
253 | case 'a': opt_a++; exclusive++; break; | ||
254 | case 'c': opt_c++; exclusive++; break; | ||
255 | case 'd': opt_d++; exclusive++; break; | ||
256 | case 'f': opt_f++; exclusive++; break; | ||
257 | case 'h': opt_h++; exclusive++; break; | ||
258 | case 'u': opt_u++; exclusive++; break; | ||
259 | case 'v': opt_v++; break; | ||
260 | case 'V': opt_V++; exclusive++; break; | ||
261 | |||
262 | case '?': | ||
263 | fprintf(stderr, "%s", usage_msg); | ||
264 | res = 2; | ||
265 | goto out; | ||
266 | } | ||
267 | } | ||
268 | |||
269 | /* options check */ | ||
270 | if (exclusive > 1) { | ||
271 | fprintf(stderr, "%s", usage_msg); | ||
272 | res = 2; | ||
273 | goto out; | ||
274 | } | ||
275 | |||
276 | if (opt_v || opt_V) { | ||
277 | printf("%s", version); | ||
278 | if (opt_V) { | ||
279 | res = 0; | ||
280 | goto out; | ||
281 | } | ||
282 | } | ||
283 | |||
284 | if (opt_u) { | ||
285 | printf("%s", usage_msg); | ||
286 | res = 0; | ||
287 | goto out; | ||
288 | } | ||
289 | |||
290 | if (opt_h) { | ||
291 | printf("%s", usage_msg); | ||
292 | printf("%s", help_msg); | ||
293 | res = 0; | ||
294 | goto out; | ||
295 | } | ||
296 | |||
297 | /* Open a basic socket */ | ||
298 | if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { | ||
299 | perror("socket"); | ||
300 | res = 1; | ||
301 | goto out; | ||
302 | } | ||
303 | |||
304 | if (opt_a) { | ||
305 | if (optind == argc) { | ||
306 | /* No remaining args */ | ||
307 | /* show all interfaces */ | ||
308 | if_print((char *)NULL); | ||
309 | goto out; | ||
310 | } else { | ||
311 | /* Just show usage */ | ||
312 | fprintf(stderr, "%s", usage_msg); | ||
313 | res = 2; | ||
314 | goto out; | ||
315 | } | ||
316 | } | ||
317 | |||
318 | /* Copy the interface name */ | ||
319 | spp = argv + optind; | ||
320 | master_ifname = *spp++; | ||
321 | |||
322 | if (master_ifname == NULL) { | ||
323 | fprintf(stderr, "%s", usage_msg); | ||
324 | res = 2; | ||
325 | goto out; | ||
326 | } | ||
327 | |||
328 | /* exchange abi version with bonding module */ | ||
329 | res = get_drv_info(master_ifname); | ||
330 | if (res) { | ||
331 | fprintf(stderr, | ||
332 | "Master '%s': Error: handshake with driver failed. " | ||
333 | "Aborting\n", | ||
334 | master_ifname); | ||
335 | goto out; | ||
336 | } | ||
337 | |||
338 | slave_ifname = *spp++; | ||
339 | |||
340 | if (slave_ifname == NULL) { | ||
341 | if (opt_d || opt_c) { | ||
342 | fprintf(stderr, "%s", usage_msg); | ||
343 | res = 2; | ||
344 | goto out; | ||
345 | } | ||
346 | |||
347 | /* A single arg means show the | ||
348 | * configuration for this interface | ||
349 | */ | ||
350 | if_print(master_ifname); | ||
351 | goto out; | ||
352 | } | ||
353 | |||
354 | res = get_if_settings(master_ifname, master_ifra); | ||
355 | if (res) { | ||
356 | /* Probably a good reason not to go on */ | ||
357 | fprintf(stderr, | ||
358 | "Master '%s': Error: get settings failed: %s. " | ||
359 | "Aborting\n", | ||
360 | master_ifname, strerror(res)); | ||
361 | goto out; | ||
362 | } | ||
363 | |||
364 | /* check if master is indeed a master; | ||
365 | * if not then fail any operation | ||
366 | */ | ||
367 | if (!(master_flags.ifr_flags & IFF_MASTER)) { | ||
368 | fprintf(stderr, | ||
369 | "Illegal operation; the specified interface '%s' " | ||
370 | "is not a master. Aborting\n", | ||
371 | master_ifname); | ||
372 | res = 1; | ||
373 | goto out; | ||
374 | } | ||
375 | |||
376 | /* check if master is up; if not then fail any operation */ | ||
377 | if (!(master_flags.ifr_flags & IFF_UP)) { | ||
378 | fprintf(stderr, | ||
379 | "Illegal operation; the specified master interface " | ||
380 | "'%s' is not up.\n", | ||
381 | master_ifname); | ||
382 | res = 1; | ||
383 | goto out; | ||
384 | } | ||
385 | |||
386 | /* Only for enslaving */ | ||
387 | if (!opt_c && !opt_d) { | ||
388 | sa_family_t master_family = master_hwaddr.ifr_hwaddr.sa_family; | ||
389 | unsigned char *hwaddr = | ||
390 | (unsigned char *)master_hwaddr.ifr_hwaddr.sa_data; | ||
391 | |||
392 | /* The family '1' is ARPHRD_ETHER for ethernet. */ | ||
393 | if (master_family != 1 && !opt_f) { | ||
394 | fprintf(stderr, | ||
395 | "Illegal operation: The specified master " | ||
396 | "interface '%s' is not ethernet-like.\n " | ||
397 | "This program is designed to work with " | ||
398 | "ethernet-like network interfaces.\n " | ||
399 | "Use the '-f' option to force the " | ||
400 | "operation.\n", | ||
401 | master_ifname); | ||
402 | res = 1; | ||
403 | goto out; | ||
404 | } | ||
405 | |||
406 | /* Check master's hw addr */ | ||
407 | for (i = 0; i < 6; i++) { | ||
408 | if (hwaddr[i] != 0) { | ||
409 | hwaddr_set = 1; | ||
410 | break; | ||
411 | } | ||
412 | } | ||
413 | |||
414 | if (hwaddr_set) { | ||
415 | v_print("current hardware address of master '%s' " | ||
416 | "is %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, " | ||
417 | "type %d\n", | ||
418 | master_ifname, | ||
419 | hwaddr[0], hwaddr[1], | ||
420 | hwaddr[2], hwaddr[3], | ||
421 | hwaddr[4], hwaddr[5], | ||
422 | master_family); | ||
423 | } | ||
424 | } | ||
425 | |||
426 | /* Accepts only one slave */ | ||
427 | if (opt_c) { | ||
428 | /* change active slave */ | ||
429 | res = get_slave_flags(slave_ifname); | ||
430 | if (res) { | ||
431 | fprintf(stderr, | ||
432 | "Slave '%s': Error: get flags failed. " | ||
433 | "Aborting\n", | ||
434 | slave_ifname); | ||
435 | goto out; | ||
436 | } | ||
437 | res = change_active(master_ifname, slave_ifname); | ||
438 | if (res) { | ||
439 | fprintf(stderr, | ||
440 | "Master '%s', Slave '%s': Error: " | ||
441 | "Change active failed\n", | ||
442 | master_ifname, slave_ifname); | ||
443 | } | ||
444 | } else { | ||
445 | /* Accept multiple slaves */ | ||
446 | do { | ||
447 | if (opt_d) { | ||
448 | /* detach a slave interface from the master */ | ||
449 | rv = get_slave_flags(slave_ifname); | ||
450 | if (rv) { | ||
451 | /* Can't work with this slave. */ | ||
452 | /* remember the error and skip it*/ | ||
453 | fprintf(stderr, | ||
454 | "Slave '%s': Error: get flags " | ||
455 | "failed. Skipping\n", | ||
456 | slave_ifname); | ||
457 | res = rv; | ||
458 | continue; | ||
459 | } | ||
460 | rv = release(master_ifname, slave_ifname); | ||
461 | if (rv) { | ||
462 | fprintf(stderr, | ||
463 | "Master '%s', Slave '%s': Error: " | ||
464 | "Release failed\n", | ||
465 | master_ifname, slave_ifname); | ||
466 | res = rv; | ||
467 | } | ||
468 | } else { | ||
469 | /* attach a slave interface to the master */ | ||
470 | rv = get_if_settings(slave_ifname, slave_ifra); | ||
471 | if (rv) { | ||
472 | /* Can't work with this slave. */ | ||
473 | /* remember the error and skip it*/ | ||
474 | fprintf(stderr, | ||
475 | "Slave '%s': Error: get " | ||
476 | "settings failed: %s. " | ||
477 | "Skipping\n", | ||
478 | slave_ifname, strerror(rv)); | ||
479 | res = rv; | ||
480 | continue; | ||
481 | } | ||
482 | rv = enslave(master_ifname, slave_ifname); | ||
483 | if (rv) { | ||
484 | fprintf(stderr, | ||
485 | "Master '%s', Slave '%s': Error: " | ||
486 | "Enslave failed\n", | ||
487 | master_ifname, slave_ifname); | ||
488 | res = rv; | ||
489 | } | ||
490 | } | ||
491 | } while ((slave_ifname = *spp++) != NULL); | ||
492 | } | ||
493 | |||
494 | out: | ||
495 | if (skfd >= 0) { | ||
496 | close(skfd); | ||
497 | } | ||
498 | |||
499 | return res; | ||
500 | } | ||
501 | |||
502 | static short mif_flags; | ||
503 | |||
504 | /* Get the inteface configuration from the kernel. */ | ||
505 | static int if_getconfig(char *ifname) | ||
506 | { | ||
507 | struct ifreq ifr; | ||
508 | int metric, mtu; /* Parameters of the master interface. */ | ||
509 | struct sockaddr dstaddr, broadaddr, netmask; | ||
510 | unsigned char *hwaddr; | ||
511 | |||
512 | strcpy(ifr.ifr_name, ifname); | ||
513 | if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) | ||
514 | return -1; | ||
515 | mif_flags = ifr.ifr_flags; | ||
516 | printf("The result of SIOCGIFFLAGS on %s is %x.\n", | ||
517 | ifname, ifr.ifr_flags); | ||
518 | |||
519 | strcpy(ifr.ifr_name, ifname); | ||
520 | if (ioctl(skfd, SIOCGIFADDR, &ifr) < 0) | ||
521 | return -1; | ||
522 | printf("The result of SIOCGIFADDR is %2.2x.%2.2x.%2.2x.%2.2x.\n", | ||
523 | ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1], | ||
524 | ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]); | ||
525 | |||
526 | strcpy(ifr.ifr_name, ifname); | ||
527 | if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) | ||
528 | return -1; | ||
529 | |||
530 | /* Gotta convert from 'char' to unsigned for printf(). */ | ||
531 | hwaddr = (unsigned char *)ifr.ifr_hwaddr.sa_data; | ||
532 | printf("The result of SIOCGIFHWADDR is type %d " | ||
533 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", | ||
534 | ifr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], | ||
535 | hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); | ||
536 | |||
537 | strcpy(ifr.ifr_name, ifname); | ||
538 | if (ioctl(skfd, SIOCGIFMETRIC, &ifr) < 0) { | ||
539 | metric = 0; | ||
540 | } else | ||
541 | metric = ifr.ifr_metric; | ||
542 | printf("The result of SIOCGIFMETRIC is %d\n", metric); | ||
543 | |||
544 | strcpy(ifr.ifr_name, ifname); | ||
545 | if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0) | ||
546 | mtu = 0; | ||
547 | else | ||
548 | mtu = ifr.ifr_mtu; | ||
549 | printf("The result of SIOCGIFMTU is %d\n", mtu); | ||
550 | |||
551 | strcpy(ifr.ifr_name, ifname); | ||
552 | if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) { | ||
553 | memset(&dstaddr, 0, sizeof(struct sockaddr)); | ||
554 | } else | ||
555 | dstaddr = ifr.ifr_dstaddr; | ||
556 | |||
557 | strcpy(ifr.ifr_name, ifname); | ||
558 | if (ioctl(skfd, SIOCGIFBRDADDR, &ifr) < 0) { | ||
559 | memset(&broadaddr, 0, sizeof(struct sockaddr)); | ||
560 | } else | ||
561 | broadaddr = ifr.ifr_broadaddr; | ||
562 | |||
563 | strcpy(ifr.ifr_name, ifname); | ||
564 | if (ioctl(skfd, SIOCGIFNETMASK, &ifr) < 0) { | ||
565 | memset(&netmask, 0, sizeof(struct sockaddr)); | ||
566 | } else | ||
567 | netmask = ifr.ifr_netmask; | ||
568 | |||
569 | return 0; | ||
570 | } | ||
571 | |||
572 | static void if_print(char *ifname) | ||
573 | { | ||
574 | char buff[1024]; | ||
575 | struct ifconf ifc; | ||
576 | struct ifreq *ifr; | ||
577 | int i; | ||
578 | |||
579 | if (ifname == (char *)NULL) { | ||
580 | ifc.ifc_len = sizeof(buff); | ||
581 | ifc.ifc_buf = buff; | ||
582 | if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) { | ||
583 | perror("SIOCGIFCONF failed"); | ||
584 | return; | ||
585 | } | ||
586 | |||
587 | ifr = ifc.ifc_req; | ||
588 | for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) { | ||
589 | if (if_getconfig(ifr->ifr_name) < 0) { | ||
590 | fprintf(stderr, | ||
591 | "%s: unknown interface.\n", | ||
592 | ifr->ifr_name); | ||
593 | continue; | ||
594 | } | ||
595 | |||
596 | if (((mif_flags & IFF_UP) == 0) && !opt_a) continue; | ||
597 | /*ife_print(&ife);*/ | ||
598 | } | ||
599 | } else { | ||
600 | if (if_getconfig(ifname) < 0) { | ||
601 | fprintf(stderr, | ||
602 | "%s: unknown interface.\n", ifname); | ||
603 | } | ||
604 | } | ||
605 | } | ||
606 | |||
607 | static int get_drv_info(char *master_ifname) | ||
608 | { | ||
609 | struct ifreq ifr; | ||
610 | struct ethtool_drvinfo info; | ||
611 | char *endptr; | ||
612 | |||
613 | memset(&ifr, 0, sizeof(ifr)); | ||
614 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
615 | ifr.ifr_data = (caddr_t)&info; | ||
616 | |||
617 | info.cmd = ETHTOOL_GDRVINFO; | ||
618 | strncpy(info.driver, "ifenslave", 32); | ||
619 | snprintf(info.fw_version, 32, "%d", BOND_ABI_VERSION); | ||
620 | |||
621 | if (ioctl(skfd, SIOCETHTOOL, &ifr) < 0) { | ||
622 | if (errno == EOPNOTSUPP) { | ||
623 | goto out; | ||
624 | } | ||
625 | |||
626 | saved_errno = errno; | ||
627 | v_print("Master '%s': Error: get bonding info failed %s\n", | ||
628 | master_ifname, strerror(saved_errno)); | ||
629 | return 1; | ||
630 | } | ||
631 | |||
632 | abi_ver = strtoul(info.fw_version, &endptr, 0); | ||
633 | if (*endptr) { | ||
634 | v_print("Master '%s': Error: got invalid string as an ABI " | ||
635 | "version from the bonding module\n", | ||
636 | master_ifname); | ||
637 | return 1; | ||
638 | } | ||
639 | |||
640 | out: | ||
641 | v_print("ABI ver is %d\n", abi_ver); | ||
642 | |||
643 | return 0; | ||
644 | } | ||
645 | |||
646 | static int change_active(char *master_ifname, char *slave_ifname) | ||
647 | { | ||
648 | struct ifreq ifr; | ||
649 | int res = 0; | ||
650 | |||
651 | if (!(slave_flags.ifr_flags & IFF_SLAVE)) { | ||
652 | fprintf(stderr, | ||
653 | "Illegal operation: The specified slave interface " | ||
654 | "'%s' is not a slave\n", | ||
655 | slave_ifname); | ||
656 | return 1; | ||
657 | } | ||
658 | |||
659 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
660 | strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ); | ||
661 | if ((ioctl(skfd, SIOCBONDCHANGEACTIVE, &ifr) < 0) && | ||
662 | (ioctl(skfd, BOND_CHANGE_ACTIVE_OLD, &ifr) < 0)) { | ||
663 | saved_errno = errno; | ||
664 | v_print("Master '%s': Error: SIOCBONDCHANGEACTIVE failed: " | ||
665 | "%s\n", | ||
666 | master_ifname, strerror(saved_errno)); | ||
667 | res = 1; | ||
668 | } | ||
669 | |||
670 | return res; | ||
671 | } | ||
672 | |||
673 | static int enslave(char *master_ifname, char *slave_ifname) | ||
674 | { | ||
675 | struct ifreq ifr; | ||
676 | int res = 0; | ||
677 | |||
678 | if (slave_flags.ifr_flags & IFF_SLAVE) { | ||
679 | fprintf(stderr, | ||
680 | "Illegal operation: The specified slave interface " | ||
681 | "'%s' is already a slave\n", | ||
682 | slave_ifname); | ||
683 | return 1; | ||
684 | } | ||
685 | |||
686 | res = set_if_down(slave_ifname, slave_flags.ifr_flags); | ||
687 | if (res) { | ||
688 | fprintf(stderr, | ||
689 | "Slave '%s': Error: bring interface down failed\n", | ||
690 | slave_ifname); | ||
691 | return res; | ||
692 | } | ||
693 | |||
694 | if (abi_ver < 2) { | ||
695 | /* Older bonding versions would panic if the slave has no IP | ||
696 | * address, so get the IP setting from the master. | ||
697 | */ | ||
698 | set_if_addr(master_ifname, slave_ifname); | ||
699 | } else { | ||
700 | res = clear_if_addr(slave_ifname); | ||
701 | if (res) { | ||
702 | fprintf(stderr, | ||
703 | "Slave '%s': Error: clear address failed\n", | ||
704 | slave_ifname); | ||
705 | return res; | ||
706 | } | ||
707 | } | ||
708 | |||
709 | if (master_mtu.ifr_mtu != slave_mtu.ifr_mtu) { | ||
710 | res = set_slave_mtu(slave_ifname, master_mtu.ifr_mtu); | ||
711 | if (res) { | ||
712 | fprintf(stderr, | ||
713 | "Slave '%s': Error: set MTU failed\n", | ||
714 | slave_ifname); | ||
715 | return res; | ||
716 | } | ||
717 | } | ||
718 | |||
719 | if (hwaddr_set) { | ||
720 | /* Master already has an hwaddr | ||
721 | * so set it's hwaddr to the slave | ||
722 | */ | ||
723 | if (abi_ver < 1) { | ||
724 | /* The driver is using an old ABI, so | ||
725 | * the application sets the slave's | ||
726 | * hwaddr | ||
727 | */ | ||
728 | res = set_slave_hwaddr(slave_ifname, | ||
729 | &(master_hwaddr.ifr_hwaddr)); | ||
730 | if (res) { | ||
731 | fprintf(stderr, | ||
732 | "Slave '%s': Error: set hw address " | ||
733 | "failed\n", | ||
734 | slave_ifname); | ||
735 | goto undo_mtu; | ||
736 | } | ||
737 | |||
738 | /* For old ABI the application needs to bring the | ||
739 | * slave back up | ||
740 | */ | ||
741 | res = set_if_up(slave_ifname, slave_flags.ifr_flags); | ||
742 | if (res) { | ||
743 | fprintf(stderr, | ||
744 | "Slave '%s': Error: bring interface " | ||
745 | "down failed\n", | ||
746 | slave_ifname); | ||
747 | goto undo_slave_mac; | ||
748 | } | ||
749 | } | ||
750 | /* The driver is using a new ABI, | ||
751 | * so the driver takes care of setting | ||
752 | * the slave's hwaddr and bringing | ||
753 | * it up again | ||
754 | */ | ||
755 | } else { | ||
756 | /* No hwaddr for master yet, so | ||
757 | * set the slave's hwaddr to it | ||
758 | */ | ||
759 | if (abi_ver < 1) { | ||
760 | /* For old ABI, the master needs to be | ||
761 | * down before setting its hwaddr | ||
762 | */ | ||
763 | res = set_if_down(master_ifname, master_flags.ifr_flags); | ||
764 | if (res) { | ||
765 | fprintf(stderr, | ||
766 | "Master '%s': Error: bring interface " | ||
767 | "down failed\n", | ||
768 | master_ifname); | ||
769 | goto undo_mtu; | ||
770 | } | ||
771 | } | ||
772 | |||
773 | res = set_master_hwaddr(master_ifname, | ||
774 | &(slave_hwaddr.ifr_hwaddr)); | ||
775 | if (res) { | ||
776 | fprintf(stderr, | ||
777 | "Master '%s': Error: set hw address " | ||
778 | "failed\n", | ||
779 | master_ifname); | ||
780 | goto undo_mtu; | ||
781 | } | ||
782 | |||
783 | if (abi_ver < 1) { | ||
784 | /* For old ABI, bring the master | ||
785 | * back up | ||
786 | */ | ||
787 | res = set_if_up(master_ifname, master_flags.ifr_flags); | ||
788 | if (res) { | ||
789 | fprintf(stderr, | ||
790 | "Master '%s': Error: bring interface " | ||
791 | "up failed\n", | ||
792 | master_ifname); | ||
793 | goto undo_master_mac; | ||
794 | } | ||
795 | } | ||
796 | |||
797 | hwaddr_set = 1; | ||
798 | } | ||
799 | |||
800 | /* Do the real thing */ | ||
801 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
802 | strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ); | ||
803 | if ((ioctl(skfd, SIOCBONDENSLAVE, &ifr) < 0) && | ||
804 | (ioctl(skfd, BOND_ENSLAVE_OLD, &ifr) < 0)) { | ||
805 | saved_errno = errno; | ||
806 | v_print("Master '%s': Error: SIOCBONDENSLAVE failed: %s\n", | ||
807 | master_ifname, strerror(saved_errno)); | ||
808 | res = 1; | ||
809 | } | ||
810 | |||
811 | if (res) { | ||
812 | goto undo_master_mac; | ||
813 | } | ||
814 | |||
815 | return 0; | ||
816 | |||
817 | /* rollback (best effort) */ | ||
818 | undo_master_mac: | ||
819 | set_master_hwaddr(master_ifname, &(master_hwaddr.ifr_hwaddr)); | ||
820 | hwaddr_set = 0; | ||
821 | goto undo_mtu; | ||
822 | undo_slave_mac: | ||
823 | set_slave_hwaddr(slave_ifname, &(slave_hwaddr.ifr_hwaddr)); | ||
824 | undo_mtu: | ||
825 | set_slave_mtu(slave_ifname, slave_mtu.ifr_mtu); | ||
826 | return res; | ||
827 | } | ||
828 | |||
829 | static int release(char *master_ifname, char *slave_ifname) | ||
830 | { | ||
831 | struct ifreq ifr; | ||
832 | int res = 0; | ||
833 | |||
834 | if (!(slave_flags.ifr_flags & IFF_SLAVE)) { | ||
835 | fprintf(stderr, | ||
836 | "Illegal operation: The specified slave interface " | ||
837 | "'%s' is not a slave\n", | ||
838 | slave_ifname); | ||
839 | return 1; | ||
840 | } | ||
841 | |||
842 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
843 | strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ); | ||
844 | if ((ioctl(skfd, SIOCBONDRELEASE, &ifr) < 0) && | ||
845 | (ioctl(skfd, BOND_RELEASE_OLD, &ifr) < 0)) { | ||
846 | saved_errno = errno; | ||
847 | v_print("Master '%s': Error: SIOCBONDRELEASE failed: %s\n", | ||
848 | master_ifname, strerror(saved_errno)); | ||
849 | return 1; | ||
850 | } else if (abi_ver < 1) { | ||
851 | /* The driver is using an old ABI, so we'll set the interface | ||
852 | * down to avoid any conflicts due to same MAC/IP | ||
853 | */ | ||
854 | res = set_if_down(slave_ifname, slave_flags.ifr_flags); | ||
855 | if (res) { | ||
856 | fprintf(stderr, | ||
857 | "Slave '%s': Error: bring interface " | ||
858 | "down failed\n", | ||
859 | slave_ifname); | ||
860 | } | ||
861 | } | ||
862 | |||
863 | /* set to default mtu */ | ||
864 | set_slave_mtu(slave_ifname, 1500); | ||
865 | |||
866 | return res; | ||
867 | } | ||
868 | |||
869 | static int get_if_settings(char *ifname, struct dev_ifr ifra[]) | ||
870 | { | ||
871 | int i; | ||
872 | int res = 0; | ||
873 | |||
874 | for (i = 0; ifra[i].req_ifr; i++) { | ||
875 | strncpy(ifra[i].req_ifr->ifr_name, ifname, IFNAMSIZ); | ||
876 | res = ioctl(skfd, ifra[i].req_type, ifra[i].req_ifr); | ||
877 | if (res < 0) { | ||
878 | saved_errno = errno; | ||
879 | v_print("Interface '%s': Error: %s failed: %s\n", | ||
880 | ifname, ifra[i].req_name, | ||
881 | strerror(saved_errno)); | ||
882 | |||
883 | return saved_errno; | ||
884 | } | ||
885 | } | ||
886 | |||
887 | return 0; | ||
888 | } | ||
889 | |||
890 | static int get_slave_flags(char *slave_ifname) | ||
891 | { | ||
892 | int res = 0; | ||
893 | |||
894 | strncpy(slave_flags.ifr_name, slave_ifname, IFNAMSIZ); | ||
895 | res = ioctl(skfd, SIOCGIFFLAGS, &slave_flags); | ||
896 | if (res < 0) { | ||
897 | saved_errno = errno; | ||
898 | v_print("Slave '%s': Error: SIOCGIFFLAGS failed: %s\n", | ||
899 | slave_ifname, strerror(saved_errno)); | ||
900 | } else { | ||
901 | v_print("Slave %s: flags %04X.\n", | ||
902 | slave_ifname, slave_flags.ifr_flags); | ||
903 | } | ||
904 | |||
905 | return res; | ||
906 | } | ||
907 | |||
908 | static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr) | ||
909 | { | ||
910 | unsigned char *addr = (unsigned char *)hwaddr->sa_data; | ||
911 | struct ifreq ifr; | ||
912 | int res = 0; | ||
913 | |||
914 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
915 | memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr)); | ||
916 | res = ioctl(skfd, SIOCSIFHWADDR, &ifr); | ||
917 | if (res < 0) { | ||
918 | saved_errno = errno; | ||
919 | v_print("Master '%s': Error: SIOCSIFHWADDR failed: %s\n", | ||
920 | master_ifname, strerror(saved_errno)); | ||
921 | return res; | ||
922 | } else { | ||
923 | v_print("Master '%s': hardware address set to " | ||
924 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", | ||
925 | master_ifname, addr[0], addr[1], addr[2], | ||
926 | addr[3], addr[4], addr[5]); | ||
927 | } | ||
928 | |||
929 | return res; | ||
930 | } | ||
931 | |||
932 | static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr) | ||
933 | { | ||
934 | unsigned char *addr = (unsigned char *)hwaddr->sa_data; | ||
935 | struct ifreq ifr; | ||
936 | int res = 0; | ||
937 | |||
938 | strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ); | ||
939 | memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr)); | ||
940 | res = ioctl(skfd, SIOCSIFHWADDR, &ifr); | ||
941 | if (res < 0) { | ||
942 | saved_errno = errno; | ||
943 | |||
944 | v_print("Slave '%s': Error: SIOCSIFHWADDR failed: %s\n", | ||
945 | slave_ifname, strerror(saved_errno)); | ||
946 | |||
947 | if (saved_errno == EBUSY) { | ||
948 | v_print(" The device is busy: it must be idle " | ||
949 | "before running this command.\n"); | ||
950 | } else if (saved_errno == EOPNOTSUPP) { | ||
951 | v_print(" The device does not support setting " | ||
952 | "the MAC address.\n" | ||
953 | " Your kernel likely does not support slave " | ||
954 | "devices.\n"); | ||
955 | } else if (saved_errno == EINVAL) { | ||
956 | v_print(" The device's address type does not match " | ||
957 | "the master's address type.\n"); | ||
958 | } | ||
959 | return res; | ||
960 | } else { | ||
961 | v_print("Slave '%s': hardware address set to " | ||
962 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", | ||
963 | slave_ifname, addr[0], addr[1], addr[2], | ||
964 | addr[3], addr[4], addr[5]); | ||
965 | } | ||
966 | |||
967 | return res; | ||
968 | } | ||
969 | |||
970 | static int set_slave_mtu(char *slave_ifname, int mtu) | ||
971 | { | ||
972 | struct ifreq ifr; | ||
973 | int res = 0; | ||
974 | |||
975 | ifr.ifr_mtu = mtu; | ||
976 | strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ); | ||
977 | |||
978 | res = ioctl(skfd, SIOCSIFMTU, &ifr); | ||
979 | if (res < 0) { | ||
980 | saved_errno = errno; | ||
981 | v_print("Slave '%s': Error: SIOCSIFMTU failed: %s\n", | ||
982 | slave_ifname, strerror(saved_errno)); | ||
983 | } else { | ||
984 | v_print("Slave '%s': MTU set to %d.\n", slave_ifname, mtu); | ||
985 | } | ||
986 | |||
987 | return res; | ||
988 | } | ||
989 | |||
990 | static int set_if_flags(char *ifname, short flags) | ||
991 | { | ||
992 | struct ifreq ifr; | ||
993 | int res = 0; | ||
994 | |||
995 | ifr.ifr_flags = flags; | ||
996 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ); | ||
997 | |||
998 | res = ioctl(skfd, SIOCSIFFLAGS, &ifr); | ||
999 | if (res < 0) { | ||
1000 | saved_errno = errno; | ||
1001 | v_print("Interface '%s': Error: SIOCSIFFLAGS failed: %s\n", | ||
1002 | ifname, strerror(saved_errno)); | ||
1003 | } else { | ||
1004 | v_print("Interface '%s': flags set to %04X.\n", ifname, flags); | ||
1005 | } | ||
1006 | |||
1007 | return res; | ||
1008 | } | ||
1009 | |||
1010 | static int set_if_up(char *ifname, short flags) | ||
1011 | { | ||
1012 | return set_if_flags(ifname, flags | IFF_UP); | ||
1013 | } | ||
1014 | |||
1015 | static int set_if_down(char *ifname, short flags) | ||
1016 | { | ||
1017 | return set_if_flags(ifname, flags & ~IFF_UP); | ||
1018 | } | ||
1019 | |||
1020 | static int clear_if_addr(char *ifname) | ||
1021 | { | ||
1022 | struct ifreq ifr; | ||
1023 | int res = 0; | ||
1024 | |||
1025 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ); | ||
1026 | ifr.ifr_addr.sa_family = AF_INET; | ||
1027 | memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data)); | ||
1028 | |||
1029 | res = ioctl(skfd, SIOCSIFADDR, &ifr); | ||
1030 | if (res < 0) { | ||
1031 | saved_errno = errno; | ||
1032 | v_print("Interface '%s': Error: SIOCSIFADDR failed: %s\n", | ||
1033 | ifname, strerror(saved_errno)); | ||
1034 | } else { | ||
1035 | v_print("Interface '%s': address cleared\n", ifname); | ||
1036 | } | ||
1037 | |||
1038 | return res; | ||
1039 | } | ||
1040 | |||
1041 | static int set_if_addr(char *master_ifname, char *slave_ifname) | ||
1042 | { | ||
1043 | struct ifreq ifr; | ||
1044 | int res; | ||
1045 | unsigned char *ipaddr; | ||
1046 | int i; | ||
1047 | struct { | ||
1048 | char *req_name; | ||
1049 | char *desc; | ||
1050 | int g_ioctl; | ||
1051 | int s_ioctl; | ||
1052 | } ifra[] = { | ||
1053 | {"IFADDR", "addr", SIOCGIFADDR, SIOCSIFADDR}, | ||
1054 | {"DSTADDR", "destination addr", SIOCGIFDSTADDR, SIOCSIFDSTADDR}, | ||
1055 | {"BRDADDR", "broadcast addr", SIOCGIFBRDADDR, SIOCSIFBRDADDR}, | ||
1056 | {"NETMASK", "netmask", SIOCGIFNETMASK, SIOCSIFNETMASK}, | ||
1057 | {NULL, NULL, 0, 0}, | ||
1058 | }; | ||
1059 | |||
1060 | for (i = 0; ifra[i].req_name; i++) { | ||
1061 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
1062 | res = ioctl(skfd, ifra[i].g_ioctl, &ifr); | ||
1063 | if (res < 0) { | ||
1064 | int saved_errno = errno; | ||
1065 | |||
1066 | v_print("Interface '%s': Error: SIOCG%s failed: %s\n", | ||
1067 | master_ifname, ifra[i].req_name, | ||
1068 | strerror(saved_errno)); | ||
1069 | |||
1070 | ifr.ifr_addr.sa_family = AF_INET; | ||
1071 | memset(ifr.ifr_addr.sa_data, 0, | ||
1072 | sizeof(ifr.ifr_addr.sa_data)); | ||
1073 | } | ||
1074 | |||
1075 | strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ); | ||
1076 | res = ioctl(skfd, ifra[i].s_ioctl, &ifr); | ||
1077 | if (res < 0) { | ||
1078 | int saved_errno = errno; | ||
1079 | |||
1080 | v_print("Interface '%s': Error: SIOCS%s failed: %s\n", | ||
1081 | slave_ifname, ifra[i].req_name, | ||
1082 | strerror(saved_errno)); | ||
1083 | |||
1084 | } | ||
1085 | |||
1086 | ipaddr = (unsigned char *)ifr.ifr_addr.sa_data; | ||
1087 | v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n", | ||
1088 | slave_ifname, ifra[i].desc, | ||
1089 | ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]); | ||
1090 | } | ||
1091 | |||
1092 | return 0; | ||
1093 | } | ||
1094 | |||
1095 | /* | ||
1096 | * Local variables: | ||
1097 | * version-control: t | ||
1098 | * kept-new-versions: 5 | ||
1099 | * c-indent-level: 4 | ||
1100 | * c-basic-offset: 4 | ||
1101 | * tab-width: 4 | ||
1102 | * compile-command: "gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave" | ||
1103 | * End: | ||
1104 | */ | ||
1105 | |||
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index f98ca633b528..10742902146f 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -183,7 +183,7 @@ tcp_early_retrans - INTEGER | |||
183 | for triggering fast retransmit when the amount of outstanding data is | 183 | for triggering fast retransmit when the amount of outstanding data is |
184 | small and when no previously unsent data can be transmitted (such | 184 | small and when no previously unsent data can be transmitted (such |
185 | that limited transmit could be used). Also controls the use of | 185 | that limited transmit could be used). Also controls the use of |
186 | Tail loss probe (TLP) that converts RTOs occuring due to tail | 186 | Tail loss probe (TLP) that converts RTOs occurring due to tail |
187 | losses into fast recovery (draft-dukkipati-tcpm-tcp-loss-probe-01). | 187 | losses into fast recovery (draft-dukkipati-tcpm-tcp-loss-probe-01). |
188 | Possible values: | 188 | Possible values: |
189 | 0 disables ER | 189 | 0 disables ER |
@@ -420,10 +420,10 @@ tcp_synack_retries - INTEGER | |||
420 | for a passive TCP connection will happen after 63seconds. | 420 | for a passive TCP connection will happen after 63seconds. |
421 | 421 | ||
422 | tcp_syncookies - BOOLEAN | 422 | tcp_syncookies - BOOLEAN |
423 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES | 423 | Only valid when the kernel was compiled with CONFIG_SYN_COOKIES |
424 | Send out syncookies when the syn backlog queue of a socket | 424 | Send out syncookies when the syn backlog queue of a socket |
425 | overflows. This is to prevent against the common 'SYN flood attack' | 425 | overflows. This is to prevent against the common 'SYN flood attack' |
426 | Default: FALSE | 426 | Default: 1 |
427 | 427 | ||
428 | Note, that syncookies is fallback facility. | 428 | Note, that syncookies is fallback facility. |
429 | It MUST NOT be used to help highly loaded servers to stand | 429 | It MUST NOT be used to help highly loaded servers to stand |
@@ -685,6 +685,15 @@ ip_dynaddr - BOOLEAN | |||
685 | occurs. | 685 | occurs. |
686 | Default: 0 | 686 | Default: 0 |
687 | 687 | ||
688 | ip_early_demux - BOOLEAN | ||
689 | Optimize input packet processing down to one demux for | ||
690 | certain kinds of local sockets. Currently we only do this | ||
691 | for established TCP sockets. | ||
692 | |||
693 | It may add an additional cost for pure routing workloads that | ||
694 | reduces overall throughput, in such case you should disable it. | ||
695 | Default: 1 | ||
696 | |||
688 | icmp_echo_ignore_all - BOOLEAN | 697 | icmp_echo_ignore_all - BOOLEAN |
689 | If set non-zero, then the kernel will ignore all ICMP ECHO | 698 | If set non-zero, then the kernel will ignore all ICMP ECHO |
690 | requests sent to it. | 699 | requests sent to it. |
@@ -729,7 +738,7 @@ icmp_ignore_bogus_error_responses - BOOLEAN | |||
729 | frames. Such violations are normally logged via a kernel warning. | 738 | frames. Such violations are normally logged via a kernel warning. |
730 | If this is set to TRUE, the kernel will not give such warnings, which | 739 | If this is set to TRUE, the kernel will not give such warnings, which |
731 | will avoid log file clutter. | 740 | will avoid log file clutter. |
732 | Default: FALSE | 741 | Default: 1 |
733 | 742 | ||
734 | icmp_errors_use_inbound_ifaddr - BOOLEAN | 743 | icmp_errors_use_inbound_ifaddr - BOOLEAN |
735 | 744 | ||
diff --git a/Documentation/networking/ipvs-sysctl.txt b/Documentation/networking/ipvs-sysctl.txt index 9573d0c48c6e..7a3c04729591 100644 --- a/Documentation/networking/ipvs-sysctl.txt +++ b/Documentation/networking/ipvs-sysctl.txt | |||
@@ -181,6 +181,19 @@ snat_reroute - BOOLEAN | |||
181 | always be the same as the original route so it is an optimisation | 181 | always be the same as the original route so it is an optimisation |
182 | to disable snat_reroute and avoid the recalculation. | 182 | to disable snat_reroute and avoid the recalculation. |
183 | 183 | ||
184 | sync_persist_mode - INTEGER | ||
185 | default 0 | ||
186 | |||
187 | Controls the synchronisation of connections when using persistence | ||
188 | |||
189 | 0: All types of connections are synchronised | ||
190 | 1: Attempt to reduce the synchronisation traffic depending on | ||
191 | the connection type. For persistent services avoid synchronisation | ||
192 | for normal connections, do it only for persistence templates. | ||
193 | In such case, for TCP and SCTP it may need enabling sloppy_tcp and | ||
194 | sloppy_sctp flags on backup servers. For non-persistent services | ||
195 | such optimization is not applied, mode 0 is assumed. | ||
196 | |||
184 | sync_version - INTEGER | 197 | sync_version - INTEGER |
185 | default 1 | 198 | default 1 |
186 | 199 | ||
diff --git a/Documentation/networking/netlink_mmap.txt b/Documentation/networking/netlink_mmap.txt index 1c2dab409625..533378839546 100644 --- a/Documentation/networking/netlink_mmap.txt +++ b/Documentation/networking/netlink_mmap.txt | |||
@@ -54,7 +54,7 @@ it will use an allocated socket buffer as usual and the contents will be | |||
54 | copied to the ring on transmission, nullifying most of the performance gains. | 54 | copied to the ring on transmission, nullifying most of the performance gains. |
55 | Dumps of kernel databases automatically support memory mapped I/O. | 55 | Dumps of kernel databases automatically support memory mapped I/O. |
56 | 56 | ||
57 | Conversion of the transmit path involves changing message contruction to | 57 | Conversion of the transmit path involves changing message construction to |
58 | use memory from the TX ring instead of (usually) a buffer declared on the | 58 | use memory from the TX ring instead of (usually) a buffer declared on the |
59 | stack and setting up the frame header approriately. Optionally poll() can | 59 | stack and setting up the frame header approriately. Optionally poll() can |
60 | be used to wait for free frames in the TX ring. | 60 | be used to wait for free frames in the TX ring. |
@@ -65,8 +65,8 @@ Structured and definitions for using memory mapped I/O are contained in | |||
65 | RX and TX rings | 65 | RX and TX rings |
66 | ---------------- | 66 | ---------------- |
67 | 67 | ||
68 | Each ring contains a number of continous memory blocks, containing frames of | 68 | Each ring contains a number of continuous memory blocks, containing frames of |
69 | fixed size dependant on the parameters used for ring setup. | 69 | fixed size dependent on the parameters used for ring setup. |
70 | 70 | ||
71 | Ring: [ block 0 ] | 71 | Ring: [ block 0 ] |
72 | [ frame 0 ] | 72 | [ frame 0 ] |
@@ -80,7 +80,7 @@ Ring: [ block 0 ] | |||
80 | [ frame 2 * n + 1 ] | 80 | [ frame 2 * n + 1 ] |
81 | 81 | ||
82 | The blocks are only visible to the kernel, from the point of view of user-space | 82 | The blocks are only visible to the kernel, from the point of view of user-space |
83 | the ring just contains the frames in a continous memory zone. | 83 | the ring just contains the frames in a continuous memory zone. |
84 | 84 | ||
85 | The ring parameters used for setting up the ring are defined as follows: | 85 | The ring parameters used for setting up the ring are defined as follows: |
86 | 86 | ||
@@ -91,7 +91,7 @@ struct nl_mmap_req { | |||
91 | unsigned int nm_frame_nr; | 91 | unsigned int nm_frame_nr; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | Frames are grouped into blocks, where each block is a continous region of memory | 94 | Frames are grouped into blocks, where each block is a continuous region of memory |
95 | and holds nm_block_size / nm_frame_size frames. The total number of frames in | 95 | and holds nm_block_size / nm_frame_size frames. The total number of frames in |
96 | the ring is nm_frame_nr. The following invariants hold: | 96 | the ring is nm_frame_nr. The following invariants hold: |
97 | 97 | ||
@@ -113,8 +113,8 @@ Some parameters are constrained, specifically: | |||
113 | 113 | ||
114 | - nm_frame_nr must equal the actual number of frames as specified above. | 114 | - nm_frame_nr must equal the actual number of frames as specified above. |
115 | 115 | ||
116 | When the kernel can't allocate phsyically continous memory for a ring block, | 116 | When the kernel can't allocate physically continuous memory for a ring block, |
117 | it will fall back to use physically discontinous memory. This might affect | 117 | it will fall back to use physically discontinuous memory. This might affect |
118 | performance negatively, in order to avoid this the nm_frame_size parameter | 118 | performance negatively, in order to avoid this the nm_frame_size parameter |
119 | should be chosen to be as small as possible for the required frame size and | 119 | should be chosen to be as small as possible for the required frame size and |
120 | the number of blocks should be increased instead. | 120 | the number of blocks should be increased instead. |
@@ -274,9 +274,9 @@ This example assumes some ring parameters of the ring setup are available. | |||
274 | /* Get next frame header */ | 274 | /* Get next frame header */ |
275 | hdr = rx_ring + frame_offset; | 275 | hdr = rx_ring + frame_offset; |
276 | 276 | ||
277 | if (hdr->nm_status == NL_MMAP_STATUS_VALID) | 277 | if (hdr->nm_status == NL_MMAP_STATUS_VALID) { |
278 | /* Regular memory mapped frame */ | 278 | /* Regular memory mapped frame */ |
279 | nlh = (void *hdr) + NL_MMAP_HDRLEN; | 279 | nlh = (void *)hdr + NL_MMAP_HDRLEN; |
280 | len = hdr->nm_len; | 280 | len = hdr->nm_len; |
281 | 281 | ||
282 | /* Release empty message immediately. May happen | 282 | /* Release empty message immediately. May happen |
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index 23dd80e82b8e..8572796b1eb6 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
@@ -704,6 +704,12 @@ So it seems to be a good candidate to be used with packet fanout. | |||
704 | Minimal example code by Daniel Borkmann based on Chetan Loke's lolpcap (compile | 704 | Minimal example code by Daniel Borkmann based on Chetan Loke's lolpcap (compile |
705 | it with gcc -Wall -O2 blob.c, and try things like "./a.out eth0", etc.): | 705 | it with gcc -Wall -O2 blob.c, and try things like "./a.out eth0", etc.): |
706 | 706 | ||
707 | /* Written from scratch, but kernel-to-user space API usage | ||
708 | * dissected from lolpcap: | ||
709 | * Copyright 2011, Chetan Loke <loke.chetan@gmail.com> | ||
710 | * License: GPL, version 2.0 | ||
711 | */ | ||
712 | |||
707 | #include <stdio.h> | 713 | #include <stdio.h> |
708 | #include <stdlib.h> | 714 | #include <stdlib.h> |
709 | #include <stdint.h> | 715 | #include <stdint.h> |
@@ -722,27 +728,6 @@ it with gcc -Wall -O2 blob.c, and try things like "./a.out eth0", etc.): | |||
722 | #include <linux/if_ether.h> | 728 | #include <linux/if_ether.h> |
723 | #include <linux/ip.h> | 729 | #include <linux/ip.h> |
724 | 730 | ||
725 | #define BLOCK_SIZE (1 << 22) | ||
726 | #define FRAME_SIZE 2048 | ||
727 | |||
728 | #define NUM_BLOCKS 64 | ||
729 | #define NUM_FRAMES ((BLOCK_SIZE * NUM_BLOCKS) / FRAME_SIZE) | ||
730 | |||
731 | #define BLOCK_RETIRE_TOV_IN_MS 64 | ||
732 | #define BLOCK_PRIV_AREA_SZ 13 | ||
733 | |||
734 | #define ALIGN_8(x) (((x) + 8 - 1) & ~(8 - 1)) | ||
735 | |||
736 | #define BLOCK_STATUS(x) ((x)->h1.block_status) | ||
737 | #define BLOCK_NUM_PKTS(x) ((x)->h1.num_pkts) | ||
738 | #define BLOCK_O2FP(x) ((x)->h1.offset_to_first_pkt) | ||
739 | #define BLOCK_LEN(x) ((x)->h1.blk_len) | ||
740 | #define BLOCK_SNUM(x) ((x)->h1.seq_num) | ||
741 | #define BLOCK_O2PRIV(x) ((x)->offset_to_priv) | ||
742 | #define BLOCK_PRIV(x) ((void *) ((uint8_t *) (x) + BLOCK_O2PRIV(x))) | ||
743 | #define BLOCK_HDR_LEN (ALIGN_8(sizeof(struct block_desc))) | ||
744 | #define BLOCK_PLUS_PRIV(sz_pri) (BLOCK_HDR_LEN + ALIGN_8((sz_pri))) | ||
745 | |||
746 | #ifndef likely | 731 | #ifndef likely |
747 | # define likely(x) __builtin_expect(!!(x), 1) | 732 | # define likely(x) __builtin_expect(!!(x), 1) |
748 | #endif | 733 | #endif |
@@ -765,7 +750,7 @@ struct ring { | |||
765 | static unsigned long packets_total = 0, bytes_total = 0; | 750 | static unsigned long packets_total = 0, bytes_total = 0; |
766 | static sig_atomic_t sigint = 0; | 751 | static sig_atomic_t sigint = 0; |
767 | 752 | ||
768 | void sighandler(int num) | 753 | static void sighandler(int num) |
769 | { | 754 | { |
770 | sigint = 1; | 755 | sigint = 1; |
771 | } | 756 | } |
@@ -774,6 +759,8 @@ static int setup_socket(struct ring *ring, char *netdev) | |||
774 | { | 759 | { |
775 | int err, i, fd, v = TPACKET_V3; | 760 | int err, i, fd, v = TPACKET_V3; |
776 | struct sockaddr_ll ll; | 761 | struct sockaddr_ll ll; |
762 | unsigned int blocksiz = 1 << 22, framesiz = 1 << 11; | ||
763 | unsigned int blocknum = 64; | ||
777 | 764 | ||
778 | fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); | 765 | fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); |
779 | if (fd < 0) { | 766 | if (fd < 0) { |
@@ -788,13 +775,12 @@ static int setup_socket(struct ring *ring, char *netdev) | |||
788 | } | 775 | } |
789 | 776 | ||
790 | memset(&ring->req, 0, sizeof(ring->req)); | 777 | memset(&ring->req, 0, sizeof(ring->req)); |
791 | ring->req.tp_block_size = BLOCK_SIZE; | 778 | ring->req.tp_block_size = blocksiz; |
792 | ring->req.tp_frame_size = FRAME_SIZE; | 779 | ring->req.tp_frame_size = framesiz; |
793 | ring->req.tp_block_nr = NUM_BLOCKS; | 780 | ring->req.tp_block_nr = blocknum; |
794 | ring->req.tp_frame_nr = NUM_FRAMES; | 781 | ring->req.tp_frame_nr = (blocksiz * blocknum) / framesiz; |
795 | ring->req.tp_retire_blk_tov = BLOCK_RETIRE_TOV_IN_MS; | 782 | ring->req.tp_retire_blk_tov = 60; |
796 | ring->req.tp_sizeof_priv = BLOCK_PRIV_AREA_SZ; | 783 | ring->req.tp_feature_req_word = TP_FT_REQ_FILL_RXHASH; |
797 | ring->req.tp_feature_req_word |= TP_FT_REQ_FILL_RXHASH; | ||
798 | 784 | ||
799 | err = setsockopt(fd, SOL_PACKET, PACKET_RX_RING, &ring->req, | 785 | err = setsockopt(fd, SOL_PACKET, PACKET_RX_RING, &ring->req, |
800 | sizeof(ring->req)); | 786 | sizeof(ring->req)); |
@@ -804,8 +790,7 @@ static int setup_socket(struct ring *ring, char *netdev) | |||
804 | } | 790 | } |
805 | 791 | ||
806 | ring->map = mmap(NULL, ring->req.tp_block_size * ring->req.tp_block_nr, | 792 | ring->map = mmap(NULL, ring->req.tp_block_size * ring->req.tp_block_nr, |
807 | PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, | 793 | PROT_READ | PROT_WRITE, MAP_SHARED | MAP_LOCKED, fd, 0); |
808 | fd, 0); | ||
809 | if (ring->map == MAP_FAILED) { | 794 | if (ring->map == MAP_FAILED) { |
810 | perror("mmap"); | 795 | perror("mmap"); |
811 | exit(1); | 796 | exit(1); |
@@ -835,58 +820,6 @@ static int setup_socket(struct ring *ring, char *netdev) | |||
835 | return fd; | 820 | return fd; |
836 | } | 821 | } |
837 | 822 | ||
838 | #ifdef __checked | ||
839 | static uint64_t prev_block_seq_num = 0; | ||
840 | |||
841 | void assert_block_seq_num(struct block_desc *pbd) | ||
842 | { | ||
843 | if (unlikely(prev_block_seq_num + 1 != BLOCK_SNUM(pbd))) { | ||
844 | printf("prev_block_seq_num:%"PRIu64", expected seq:%"PRIu64" != " | ||
845 | "actual seq:%"PRIu64"\n", prev_block_seq_num, | ||
846 | prev_block_seq_num + 1, (uint64_t) BLOCK_SNUM(pbd)); | ||
847 | exit(1); | ||
848 | } | ||
849 | |||
850 | prev_block_seq_num = BLOCK_SNUM(pbd); | ||
851 | } | ||
852 | |||
853 | static void assert_block_len(struct block_desc *pbd, uint32_t bytes, int block_num) | ||
854 | { | ||
855 | if (BLOCK_NUM_PKTS(pbd)) { | ||
856 | if (unlikely(bytes != BLOCK_LEN(pbd))) { | ||
857 | printf("block:%u with %upackets, expected len:%u != actual len:%u\n", | ||
858 | block_num, BLOCK_NUM_PKTS(pbd), bytes, BLOCK_LEN(pbd)); | ||
859 | exit(1); | ||
860 | } | ||
861 | } else { | ||
862 | if (unlikely(BLOCK_LEN(pbd) != BLOCK_PLUS_PRIV(BLOCK_PRIV_AREA_SZ))) { | ||
863 | printf("block:%u, expected len:%lu != actual len:%u\n", | ||
864 | block_num, BLOCK_HDR_LEN, BLOCK_LEN(pbd)); | ||
865 | exit(1); | ||
866 | } | ||
867 | } | ||
868 | } | ||
869 | |||
870 | static void assert_block_header(struct block_desc *pbd, const int block_num) | ||
871 | { | ||
872 | uint32_t block_status = BLOCK_STATUS(pbd); | ||
873 | |||
874 | if (unlikely((block_status & TP_STATUS_USER) == 0)) { | ||
875 | printf("block:%u, not in TP_STATUS_USER\n", block_num); | ||
876 | exit(1); | ||
877 | } | ||
878 | |||
879 | assert_block_seq_num(pbd); | ||
880 | } | ||
881 | #else | ||
882 | static inline void assert_block_header(struct block_desc *pbd, const int block_num) | ||
883 | { | ||
884 | } | ||
885 | static void assert_block_len(struct block_desc *pbd, uint32_t bytes, int block_num) | ||
886 | { | ||
887 | } | ||
888 | #endif | ||
889 | |||
890 | static void display(struct tpacket3_hdr *ppd) | 823 | static void display(struct tpacket3_hdr *ppd) |
891 | { | 824 | { |
892 | struct ethhdr *eth = (struct ethhdr *) ((uint8_t *) ppd + ppd->tp_mac); | 825 | struct ethhdr *eth = (struct ethhdr *) ((uint8_t *) ppd + ppd->tp_mac); |
@@ -916,37 +849,27 @@ static void display(struct tpacket3_hdr *ppd) | |||
916 | 849 | ||
917 | static void walk_block(struct block_desc *pbd, const int block_num) | 850 | static void walk_block(struct block_desc *pbd, const int block_num) |
918 | { | 851 | { |
919 | int num_pkts = BLOCK_NUM_PKTS(pbd), i; | 852 | int num_pkts = pbd->h1.num_pkts, i; |
920 | unsigned long bytes = 0; | 853 | unsigned long bytes = 0; |
921 | unsigned long bytes_with_padding = BLOCK_PLUS_PRIV(BLOCK_PRIV_AREA_SZ); | ||
922 | struct tpacket3_hdr *ppd; | 854 | struct tpacket3_hdr *ppd; |
923 | 855 | ||
924 | assert_block_header(pbd, block_num); | 856 | ppd = (struct tpacket3_hdr *) ((uint8_t *) pbd + |
925 | 857 | pbd->h1.offset_to_first_pkt); | |
926 | ppd = (struct tpacket3_hdr *) ((uint8_t *) pbd + BLOCK_O2FP(pbd)); | ||
927 | for (i = 0; i < num_pkts; ++i) { | 858 | for (i = 0; i < num_pkts; ++i) { |
928 | bytes += ppd->tp_snaplen; | 859 | bytes += ppd->tp_snaplen; |
929 | if (ppd->tp_next_offset) | ||
930 | bytes_with_padding += ppd->tp_next_offset; | ||
931 | else | ||
932 | bytes_with_padding += ALIGN_8(ppd->tp_snaplen + ppd->tp_mac); | ||
933 | |||
934 | display(ppd); | 860 | display(ppd); |
935 | 861 | ||
936 | ppd = (struct tpacket3_hdr *) ((uint8_t *) ppd + ppd->tp_next_offset); | 862 | ppd = (struct tpacket3_hdr *) ((uint8_t *) ppd + |
937 | __sync_synchronize(); | 863 | ppd->tp_next_offset); |
938 | } | 864 | } |
939 | 865 | ||
940 | assert_block_len(pbd, bytes_with_padding, block_num); | ||
941 | |||
942 | packets_total += num_pkts; | 866 | packets_total += num_pkts; |
943 | bytes_total += bytes; | 867 | bytes_total += bytes; |
944 | } | 868 | } |
945 | 869 | ||
946 | void flush_block(struct block_desc *pbd) | 870 | static void flush_block(struct block_desc *pbd) |
947 | { | 871 | { |
948 | BLOCK_STATUS(pbd) = TP_STATUS_KERNEL; | 872 | pbd->h1.block_status = TP_STATUS_KERNEL; |
949 | __sync_synchronize(); | ||
950 | } | 873 | } |
951 | 874 | ||
952 | static void teardown_socket(struct ring *ring, int fd) | 875 | static void teardown_socket(struct ring *ring, int fd) |
@@ -962,7 +885,7 @@ int main(int argc, char **argp) | |||
962 | socklen_t len; | 885 | socklen_t len; |
963 | struct ring ring; | 886 | struct ring ring; |
964 | struct pollfd pfd; | 887 | struct pollfd pfd; |
965 | unsigned int block_num = 0; | 888 | unsigned int block_num = 0, blocks = 64; |
966 | struct block_desc *pbd; | 889 | struct block_desc *pbd; |
967 | struct tpacket_stats_v3 stats; | 890 | struct tpacket_stats_v3 stats; |
968 | 891 | ||
@@ -984,15 +907,15 @@ int main(int argc, char **argp) | |||
984 | 907 | ||
985 | while (likely(!sigint)) { | 908 | while (likely(!sigint)) { |
986 | pbd = (struct block_desc *) ring.rd[block_num].iov_base; | 909 | pbd = (struct block_desc *) ring.rd[block_num].iov_base; |
987 | retry_block: | 910 | |
988 | if ((BLOCK_STATUS(pbd) & TP_STATUS_USER) == 0) { | 911 | if ((pbd->h1.block_status & TP_STATUS_USER) == 0) { |
989 | poll(&pfd, 1, -1); | 912 | poll(&pfd, 1, -1); |
990 | goto retry_block; | 913 | continue; |
991 | } | 914 | } |
992 | 915 | ||
993 | walk_block(pbd, block_num); | 916 | walk_block(pbd, block_num); |
994 | flush_block(pbd); | 917 | flush_block(pbd); |
995 | block_num = (block_num + 1) % NUM_BLOCKS; | 918 | block_num = (block_num + 1) % blocks; |
996 | } | 919 | } |
997 | 920 | ||
998 | len = sizeof(stats); | 921 | len = sizeof(stats); |
diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt index 579994afbe06..ca6977f5b2ed 100644 --- a/Documentation/networking/scaling.txt +++ b/Documentation/networking/scaling.txt | |||
@@ -163,6 +163,64 @@ and unnecessary. If there are fewer hardware queues than CPUs, then | |||
163 | RPS might be beneficial if the rps_cpus for each queue are the ones that | 163 | RPS might be beneficial if the rps_cpus for each queue are the ones that |
164 | share the same memory domain as the interrupting CPU for that queue. | 164 | share the same memory domain as the interrupting CPU for that queue. |
165 | 165 | ||
166 | ==== RPS Flow Limit | ||
167 | |||
168 | RPS scales kernel receive processing across CPUs without introducing | ||
169 | reordering. The trade-off to sending all packets from the same flow | ||
170 | to the same CPU is CPU load imbalance if flows vary in packet rate. | ||
171 | In the extreme case a single flow dominates traffic. Especially on | ||
172 | common server workloads with many concurrent connections, such | ||
173 | behavior indicates a problem such as a misconfiguration or spoofed | ||
174 | source Denial of Service attack. | ||
175 | |||
176 | Flow Limit is an optional RPS feature that prioritizes small flows | ||
177 | during CPU contention by dropping packets from large flows slightly | ||
178 | ahead of those from small flows. It is active only when an RPS or RFS | ||
179 | destination CPU approaches saturation. Once a CPU's input packet | ||
180 | queue exceeds half the maximum queue length (as set by sysctl | ||
181 | net.core.netdev_max_backlog), the kernel starts a per-flow packet | ||
182 | count over the last 256 packets. If a flow exceeds a set ratio (by | ||
183 | default, half) of these packets when a new packet arrives, then the | ||
184 | new packet is dropped. Packets from other flows are still only | ||
185 | dropped once the input packet queue reaches netdev_max_backlog. | ||
186 | No packets are dropped when the input packet queue length is below | ||
187 | the threshold, so flow limit does not sever connections outright: | ||
188 | even large flows maintain connectivity. | ||
189 | |||
190 | == Interface | ||
191 | |||
192 | Flow limit is compiled in by default (CONFIG_NET_FLOW_LIMIT), but not | ||
193 | turned on. It is implemented for each CPU independently (to avoid lock | ||
194 | and cache contention) and toggled per CPU by setting the relevant bit | ||
195 | in sysctl net.core.flow_limit_cpu_bitmap. It exposes the same CPU | ||
196 | bitmap interface as rps_cpus (see above) when called from procfs: | ||
197 | |||
198 | /proc/sys/net/core/flow_limit_cpu_bitmap | ||
199 | |||
200 | Per-flow rate is calculated by hashing each packet into a hashtable | ||
201 | bucket and incrementing a per-bucket counter. The hash function is | ||
202 | the same that selects a CPU in RPS, but as the number of buckets can | ||
203 | be much larger than the number of CPUs, flow limit has finer-grained | ||
204 | identification of large flows and fewer false positives. The default | ||
205 | table has 4096 buckets. This value can be modified through sysctl | ||
206 | |||
207 | net.core.flow_limit_table_len | ||
208 | |||
209 | The value is only consulted when a new table is allocated. Modifying | ||
210 | it does not update active tables. | ||
211 | |||
212 | == Suggested Configuration | ||
213 | |||
214 | Flow limit is useful on systems with many concurrent connections, | ||
215 | where a single connection taking up 50% of a CPU indicates a problem. | ||
216 | In such environments, enable the feature on all CPUs that handle | ||
217 | network rx interrupts (as set in /proc/irq/N/smp_affinity). | ||
218 | |||
219 | The feature depends on the input packet queue length to exceed | ||
220 | the flow limit threshold (50%) + the flow history length (256). | ||
221 | Setting net.core.netdev_max_backlog to either 1000 or 10000 | ||
222 | performed well in experiments. | ||
223 | |||
166 | 224 | ||
167 | RFS: Receive Flow Steering | 225 | RFS: Receive Flow Steering |
168 | ========================== | 226 | ========================== |
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt index b4038ffb3bc5..9a8041dcbb53 100644 --- a/Documentation/networking/vortex.txt +++ b/Documentation/networking/vortex.txt | |||
@@ -359,7 +359,7 @@ steps you should take: | |||
359 | - OK, it's a driver problem. | 359 | - OK, it's a driver problem. |
360 | 360 | ||
361 | You need to generate a report. Typically this is an email to the | 361 | You need to generate a report. Typically this is an email to the |
362 | maintainer and/or linux-net@vger.kernel.org. The maintainer's | 362 | maintainer and/or netdev@vger.kernel.org. The maintainer's |
363 | email address will be in the driver source or in the MAINTAINERS file. | 363 | email address will be in the driver source or in the MAINTAINERS file. |
364 | 364 | ||
365 | - The contents of your report will vary a lot depending upon the | 365 | - The contents of your report will vary a lot depending upon the |
diff --git a/Documentation/parisc/registers b/Documentation/parisc/registers index dd3caddd1ad9..10c7d1730f5d 100644 --- a/Documentation/parisc/registers +++ b/Documentation/parisc/registers | |||
@@ -78,6 +78,14 @@ Shadow Registers used by interruption handler code | |||
78 | TOC enable bit 1 | 78 | TOC enable bit 1 |
79 | 79 | ||
80 | ========================================================================= | 80 | ========================================================================= |
81 | |||
82 | The PA-RISC architecture defines 7 registers as "shadow registers". | ||
83 | Those are used in RETURN FROM INTERRUPTION AND RESTORE instruction to reduce | ||
84 | the state save and restore time by eliminating the need for general register | ||
85 | (GR) saves and restores in interruption handlers. | ||
86 | Shadow registers are the GRs 1, 8, 9, 16, 17, 24, and 25. | ||
87 | |||
88 | ========================================================================= | ||
81 | Register usage notes, originally from John Marvin, with some additional | 89 | Register usage notes, originally from John Marvin, with some additional |
82 | notes from Randolph Chung. | 90 | notes from Randolph Chung. |
83 | 91 | ||
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index 447fd4cd54ec..052e13af2d38 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt | |||
@@ -203,15 +203,8 @@ using a certain resistor value - pull up and pull down - so that the pin has a | |||
203 | stable value when nothing is driving the rail it is connected to, or when it's | 203 | stable value when nothing is driving the rail it is connected to, or when it's |
204 | unconnected. | 204 | unconnected. |
205 | 205 | ||
206 | Pin configuration can be programmed either using the explicit APIs described | 206 | Pin configuration can be programmed by adding configuration entries into the |
207 | immediately below, or by adding configuration entries into the mapping table; | 207 | mapping table; see section "Board/machine configuration" below. |
208 | see section "Board/machine configuration" below. | ||
209 | |||
210 | For example, a platform may do the following to pull up a pin to VDD: | ||
211 | |||
212 | #include <linux/pinctrl/consumer.h> | ||
213 | |||
214 | ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP); | ||
215 | 208 | ||
216 | The format and meaning of the configuration parameter, PLATFORM_X_PULL_UP | 209 | The format and meaning of the configuration parameter, PLATFORM_X_PULL_UP |
217 | above, is entirely defined by the pin controller driver. | 210 | above, is entirely defined by the pin controller driver. |
@@ -298,7 +291,7 @@ Since the pin controller subsystem have its pinspace local to the pin | |||
298 | controller we need a mapping so that the pin control subsystem can figure out | 291 | controller we need a mapping so that the pin control subsystem can figure out |
299 | which pin controller handles control of a certain GPIO pin. Since a single | 292 | which pin controller handles control of a certain GPIO pin. Since a single |
300 | pin controller may be muxing several GPIO ranges (typically SoCs that have | 293 | pin controller may be muxing several GPIO ranges (typically SoCs that have |
301 | one set of pins but internally several GPIO silicon blocks, each modeled as | 294 | one set of pins but internally several GPIO silicon blocks, each modelled as |
302 | a struct gpio_chip) any number of GPIO ranges can be added to a pin controller | 295 | a struct gpio_chip) any number of GPIO ranges can be added to a pin controller |
303 | instance like this: | 296 | instance like this: |
304 | 297 | ||
@@ -350,6 +343,23 @@ chip b: | |||
350 | - GPIO range : [48 .. 55] | 343 | - GPIO range : [48 .. 55] |
351 | - pin range : [64 .. 71] | 344 | - pin range : [64 .. 71] |
352 | 345 | ||
346 | The above examples assume the mapping between the GPIOs and pins is | ||
347 | linear. If the mapping is sparse or haphazard, an array of arbitrary pin | ||
348 | numbers can be encoded in the range like this: | ||
349 | |||
350 | static const unsigned range_pins[] = { 14, 1, 22, 17, 10, 8, 6, 2 }; | ||
351 | |||
352 | static struct pinctrl_gpio_range gpio_range = { | ||
353 | .name = "chip", | ||
354 | .id = 0, | ||
355 | .base = 32, | ||
356 | .pins = &range_pins, | ||
357 | .npins = ARRAY_SIZE(range_pins), | ||
358 | .gc = &chip; | ||
359 | }; | ||
360 | |||
361 | In this case the pin_base property will be ignored. | ||
362 | |||
353 | When GPIO-specific functions in the pin control subsystem are called, these | 363 | When GPIO-specific functions in the pin control subsystem are called, these |
354 | ranges will be used to look up the appropriate pin controller by inspecting | 364 | ranges will be used to look up the appropriate pin controller by inspecting |
355 | and matching the pin to the pin ranges across all controllers. When a | 365 | and matching the pin to the pin ranges across all controllers. When a |
@@ -357,9 +367,9 @@ pin controller handling the matching range is found, GPIO-specific functions | |||
357 | will be called on that specific pin controller. | 367 | will be called on that specific pin controller. |
358 | 368 | ||
359 | For all functionalities dealing with pin biasing, pin muxing etc, the pin | 369 | For all functionalities dealing with pin biasing, pin muxing etc, the pin |
360 | controller subsystem will subtract the range's .base offset from the passed | 370 | controller subsystem will look up the corresponding pin number from the passed |
361 | in gpio number, and add the ranges's .pin_base offset to retrive a pin number. | 371 | in gpio number, and use the range's internals to retrive a pin number. After |
362 | After that, the subsystem passes it on to the pin control driver, so the driver | 372 | that, the subsystem passes it on to the pin control driver, so the driver |
363 | will get an pin number into its handled number range. Further it is also passed | 373 | will get an pin number into its handled number range. Further it is also passed |
364 | the range ID value, so that the pin controller knows which range it should | 374 | the range ID value, so that the pin controller knows which range it should |
365 | deal with. | 375 | deal with. |
@@ -368,6 +378,7 @@ Calling pinctrl_add_gpio_range from pinctrl driver is DEPRECATED. Please see | |||
368 | section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt on how to bind | 378 | section 2.1 of Documentation/devicetree/bindings/gpio/gpio.txt on how to bind |
369 | pinctrl and gpio drivers. | 379 | pinctrl and gpio drivers. |
370 | 380 | ||
381 | |||
371 | PINMUX interfaces | 382 | PINMUX interfaces |
372 | ================= | 383 | ================= |
373 | 384 | ||
@@ -1226,8 +1237,8 @@ setting up the config and muxing for the pins right before the device is | |||
1226 | probing, nevertheless orthogonal to the GPIO subsystem. | 1237 | probing, nevertheless orthogonal to the GPIO subsystem. |
1227 | 1238 | ||
1228 | But there are also situations where it makes sense for the GPIO subsystem | 1239 | But there are also situations where it makes sense for the GPIO subsystem |
1229 | to communicate directly with with the pinctrl subsystem, using the latter | 1240 | to communicate directly with the pinctrl subsystem, using the latter as a |
1230 | as a back-end. This is when the GPIO driver may call out to the functions | 1241 | back-end. This is when the GPIO driver may call out to the functions |
1231 | described in the section "Pin control interaction with the GPIO subsystem" | 1242 | described in the section "Pin control interaction with the GPIO subsystem" |
1232 | above. This only involves per-pin multiplexing, and will be completely | 1243 | above. This only involves per-pin multiplexing, and will be completely |
1233 | hidden behind the gpio_*() function namespace. In this case, the driver | 1244 | hidden behind the gpio_*() function namespace. In this case, the driver |
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 504dfe4d52eb..a66c9821b5ce 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -268,7 +268,7 @@ situations. | |||
268 | System Power Management Phases | 268 | System Power Management Phases |
269 | ------------------------------ | 269 | ------------------------------ |
270 | Suspending or resuming the system is done in several phases. Different phases | 270 | Suspending or resuming the system is done in several phases. Different phases |
271 | are used for standby or memory sleep states ("suspend-to-RAM") and the | 271 | are used for freeze, standby, and memory sleep states ("suspend-to-RAM") and the |
272 | hibernation state ("suspend-to-disk"). Each phase involves executing callbacks | 272 | hibernation state ("suspend-to-disk"). Each phase involves executing callbacks |
273 | for every device before the next phase begins. Not all busses or classes | 273 | for every device before the next phase begins. Not all busses or classes |
274 | support all these callbacks and not all drivers use all the callbacks. The | 274 | support all these callbacks and not all drivers use all the callbacks. The |
@@ -309,7 +309,8 @@ execute the corresponding method from dev->driver->pm instead if there is one. | |||
309 | 309 | ||
310 | Entering System Suspend | 310 | Entering System Suspend |
311 | ----------------------- | 311 | ----------------------- |
312 | When the system goes into the standby or memory sleep state, the phases are: | 312 | When the system goes into the freeze, standby or memory sleep state, |
313 | the phases are: | ||
313 | 314 | ||
314 | prepare, suspend, suspend_late, suspend_noirq. | 315 | prepare, suspend, suspend_late, suspend_noirq. |
315 | 316 | ||
@@ -368,7 +369,7 @@ the devices that were suspended. | |||
368 | 369 | ||
369 | Leaving System Suspend | 370 | Leaving System Suspend |
370 | ---------------------- | 371 | ---------------------- |
371 | When resuming from standby or memory sleep, the phases are: | 372 | When resuming from freeze, standby or memory sleep, the phases are: |
372 | 373 | ||
373 | resume_noirq, resume_early, resume, complete. | 374 | resume_noirq, resume_early, resume, complete. |
374 | 375 | ||
@@ -433,8 +434,8 @@ the system log. | |||
433 | 434 | ||
434 | Entering Hibernation | 435 | Entering Hibernation |
435 | -------------------- | 436 | -------------------- |
436 | Hibernating the system is more complicated than putting it into the standby or | 437 | Hibernating the system is more complicated than putting it into the other |
437 | memory sleep state, because it involves creating and saving a system image. | 438 | sleep states, because it involves creating and saving a system image. |
438 | Therefore there are more phases for hibernation, with a different set of | 439 | Therefore there are more phases for hibernation, with a different set of |
439 | callbacks. These phases always run after tasks have been frozen and memory has | 440 | callbacks. These phases always run after tasks have been frozen and memory has |
440 | been freed. | 441 | been freed. |
@@ -485,8 +486,8 @@ image forms an atomic snapshot of the system state. | |||
485 | 486 | ||
486 | At this point the system image is saved, and the devices then need to be | 487 | At this point the system image is saved, and the devices then need to be |
487 | prepared for the upcoming system shutdown. This is much like suspending them | 488 | prepared for the upcoming system shutdown. This is much like suspending them |
488 | before putting the system into the standby or memory sleep state, and the phases | 489 | before putting the system into the freeze, standby or memory sleep state, |
489 | are similar. | 490 | and the phases are similar. |
490 | 491 | ||
491 | 9. The prepare phase is discussed above. | 492 | 9. The prepare phase is discussed above. |
492 | 493 | ||
diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt index c537834af005..f1f0f59a7c47 100644 --- a/Documentation/power/interface.txt +++ b/Documentation/power/interface.txt | |||
@@ -7,8 +7,8 @@ running. The interface exists in /sys/power/ directory (assuming sysfs | |||
7 | is mounted at /sys). | 7 | is mounted at /sys). |
8 | 8 | ||
9 | /sys/power/state controls system power state. Reading from this file | 9 | /sys/power/state controls system power state. Reading from this file |
10 | returns what states are supported, which is hard-coded to 'standby' | 10 | returns what states are supported, which is hard-coded to 'freeze', |
11 | (Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' | 11 | 'standby' (Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' |
12 | (Suspend-to-Disk). | 12 | (Suspend-to-Disk). |
13 | 13 | ||
14 | Writing to this file one of those strings causes the system to | 14 | Writing to this file one of those strings causes the system to |
diff --git a/Documentation/power/notifiers.txt b/Documentation/power/notifiers.txt index c2a4a346c0d9..a81fa254303d 100644 --- a/Documentation/power/notifiers.txt +++ b/Documentation/power/notifiers.txt | |||
@@ -15,8 +15,10 @@ A suspend/hibernation notifier may be used for this purpose. | |||
15 | The subsystems or drivers having such needs can register suspend notifiers that | 15 | The subsystems or drivers having such needs can register suspend notifiers that |
16 | will be called upon the following events by the PM core: | 16 | will be called upon the following events by the PM core: |
17 | 17 | ||
18 | PM_HIBERNATION_PREPARE The system is going to hibernate or suspend, tasks will | 18 | PM_HIBERNATION_PREPARE The system is going to hibernate, tasks will be frozen |
19 | be frozen immediately. | 19 | immediately. This is different from PM_SUSPEND_PREPARE |
20 | below because here we do additional work between notifiers | ||
21 | and drivers freezing. | ||
20 | 22 | ||
21 | PM_POST_HIBERNATION The system memory state has been restored from a | 23 | PM_POST_HIBERNATION The system memory state has been restored from a |
22 | hibernation image or an error occurred during | 24 | hibernation image or an error occurred during |
diff --git a/Documentation/power/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt index 79a2a58425ee..483632087788 100644 --- a/Documentation/power/pm_qos_interface.txt +++ b/Documentation/power/pm_qos_interface.txt | |||
@@ -7,7 +7,7 @@ one of the parameters. | |||
7 | Two different PM QoS frameworks are available: | 7 | Two different PM QoS frameworks are available: |
8 | 1. PM QoS classes for cpu_dma_latency, network_latency, network_throughput. | 8 | 1. PM QoS classes for cpu_dma_latency, network_latency, network_throughput. |
9 | 2. the per-device PM QoS framework provides the API to manage the per-device latency | 9 | 2. the per-device PM QoS framework provides the API to manage the per-device latency |
10 | constraints. | 10 | constraints and PM QoS flags. |
11 | 11 | ||
12 | Each parameters have defined units: | 12 | Each parameters have defined units: |
13 | * latency: usec | 13 | * latency: usec |
@@ -86,13 +86,17 @@ To remove the user mode request for a target value simply close the device | |||
86 | node. | 86 | node. |
87 | 87 | ||
88 | 88 | ||
89 | 2. PM QoS per-device latency framework | 89 | 2. PM QoS per-device latency and flags framework |
90 | |||
91 | For each device, there are two lists of PM QoS requests. One is maintained | ||
92 | along with the aggregated target of latency value and the other is for PM QoS | ||
93 | flags. Values are updated in response to changes of the request list. | ||
94 | |||
95 | Target latency value is simply the minimum of the request values held in the | ||
96 | parameter list elements. The PM QoS flags aggregate value is a gather (bitwise | ||
97 | OR) of all list elements' values. Two device PM QoS flags are defined currently: | ||
98 | PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP. | ||
90 | 99 | ||
91 | For each device a list of performance requests is maintained along with | ||
92 | an aggregated target value. The aggregated target value is updated with | ||
93 | changes to the request list or elements of the list. Typically the | ||
94 | aggregated target value is simply the max or min of the request values held | ||
95 | in the parameter list elements. | ||
96 | Note: the aggregated target value is implemented as an atomic variable so that | 100 | Note: the aggregated target value is implemented as an atomic variable so that |
97 | reading the aggregated value does not require any locking mechanism. | 101 | reading the aggregated value does not require any locking mechanism. |
98 | 102 | ||
@@ -119,6 +123,38 @@ the request. | |||
119 | s32 dev_pm_qos_read_value(device): | 123 | s32 dev_pm_qos_read_value(device): |
120 | Returns the aggregated value for a given device's constraints list. | 124 | Returns the aggregated value for a given device's constraints list. |
121 | 125 | ||
126 | enum pm_qos_flags_status dev_pm_qos_flags(device, mask) | ||
127 | Check PM QoS flags of the given device against the given mask of flags. | ||
128 | The meaning of the return values is as follows: | ||
129 | PM_QOS_FLAGS_ALL: All flags from the mask are set | ||
130 | PM_QOS_FLAGS_SOME: Some flags from the mask are set | ||
131 | PM_QOS_FLAGS_NONE: No flags from the mask are set | ||
132 | PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been | ||
133 | initialized or the list of requests is empty. | ||
134 | |||
135 | int dev_pm_qos_add_ancestor_request(dev, handle, value) | ||
136 | Add a PM QoS request for the first direct ancestor of the given device whose | ||
137 | power.ignore_children flag is unset. | ||
138 | |||
139 | int dev_pm_qos_expose_latency_limit(device, value) | ||
140 | Add a request to the device's PM QoS list of latency constraints and create | ||
141 | a sysfs attribute pm_qos_resume_latency_us under the device's power directory | ||
142 | allowing user space to manipulate that request. | ||
143 | |||
144 | void dev_pm_qos_hide_latency_limit(device) | ||
145 | Drop the request added by dev_pm_qos_expose_latency_limit() from the device's | ||
146 | PM QoS list of latency constraints and remove sysfs attribute pm_qos_resume_latency_us | ||
147 | from the device's power directory. | ||
148 | |||
149 | int dev_pm_qos_expose_flags(device, value) | ||
150 | Add a request to the device's PM QoS list of flags and create sysfs attributes | ||
151 | pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory | ||
152 | allowing user space to change these flags' value. | ||
153 | |||
154 | void dev_pm_qos_hide_flags(device) | ||
155 | Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list | ||
156 | of flags and remove sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup | ||
157 | under the device's power directory. | ||
122 | 158 | ||
123 | Notification mechanisms: | 159 | Notification mechanisms: |
124 | The per-device PM QoS framework has 2 different and distinct notification trees: | 160 | The per-device PM QoS framework has 2 different and distinct notification trees: |
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 6c9f5d9aa115..71d8fe4e75d3 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -144,8 +144,12 @@ The action performed by the idle callback is totally dependent on the subsystem | |||
144 | (or driver) in question, but the expected and recommended action is to check | 144 | (or driver) in question, but the expected and recommended action is to check |
145 | if the device can be suspended (i.e. if all of the conditions necessary for | 145 | if the device can be suspended (i.e. if all of the conditions necessary for |
146 | suspending the device are satisfied) and to queue up a suspend request for the | 146 | suspending the device are satisfied) and to queue up a suspend request for the |
147 | device in that case. The value returned by this callback is ignored by the PM | 147 | device in that case. If there is no idle callback, or if the callback returns |
148 | core. | 148 | 0, then the PM core will attempt to carry out a runtime suspend of the device; |
149 | in essence, it will call pm_runtime_suspend() directly. To prevent this (for | ||
150 | example, if the callback routine has started a delayed suspend), the routine | ||
151 | should return a non-zero value. Negative error return codes are ignored by the | ||
152 | PM core. | ||
149 | 153 | ||
150 | The helper functions provided by the PM core, described in Section 4, guarantee | 154 | The helper functions provided by the PM core, described in Section 4, guarantee |
151 | that the following constraints are met with respect to runtime PM callbacks for | 155 | that the following constraints are met with respect to runtime PM callbacks for |
@@ -301,9 +305,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
301 | removing the device from device hierarchy | 305 | removing the device from device hierarchy |
302 | 306 | ||
303 | int pm_runtime_idle(struct device *dev); | 307 | int pm_runtime_idle(struct device *dev); |
304 | - execute the subsystem-level idle callback for the device; returns 0 on | 308 | - execute the subsystem-level idle callback for the device; returns an |
305 | success or error code on failure, where -EINPROGRESS means that | 309 | error code on failure, where -EINPROGRESS means that ->runtime_idle() is |
306 | ->runtime_idle() is already being executed | 310 | already being executed; if there is no callback or the callback returns 0 |
311 | then run pm_runtime_suspend(dev) and return its result | ||
307 | 312 | ||
308 | int pm_runtime_suspend(struct device *dev); | 313 | int pm_runtime_suspend(struct device *dev); |
309 | - execute the subsystem-level suspend callback for the device; returns 0 on | 314 | - execute the subsystem-level suspend callback for the device; returns 0 on |
@@ -660,11 +665,6 @@ Subsystems may wish to conserve code space by using the set of generic power | |||
660 | management callbacks provided by the PM core, defined in | 665 | management callbacks provided by the PM core, defined in |
661 | driver/base/power/generic_ops.c: | 666 | driver/base/power/generic_ops.c: |
662 | 667 | ||
663 | int pm_generic_runtime_idle(struct device *dev); | ||
664 | - invoke the ->runtime_idle() callback provided by the driver of this | ||
665 | device, if defined, and call pm_runtime_suspend() for this device if the | ||
666 | return value is 0 or the callback is not defined | ||
667 | |||
668 | int pm_generic_runtime_suspend(struct device *dev); | 668 | int pm_generic_runtime_suspend(struct device *dev); |
669 | - invoke the ->runtime_suspend() callback provided by the driver of this | 669 | - invoke the ->runtime_suspend() callback provided by the driver of this |
670 | device and return its result, or return -EINVAL if not defined | 670 | device and return its result, or return -EINVAL if not defined |
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt index 4416b28630df..442d43df9b25 100644 --- a/Documentation/power/states.txt +++ b/Documentation/power/states.txt | |||
@@ -2,12 +2,26 @@ | |||
2 | System Power Management States | 2 | System Power Management States |
3 | 3 | ||
4 | 4 | ||
5 | The kernel supports three power management states generically, though | 5 | The kernel supports four power management states generically, though |
6 | each is dependent on platform support code to implement the low-level | 6 | one is generic and the other three are dependent on platform support |
7 | details for each state. This file describes each state, what they are | 7 | code to implement the low-level details for each state. |
8 | This file describes each state, what they are | ||
8 | commonly called, what ACPI state they map to, and what string to write | 9 | commonly called, what ACPI state they map to, and what string to write |
9 | to /sys/power/state to enter that state | 10 | to /sys/power/state to enter that state |
10 | 11 | ||
12 | state: Freeze / Low-Power Idle | ||
13 | ACPI state: S0 | ||
14 | String: "freeze" | ||
15 | |||
16 | This state is a generic, pure software, light-weight, low-power state. | ||
17 | It allows more energy to be saved relative to idle by freezing user | ||
18 | space and putting all I/O devices into low-power states (possibly | ||
19 | lower-power than available at run time), such that the processors can | ||
20 | spend more time in their idle states. | ||
21 | This state can be used for platforms without Standby/Suspend-to-RAM | ||
22 | support, or it can be used in addition to Suspend-to-RAM (memory sleep) | ||
23 | to provide reduced resume latency. | ||
24 | |||
11 | 25 | ||
12 | State: Standby / Power-On Suspend | 26 | State: Standby / Power-On Suspend |
13 | ACPI State: S1 | 27 | ACPI State: S1 |
@@ -22,9 +36,6 @@ We try to put devices in a low-power state equivalent to D1, which | |||
22 | also offers low power savings, but low resume latency. Not all devices | 36 | also offers low power savings, but low resume latency. Not all devices |
23 | support D1, and those that don't are left on. | 37 | support D1, and those that don't are left on. |
24 | 38 | ||
25 | A transition from Standby to the On state should take about 1-2 | ||
26 | seconds. | ||
27 | |||
28 | 39 | ||
29 | State: Suspend-to-RAM | 40 | State: Suspend-to-RAM |
30 | ACPI State: S3 | 41 | ACPI State: S3 |
@@ -42,9 +53,6 @@ transition back to the On state. | |||
42 | For at least ACPI, STR requires some minimal boot-strapping code to | 53 | For at least ACPI, STR requires some minimal boot-strapping code to |
43 | resume the system from STR. This may be true on other platforms. | 54 | resume the system from STR. This may be true on other platforms. |
44 | 55 | ||
45 | A transition from Suspend-to-RAM to the On state should take about | ||
46 | 3-5 seconds. | ||
47 | |||
48 | 56 | ||
49 | State: Suspend-to-disk | 57 | State: Suspend-to-disk |
50 | ACPI State: S4 | 58 | ACPI State: S4 |
@@ -74,7 +82,3 @@ low-power state (like ACPI S4), or it may simply power down. Powering | |||
74 | down offers greater savings, and allows this mechanism to work on any | 82 | down offers greater savings, and allows this mechanism to work on any |
75 | system. However, entering a real low-power state allows the user to | 83 | system. However, entering a real low-power state allows the user to |
76 | trigger wake up events (e.g. pressing a key or opening a laptop lid). | 84 | trigger wake up events (e.g. pressing a key or opening a laptop lid). |
77 | |||
78 | A transition from Suspend-to-Disk to the On state should take about 30 | ||
79 | seconds, though it's typically a bit more with the current | ||
80 | implementation. | ||
diff --git a/Documentation/power/video_extension.txt b/Documentation/power/video_extension.txt deleted file mode 100644 index b2f9b1598ac2..000000000000 --- a/Documentation/power/video_extension.txt +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | ACPI video extensions | ||
2 | ~~~~~~~~~~~~~~~~~~~~~ | ||
3 | |||
4 | This driver implement the ACPI Extensions For Display Adapters for | ||
5 | integrated graphics devices on motherboard, as specified in ACPI 2.0 | ||
6 | Specification, Appendix B, allowing to perform some basic control like | ||
7 | defining the video POST device, retrieving EDID information or to | ||
8 | setup a video output, etc. Note that this is an ref. implementation | ||
9 | only. It may or may not work for your integrated video device. | ||
10 | |||
11 | Interfaces exposed to userland through /proc/acpi/video: | ||
12 | |||
13 | VGA/info : display the supported video bus device capability like Video ROM, CRT/LCD/TV. | ||
14 | VGA/ROM : Used to get a copy of the display devices' ROM data (up to 4k). | ||
15 | VGA/POST_info : Used to determine what options are implemented. | ||
16 | VGA/POST : Used to get/set POST device. | ||
17 | VGA/DOS : Used to get/set ownership of output switching: | ||
18 | Please refer ACPI spec B.4.1 _DOS | ||
19 | VGA/CRT : CRT output | ||
20 | VGA/LCD : LCD output | ||
21 | VGA/TVO : TV output | ||
22 | VGA/*/brightness : Used to get/set brightness of output device | ||
23 | |||
24 | Notify event through /proc/acpi/event: | ||
25 | |||
26 | #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 | ||
27 | #define ACPI_VIDEO_NOTIFY_PROBE 0x81 | ||
28 | #define ACPI_VIDEO_NOTIFY_CYCLE 0x82 | ||
29 | #define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83 | ||
30 | #define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84 | ||
31 | |||
32 | #define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x82 | ||
33 | #define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x83 | ||
34 | #define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x84 | ||
35 | #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x85 | ||
36 | #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x86 | ||
37 | |||
diff --git a/Documentation/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX index dd9e92802ec0..05026ce1875e 100644 --- a/Documentation/powerpc/00-INDEX +++ b/Documentation/powerpc/00-INDEX | |||
@@ -14,6 +14,8 @@ hvcs.txt | |||
14 | - IBM "Hypervisor Virtual Console Server" Installation Guide | 14 | - IBM "Hypervisor Virtual Console Server" Installation Guide |
15 | mpc52xx.txt | 15 | mpc52xx.txt |
16 | - Linux 2.6.x on MPC52xx family | 16 | - Linux 2.6.x on MPC52xx family |
17 | pmu-ebb.txt | ||
18 | - Description of the API for using the PMU with Event Based Branches. | ||
17 | qe_firmware.txt | 19 | qe_firmware.txt |
18 | - describes the layout of firmware binaries for the Freescale QUICC | 20 | - describes the layout of firmware binaries for the Freescale QUICC |
19 | Engine and the code that parses and uploads the microcode therein. | 21 | Engine and the code that parses and uploads the microcode therein. |
diff --git a/Documentation/powerpc/pmu-ebb.txt b/Documentation/powerpc/pmu-ebb.txt new file mode 100644 index 000000000000..73cd163dbfb8 --- /dev/null +++ b/Documentation/powerpc/pmu-ebb.txt | |||
@@ -0,0 +1,137 @@ | |||
1 | PMU Event Based Branches | ||
2 | ======================== | ||
3 | |||
4 | Event Based Branches (EBBs) are a feature which allows the hardware to | ||
5 | branch directly to a specified user space address when certain events occur. | ||
6 | |||
7 | The full specification is available in Power ISA v2.07: | ||
8 | |||
9 | https://www.power.org/documentation/power-isa-version-2-07/ | ||
10 | |||
11 | One type of event for which EBBs can be configured is PMU exceptions. This | ||
12 | document describes the API for configuring the Power PMU to generate EBBs, | ||
13 | using the Linux perf_events API. | ||
14 | |||
15 | |||
16 | Terminology | ||
17 | ----------- | ||
18 | |||
19 | Throughout this document we will refer to an "EBB event" or "EBB events". This | ||
20 | just refers to a struct perf_event which has set the "EBB" flag in its | ||
21 | attr.config. All events which can be configured on the hardware PMU are | ||
22 | possible "EBB events". | ||
23 | |||
24 | |||
25 | Background | ||
26 | ---------- | ||
27 | |||
28 | When a PMU EBB occurs it is delivered to the currently running process. As such | ||
29 | EBBs can only sensibly be used by programs for self-monitoring. | ||
30 | |||
31 | It is a feature of the perf_events API that events can be created on other | ||
32 | processes, subject to standard permission checks. This is also true of EBB | ||
33 | events, however unless the target process enables EBBs (via mtspr(BESCR)) no | ||
34 | EBBs will ever be delivered. | ||
35 | |||
36 | This makes it possible for a process to enable EBBs for itself, but not | ||
37 | actually configure any events. At a later time another process can come along | ||
38 | and attach an EBB event to the process, which will then cause EBBs to be | ||
39 | delivered to the first process. It's not clear if this is actually useful. | ||
40 | |||
41 | |||
42 | When the PMU is configured for EBBs, all PMU interrupts are delivered to the | ||
43 | user process. This means once an EBB event is scheduled on the PMU, no non-EBB | ||
44 | events can be configured. This means that EBB events can not be run | ||
45 | concurrently with regular 'perf' commands, or any other perf events. | ||
46 | |||
47 | It is however safe to run 'perf' commands on a process which is using EBBs. The | ||
48 | kernel will in general schedule the EBB event, and perf will be notified that | ||
49 | its events could not run. | ||
50 | |||
51 | The exclusion between EBB events and regular events is implemented using the | ||
52 | existing "pinned" and "exclusive" attributes of perf_events. This means EBB | ||
53 | events will be given priority over other events, unless they are also pinned. | ||
54 | If an EBB event and a regular event are both pinned, then whichever is enabled | ||
55 | first will be scheduled and the other will be put in error state. See the | ||
56 | section below titled "Enabling an EBB event" for more information. | ||
57 | |||
58 | |||
59 | Creating an EBB event | ||
60 | --------------------- | ||
61 | |||
62 | To request that an event is counted using EBB, the event code should have bit | ||
63 | 63 set. | ||
64 | |||
65 | EBB events must be created with a particular, and restrictive, set of | ||
66 | attributes - this is so that they interoperate correctly with the rest of the | ||
67 | perf_events subsystem. | ||
68 | |||
69 | An EBB event must be created with the "pinned" and "exclusive" attributes set. | ||
70 | Note that if you are creating a group of EBB events, only the leader can have | ||
71 | these attributes set. | ||
72 | |||
73 | An EBB event must NOT set any of the "inherit", "sample_period", "freq" or | ||
74 | "enable_on_exec" attributes. | ||
75 | |||
76 | An EBB event must be attached to a task. This is specified to perf_event_open() | ||
77 | by passing a pid value, typically 0 indicating the current task. | ||
78 | |||
79 | All events in a group must agree on whether they want EBB. That is all events | ||
80 | must request EBB, or none may request EBB. | ||
81 | |||
82 | EBB events must specify the PMC they are to be counted on. This ensures | ||
83 | userspace is able to reliably determine which PMC the event is scheduled on. | ||
84 | |||
85 | |||
86 | Enabling an EBB event | ||
87 | --------------------- | ||
88 | |||
89 | Once an EBB event has been successfully opened, it must be enabled with the | ||
90 | perf_events API. This can be achieved either via the ioctl() interface, or the | ||
91 | prctl() interface. | ||
92 | |||
93 | However, due to the design of the perf_events API, enabling an event does not | ||
94 | guarantee that it has been scheduled on the PMU. To ensure that the EBB event | ||
95 | has been scheduled on the PMU, you must perform a read() on the event. If the | ||
96 | read() returns EOF, then the event has not been scheduled and EBBs are not | ||
97 | enabled. | ||
98 | |||
99 | This behaviour occurs because the EBB event is pinned and exclusive. When the | ||
100 | EBB event is enabled it will force all other non-pinned events off the PMU. In | ||
101 | this case the enable will be successful. However if there is already an event | ||
102 | pinned on the PMU then the enable will not be successful. | ||
103 | |||
104 | |||
105 | Reading an EBB event | ||
106 | -------------------- | ||
107 | |||
108 | It is possible to read() from an EBB event. However the results are | ||
109 | meaningless. Because interrupts are being delivered to the user process the | ||
110 | kernel is not able to count the event, and so will return a junk value. | ||
111 | |||
112 | |||
113 | Closing an EBB event | ||
114 | -------------------- | ||
115 | |||
116 | When an EBB event is finished with, you can close it using close() as for any | ||
117 | regular event. If this is the last EBB event the PMU will be deconfigured and | ||
118 | no further PMU EBBs will be delivered. | ||
119 | |||
120 | |||
121 | EBB Handler | ||
122 | ----------- | ||
123 | |||
124 | The EBB handler is just regular userspace code, however it must be written in | ||
125 | the style of an interrupt handler. When the handler is entered all registers | ||
126 | are live (possibly) and so must be saved somehow before the handler can invoke | ||
127 | other code. | ||
128 | |||
129 | It's up to the program how to handle this. For C programs a relatively simple | ||
130 | option is to create an interrupt frame on the stack and save registers there. | ||
131 | |||
132 | Fork | ||
133 | ---- | ||
134 | |||
135 | EBB events are not inherited across fork. If the child process wishes to use | ||
136 | EBBs it should open a new event for itself. Similarly the EBB state in | ||
137 | BESCR/EBBHR/EBBRR is cleared across fork(). | ||
diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc/transactional_memory.txt index c907be41d60f..dc23e58ae264 100644 --- a/Documentation/powerpc/transactional_memory.txt +++ b/Documentation/powerpc/transactional_memory.txt | |||
@@ -147,6 +147,25 @@ Example signal handler: | |||
147 | fix_the_problem(ucp->dar); | 147 | fix_the_problem(ucp->dar); |
148 | } | 148 | } |
149 | 149 | ||
150 | When in an active transaction that takes a signal, we need to be careful with | ||
151 | the stack. It's possible that the stack has moved back up after the tbegin. | ||
152 | The obvious case here is when the tbegin is called inside a function that | ||
153 | returns before a tend. In this case, the stack is part of the checkpointed | ||
154 | transactional memory state. If we write over this non transactionally or in | ||
155 | suspend, we are in trouble because if we get a tm abort, the program counter and | ||
156 | stack pointer will be back at the tbegin but our in memory stack won't be valid | ||
157 | anymore. | ||
158 | |||
159 | To avoid this, when taking a signal in an active transaction, we need to use | ||
160 | the stack pointer from the checkpointed state, rather than the speculated | ||
161 | state. This ensures that the signal context (written tm suspended) will be | ||
162 | written below the stack required for the rollback. The transaction is aborted | ||
163 | becuase of the treclaim, so any memory written between the tbegin and the | ||
164 | signal will be rolled back anyway. | ||
165 | |||
166 | For signals taken in non-TM or suspended mode, we use the | ||
167 | normal/non-checkpointed stack pointer. | ||
168 | |||
150 | 169 | ||
151 | Failure cause codes used by kernel | 170 | Failure cause codes used by kernel |
152 | ================================== | 171 | ================================== |
@@ -155,14 +174,18 @@ These are defined in <asm/reg.h>, and distinguish different reasons why the | |||
155 | kernel aborted a transaction: | 174 | kernel aborted a transaction: |
156 | 175 | ||
157 | TM_CAUSE_RESCHED Thread was rescheduled. | 176 | TM_CAUSE_RESCHED Thread was rescheduled. |
177 | TM_CAUSE_TLBI Software TLB invalide. | ||
158 | TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap. | 178 | TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap. |
159 | TM_CAUSE_SYSCALL Currently unused; future syscalls that must abort | 179 | TM_CAUSE_SYSCALL Currently unused; future syscalls that must abort |
160 | transactions for consistency will use this. | 180 | transactions for consistency will use this. |
161 | TM_CAUSE_SIGNAL Signal delivered. | 181 | TM_CAUSE_SIGNAL Signal delivered. |
162 | TM_CAUSE_MISC Currently unused. | 182 | TM_CAUSE_MISC Currently unused. |
183 | TM_CAUSE_ALIGNMENT Alignment fault. | ||
184 | TM_CAUSE_EMULATE Emulation that touched memory. | ||
163 | 185 | ||
164 | These can be checked by the user program's abort handler as TEXASR[0:7]. | 186 | These can be checked by the user program's abort handler as TEXASR[0:7]. If |
165 | 187 | bit 7 is set, it indicates that the error is consider persistent. For example | |
188 | a TM_CAUSE_ALIGNMENT will be persistent while a TM_CAUSE_RESCHED will not.q | ||
166 | 189 | ||
167 | GDB | 190 | GDB |
168 | === | 191 | === |
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 3af5ae6c9c11..3e8cb73ac43c 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
@@ -121,6 +121,38 @@ IPv6 addresses: | |||
121 | print a compressed IPv6 address as described by | 121 | print a compressed IPv6 address as described by |
122 | http://tools.ietf.org/html/rfc5952 | 122 | http://tools.ietf.org/html/rfc5952 |
123 | 123 | ||
124 | IPv4/IPv6 addresses (generic, with port, flowinfo, scope): | ||
125 | |||
126 | %pIS 1.2.3.4 or 0001:0002:0003:0004:0005:0006:0007:0008 | ||
127 | %piS 001.002.003.004 or 00010002000300040005000600070008 | ||
128 | %pISc 1.2.3.4 or 1:2:3:4:5:6:7:8 | ||
129 | %pISpc 1.2.3.4:12345 or [1:2:3:4:5:6:7:8]:12345 | ||
130 | %p[Ii]S[pfschnbl] | ||
131 | |||
132 | For printing an IP address without the need to distinguish whether it's | ||
133 | of type AF_INET or AF_INET6, a pointer to a valid 'struct sockaddr', | ||
134 | specified through 'IS' or 'iS', can be passed to this format specifier. | ||
135 | |||
136 | The additional 'p', 'f', and 's' specifiers are used to specify port | ||
137 | (IPv4, IPv6), flowinfo (IPv6) and scope (IPv6). Ports have a ':' prefix, | ||
138 | flowinfo a '/' and scope a '%', each followed by the actual value. | ||
139 | |||
140 | In case of an IPv6 address the compressed IPv6 address as described by | ||
141 | http://tools.ietf.org/html/rfc5952 is being used if the additional | ||
142 | specifier 'c' is given. The IPv6 address is surrounded by '[', ']' in | ||
143 | case of additional specifiers 'p', 'f' or 's' as suggested by | ||
144 | https://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-07 | ||
145 | |||
146 | In case of IPv4 addresses, the additional 'h', 'n', 'b', and 'l' | ||
147 | specifiers can be used as well and are ignored in case of an IPv6 | ||
148 | address. | ||
149 | |||
150 | Further examples: | ||
151 | |||
152 | %pISfc 1.2.3.4 or [1:2:3:4:5:6:7:8]/123456789 | ||
153 | %pISsc 1.2.3.4 or [1:2:3:4:5:6:7:8]%1234567890 | ||
154 | %pISpfc 1.2.3.4:12345 or [1:2:3:4:5:6:7:8]:12345/123456789 | ||
155 | |||
124 | UUID/GUID addresses: | 156 | UUID/GUID addresses: |
125 | 157 | ||
126 | %pUb 00010203-0405-0607-0809-0a0b0c0d0e0f | 158 | %pUb 00010203-0405-0607-0809-0a0b0c0d0e0f |
diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt index 7d2b4c9b544b..1039b68fe9c6 100644 --- a/Documentation/pwm.txt +++ b/Documentation/pwm.txt | |||
@@ -45,6 +45,43 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns); | |||
45 | 45 | ||
46 | To start/stop toggling the PWM output use pwm_enable()/pwm_disable(). | 46 | To start/stop toggling the PWM output use pwm_enable()/pwm_disable(). |
47 | 47 | ||
48 | Using PWMs with the sysfs interface | ||
49 | ----------------------------------- | ||
50 | |||
51 | If CONFIG_SYSFS is enabled in your kernel configuration a simple sysfs | ||
52 | interface is provided to use the PWMs from userspace. It is exposed at | ||
53 | /sys/class/pwm/. Each probed PWM controller/chip will be exported as | ||
54 | pwmchipN, where N is the base of the PWM chip. Inside the directory you | ||
55 | will find: | ||
56 | |||
57 | npwm - The number of PWM channels this chip supports (read-only). | ||
58 | |||
59 | export - Exports a PWM channel for use with sysfs (write-only). | ||
60 | |||
61 | unexport - Unexports a PWM channel from sysfs (write-only). | ||
62 | |||
63 | The PWM channels are numbered using a per-chip index from 0 to npwm-1. | ||
64 | |||
65 | When a PWM channel is exported a pwmX directory will be created in the | ||
66 | pwmchipN directory it is associated with, where X is the number of the | ||
67 | channel that was exported. The following properties will then be available: | ||
68 | |||
69 | period - The total period of the PWM signal (read/write). | ||
70 | Value is in nanoseconds and is the sum of the active and inactive | ||
71 | time of the PWM. | ||
72 | |||
73 | duty_cycle - The active time of the PWM signal (read/write). | ||
74 | Value is in nanoseconds and must be less than the period. | ||
75 | |||
76 | polarity - Changes the polarity of the PWM signal (read/write). | ||
77 | Writes to this property only work if the PWM chip supports changing | ||
78 | the polarity. The polarity can only be changed if the PWM is not | ||
79 | enabled. Value is the string "normal" or "inversed". | ||
80 | |||
81 | enable - Enable/disable the PWM signal (read/write). | ||
82 | 0 - disabled | ||
83 | 1 - enabled | ||
84 | |||
48 | Implementing a PWM driver | 85 | Implementing a PWM driver |
49 | ------------------------- | 86 | ------------------------- |
50 | 87 | ||
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/rapidio/rapidio.txt index c75694b35d08..717f5aa388b1 100644 --- a/Documentation/rapidio/rapidio.txt +++ b/Documentation/rapidio/rapidio.txt | |||
@@ -73,39 +73,175 @@ data structure. This structure includes lists of all devices and local master | |||
73 | ports that form the same network. It also contains a pointer to the default | 73 | ports that form the same network. It also contains a pointer to the default |
74 | master port that is used to communicate with devices within the network. | 74 | master port that is used to communicate with devices within the network. |
75 | 75 | ||
76 | 2.5 Device Drivers | ||
77 | |||
78 | RapidIO device-specific drivers follow Linux Kernel Driver Model and are | ||
79 | intended to support specific RapidIO devices attached to the RapidIO network. | ||
80 | |||
81 | 2.6 Subsystem Interfaces | ||
82 | |||
83 | RapidIO interconnect specification defines features that may be used to provide | ||
84 | one or more common service layers for all participating RapidIO devices. These | ||
85 | common services may act separately from device-specific drivers or be used by | ||
86 | device-specific drivers. Example of such service provider is the RIONET driver | ||
87 | which implements Ethernet-over-RapidIO interface. Because only one driver can be | ||
88 | registered for a device, all common RapidIO services have to be registered as | ||
89 | subsystem interfaces. This allows to have multiple common services attached to | ||
90 | the same device without blocking attachment of a device-specific driver. | ||
91 | |||
76 | 3. Subsystem Initialization | 92 | 3. Subsystem Initialization |
77 | --------------------------- | 93 | --------------------------- |
78 | 94 | ||
79 | In order to initialize the RapidIO subsystem, a platform must initialize and | 95 | In order to initialize the RapidIO subsystem, a platform must initialize and |
80 | register at least one master port within the RapidIO network. To register mport | 96 | register at least one master port within the RapidIO network. To register mport |
81 | within the subsystem controller driver initialization code calls function | 97 | within the subsystem controller driver's initialization code calls function |
82 | rio_register_mport() for each available master port. After all active master | 98 | rio_register_mport() for each available master port. |
83 | ports are registered with a RapidIO subsystem, the rio_init_mports() routine | 99 | |
84 | is called to perform enumeration and discovery. | 100 | After all active master ports are registered with a RapidIO subsystem, |
101 | an enumeration and/or discovery routine may be called automatically or | ||
102 | by user-space command. | ||
85 | 103 | ||
86 | In the current PowerPC-based implementation a subsys_initcall() is specified to | 104 | RapidIO subsystem can be configured to be built as a statically linked or |
87 | perform controller initialization and mport registration. At the end it directly | 105 | modular component of the kernel (see details below). |
88 | calls rio_init_mports() to execute RapidIO enumeration and discovery. | ||
89 | 106 | ||
90 | 4. Enumeration and Discovery | 107 | 4. Enumeration and Discovery |
91 | ---------------------------- | 108 | ---------------------------- |
92 | 109 | ||
93 | When rio_init_mports() is called it scans a list of registered master ports and | 110 | 4.1 Overview |
94 | calls an enumeration or discovery routine depending on the configured role of a | 111 | ------------ |
95 | master port: host or agent. | 112 | |
113 | RapidIO subsystem configuration options allow users to build enumeration and | ||
114 | discovery methods as statically linked components or loadable modules. | ||
115 | An enumeration/discovery method implementation and available input parameters | ||
116 | define how any given method can be attached to available RapidIO mports: | ||
117 | simply to all available mports OR individually to the specified mport device. | ||
118 | |||
119 | Depending on selected enumeration/discovery build configuration, there are | ||
120 | several methods to initiate an enumeration and/or discovery process: | ||
121 | |||
122 | (a) Statically linked enumeration and discovery process can be started | ||
123 | automatically during kernel initialization time using corresponding module | ||
124 | parameters. This was the original method used since introduction of RapidIO | ||
125 | subsystem. Now this method relies on enumerator module parameter which is | ||
126 | 'rio-scan.scan' for existing basic enumeration/discovery method. | ||
127 | When automatic start of enumeration/discovery is used a user has to ensure | ||
128 | that all discovering endpoints are started before the enumerating endpoint | ||
129 | and are waiting for enumeration to be completed. | ||
130 | Configuration option CONFIG_RAPIDIO_DISC_TIMEOUT defines time that discovering | ||
131 | endpoint waits for enumeration to be completed. If the specified timeout | ||
132 | expires the discovery process is terminated without obtaining RapidIO network | ||
133 | information. NOTE: a timed out discovery process may be restarted later using | ||
134 | a user-space command as it is described below (if the given endpoint was | ||
135 | enumerated successfully). | ||
136 | |||
137 | (b) Statically linked enumeration and discovery process can be started by | ||
138 | a command from user space. This initiation method provides more flexibility | ||
139 | for a system startup compared to the option (a) above. After all participating | ||
140 | endpoints have been successfully booted, an enumeration process shall be | ||
141 | started first by issuing a user-space command, after an enumeration is | ||
142 | completed a discovery process can be started on all remaining endpoints. | ||
143 | |||
144 | (c) Modular enumeration and discovery process can be started by a command from | ||
145 | user space. After an enumeration/discovery module is loaded, a network scan | ||
146 | process can be started by issuing a user-space command. | ||
147 | Similar to the option (b) above, an enumerator has to be started first. | ||
148 | |||
149 | (d) Modular enumeration and discovery process can be started by a module | ||
150 | initialization routine. In this case an enumerating module shall be loaded | ||
151 | first. | ||
152 | |||
153 | When a network scan process is started it calls an enumeration or discovery | ||
154 | routine depending on the configured role of a master port: host or agent. | ||
96 | 155 | ||
97 | Enumeration is performed by a master port if it is configured as a host port by | 156 | Enumeration is performed by a master port if it is configured as a host port by |
98 | assigning a host device ID greater than or equal to zero. A host device ID is | 157 | assigning a host destination ID greater than or equal to zero. The host |
99 | assigned to a master port through the kernel command line parameter "riohdid=", | 158 | destination ID can be assigned to a master port using various methods depending |
100 | or can be configured in a platform-specific manner. If the host device ID for | 159 | on RapidIO subsystem build configuration: |
101 | a specific master port is set to -1, the discovery process will be performed | 160 | |
102 | for it. | 161 | (a) For a statically linked RapidIO subsystem core use command line parameter |
162 | "rapidio.hdid=" with a list of destination ID assignments in order of mport | ||
163 | device registration. For example, in a system with two RapidIO controllers | ||
164 | the command line parameter "rapidio.hdid=-1,7" will result in assignment of | ||
165 | the host destination ID=7 to the second RapidIO controller, while the first | ||
166 | one will be assigned destination ID=-1. | ||
167 | |||
168 | (b) If the RapidIO subsystem core is built as a loadable module, in addition | ||
169 | to the method shown above, the host destination ID(s) can be specified using | ||
170 | traditional methods of passing module parameter "hdid=" during its loading: | ||
171 | - from command line: "modprobe rapidio hdid=-1,7", or | ||
172 | - from modprobe configuration file using configuration command "options", | ||
173 | like in this example: "options rapidio hdid=-1,7". An example of modprobe | ||
174 | configuration file is provided in the section below. | ||
175 | |||
176 | NOTES: | ||
177 | (i) if "hdid=" parameter is omitted all available mport will be assigned | ||
178 | destination ID = -1; | ||
179 | (ii) the "hdid=" parameter in systems with multiple mports can have | ||
180 | destination ID assignments omitted from the end of list (default = -1). | ||
181 | |||
182 | If the host device ID for a specific master port is set to -1, the discovery | ||
183 | process will be performed for it. | ||
103 | 184 | ||
104 | The enumeration and discovery routines use RapidIO maintenance transactions | 185 | The enumeration and discovery routines use RapidIO maintenance transactions |
105 | to access the configuration space of devices. | 186 | to access the configuration space of devices. |
106 | 187 | ||
107 | The enumeration process is implemented according to the enumeration algorithm | 188 | NOTE: If RapidIO switch-specific device drivers are built as loadable modules |
108 | outlined in the RapidIO Interconnect Specification: Annex I [1]. | 189 | they must be loaded before enumeration/discovery process starts. |
190 | This requirement is cased by the fact that enumeration/discovery methods invoke | ||
191 | vendor-specific callbacks on early stages. | ||
192 | |||
193 | 4.2 Automatic Start of Enumeration and Discovery | ||
194 | ------------------------------------------------ | ||
195 | |||
196 | Automatic enumeration/discovery start method is applicable only to built-in | ||
197 | enumeration/discovery RapidIO configuration selection. To enable automatic | ||
198 | enumeration/discovery start by existing basic enumerator method set use boot | ||
199 | command line parameter "rio-scan.scan=1". | ||
200 | |||
201 | This configuration requires synchronized start of all RapidIO endpoints that | ||
202 | form a network which will be enumerated/discovered. Discovering endpoints have | ||
203 | to be started before an enumeration starts to ensure that all RapidIO | ||
204 | controllers have been initialized and are ready to be discovered. Configuration | ||
205 | parameter CONFIG_RAPIDIO_DISC_TIMEOUT defines time (in seconds) which | ||
206 | a discovering endpoint will wait for enumeration to be completed. | ||
207 | |||
208 | When automatic enumeration/discovery start is selected, basic method's | ||
209 | initialization routine calls rio_init_mports() to perform enumeration or | ||
210 | discovery for all known mport devices. | ||
211 | |||
212 | Depending on RapidIO network size and configuration this automatic | ||
213 | enumeration/discovery start method may be difficult to use due to the | ||
214 | requirement for synchronized start of all endpoints. | ||
215 | |||
216 | 4.3 User-space Start of Enumeration and Discovery | ||
217 | ------------------------------------------------- | ||
218 | |||
219 | User-space start of enumeration and discovery can be used with built-in and | ||
220 | modular build configurations. For user-space controlled start RapidIO subsystem | ||
221 | creates the sysfs write-only attribute file '/sys/bus/rapidio/scan'. To initiate | ||
222 | an enumeration or discovery process on specific mport device, a user needs to | ||
223 | write mport_ID (not RapidIO destination ID) into that file. The mport_ID is a | ||
224 | sequential number (0 ... RIO_MAX_MPORTS) assigned during mport device | ||
225 | registration. For example for machine with single RapidIO controller, mport_ID | ||
226 | for that controller always will be 0. | ||
227 | |||
228 | To initiate RapidIO enumeration/discovery on all available mports a user may | ||
229 | write '-1' (or RIO_MPORT_ANY) into the scan attribute file. | ||
230 | |||
231 | 4.4 Basic Enumeration Method | ||
232 | ---------------------------- | ||
233 | |||
234 | This is an original enumeration/discovery method which is available since | ||
235 | first release of RapidIO subsystem code. The enumeration process is | ||
236 | implemented according to the enumeration algorithm outlined in the RapidIO | ||
237 | Interconnect Specification: Annex I [1]. | ||
238 | |||
239 | This method can be configured as statically linked or loadable module. | ||
240 | The method's single parameter "scan" allows to trigger the enumeration/discovery | ||
241 | process from module initialization routine. | ||
242 | |||
243 | This enumeration/discovery method can be started only once and does not support | ||
244 | unloading if it is built as a module. | ||
109 | 245 | ||
110 | The enumeration process traverses the network using a recursive depth-first | 246 | The enumeration process traverses the network using a recursive depth-first |
111 | algorithm. When a new device is found, the enumerator takes ownership of that | 247 | algorithm. When a new device is found, the enumerator takes ownership of that |
@@ -160,7 +296,49 @@ time period. If this wait time period expires before enumeration is completed, | |||
160 | an agent skips RapidIO discovery and continues with remaining kernel | 296 | an agent skips RapidIO discovery and continues with remaining kernel |
161 | initialization. | 297 | initialization. |
162 | 298 | ||
163 | 5. References | 299 | 4.5 Adding New Enumeration/Discovery Method |
300 | ------------------------------------------- | ||
301 | |||
302 | RapidIO subsystem code organization allows addition of new enumeration/discovery | ||
303 | methods as new configuration options without significant impact to to the core | ||
304 | RapidIO code. | ||
305 | |||
306 | A new enumeration/discovery method has to be attached to one or more mport | ||
307 | devices before an enumeration/discovery process can be started. Normally, | ||
308 | method's module initialization routine calls rio_register_scan() to attach | ||
309 | an enumerator to a specified mport device (or devices). The basic enumerator | ||
310 | implementation demonstrates this process. | ||
311 | |||
312 | 4.6 Using Loadable RapidIO Switch Drivers | ||
313 | ----------------------------------------- | ||
314 | |||
315 | In the case when RapidIO switch drivers are built as loadable modules a user | ||
316 | must ensure that they are loaded before the enumeration/discovery starts. | ||
317 | This process can be automated by specifying pre- or post- dependencies in the | ||
318 | RapidIO-specific modprobe configuration file as shown in the example below. | ||
319 | |||
320 | File /etc/modprobe.d/rapidio.conf: | ||
321 | ---------------------------------- | ||
322 | |||
323 | # Configure RapidIO subsystem modules | ||
324 | |||
325 | # Set enumerator host destination ID (overrides kernel command line option) | ||
326 | options rapidio hdid=-1,2 | ||
327 | |||
328 | # Load RapidIO switch drivers immediately after rapidio core module was loaded | ||
329 | softdep rapidio post: idt_gen2 idtcps tsi57x | ||
330 | |||
331 | # OR : | ||
332 | |||
333 | # Load RapidIO switch drivers just before rio-scan enumerator module is loaded | ||
334 | softdep rio-scan pre: idt_gen2 idtcps tsi57x | ||
335 | |||
336 | -------------------------- | ||
337 | |||
338 | NOTE: In the example above, one of "softdep" commands must be removed or | ||
339 | commented out to keep required module loading sequence. | ||
340 | |||
341 | A. References | ||
164 | ------------- | 342 | ------------- |
165 | 343 | ||
166 | [1] RapidIO Trade Association. RapidIO Interconnect Specifications. | 344 | [1] RapidIO Trade Association. RapidIO Interconnect Specifications. |
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/rapidio/sysfs.txt index 97f71ce575d6..271438c0617f 100644 --- a/Documentation/rapidio/sysfs.txt +++ b/Documentation/rapidio/sysfs.txt | |||
@@ -40,6 +40,7 @@ device_rev - returns the device revision level | |||
40 | (see 4.1 for switch specific details) | 40 | (see 4.1 for switch specific details) |
41 | lprev - returns name of previous device (switch) on the path to the device | 41 | lprev - returns name of previous device (switch) on the path to the device |
42 | that that owns this attribute | 42 | that that owns this attribute |
43 | modalias - returns the device modalias | ||
43 | 44 | ||
44 | In addition to the files listed above, each device has a binary attribute file | 45 | In addition to the files listed above, each device has a binary attribute file |
45 | that allows read/write access to the device configuration registers using | 46 | that allows read/write access to the device configuration registers using |
@@ -88,3 +89,20 @@ that exports additional attributes. | |||
88 | 89 | ||
89 | IDT_GEN2: | 90 | IDT_GEN2: |
90 | errlog - reads contents of device error log until it is empty. | 91 | errlog - reads contents of device error log until it is empty. |
92 | |||
93 | |||
94 | 5. RapidIO Bus Attributes | ||
95 | ------------------------- | ||
96 | |||
97 | RapidIO bus subdirectory /sys/bus/rapidio implements the following bus-specific | ||
98 | attribute: | ||
99 | |||
100 | scan - allows to trigger enumeration discovery process from user space. This | ||
101 | is a write-only attribute. To initiate an enumeration or discovery | ||
102 | process on specific mport device, a user needs to write mport_ID (not | ||
103 | RapidIO destination ID) into this file. The mport_ID is a sequential | ||
104 | number (0 ... RIO_MAX_MPORTS) assigned to the mport device. | ||
105 | For example, for a machine with a single RapidIO controller, mport_ID | ||
106 | for that controller always will be 0. | ||
107 | To initiate RapidIO enumeration/discovery on all available mports | ||
108 | a user must write '-1' (or RIO_MPORT_ANY) into this attribute file. | ||
diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt index 33ed8007a845..a5bcd7f5c33f 100644 --- a/Documentation/rt-mutex-design.txt +++ b/Documentation/rt-mutex-design.txt | |||
@@ -384,7 +384,7 @@ priority back. | |||
384 | __rt_mutex_adjust_prio examines the result of rt_mutex_getprio, and if the | 384 | __rt_mutex_adjust_prio examines the result of rt_mutex_getprio, and if the |
385 | result does not equal the task's current priority, then rt_mutex_setprio | 385 | result does not equal the task's current priority, then rt_mutex_setprio |
386 | is called to adjust the priority of the task to the new priority. | 386 | is called to adjust the priority of the task to the new priority. |
387 | Note that rt_mutex_setprio is defined in kernel/sched.c to implement the | 387 | Note that rt_mutex_setprio is defined in kernel/sched/core.c to implement the |
388 | actual change in priority. | 388 | actual change in priority. |
389 | 389 | ||
390 | It is interesting to note that __rt_mutex_adjust_prio can either increase | 390 | It is interesting to note that __rt_mutex_adjust_prio can either increase |
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 32aa4002de4a..596b60c08b74 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt | |||
@@ -153,9 +153,10 @@ since_epoch: The number of seconds since the epoch according to the RTC | |||
153 | time: RTC-provided time | 153 | time: RTC-provided time |
154 | wakealarm: The time at which the clock will generate a system wakeup | 154 | wakealarm: The time at which the clock will generate a system wakeup |
155 | event. This is a one shot wakeup event, so must be reset | 155 | event. This is a one shot wakeup event, so must be reset |
156 | after wake if a daily wakeup is required. Format is either | 156 | after wake if a daily wakeup is required. Format is seconds since |
157 | seconds since the epoch or, if there's a leading +, seconds | 157 | the epoch by default, or if there's a leading +, seconds in the |
158 | in the future. | 158 | future, or if there is a leading +=, seconds ahead of the current |
159 | alarm. | ||
159 | 160 | ||
160 | IOCTL INTERFACE | 161 | IOCTL INTERFACE |
161 | --------------- | 162 | --------------- |
diff --git a/Documentation/scheduler/sched-domains.txt b/Documentation/scheduler/sched-domains.txt index 443f0c76bab4..4af80b1c05aa 100644 --- a/Documentation/scheduler/sched-domains.txt +++ b/Documentation/scheduler/sched-domains.txt | |||
@@ -25,7 +25,7 @@ is treated as one entity. The load of a group is defined as the sum of the | |||
25 | load of each of its member CPUs, and only when the load of a group becomes | 25 | load of each of its member CPUs, and only when the load of a group becomes |
26 | out of balance are tasks moved between groups. | 26 | out of balance are tasks moved between groups. |
27 | 27 | ||
28 | In kernel/sched.c, trigger_load_balance() is run periodically on each CPU | 28 | In kernel/sched/core.c, trigger_load_balance() is run periodically on each CPU |
29 | through scheduler_tick(). It raises a softirq after the next regularly scheduled | 29 | through scheduler_tick(). It raises a softirq after the next regularly scheduled |
30 | rebalancing event for the current runqueue has arrived. The actual load | 30 | rebalancing event for the current runqueue has arrived. The actual load |
31 | balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run | 31 | balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run |
@@ -62,7 +62,7 @@ struct sched_domain fields, SD_FLAG_*, SD_*_INIT to get an idea of | |||
62 | the specifics and what to tune. | 62 | the specifics and what to tune. |
63 | 63 | ||
64 | Architectures may retain the regular override the default SD_*_INIT flags | 64 | Architectures may retain the regular override the default SD_*_INIT flags |
65 | while using the generic domain builder in kernel/sched.c if they wish to | 65 | while using the generic domain builder in kernel/sched/core.c if they wish to |
66 | retain the traditional SMT->SMP->NUMA topology (or some subset of that). This | 66 | retain the traditional SMT->SMP->NUMA topology (or some subset of that). This |
67 | can be done by #define'ing ARCH_HASH_SCHED_TUNE. | 67 | can be done by #define'ing ARCH_HASH_SCHED_TUNE. |
68 | 68 | ||
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 09673c7fc8ee..cc92ca8c8963 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,25 @@ | |||
1 | Release Date : Wed. May 15, 2013 17:00:00 PST 2013 - | ||
2 | (emaild-id:megaraidlinux@lsi.com) | ||
3 | Adam Radford | ||
4 | Kashyap Desai | ||
5 | Sumit Saxena | ||
6 | Current Version : 06.600.18.00-rc1 | ||
7 | Old Version : 06.506.00.00-rc1 | ||
8 | 1. Return DID_ERROR for scsi io, when controller is in critical h/w error. | ||
9 | 2. Fix the interrupt mask for Gen2 controller. | ||
10 | 3. Update balance count in driver to be in sync of firmware. | ||
11 | 4. Free event detail memory without device ID check. | ||
12 | 5. Set IO request timeout value provided by OS timeout for Tape devices. | ||
13 | 6. Add support for MegaRAID Fury (device ID-0x005f) 12Gb/s controllers. | ||
14 | 7. Add support to display Customer branding details in syslog. | ||
15 | 8. Set IoFlags to enable Fast Path for JBODs for Invader/Fury(12 Gb/s) | ||
16 | controllers. | ||
17 | 9. Add support for Extended MSI-x vectors for Invader and Fury(12Gb/s | ||
18 | HBA). | ||
19 | 10.Add support for Uneven Span PRL11. | ||
20 | 11.Add support to differentiate between iMR and MR Firmware. | ||
21 | 12.Version and Changelog update. | ||
22 | ------------------------------------------------------------------------------- | ||
1 | Release Date : Sat. Feb 9, 2013 17:00:00 PST 2013 - | 23 | Release Date : Sat. Feb 9, 2013 17:00:00 PST 2013 - |
2 | (emaild-id:megaraidlinux@lsi.com) | 24 | (emaild-id:megaraidlinux@lsi.com) |
3 | Adam Radford | 25 | Adam Radford |
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX index f7b0c7dc25ef..1f1b22fbd739 100644 --- a/Documentation/serial/00-INDEX +++ b/Documentation/serial/00-INDEX | |||
@@ -16,8 +16,6 @@ serial-rs485.txt | |||
16 | - info about RS485 structures and support in the kernel. | 16 | - info about RS485 structures and support in the kernel. |
17 | specialix.txt | 17 | specialix.txt |
18 | - info on hardware/driver for specialix IO8+ multiport serial card. | 18 | - info on hardware/driver for specialix IO8+ multiport serial card. |
19 | stallion.txt | ||
20 | - info on using the Stallion multiport serial driver. | ||
21 | sx.txt | 19 | sx.txt |
22 | - info on the Specialix SX/SI multiport serial driver. | 20 | - info on the Specialix SX/SI multiport serial driver. |
23 | tty.txt | 21 | tty.txt |
diff --git a/Documentation/serial/stallion.txt b/Documentation/serial/stallion.txt deleted file mode 100644 index 4d798c0cb5cb..000000000000 --- a/Documentation/serial/stallion.txt +++ /dev/null | |||
@@ -1,392 +0,0 @@ | |||
1 | * NOTE - This is an unmaintained driver. Lantronix, which bought Stallion | ||
2 | technologies, is not active in driver maintenance, and they have no information | ||
3 | on when or if they will have a 2.6 driver. | ||
4 | |||
5 | James Nelson <james4765@gmail.com> - 12-12-2004 | ||
6 | |||
7 | Stallion Multiport Serial Driver Readme | ||
8 | --------------------------------------- | ||
9 | |||
10 | Copyright (C) 1994-1999, Stallion Technologies. | ||
11 | |||
12 | Version: 5.5.1 | ||
13 | Date: 28MAR99 | ||
14 | |||
15 | |||
16 | |||
17 | 1. INTRODUCTION | ||
18 | |||
19 | There are two drivers that work with the different families of Stallion | ||
20 | multiport serial boards. One is for the Stallion smart boards - that is | ||
21 | EasyIO, EasyConnection 8/32 and EasyConnection 8/64-PCI, the other for | ||
22 | the true Stallion intelligent multiport boards - EasyConnection 8/64 | ||
23 | (ISA, EISA), EasyConnection/RA-PCI, ONboard and Brumby. | ||
24 | |||
25 | If you are using any of the Stallion intelligent multiport boards (Brumby, | ||
26 | ONboard, EasyConnection 8/64 (ISA, EISA), EasyConnection/RA-PCI) with | ||
27 | Linux you will need to get the driver utility package. This contains a | ||
28 | firmware loader and the firmware images necessary to make the devices operate. | ||
29 | |||
30 | The Stallion Technologies ftp site, ftp.stallion.com, will always have | ||
31 | the latest version of the driver utility package. | ||
32 | |||
33 | ftp://ftp.stallion.com/drivers/ata5/Linux/ata-linux-550.tar.gz | ||
34 | |||
35 | As of the printing of this document the latest version of the driver | ||
36 | utility package is 5.5.0. If a later version is now available then you | ||
37 | should use the latest version. | ||
38 | |||
39 | If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI | ||
40 | boards then you don't need this package, although it does have a serial stats | ||
41 | display program. | ||
42 | |||
43 | If you require DIP switch settings, or EISA configuration files, or any | ||
44 | other information related to Stallion boards then have a look at Stallion's | ||
45 | web pages at http://www.stallion.com. | ||
46 | |||
47 | |||
48 | |||
49 | 2. INSTALLATION | ||
50 | |||
51 | The drivers can be used as loadable modules or compiled into the kernel. | ||
52 | You can choose which when doing a "config" on the kernel. | ||
53 | |||
54 | All ISA, and EISA boards that you want to use need to be configured into | ||
55 | the driver(s). All PCI boards will be automatically detected when you load | ||
56 | the driver - so they do not need to be entered into the driver(s) | ||
57 | configuration structure. Note that kernel PCI support is required to use PCI | ||
58 | boards. | ||
59 | |||
60 | There are two methods of configuring ISA and EISA boards into the drivers. | ||
61 | If using the driver as a loadable module then the simplest method is to pass | ||
62 | the driver configuration as module arguments. The other method is to modify | ||
63 | the driver source to add configuration lines for each board in use. | ||
64 | |||
65 | If you have pre-built Stallion driver modules then the module argument | ||
66 | configuration method should be used. A lot of Linux distributions come with | ||
67 | pre-built driver modules in /lib/modules/X.Y.Z/misc for the kernel in use. | ||
68 | That makes things pretty simple to get going. | ||
69 | |||
70 | |||
71 | 2.1 MODULE DRIVER CONFIGURATION: | ||
72 | |||
73 | The simplest configuration for modules is to use the module load arguments | ||
74 | to configure any ISA or EISA boards. PCI boards are automatically | ||
75 | detected, so do not need any additional configuration at all. | ||
76 | |||
77 | If using EasyIO, EasyConnection 8/32 ISA, or EasyConnection 8/63-PCI | ||
78 | boards then use the "stallion" driver module, Otherwise if you are using | ||
79 | an EasyConnection 8/64 ISA or EISA, EasyConnection/RA-PCI, ONboard, | ||
80 | Brumby or original Stallion board then use the "istallion" driver module. | ||
81 | |||
82 | Typically to load up the smart board driver use: | ||
83 | |||
84 | modprobe stallion | ||
85 | |||
86 | This will load the EasyIO and EasyConnection 8/32 driver. It will output a | ||
87 | message to say that it loaded and print the driver version number. It will | ||
88 | also print out whether it found the configured boards or not. These messages | ||
89 | may not appear on the console, but typically are always logged to | ||
90 | /var/adm/messages or /var/log/syslog files - depending on how the klogd and | ||
91 | syslogd daemons are setup on your system. | ||
92 | |||
93 | To load the intelligent board driver use: | ||
94 | |||
95 | modprobe istallion | ||
96 | |||
97 | It will output similar messages to the smart board driver. | ||
98 | |||
99 | If not using an auto-detectable board type (that is a PCI board) then you | ||
100 | will also need to supply command line arguments to the modprobe command | ||
101 | when loading the driver. The general form of the configuration argument is | ||
102 | |||
103 | board?=<name>[,<ioaddr>[,<addr>][,<irq>]] | ||
104 | |||
105 | where: | ||
106 | |||
107 | board? -- specifies the arbitrary board number of this board, | ||
108 | can be in the range 0 to 3. | ||
109 | |||
110 | name -- textual name of this board. The board name is the common | ||
111 | board name, or any "shortened" version of that. The board | ||
112 | type number may also be used here. | ||
113 | |||
114 | ioaddr -- specifies the I/O address of this board. This argument is | ||
115 | optional, but should generally be specified. | ||
116 | |||
117 | addr -- optional second address argument. Some board types require | ||
118 | a second I/O address, some require a memory address. The | ||
119 | exact meaning of this argument depends on the board type. | ||
120 | |||
121 | irq -- optional IRQ line used by this board. | ||
122 | |||
123 | Up to 4 board configuration arguments can be specified on the load line. | ||
124 | Here is some examples: | ||
125 | |||
126 | modprobe stallion board0=easyio,0x2a0,5 | ||
127 | |||
128 | This configures an EasyIO board as board 0 at I/O address 0x2a0 and IRQ 5. | ||
129 | |||
130 | modprobe istallion board3=ec8/64,0x2c0,0xcc000 | ||
131 | |||
132 | This configures an EasyConnection 8/64 ISA as board 3 at I/O address 0x2c0 at | ||
133 | memory address 0xcc000. | ||
134 | |||
135 | modprobe stallion board1=ec8/32-at,0x2a0,0x280,10 | ||
136 | |||
137 | This configures an EasyConnection 8/32 ISA board at primary I/O address 0x2a0, | ||
138 | secondary address 0x280 and IRQ 10. | ||
139 | |||
140 | You will probably want to enter this module load and configuration information | ||
141 | into your system startup scripts so that the drivers are loaded and configured | ||
142 | on each system boot. Typically configuration files are put in the | ||
143 | /etc/modprobe.d/ directory. | ||
144 | |||
145 | |||
146 | 2.2 STATIC DRIVER CONFIGURATION: | ||
147 | |||
148 | For static driver configuration you need to modify the driver source code. | ||
149 | Entering ISA and EISA boards into the driver(s) configuration structure | ||
150 | involves editing the driver(s) source file. It's pretty easy if you follow | ||
151 | the instructions below. Both drivers can support up to 4 boards. The smart | ||
152 | card driver (the stallion.c driver) supports any combination of EasyIO and | ||
153 | EasyConnection 8/32 boards (up to a total of 4). The intelligent driver | ||
154 | supports any combination of ONboards, Brumbys, Stallions and EasyConnection | ||
155 | 8/64 (ISA and EISA) boards (up to a total of 4). | ||
156 | |||
157 | To set up the driver(s) for the boards that you want to use you need to | ||
158 | edit the appropriate driver file and add configuration entries. | ||
159 | |||
160 | If using EasyIO or EasyConnection 8/32 ISA boards, | ||
161 | In drivers/char/stallion.c: | ||
162 | - find the definition of the stl_brdconf array (of structures) | ||
163 | near the top of the file | ||
164 | - modify this to match the boards you are going to install | ||
165 | (the comments before this structure should help) | ||
166 | - save and exit | ||
167 | |||
168 | If using ONboard, Brumby, Stallion or EasyConnection 8/64 (ISA or EISA) | ||
169 | boards, | ||
170 | In drivers/char/istallion.c: | ||
171 | - find the definition of the stli_brdconf array (of structures) | ||
172 | near the top of the file | ||
173 | - modify this to match the boards you are going to install | ||
174 | (the comments before this structure should help) | ||
175 | - save and exit | ||
176 | |||
177 | Once you have set up the board configurations then you are ready to build | ||
178 | the kernel or modules. | ||
179 | |||
180 | When the new kernel is booted, or the loadable module loaded then the | ||
181 | driver will emit some kernel trace messages about whether the configured | ||
182 | boards were detected or not. Depending on how your system logger is set | ||
183 | up these may come out on the console, or just be logged to | ||
184 | /var/adm/messages or /var/log/syslog. You should check the messages to | ||
185 | confirm that all is well. | ||
186 | |||
187 | |||
188 | 2.3 SHARING INTERRUPTS | ||
189 | |||
190 | It is possible to share interrupts between multiple EasyIO and | ||
191 | EasyConnection 8/32 boards in an EISA system. To do this you must be using | ||
192 | static driver configuration, modifying the driver source code to add driver | ||
193 | configuration. Then a couple of extra things are required: | ||
194 | |||
195 | 1. When entering the board resources into the stallion.c file you need to | ||
196 | mark the boards as using level triggered interrupts. Do this by replacing | ||
197 | the "0" entry at field position 6 (the last field) in the board | ||
198 | configuration structure with a "1". (This is the structure that defines | ||
199 | the board type, I/O locations, etc. for each board). All boards that are | ||
200 | sharing an interrupt must be set this way, and each board should have the | ||
201 | same interrupt number specified here as well. Now build the module or | ||
202 | kernel as you would normally. | ||
203 | |||
204 | 2. When physically installing the boards into the system you must enter | ||
205 | the system EISA configuration utility. You will need to install the EISA | ||
206 | configuration files for *all* the EasyIO and EasyConnection 8/32 boards | ||
207 | that are sharing interrupts. The Stallion EasyIO and EasyConnection 8/32 | ||
208 | EISA configuration files required are supplied by Stallion Technologies | ||
209 | on the EASY Utilities floppy diskette (usually supplied in the box with | ||
210 | the board when purchased. If not, you can pick it up from Stallion's FTP | ||
211 | site, ftp.stallion.com). You will need to edit the board resources to | ||
212 | choose level triggered interrupts, and make sure to set each board's | ||
213 | interrupt to the same IRQ number. | ||
214 | |||
215 | You must complete both the above steps for this to work. When you reboot | ||
216 | or load the driver your EasyIO and EasyConnection 8/32 boards will be | ||
217 | sharing interrupts. | ||
218 | |||
219 | |||
220 | 2.4 USING HIGH SHARED MEMORY | ||
221 | |||
222 | The EasyConnection 8/64-EI, ONboard and Stallion boards are capable of | ||
223 | using shared memory addresses above the usual 640K - 1Mb range. The ONboard | ||
224 | ISA and the Stallion boards can be programmed to use memory addresses up to | ||
225 | 16Mb (the ISA bus addressing limit), and the EasyConnection 8/64-EI and | ||
226 | ONboard/E can be programmed for memory addresses up to 4Gb (the EISA bus | ||
227 | addressing limit). | ||
228 | |||
229 | The higher than 1Mb memory addresses are fully supported by this driver. | ||
230 | Just enter the address as you normally would for a lower than 1Mb address | ||
231 | (in the driver's board configuration structure). | ||
232 | |||
233 | |||
234 | |||
235 | 2.5 TROUBLE SHOOTING | ||
236 | |||
237 | If a board is not found by the driver but is actually in the system then the | ||
238 | most likely problem is that the I/O address is wrong. Change the module load | ||
239 | argument for the loadable module form. Or change it in the driver stallion.c | ||
240 | or istallion.c configuration structure and rebuild the kernel or modules, or | ||
241 | change it on the board. | ||
242 | |||
243 | On EasyIO and EasyConnection 8/32 boards the IRQ is software programmable, so | ||
244 | if there is a conflict you may need to change the IRQ used for a board. There | ||
245 | are no interrupts to worry about for ONboard, Brumby or EasyConnection 8/64 | ||
246 | (ISA and EISA) boards. The memory region on EasyConnection 8/64 and | ||
247 | ONboard boards is software programmable, but not on the Brumby boards. | ||
248 | |||
249 | |||
250 | |||
251 | 3. USING THE DRIVERS | ||
252 | |||
253 | 3.1 INTELLIGENT DRIVER OPERATION | ||
254 | |||
255 | The intelligent boards also need to have their "firmware" code downloaded | ||
256 | to them. This is done via a user level application supplied in the driver | ||
257 | utility package called "stlload". Compile this program wherever you dropped | ||
258 | the package files, by typing "make". In its simplest form you can then type | ||
259 | |||
260 | ./stlload -i cdk.sys | ||
261 | |||
262 | in this directory and that will download board 0 (assuming board 0 is an | ||
263 | EasyConnection 8/64 or EasyConnection/RA board). To download to an | ||
264 | ONboard, Brumby or Stallion do: | ||
265 | |||
266 | ./stlload -i 2681.sys | ||
267 | |||
268 | Normally you would want all boards to be downloaded as part of the standard | ||
269 | system startup. To achieve this, add one of the lines above into the | ||
270 | /etc/rc.d/rc.S or /etc/rc.d/rc.serial file. To download each board just add | ||
271 | the "-b <brd-number>" option to the line. You will need to download code for | ||
272 | every board. You should probably move the stlload program into a system | ||
273 | directory, such as /usr/sbin. Also, the default location of the cdk.sys image | ||
274 | file in the stlload down-loader is /usr/lib/stallion. Create that directory | ||
275 | and put the cdk.sys and 2681.sys files in it. (It's a convenient place to put | ||
276 | them anyway). As an example your /etc/rc.d/rc.S file might have the | ||
277 | following lines added to it (if you had 3 boards): | ||
278 | |||
279 | /usr/sbin/stlload -b 0 -i /usr/lib/stallion/cdk.sys | ||
280 | /usr/sbin/stlload -b 1 -i /usr/lib/stallion/2681.sys | ||
281 | /usr/sbin/stlload -b 2 -i /usr/lib/stallion/2681.sys | ||
282 | |||
283 | The image files cdk.sys and 2681.sys are specific to the board types. The | ||
284 | cdk.sys will only function correctly on an EasyConnection 8/64 board. Similarly | ||
285 | the 2681.sys image fill only operate on ONboard, Brumby and Stallion boards. | ||
286 | If you load the wrong image file into a board it will fail to start up, and | ||
287 | of course the ports will not be operational! | ||
288 | |||
289 | If you are using the modularized version of the driver you might want to put | ||
290 | the modprobe calls in the startup script as well (before the download lines | ||
291 | obviously). | ||
292 | |||
293 | |||
294 | 3.2 USING THE SERIAL PORTS | ||
295 | |||
296 | Once the driver is installed you will need to setup some device nodes to | ||
297 | access the serial ports. The simplest method is to use the /dev/MAKEDEV program. | ||
298 | It will automatically create device entries for Stallion boards. This will | ||
299 | create the normal serial port devices as /dev/ttyE# where# is the port number | ||
300 | starting from 0. A bank of 64 minor device numbers is allocated to each board, | ||
301 | so the first port on the second board is port 64,etc. A set of callout type | ||
302 | devices may also be created. They are created as the devices /dev/cue# where # | ||
303 | is the same as for the ttyE devices. | ||
304 | |||
305 | For the most part the Stallion driver tries to emulate the standard PC system | ||
306 | COM ports and the standard Linux serial driver. The idea is that you should | ||
307 | be able to use Stallion board ports and COM ports interchangeably without | ||
308 | modifying anything but the device name. Anything that doesn't work like that | ||
309 | should be considered a bug in this driver! | ||
310 | |||
311 | If you look at the driver code you will notice that it is fairly closely | ||
312 | based on the Linux serial driver (linux/drivers/char/serial.c). This is | ||
313 | intentional, obviously this is the easiest way to emulate its behavior! | ||
314 | |||
315 | Since this driver tries to emulate the standard serial ports as much as | ||
316 | possible, most system utilities should work as they do for the standard | ||
317 | COM ports. Most importantly "stty" works as expected and "setserial" can | ||
318 | also be used (excepting the ability to auto-configure the I/O and IRQ | ||
319 | addresses of boards). Higher baud rates are supported in the usual fashion | ||
320 | through setserial or using the CBAUDEX extensions. Note that the EasyIO and | ||
321 | EasyConnection (all types) support at least 57600 and 115200 baud. The newer | ||
322 | EasyConnection XP modules and new EasyIO boards support 230400 and 460800 | ||
323 | baud as well. The older boards including ONboard and Brumby support a | ||
324 | maximum baud rate of 38400. | ||
325 | |||
326 | If you are unfamiliar with how to use serial ports, then get the Serial-HOWTO | ||
327 | by Greg Hankins. It will explain everything you need to know! | ||
328 | |||
329 | |||
330 | |||
331 | 4. NOTES | ||
332 | |||
333 | You can use both drivers at once if you have a mix of board types installed | ||
334 | in a system. However to do this you will need to change the major numbers | ||
335 | used by one of the drivers. Currently both drivers use major numbers 24, 25 | ||
336 | and 28 for their devices. Change one driver to use some other major numbers, | ||
337 | and then modify the mkdevnods script to make device nodes based on those new | ||
338 | major numbers. For example, you could change the istallion.c driver to use | ||
339 | major numbers 60, 61 and 62. You will also need to create device nodes with | ||
340 | different names for the ports, for example ttyF# and cuf#. | ||
341 | |||
342 | The original Stallion board is no longer supported by Stallion Technologies. | ||
343 | Although it is known to work with the istallion driver. | ||
344 | |||
345 | Finding a free physical memory address range can be a problem. The older | ||
346 | boards like the Stallion and ONboard need large areas (64K or even 128K), so | ||
347 | they can be very difficult to get into a system. If you have 16 Mb of RAM | ||
348 | then you have no choice but to put them somewhere in the 640K -> 1Mb range. | ||
349 | ONboards require 64K, so typically 0xd0000 is good, or 0xe0000 on some | ||
350 | systems. If you have an original Stallion board, "V4.0" or Rev.O, then you | ||
351 | need a 64K memory address space, so again 0xd0000 and 0xe0000 are good. | ||
352 | Older Stallion boards are a much bigger problem. They need 128K of address | ||
353 | space and must be on a 128K boundary. If you don't have a VGA card then | ||
354 | 0xc0000 might be usable - there is really no other place you can put them | ||
355 | below 1Mb. | ||
356 | |||
357 | Both the ONboard and old Stallion boards can use higher memory addresses as | ||
358 | well, but you must have less than 16Mb of RAM to be able to use them. Usual | ||
359 | high memory addresses used include 0xec0000 and 0xf00000. | ||
360 | |||
361 | The Brumby boards only require 16Kb of address space, so you can usually | ||
362 | squeeze them in somewhere. Common addresses are 0xc8000, 0xcc000, or in | ||
363 | the 0xd0000 range. EasyConnection 8/64 boards are even better, they only | ||
364 | require 4Kb of address space, again usually 0xc8000, 0xcc000 or 0xd0000 | ||
365 | are good. | ||
366 | |||
367 | If you are using an EasyConnection 8/64-EI or ONboard/E then usually the | ||
368 | 0xd0000 or 0xe0000 ranges are the best options below 1Mb. If neither of | ||
369 | them can be used then the high memory support to use the really high address | ||
370 | ranges is the best option. Typically the 2Gb range is convenient for them, | ||
371 | and gets them well out of the way. | ||
372 | |||
373 | The ports of the EasyIO-8M board do not have DCD or DTR signals. So these | ||
374 | ports cannot be used as real modem devices. Generally, when using these | ||
375 | ports you should only use the cueX devices. | ||
376 | |||
377 | The driver utility package contains a couple of very useful programs. One | ||
378 | is a serial port statistics collection and display program - very handy | ||
379 | for solving serial port problems. The other is an extended option setting | ||
380 | program that works with the intelligent boards. | ||
381 | |||
382 | |||
383 | |||
384 | 5. DISCLAIMER | ||
385 | |||
386 | The information contained in this document is believed to be accurate and | ||
387 | reliable. However, no responsibility is assumed by Stallion Technologies | ||
388 | Pty. Ltd. for its use, nor any infringements of patents or other rights | ||
389 | of third parties resulting from its use. Stallion Technologies reserves | ||
390 | the right to modify the design of its products and will endeavour to change | ||
391 | the information in manuals and accompanying documentation accordingly. | ||
392 | |||
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index bb8b0dc532b8..809d72b8eff1 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -21,38 +21,41 @@ ALC267/268 | |||
21 | ========== | 21 | ========== |
22 | inv-dmic Inverted internal mic workaround | 22 | inv-dmic Inverted internal mic workaround |
23 | 23 | ||
24 | ALC269/270/275/276/280/282 | 24 | ALC269/270/275/276/28x/29x |
25 | ====== | 25 | ====== |
26 | laptop-amic Laptops with analog-mic input | 26 | laptop-amic Laptops with analog-mic input |
27 | laptop-dmic Laptops with digital-mic input | 27 | laptop-dmic Laptops with digital-mic input |
28 | alc269-dmic Enable ALC269(VA) digital mic workaround | 28 | alc269-dmic Enable ALC269(VA) digital mic workaround |
29 | alc271-dmic Enable ALC271X digital mic workaround | 29 | alc271-dmic Enable ALC271X digital mic workaround |
30 | inv-dmic Inverted internal mic workaround | 30 | inv-dmic Inverted internal mic workaround |
31 | lenovo-dock Enables docking station I/O for some Lenovos | 31 | lenovo-dock Enables docking station I/O for some Lenovos |
32 | 32 | dell-headset-multi Headset jack, which can also be used as mic-in | |
33 | ALC662/663/272 | 33 | dell-headset-dock Headset jack (without mic-in), and also dock I/O |
34 | |||
35 | ALC66x/67x/892 | ||
34 | ============== | 36 | ============== |
35 | mario Chromebook mario model fixup | 37 | mario Chromebook mario model fixup |
36 | asus-mode1 ASUS | 38 | asus-mode1 ASUS |
37 | asus-mode2 ASUS | 39 | asus-mode2 ASUS |
38 | asus-mode3 ASUS | 40 | asus-mode3 ASUS |
39 | asus-mode4 ASUS | 41 | asus-mode4 ASUS |
40 | asus-mode5 ASUS | 42 | asus-mode5 ASUS |
41 | asus-mode6 ASUS | 43 | asus-mode6 ASUS |
42 | asus-mode7 ASUS | 44 | asus-mode7 ASUS |
43 | asus-mode8 ASUS | 45 | asus-mode8 ASUS |
44 | inv-dmic Inverted internal mic workaround | 46 | inv-dmic Inverted internal mic workaround |
47 | dell-headset-multi Headset jack, which can also be used as mic-in | ||
45 | 48 | ||
46 | ALC680 | 49 | ALC680 |
47 | ====== | 50 | ====== |
48 | N/A | 51 | N/A |
49 | 52 | ||
50 | ALC882/883/885/888/889 | 53 | ALC88x/898/1150 |
51 | ====================== | 54 | ====================== |
52 | acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G | 55 | acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G |
53 | acer-aspire-8930g Acer Aspire 8330G/6935G | 56 | acer-aspire-8930g Acer Aspire 8330G/6935G |
54 | acer-aspire Acer Aspire others | 57 | acer-aspire Acer Aspire others |
55 | inv-dmic Inverted internal mic workaround | 58 | inv-dmic Inverted internal mic workaround |
56 | no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC) | 59 | no-primary-hp VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC) |
57 | 60 | ||
58 | ALC861/660 | 61 | ALC861/660 |
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt index 9dbe885ecd8d..97eaf5727178 100644 --- a/Documentation/spinlocks.txt +++ b/Documentation/spinlocks.txt | |||
@@ -137,7 +137,7 @@ don't block on each other (and thus there is no dead-lock wrt interrupts. | |||
137 | But when you do the write-lock, you have to use the irq-safe version. | 137 | But when you do the write-lock, you have to use the irq-safe version. |
138 | 138 | ||
139 | For an example of being clever with rw-locks, see the "waitqueue_lock" | 139 | For an example of being clever with rw-locks, see the "waitqueue_lock" |
140 | handling in kernel/sched.c - nothing ever _changes_ a wait-queue from | 140 | handling in kernel/sched/core.c - nothing ever _changes_ a wait-queue from |
141 | within an interrupt, they only read the queue in order to know whom to | 141 | within an interrupt, they only read the queue in order to know whom to |
142 | wake up. So read-locks are safe (which is good: they are very common | 142 | wake up. So read-locks are safe (which is good: they are very common |
143 | indeed), while write-locks need to protect themselves against interrupts. | 143 | indeed), while write-locks need to protect themselves against interrupts. |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index ccd42589e124..ab7d16efa96b 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -70,12 +70,12 @@ show up in /proc/sys/kernel: | |||
70 | - shmall | 70 | - shmall |
71 | - shmmax [ sysv ipc ] | 71 | - shmmax [ sysv ipc ] |
72 | - shmmni | 72 | - shmmni |
73 | - softlockup_thresh | ||
74 | - stop-a [ SPARC only ] | 73 | - stop-a [ SPARC only ] |
75 | - sysrq ==> Documentation/sysrq.txt | 74 | - sysrq ==> Documentation/sysrq.txt |
76 | - tainted | 75 | - tainted |
77 | - threads-max | 76 | - threads-max |
78 | - unknown_nmi_panic | 77 | - unknown_nmi_panic |
78 | - watchdog_thresh | ||
79 | - version | 79 | - version |
80 | 80 | ||
81 | ============================================================== | 81 | ============================================================== |
@@ -427,6 +427,32 @@ This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled. | |||
427 | 427 | ||
428 | ============================================================== | 428 | ============================================================== |
429 | 429 | ||
430 | perf_cpu_time_max_percent: | ||
431 | |||
432 | Hints to the kernel how much CPU time it should be allowed to | ||
433 | use to handle perf sampling events. If the perf subsystem | ||
434 | is informed that its samples are exceeding this limit, it | ||
435 | will drop its sampling frequency to attempt to reduce its CPU | ||
436 | usage. | ||
437 | |||
438 | Some perf sampling happens in NMIs. If these samples | ||
439 | unexpectedly take too long to execute, the NMIs can become | ||
440 | stacked up next to each other so much that nothing else is | ||
441 | allowed to execute. | ||
442 | |||
443 | 0: disable the mechanism. Do not monitor or correct perf's | ||
444 | sampling rate no matter how CPU time it takes. | ||
445 | |||
446 | 1-100: attempt to throttle perf's sample rate to this | ||
447 | percentage of CPU. Note: the kernel calculates an | ||
448 | "expected" length of each sample event. 100 here means | ||
449 | 100% of that expected length. Even if this is set to | ||
450 | 100, you may still see sample throttling if this | ||
451 | length is exceeded. Set to 0 if you truly do not care | ||
452 | how much CPU is consumed. | ||
453 | |||
454 | ============================================================== | ||
455 | |||
430 | 456 | ||
431 | pid_max: | 457 | pid_max: |
432 | 458 | ||
@@ -604,15 +630,6 @@ without users and with a dead originative process will be destroyed. | |||
604 | 630 | ||
605 | ============================================================== | 631 | ============================================================== |
606 | 632 | ||
607 | softlockup_thresh: | ||
608 | |||
609 | This value can be used to lower the softlockup tolerance threshold. The | ||
610 | default threshold is 60 seconds. If a cpu is locked up for 60 seconds, | ||
611 | the kernel complains. Valid values are 1-60 seconds. Setting this | ||
612 | tunable to zero will disable the softlockup detection altogether. | ||
613 | |||
614 | ============================================================== | ||
615 | |||
616 | tainted: | 633 | tainted: |
617 | 634 | ||
618 | Non-zero if the kernel has been tainted. Numeric values, which | 635 | Non-zero if the kernel has been tainted. Numeric values, which |
@@ -648,3 +665,16 @@ that time, kernel debugging information is displayed on console. | |||
648 | 665 | ||
649 | NMI switch that most IA32 servers have fires unknown NMI up, for | 666 | NMI switch that most IA32 servers have fires unknown NMI up, for |
650 | example. If a system hangs up, try pressing the NMI switch. | 667 | example. If a system hangs up, try pressing the NMI switch. |
668 | |||
669 | ============================================================== | ||
670 | |||
671 | watchdog_thresh: | ||
672 | |||
673 | This value can be used to control the frequency of hrtimer and NMI | ||
674 | events and the soft and hard lockup thresholds. The default threshold | ||
675 | is 10 seconds. | ||
676 | |||
677 | The softlockup threshold is (2 * watchdog_thresh). Setting this | ||
678 | tunable to zero will disable lockup detection altogether. | ||
679 | |||
680 | ============================================================== | ||
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt index 98335b7a5337..d69e14c9002c 100644 --- a/Documentation/sysctl/net.txt +++ b/Documentation/sysctl/net.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | Documentation for /proc/sys/net/* kernel version 2.4.0-test11-pre4 | 1 | Documentation for /proc/sys/net/* |
2 | (c) 1999 Terrehon Bowden <terrehon@pacbell.net> | 2 | (c) 1999 Terrehon Bowden <terrehon@pacbell.net> |
3 | Bodo Bauer <bb@ricochet.net> | 3 | Bodo Bauer <bb@ricochet.net> |
4 | (c) 2000 Jorge Nerin <comandante@zaralinux.com> | 4 | (c) 2000 Jorge Nerin <comandante@zaralinux.com> |
@@ -9,10 +9,10 @@ For general info and legal blurb, please look in README. | |||
9 | ============================================================== | 9 | ============================================================== |
10 | 10 | ||
11 | This file contains the documentation for the sysctl files in | 11 | This file contains the documentation for the sysctl files in |
12 | /proc/sys/net and is valid for Linux kernel version 2.4.0-test11-pre4. | 12 | /proc/sys/net |
13 | 13 | ||
14 | The interface to the networking parts of the kernel is located in | 14 | The interface to the networking parts of the kernel is located in |
15 | /proc/sys/net. The following table shows all possible subdirectories.You may | 15 | /proc/sys/net. The following table shows all possible subdirectories. You may |
16 | see only some of them, depending on your kernel's configuration. | 16 | see only some of them, depending on your kernel's configuration. |
17 | 17 | ||
18 | 18 | ||
@@ -26,7 +26,7 @@ Table : Subdirectories in /proc/sys/net | |||
26 | ipv4 IP version 4 x25 X.25 protocol | 26 | ipv4 IP version 4 x25 X.25 protocol |
27 | ipx IPX token-ring IBM token ring | 27 | ipx IPX token-ring IBM token ring |
28 | bridge Bridging decnet DEC net | 28 | bridge Bridging decnet DEC net |
29 | ipv6 IP version 6 | 29 | ipv6 IP version 6 tipc TIPC |
30 | .............................................................................. | 30 | .............................................................................. |
31 | 31 | ||
32 | 1. /proc/sys/net/core - Network core options | 32 | 1. /proc/sys/net/core - Network core options |
@@ -50,6 +50,29 @@ The maximum number of packets that kernel can handle on a NAPI interrupt, | |||
50 | it's a Per-CPU variable. | 50 | it's a Per-CPU variable. |
51 | Default: 64 | 51 | Default: 64 |
52 | 52 | ||
53 | low_latency_read | ||
54 | ---------------- | ||
55 | Low latency busy poll timeout for socket reads. (needs CONFIG_NET_LL_RX_POLL) | ||
56 | Approximate time in us to busy loop waiting for packets on the device queue. | ||
57 | This sets the default value of the SO_LL socket option. | ||
58 | Can be set or overridden per socket by setting socket option SO_LL, which is | ||
59 | the preferred method of enabling. | ||
60 | If you need to enable the feature globally via sysctl, a value of 50 is recommended. | ||
61 | Will increase power usage. | ||
62 | Default: 0 (off) | ||
63 | |||
64 | low_latency_poll | ||
65 | ---------------- | ||
66 | Low latency busy poll timeout for poll and select. (needs CONFIG_NET_LL_RX_POLL) | ||
67 | Approximate time in us to busy loop waiting for events. | ||
68 | Recommended value depends on the number of sockets you poll on. | ||
69 | For several sockets 50, for several hundreds 100. | ||
70 | For more than that you probably want to use epoll. | ||
71 | Note that only sockets with SO_LL set will be busy polled, so you want to either | ||
72 | selectively set SO_LL on those sockets or set sysctl.net.low_latency_read globally. | ||
73 | Will increase power usage. | ||
74 | Default: 0 (off) | ||
75 | |||
53 | rmem_default | 76 | rmem_default |
54 | ------------ | 77 | ------------ |
55 | 78 | ||
@@ -93,8 +116,7 @@ netdev_budget | |||
93 | 116 | ||
94 | Maximum number of packets taken from all interfaces in one polling cycle (NAPI | 117 | Maximum number of packets taken from all interfaces in one polling cycle (NAPI |
95 | poll). In one polling cycle interfaces which are registered to polling are | 118 | poll). In one polling cycle interfaces which are registered to polling are |
96 | probed in a round-robin manner. The limit of packets in one such probe can be | 119 | probed in a round-robin manner. |
97 | set per-device via sysfs class/net/<device>/weight . | ||
98 | 120 | ||
99 | netdev_max_backlog | 121 | netdev_max_backlog |
100 | ------------------ | 122 | ------------------ |
@@ -201,3 +223,18 @@ IPX. | |||
201 | The /proc/net/ipx_route table holds a list of IPX routes. For each route it | 223 | The /proc/net/ipx_route table holds a list of IPX routes. For each route it |
202 | gives the destination network, the router node (or Directly) and the network | 224 | gives the destination network, the router node (or Directly) and the network |
203 | address of the router (or Connected) for internal networks. | 225 | address of the router (or Connected) for internal networks. |
226 | |||
227 | 6. TIPC | ||
228 | ------------------------------------------------------- | ||
229 | |||
230 | The TIPC protocol now has a tunable for the receive memory, similar to the | ||
231 | tcp_rmem - i.e. a vector of 3 INTEGERs: (min, default, max) | ||
232 | |||
233 | # cat /proc/sys/net/tipc/tipc_rmem | ||
234 | 4252725 34021800 68043600 | ||
235 | # | ||
236 | |||
237 | The max value is set to CONN_OVERLOAD_LIMIT, and the default and min values | ||
238 | are scaled (shifted) versions of that same value. Note that the min value | ||
239 | is not at this point in time used in any meaningful way, but the triplet is | ||
240 | preserved in order to be consistent with things like tcp_rmem. | ||
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index dcc75a9ed919..36ecc26c7433 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -510,7 +510,7 @@ Specify "[Dd]efault" to request automatic configuration. Autoconfiguration | |||
510 | will select "node" order in following case. | 510 | will select "node" order in following case. |
511 | (1) if the DMA zone does not exist or | 511 | (1) if the DMA zone does not exist or |
512 | (2) if the DMA zone comprises greater than 50% of the available memory or | 512 | (2) if the DMA zone comprises greater than 50% of the available memory or |
513 | (3) if any node's DMA zone comprises greater than 60% of its local memory and | 513 | (3) if any node's DMA zone comprises greater than 70% of its local memory and |
514 | the amount of local memory is big enough. | 514 | the amount of local memory is big enough. |
515 | 515 | ||
516 | Otherwise, "zone" order will be selected. Default order is recommended unless | 516 | Otherwise, "zone" order will be selected. Default order is recommended unless |
diff --git a/Documentation/thermal/exynos_thermal_emulation b/Documentation/thermal/exynos_thermal_emulation index 36a3e79c1203..b15efec6ca28 100644 --- a/Documentation/thermal/exynos_thermal_emulation +++ b/Documentation/thermal/exynos_thermal_emulation | |||
@@ -20,7 +20,7 @@ When it's enabled, sysfs node will be created as | |||
20 | The sysfs node, 'emul_node', will contain value 0 for the initial state. When you input any | 20 | The sysfs node, 'emul_node', will contain value 0 for the initial state. When you input any |
21 | temperature you want to update to sysfs node, it automatically enable emulation mode and | 21 | temperature you want to update to sysfs node, it automatically enable emulation mode and |
22 | current temperature will be changed into it. | 22 | current temperature will be changed into it. |
23 | (Exynos also supports user changable delay time which would be used to delay of | 23 | (Exynos also supports user changeable delay time which would be used to delay of |
24 | changing temperature. However, this node only uses same delay of real sensing time, 938us.) | 24 | changing temperature. However, this node only uses same delay of real sensing time, 938us.) |
25 | 25 | ||
26 | Exynos emulation mode requires synchronous of value changing and enabling. It means when you | 26 | Exynos emulation mode requires synchronous of value changing and enabling. It means when you |
diff --git a/Documentation/thermal/x86_pkg_temperature_thermal b/Documentation/thermal/x86_pkg_temperature_thermal new file mode 100644 index 000000000000..17a3a4c0a0ca --- /dev/null +++ b/Documentation/thermal/x86_pkg_temperature_thermal | |||
@@ -0,0 +1,47 @@ | |||
1 | Kernel driver: x86_pkg_temp_thermal | ||
2 | =================== | ||
3 | |||
4 | Supported chips: | ||
5 | * x86: with package level thermal management | ||
6 | (Verify using: CPUID.06H:EAX[bit 6] =1) | ||
7 | |||
8 | Authors: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | ||
9 | |||
10 | Reference | ||
11 | --- | ||
12 | Intel® 64 and IA-32 Architectures Software Developer’s Manual (Jan, 2013): | ||
13 | Chapter 14.6: PACKAGE LEVEL THERMAL MANAGEMENT | ||
14 | |||
15 | Description | ||
16 | --------- | ||
17 | |||
18 | This driver register CPU digital temperature package level sensor as a thermal | ||
19 | zone with maximum two user mode configurable trip points. Number of trip points | ||
20 | depends on the capability of the package. Once the trip point is violated, | ||
21 | user mode can receive notification via thermal notification mechanism and can | ||
22 | take any action to control temperature. | ||
23 | |||
24 | |||
25 | Threshold management | ||
26 | -------------------- | ||
27 | Each package will register as a thermal zone under /sys/class/thermal. | ||
28 | Example: | ||
29 | /sys/class/thermal/thermal_zone1 | ||
30 | |||
31 | This contains two trip points: | ||
32 | - trip_point_0_temp | ||
33 | - trip_point_1_temp | ||
34 | |||
35 | User can set any temperature between 0 to TJ-Max temperature. Temperature units | ||
36 | are in milli-degree Celsius. Refer to "Documentation/thermal/sysfs-api.txt" for | ||
37 | thermal sys-fs details. | ||
38 | |||
39 | Any value other than 0 in these trip points, can trigger thermal notifications. | ||
40 | Setting 0, stops sending thermal notifications. | ||
41 | |||
42 | Thermal notifications: To get kobject-uevent notifications, set the thermal zone | ||
43 | policy to "user_space". For example: echo -n "user_space" > policy | ||
44 | |||
45 | |||
46 | |||
47 | |||
diff --git a/Documentation/timers/NO_HZ.txt b/Documentation/timers/NO_HZ.txt index 5b5322024067..88697584242b 100644 --- a/Documentation/timers/NO_HZ.txt +++ b/Documentation/timers/NO_HZ.txt | |||
@@ -7,21 +7,59 @@ efficiency and reducing OS jitter. Reducing OS jitter is important for | |||
7 | some types of computationally intensive high-performance computing (HPC) | 7 | some types of computationally intensive high-performance computing (HPC) |
8 | applications and for real-time applications. | 8 | applications and for real-time applications. |
9 | 9 | ||
10 | There are two main contexts in which the number of scheduling-clock | 10 | There are three main ways of managing scheduling-clock interrupts |
11 | interrupts can be reduced compared to the old-school approach of sending | 11 | (also known as "scheduling-clock ticks" or simply "ticks"): |
12 | a scheduling-clock interrupt to all CPUs every jiffy whether they need | ||
13 | it or not (CONFIG_HZ_PERIODIC=y or CONFIG_NO_HZ=n for older kernels): | ||
14 | 12 | ||
15 | 1. Idle CPUs (CONFIG_NO_HZ_IDLE=y or CONFIG_NO_HZ=y for older kernels). | 13 | 1. Never omit scheduling-clock ticks (CONFIG_HZ_PERIODIC=y or |
14 | CONFIG_NO_HZ=n for older kernels). You normally will -not- | ||
15 | want to choose this option. | ||
16 | 16 | ||
17 | 2. CPUs having only one runnable task (CONFIG_NO_HZ_FULL=y). | 17 | 2. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or |
18 | CONFIG_NO_HZ=y for older kernels). This is the most common | ||
19 | approach, and should be the default. | ||
18 | 20 | ||
19 | These two cases are described in the following two sections, followed | 21 | 3. Omit scheduling-clock ticks on CPUs that are either idle or that |
22 | have only one runnable task (CONFIG_NO_HZ_FULL=y). Unless you | ||
23 | are running realtime applications or certain types of HPC | ||
24 | workloads, you will normally -not- want this option. | ||
25 | |||
26 | These three cases are described in the following three sections, followed | ||
20 | by a third section on RCU-specific considerations and a fourth and final | 27 | by a third section on RCU-specific considerations and a fourth and final |
21 | section listing known issues. | 28 | section listing known issues. |
22 | 29 | ||
23 | 30 | ||
24 | IDLE CPUs | 31 | NEVER OMIT SCHEDULING-CLOCK TICKS |
32 | |||
33 | Very old versions of Linux from the 1990s and the very early 2000s | ||
34 | are incapable of omitting scheduling-clock ticks. It turns out that | ||
35 | there are some situations where this old-school approach is still the | ||
36 | right approach, for example, in heavy workloads with lots of tasks | ||
37 | that use short bursts of CPU, where there are very frequent idle | ||
38 | periods, but where these idle periods are also quite short (tens or | ||
39 | hundreds of microseconds). For these types of workloads, scheduling | ||
40 | clock interrupts will normally be delivered any way because there | ||
41 | will frequently be multiple runnable tasks per CPU. In these cases, | ||
42 | attempting to turn off the scheduling clock interrupt will have no effect | ||
43 | other than increasing the overhead of switching to and from idle and | ||
44 | transitioning between user and kernel execution. | ||
45 | |||
46 | This mode of operation can be selected using CONFIG_HZ_PERIODIC=y (or | ||
47 | CONFIG_NO_HZ=n for older kernels). | ||
48 | |||
49 | However, if you are instead running a light workload with long idle | ||
50 | periods, failing to omit scheduling-clock interrupts will result in | ||
51 | excessive power consumption. This is especially bad on battery-powered | ||
52 | devices, where it results in extremely short battery lifetimes. If you | ||
53 | are running light workloads, you should therefore read the following | ||
54 | section. | ||
55 | |||
56 | In addition, if you are running either a real-time workload or an HPC | ||
57 | workload with short iterations, the scheduling-clock interrupts can | ||
58 | degrade your applications performance. If this describes your workload, | ||
59 | you should read the following two sections. | ||
60 | |||
61 | |||
62 | OMIT SCHEDULING-CLOCK TICKS FOR IDLE CPUs | ||
25 | 63 | ||
26 | If a CPU is idle, there is little point in sending it a scheduling-clock | 64 | If a CPU is idle, there is little point in sending it a scheduling-clock |
27 | interrupt. After all, the primary purpose of a scheduling-clock interrupt | 65 | interrupt. After all, the primary purpose of a scheduling-clock interrupt |
@@ -59,10 +97,12 @@ By default, CONFIG_NO_HZ_IDLE=y kernels boot with "nohz=on", enabling | |||
59 | dyntick-idle mode. | 97 | dyntick-idle mode. |
60 | 98 | ||
61 | 99 | ||
62 | CPUs WITH ONLY ONE RUNNABLE TASK | 100 | OMIT SCHEDULING-CLOCK TICKS FOR CPUs WITH ONLY ONE RUNNABLE TASK |
63 | 101 | ||
64 | If a CPU has only one runnable task, there is little point in sending it | 102 | If a CPU has only one runnable task, there is little point in sending it |
65 | a scheduling-clock interrupt because there is no other task to switch to. | 103 | a scheduling-clock interrupt because there is no other task to switch to. |
104 | Note that omitting scheduling-clock ticks for CPUs with only one runnable | ||
105 | task implies also omitting them for idle CPUs. | ||
66 | 106 | ||
67 | The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid | 107 | The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid |
68 | sending scheduling-clock interrupts to CPUs with a single runnable task, | 108 | sending scheduling-clock interrupts to CPUs with a single runnable task, |
@@ -238,6 +278,11 @@ o Adaptive-ticks does not do anything unless there is only one | |||
238 | single runnable SCHED_FIFO task and multiple runnable SCHED_OTHER | 278 | single runnable SCHED_FIFO task and multiple runnable SCHED_OTHER |
239 | tasks, even though these interrupts are unnecessary. | 279 | tasks, even though these interrupts are unnecessary. |
240 | 280 | ||
281 | And even when there are multiple runnable tasks on a given CPU, | ||
282 | there is little point in interrupting that CPU until the current | ||
283 | running task's timeslice expires, which is almost always way | ||
284 | longer than the time of the next scheduling-clock interrupt. | ||
285 | |||
241 | Better handling of these sorts of situations is future work. | 286 | Better handling of these sorts of situations is future work. |
242 | 287 | ||
243 | o A reboot is required to reconfigure both adaptive idle and RCU | 288 | o A reboot is required to reconfigure both adaptive idle and RCU |
@@ -268,6 +313,16 @@ o Unless all CPUs are idle, at least one CPU must keep the | |||
268 | scheduling-clock interrupt going in order to support accurate | 313 | scheduling-clock interrupt going in order to support accurate |
269 | timekeeping. | 314 | timekeeping. |
270 | 315 | ||
271 | o If there are adaptive-ticks CPUs, there will be at least one | 316 | o If there might potentially be some adaptive-ticks CPUs, there |
272 | CPU keeping the scheduling-clock interrupt going, even if all | 317 | will be at least one CPU keeping the scheduling-clock interrupt |
273 | CPUs are otherwise idle. | 318 | going, even if all CPUs are otherwise idle. |
319 | |||
320 | Better handling of this situation is ongoing work. | ||
321 | |||
322 | o Some process-handling operations still require the occasional | ||
323 | scheduling-clock tick. These operations include calculating CPU | ||
324 | load, maintaining sched average, computing CFS entity vruntime, | ||
325 | computing avenrun, and carrying out load balancing. They are | ||
326 | currently accommodated by scheduling-clock tick every second | ||
327 | or so. On-going work will eliminate the need even for these | ||
328 | infrequent scheduling-clock ticks. | ||
diff --git a/Documentation/trace/events-nmi.txt b/Documentation/trace/events-nmi.txt new file mode 100644 index 000000000000..c03c8c89f08d --- /dev/null +++ b/Documentation/trace/events-nmi.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | NMI Trace Events | ||
2 | |||
3 | These events normally show up here: | ||
4 | |||
5 | /sys/kernel/debug/tracing/events/nmi | ||
6 | |||
7 | -- | ||
8 | |||
9 | nmi_handler: | ||
10 | |||
11 | You might want to use this tracepoint if you suspect that your | ||
12 | NMI handlers are hogging large amounts of CPU time. The kernel | ||
13 | will warn if it sees long-running handlers: | ||
14 | |||
15 | INFO: NMI handler took too long to run: 9.207 msecs | ||
16 | |||
17 | and this tracepoint will allow you to drill down and get some | ||
18 | more details. | ||
19 | |||
20 | Let's say you suspect that perf_event_nmi_handler() is causing | ||
21 | you some problems and you only want to trace that handler | ||
22 | specifically. You need to find its address: | ||
23 | |||
24 | $ grep perf_event_nmi_handler /proc/kallsyms | ||
25 | ffffffff81625600 t perf_event_nmi_handler | ||
26 | |||
27 | Let's also say you are only interested in when that function is | ||
28 | really hogging a lot of CPU time, like a millisecond at a time. | ||
29 | Note that the kernel's output is in milliseconds, but the input | ||
30 | to the filter is in nanoseconds! You can filter on 'delta_ns': | ||
31 | |||
32 | cd /sys/kernel/debug/tracing/events/nmi/nmi_handler | ||
33 | echo 'handler==0xffffffff81625600 && delta_ns>1000000' > filter | ||
34 | echo 1 > enable | ||
35 | |||
36 | Your output would then look like: | ||
37 | |||
38 | $ cat /sys/kernel/debug/tracing/trace_pipe | ||
39 | <idle>-0 [000] d.h3 505.397558: nmi_handler: perf_event_nmi_handler() delta_ns: 3236765 handled: 1 | ||
40 | <idle>-0 [000] d.h3 505.805893: nmi_handler: perf_event_nmi_handler() delta_ns: 3174234 handled: 1 | ||
41 | <idle>-0 [000] d.h3 506.158206: nmi_handler: perf_event_nmi_handler() delta_ns: 3084642 handled: 1 | ||
42 | <idle>-0 [000] d.h3 506.334346: nmi_handler: perf_event_nmi_handler() delta_ns: 3080351 handled: 1 | ||
43 | |||
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt index e1498ff8cf94..3bd33b8dc7c4 100644 --- a/Documentation/trace/events-power.txt +++ b/Documentation/trace/events-power.txt | |||
@@ -63,3 +63,34 @@ power_domain_target "%s state=%lu cpu_id=%lu" | |||
63 | The first parameter gives the power domain name (e.g. "mpu_pwrdm"). | 63 | The first parameter gives the power domain name (e.g. "mpu_pwrdm"). |
64 | The second parameter is the power domain target state. | 64 | The second parameter is the power domain target state. |
65 | 65 | ||
66 | 4. PM QoS events | ||
67 | ================ | ||
68 | The PM QoS events are used for QoS add/update/remove request and for | ||
69 | target/flags update. | ||
70 | |||
71 | pm_qos_add_request "pm_qos_class=%s value=%d" | ||
72 | pm_qos_update_request "pm_qos_class=%s value=%d" | ||
73 | pm_qos_remove_request "pm_qos_class=%s value=%d" | ||
74 | pm_qos_update_request_timeout "pm_qos_class=%s value=%d, timeout_us=%ld" | ||
75 | |||
76 | The first parameter gives the QoS class name (e.g. "CPU_DMA_LATENCY"). | ||
77 | The second parameter is value to be added/updated/removed. | ||
78 | The third parameter is timeout value in usec. | ||
79 | |||
80 | pm_qos_update_target "action=%s prev_value=%d curr_value=%d" | ||
81 | pm_qos_update_flags "action=%s prev_value=0x%x curr_value=0x%x" | ||
82 | |||
83 | The first parameter gives the QoS action name (e.g. "ADD_REQ"). | ||
84 | The second parameter is the previous QoS value. | ||
85 | The third parameter is the current QoS value to update. | ||
86 | |||
87 | And, there are also events used for device PM QoS add/update/remove request. | ||
88 | |||
89 | dev_pm_qos_add_request "device=%s type=%s new_value=%d" | ||
90 | dev_pm_qos_update_request "device=%s type=%s new_value=%d" | ||
91 | dev_pm_qos_remove_request "device=%s type=%s new_value=%d" | ||
92 | |||
93 | The first parameter gives the device name which tries to add/update/remove | ||
94 | QoS requests. | ||
95 | The second parameter gives the request type (e.g. "DEV_PM_QOS_LATENCY"). | ||
96 | The third parameter is value to be added/updated/removed. | ||
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt index bb24c2a0e870..37732a220d33 100644 --- a/Documentation/trace/events.txt +++ b/Documentation/trace/events.txt | |||
@@ -183,13 +183,22 @@ The relational-operators depend on the type of the field being tested: | |||
183 | 183 | ||
184 | The operators available for numeric fields are: | 184 | The operators available for numeric fields are: |
185 | 185 | ||
186 | ==, !=, <, <=, >, >= | 186 | ==, !=, <, <=, >, >=, & |
187 | 187 | ||
188 | And for string fields they are: | 188 | And for string fields they are: |
189 | 189 | ||
190 | ==, != | 190 | ==, !=, ~ |
191 | 191 | ||
192 | Currently, only exact string matches are supported. | 192 | The glob (~) only accepts a wild card character (*) at the start and or |
193 | end of the string. For example: | ||
194 | |||
195 | prev_comm ~ "*sh" | ||
196 | prev_comm ~ "sh*" | ||
197 | prev_comm ~ "*sh*" | ||
198 | |||
199 | But does not allow for it to be within the string: | ||
200 | |||
201 | prev_comm ~ "ba*sh" <-- is invalid | ||
193 | 202 | ||
194 | 5.2 Setting filters | 203 | 5.2 Setting filters |
195 | ------------------- | 204 | ------------------- |
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index bfe8c29b1f1d..b937c6e2163c 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
@@ -2430,6 +2430,19 @@ The following commands are supported: | |||
2430 | echo '!schedule:disable_event:sched:sched_switch' > \ | 2430 | echo '!schedule:disable_event:sched:sched_switch' > \ |
2431 | set_ftrace_filter | 2431 | set_ftrace_filter |
2432 | 2432 | ||
2433 | - dump | ||
2434 | When the function is hit, it will dump the contents of the ftrace | ||
2435 | ring buffer to the console. This is useful if you need to debug | ||
2436 | something, and want to dump the trace when a certain function | ||
2437 | is hit. Perhaps its a function that is called before a tripple | ||
2438 | fault happens and does not allow you to get a regular dump. | ||
2439 | |||
2440 | - cpudump | ||
2441 | When the function is hit, it will dump the contents of the ftrace | ||
2442 | ring buffer for the current CPU to the console. Unlike the "dump" | ||
2443 | command, it only prints out the contents of the ring buffer for the | ||
2444 | CPU that executed the function that triggered the dump. | ||
2445 | |||
2433 | trace_pipe | 2446 | trace_pipe |
2434 | ---------- | 2447 | ---------- |
2435 | 2448 | ||
diff --git a/Documentation/usb/gadget_configfs.txt b/Documentation/usb/gadget_configfs.txt new file mode 100644 index 000000000000..8ec2a67c39b7 --- /dev/null +++ b/Documentation/usb/gadget_configfs.txt | |||
@@ -0,0 +1,384 @@ | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | Linux USB gadget configured through configfs | ||
6 | |||
7 | |||
8 | 25th April 2013 | ||
9 | |||
10 | |||
11 | |||
12 | |||
13 | Overview | ||
14 | ======== | ||
15 | |||
16 | A USB Linux Gadget is a device which has a UDC (USB Device Controller) and can | ||
17 | be connected to a USB Host to extend it with additional functions like a serial | ||
18 | port or a mass storage capability. | ||
19 | |||
20 | A gadget is seen by its host as a set of configurations, each of which contains | ||
21 | a number of interfaces which, from the gadget's perspective, are known as | ||
22 | functions, each function representing e.g. a serial connection or a SCSI disk. | ||
23 | |||
24 | Linux provides a number of functions for gadgets to use. | ||
25 | |||
26 | Creating a gadget means deciding what configurations there will be | ||
27 | and which functions each configuration will provide. | ||
28 | |||
29 | Configfs (please see Documentation/filesystems/configfs/*) lends itslef nicely | ||
30 | for the purpose of telling the kernel about the above mentioned decision. | ||
31 | This document is about how to do it. | ||
32 | |||
33 | It also describes how configfs integration into gadget is designed. | ||
34 | |||
35 | |||
36 | |||
37 | |||
38 | Requirements | ||
39 | ============ | ||
40 | |||
41 | In order for this to work configfs must be available, so CONFIGFS_FS must be | ||
42 | 'y' or 'm' in .config. As of this writing USB_LIBCOMPOSITE selects CONFIGFS_FS. | ||
43 | |||
44 | |||
45 | |||
46 | |||
47 | Usage | ||
48 | ===== | ||
49 | |||
50 | (The original post describing the first function | ||
51 | made available through configfs can be seen here: | ||
52 | http://www.spinics.net/lists/linux-usb/msg76388.html) | ||
53 | |||
54 | $ modprobe libcomposite | ||
55 | $ mount none $CONFIGFS_HOME -t configfs | ||
56 | |||
57 | where CONFIGFS_HOME is the mount point for configfs | ||
58 | |||
59 | 1. Creating the gadgets | ||
60 | ----------------------- | ||
61 | |||
62 | For each gadget to be created its corresponding directory must be created: | ||
63 | |||
64 | $ mkdir $CONFIGFS_HOME/usb_gadget/<gadget name> | ||
65 | |||
66 | e.g.: | ||
67 | |||
68 | $ mkdir $CONFIGFS_HOME/usb_gadget/g1 | ||
69 | |||
70 | ... | ||
71 | ... | ||
72 | ... | ||
73 | |||
74 | $ cd $CONFIGFS_HOME/usb_gadget/g1 | ||
75 | |||
76 | Each gadget needs to have its vendor id <VID> and product id <PID> specified: | ||
77 | |||
78 | $ echo <VID> > idVendor | ||
79 | $ echo <PID> > idProduct | ||
80 | |||
81 | A gadget also needs its serial number, manufacturer and product strings. | ||
82 | In order to have a place to store them, a strings subdirectory must be created | ||
83 | for each language, e.g.: | ||
84 | |||
85 | $ mkdir strings/0x409 | ||
86 | |||
87 | Then the strings can be specified: | ||
88 | |||
89 | $ echo <serial number> > strings/0x409/serialnumber | ||
90 | $ echo <manufacturer> > strings/0x409/manufacturer | ||
91 | $ echo <product> > strings/0x409/product | ||
92 | |||
93 | 2. Creating the configurations | ||
94 | ------------------------------ | ||
95 | |||
96 | Each gadget will consist of a number of configurations, their corresponding | ||
97 | directories must be created: | ||
98 | |||
99 | $ mkdir configs/<name>.<number> | ||
100 | |||
101 | where <name> can be any string which is legal in a filesystem and the | ||
102 | <numebr> is the configuration's number, e.g.: | ||
103 | |||
104 | $ mkdir configs/c.1 | ||
105 | |||
106 | ... | ||
107 | ... | ||
108 | ... | ||
109 | |||
110 | Each configuration also needs its strings, so a subdirectory must be created | ||
111 | for each language, e.g.: | ||
112 | |||
113 | $ mkdir configs/c.1/strings/0x409 | ||
114 | |||
115 | Then the configuration string can be specified: | ||
116 | |||
117 | $ echo <configuration> > configs/c.1/strings/0x409/configuration | ||
118 | |||
119 | Some attributes can also be set for a configuration, e.g.: | ||
120 | |||
121 | $ echo 120 > configs/c.1/MaxPower | ||
122 | |||
123 | 3. Creating the functions | ||
124 | ------------------------- | ||
125 | |||
126 | The gadget will provide some functions, for each function its corresponding | ||
127 | directory must be created: | ||
128 | |||
129 | $ mkdir functions/<name>.<instance name> | ||
130 | |||
131 | where <name> corresponds to one of allowed function names and instance name | ||
132 | is an arbitrary string allowed in a filesystem, e.g.: | ||
133 | |||
134 | $ mkdir functions/ncm.usb0 # usb_f_ncm.ko gets loaded with request_module() | ||
135 | |||
136 | ... | ||
137 | ... | ||
138 | ... | ||
139 | |||
140 | Each function provides its specific set of attributes, with either read-only | ||
141 | or read-write access. Where applicable they need to be written to as | ||
142 | appropriate. | ||
143 | Please refer to Documentation/ABI/*/configfs-usb-gadget* for more information. | ||
144 | |||
145 | 4. Associating the functions with their configurations | ||
146 | ------------------------------------------------------ | ||
147 | |||
148 | At this moment a number of gadgets is created, each of which has a number of | ||
149 | configurations specified and a number of functions available. What remains | ||
150 | is specifying which function is available in which configuration (the same | ||
151 | function can be used in multiple configurations). This is achieved with | ||
152 | creating symbolic links: | ||
153 | |||
154 | $ ln -s functions/<name>.<instance name> configs/<name>.<number> | ||
155 | |||
156 | e.g.: | ||
157 | |||
158 | $ ln -s functions/ncm.usb0 configs/c.1 | ||
159 | |||
160 | ... | ||
161 | ... | ||
162 | ... | ||
163 | |||
164 | 5. Enabling the gadget | ||
165 | ---------------------- | ||
166 | |||
167 | All the above steps serve the purpose of composing the gadget of | ||
168 | configurations and functions. | ||
169 | |||
170 | An example directory structure might look like this: | ||
171 | |||
172 | . | ||
173 | ./strings | ||
174 | ./strings/0x409 | ||
175 | ./strings/0x409/serialnumber | ||
176 | ./strings/0x409/product | ||
177 | ./strings/0x409/manufacturer | ||
178 | ./configs | ||
179 | ./configs/c.1 | ||
180 | ./configs/c.1/ncm.usb0 -> ../../../../usb_gadget/g1/functions/ncm.usb0 | ||
181 | ./configs/c.1/strings | ||
182 | ./configs/c.1/strings/0x409 | ||
183 | ./configs/c.1/strings/0x409/configuration | ||
184 | ./configs/c.1/bmAttributes | ||
185 | ./configs/c.1/MaxPower | ||
186 | ./functions | ||
187 | ./functions/ncm.usb0 | ||
188 | ./functions/ncm.usb0/ifname | ||
189 | ./functions/ncm.usb0/qmult | ||
190 | ./functions/ncm.usb0/host_addr | ||
191 | ./functions/ncm.usb0/dev_addr | ||
192 | ./UDC | ||
193 | ./bcdUSB | ||
194 | ./bcdDevice | ||
195 | ./idProduct | ||
196 | ./idVendor | ||
197 | ./bMaxPacketSize0 | ||
198 | ./bDeviceProtocol | ||
199 | ./bDeviceSubClass | ||
200 | ./bDeviceClass | ||
201 | |||
202 | |||
203 | Such a gadget must be finally enabled so that the USB host can enumerate it. | ||
204 | In order to enable the gadget it must be bound to a UDC (USB Device Controller). | ||
205 | |||
206 | $ echo <udc name> > UDC | ||
207 | |||
208 | where <udc name> is one of those found in /sys/class/udc/* | ||
209 | e.g.: | ||
210 | |||
211 | $ echo s3c-hsotg > UDC | ||
212 | |||
213 | |||
214 | 6. Disabling the gadget | ||
215 | ----------------------- | ||
216 | |||
217 | $ echo "" > UDC | ||
218 | |||
219 | 7. Cleaning up | ||
220 | -------------- | ||
221 | |||
222 | Remove functions from configurations: | ||
223 | |||
224 | $ rm configs/<config name>.<number>/<function> | ||
225 | |||
226 | where <config name>.<number> specify the configuration and <function> is | ||
227 | a symlink to a function being removed from the configuration, e.g.: | ||
228 | |||
229 | $ rm configfs/c.1/ncm.usb0 | ||
230 | |||
231 | ... | ||
232 | ... | ||
233 | ... | ||
234 | |||
235 | Remove strings directories in configurations | ||
236 | |||
237 | $ rmdir configs/<config name>.<number>/strings/<lang> | ||
238 | |||
239 | e.g.: | ||
240 | |||
241 | $ rmdir configs/c.1/strings/0x409 | ||
242 | |||
243 | ... | ||
244 | ... | ||
245 | ... | ||
246 | |||
247 | and remove the configurations | ||
248 | |||
249 | $ rmdir configs/<config name>.<number> | ||
250 | |||
251 | e.g.: | ||
252 | |||
253 | rmdir configs/c.1 | ||
254 | |||
255 | ... | ||
256 | ... | ||
257 | ... | ||
258 | |||
259 | Remove functions (function modules are not unloaded, though) | ||
260 | |||
261 | $ rmdir functions/<name>.<instance name> | ||
262 | |||
263 | e.g.: | ||
264 | |||
265 | $ rmdir functions/ncm.usb0 | ||
266 | |||
267 | ... | ||
268 | ... | ||
269 | ... | ||
270 | |||
271 | Remove strings directories in the gadget | ||
272 | |||
273 | $ rmdir strings/<lang> | ||
274 | |||
275 | e.g.: | ||
276 | |||
277 | $ rmdir strings/0x409 | ||
278 | |||
279 | and finally remove the gadget: | ||
280 | |||
281 | $ cd .. | ||
282 | $ rmdir <gadget name> | ||
283 | |||
284 | e.g.: | ||
285 | |||
286 | $ rmdir g1 | ||
287 | |||
288 | |||
289 | |||
290 | |||
291 | Implementation design | ||
292 | ===================== | ||
293 | |||
294 | Below the idea of how configfs works is presented. | ||
295 | In configfs there are items and groups, both represented as directories. | ||
296 | The difference between an item and a group is that a group can contain | ||
297 | other groups. In the picture below only an item is shown. | ||
298 | Both items and groups can have attributes, which are represented as files. | ||
299 | The user can create and remove directories, but cannot remove files, | ||
300 | which can be read-only or read-write, depending on what they represent. | ||
301 | |||
302 | The filesystem part of configfs operates on config_items/groups and | ||
303 | configfs_attributes which are generic and of the same type for all | ||
304 | configured elements. However, they are embedded in usage-specific | ||
305 | larger structures. In the picture below there is a "cs" which contains | ||
306 | a config_item and an "sa" which contains a configfs_attribute. | ||
307 | |||
308 | The filesystem view would be like this: | ||
309 | |||
310 | ./ | ||
311 | ./cs (directory) | ||
312 | | | ||
313 | +--sa (file) | ||
314 | | | ||
315 | . | ||
316 | . | ||
317 | . | ||
318 | |||
319 | Whenever a user reads/writes the "sa" file, a function is called | ||
320 | which accepts a struct config_item and a struct configfs_attribute. | ||
321 | In the said function the "cs" and "sa" are retrieved using the well | ||
322 | known container_of technique and an appropriate sa's function (show or | ||
323 | store) is called and passed the "cs" and a character buffer. The "show" | ||
324 | is for displaying the file's contents (copy data from the cs to the | ||
325 | buffer), while the "store" is for modifying the file's contents (copy data | ||
326 | from the buffer to the cs), but it is up to the implementer of the | ||
327 | two functions to decide what they actually do. | ||
328 | |||
329 | typedef struct configured_structure cs; | ||
330 | typedef struc specific_attribute sa; | ||
331 | |||
332 | sa | ||
333 | +----------------------------------+ | ||
334 | cs | (*show)(cs *, buffer); | | ||
335 | +-----------------+ | (*store)(cs *, buffer, length); | | ||
336 | | | | | | ||
337 | | +-------------+ | | +------------------+ | | ||
338 | | | struct |-|----|------>|struct | | | ||
339 | | | config_item | | | |configfs_attribute| | | ||
340 | | +-------------+ | | +------------------+ | | ||
341 | | | +----------------------------------+ | ||
342 | | data to be set | . | ||
343 | | | . | ||
344 | +-----------------+ . | ||
345 | |||
346 | The file names are decided by the config item/group designer, while | ||
347 | the directories in general can be named at will. A group can have | ||
348 | a number of its default sub-groups created automatically. | ||
349 | |||
350 | For more information on configfs please see | ||
351 | Documentation/filesystems/configfs/*. | ||
352 | |||
353 | The concepts described above translate to USB gadgets like this: | ||
354 | |||
355 | 1. A gadget has its config group, which has some attributes (idVendor, | ||
356 | idProduct etc) and default sub-groups (configs, functions, strings). | ||
357 | Writing to the attributes causes the information to be stored in | ||
358 | appropriate locations. In the configs, functions and strings sub-groups | ||
359 | a user can create their sub-groups to represent configurations, functions, | ||
360 | and groups of strings in a given language. | ||
361 | |||
362 | 2. The user creates configurations and functions, in the configurations | ||
363 | creates symbolic links to functions. This information is used when the | ||
364 | gadget's UDC attribute is written to, which means binding the gadget | ||
365 | to the UDC. The code in drivers/usb/gadget/configfs.c iterates over | ||
366 | all configurations, and in each configuration it iterates over all | ||
367 | functions and binds them. This way the whole gadget is bound. | ||
368 | |||
369 | 3. The file drivers/usb/gadget/configfs.c contains code for | ||
370 | |||
371 | - gadget's config_group | ||
372 | - gadget's default groups (configs, functions, strings) | ||
373 | - associating functions with configurations (symlinks) | ||
374 | |||
375 | 4. Each USB function naturally has its own view of what it wants | ||
376 | configured, so config_groups for particular functions are defined | ||
377 | in the functions implementation files drivers/usb/gadget/f_*.c. | ||
378 | |||
379 | 5. Funciton's code is written in such a way that it uses | ||
380 | |||
381 | usb_get_function_instance(), which, in turn, calls request_module. | ||
382 | So, provided that modprobe works, modules for particular functions | ||
383 | are loaded automatically. Please note that the converse is not true: | ||
384 | after a gadget is disabled and torn down, the modules remain loaded. | ||
diff --git a/Documentation/usb/hotplug.txt b/Documentation/usb/hotplug.txt index 4c945716a660..6424b130485c 100644 --- a/Documentation/usb/hotplug.txt +++ b/Documentation/usb/hotplug.txt | |||
@@ -33,9 +33,9 @@ you get the best hotplugging when you configure a highly modular system. | |||
33 | 33 | ||
34 | KERNEL HOTPLUG HELPER (/sbin/hotplug) | 34 | KERNEL HOTPLUG HELPER (/sbin/hotplug) |
35 | 35 | ||
36 | When you compile with CONFIG_HOTPLUG, you get a new kernel parameter: | 36 | There is a kernel parameter: /proc/sys/kernel/hotplug, which normally |
37 | /proc/sys/kernel/hotplug, which normally holds the pathname "/sbin/hotplug". | 37 | holds the pathname "/sbin/hotplug". That parameter names a program |
38 | That parameter names a program which the kernel may invoke at various times. | 38 | which the kernel may invoke at various times. |
39 | 39 | ||
40 | The /sbin/hotplug program can be invoked by any subsystem as part of its | 40 | The /sbin/hotplug program can be invoked by any subsystem as part of its |
41 | reaction to a configuration change, from a thread in that subsystem. | 41 | reaction to a configuration change, from a thread in that subsystem. |
diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt index 8eda3635a17d..d7993dcf8537 100644 --- a/Documentation/vfio.txt +++ b/Documentation/vfio.txt | |||
@@ -172,12 +172,12 @@ group and can access them as follows: | |||
172 | struct vfio_device_info device_info = { .argsz = sizeof(device_info) }; | 172 | struct vfio_device_info device_info = { .argsz = sizeof(device_info) }; |
173 | 173 | ||
174 | /* Create a new container */ | 174 | /* Create a new container */ |
175 | container = open("/dev/vfio/vfio, O_RDWR); | 175 | container = open("/dev/vfio/vfio", O_RDWR); |
176 | 176 | ||
177 | if (ioctl(container, VFIO_GET_API_VERSION) != VFIO_API_VERSION) | 177 | if (ioctl(container, VFIO_GET_API_VERSION) != VFIO_API_VERSION) |
178 | /* Unknown API version */ | 178 | /* Unknown API version */ |
179 | 179 | ||
180 | if (!ioctl(container, VFIO_CHECK_EXTENSION, VFIO_X86_IOMMU)) | 180 | if (!ioctl(container, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU)) |
181 | /* Doesn't support the IOMMU driver we want. */ | 181 | /* Doesn't support the IOMMU driver we want. */ |
182 | 182 | ||
183 | /* Open the group */ | 183 | /* Open the group */ |
@@ -193,7 +193,7 @@ group and can access them as follows: | |||
193 | ioctl(group, VFIO_GROUP_SET_CONTAINER, &container); | 193 | ioctl(group, VFIO_GROUP_SET_CONTAINER, &container); |
194 | 194 | ||
195 | /* Enable the IOMMU model we want */ | 195 | /* Enable the IOMMU model we want */ |
196 | ioctl(container, VFIO_SET_IOMMU, VFIO_X86_IOMMU) | 196 | ioctl(container, VFIO_SET_IOMMU, VFIO_TYPE1_IOMMU) |
197 | 197 | ||
198 | /* Get addition IOMMU info */ | 198 | /* Get addition IOMMU info */ |
199 | ioctl(container, VFIO_IOMMU_GET_INFO, &iommu_info); | 199 | ioctl(container, VFIO_IOMMU_GET_INFO, &iommu_info); |
@@ -283,6 +283,69 @@ a direct pass through for VFIO_DEVICE_* ioctls. The read/write/mmap | |||
283 | interfaces implement the device region access defined by the device's | 283 | interfaces implement the device region access defined by the device's |
284 | own VFIO_DEVICE_GET_REGION_INFO ioctl. | 284 | own VFIO_DEVICE_GET_REGION_INFO ioctl. |
285 | 285 | ||
286 | |||
287 | PPC64 sPAPR implementation note | ||
288 | ------------------------------------------------------------------------------- | ||
289 | |||
290 | This implementation has some specifics: | ||
291 | |||
292 | 1) Only one IOMMU group per container is supported as an IOMMU group | ||
293 | represents the minimal entity which isolation can be guaranteed for and | ||
294 | groups are allocated statically, one per a Partitionable Endpoint (PE) | ||
295 | (PE is often a PCI domain but not always). | ||
296 | |||
297 | 2) The hardware supports so called DMA windows - the PCI address range | ||
298 | within which DMA transfer is allowed, any attempt to access address space | ||
299 | out of the window leads to the whole PE isolation. | ||
300 | |||
301 | 3) PPC64 guests are paravirtualized but not fully emulated. There is an API | ||
302 | to map/unmap pages for DMA, and it normally maps 1..32 pages per call and | ||
303 | currently there is no way to reduce the number of calls. In order to make things | ||
304 | faster, the map/unmap handling has been implemented in real mode which provides | ||
305 | an excellent performance which has limitations such as inability to do | ||
306 | locked pages accounting in real time. | ||
307 | |||
308 | So 3 additional ioctls have been added: | ||
309 | |||
310 | VFIO_IOMMU_SPAPR_TCE_GET_INFO - returns the size and the start | ||
311 | of the DMA window on the PCI bus. | ||
312 | |||
313 | VFIO_IOMMU_ENABLE - enables the container. The locked pages accounting | ||
314 | is done at this point. This lets user first to know what | ||
315 | the DMA window is and adjust rlimit before doing any real job. | ||
316 | |||
317 | VFIO_IOMMU_DISABLE - disables the container. | ||
318 | |||
319 | |||
320 | The code flow from the example above should be slightly changed: | ||
321 | |||
322 | ..... | ||
323 | /* Add the group to the container */ | ||
324 | ioctl(group, VFIO_GROUP_SET_CONTAINER, &container); | ||
325 | |||
326 | /* Enable the IOMMU model we want */ | ||
327 | ioctl(container, VFIO_SET_IOMMU, VFIO_SPAPR_TCE_IOMMU) | ||
328 | |||
329 | /* Get addition sPAPR IOMMU info */ | ||
330 | vfio_iommu_spapr_tce_info spapr_iommu_info; | ||
331 | ioctl(container, VFIO_IOMMU_SPAPR_TCE_GET_INFO, &spapr_iommu_info); | ||
332 | |||
333 | if (ioctl(container, VFIO_IOMMU_ENABLE)) | ||
334 | /* Cannot enable container, may be low rlimit */ | ||
335 | |||
336 | /* Allocate some space and setup a DMA mapping */ | ||
337 | dma_map.vaddr = mmap(0, 1024 * 1024, PROT_READ | PROT_WRITE, | ||
338 | MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); | ||
339 | |||
340 | dma_map.size = 1024 * 1024; | ||
341 | dma_map.iova = 0; /* 1MB starting at 0x0 from device view */ | ||
342 | dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE; | ||
343 | |||
344 | /* Check here is .iova/.size are within DMA window from spapr_iommu_info */ | ||
345 | |||
346 | ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map); | ||
347 | ..... | ||
348 | |||
286 | ------------------------------------------------------------------------------- | 349 | ------------------------------------------------------------------------------- |
287 | 350 | ||
288 | [1] VFIO was originally an acronym for "Virtual Function I/O" in its | 351 | [1] VFIO was originally an acronym for "Virtual Function I/O" in its |
diff --git a/Documentation/video4linux/si476x.txt b/Documentation/video4linux/si476x.txt index d1a08db2cbd9..2f9b4875ab8a 100644 --- a/Documentation/video4linux/si476x.txt +++ b/Documentation/video4linux/si476x.txt | |||
@@ -166,7 +166,7 @@ The drivers exposes following files: | |||
166 | -------------------------------------------------------------------- | 166 | -------------------------------------------------------------------- |
167 | 0x21 | dev | Frequency deviation | 167 | 0x21 | dev | Frequency deviation |
168 | -------------------------------------------------------------------- | 168 | -------------------------------------------------------------------- |
169 | 0x24 | assi | Adjascent channel SSI | 169 | 0x24 | assi | Adjacent channel SSI |
170 | -------------------------------------------------------------------- | 170 | -------------------------------------------------------------------- |
171 | 0x25 | usn | Ultrasonic noise indicator | 171 | 0x25 | usn | Ultrasonic noise indicator |
172 | -------------------------------------------------------------------- | 172 | -------------------------------------------------------------------- |
diff --git a/Documentation/video4linux/soc-camera.txt b/Documentation/video4linux/soc-camera.txt index f62fcdbc8b9f..daa9e2ac162c 100644 --- a/Documentation/video4linux/soc-camera.txt +++ b/Documentation/video4linux/soc-camera.txt | |||
@@ -116,7 +116,7 @@ VIDIOC_S_FMT: sets user window. Should preserve previously set sensor window as | |||
116 | much as possible by modifying scaling factors. If the sensor window cannot be | 116 | much as possible by modifying scaling factors. If the sensor window cannot be |
117 | preserved precisely, it may be changed too. | 117 | preserved precisely, it may be changed too. |
118 | 118 | ||
119 | In soc-camera there are two locations, where scaling and cropping can taks | 119 | In soc-camera there are two locations, where scaling and cropping can take |
120 | place: in the camera driver and in the host driver. User ioctls are first passed | 120 | place: in the camera driver and in the host driver. User ioctls are first passed |
121 | to the host driver, which then generally passes them down to the camera driver. | 121 | to the host driver, which then generally passes them down to the camera driver. |
122 | It is more efficient to perform scaling and cropping in the camera driver to | 122 | It is more efficient to perform scaling and cropping in the camera driver to |
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 5f91eda91647..ef925eaa1460 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -280,7 +280,7 @@ kvm_run' (see below). | |||
280 | 4.11 KVM_GET_REGS | 280 | 4.11 KVM_GET_REGS |
281 | 281 | ||
282 | Capability: basic | 282 | Capability: basic |
283 | Architectures: all except ARM | 283 | Architectures: all except ARM, arm64 |
284 | Type: vcpu ioctl | 284 | Type: vcpu ioctl |
285 | Parameters: struct kvm_regs (out) | 285 | Parameters: struct kvm_regs (out) |
286 | Returns: 0 on success, -1 on error | 286 | Returns: 0 on success, -1 on error |
@@ -301,7 +301,7 @@ struct kvm_regs { | |||
301 | 4.12 KVM_SET_REGS | 301 | 4.12 KVM_SET_REGS |
302 | 302 | ||
303 | Capability: basic | 303 | Capability: basic |
304 | Architectures: all except ARM | 304 | Architectures: all except ARM, arm64 |
305 | Type: vcpu ioctl | 305 | Type: vcpu ioctl |
306 | Parameters: struct kvm_regs (in) | 306 | Parameters: struct kvm_regs (in) |
307 | Returns: 0 on success, -1 on error | 307 | Returns: 0 on success, -1 on error |
@@ -587,7 +587,7 @@ struct kvm_fpu { | |||
587 | 4.24 KVM_CREATE_IRQCHIP | 587 | 4.24 KVM_CREATE_IRQCHIP |
588 | 588 | ||
589 | Capability: KVM_CAP_IRQCHIP | 589 | Capability: KVM_CAP_IRQCHIP |
590 | Architectures: x86, ia64, ARM | 590 | Architectures: x86, ia64, ARM, arm64 |
591 | Type: vm ioctl | 591 | Type: vm ioctl |
592 | Parameters: none | 592 | Parameters: none |
593 | Returns: 0 on success, -1 on error | 593 | Returns: 0 on success, -1 on error |
@@ -595,14 +595,14 @@ Returns: 0 on success, -1 on error | |||
595 | Creates an interrupt controller model in the kernel. On x86, creates a virtual | 595 | Creates an interrupt controller model in the kernel. On x86, creates a virtual |
596 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a | 596 | ioapic, a virtual PIC (two PICs, nested), and sets up future vcpus to have a |
597 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 | 597 | local APIC. IRQ routing for GSIs 0-15 is set to both PIC and IOAPIC; GSI 16-23 |
598 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM, a GIC is | 598 | only go to the IOAPIC. On ia64, a IOSAPIC is created. On ARM/arm64, a GIC is |
599 | created. | 599 | created. |
600 | 600 | ||
601 | 601 | ||
602 | 4.25 KVM_IRQ_LINE | 602 | 4.25 KVM_IRQ_LINE |
603 | 603 | ||
604 | Capability: KVM_CAP_IRQCHIP | 604 | Capability: KVM_CAP_IRQCHIP |
605 | Architectures: x86, ia64, arm | 605 | Architectures: x86, ia64, arm, arm64 |
606 | Type: vm ioctl | 606 | Type: vm ioctl |
607 | Parameters: struct kvm_irq_level | 607 | Parameters: struct kvm_irq_level |
608 | Returns: 0 on success, -1 on error | 608 | Returns: 0 on success, -1 on error |
@@ -612,9 +612,10 @@ On some architectures it is required that an interrupt controller model has | |||
612 | been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered | 612 | been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered |
613 | interrupts require the level to be set to 1 and then back to 0. | 613 | interrupts require the level to be set to 1 and then back to 0. |
614 | 614 | ||
615 | ARM can signal an interrupt either at the CPU level, or at the in-kernel irqchip | 615 | ARM/arm64 can signal an interrupt either at the CPU level, or at the |
616 | (GIC), and for in-kernel irqchip can tell the GIC to use PPIs designated for | 616 | in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to |
617 | specific cpus. The irq field is interpreted like this: | 617 | use PPIs designated for specific cpus. The irq field is interpreted |
618 | like this: | ||
618 | 619 | ||
619 | bits: | 31 ... 24 | 23 ... 16 | 15 ... 0 | | 620 | bits: | 31 ... 24 | 23 ... 16 | 15 ... 0 | |
620 | field: | irq_type | vcpu_index | irq_id | | 621 | field: | irq_type | vcpu_index | irq_id | |
@@ -1683,7 +1684,7 @@ The parameter is defined like this: | |||
1683 | 1684 | ||
1684 | This ioctl maps the memory at "user_addr" with the length "length" to | 1685 | This ioctl maps the memory at "user_addr" with the length "length" to |
1685 | the vcpu's address space starting at "vcpu_addr". All parameters need to | 1686 | the vcpu's address space starting at "vcpu_addr". All parameters need to |
1686 | be alligned by 1 megabyte. | 1687 | be aligned by 1 megabyte. |
1687 | 1688 | ||
1688 | 1689 | ||
1689 | 4.66 KVM_S390_UCAS_UNMAP | 1690 | 4.66 KVM_S390_UCAS_UNMAP |
@@ -1703,7 +1704,7 @@ The parameter is defined like this: | |||
1703 | 1704 | ||
1704 | This ioctl unmaps the memory in the vcpu's address space starting at | 1705 | This ioctl unmaps the memory in the vcpu's address space starting at |
1705 | "vcpu_addr" with the length "length". The field "user_addr" is ignored. | 1706 | "vcpu_addr" with the length "length". The field "user_addr" is ignored. |
1706 | All parameters need to be alligned by 1 megabyte. | 1707 | All parameters need to be aligned by 1 megabyte. |
1707 | 1708 | ||
1708 | 1709 | ||
1709 | 4.67 KVM_S390_VCPU_FAULT | 1710 | 4.67 KVM_S390_VCPU_FAULT |
@@ -1831,6 +1832,22 @@ ARM 32-bit VFP control registers have the following id bit patterns: | |||
1831 | ARM 64-bit FP registers have the following id bit patterns: | 1832 | ARM 64-bit FP registers have the following id bit patterns: |
1832 | 0x4030 0000 0012 0 <regno:12> | 1833 | 0x4030 0000 0012 0 <regno:12> |
1833 | 1834 | ||
1835 | |||
1836 | arm64 registers are mapped using the lower 32 bits. The upper 16 of | ||
1837 | that is the register group type, or coprocessor number: | ||
1838 | |||
1839 | arm64 core/FP-SIMD registers have the following id bit patterns. Note | ||
1840 | that the size of the access is variable, as the kvm_regs structure | ||
1841 | contains elements ranging from 32 to 128 bits. The index is a 32bit | ||
1842 | value in the kvm_regs structure seen as a 32bit array. | ||
1843 | 0x60x0 0000 0010 <index into the kvm_regs struct:16> | ||
1844 | |||
1845 | arm64 CCSIDR registers are demultiplexed by CSSELR value: | ||
1846 | 0x6020 0000 0011 00 <csselr:8> | ||
1847 | |||
1848 | arm64 system registers have the following id bit patterns: | ||
1849 | 0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3> | ||
1850 | |||
1834 | 4.69 KVM_GET_ONE_REG | 1851 | 4.69 KVM_GET_ONE_REG |
1835 | 1852 | ||
1836 | Capability: KVM_CAP_ONE_REG | 1853 | Capability: KVM_CAP_ONE_REG |
@@ -1972,7 +1989,7 @@ Returns: 0 on success, -1 on error | |||
1972 | 1989 | ||
1973 | This populates and returns a structure describing the features of | 1990 | This populates and returns a structure describing the features of |
1974 | the "Server" class MMU emulation supported by KVM. | 1991 | the "Server" class MMU emulation supported by KVM. |
1975 | This can in turn be used by userspace to generate the appropariate | 1992 | This can in turn be used by userspace to generate the appropriate |
1976 | device-tree properties for the guest operating system. | 1993 | device-tree properties for the guest operating system. |
1977 | 1994 | ||
1978 | The structure contains some global informations, followed by an | 1995 | The structure contains some global informations, followed by an |
@@ -2019,7 +2036,7 @@ be OR'ed into the "vsid" argument of the slbmte instruction. | |||
2019 | The "enc" array is a list which for each of those segment base page | 2036 | The "enc" array is a list which for each of those segment base page |
2020 | size provides the list of supported actual page sizes (which can be | 2037 | size provides the list of supported actual page sizes (which can be |
2021 | only larger or equal to the base page size), along with the | 2038 | only larger or equal to the base page size), along with the |
2022 | corresponding encoding in the hash PTE. Similarily, the array is | 2039 | corresponding encoding in the hash PTE. Similarly, the array is |
2023 | 8 entries sorted by increasing sizes and an entry with a "0" shift | 2040 | 8 entries sorted by increasing sizes and an entry with a "0" shift |
2024 | is an empty entry and a terminator: | 2041 | is an empty entry and a terminator: |
2025 | 2042 | ||
@@ -2261,10 +2278,10 @@ return indicates the attribute is implemented. It does not necessarily | |||
2261 | indicate that the attribute can be read or written in the device's | 2278 | indicate that the attribute can be read or written in the device's |
2262 | current state. "addr" is ignored. | 2279 | current state. "addr" is ignored. |
2263 | 2280 | ||
2264 | 4.77 KVM_ARM_VCPU_INIT | 2281 | 4.82 KVM_ARM_VCPU_INIT |
2265 | 2282 | ||
2266 | Capability: basic | 2283 | Capability: basic |
2267 | Architectures: arm | 2284 | Architectures: arm, arm64 |
2268 | Type: vcpu ioctl | 2285 | Type: vcpu ioctl |
2269 | Parameters: struct struct kvm_vcpu_init (in) | 2286 | Parameters: struct struct kvm_vcpu_init (in) |
2270 | Returns: 0 on success; -1 on error | 2287 | Returns: 0 on success; -1 on error |
@@ -2283,12 +2300,14 @@ should be created before this ioctl is invoked. | |||
2283 | Possible features: | 2300 | Possible features: |
2284 | - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. | 2301 | - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. |
2285 | Depends on KVM_CAP_ARM_PSCI. | 2302 | Depends on KVM_CAP_ARM_PSCI. |
2303 | - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. | ||
2304 | Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). | ||
2286 | 2305 | ||
2287 | 2306 | ||
2288 | 4.78 KVM_GET_REG_LIST | 2307 | 4.83 KVM_GET_REG_LIST |
2289 | 2308 | ||
2290 | Capability: basic | 2309 | Capability: basic |
2291 | Architectures: arm | 2310 | Architectures: arm, arm64 |
2292 | Type: vcpu ioctl | 2311 | Type: vcpu ioctl |
2293 | Parameters: struct kvm_reg_list (in/out) | 2312 | Parameters: struct kvm_reg_list (in/out) |
2294 | Returns: 0 on success; -1 on error | 2313 | Returns: 0 on success; -1 on error |
@@ -2305,10 +2324,10 @@ This ioctl returns the guest registers that are supported for the | |||
2305 | KVM_GET_ONE_REG/KVM_SET_ONE_REG calls. | 2324 | KVM_GET_ONE_REG/KVM_SET_ONE_REG calls. |
2306 | 2325 | ||
2307 | 2326 | ||
2308 | 4.80 KVM_ARM_SET_DEVICE_ADDR | 2327 | 4.84 KVM_ARM_SET_DEVICE_ADDR |
2309 | 2328 | ||
2310 | Capability: KVM_CAP_ARM_SET_DEVICE_ADDR | 2329 | Capability: KVM_CAP_ARM_SET_DEVICE_ADDR |
2311 | Architectures: arm | 2330 | Architectures: arm, arm64 |
2312 | Type: vm ioctl | 2331 | Type: vm ioctl |
2313 | Parameters: struct kvm_arm_device_address (in) | 2332 | Parameters: struct kvm_arm_device_address (in) |
2314 | Returns: 0 on success, -1 on error | 2333 | Returns: 0 on success, -1 on error |
@@ -2329,20 +2348,21 @@ can access emulated or directly exposed devices, which the host kernel needs | |||
2329 | to know about. The id field is an architecture specific identifier for a | 2348 | to know about. The id field is an architecture specific identifier for a |
2330 | specific device. | 2349 | specific device. |
2331 | 2350 | ||
2332 | ARM divides the id field into two parts, a device id and an address type id | 2351 | ARM/arm64 divides the id field into two parts, a device id and an |
2333 | specific to the individual device. | 2352 | address type id specific to the individual device. |
2334 | 2353 | ||
2335 | bits: | 63 ... 32 | 31 ... 16 | 15 ... 0 | | 2354 | bits: | 63 ... 32 | 31 ... 16 | 15 ... 0 | |
2336 | field: | 0x00000000 | device id | addr type id | | 2355 | field: | 0x00000000 | device id | addr type id | |
2337 | 2356 | ||
2338 | ARM currently only require this when using the in-kernel GIC support for the | 2357 | ARM/arm64 currently only require this when using the in-kernel GIC |
2339 | hardware VGIC features, using KVM_ARM_DEVICE_VGIC_V2 as the device id. When | 2358 | support for the hardware VGIC features, using KVM_ARM_DEVICE_VGIC_V2 |
2340 | setting the base address for the guest's mapping of the VGIC virtual CPU | 2359 | as the device id. When setting the base address for the guest's |
2341 | and distributor interface, the ioctl must be called after calling | 2360 | mapping of the VGIC virtual CPU and distributor interface, the ioctl |
2342 | KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling | 2361 | must be called after calling KVM_CREATE_IRQCHIP, but before calling |
2343 | this ioctl twice for any of the base addresses will return -EEXIST. | 2362 | KVM_RUN on any of the VCPUs. Calling this ioctl twice for any of the |
2363 | base addresses will return -EEXIST. | ||
2344 | 2364 | ||
2345 | 4.82 KVM_PPC_RTAS_DEFINE_TOKEN | 2365 | 4.85 KVM_PPC_RTAS_DEFINE_TOKEN |
2346 | 2366 | ||
2347 | Capability: KVM_CAP_PPC_RTAS | 2367 | Capability: KVM_CAP_PPC_RTAS |
2348 | Architectures: ppc | 2368 | Architectures: ppc |
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt index 43fcb761ed16..290894176142 100644 --- a/Documentation/virtual/kvm/mmu.txt +++ b/Documentation/virtual/kvm/mmu.txt | |||
@@ -191,12 +191,12 @@ Shadow pages contain the following information: | |||
191 | A counter keeping track of how many hardware registers (guest cr3 or | 191 | A counter keeping track of how many hardware registers (guest cr3 or |
192 | pdptrs) are now pointing at the page. While this counter is nonzero, the | 192 | pdptrs) are now pointing at the page. While this counter is nonzero, the |
193 | page cannot be destroyed. See role.invalid. | 193 | page cannot be destroyed. See role.invalid. |
194 | multimapped: | 194 | parent_ptes: |
195 | Whether there exist multiple sptes pointing at this page. | 195 | The reverse mapping for the pte/ptes pointing at this page's spt. If |
196 | parent_pte/parent_ptes: | 196 | parent_ptes bit 0 is zero, only one spte points at this pages and |
197 | If multimapped is zero, parent_pte points at the single spte that points at | 197 | parent_ptes points at this single spte, otherwise, there exists multiple |
198 | this page's spt. Otherwise, parent_ptes points at a data structure | 198 | sptes pointing at this page and (parent_ptes & ~0x1) points at a data |
199 | with a list of parent_ptes. | 199 | structure with a list of parent_ptes. |
200 | unsync: | 200 | unsync: |
201 | If true, then the translations in this page may not match the guest's | 201 | If true, then the translations in this page may not match the guest's |
202 | translation. This is equivalent to the state of the tlb when a pte is | 202 | translation. This is equivalent to the state of the tlb when a pte is |
@@ -210,6 +210,24 @@ Shadow pages contain the following information: | |||
210 | A bitmap indicating which sptes in spt point (directly or indirectly) at | 210 | A bitmap indicating which sptes in spt point (directly or indirectly) at |
211 | pages that may be unsynchronized. Used to quickly locate all unsychronized | 211 | pages that may be unsynchronized. Used to quickly locate all unsychronized |
212 | pages reachable from a given page. | 212 | pages reachable from a given page. |
213 | mmu_valid_gen: | ||
214 | Generation number of the page. It is compared with kvm->arch.mmu_valid_gen | ||
215 | during hash table lookup, and used to skip invalidated shadow pages (see | ||
216 | "Zapping all pages" below.) | ||
217 | clear_spte_count: | ||
218 | Only present on 32-bit hosts, where a 64-bit spte cannot be written | ||
219 | atomically. The reader uses this while running out of the MMU lock | ||
220 | to detect in-progress updates and retry them until the writer has | ||
221 | finished the write. | ||
222 | write_flooding_count: | ||
223 | A guest may write to a page table many times, causing a lot of | ||
224 | emulations if the page needs to be write-protected (see "Synchronized | ||
225 | and unsynchronized pages" below). Leaf pages can be unsynchronized | ||
226 | so that they do not trigger frequent emulation, but this is not | ||
227 | possible for non-leafs. This field counts the number of emulations | ||
228 | since the last time the page table was actually used; if emulation | ||
229 | is triggered too frequently on this page, KVM will unmap the page | ||
230 | to avoid emulation in the future. | ||
213 | 231 | ||
214 | Reverse map | 232 | Reverse map |
215 | =========== | 233 | =========== |
@@ -258,14 +276,26 @@ This is the most complicated event. The cause of a page fault can be: | |||
258 | 276 | ||
259 | Handling a page fault is performed as follows: | 277 | Handling a page fault is performed as follows: |
260 | 278 | ||
279 | - if the RSV bit of the error code is set, the page fault is caused by guest | ||
280 | accessing MMIO and cached MMIO information is available. | ||
281 | - walk shadow page table | ||
282 | - check for valid generation number in the spte (see "Fast invalidation of | ||
283 | MMIO sptes" below) | ||
284 | - cache the information to vcpu->arch.mmio_gva, vcpu->arch.access and | ||
285 | vcpu->arch.mmio_gfn, and call the emulator | ||
286 | - If both P bit and R/W bit of error code are set, this could possibly | ||
287 | be handled as a "fast page fault" (fixed without taking the MMU lock). See | ||
288 | the description in Documentation/virtual/kvm/locking.txt. | ||
261 | - if needed, walk the guest page tables to determine the guest translation | 289 | - if needed, walk the guest page tables to determine the guest translation |
262 | (gva->gpa or ngpa->gpa) | 290 | (gva->gpa or ngpa->gpa) |
263 | - if permissions are insufficient, reflect the fault back to the guest | 291 | - if permissions are insufficient, reflect the fault back to the guest |
264 | - determine the host page | 292 | - determine the host page |
265 | - if this is an mmio request, there is no host page; call the emulator | 293 | - if this is an mmio request, there is no host page; cache the info to |
266 | to emulate the instruction instead | 294 | vcpu->arch.mmio_gva, vcpu->arch.access and vcpu->arch.mmio_gfn |
267 | - walk the shadow page table to find the spte for the translation, | 295 | - walk the shadow page table to find the spte for the translation, |
268 | instantiating missing intermediate page tables as necessary | 296 | instantiating missing intermediate page tables as necessary |
297 | - If this is an mmio request, cache the mmio info to the spte and set some | ||
298 | reserved bit on the spte (see callers of kvm_mmu_set_mmio_spte_mask) | ||
269 | - try to unsynchronize the page | 299 | - try to unsynchronize the page |
270 | - if successful, we can let the guest continue and modify the gpte | 300 | - if successful, we can let the guest continue and modify the gpte |
271 | - emulate the instruction | 301 | - emulate the instruction |
@@ -351,6 +381,51 @@ causes its write_count to be incremented, thus preventing instantiation of | |||
351 | a large spte. The frames at the end of an unaligned memory slot have | 381 | a large spte. The frames at the end of an unaligned memory slot have |
352 | artificially inflated ->write_counts so they can never be instantiated. | 382 | artificially inflated ->write_counts so they can never be instantiated. |
353 | 383 | ||
384 | Zapping all pages (page generation count) | ||
385 | ========================================= | ||
386 | |||
387 | For the large memory guests, walking and zapping all pages is really slow | ||
388 | (because there are a lot of pages), and also blocks memory accesses of | ||
389 | all VCPUs because it needs to hold the MMU lock. | ||
390 | |||
391 | To make it be more scalable, kvm maintains a global generation number | ||
392 | which is stored in kvm->arch.mmu_valid_gen. Every shadow page stores | ||
393 | the current global generation-number into sp->mmu_valid_gen when it | ||
394 | is created. Pages with a mismatching generation number are "obsolete". | ||
395 | |||
396 | When KVM need zap all shadow pages sptes, it just simply increases the global | ||
397 | generation-number then reload root shadow pages on all vcpus. As the VCPUs | ||
398 | create new shadow page tables, the old pages are not used because of the | ||
399 | mismatching generation number. | ||
400 | |||
401 | KVM then walks through all pages and zaps obsolete pages. While the zap | ||
402 | operation needs to take the MMU lock, the lock can be released periodically | ||
403 | so that the VCPUs can make progress. | ||
404 | |||
405 | Fast invalidation of MMIO sptes | ||
406 | =============================== | ||
407 | |||
408 | As mentioned in "Reaction to events" above, kvm will cache MMIO | ||
409 | information in leaf sptes. When a new memslot is added or an existing | ||
410 | memslot is changed, this information may become stale and needs to be | ||
411 | invalidated. This also needs to hold the MMU lock while walking all | ||
412 | shadow pages, and is made more scalable with a similar technique. | ||
413 | |||
414 | MMIO sptes have a few spare bits, which are used to store a | ||
415 | generation number. The global generation number is stored in | ||
416 | kvm_memslots(kvm)->generation, and increased whenever guest memory info | ||
417 | changes. This generation number is distinct from the one described in | ||
418 | the previous section. | ||
419 | |||
420 | When KVM finds an MMIO spte, it checks the generation number of the spte. | ||
421 | If the generation number of the spte does not equal the global generation | ||
422 | number, it will ignore the cached MMIO information and handle the page | ||
423 | fault through the slow path. | ||
424 | |||
425 | Since only 19 bits are used to store generation-number on mmio spte, all | ||
426 | pages are zapped when there is an overflow. | ||
427 | |||
428 | |||
354 | Further reading | 429 | Further reading |
355 | =============== | 430 | =============== |
356 | 431 | ||
diff --git a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt index a5f8436753e7..f4099ca6b483 100644 --- a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt +++ b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt | |||
@@ -3127,7 +3127,7 @@ | |||
3127 | at process_kern.c:156 | 3127 | at process_kern.c:156 |
3128 | #3 0x1006a052 in switch_to (prev=0x50072000, next=0x507e8000, last=0x50072000) | 3128 | #3 0x1006a052 in switch_to (prev=0x50072000, next=0x507e8000, last=0x50072000) |
3129 | at process_kern.c:161 | 3129 | at process_kern.c:161 |
3130 | #4 0x10001d12 in schedule () at sched.c:777 | 3130 | #4 0x10001d12 in schedule () at core.c:777 |
3131 | #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 | 3131 | #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 |
3132 | #6 0x1006aa10 in __down_failed () at semaphore.c:157 | 3132 | #6 0x1006aa10 in __down_failed () at semaphore.c:157 |
3133 | #7 0x1006c5d8 in segv_handler (sc=0x5006e940) at trap_user.c:174 | 3133 | #7 0x1006c5d8 in segv_handler (sc=0x5006e940) at trap_user.c:174 |
@@ -3191,7 +3191,7 @@ | |||
3191 | at process_kern.c:161 | 3191 | at process_kern.c:161 |
3192 | 161 _switch_to(prev, next); | 3192 | 161 _switch_to(prev, next); |
3193 | (gdb) | 3193 | (gdb) |
3194 | #4 0x10001d12 in schedule () at sched.c:777 | 3194 | #4 0x10001d12 in schedule () at core.c:777 |
3195 | 777 switch_to(prev, next, prev); | 3195 | 777 switch_to(prev, next, prev); |
3196 | (gdb) | 3196 | (gdb) |
3197 | #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 | 3197 | #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 |
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt index 7587493c67f1..5948e455c4d2 100644 --- a/Documentation/vm/pagemap.txt +++ b/Documentation/vm/pagemap.txt | |||
@@ -15,7 +15,8 @@ There are three components to pagemap: | |||
15 | * Bits 0-54 page frame number (PFN) if present | 15 | * Bits 0-54 page frame number (PFN) if present |
16 | * Bits 0-4 swap type if swapped | 16 | * Bits 0-4 swap type if swapped |
17 | * Bits 5-54 swap offset if swapped | 17 | * Bits 5-54 swap offset if swapped |
18 | * Bits 55-60 page shift (page size = 1<<page shift) | 18 | * Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.txt) |
19 | * Bits 56-60 zero | ||
19 | * Bit 61 page is file-page or shared-anon | 20 | * Bit 61 page is file-page or shared-anon |
20 | * Bit 62 page swapped | 21 | * Bit 62 page swapped |
21 | * Bit 63 page present | 22 | * Bit 63 page present |
@@ -147,5 +148,5 @@ once. | |||
147 | Other notes: | 148 | Other notes: |
148 | 149 | ||
149 | Reading from any of the files will return -EINVAL if you are not starting | 150 | Reading from any of the files will return -EINVAL if you are not starting |
150 | the read on an 8-byte boundary (e.g., if you seeked an odd number of bytes | 151 | the read on an 8-byte boundary (e.g., if you sought an odd number of bytes |
151 | into the file), or if the size of the read is not a multiple of 8 bytes. | 152 | into the file), or if the size of the read is not a multiple of 8 bytes. |
diff --git a/Documentation/vm/soft-dirty.txt b/Documentation/vm/soft-dirty.txt new file mode 100644 index 000000000000..9a12a5956bc0 --- /dev/null +++ b/Documentation/vm/soft-dirty.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | SOFT-DIRTY PTEs | ||
2 | |||
3 | The soft-dirty is a bit on a PTE which helps to track which pages a task | ||
4 | writes to. In order to do this tracking one should | ||
5 | |||
6 | 1. Clear soft-dirty bits from the task's PTEs. | ||
7 | |||
8 | This is done by writing "4" into the /proc/PID/clear_refs file of the | ||
9 | task in question. | ||
10 | |||
11 | 2. Wait some time. | ||
12 | |||
13 | 3. Read soft-dirty bits from the PTEs. | ||
14 | |||
15 | This is done by reading from the /proc/PID/pagemap. The bit 55 of the | ||
16 | 64-bit qword is the soft-dirty one. If set, the respective PTE was | ||
17 | written to since step 1. | ||
18 | |||
19 | |||
20 | Internally, to do this tracking, the writable bit is cleared from PTEs | ||
21 | when the soft-dirty bit is cleared. So, after this, when the task tries to | ||
22 | modify a page at some virtual address the #PF occurs and the kernel sets | ||
23 | the soft-dirty bit on the respective PTE. | ||
24 | |||
25 | Note, that although all the task's address space is marked as r/o after the | ||
26 | soft-dirty bits clear, the #PF-s that occur after that are processed fast. | ||
27 | This is so, since the pages are still mapped to physical memory, and thus all | ||
28 | the kernel does is finds this fact out and puts both writable and soft-dirty | ||
29 | bits on the PTE. | ||
30 | |||
31 | |||
32 | This feature is actively used by the checkpoint-restore project. You | ||
33 | can find more details about it on http://criu.org | ||
34 | |||
35 | |||
36 | -- Pavel Emelyanov, Apr 9, 2013 | ||
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 8785fb87d9c7..4a63953a41f1 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
@@ -120,8 +120,8 @@ 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 | 120 | It's possible to disable huge zero page by writing 0 or enable it |
121 | back by writing 1: | 121 | back by writing 1: |
122 | 122 | ||
123 | echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page | 123 | echo 0 >/sys/kernel/mm/transparent_hugepage/use_zero_page |
124 | echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page | 124 | echo 1 >/sys/kernel/mm/transparent_hugepage/use_zero_page |
125 | 125 | ||
126 | khugepaged will be automatically started when | 126 | khugepaged will be automatically started when |
127 | 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 |
diff --git a/Documentation/vm/zswap.txt b/Documentation/vm/zswap.txt new file mode 100644 index 000000000000..7e492d8aaeaf --- /dev/null +++ b/Documentation/vm/zswap.txt | |||
@@ -0,0 +1,68 @@ | |||
1 | Overview: | ||
2 | |||
3 | Zswap is a lightweight compressed cache for swap pages. It takes pages that are | ||
4 | in the process of being swapped out and attempts to compress them into a | ||
5 | dynamically allocated RAM-based memory pool. zswap basically trades CPU cycles | ||
6 | for potentially reduced swap I/O. This trade-off can also result in a | ||
7 | significant performance improvement if reads from the compressed cache are | ||
8 | faster than reads from a swap device. | ||
9 | |||
10 | NOTE: Zswap is a new feature as of v3.11 and interacts heavily with memory | ||
11 | reclaim. This interaction has not be fully explored on the large set of | ||
12 | potential configurations and workloads that exist. For this reason, zswap | ||
13 | is a work in progress and should be considered experimental. | ||
14 | |||
15 | Some potential benefits: | ||
16 | * Desktop/laptop users with limited RAM capacities can mitigate the | ||
17 | performance impact of swapping. | ||
18 | * Overcommitted guests that share a common I/O resource can | ||
19 | dramatically reduce their swap I/O pressure, avoiding heavy handed I/O | ||
20 | throttling by the hypervisor. This allows more work to get done with less | ||
21 | impact to the guest workload and guests sharing the I/O subsystem | ||
22 | * Users with SSDs as swap devices can extend the life of the device by | ||
23 | drastically reducing life-shortening writes. | ||
24 | |||
25 | Zswap evicts pages from compressed cache on an LRU basis to the backing swap | ||
26 | device when the compressed pool reaches it size limit. This requirement had | ||
27 | been identified in prior community discussions. | ||
28 | |||
29 | To enabled zswap, the "enabled" attribute must be set to 1 at boot time. e.g. | ||
30 | zswap.enabled=1 | ||
31 | |||
32 | Design: | ||
33 | |||
34 | Zswap receives pages for compression through the Frontswap API and is able to | ||
35 | evict pages from its own compressed pool on an LRU basis and write them back to | ||
36 | the backing swap device in the case that the compressed pool is full. | ||
37 | |||
38 | Zswap makes use of zbud for the managing the compressed memory pool. Each | ||
39 | allocation in zbud is not directly accessible by address. Rather, a handle is | ||
40 | return by the allocation routine and that handle must be mapped before being | ||
41 | accessed. The compressed memory pool grows on demand and shrinks as compressed | ||
42 | pages are freed. The pool is not preallocated. | ||
43 | |||
44 | When a swap page is passed from frontswap to zswap, zswap maintains a mapping | ||
45 | of the swap entry, a combination of the swap type and swap offset, to the zbud | ||
46 | handle that references that compressed swap page. This mapping is achieved | ||
47 | with a red-black tree per swap type. The swap offset is the search key for the | ||
48 | tree nodes. | ||
49 | |||
50 | During a page fault on a PTE that is a swap entry, frontswap calls the zswap | ||
51 | load function to decompress the page into the page allocated by the page fault | ||
52 | handler. | ||
53 | |||
54 | Once there are no PTEs referencing a swap page stored in zswap (i.e. the count | ||
55 | in the swap_map goes to 0) the swap code calls the zswap invalidate function, | ||
56 | via frontswap, to free the compressed entry. | ||
57 | |||
58 | Zswap seeks to be simple in its policies. Sysfs attributes allow for one user | ||
59 | controlled policies: | ||
60 | * max_pool_percent - The maximum percentage of memory that the compressed | ||
61 | pool can occupy. | ||
62 | |||
63 | Zswap allows the compressor to be selected at kernel boot time by setting the | ||
64 | “compressor” attribute. The default compressor is lzo. e.g. | ||
65 | zswap.compressor=deflate | ||
66 | |||
67 | A debugfs interface is provided for various statistic about pool size, number | ||
68 | of pages stored, and various counters for the reasons pages are rejected. | ||
diff --git a/Documentation/w1/slaves/w1_ds28e04 b/Documentation/w1/slaves/w1_ds28e04 index 85bc9a7e02fe..7819b65cfa48 100644 --- a/Documentation/w1/slaves/w1_ds28e04 +++ b/Documentation/w1/slaves/w1_ds28e04 | |||
@@ -24,7 +24,7 @@ Memory Access | |||
24 | 24 | ||
25 | A write operation on the "eeprom" file writes the given byte sequence | 25 | A write operation on the "eeprom" file writes the given byte sequence |
26 | to the EEPROM of the DS28E04. If CRC checking mode is enabled only | 26 | to the EEPROM of the DS28E04. If CRC checking mode is enabled only |
27 | fully alligned blocks of 32 bytes with valid CRC16 values (in bytes 30 | 27 | fully aligned blocks of 32 bytes with valid CRC16 values (in bytes 30 |
28 | and 31) are allowed to be written. | 28 | and 31) are allowed to be written. |
29 | 29 | ||
30 | PIO Access | 30 | PIO Access |
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic index 212f4ac31c01..a31c5a242973 100644 --- a/Documentation/w1/w1.generic +++ b/Documentation/w1/w1.generic | |||
@@ -25,8 +25,8 @@ When a w1 master driver registers with the w1 subsystem, the following occurs: | |||
25 | - sysfs entries for that w1 master are created | 25 | - sysfs entries for that w1 master are created |
26 | - the w1 bus is periodically searched for new slave devices | 26 | - the w1 bus is periodically searched for new slave devices |
27 | 27 | ||
28 | When a device is found on the bus, w1 core checks if driver for its family is | 28 | When a device is found on the bus, w1 core tries to load the driver for its family |
29 | loaded. If so, the family driver is attached to the slave. | 29 | and check if it is loaded. If so, the family driver is attached to the slave. |
30 | If there is no driver for the family, default one is assigned, which allows to perform | 30 | If there is no driver for the family, default one is assigned, which allows to perform |
31 | almost any kind of operations. Each logical operation is a transaction | 31 | almost any kind of operations. Each logical operation is a transaction |
32 | in nature, which can contain several (two or one) low-level operations. | 32 | in nature, which can contain several (two or one) low-level operations. |
diff --git a/Documentation/ww-mutex-design.txt b/Documentation/ww-mutex-design.txt new file mode 100644 index 000000000000..8a112dc304c3 --- /dev/null +++ b/Documentation/ww-mutex-design.txt | |||
@@ -0,0 +1,344 @@ | |||
1 | Wait/Wound Deadlock-Proof Mutex Design | ||
2 | ====================================== | ||
3 | |||
4 | Please read mutex-design.txt first, as it applies to wait/wound mutexes too. | ||
5 | |||
6 | Motivation for WW-Mutexes | ||
7 | ------------------------- | ||
8 | |||
9 | GPU's do operations that commonly involve many buffers. Those buffers | ||
10 | can be shared across contexts/processes, exist in different memory | ||
11 | domains (for example VRAM vs system memory), and so on. And with | ||
12 | PRIME / dmabuf, they can even be shared across devices. So there are | ||
13 | a handful of situations where the driver needs to wait for buffers to | ||
14 | become ready. If you think about this in terms of waiting on a buffer | ||
15 | mutex for it to become available, this presents a problem because | ||
16 | there is no way to guarantee that buffers appear in a execbuf/batch in | ||
17 | the same order in all contexts. That is directly under control of | ||
18 | userspace, and a result of the sequence of GL calls that an application | ||
19 | makes. Which results in the potential for deadlock. The problem gets | ||
20 | more complex when you consider that the kernel may need to migrate the | ||
21 | buffer(s) into VRAM before the GPU operates on the buffer(s), which | ||
22 | may in turn require evicting some other buffers (and you don't want to | ||
23 | evict other buffers which are already queued up to the GPU), but for a | ||
24 | simplified understanding of the problem you can ignore this. | ||
25 | |||
26 | The algorithm that the TTM graphics subsystem came up with for dealing with | ||
27 | this problem is quite simple. For each group of buffers (execbuf) that need | ||
28 | to be locked, the caller would be assigned a unique reservation id/ticket, | ||
29 | from a global counter. In case of deadlock while locking all the buffers | ||
30 | associated with a execbuf, the one with the lowest reservation ticket (i.e. | ||
31 | the oldest task) wins, and the one with the higher reservation id (i.e. the | ||
32 | younger task) unlocks all of the buffers that it has already locked, and then | ||
33 | tries again. | ||
34 | |||
35 | In the RDBMS literature this deadlock handling approach is called wait/wound: | ||
36 | The older tasks waits until it can acquire the contended lock. The younger tasks | ||
37 | needs to back off and drop all the locks it is currently holding, i.e. the | ||
38 | younger task is wounded. | ||
39 | |||
40 | Concepts | ||
41 | -------- | ||
42 | |||
43 | Compared to normal mutexes two additional concepts/objects show up in the lock | ||
44 | interface for w/w mutexes: | ||
45 | |||
46 | Acquire context: To ensure eventual forward progress it is important the a task | ||
47 | trying to acquire locks doesn't grab a new reservation id, but keeps the one it | ||
48 | acquired when starting the lock acquisition. This ticket is stored in the | ||
49 | acquire context. Furthermore the acquire context keeps track of debugging state | ||
50 | to catch w/w mutex interface abuse. | ||
51 | |||
52 | W/w class: In contrast to normal mutexes the lock class needs to be explicit for | ||
53 | w/w mutexes, since it is required to initialize the acquire context. | ||
54 | |||
55 | Furthermore there are three different class of w/w lock acquire functions: | ||
56 | |||
57 | * Normal lock acquisition with a context, using ww_mutex_lock. | ||
58 | |||
59 | * Slowpath lock acquisition on the contending lock, used by the wounded task | ||
60 | after having dropped all already acquired locks. These functions have the | ||
61 | _slow postfix. | ||
62 | |||
63 | From a simple semantics point-of-view the _slow functions are not strictly | ||
64 | required, since simply calling the normal ww_mutex_lock functions on the | ||
65 | contending lock (after having dropped all other already acquired locks) will | ||
66 | work correctly. After all if no other ww mutex has been acquired yet there's | ||
67 | no deadlock potential and hence the ww_mutex_lock call will block and not | ||
68 | prematurely return -EDEADLK. The advantage of the _slow functions is in | ||
69 | interface safety: | ||
70 | - ww_mutex_lock has a __must_check int return type, whereas ww_mutex_lock_slow | ||
71 | has a void return type. Note that since ww mutex code needs loops/retries | ||
72 | anyway the __must_check doesn't result in spurious warnings, even though the | ||
73 | very first lock operation can never fail. | ||
74 | - When full debugging is enabled ww_mutex_lock_slow checks that all acquired | ||
75 | ww mutex have been released (preventing deadlocks) and makes sure that we | ||
76 | block on the contending lock (preventing spinning through the -EDEADLK | ||
77 | slowpath until the contended lock can be acquired). | ||
78 | |||
79 | * Functions to only acquire a single w/w mutex, which results in the exact same | ||
80 | semantics as a normal mutex. This is done by calling ww_mutex_lock with a NULL | ||
81 | context. | ||
82 | |||
83 | Again this is not strictly required. But often you only want to acquire a | ||
84 | single lock in which case it's pointless to set up an acquire context (and so | ||
85 | better to avoid grabbing a deadlock avoidance ticket). | ||
86 | |||
87 | Of course, all the usual variants for handling wake-ups due to signals are also | ||
88 | provided. | ||
89 | |||
90 | Usage | ||
91 | ----- | ||
92 | |||
93 | Three different ways to acquire locks within the same w/w class. Common | ||
94 | definitions for methods #1 and #2: | ||
95 | |||
96 | static DEFINE_WW_CLASS(ww_class); | ||
97 | |||
98 | struct obj { | ||
99 | struct ww_mutex lock; | ||
100 | /* obj data */ | ||
101 | }; | ||
102 | |||
103 | struct obj_entry { | ||
104 | struct list_head head; | ||
105 | struct obj *obj; | ||
106 | }; | ||
107 | |||
108 | Method 1, using a list in execbuf->buffers that's not allowed to be reordered. | ||
109 | This is useful if a list of required objects is already tracked somewhere. | ||
110 | Furthermore the lock helper can use propagate the -EALREADY return code back to | ||
111 | the caller as a signal that an object is twice on the list. This is useful if | ||
112 | the list is constructed from userspace input and the ABI requires userspace to | ||
113 | not have duplicate entries (e.g. for a gpu commandbuffer submission ioctl). | ||
114 | |||
115 | int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | ||
116 | { | ||
117 | struct obj *res_obj = NULL; | ||
118 | struct obj_entry *contended_entry = NULL; | ||
119 | struct obj_entry *entry; | ||
120 | |||
121 | ww_acquire_init(ctx, &ww_class); | ||
122 | |||
123 | retry: | ||
124 | list_for_each_entry (entry, list, head) { | ||
125 | if (entry->obj == res_obj) { | ||
126 | res_obj = NULL; | ||
127 | continue; | ||
128 | } | ||
129 | ret = ww_mutex_lock(&entry->obj->lock, ctx); | ||
130 | if (ret < 0) { | ||
131 | contended_entry = entry; | ||
132 | goto err; | ||
133 | } | ||
134 | } | ||
135 | |||
136 | ww_acquire_done(ctx); | ||
137 | return 0; | ||
138 | |||
139 | err: | ||
140 | list_for_each_entry_continue_reverse (entry, list, head) | ||
141 | ww_mutex_unlock(&entry->obj->lock); | ||
142 | |||
143 | if (res_obj) | ||
144 | ww_mutex_unlock(&res_obj->lock); | ||
145 | |||
146 | if (ret == -EDEADLK) { | ||
147 | /* we lost out in a seqno race, lock and retry.. */ | ||
148 | ww_mutex_lock_slow(&contended_entry->obj->lock, ctx); | ||
149 | res_obj = contended_entry->obj; | ||
150 | goto retry; | ||
151 | } | ||
152 | ww_acquire_fini(ctx); | ||
153 | |||
154 | return ret; | ||
155 | } | ||
156 | |||
157 | Method 2, using a list in execbuf->buffers that can be reordered. Same semantics | ||
158 | of duplicate entry detection using -EALREADY as method 1 above. But the | ||
159 | list-reordering allows for a bit more idiomatic code. | ||
160 | |||
161 | int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | ||
162 | { | ||
163 | struct obj_entry *entry, *entry2; | ||
164 | |||
165 | ww_acquire_init(ctx, &ww_class); | ||
166 | |||
167 | list_for_each_entry (entry, list, head) { | ||
168 | ret = ww_mutex_lock(&entry->obj->lock, ctx); | ||
169 | if (ret < 0) { | ||
170 | entry2 = entry; | ||
171 | |||
172 | list_for_each_entry_continue_reverse (entry2, list, head) | ||
173 | ww_mutex_unlock(&entry2->obj->lock); | ||
174 | |||
175 | if (ret != -EDEADLK) { | ||
176 | ww_acquire_fini(ctx); | ||
177 | return ret; | ||
178 | } | ||
179 | |||
180 | /* we lost out in a seqno race, lock and retry.. */ | ||
181 | ww_mutex_lock_slow(&entry->obj->lock, ctx); | ||
182 | |||
183 | /* | ||
184 | * Move buf to head of the list, this will point | ||
185 | * buf->next to the first unlocked entry, | ||
186 | * restarting the for loop. | ||
187 | */ | ||
188 | list_del(&entry->head); | ||
189 | list_add(&entry->head, list); | ||
190 | } | ||
191 | } | ||
192 | |||
193 | ww_acquire_done(ctx); | ||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | Unlocking works the same way for both methods #1 and #2: | ||
198 | |||
199 | void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | ||
200 | { | ||
201 | struct obj_entry *entry; | ||
202 | |||
203 | list_for_each_entry (entry, list, head) | ||
204 | ww_mutex_unlock(&entry->obj->lock); | ||
205 | |||
206 | ww_acquire_fini(ctx); | ||
207 | } | ||
208 | |||
209 | Method 3 is useful if the list of objects is constructed ad-hoc and not upfront, | ||
210 | e.g. when adjusting edges in a graph where each node has its own ww_mutex lock, | ||
211 | and edges can only be changed when holding the locks of all involved nodes. w/w | ||
212 | mutexes are a natural fit for such a case for two reasons: | ||
213 | - They can handle lock-acquisition in any order which allows us to start walking | ||
214 | a graph from a starting point and then iteratively discovering new edges and | ||
215 | locking down the nodes those edges connect to. | ||
216 | - Due to the -EALREADY return code signalling that a given objects is already | ||
217 | held there's no need for additional book-keeping to break cycles in the graph | ||
218 | or keep track off which looks are already held (when using more than one node | ||
219 | as a starting point). | ||
220 | |||
221 | Note that this approach differs in two important ways from the above methods: | ||
222 | - Since the list of objects is dynamically constructed (and might very well be | ||
223 | different when retrying due to hitting the -EDEADLK wound condition) there's | ||
224 | no need to keep any object on a persistent list when it's not locked. We can | ||
225 | therefore move the list_head into the object itself. | ||
226 | - On the other hand the dynamic object list construction also means that the -EALREADY return | ||
227 | code can't be propagated. | ||
228 | |||
229 | Note also that methods #1 and #2 and method #3 can be combined, e.g. to first lock a | ||
230 | list of starting nodes (passed in from userspace) using one of the above | ||
231 | methods. And then lock any additional objects affected by the operations using | ||
232 | method #3 below. The backoff/retry procedure will be a bit more involved, since | ||
233 | when the dynamic locking step hits -EDEADLK we also need to unlock all the | ||
234 | objects acquired with the fixed list. But the w/w mutex debug checks will catch | ||
235 | any interface misuse for these cases. | ||
236 | |||
237 | Also, method 3 can't fail the lock acquisition step since it doesn't return | ||
238 | -EALREADY. Of course this would be different when using the _interruptible | ||
239 | variants, but that's outside of the scope of these examples here. | ||
240 | |||
241 | struct obj { | ||
242 | struct ww_mutex ww_mutex; | ||
243 | struct list_head locked_list; | ||
244 | }; | ||
245 | |||
246 | static DEFINE_WW_CLASS(ww_class); | ||
247 | |||
248 | void __unlock_objs(struct list_head *list) | ||
249 | { | ||
250 | struct obj *entry, *temp; | ||
251 | |||
252 | list_for_each_entry_safe (entry, temp, list, locked_list) { | ||
253 | /* need to do that before unlocking, since only the current lock holder is | ||
254 | allowed to use object */ | ||
255 | list_del(&entry->locked_list); | ||
256 | ww_mutex_unlock(entry->ww_mutex) | ||
257 | } | ||
258 | } | ||
259 | |||
260 | void lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | ||
261 | { | ||
262 | struct obj *obj; | ||
263 | |||
264 | ww_acquire_init(ctx, &ww_class); | ||
265 | |||
266 | retry: | ||
267 | /* re-init loop start state */ | ||
268 | loop { | ||
269 | /* magic code which walks over a graph and decides which objects | ||
270 | * to lock */ | ||
271 | |||
272 | ret = ww_mutex_lock(obj->ww_mutex, ctx); | ||
273 | if (ret == -EALREADY) { | ||
274 | /* we have that one already, get to the next object */ | ||
275 | continue; | ||
276 | } | ||
277 | if (ret == -EDEADLK) { | ||
278 | __unlock_objs(list); | ||
279 | |||
280 | ww_mutex_lock_slow(obj, ctx); | ||
281 | list_add(&entry->locked_list, list); | ||
282 | goto retry; | ||
283 | } | ||
284 | |||
285 | /* locked a new object, add it to the list */ | ||
286 | list_add_tail(&entry->locked_list, list); | ||
287 | } | ||
288 | |||
289 | ww_acquire_done(ctx); | ||
290 | return 0; | ||
291 | } | ||
292 | |||
293 | void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | ||
294 | { | ||
295 | __unlock_objs(list); | ||
296 | ww_acquire_fini(ctx); | ||
297 | } | ||
298 | |||
299 | Method 4: Only lock one single objects. In that case deadlock detection and | ||
300 | prevention is obviously overkill, since with grabbing just one lock you can't | ||
301 | produce a deadlock within just one class. To simplify this case the w/w mutex | ||
302 | api can be used with a NULL context. | ||
303 | |||
304 | Implementation Details | ||
305 | ---------------------- | ||
306 | |||
307 | Design: | ||
308 | ww_mutex currently encapsulates a struct mutex, this means no extra overhead for | ||
309 | normal mutex locks, which are far more common. As such there is only a small | ||
310 | increase in code size if wait/wound mutexes are not used. | ||
311 | |||
312 | In general, not much contention is expected. The locks are typically used to | ||
313 | serialize access to resources for devices. The only way to make wakeups | ||
314 | smarter would be at the cost of adding a field to struct mutex_waiter. This | ||
315 | would add overhead to all cases where normal mutexes are used, and | ||
316 | ww_mutexes are generally less performance sensitive. | ||
317 | |||
318 | Lockdep: | ||
319 | Special care has been taken to warn for as many cases of api abuse | ||
320 | as possible. Some common api abuses will be caught with | ||
321 | CONFIG_DEBUG_MUTEXES, but CONFIG_PROVE_LOCKING is recommended. | ||
322 | |||
323 | Some of the errors which will be warned about: | ||
324 | - Forgetting to call ww_acquire_fini or ww_acquire_init. | ||
325 | - Attempting to lock more mutexes after ww_acquire_done. | ||
326 | - Attempting to lock the wrong mutex after -EDEADLK and | ||
327 | unlocking all mutexes. | ||
328 | - Attempting to lock the right mutex after -EDEADLK, | ||
329 | before unlocking all mutexes. | ||
330 | |||
331 | - Calling ww_mutex_lock_slow before -EDEADLK was returned. | ||
332 | |||
333 | - Unlocking mutexes with the wrong unlock function. | ||
334 | - Calling one of the ww_acquire_* twice on the same context. | ||
335 | - Using a different ww_class for the mutex than for the ww_acquire_ctx. | ||
336 | - Normal lockdep errors that can result in deadlocks. | ||
337 | |||
338 | Some of the lockdep errors that can result in deadlocks: | ||
339 | - Calling ww_acquire_init to initialize a second ww_acquire_ctx before | ||
340 | having called ww_acquire_fini on the first. | ||
341 | - 'normal' deadlocks that can occur. | ||
342 | |||
343 | FIXME: Update this section once we have the TASK_DEADLOCK task state flag magic | ||
344 | implemented. | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index 3840b6f28afb..fc66d42422ee 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -657,9 +657,10 @@ Protocol: 2.08+ | |||
657 | uncompressed data should be determined using the standard magic | 657 | uncompressed data should be determined using the standard magic |
658 | numbers. The currently supported compression formats are gzip | 658 | numbers. The currently supported compression formats are gzip |
659 | (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA | 659 | (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA |
660 | (magic number 5D 00), and XZ (magic number FD 37). The uncompressed | 660 | (magic number 5D 00), XZ (magic number FD 37), and LZ4 (magic number |
661 | payload is currently always ELF (magic number 7F 45 4C 46). | 661 | 02 21). The uncompressed payload is currently always ELF (magic |
662 | 662 | number 7F 45 4C 46). | |
663 | |||
663 | Field name: payload_length | 664 | Field name: payload_length |
664 | Type: read | 665 | Type: read |
665 | Offset/size: 0x24c/4 | 666 | Offset/size: 0x24c/4 |
diff --git a/Documentation/x86/early-microcode.txt b/Documentation/x86/early-microcode.txt index 4aaf0dfb0cb8..d62bea6796da 100644 --- a/Documentation/x86/early-microcode.txt +++ b/Documentation/x86/early-microcode.txt | |||
@@ -11,7 +11,8 @@ file and loaded to CPUs during boot time. | |||
11 | The format of the combined initrd image is microcode in cpio format followed by | 11 | The format of the combined initrd image is microcode in cpio format followed by |
12 | the initrd image (maybe compressed). Kernel parses the combined initrd image | 12 | the initrd image (maybe compressed). Kernel parses the combined initrd image |
13 | during boot time. The microcode file in cpio name space is: | 13 | during boot time. The microcode file in cpio name space is: |
14 | kernel/x86/microcode/GenuineIntel.bin | 14 | on Intel: kernel/x86/microcode/GenuineIntel.bin |
15 | on AMD : kernel/x86/microcode/AuthenticAMD.bin | ||
15 | 16 | ||
16 | During BSP boot (before SMP starts), if the kernel finds the microcode file in | 17 | During BSP boot (before SMP starts), if the kernel finds the microcode file in |
17 | the initrd file, it parses the microcode and saves matching microcode in memory. | 18 | the initrd file, it parses the microcode and saves matching microcode in memory. |
@@ -34,10 +35,8 @@ original initrd image /boot/initrd-3.5.0.img. | |||
34 | 35 | ||
35 | mkdir initrd | 36 | mkdir initrd |
36 | cd initrd | 37 | cd initrd |
37 | mkdir kernel | 38 | mkdir -p kernel/x86/microcode |
38 | mkdir kernel/x86 | 39 | cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin (or AuthenticAMD.bin) |
39 | mkdir kernel/x86/microcode | 40 | find . | cpio -o -H newc >../ucode.cpio |
40 | cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin | ||
41 | find .|cpio -oc >../ucode.cpio | ||
42 | cd .. | 41 | cd .. |
43 | cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img | 42 | cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img |